draw.io is a JavaScript, client-side editor for general diagramming.
26.1.0 release
David Benson4e308f742fd4
diff --git a/ChangeLog b/ChangeLogindex a56f62b0f..ead3a89d9 100644--- a/ChangeLog+++ b/ChangeLog@@ -1,3 +1,10 @@+05-MAR-2025: 26.1.0++- Tenant for OneDrive fix [jgraph/drawio#4905]+- Fixes print to PDF export dialog size and button title+- Fixed images in vsdx export with multiple pages and also image scale [DID-14515]+- Removes vsdx export functionality+21-FEB-2025: 26.0.16- Fixes colors in vsdx export [DID-14515]diff --git a/VERSION b/VERSIONindex afef36183..be5f09d0a 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-26.0.16\ No newline at end of file+26.1.0\ No newline at end of filediff --git a/src/main/java/com/mxgraph/online/MSGraphAuth.java b/src/main/java/com/mxgraph/online/MSGraphAuth.javaindex a26301e69..a04157e1c 100644--- a/src/main/java/com/mxgraph/online/MSGraphAuth.java+++ b/src/main/java/com/mxgraph/online/MSGraphAuth.java@@ -1,5 +1,5 @@/**- * Copyright (c) 2006-2019, JGraph Ltd+ * Copyright (c) 2006-2025, JGraph Ltd, draw.io AG*/package com.mxgraph.online;@@ -75,4 +75,4 @@ abstract public class MSGraphAuth extends AbsAuthreturn res.toString();}-}+}\ No newline at end of filediff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.jsindex 54378ef06..51fdf7502 100644--- a/src/main/webapp/js/app.min.js+++ b/src/main/webapp/js/app.min.js@@ -64,7 +64,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";-window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.0.16",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.1.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||@@ -2018,7 +2018,7 @@ Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDthis.container.parentNode.removeChild(this.container)};var ErrorDialog=function(a,b,e,f,h,d,g,m,q,k,u){q=null!=q?q:!0;var w=document.createElement("div");w.style.textAlign="center";if(null!=b){var z=document.createElement("div");z.style.padding="0px";z.style.margin="0px";z.style.fontSize="18px";z.style.paddingBottom="16px";z.style.marginBottom="10px";z.style.borderBottom="1px solid #c0c0c0";z.style.color="gray";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.overflow="hidden";mxUtils.write(z,b);z.setAttribute("title",b);w.appendChild(z)}b=document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";"string"===typeof e&&(e=e.replace(/\n/g,"<br/>"));b.innerHTML=Graph.sanitizeHtml(e);w.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=k&&(k=mxUtils.button(k,function(){null!=u&&u()}),k.className="geBtn",e.appendChild(k));-var C=mxUtils.button(f,function(){q&&a.hideDialog();null!=h&&h()});C.className="geBtn";e.appendChild(C);null!=g&&(f=mxUtils.button(g,function(){q&&a.hideDialog();null!=m&&m()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){C.focus()};w.appendChild(e);this.container=w},PrintDialog=function(a,b,e){this.create(a,b,e)};+var C=mxUtils.button(f,function(){q&&a.hideDialog();null!=h&&h()});C.className="geBtn";e.appendChild(C);null!=g&&(f=mxUtils.button(g,function(){q&&a.hideDialog();null!=m&&m()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){C.focus()};w.appendChild(e);this.container=w},PrintDialog=function(a,b,e,f){this.create(a,b,e,f)};PrintDialog.prototype.create=function(a){function b(C){var E=g.checked||k.checked,D=parseInt(w.value)/100;isNaN(D)&&(D=1,w.value="100%");mxClient.IS_SF&&(D*=.75);var G=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,J=1/e.pageScale;if(E){var L=g.checked?1:parseInt(u.value);isNaN(L)||(J=mxUtils.getScaleForPageCount(L,e,G))}var Q=L=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*D);G.height=Math.ceil(G.height*D);J*=D;!E&&e.pageVisible?(D=e.getPageLayout(),L-=D.x*G.width,Q-=D.y*G.height):E=!0;E=PrintDialog.createPrintPreview(e,J,G,0,L,Q,E);E.open();C&&PrintDialog.printPreview(E)}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var h=document.createElement("tbody");var d=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");var m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";m.appendChild(g);var q=document.createElement("span");mxUtils.write(q," "+mxResources.get("fitPage"));m.appendChild(q);mxEvent.addListener(q,"click",function(C){g.checked=!g.checked;k.checked=!g.checked;mxEvent.consume(C)});mxEvent.addListener(g,"change",function(){k.checked=!g.checked});d.appendChild(m);h.appendChild(d);d=d.cloneNode(!1);var k=document.createElement("input");k.setAttribute("type","checkbox");m=document.createElement("td");m.style.fontSize="10pt";m.appendChild(k);q=document.createElement("span");mxUtils.write(q," "+mxResources.get("posterPrint")+":");m.appendChild(q);mxEvent.addListener(q,@@ -3175,9 +3175,9 @@ var b=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPAStyleFormatPanel.prototype.getCssRules=function(a){var b=document.implementation.createHTMLDocument(""),e=document.createElement("style");mxUtils.setTextContent(e,a);b.body.appendChild(e);return e.sheet.cssRules};StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var e=b.style.editableCssRules;if(null!=e){var f=new RegExp(e),h=b.style.image.substring(b.style.image.indexOf(",")+1),d=window.atob?decodeURIComponent(escape(atob(h))):Base64.decode(h,!0),g=mxUtils.parseXml(d);if(null!=g){var m="light"==g.documentElement.style.colorScheme||"0"==mxUtils.getValue(b.style,"darkMode",null),q=""==g.documentElement.style.colorScheme,k=g.getElementsByTagName("style");for(b=0;b<k.length;b++){var u=this.getCssRules(mxUtils.getTextContent(k[b]));for(e=0;e<u.length;e++)this.addSvgRule(a,u[e],g,k[b],u,e,f,m,q)}}}}catch(w){}return a};StyleFormatPanel.prototype.getColorSchemeFromCss=function(a){return(a=a.match(/color-scheme\s*:\s*([^;]+)/i))?a[1].trim():null};-StyleFormatPanel.prototype.addSvgRule=function(a,b,e,f,h,d,g,m,q){var k=this.editorUi,u=k.editor.graph;g.test(b.selectorText)&&(g=mxUtils.bind(this,function(w,z,C,E){var D=mxUtils.trim(w.style[z]);if(""!=D&&"url("!=D.substring(0,4)){var G=D;"transparent"==G?G=mxConstants.NONE:(D=mxUtils.isLightDarkColor(G))&&E?E=!1:D||E||(G="light-dark("+G+", "+G+")");w=this.createColorOption(C+" "+w.selectorText,function(){return G},mxUtils.bind(this,function(J){h[d].style[z]=J==mxConstants.NONE?"transparent":mxUtils.getLightDarkColor(J).cssText;-J="";q&&mxUtils.isLightDarkColor(h[d].style[z])&&(e.documentElement.style.colorScheme="light dark");for(var L=0;L<h.length;L++)J+=h[L].cssText+" ";f.textContent=J;J=mxUtils.getXml(e.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(unescape(encodeURIComponent(J))):Base64.encode(J,!0)),k.getSelectionState().cells)}),"#ffffff",{install:function(J){},destroy:function(){}},null,null,null,E);a.appendChild(w);a.style.display=""}}),g(b,"fill",mxResources.get("fill"),-m),g(b,"stroke",mxResources.get("line"),m),g(b,"stop-color",mxResources.get("gradient"),m))};+StyleFormatPanel.prototype.addSvgRule=function(a,b,e,f,h,d,g,m,q){var k=this.editorUi,u=k.editor.graph;g.test(b.selectorText)&&(g=mxUtils.bind(this,function(w,z,C,E){var D=mxUtils.trim(w.style.getPropertyValue(z));if(""!=D&&"url("!=D.substring(0,4)){var G=D;"transparent"==G?G=mxConstants.NONE:(D=mxUtils.isLightDarkColor(G))&&E?E=!1:D||E||(G="light-dark("+G+", "+G+")");w=this.createColorOption(C+" "+w.selectorText,function(){return G},mxUtils.bind(this,function(J){h[d].style.setProperty(z,J==mxConstants.NONE?+"transparent":mxUtils.getLightDarkColor(J).cssText);J="";q&&mxUtils.isLightDarkColor(h[d].style[z])&&(e.documentElement.style.colorScheme="light dark");for(var L=0;L<h.length;L++)J+=h[L].cssText+" ";f.textContent=J;J=mxUtils.getXml(e.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(unescape(encodeURIComponent(J))):Base64.encode(J,!0)),k.getSelectionState().cells)}),"#ffffff",{install:function(J){},destroy:function(){}},null,null,null,E);a.appendChild(w);+a.style.display=""}}),g(b,"fill",mxResources.get("fill"),m),g(b,"stroke",mxResources.get("line"),m),g(b,"stop-color",mxResources.get("gradient"),m))};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState();if(1==b.cells.length){var e=document.createElement("select");e.style.width="210px";e.style.textAlign="center";e.style.marginBottom="2px";var f="edit copyAsText editLink editShape editImage editData copyData pasteData editConnectionPoints editGeometry editTooltip editStyle".split(" "),h=null;if(null!=this.editorUi.sidebar){var d=this.editorUi.sidebar.getKeyStyle(b.cells[0].style);h=this.editorUi.sidebar.getLibsForStyle(d);null!=h||this.editorUi.sidebar.isSearchIndexLoaded()||null==b.style.shape||"mxgraph."!=String(b.style.shape).substring(0,8)||(h=[])}null!=h&&f.push("openLibrary");for(d=0;d<f.length;d++){var g=this.editorUi.actions.get(f[d]);if(null==g||g.enabled){var m=document.createElement("option");m.setAttribute("value",f[d]);var q=mxResources.get(f[d]);mxUtils.write(m,q+("edit"==f[d]?"":"..."));null!=g&&null!=g.shortcut&&(q+=" ("+g.shortcut+")");m.setAttribute("title",q);e.appendChild(m)}}1<e.children.length&&(a.appendChild(e),mxEvent.addListener(e,"change",mxUtils.bind(this,function(k){"openLibrary"==e.value?(null!=h&&0==h.length&&(this.editorUi.sidebar.updateSearchIndex(),k=this.editorUi.sidebar.getKeyStyle(b.cells[0].style),h=this.editorUi.sidebar.getLibsForStyle(k)),null!=h&&0<h.length?this.editorUi.sidebar.openLibraries(h):this.editorUi.handleError({message:mxResources.get("objectNotFound")}),e.value="edit"):(k=this.editorUi.actions.get(e.value),e.value="edit",null!=k&&k.funct())})),b.image&&(f=this.editorUi.editor.graph,@@ -12171,26 +12171,26 @@ DrawioFile.prototype.synchronizeFile=function(b,e){if(this.savingFile)null!=e&&efunction(p){f&&(window.clearTimeout(c),this.sync.cleanup(b,e,p))}),l,n):this.updateFile(mxUtils.bind(this,function(){f&&(window.clearTimeout(c),null!=b&&b())}),l,n)}};DrawioFile.prototype.updateFile=function(b,e,f,c,l){null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",l,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(n){try{null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[n]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=n?this.mergeFile(n,b,e,c,l):this.reloadFile(b,e))}catch(p){null!=e&&e(p)}}),e))};-DrawioFile.prototype.mergeFile=function(b,e,f,c,l){try{var n=b.getShadowPages();if(null!=n&&0<n.length){var p=this.getShadowPages(),u=[this.ui.diffPages(null!=c?c:p,n)],F=this.ignorePatches(u);if(F)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",F),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var H=this.isModified()?this.ui.diffPages(p,-this.isRealtime()?this.ownPages:this.ui.pages):null,E=this.ui.patchPages(this.ui.clonePages(p),u[0]),K=this.ui.getHashValueForPages(E,{}),d=this.ui.getHashValueForPages(n,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",p,"pages",n,"patched",E,"patches",u,"changes",H,"checksum",K,"current",d,"valid",K==d,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",l);if(null!=K&&K!=d)this.checksumError(f,u,null,null,"mergeFile",-K,d,b.getCurrentRevisionId());else{this.setShadowPages(n);if(null!=this.sync){var g=this.sync.patchRealtime(u,DrawioFile.LAST_WRITE_WINS?H:null,null,l);null==g||mxUtils.isEmptyObject(g)||u.push(g)}this.patch(u,DrawioFile.LAST_WRITE_WINS?H:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=e&&e()}}catch(t){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(t);try{var k=this.getCurrentUser(),v=null!=k?-k.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),v,t)}catch(x){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(t){null!=f&&f(t)}};+DrawioFile.prototype.mergeFile=function(b,e,f,c,l){try{var n=b.getShadowPages();if(null!=n&&0<n.length){var p=this.getShadowPages(),v=[this.ui.diffPages(null!=c?c:p,n)],F=this.ignorePatches(v);if(F)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",F),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var H=this.isModified()?this.ui.diffPages(p,+this.isRealtime()?this.ownPages:this.ui.pages):null,E=this.ui.patchPages(this.ui.clonePages(p),v[0]),K=this.ui.getHashValueForPages(E,{}),d=this.ui.getHashValueForPages(n,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",p,"pages",n,"patched",E,"patches",v,"changes",H,"checksum",K,"current",d,"valid",K==d,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",l);if(null!=K&&K!=d)this.checksumError(f,v,null,null,"mergeFile",+K,d,b.getCurrentRevisionId());else{this.setShadowPages(n);if(null!=this.sync){var g=this.sync.patchRealtime(v,DrawioFile.LAST_WRITE_WINS?H:null,null,l);null==g||mxUtils.isEmptyObject(g)||v.push(g)}this.patch(v,DrawioFile.LAST_WRITE_WINS?H:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=e&&e()}}catch(t){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(t);try{var k=this.getCurrentUser(),u=null!=k?+k.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),u,t)}catch(x){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(t){null!=f&&f(t)}};DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),f=e.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var l=e.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(l=this.ui.anonymizeNode(l,!0));l.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,l,!0);f.appendChild(l)}return mxUtils.getPrettyXml(f)};DrawioFile.prototype.compressReportData=function(b,e,f){e=null!=e?e:1E4;null!=f&&null!=b&&b.length>f?b=b.substring(0,f)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};-DrawioFile.prototype.checksumError=function(b,e,f,c,l,n,p,u){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var F=this.getCurrentUser(),H=null!=F?F.id:"unknown",E=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",K=JSON.stringify(e).length,d=null;if(null!=e&&1E3>K){for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);d=JSON.stringify(e);d=null!=d&&1E3>d.length?Graph.compress(d):-null}this.getLatestVersion(mxUtils.bind(this,function(g){try{var k=null!=d?"report":"error",v=this.ui.getHashValueForPages(g.getShadowPages()),t="unknown",x="unknown",A="unknown";try{var J=null!=g.initialData&&0<g.initialData.length?mxUtils.parseXml(g.initialData).documentElement:null;null!=J&&(null!=J.getAttribute("version")&&(t=J.getAttribute("version")),null!=J.getAttribute("agent")&&(x=J.getAttribute("agent")),null!=J.getAttribute("type")&&(A=J.getAttribute("type")))}catch(D){}EditorUi.logError("Checksum "+-k+" in "+l,null,this.getMode()+"."+E,"user_"+H+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+K+"-patches_"+e.length+(null!=d?"-json_"+d:"")+"-size_"+this.getSize()+(null!=n?"-expected_"+n:"")+(null!=p?"-current_"+p:"")+(null!=u?"-rev_"+this.ui.hashValue(u):"")+(null!=v?"-latest_"+v:"")+"-latestRev_"+this.ui.hashValue(g.getCurrentRevisionId())+("-latestVersion_"+t)+("-latestAgent_"+x)+("-latestType_"+A));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+E,action:l,label:"user_"++DrawioFile.prototype.checksumError=function(b,e,f,c,l,n,p,v){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var F=this.getCurrentUser(),H=null!=F?F.id:"unknown",E=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",K=JSON.stringify(e).length,d=null;if(null!=e&&1E3>K){for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);d=JSON.stringify(e);d=null!=d&&1E3>d.length?Graph.compress(d):+null}this.getLatestVersion(mxUtils.bind(this,function(g){try{var k=null!=d?"report":"error",u=this.ui.getHashValueForPages(g.getShadowPages()),t="unknown",x="unknown",A="unknown";try{var J=null!=g.initialData&&0<g.initialData.length?mxUtils.parseXml(g.initialData).documentElement:null;null!=J&&(null!=J.getAttribute("version")&&(t=J.getAttribute("version")),null!=J.getAttribute("agent")&&(x=J.getAttribute("agent")),null!=J.getAttribute("type")&&(A=J.getAttribute("type")))}catch(D){}EditorUi.logError("Checksum "++k+" in "+l,null,this.getMode()+"."+E,"user_"+H+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+K+"-patches_"+e.length+(null!=d?"-json_"+d:"")+"-size_"+this.getSize()+(null!=n?"-expected_"+n:"")+(null!=p?"-current_"+p:"")+(null!=v?"-rev_"+this.ui.hashValue(v):"")+(null!=u?"-latest_"+u:"")+"-latestRev_"+this.ui.hashValue(g.getCurrentRevisionId())+("-latestVersion_"+t)+("-latestAgent_"+x)+("-latestType_"+A));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+E,action:l,label:"user_"+H+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+K+"-patches_"+e.length+"-size_"+this.getSize()})}catch(D){}}),function(){})}catch(g){}};-DrawioFile.prototype.sendErrorReport=function(b,e,f,c){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),p=this.getCurrentUser(),u=null!=p?this.ui.hashValue(p.id):"unknown",F=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",H=this.getTitle(),E=H.lastIndexOf(".");p="xml";0<E&&(p=H.substring(E));var K=null!=f?f.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+p+")\nUser="+u+F+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:+DrawioFile.prototype.sendErrorReport=function(b,e,f,c){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),p=this.getCurrentUser(),v=null!=p?this.ui.hashValue(p.id):"unknown",F=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",H=this.getTitle(),E=H.lastIndexOf(".");p="xml";0<E&&(p=H.substring(E));var K=null!=f?f.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()++":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+p+")\nUser="+v+F+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:"")+(null!=f?"\n\nError: "+f.message:"")+"\n\nStack:\n"+K+"\n\nShadow:\n"+l+"\n\nData:\n"+n,c)}catch(d){}};-DrawioFile.prototype.reloadFile=function(b,e){try{this.stats.fileReloaded++;var f=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),c=this.ui.editor.graph,l=c.getSelectionCells(),n=c.getViewState(),p=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(u){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[f],"viewState",[n],"latestFile",u);null!=u?(this.ui.replaceFileData(u.getData(),-[f]),this.ui.restoreViewState(p,n,l),this.setDescriptor(u.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var F=this.ui.getCurrentFile();null!=F&&(F.stats=this.stats,F.patch([f]),F.fileChanged());this.ui.restoreViewState(p,n,l);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(u){null!=e&&e(u)}};+DrawioFile.prototype.reloadFile=function(b,e){try{this.stats.fileReloaded++;var f=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),c=this.ui.editor.graph,l=c.getSelectionCells(),n=c.getViewState(),p=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(v){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[f],"viewState",[n],"latestFile",v);null!=v?(this.ui.replaceFileData(v.getData(),+[f]),this.ui.restoreViewState(p,n,l),this.setDescriptor(v.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var F=this.ui.getCurrentFile();null!=F&&(F.stats=this.stats,F.patch([f]),F.fileChanged());this.ui.restoreViewState(p,n,l);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(v){null!=e&&e(v)}};DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var f=0;f<b.length&&e;f++)e=e&&mxUtils.isEmptyObject(b[f]);return e};-DrawioFile.prototype.patch=function(b,e,f,c){if(null!=b){var l=this.ui.editor.undoManager,n=l.history.slice(),p=l.indexOfNextAdd,u=this.ui.editor.graph;u.container.style.visibility="hidden";var F=this.changeListenerEnabled;this.changeListenerEnabled=f;var H=u.foldingEnabled,E=u.mathEnabled,K=u.cellRenderer.redraw;u.cellRenderer.redraw=function(x){x.view.graph.isEditing(x.cell)&&(x.view.graph.scrollCellToVisible(x.cell),x.view.graph.cellEditor.resize());K.apply(this,arguments)};u.model.beginUpdate();-try{if(f){for(var d=this.ui.pages.slice(),g=this.ui.currentPage,k=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),v=0;v<k.length;v++){var t=mxUtils.indexOf(this.ui.pages,k[v]);0>t?this.ui.insertPage(k[v],Math.min(v,this.ui.pages.length)):this.ui.movePage(t,v)}for(v=0;v<d.length;v++)0>mxUtils.indexOf(k,d[v])&&this.ui.removePage(d[v]);0<=mxUtils.indexOf(this.ui.pages,g)&&this.ui.selectPage(g,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified());0==this.ui.pages.length&&-this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);u.checkDefaultParent()}finally{u.container.style.visibility="";u.model.endUpdate();u.cellRenderer.redraw=K;this.changeListenerEnabled=F;f||(l.history=n,l.indexOfNextAdd=p,l.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)E!=u.mathEnabled?(this.ui.editor.updateGraphComponents(),u.refresh()):(H!=u.foldingEnabled?-u.view.revalidate():u.view.validate(),u.sizeDidChange());null!=this.sync&&this.isRealtime()&&!c&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",f)}return b};+DrawioFile.prototype.patch=function(b,e,f,c){if(null!=b){var l=this.ui.editor.undoManager,n=l.history.slice(),p=l.indexOfNextAdd,v=this.ui.editor.graph;v.container.style.visibility="hidden";var F=this.changeListenerEnabled;this.changeListenerEnabled=f;var H=v.foldingEnabled,E=v.mathEnabled,K=v.cellRenderer.redraw;v.cellRenderer.redraw=function(x){x.view.graph.isEditing(x.cell)&&(x.view.graph.scrollCellToVisible(x.cell),x.view.graph.cellEditor.resize());K.apply(this,arguments)};v.model.beginUpdate();+try{if(f){for(var d=this.ui.pages.slice(),g=this.ui.currentPage,k=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),u=0;u<k.length;u++){var t=mxUtils.indexOf(this.ui.pages,k[u]);0>t?this.ui.insertPage(k[u],Math.min(u,this.ui.pages.length)):this.ui.movePage(t,u)}for(u=0;u<d.length;u++)0>mxUtils.indexOf(k,d[u])&&this.ui.removePage(d[u]);0<=mxUtils.indexOf(this.ui.pages,g)&&this.ui.selectPage(g,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified());0==this.ui.pages.length&&+this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);v.checkDefaultParent()}finally{v.container.style.visibility="";v.model.endUpdate();v.cellRenderer.redraw=K;this.changeListenerEnabled=F;f||(l.history=n,l.indexOfNextAdd=p,l.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)E!=v.mathEnabled?(this.ui.editor.updateGraphComponents(),v.refresh()):(H!=v.foldingEnabled?+v.view.revalidate():v.view.validate(),v.sizeDidChange());null!=this.sync&&this.isRealtime()&&!c&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",f)}return b};DrawioFile.prototype.save=function(b,e,f,c,l,n){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",c,"overwrite",l,"manual",n,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!l&&this.invalidChecksum)if(null!=f)f({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=f)f({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(p){if(null!=f)f(p);else throw p;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return Editor.defaultCompressed};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};@@ -12240,27 +12240,27 @@ DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=newmxUtils.bind(this,function(e){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(e,mxUtils.bind(this,function(f){EditorUi.debug("DrawioFile.createSecret",[this],"secret",e,"token",f);b(e,f)}),mxUtils.bind(this,function(){b(e)})):b(e)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};DrawioFile.prototype.fileSaved=function(b,e,f,c,l,n,p){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;n=null!=n?n:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(n),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=f&&f()):this.sync.fileSaved(n,e,f,c,l,p)}catch(H){this.invalidChecksum=-this.inConflictState=!0;this.descriptorChanged();null!=c&&c(H);try{var u=this.getCurrentUser(),F=null!=u?u.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),F,H)}catch(E){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(H){this.descriptorChanged(),null!=c&&c(H)}};+this.inConflictState=!0;this.descriptorChanged();null!=c&&c(H);try{var v=this.getCurrentUser(),F=null!=v?v.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),F,H)}catch(E){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(H){this.descriptorChanged(),null!=c&&c(H)}};DrawioFile.prototype.autosave=function(b,e,f,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());var l=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var n=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==n&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",n,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision();-p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(u){this.autosaveCompleted();null!=f&&f(u)}),mxUtils.bind(this,function(u){null!=c&&c(u)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=f&&f(null)}catch(u){null!=c&&c(u)}}),l);this.autosaveThread=n;EditorUi.debug("DrawioFile.autosave",[this],"thread",n,"delay",b,"maxDelay",e,"actualDelay",l,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};+p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(v){this.autosaveCompleted();null!=f&&f(v)}),mxUtils.bind(this,function(v){null!=c&&c(v)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=f&&f(null)}catch(v){null!=c&&c(v)}}),l);this.autosaveThread=n;EditorUi.debug("DrawioFile.autosave",[this],"thread",n,"delay",b,"maxDelay",e,"actualDelay",l,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.close=function(b){try{this.isAutosave()&&this.isModified()&&(this.updateFileData(),this.save(this.isAutosaveRevision(),null,null,b))}catch(e){}this.stats.closed++;this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var f=b.lastIndexOf(".");b=0<f?b.substring(f):"";f=e.lastIndexOf(".");return b===(0<f?e.substring(f):"")}return b==e};DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,f){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,f,c,l,n,p){DrawioFile.call(this,b,e);this.title=f;this.mode=c?null:App.MODE_DEVICE;this.fileHandle=l;this.desc=n;this.editable=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,e,f,c,l){this.saveAs(this.title,e,f,c,l)};LocalFile.prototype.saveAs=function(b,e,f,c,l){this.saveFile(b,!1,e,f,null,c,l)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?null!=e&&e({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};-LocalFile.prototype.saveFile=function(b,e,f,c,l,n,p){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;l||this.updateFileData();var u=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var F=this.getData(),H=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),E=mxUtils.bind(this,function(K){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=-!0;var d=mxUtils.bind(this,function(k){this.savingFile=!1;null!=c&&c({error:k})});this.saveDraft(F);this.fileHandle.createWritable().then(mxUtils.bind(this,function(k){this.fileHandle.getFile().then(mxUtils.bind(this,function(v){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[v],"conflict",this.desc.lastModified!=v.lastModified);p||this.desc.lastModified==v.lastModified?k.write(u?this.ui.base64ToBlob(K,"image/png"):K).then(mxUtils.bind(this,function(){k.close().then(mxUtils.bind(this,-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){try{var x=this.desc;this.savingFile=!1;this.desc=t;this.fileSaved(F,x,H,d);this.removeDraft()}catch(A){d(A)}}),d)}),d)}),d):(this.inConflictState=!0,d())}),mxUtils.bind(this,function(v){this.invalidFileHandle=!0;d(v)}))}),d)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(K,b,u?"image/png":"text/xml",u);else if(K.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";-(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(K)+"&filename="+encodeURIComponent(b)+(u?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(K)}));H()}});u?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(K){E(K)}),c,this.ui.getCurrentFile()!=this?F:null,e.scale,e.border)):E(F)};+LocalFile.prototype.saveFile=function(b,e,f,c,l,n,p){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;l||this.updateFileData();var v=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var F=this.getData(),H=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),E=mxUtils.bind(this,function(K){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=+!0;var d=mxUtils.bind(this,function(k){this.savingFile=!1;null!=c&&c({error:k})});this.saveDraft(F);this.fileHandle.createWritable().then(mxUtils.bind(this,function(k){this.fileHandle.getFile().then(mxUtils.bind(this,function(u){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[u],"conflict",this.desc.lastModified!=u.lastModified);p||this.desc.lastModified==u.lastModified?k.write(v?this.ui.base64ToBlob(K,"image/png"):K).then(mxUtils.bind(this,function(){k.close().then(mxUtils.bind(this,+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){try{var x=this.desc;this.savingFile=!1;this.desc=t;this.fileSaved(F,x,H,d);this.removeDraft()}catch(A){d(A)}}),d)}),d)}),d):(this.inConflictState=!0,d())}),mxUtils.bind(this,function(u){this.invalidFileHandle=!0;d(u)}))}),d)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(K,b,v?"image/png":"text/xml",v);else if(K.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";+(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(K)+"&filename="+encodeURIComponent(b)+(v?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(K)}));H()}});v?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(K){E(K)}),c,this.ui.getCurrentFile()!=this?F:null,e.scale,e.border)):E(F)};LocalFile.prototype.rename=function(b,e,f){this.title=b;this.descriptorChanged();null!=e&&e()};LocalLibrary=function(b,e,f){LocalFile.call(this,b,e,f)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,e,f){DrawioFile.call(this,b,e);this.title=f;this.etag=this.getEtag(e)};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.getEtag=function(b){return this.ui.hashValue(null!=b?b:"")};StorageFile.prototype.autosaveDelay=500;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.maxRetries=5;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isSyncSupported=function(){return!0};StorageFile.prototype.isPolling=function(){return this.isSyncSupported()};StorageFile.prototype.getPollingInterval=function(){return 1E4};StorageFile.prototype.loadDescriptor=function(b,e){this.getLatestVersionId(b,e)};StorageFile.prototype.getLatestVersionId=function(b,e){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(f){b(this.getEtag(f))}),e)};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.getDescriptor=function(){return this.etag};StorageFile.prototype.setDescriptor=function(b){this.etag=b};StorageFile.prototype.getDescriptorEtag=function(b){return b};StorageFile.prototype.save=function(b,e,f){this.saveAs(this.getTitle(),e,f)};StorageFile.prototype.saveAs=function(b,e,f){DrawioFile.prototype.save.apply(this,[!1,mxUtils.bind(this,function(){this.saveFile(this.getTitle(),!1,e,f)}),f])};StorageFile.insertFile=function(b,e,f,c,l,n){StorageFile.doInsertFile(null!=n?n:new StorageFile(b,f,e),c,l)};-StorageFile.doInsertFile=function(b,e,f){var c=b.getTitle(),l=b.getUi(),n=mxUtils.bind(this,function(p){var u=function(){b.writeFile(c,function(){e(b)},f)};p?l.confirm(mxResources.get("replaceIt",[c]),u,f):u()});StorageFile.getFileContent(l,c,function(p){n(null!=p)},function(){n(!1)})};StorageFile.getFileContent=function(b,e,f,c){b.getDatabaseItem(e,function(l){f(null!=l?l.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,f):null!=c&&c()}),"files")};+StorageFile.doInsertFile=function(b,e,f){var c=b.getTitle(),l=b.getUi(),n=mxUtils.bind(this,function(p){var v=function(){b.writeFile(c,function(){e(b)},f)};p?l.confirm(mxResources.get("replaceIt",[c]),v,f):v()});StorageFile.getFileContent(l,c,function(p){n(null!=p)},function(){n(!1)})};StorageFile.getFileContent=function(b,e,f,c){b.getDatabaseItem(e,function(l){f(null!=l?l.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,f):null!=c&&c()}),"files")};StorageFile.getFileInfo=function(b,e,f,c){b.getDatabaseItem(e,function(l){f(l)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,function(l){f(null!=l?{title:e}:null)}):null!=c&&c()}),"filesInfo")};-StorageFile.prototype.saveFile=function(b,e,f,c,l){l=null!=l?l:0;if(this.isEditable()){var n=mxUtils.bind(this,function(){this.writeFile(b,f,c)});this.isRenamable()&&"."==b.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):this instanceof StorageLibrary?n():StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(p){this.isRenamable()&&this.getTitle()!=b&&null!=p?this.ui.confirm(mxResources.get("replaceIt",[b]),n,c):this.getLatestVersion(mxUtils.bind(this,function(u){u.getDescriptor()!=-this.getDescriptor()?(EditorUi.debug("StorageFile.saveFile",[this],"conflict",[u]),this.mergeFile(u,mxUtils.bind(this,function(){l>=this.maxRetries||this.invalidChecksum||this.inConflictState?(this.inConflictState=!0,null!=c&&c()):this.retrySave(mxUtils.bind(this,function(){this.updateFileData();this.saveFile(b,e,f,c,l+1)}))}),c)):n()}),c)}),c)}else null!=f&&f();EditorUi.debug("StorageFile.saveFile",[this],"title",b,"revision",e,"retry",l)};+StorageFile.prototype.saveFile=function(b,e,f,c,l){l=null!=l?l:0;if(this.isEditable()){var n=mxUtils.bind(this,function(){this.writeFile(b,f,c)});this.isRenamable()&&"."==b.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):this instanceof StorageLibrary?n():StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(p){this.isRenamable()&&this.getTitle()!=b&&null!=p?this.ui.confirm(mxResources.get("replaceIt",[b]),n,c):this.getLatestVersion(mxUtils.bind(this,function(v){v.getDescriptor()!=+this.getDescriptor()?(EditorUi.debug("StorageFile.saveFile",[this],"conflict",[v]),this.mergeFile(v,mxUtils.bind(this,function(){l>=this.maxRetries||this.invalidChecksum||this.inConflictState?(this.inConflictState=!0,null!=c&&c()):this.retrySave(mxUtils.bind(this,function(){this.updateFileData();this.saveFile(b,e,f,c,l+1)}))}),c)):n()}),c)}),c)}else null!=f&&f();EditorUi.debug("StorageFile.saveFile",[this],"title",b,"revision",e,"retry",l)};StorageFile.prototype.retrySave=function(b){var e=300+300*Math.random();window.setTimeout(b,e);EditorUi.debug("StorageFile.retrySave",[this],"delay",e)};StorageFile.prototype.writeFile=function(b,e,f){this.isRenamable()&&(this.title=b);try{var c=this.getDescriptor(),l=this.getData(),n=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.setDescriptor(this.getEtag(l));this.contentChanged();this.fileSaved(l,c,e,f)});this.setShadowModified(!1);this.ui.setDatabaseItem(null,[{title:this.title,size:l.length,lastModified:Date.now(),type:this.type},{title:this.title,data:l}],n,mxUtils.bind(this,function(){if(null==this.ui.database)try{this.ui.setLocalData(this.title,l,n)}catch(p){null!=f&&f(p)}else null!=f&&f()}),["filesInfo","files"])}catch(p){null!=f&&f(p)}};StorageFile.prototype.rename=function(b,e,f){var c=this.getTitle();c!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(l){var n=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(c,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,e)}),f)});null!=l?this.ui.confirm(mxResources.get("replaceIt",[b]),n,f):n()}),f):e()};@@ -12271,397 +12271,397 @@ StorageFile.listFiles=function(b,e,f,c){b.getDatabaseItems(function(l){var n=[];StorageLibrary.prototype.isRenamable=function(b,e,f){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,e,f){DrawioFile.call(this,b,e);this.title=f;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,e,f){RemoteFile.call(this,b,e,f.title);this.libObj=f};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,e,f){};RemoteLibrary.prototype.saveAs=function(b,e,f){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,e,f){StorageFile.call(this,b,e,f);b=f;e=b.lastIndexOf("/");0<=e&&(b=b.substring(e+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,e,f){return!1};UrlLibrary.prototype.saveAs=function(b,e,f){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,e,f){DrawioFile.call(this,b,e);this.desc=f||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*mxClient.IS_IOS || */-var StorageDialog=function(b,e,f){function c(K,d,g,k,v,t){function x(){mxEvent.addListener(A,"click",null!=t?t:function(){g==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);e()})):g==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);e()}),function(V){b.spinner.stop();b.handleError(V)}):-(b.setMode(g,!0),e())})}u++;++p>f&&(mxUtils.br(F),p=1);var A=document.createElement("a");A.style.overflow="hidden";A.style.display="inline-block";A.className="geBaseButton";A.style.boxSizing="border-box";A.style.fontSize="11px";A.style.position="relative";A.style.margin="4px";A.style.marginTop="8px";A.style.marginBottom="0px";A.style.padding="8px 10px 8px 10px";A.style.width="88px";A.style.height="100px";A.style.whiteSpace="nowrap";A.setAttribute("title",d);var J=document.createElement("div");J.style.textOverflow=+var StorageDialog=function(b,e,f){function c(K,d,g,k,u,t){function x(){mxEvent.addListener(A,"click",null!=t?t:function(){g==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);e()})):g==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);e()}),function(U){b.spinner.stop();b.handleError(U)}):+(b.setMode(g,!0),e())})}v++;++p>f&&(mxUtils.br(F),p=1);var A=document.createElement("a");A.style.overflow="hidden";A.style.display="inline-block";A.className="geBaseButton";A.style.boxSizing="border-box";A.style.fontSize="11px";A.style.position="relative";A.style.margin="4px";A.style.marginTop="8px";A.style.marginBottom="0px";A.style.padding="8px 10px 8px 10px";A.style.width="88px";A.style.height="100px";A.style.whiteSpace="nowrap";A.setAttribute("title",d);var J=document.createElement("div");J.style.textOverflow="ellipsis";J.style.overflow="hidden";J.style.position="absolute";J.style.bottom="8px";J.style.left="0px";J.style.right="0px";mxUtils.write(J,d);A.appendChild(J);if(null!=K){var D=document.createElement("img");D.setAttribute("src",K);D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.width="60px";D.style.height="60px";D.style.paddingBottom="6px";A.appendChild(D)}else J.style.paddingTop="5px",J.style.whiteSpace="normal",mxClient.IS_IOS?(A.style.padding="0px 10px 20px 10px",A.style.top=-"6px"):mxClient.IS_FF&&(J.style.paddingTop="0px",J.style.marginTop="-2px");if(null!=v)for(K=0;K<v.length;K++)mxUtils.br(J),mxUtils.write(J,v[K]);if(null!=k&&null==b[k]){D.style.visibility="hidden";mxUtils.setOpacity(J,10);var G=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});G.spin(A);var R=window.setTimeout(function(){null==b[k]&&(G.stop(),A.style.display="none")},3E4);b.addListener("clientLoaded",-mxUtils.bind(this,function(V,Q){null!=b[k]&&Q.getProperty("client")==b[k]&&(window.clearTimeout(R),mxUtils.setOpacity(J,100),D.style.visibility="",G.stop(),x(),"drive"==k&&null!=H.parentNode&&H.parentNode.removeChild(H))}))}else x();F.appendChild(A)}f=null!=f?f:2;var l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace="nowrap";l.style.paddingTop="0px";l.style.paddingBottom="20px";var n=document.createElement("div");n.style.border="1px solid #d3d3d3";n.style.borderWidth="1px 0px 1px 0px";-n.style.padding="10px 0px 20px 0px";var p=0,u=0,F=document.createElement("div");F.style.paddingTop="2px";n.appendChild(F);var H=document.createElement("p"),E=document.createElement("p");E.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(E,mxResources.get("saveDiagramsTo")+":");l.appendChild(E);l.appendChild(n);p=0;"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===+"6px"):mxClient.IS_FF&&(J.style.paddingTop="0px",J.style.marginTop="-2px");if(null!=u)for(K=0;K<u.length;K++)mxUtils.br(J),mxUtils.write(J,u[K]);if(null!=k&&null==b[k]){D.style.visibility="hidden";mxUtils.setOpacity(J,10);var G=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});G.spin(A);var S=window.setTimeout(function(){null==b[k]&&(G.stop(),A.style.display="none")},3E4);b.addListener("clientLoaded",+mxUtils.bind(this,function(U,P){null!=b[k]&&P.getProperty("client")==b[k]&&(window.clearTimeout(S),mxUtils.setOpacity(J,100),D.style.visibility="",G.stop(),x(),"drive"==k&&null!=H.parentNode&&H.parentNode.removeChild(H))}))}else x();F.appendChild(A)}f=null!=f?f:2;var l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace="nowrap";l.style.paddingTop="0px";l.style.paddingBottom="20px";var n=document.createElement("div");n.style.border="1px solid #d3d3d3";n.style.borderWidth="1px 0px 1px 0px";+n.style.padding="10px 0px 20px 0px";var p=0,v=0,F=document.createElement("div");F.style.paddingTop="2px";n.appendChild(F);var H=document.createElement("p"),E=document.createElement("p");E.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(E,mxResources.get("saveDiagramsTo")+":");l.appendChild(E);l.appendChild(n);p=0;"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&c(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");n=document.createElement("span");n.style.position="absolute";n.style.cursor="pointer";n.style.bottom="27px";n.style.color="gray";n.style.userSelect="none";n.style.textAlign="center";n.style.left="50%";mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,0)");mxUtils.write(n,mxResources.get("decideLater"));l.appendChild(n);mxEvent.addListener(n,"click",function(){b.hideDialog();var K=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=K});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(H.style.padding="7px",H.style.fontSize="9pt",H.style.marginTop="-14px",H.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://www.drawio.com/doc/faq/google-drive-connection-problems" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",l.appendChild(H))},5E3);this.container=l},SplashDialog=function(b){var e=document.createElement("div");e.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var f=b.addLanguageMenu(e,!1,"28px");null!=f&&(f.style.bottom="24px")}var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width="32px";c.style.height="32px";c.style.marginRight="8px";c.style.marginTop="-4px";var l=document.createElement("div");l.style.margin="8px 0px 0px 0px";l.style.padding="18px 0px 24px 0px";f="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",f=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(c.src=IMAGE_PATH+"/dropbox-logo.svg",f=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",f=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?(c.src=IMAGE_PATH+"/github-logo.svg",f=mxResources.get("github")):b.mode==App.MODE_GITLAB?(c.src=IMAGE_PATH+"/gitlab-logo.svg",f=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(c.src=IMAGE_PATH+"/osa_database.png",f=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+"/trello-logo.svg",f=mxResources.get("trello")):(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",l.style.paddingBottom="10px",l.style.paddingTop="30px",f=mxResources.get("device"));var n=document.createElement("button");-n.className="geBigButton";n.style.marginBottom="8px";n.style.fontSize="18px";n.style.padding="10px";n.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)l.style.padding="42px 0px 10px 0px",n.style.marginBottom="12px";else{l.style.border="1px solid #d3d3d3";l.style.borderWidth="1px 0px 1px 0px";var p=document.createElement("table"),u=document.createElement("tbody"),F=document.createElement("tr"),H=document.createElement("td"),E=document.createElement("td");p.setAttribute("align",-"center");H.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,f);E.style.textAlign="left";E.appendChild(c);F.appendChild(H);F.appendChild(E);u.appendChild(F);p.appendChild(u);e.appendChild(p);f=document.createElement("span");f.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0)");mxUtils.write(f,+n.className="geBigButton";n.style.marginBottom="8px";n.style.fontSize="18px";n.style.padding="10px";n.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)l.style.padding="42px 0px 10px 0px",n.style.marginBottom="12px";else{l.style.border="1px solid #d3d3d3";l.style.borderWidth="1px 0px 1px 0px";var p=document.createElement("table"),v=document.createElement("tbody"),F=document.createElement("tr"),H=document.createElement("td"),E=document.createElement("td");p.setAttribute("align",+"center");H.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,f);E.style.textAlign="left";E.appendChild(c);F.appendChild(H);F.appendChild(E);v.appendChild(F);p.appendChild(v);e.appendChild(p);f=document.createElement("span");f.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0)");mxUtils.write(f,mxResources.get("changeStorage"));mxEvent.addListener(f,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});e.appendChild(f)}mxUtils.write(n,mxResources.get("createNewDiagram"));mxEvent.addListener(n,"click",function(){b.hideDialog();b.actions.get("new").funct()});l.appendChild(n);mxUtils.br(l);n=document.createElement("button");n.className="geBigButton";n.style.marginBottom="22px";n.style.fontSize="18px";n.style.padding="10px";n.style.width="340px";mxUtils.write(n,mxResources.get("openExistingDiagram"));mxEvent.addListener(n,"click",function(){b.actions.get("open").funct()});l.appendChild(n);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(f=function(g){n.style.marginBottom="24px";var k=document.createElement("a");k.style.display="inline-block";k.style.color="gray";k.style.cursor="pointer";k.style.marginTop="6px";mxUtils.write(k,mxResources.get("signOut"));n.style.marginBottom="16px";l.style.paddingBottom="18px";mxEvent.addListener(k,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){g()})});l.appendChild(k)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var K=b.drive.getUsersList();if(0<K.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");n.style.marginBottom="16px";l.style.paddingBottom="18px";l.appendChild(c);var d=document.createElement("select");d.style.marginLeft="4px";d.style.width="140px";for(f=0;f<K.length;f++)p=document.createElement("option"),mxUtils.write(p,K[f].displayName),p.value=f,d.appendChild(p),p=document.createElement("option"),p.innerHTML=" ",-mxUtils.write(p,"<"+K[f].email+">"),p.setAttribute("disabled","disabled"),d.appendChild(p);p=document.createElement("option");mxUtils.write(p,mxResources.get("addAccount"));p.value=K.length;d.appendChild(p);mxEvent.addListener(d,"change",function(){var g=d.value,k=K.length!=g;k&&b.drive.setUser(K[g]);b.drive.authorize(k,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(v){b.handleError(v,null,function(){b.hideDialog();b.showSplash()})},!0)});l.appendChild(d)}else f(function(){b.drive.logout()})}else b.mode!=+mxUtils.write(p,"<"+K[f].email+">"),p.setAttribute("disabled","disabled"),d.appendChild(p);p=document.createElement("option");mxUtils.write(p,mxResources.get("addAccount"));p.value=K.length;d.appendChild(p);mxEvent.addListener(d,"change",function(){var g=d.value,k=K.length!=g;k&&b.drive.setUser(K[g]);b.drive.authorize(k,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(u){b.handleError(u,null,function(){b.hideDialog();b.showSplash()})},!0)});l.appendChild(d)}else f(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?f(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?f(function(){b.gitLab.logout();var g=document.createElement("form");g.setAttribute("method","post");g.setAttribute("action",DRAWIO_GITLAB_URL+"/users/sign_out");g.setAttribute("target","_blank");document.body.appendChild(g);g.submit();g.parentNode.removeChild(g)}):b.mode==App.MODE_TRELLO&&-null!=b.trello?b.trello.isAuthorized()&&f(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&f(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):f(function(){b.oneDrive.logout()});e.appendChild(l);this.container=e},EmbedDialog=function(b,e,f,c,l,n,p,u,F){p=null!=p?p:"Check out the diagram I made using @drawio";c=document.createElement("div");var H=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=n?mxUtils.write(c,n):mxUtils.write(c,mxResources.get(5E5>+null!=b.trello?b.trello.isAuthorized()&&f(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&f(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):f(function(){b.oneDrive.logout()});e.appendChild(l);this.container=e},EmbedDialog=function(b,e,f,c,l,n,p,v,F){p=null!=p?p:"Check out the diagram I made using @drawio";c=document.createElement("div");var H=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=n?mxUtils.write(c,n):mxUtils.write(c,mxResources.get(5E5>e.length?H?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);n=document.createElement("div");n.style.position="absolute";n.style.top="30px";n.style.right="30px";n.style.color="gray";mxUtils.write(n,b.formatFileSize(e.length));c.appendChild(n);var E=document.createElement("textarea");E.setAttribute("autocomplete","off");E.setAttribute("autocorrect","off");E.setAttribute("autocapitalize","off");E.setAttribute("spellcheck","false");E.style.fontFamily="monospace";E.style.wordBreak="break-all";E.style.marginTop="10px";E.style.resize="none";E.style.height="150px";E.style.width="440px";E.style.border="1px solid gray";E.value=mxResources.get("updatingDocument");c.appendChild(E);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>e.length?(E.value=e,E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null)):(E.setAttribute("readonly","true"),E.value=mxResources.get("tooLargeUseDownload"))},0)};n=document.createElement("div");n.style.position=-"absolute";n.style.bottom="36px";n.style.right="32px";var K=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!H||navigator.standalone||!(H||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(K=mxUtils.button(null!=u?u:mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var g=5E5>e.length?E.value:e;if(null!=l)l(g);else if(H)try{var k=b.openLink(g);null!=k&&(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=k&&null!=-k.location.href&&k.location.href.substring(0,8)!=g.substring(0,8)&&(k.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(t){}}),f||500)}catch(t){b.handleError({message:t.message||mxResources.get("drawingTooLarge")})}else{var v=window.open();v=null!=v?v.document:null;null!=v?(v.writeln("<html><head><title>"+mxUtils.htmlEntities(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+("<iframe"==e.substring(0,7)?e:mxUtils.htmlEntities(e))+"</body></html>"),-v.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),K.className="geBtn",n.appendChild(K));if(!H||7500<e.length)u=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=F?F:"embed.txt","txt",e,"text/plain")}),u.className="geBtn",n.appendChild(u);if(H&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var d=mxUtils.button("",function(){try{var g="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(E.value);-b.openLink(g)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}});u=document.createElement("img");u.setAttribute("src",Editor.facebookImage);u.setAttribute("width","18");u.setAttribute("height","18");u.setAttribute("border","0");d.appendChild(u);d.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");d.style.verticalAlign="bottom";d.style.paddingTop="4px";d.style.minWidth="46px";d.className="geBtn";n.appendChild(d)}7168>e.length&&(d=-mxUtils.button("",function(){try{var g="https://twitter.com/intent/tweet?text="+encodeURIComponent(p)+"&url="+encodeURIComponent(E.value);b.openLink(g)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}}),u=document.createElement("img"),u.setAttribute("src",Editor.tweetImage),u.setAttribute("width","18"),u.setAttribute("height","18"),u.setAttribute("border","0"),u.style.marginBottom="5px",d.appendChild(u),d.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+-" max)"),d.style.verticalAlign="bottom",d.style.paddingTop="4px",d.style.minWidth="46px",d.className="geBtn",n.appendChild(d))}!b.isOffline()&&5E5>e.length&&(d=mxUtils.button("",function(){try{var g="mailto:?subject="+encodeURIComponent(F||b.defaultFilename)+"&body="+encodeURIComponent(E.value);b.openLink(g)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}}),u=document.createElement("img"),u.className="geAdaptiveAsset",u.setAttribute("src",Editor.mailImage),u.setAttribute("width",-"18"),u.setAttribute("height","18"),u.setAttribute("border","0"),u.style.marginBottom="5px",d.appendChild(u),d.style.verticalAlign="bottom",d.style.paddingTop="4px",d.style.minWidth="46px",d.className="geBtn",n.appendChild(d));u=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});n.appendChild(u);d=mxUtils.button(mxResources.get("copy"),function(){E.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");-b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?u.className="geBtn gePrimaryBtn":(n.appendChild(d),d.className="geBtn gePrimaryBtn",u.className="geBtn"):null!=K&&(n.appendChild(K),u.className="geBtn",K.className="geBtn gePrimaryBtn");c.appendChild(n);this.container=c};EmbedDialog.showPreviewOption=!0;-var GoogleSitesDialog=function(b,e){function f(){var V=null!=R&&null!=R.getTitle()?R.getTitle():this.defaultFilename;if(D.checked&&""!=d.value){var Q="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(d.value));null!=V&&(Q+="&title="+encodeURIComponent(V));0<G.length&&(Q+="&s="+G);""!=g.value&&"0"!=g.value&&(Q+="&border="+g.value);""!=K.value&&(Q+="&height="+K.value);Q+="&pan="+(k.checked?"1":"0");Q+="&zoom="+(v.checked?"1":"0");Q+="&fit="+(J.checked?"1":"0");-Q+="&resize="+(A.checked?"1":"0");Q+="&x0="+Number(E.value);Q+="&y0="+F;l.mathEnabled&&(Q+="&math=1");x.checked?Q+="&edit=_blank":t.checked&&(Q+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));H.value=Q}else R.constructor==DriveFile||R.constructor==DropboxFile?(Q="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=d.value?Q+=encodeURIComponent(mxUtils.htmlEntities(d.value))+"&type=3":(Q+=R.getHash().substring(1),Q=R.constructor==DropboxFile?Q+"&type=2":Q+"&type=1"),null!=-V&&(Q+="&title="+encodeURIComponent(V)),""!=K.value&&(V=parseInt(K.value)+parseInt(E.value),Q+="&height="+V),H.value=Q):H.value=""}var c=document.createElement("div"),l=b.editor.graph,n=l.getGraphBounds(),p=l.view.scale,u=Math.floor(n.x/p-l.view.translate.x),F=Math.floor(n.y/p-l.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var H=document.createElement("input");H.setAttribute("type","text");H.style.marginBottom="8px";H.style.marginTop="2px";H.style.width="410px";-c.appendChild(H);mxUtils.br(c);this.init=function(){H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var E=document.createElement("input");E.setAttribute("type","text");E.setAttribute("size","4");E.style.marginRight="16px";E.style.marginLeft="4px";E.value=u;c.appendChild(E);mxUtils.write(c,mxResources.get("height")+":");var K=document.createElement("input");K.setAttribute("type","text");+"absolute";n.style.bottom="36px";n.style.right="32px";var K=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!H||navigator.standalone||!(H||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(K=mxUtils.button(null!=v?v:mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var g=5E5>e.length?E.value:e;if(null!=l)l(g);else if(H)try{var k=b.openLink(g);null!=k&&(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=k&&null!=+k.location.href&&k.location.href.substring(0,8)!=g.substring(0,8)&&(k.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(t){}}),f||500)}catch(t){b.handleError({message:t.message||mxResources.get("drawingTooLarge")})}else{var u=window.open();u=null!=u?u.document:null;null!=u?(u.writeln("<html><head><title>"+mxUtils.htmlEntities(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+("<iframe"==e.substring(0,7)?e:mxUtils.htmlEntities(e))+"</body></html>"),+u.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),K.className="geBtn",n.appendChild(K));if(!H||7500<e.length)v=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=F?F:"embed.txt","txt",e,"text/plain")}),v.className="geBtn",n.appendChild(v);if(H&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var d=mxUtils.button("",function(){try{var g="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(E.value);+b.openLink(g)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}});v=document.createElement("img");v.setAttribute("src",Editor.facebookImage);v.setAttribute("width","18");v.setAttribute("height","18");v.setAttribute("border","0");d.appendChild(v);d.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");d.style.verticalAlign="bottom";d.style.paddingTop="4px";d.style.minWidth="46px";d.className="geBtn";n.appendChild(d)}7168>e.length&&(d=+mxUtils.button("",function(){try{var g="https://twitter.com/intent/tweet?text="+encodeURIComponent(p)+"&url="+encodeURIComponent(E.value);b.openLink(g)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}}),v=document.createElement("img"),v.setAttribute("src",Editor.tweetImage),v.setAttribute("width","18"),v.setAttribute("height","18"),v.setAttribute("border","0"),v.style.marginBottom="5px",d.appendChild(v),d.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)++" max)"),d.style.verticalAlign="bottom",d.style.paddingTop="4px",d.style.minWidth="46px",d.className="geBtn",n.appendChild(d))}!b.isOffline()&&5E5>e.length&&(d=mxUtils.button("",function(){try{var g="mailto:?subject="+encodeURIComponent(F||b.defaultFilename)+"&body="+encodeURIComponent(E.value);b.openLink(g)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}}),v=document.createElement("img"),v.className="geAdaptiveAsset",v.setAttribute("src",Editor.mailImage),v.setAttribute("width",+"18"),v.setAttribute("height","18"),v.setAttribute("border","0"),v.style.marginBottom="5px",d.appendChild(v),d.style.verticalAlign="bottom",d.style.paddingTop="4px",d.style.minWidth="46px",d.className="geBtn",n.appendChild(d));v=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});n.appendChild(v);d=mxUtils.button(mxResources.get("copy"),function(){E.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");+b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?v.className="geBtn gePrimaryBtn":(n.appendChild(d),d.className="geBtn gePrimaryBtn",v.className="geBtn"):null!=K&&(n.appendChild(K),v.className="geBtn",K.className="geBtn gePrimaryBtn");c.appendChild(n);this.container=c};EmbedDialog.showPreviewOption=!0;+var GoogleSitesDialog=function(b,e){function f(){var U=null!=S&&null!=S.getTitle()?S.getTitle():this.defaultFilename;if(D.checked&&""!=d.value){var P="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(d.value));null!=U&&(P+="&title="+encodeURIComponent(U));0<G.length&&(P+="&s="+G);""!=g.value&&"0"!=g.value&&(P+="&border="+g.value);""!=K.value&&(P+="&height="+K.value);P+="&pan="+(k.checked?"1":"0");P+="&zoom="+(u.checked?"1":"0");P+="&fit="+(J.checked?"1":"0");+P+="&resize="+(A.checked?"1":"0");P+="&x0="+Number(E.value);P+="&y0="+F;l.mathEnabled&&(P+="&math=1");x.checked?P+="&edit=_blank":t.checked&&(P+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));H.value=P}else S.constructor==DriveFile||S.constructor==DropboxFile?(P="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=d.value?P+=encodeURIComponent(mxUtils.htmlEntities(d.value))+"&type=3":(P+=S.getHash().substring(1),P=S.constructor==DropboxFile?P+"&type=2":P+"&type=1"),null!=+U&&(P+="&title="+encodeURIComponent(U)),""!=K.value&&(U=parseInt(K.value)+parseInt(E.value),P+="&height="+U),H.value=P):H.value=""}var c=document.createElement("div"),l=b.editor.graph,n=l.getGraphBounds(),p=l.view.scale,v=Math.floor(n.x/p-l.view.translate.x),F=Math.floor(n.y/p-l.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var H=document.createElement("input");H.setAttribute("type","text");H.style.marginBottom="8px";H.style.marginTop="2px";H.style.width="410px";+c.appendChild(H);mxUtils.br(c);this.init=function(){H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var E=document.createElement("input");E.setAttribute("type","text");E.setAttribute("size","4");E.style.marginRight="16px";E.style.marginLeft="4px";E.value=v;c.appendChild(E);mxUtils.write(c,mxResources.get("height")+":");var K=document.createElement("input");K.setAttribute("type","text");K.setAttribute("size","4");K.style.marginLeft="4px";K.value=Math.ceil(n.height/p);c.appendChild(K);mxUtils.br(c);n=document.createElement("hr");n.setAttribute("size","1");n.style.marginBottom="16px";n.style.marginTop="16px";c.appendChild(n);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var d=document.createElement("input");d.setAttribute("type","text");d.setAttribute("size","28");d.style.marginBottom="8px";d.style.marginTop="2px";d.style.width="410px";d.value=e||"";c.appendChild(d);-mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","3");g.style.marginBottom="8px";g.style.marginLeft="4px";g.value="0";c.appendChild(g);mxUtils.br(c);var k=document.createElement("input");k.setAttribute("type","checkbox");k.setAttribute("checked","checked");k.defaultChecked=!0;k.style.marginLeft="16px";c.appendChild(k);mxUtils.write(c,mxResources.get("pan")+" ");var v=document.createElement("input");-v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="8px";c.appendChild(v);mxUtils.write(c,mxResources.get("zoom")+" ");var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="8px";t.setAttribute("title",window.location.href);c.appendChild(t);mxUtils.write(c,mxResources.get("edit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";c.appendChild(x);mxUtils.write(c,+mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","3");g.style.marginBottom="8px";g.style.marginLeft="4px";g.value="0";c.appendChild(g);mxUtils.br(c);var k=document.createElement("input");k.setAttribute("type","checkbox");k.setAttribute("checked","checked");k.defaultChecked=!0;k.style.marginLeft="16px";c.appendChild(k);mxUtils.write(c,mxResources.get("pan")+" ");var u=document.createElement("input");+u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="8px";c.appendChild(u);mxUtils.write(c,mxResources.get("zoom")+" ");var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="8px";t.setAttribute("title",window.location.href);c.appendChild(t);mxUtils.write(c,mxResources.get("edit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";c.appendChild(x);mxUtils.write(c,mxResources.get("asNew")+" ");mxUtils.br(c);var A=document.createElement("input");A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;A.style.marginLeft="16px";c.appendChild(A);mxUtils.write(c,mxResources.get("resize")+" ");var J=document.createElement("input");J.setAttribute("type","checkbox");J.style.marginLeft="8px";c.appendChild(J);mxUtils.write(c,mxResources.get("fit")+" ");var D=document.createElement("input");D.setAttribute("type","checkbox");D.style.marginLeft=-"8px";c.appendChild(D);mxUtils.write(c,mxResources.get("embed")+" ");var G=b.getBasenames().join(";"),R=b.getCurrentFile();mxEvent.addListener(k,"change",f);mxEvent.addListener(v,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(J,"change",f);mxEvent.addListener(t,"change",f);mxEvent.addListener(x,"change",f);mxEvent.addListener(D,"change",f);mxEvent.addListener(K,"change",f);mxEvent.addListener(E,"change",f);mxEvent.addListener(g,"change",f);mxEvent.addListener(d,"change",f);f();+"8px";c.appendChild(D);mxUtils.write(c,mxResources.get("embed")+" ");var G=b.getBasenames().join(";"),S=b.getCurrentFile();mxEvent.addListener(k,"change",f);mxEvent.addListener(u,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(J,"change",f);mxEvent.addListener(t,"change",f);mxEvent.addListener(x,"change",f);mxEvent.addListener(D,"change",f);mxEvent.addListener(K,"change",f);mxEvent.addListener(E,"change",f);mxEvent.addListener(g,"change",f);mxEvent.addListener(d,"change",f);f();mxEvent.addListener(H,"click",function(){H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)});e=document.createElement("div");e.style.paddingTop="12px";e.style.textAlign="right";n=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});n.className="geBtn gePrimaryBtn";e.appendChild(n);c.appendChild(e);this.container=c},CreateGraphDialog=function(b,e,f){var c=document.createElement("div");c.style.textAlign="right";this.init=function(){var l=document.createElement("div");l.style.position="relative";l.style.border="1px solid gray";l.style.boxSizing="border-box";l.style.width="100%";l.style.height="360px";l.style.overflow="hidden";l.style.marginBottom="16px";mxEvent.disableContextMenu(l);c.appendChild(l);var n=new Graph(l);n.setCellsCloneable(!0);n.setPanning(!0);n.setAllowDanglingEdges(!1);n.connectionHandler.select=!1;n.view.setTranslate(20,20);n.border=20;n.panningHandler.useLeftButtonForPanning=!0;mxClient.IS_SVG&&-null!=n.view.getDrawPane()&&(l=n.view.getDrawPane().ownerSVGElement,null!=l&&(l.style.position="absolute"));var p="curved=1;";n.cellRenderer.installCellOverlayListeners=function(k,v,t){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(t.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(x){v.fireEvent(new mxEventObject("pointerdown","event",x,"state",k))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(t.node,"touchstart",function(x){v.fireEvent(new mxEventObject("pointerdown",-"event",x,"state",k))})};n.getAllConnectionConstraints=function(){return null};n.connectionHandler.marker.highlight.keepOnTop=!1;n.connectionHandler.createEdgeState=function(k){k=n.createEdge(null,null,null,null,null,p);return new mxCellState(this.graph.view,k,this.graph.getCellStyle(k))};var u=n.getDefaultParent(),F=mxUtils.bind(this,function(k){var v=new mxCellOverlay(this.connectImage,"Add outgoing");v.cursor="hand";v.addListener(mxEvent.CLICK,function(t,x){n.connectionHandler.reset();n.clearSelection();-var A=n.getCellGeometry(k),J;K(function(){J=n.insertVertex(u,null,"Entry",A.x,A.y,80,30,"rounded=1;");F(J);n.view.refresh(J);n.insertEdge(u,null,"",k,J,p)},function(){n.scrollCellToVisible(J)})});v.addListener("pointerdown",function(t,x){t=x.getProperty("event");x=x.getProperty("state");n.popupMenuHandler.hideMenu();n.stopEditing(!1);var A=mxUtils.convertPoint(n.container,mxEvent.getClientX(t),mxEvent.getClientY(t));n.connectionHandler.start(x,A.x,A.y);n.isMouseDown=!0;n.isMouseTrigger=mxEvent.isMouseEvent(t);-mxEvent.consume(t)});n.addCellOverlay(k,v)});n.getModel().beginUpdate();try{var H=n.insertVertex(u,null,"Start",0,0,80,30,"ellipse");F(H)}finally{n.getModel().endUpdate()}if("horizontalTree"==f){var E=new mxCompactTreeLayout(n);E.edgeRouting=!1;E.levelDistance=30;E.sortEdges=!0;p="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==f?(E=new mxCompactTreeLayout(n,!1),E.edgeRouting=!1,E.levelDistance=30,E.sortEdges=!0,p="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==f?(E=new mxRadialTreeLayout(n,-!1),E.edgeRouting=!1,E.levelDistance=80):"verticalFlow"==f?E=new mxHierarchicalLayout(n,mxConstants.DIRECTION_NORTH):"horizontalFlow"==f?E=new mxHierarchicalLayout(n,mxConstants.DIRECTION_WEST):"circle"==f?E=new mxCircleLayout(n):(E=new mxFastOrganicLayout(n,!1),E.forceConstant=80);if(null!=E){var K=function(k,v){n.getModel().beginUpdate();try{null!=k&&k(),E.execute(n.getDefaultParent(),H)}catch(t){throw t;}finally{k=new mxMorphing(n),k.addListener(mxEvent.DONE,mxUtils.bind(this,function(){n.getModel().endUpdate();-null!=v&&v()})),k.startAnimation()}},d=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(k,v,t,x,A){d.apply(this,arguments);K()};n.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);K()};n.connectionHandler.addListener(mxEvent.CONNECT,function(){K()})}l=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});l.className="geBtn";b.editor.cancelFirst&&c.appendChild(l);var g=mxUtils.button(mxResources.get("insert"),-function(k){n.clearCellOverlays();var v=n.getModel().getChildren(n.getDefaultParent());k=mxEvent.isAltDown(k)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(n.getBoundingBoxFromGeometry(v,!0));v=b.editor.graph.importCells(v,k.x,k.y);k=b.editor.graph.view;var t=k.getBounds(v);null!=t&&(t.x-=k.translate.x,t.y-=k.translate.y,b.editor.graph.scrollRectToVisible(t),b.editor.graph.setSelectionCells(v));b.hideDialog()});c.appendChild(g);g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||+null!=n.view.getDrawPane()&&(l=n.view.getDrawPane().ownerSVGElement,null!=l&&(l.style.position="absolute"));var p="curved=1;";n.cellRenderer.installCellOverlayListeners=function(k,u,t){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(t.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(x){u.fireEvent(new mxEventObject("pointerdown","event",x,"state",k))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(t.node,"touchstart",function(x){u.fireEvent(new mxEventObject("pointerdown",+"event",x,"state",k))})};n.getAllConnectionConstraints=function(){return null};n.connectionHandler.marker.highlight.keepOnTop=!1;n.connectionHandler.createEdgeState=function(k){k=n.createEdge(null,null,null,null,null,p);return new mxCellState(this.graph.view,k,this.graph.getCellStyle(k))};var v=n.getDefaultParent(),F=mxUtils.bind(this,function(k){var u=new mxCellOverlay(this.connectImage,"Add outgoing");u.cursor="hand";u.addListener(mxEvent.CLICK,function(t,x){n.connectionHandler.reset();n.clearSelection();+var A=n.getCellGeometry(k),J;K(function(){J=n.insertVertex(v,null,"Entry",A.x,A.y,80,30,"rounded=1;");F(J);n.view.refresh(J);n.insertEdge(v,null,"",k,J,p)},function(){n.scrollCellToVisible(J)})});u.addListener("pointerdown",function(t,x){t=x.getProperty("event");x=x.getProperty("state");n.popupMenuHandler.hideMenu();n.stopEditing(!1);var A=mxUtils.convertPoint(n.container,mxEvent.getClientX(t),mxEvent.getClientY(t));n.connectionHandler.start(x,A.x,A.y);n.isMouseDown=!0;n.isMouseTrigger=mxEvent.isMouseEvent(t);+mxEvent.consume(t)});n.addCellOverlay(k,u)});n.getModel().beginUpdate();try{var H=n.insertVertex(v,null,"Start",0,0,80,30,"ellipse");F(H)}finally{n.getModel().endUpdate()}if("horizontalTree"==f){var E=new mxCompactTreeLayout(n);E.edgeRouting=!1;E.levelDistance=30;E.sortEdges=!0;p="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==f?(E=new mxCompactTreeLayout(n,!1),E.edgeRouting=!1,E.levelDistance=30,E.sortEdges=!0,p="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==f?(E=new mxRadialTreeLayout(n,+!1),E.edgeRouting=!1,E.levelDistance=80):"verticalFlow"==f?E=new mxHierarchicalLayout(n,mxConstants.DIRECTION_NORTH):"horizontalFlow"==f?E=new mxHierarchicalLayout(n,mxConstants.DIRECTION_WEST):"circle"==f?E=new mxCircleLayout(n):(E=new mxFastOrganicLayout(n,!1),E.forceConstant=80);if(null!=E){var K=function(k,u){n.getModel().beginUpdate();try{null!=k&&k(),E.execute(n.getDefaultParent(),H)}catch(t){throw t;}finally{k=new mxMorphing(n),k.addListener(mxEvent.DONE,mxUtils.bind(this,function(){n.getModel().endUpdate();+null!=u&&u()})),k.startAnimation()}},d=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(k,u,t,x,A){d.apply(this,arguments);K()};n.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);K()};n.connectionHandler.addListener(mxEvent.CONNECT,function(){K()})}l=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});l.className="geBtn";b.editor.cancelFirst&&c.appendChild(l);var g=mxUtils.button(mxResources.get("insert"),+function(k){n.clearCellOverlays();var u=n.getModel().getChildren(n.getDefaultParent());k=mxEvent.isAltDown(k)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(n.getBoundingBoxFromGeometry(u,!0));u=b.editor.graph.importCells(u,k.x,k.y);k=b.editor.graph.view;var t=k.getBounds(u);null!=t&&(t.x-=k.translate.x,t.y-=k.translate.y,b.editor.graph.scrollRectToVisible(t),b.editor.graph.setSelectionCells(u));b.hideDialog()});c.appendChild(g);g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||c.appendChild(l);this.graph=n};this.container=c};CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+"/handle-connect.png",26,26);-var BackgroundImageDialog=function(b,e,f,c,l){function n(){null==q||q==mxConstants.NONE?(P.style.display="none",V.checked=!1):(P.style.backgroundColor=q,P.style.display="",V.checked=!0)}var p=b.editor.graph,u=document.createElement("div");u.style.whiteSpace="nowrap";var F=document.createElement("h2");mxUtils.write(F,mxResources.get("background"));F.style.marginTop="0px";u.appendChild(F);var H=null!=f&&null!=f.originalSrc;F=!1;var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-bottom:8px;";+var BackgroundImageDialog=function(b,e,f,c,l){function n(){null==q||q==mxConstants.NONE?(O.style.display="none",U.checked=!1):(O.style.backgroundColor=q,O.style.display="",U.checked=!0)}var p=b.editor.graph,v=document.createElement("div");v.style.whiteSpace="nowrap";var F=document.createElement("h2");mxUtils.write(F,mxResources.get("background"));F.style.marginTop="0px";v.appendChild(F);var H=null!=f&&null!=f.originalSrc;F=!1;var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-bottom:8px;";E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","geBackgroundImageDialogOption");var K=document.createElement("input");K.style.cssText="margin-right:8px;margin-bottom:8px;";K.setAttribute("value","url");K.setAttribute("type","radio");K.setAttribute("name","geBackgroundImageDialogOption");var d=document.createElement("input");d.setAttribute("type","text");d.style.marginBottom="8px";d.style.width="360px";d.value=H||null==f?"":f.src;var g=document.createElement("select");-g.style.width="360px";if(null!=b.pages)for(var k=0;k<b.pages.length;k++){var v=document.createElement("option");mxUtils.write(v,b.pages[k].getName()||mxResources.get("pageWithNumber",[k+1]));v.setAttribute("value","data:page/id,"+b.pages[k].getId());b.pages[k]==b.currentPage&&v.setAttribute("disabled","disabled");null!=f&&f.originalSrc==v.getAttribute("value")&&(v.setAttribute("selected","selected"),F=!0);g.appendChild(v)}H||null!=b.pages&&1!=b.pages.length||(E.style.display="none",K.style.display=-"none",g.style.display="none");var t=document.createElement("option"),x=!1,A=!1,J=function(B,C){x||null!=B&&A||(K.checked?null!=C&&C(t.selected?null:g.value):""==d.value||b.isOffline()?(G.value="",R.value="",null!=C&&C("")):(d.value=mxUtils.trim(d.value),b.loadImage(d.value,function(M){G.value=M.width;R.value=M.height;null!=C&&C(d.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));G.value="";R.value="";null!=C&&C(null)})))},D=mxUtils.bind(this,+g.style.width="360px";if(null!=b.pages)for(var k=0;k<b.pages.length;k++){var u=document.createElement("option");mxUtils.write(u,b.pages[k].getName()||mxResources.get("pageWithNumber",[k+1]));u.setAttribute("value","data:page/id,"+b.pages[k].getId());b.pages[k]==b.currentPage&&u.setAttribute("disabled","disabled");null!=f&&f.originalSrc==u.getAttribute("value")&&(u.setAttribute("selected","selected"),F=!0);g.appendChild(u)}H||null!=b.pages&&1!=b.pages.length||(E.style.display="none",K.style.display=+"none",g.style.display="none");var t=document.createElement("option"),x=!1,A=!1,J=function(B,C){x||null!=B&&A||(K.checked?null!=C&&C(t.selected?null:g.value):""==d.value||b.isOffline()?(G.value="",S.value="",null!=C&&C("")):(d.value=mxUtils.trim(d.value),b.loadImage(d.value,function(M){G.value=M.width;S.value=M.height;null!=C&&C(d.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));G.value="";S.value="";null!=C&&C(null)})))},D=mxUtils.bind(this,function(B){b.importFiles(B,0,0,b.maxBackgroundSize,function(C,M,T,m,z,I){d.value=C;J();d.focus()},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var M=0;M<C.length;M++)C[M]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){H?g.focus():d.focus();mxEvent.addListener(g,"focus",function(){E.removeAttribute("checked");K.setAttribute("checked","checked");K.checked=!0});mxEvent.addListener(d,"focus",function(){K.removeAttribute("checked");E.setAttribute("checked",-"checked");E.checked=!0});if(Graph.fileSupport){d.setAttribute("placeholder",mxResources.get("dragImagesHere"));var B=u.parentNode,C=null;mxEvent.addListener(B,"dragleave",function(M){null!=C&&(C.parentNode.removeChild(C),C=null);M.stopPropagation();M.preventDefault()});mxEvent.addListener(B,"dragover",mxUtils.bind(this,function(M){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=b.highlightElement(B));M.stopPropagation();M.preventDefault()}));mxEvent.addListener(B,"drop",mxUtils.bind(this,-function(M){null!=C&&(C.parentNode.removeChild(C),C=null);if(0<M.dataTransfer.files.length)D(M.dataTransfer.files);else if(0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")){var T=M.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)&&(d.value=decodeURIComponent(T),J())}M.stopPropagation();M.preventDefault()}),!1)}};u.appendChild(E);u.appendChild(d);mxUtils.br(u);k=document.createElement("span");k.style.marginLeft="30px";mxUtils.write(k,mxResources.get("width")+-":");u.appendChild(k);var G=document.createElement("input");G.setAttribute("type","text");G.style.width="60px";G.style.marginLeft="8px";G.style.marginRight="16px";G.value=null==f||H?"":f.width;u.appendChild(G);mxUtils.write(u,mxResources.get("height")+":");var R=document.createElement("input");R.setAttribute("type","text");R.style.width="60px";R.style.marginLeft="8px";R.style.marginRight="16px";R.value=null==f||H?"":f.height;u.appendChild(R);mxUtils.br(u);mxUtils.br(u);mxEvent.addListener(d,"change",-J);ImageDialog.filePicked=function(B){B.action==google.picker.Action.PICKED&&null!=B.docs[0].thumbnails&&(B=B.docs[0].thumbnails[B.docs[0].thumbnails.length-1],null!=B&&(d.value=B.url,J()));d.focus()};u.appendChild(K);u.appendChild(g);mxUtils.br(u);mxUtils.br(u);H?(K.setAttribute("checked","checked"),K.checked=!0):(E.setAttribute("checked","checked"),E.checked=!0);!F&&K.checked&&(mxUtils.write(t,mxResources.get("pageNotFound")),t.setAttribute("disabled","disabled"),t.setAttribute("selected","selected"),-t.setAttribute("value","pageNotFound"),g.appendChild(t),mxEvent.addListener(g,"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)}));f=document.createElement("div");f.style.display=l?"inline-flex":"none";f.style.alignItems="center";f.style.cursor="default";f.style.minWidth="40%";f.style.height="20px";var V=document.createElement("input");V.setAttribute("type","checkbox");V.style.margin="0px 10px 0px 4px";V.style.verticalAlign="bottom";V.defaultChecked=c!=mxConstants.NONE&&-null!=c;V.checked=V.defaultChecked;f.appendChild(V);mxUtils.write(f,mxResources.get("fillColor"));l=f.cloneNode(!1);var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.style.margin="0px 10px 0px 30px";Q.style.verticalAlign="bottom";Q.defaultChecked=p.shadowVisible;Q.checked=Q.defaultChecked;l.appendChild(Q);mxUtils.write(l,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||Q.setAttribute("disabled","disabled");mxEvent.addListener(l,"click",function(B){mxEvent.getSource(B)!=-Q&&(Q.checked=!Q.checked)});var P=document.createElement("button");P.style.width="36px";P.style.height="18px";P.style.cursor="pointer";P.style.marginLeft="10px";P.style.backgroundPosition="center center";P.style.backgroundRepeat="no-repeat";P.style.verticalAlign="bottom";P.className="geColorBtn";var q=c;n();mxEvent.addListener(f,"click",function(B){mxEvent.getSource(B)!=V&&(V.checked=!V.checked);q=V.checked?"#ffffff":null;n()});mxEvent.addListener(P,"click",function(B){b.pickColor(q||"none",function(C){q=-C;n()});mxEvent.consume(B)});f.appendChild(P);u.appendChild(f);u.appendChild(l);mxUtils.br(u);c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="right";p=mxUtils.button(mxResources.get("cancel"),function(){x=!0;b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&c.appendChild(p);l=mxUtils.button(mxResources.get("reset"),function(){d.value="";G.value="";R.value="";E.checked=!0;q=mxConstants.NONE;n();x=!1});mxEvent.addGestureListeners(l,function(){x=!0});l.className=-"geBtn";l.width="100";c.appendChild(l);if(Graph.fileSupport){var y=document.createElement("input");y.setAttribute("multiple","multiple");y.setAttribute("type","file");mxEvent.addListener(y,"change",function(B){null!=y.files&&(D(y.files),y.type="",y.type="file",y.value="")});y.style.display="none";u.appendChild(y);l=mxUtils.button(mxResources.get("open"),function(){y.click()});l.className="geBtn";c.appendChild(l)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();J(null,function(B){e(""!=-B&&null!=B?new mxImage(B,G.value,R.value):null,null==B,q,!mxClient.IS_SVG||mxClient.IS_SF?null:Q.checked)})});mxEvent.addGestureListeners(applyBtn,function(){A=!0});applyBtn.className="geBtn gePrimaryBtn";c.appendChild(applyBtn);b.editor.cancelFirst||c.appendChild(p);u.appendChild(c);this.container=u},ParseDialog=function(b,e,f){function c(g,k,v){var t=g.split("\n");if("plantUmlPng"==k||"plantUmlSvg"==k||"plantUmlTxt"==k){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var x=function(T,-m,z,I,L){n=mxEvent.isAltDown(v)?n:A.getCenterInsertPoint(new mxRectangle(0,0,I,L));var N=null;A.getModel().beginUpdate();try{N="txt"==m?b.insertAsPreText(z,n.x,n.y):A.insertVertex(null,null,null,n.x,n.y,I,L,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(z)+";"),A.setAttributeForCell(N,"plantUmlData",JSON.stringify({data:T,format:m},null,2))}finally{A.getModel().endUpdate()}null!=N&&(A.setSelectionCell(N),A.scrollCellToVisible(N))},A=b.editor.graph,J="plantUmlTxt"==+"checked");E.checked=!0});if(Graph.fileSupport){d.setAttribute("placeholder",mxResources.get("dragImagesHere"));var B=v.parentNode,C=null;mxEvent.addListener(B,"dragleave",function(M){null!=C&&(C.parentNode.removeChild(C),C=null);M.stopPropagation();M.preventDefault()});mxEvent.addListener(B,"dragover",mxUtils.bind(this,function(M){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=b.highlightElement(B));M.stopPropagation();M.preventDefault()}));mxEvent.addListener(B,"drop",mxUtils.bind(this,+function(M){null!=C&&(C.parentNode.removeChild(C),C=null);if(0<M.dataTransfer.files.length)D(M.dataTransfer.files);else if(0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")){var T=M.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)&&(d.value=decodeURIComponent(T),J())}M.stopPropagation();M.preventDefault()}),!1)}};v.appendChild(E);v.appendChild(d);mxUtils.br(v);k=document.createElement("span");k.style.marginLeft="30px";mxUtils.write(k,mxResources.get("width")++":");v.appendChild(k);var G=document.createElement("input");G.setAttribute("type","text");G.style.width="60px";G.style.marginLeft="8px";G.style.marginRight="16px";G.value=null==f||H?"":f.width;v.appendChild(G);mxUtils.write(v,mxResources.get("height")+":");var S=document.createElement("input");S.setAttribute("type","text");S.style.width="60px";S.style.marginLeft="8px";S.style.marginRight="16px";S.value=null==f||H?"":f.height;v.appendChild(S);mxUtils.br(v);mxUtils.br(v);mxEvent.addListener(d,"change",+J);ImageDialog.filePicked=function(B){B.action==google.picker.Action.PICKED&&null!=B.docs[0].thumbnails&&(B=B.docs[0].thumbnails[B.docs[0].thumbnails.length-1],null!=B&&(d.value=B.url,J()));d.focus()};v.appendChild(K);v.appendChild(g);mxUtils.br(v);mxUtils.br(v);H?(K.setAttribute("checked","checked"),K.checked=!0):(E.setAttribute("checked","checked"),E.checked=!0);!F&&K.checked&&(mxUtils.write(t,mxResources.get("pageNotFound")),t.setAttribute("disabled","disabled"),t.setAttribute("selected","selected"),+t.setAttribute("value","pageNotFound"),g.appendChild(t),mxEvent.addListener(g,"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)}));f=document.createElement("div");f.style.display=l?"inline-flex":"none";f.style.alignItems="center";f.style.cursor="default";f.style.minWidth="40%";f.style.height="20px";var U=document.createElement("input");U.setAttribute("type","checkbox");U.style.margin="0px 10px 0px 4px";U.style.verticalAlign="bottom";U.defaultChecked=c!=mxConstants.NONE&&+null!=c;U.checked=U.defaultChecked;f.appendChild(U);mxUtils.write(f,mxResources.get("fillColor"));l=f.cloneNode(!1);var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.margin="0px 10px 0px 30px";P.style.verticalAlign="bottom";P.defaultChecked=p.shadowVisible;P.checked=P.defaultChecked;l.appendChild(P);mxUtils.write(l,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||P.setAttribute("disabled","disabled");mxEvent.addListener(l,"click",function(B){mxEvent.getSource(B)!=+P&&(P.checked=!P.checked)});var O=document.createElement("button");O.style.width="36px";O.style.height="18px";O.style.cursor="pointer";O.style.marginLeft="10px";O.style.backgroundPosition="center center";O.style.backgroundRepeat="no-repeat";O.style.verticalAlign="bottom";O.className="geColorBtn";var q=c;n();mxEvent.addListener(f,"click",function(B){mxEvent.getSource(B)!=U&&(U.checked=!U.checked);q=U.checked?"#ffffff":null;n()});mxEvent.addListener(O,"click",function(B){b.pickColor(q||"none",function(C){q=+C;n()});mxEvent.consume(B)});f.appendChild(O);v.appendChild(f);v.appendChild(l);mxUtils.br(v);c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="right";p=mxUtils.button(mxResources.get("cancel"),function(){x=!0;b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&c.appendChild(p);l=mxUtils.button(mxResources.get("reset"),function(){d.value="";G.value="";S.value="";E.checked=!0;q=mxConstants.NONE;n();x=!1});mxEvent.addGestureListeners(l,function(){x=!0});l.className=+"geBtn";l.width="100";c.appendChild(l);if(Graph.fileSupport){var y=document.createElement("input");y.setAttribute("multiple","multiple");y.setAttribute("type","file");mxEvent.addListener(y,"change",function(B){null!=y.files&&(D(y.files),y.type="",y.type="file",y.value="")});y.style.display="none";v.appendChild(y);l=mxUtils.button(mxResources.get("open"),function(){y.click()});l.className="geBtn";c.appendChild(l)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();J(null,function(B){e(""!=+B&&null!=B?new mxImage(B,G.value,S.value):null,null==B,q,!mxClient.IS_SVG||mxClient.IS_SF?null:P.checked)})});mxEvent.addGestureListeners(applyBtn,function(){A=!0});applyBtn.className="geBtn gePrimaryBtn";c.appendChild(applyBtn);b.editor.cancelFirst||c.appendChild(p);v.appendChild(c);this.container=v},ParseDialog=function(b,e,f){function c(g,k,u){var t=g.split("\n");if("plantUmlPng"==k||"plantUmlSvg"==k||"plantUmlTxt"==k){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var x=function(T,+m,z,I,L){n=mxEvent.isAltDown(u)?n:A.getCenterInsertPoint(new mxRectangle(0,0,I,L));var N=null;A.getModel().beginUpdate();try{N="txt"==m?b.insertAsPreText(z,n.x,n.y):A.insertVertex(null,null,null,n.x,n.y,I,L,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(z)+";"),A.setAttributeForCell(N,"plantUmlData",JSON.stringify({data:T,format:m},null,2))}finally{A.getModel().endUpdate()}null!=N&&(A.setSelectionCell(N),A.scrollCellToVisible(N))},A=b.editor.graph,J="plantUmlTxt"==k?"txt":"plantUmlPng"==k?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==g&&"svg"==J?window.setTimeout(function(){b.spinner.stop();x(g,J,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",295,212)},200):b.generatePlantUmlImage(g,J,function(T,m,z){b.spinner.stop();x(g,J,T,m,z)},function(T){b.handleError(T)})}}else if("mermaid"==k||"mermaid2drawio"==k){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var D=0;D<t.length&&(0==t[D].trim().length||"%%"==t[D].substring(0,2));)D++;if("---"==t[D].trim()){do D++;while(D<t.length&&"---"!=t[D].trim());D++}D=t[D].trim().toLowerCase();t=D.indexOf(" ");D=D.substring(0,0<t?t:D.length);var G="undefined"!==typeof mxMermaidToDrawio&&"mermaid2drawio"==k&&("graph"==D||"flowchart"==D||"sequencediagram"==D||"classdiagram"==D||"statediagram-v2"==D||"statediagram"==D||"erdiagram"==D||"requirementdiagram"==D||"gitgraph"==D||"mindmap"==D||"journey"==D);A=b.editor.graph;G&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(T){b.spinner.stop();A.setSelectionCells(b.importXml(T,Math.max(n.x,20),Math.max(n.y,20),!0,null,null,!0));A.scrollCellToVisible(A.getSelectionCell())}));b.generateMermaidImage(g,null,function(T,m,z){if(!G){n=-mxEvent.isAltDown(v)?n:A.getCenterInsertPoint(new mxRectangle(0,0,m,z));b.spinner.stop();var I=null;A.getModel().beginUpdate();try{I=A.insertVertex(null,null,null,n.x,n.y,m,z,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+T+";"),A.setAttributeForCell(I,"mermaidData",JSON.stringify({data:g},null,2))}finally{A.getModel().endUpdate()}null!=I&&(A.setSelectionCell(I),A.scrollCellToVisible(I))}},function(T){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(T)})}}else if("table"==-k){k=null;var R=[],V=0,Q={};for(D=0;D<t.length;D++){var P=mxUtils.trim(t[D]);if("primary key"==P.substring(0,11).toLowerCase()){var q=P.match(/\((.+)\)/);q&&q[1]&&(Q[q[1]]=!0);t.splice(D,1)}else 0<P.toLowerCase().indexOf("primary key")&&(Q[P.split(" ")[0]]=!0,t[D]=mxUtils.trim(P.replace(/primary key/i,"")))}for(D=0;D<t.length;D++)if(P=mxUtils.trim(t[D]),"create table"==P.substring(0,12).toLowerCase())P=mxUtils.trim(P.substring(12)),"("==P.charAt(P.length-1)&&(P=mxUtils.trim(P.substring(0,P.length--1))),k=new mxCell(P,new mxGeometry(V,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),k.vertex=!0,R.push(k),P=b.editor.graph.getPreferredSizeForCell(y),null!=P&&(k.geometry.width=P.width+10);else if(null!=k&&")"==P.charAt(0))V+=k.geometry.width+40,k=null;else if("("!=P&&null!=k){P=P.substring(0,","==P.charAt(P.length-1)?P.length-1:P.length);q=Q[P.split(" ")[0]];var y=new mxCell("",new mxGeometry(0,-0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(q?"1":"0")+";");y.vertex=!0;var B=new mxCell(q?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(q?"fontStyle=1;":""));B.vertex=!0;y.insert(B);P=new mxCell(P,new mxGeometry(30,-0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(q?"fontStyle=5;":""));P.vertex=!0;y.insert(P);P=b.editor.graph.getPreferredSizeForCell(P);null!=P&&k.geometry.width<P.width+30&&(k.geometry.width=Math.min(320,Math.max(k.geometry.width,P.width+30)));k.insert(y,q?0:null);k.geometry.height+=30}0<R.length&&(A=b.editor.graph,n=mxEvent.isAltDown(v)?n:A.getCenterInsertPoint(A.getBoundingBoxFromGeometry(R,-!0)),A.setSelectionCells(A.importCells(R,n.x,n.y)),A.scrollCellToVisible(A.getSelectionCell()))}else if("list"==k){if(0<t.length){A=b.editor.graph;k=null;R=[];for(D=y=0;D<t.length;D++)";"!=t[D].charAt(0)&&(0==t[D].length?k=null:null==k?(k=new mxCell(t[D],new mxGeometry(y,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),k.vertex=!0,R.push(k),P=A.getPreferredSizeForCell(k),-null!=P&&k.geometry.width<P.width+10&&(k.geometry.width=P.width+10),y+=k.geometry.width+40):"--"==t[D]?(P=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;"),P.vertex=!0,k.geometry.height+=P.geometry.height,k.insert(P)):0<t[D].length&&(V=new mxCell(t[D],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),-V.vertex=!0,P=A.getPreferredSizeForCell(V),null!=P&&V.geometry.width<P.width&&(V.geometry.width=P.width),k.geometry.width=Math.max(k.geometry.width,V.geometry.width),k.geometry.height+=V.geometry.height,k.insert(V)));if(0<R.length){n=mxEvent.isAltDown(v)?n:A.getCenterInsertPoint(A.getBoundingBoxFromGeometry(R,!0));A.getModel().beginUpdate();try{R=A.importCells(R,n.x,n.y);P=[];for(D=0;D<R.length;D++)P.push(R[D]),P=P.concat(R[D].children);A.fireEvent(new mxEventObject("cellsInserted","cells",P))}finally{A.getModel().endUpdate()}A.setSelectionCells(R);-A.scrollCellToVisible(A.getSelectionCell())}}}else{y=function(T){var m=C[T];null==m&&(m=new mxCell(T,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),m.vertex=!0,C[T]=m,R.push(m));return m};var C={};R=[];for(D=0;D<t.length;D++)if(";"!=t[D].charAt(0)){var M=t[D].split("->");2<=M.length&&(q=y(M[0]),B=y(M[M.length-1]),M=new mxCell(2<M.length?M[1]:"",new mxGeometry),M.edge=!0,M.geometry.relative=!0,q.insertEdge(M,!0),B.insertEdge(M,!1),R.push(M))}if(0<R.length){t=document.createElement("div");t.style.visibility=-"hidden";document.body.appendChild(t);A=new Graph(t);A.getModel().beginUpdate();try{R=A.importCells(R);for(D=0;D<R.length;D++)A.getModel().isVertex(R[D])&&(P=A.getPreferredSizeForCell(R[D]),R[D].geometry.width=Math.max(R[D].geometry.width,P.width),R[D].geometry.height=Math.max(R[D].geometry.height,P.height));D=!0;"horizontalFlow"==k||"verticalFlow"==k?((new mxHierarchicalLayout(A,"horizontalFlow"==k?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(A.getDefaultParent(),R),D=!1):"circle"==-k?(new mxCircleLayout(A)).execute(A.getDefaultParent()):(V=new mxFastOrganicLayout(A),V.disableEdgeStyle=!1,V.forceConstant=180,V.execute(A.getDefaultParent()));D&&(Q=new mxParallelEdgeLayout(A),Q.spacing=30,Q.execute(A.getDefaultParent()))}finally{A.getModel().endUpdate()}A.clearCellOverlays();P=[];b.editor.graph.getModel().beginUpdate();try{R=A.getModel().getChildren(A.getDefaultParent()),n=mxEvent.isAltDown(v)?n:b.editor.graph.getCenterInsertPoint(A.getBoundingBoxFromGeometry(R,!0)),P=b.editor.graph.importCells(R,-n.x,n.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",P))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(P);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());A.destroy();t.parentNode.removeChild(t)}}}function l(){return"list"==u.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==u.value||-"mermaid2drawio"==u.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==u.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==u.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":-"plantUmlSvg"==u.value||"plantUmlTxt"==u.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var n=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var p=document.createElement("textarea");p.style.boxSizing="border-box";p.style.resize=-"none";p.style.width="100%";p.style.height="354px";p.style.marginBottom="16px";var u=document.createElement("select");u.className="geBtn";if("formatSql"==f||"mermaid"==f&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())u.style.display="none";var F=document.createElement("option");F.setAttribute("value","list");mxUtils.write(F,mxResources.get("list"));"plantUml"!=f&&"mermaid"!=f&&u.appendChild(F);null!=f&&"fromText"!=f||F.setAttribute("selected","selected");F=document.createElement("option");-F.setAttribute("value","table");mxUtils.write(F,mxResources.get("formatSql"));"formatSql"==f&&(u.appendChild(F),F.setAttribute("selected","selected"));F=document.createElement("option");F.setAttribute("value","mermaid");mxUtils.write(F,mxResources.get("image"));if("mermaid"==f)if("undefined"!==typeof mxMermaidToDrawio){var H=document.createElement("option");H.setAttribute("value","mermaid2drawio");H.setAttribute("selected","selected");mxUtils.write(H,mxResources.get("diagram"));u.appendChild(H)}else u.style.display=-"none";u.appendChild(F);F=document.createElement("option");F.setAttribute("value","diagram");mxUtils.write(F,mxResources.get("diagram"));H=document.createElement("option");H.setAttribute("value","circle");mxUtils.write(H,mxResources.get("circle"));var E=document.createElement("option");E.setAttribute("value","horizontalFlow");mxUtils.write(E,mxResources.get("horizontalFlow"));var K=document.createElement("option");K.setAttribute("value","verticalFlow");mxUtils.write(K,mxResources.get("verticalFlow"));-"plantUml"!=f&&"mermaid"!=f&&(u.appendChild(F),u.appendChild(H),u.appendChild(E),u.appendChild(K));F=document.createElement("option");F.setAttribute("value","plantUmlSvg");mxUtils.write(F,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==f&&F.setAttribute("selected","selected");H=document.createElement("option");H.setAttribute("value","plantUmlPng");mxUtils.write(H,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");E=document.createElement("option");E.setAttribute("value",-"plantUmlTxt");mxUtils.write(E,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(u.appendChild(F),u.appendChild(H),u.appendChild(E));var d=l();p.value=d;e.appendChild(p);this.init=function(){p.focus()};Graph.fileSupport&&(p.addEventListener("dragover",function(g){g.stopPropagation();g.preventDefault()},!1),p.addEventListener("drop",function(g){g.stopPropagation();g.preventDefault();if(0<g.dataTransfer.files.length){g=-g.dataTransfer.files[0];var k=new FileReader;k.onload=function(v){p.value=v.target.result};k.readAsText(g)}},!1));e.appendChild(u);mxEvent.addListener(u,"change",function(){var g=l();if(0==p.value.length||p.value==d)d=g,p.value=d});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(F=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==f?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),F.className="geBtn",e.appendChild(F));F=mxUtils.button(mxResources.get("close"),-function(){p.value==d?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});F.className="geBtn";b.editor.cancelFirst&&e.appendChild(F);H=mxUtils.button(mxResources.get("insert"),function(g){try{b.hideDialog(),c(p.value,u.value,g)}catch(k){b.handleError(k)}});H.className="geBtn gePrimaryBtn";e.appendChild(H);b.editor.cancelFirst||e.appendChild(F);this.container=e},NewDialog=function(b,e,f,c,l,n,p,u,F,H,E,K,d,g,k,v,t,x){function A(la){null!=la&&(ka=Ba=la?135:140);la=!0;-if(null!=Ua)for(;m<Ua.length&&(la||0!=mxUtils.mod(m,30));){var va=Ua[m++];va=q(va.url,va.libs,va.title,va.tooltip?va.tooltip:va.title,va.select,va.imgUrl,va.info,va.onClick,va.preview,va.noImg,va.clibs,va.type);la&&va.click();la=!1}}function J(la,va,ta,na,ra,za){if(null!=la&&mxUtils.isAncestorNode(document.body,na)){la=mxUtils.parseXml(la);la=Editor.parseDiagramNode(la.documentElement,null,!0);var Ga=new mxCodec(la.ownerDocument),Ia=new mxGraphModel;Ga.decode(la,Ia);b.sidebar.createTooltip(na,Ia.root.children,-Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=ra?mxResources.get(ra):null,!0,new mxPoint(va,ta),!0,function(){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=za&&R(na,null,null,za,infoObj,clibs)},!0,!1)}}function D(){var la=document.createElement("div");la.style.position="absolute";la.style.overflow="visible";+mxEvent.isAltDown(u)?n:A.getCenterInsertPoint(new mxRectangle(0,0,m,z));b.spinner.stop();var I=null;A.getModel().beginUpdate();try{I=A.insertVertex(null,null,null,n.x,n.y,m,z,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+T+";"),A.setAttributeForCell(I,"mermaidData",JSON.stringify({data:g},null,2))}finally{A.getModel().endUpdate()}null!=I&&(A.setSelectionCell(I),A.scrollCellToVisible(I))}},function(T){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(T)})}}else if("table"==+k){k=null;var S=[],U=0,P={};for(D=0;D<t.length;D++){var O=mxUtils.trim(t[D]);if("primary key"==O.substring(0,11).toLowerCase()){var q=O.match(/\((.+)\)/);q&&q[1]&&(P[q[1]]=!0);t.splice(D,1)}else 0<O.toLowerCase().indexOf("primary key")&&(P[O.split(" ")[0]]=!0,t[D]=mxUtils.trim(O.replace(/primary key/i,"")))}for(D=0;D<t.length;D++)if(O=mxUtils.trim(t[D]),"create table"==O.substring(0,12).toLowerCase())O=mxUtils.trim(O.substring(12)),"("==O.charAt(O.length-1)&&(O=mxUtils.trim(O.substring(0,O.length-+1))),k=new mxCell(O,new mxGeometry(U,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),k.vertex=!0,S.push(k),O=b.editor.graph.getPreferredSizeForCell(y),null!=O&&(k.geometry.width=O.width+10);else if(null!=k&&")"==O.charAt(0))U+=k.geometry.width+40,k=null;else if("("!=O&&null!=k){O=O.substring(0,","==O.charAt(O.length-1)?O.length-1:O.length);q=P[O.split(" ")[0]];var y=new mxCell("",new mxGeometry(0,+0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(q?"1":"0")+";");y.vertex=!0;var B=new mxCell(q?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(q?"fontStyle=1;":""));B.vertex=!0;y.insert(B);O=new mxCell(O,new mxGeometry(30,+0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(q?"fontStyle=5;":""));O.vertex=!0;y.insert(O);O=b.editor.graph.getPreferredSizeForCell(O);null!=O&&k.geometry.width<O.width+30&&(k.geometry.width=Math.min(320,Math.max(k.geometry.width,O.width+30)));k.insert(y,q?0:null);k.geometry.height+=30}0<S.length&&(A=b.editor.graph,n=mxEvent.isAltDown(u)?n:A.getCenterInsertPoint(A.getBoundingBoxFromGeometry(S,+!0)),A.setSelectionCells(A.importCells(S,n.x,n.y)),A.scrollCellToVisible(A.getSelectionCell()))}else if("list"==k){if(0<t.length){A=b.editor.graph;k=null;S=[];for(D=y=0;D<t.length;D++)";"!=t[D].charAt(0)&&(0==t[D].length?k=null:null==k?(k=new mxCell(t[D],new mxGeometry(y,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),k.vertex=!0,S.push(k),O=A.getPreferredSizeForCell(k),+null!=O&&k.geometry.width<O.width+10&&(k.geometry.width=O.width+10),y+=k.geometry.width+40):"--"==t[D]?(O=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;"),O.vertex=!0,k.geometry.height+=O.geometry.height,k.insert(O)):0<t[D].length&&(U=new mxCell(t[D],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),+U.vertex=!0,O=A.getPreferredSizeForCell(U),null!=O&&U.geometry.width<O.width&&(U.geometry.width=O.width),k.geometry.width=Math.max(k.geometry.width,U.geometry.width),k.geometry.height+=U.geometry.height,k.insert(U)));if(0<S.length){n=mxEvent.isAltDown(u)?n:A.getCenterInsertPoint(A.getBoundingBoxFromGeometry(S,!0));A.getModel().beginUpdate();try{S=A.importCells(S,n.x,n.y);O=[];for(D=0;D<S.length;D++)O.push(S[D]),O=O.concat(S[D].children);A.fireEvent(new mxEventObject("cellsInserted","cells",O))}finally{A.getModel().endUpdate()}A.setSelectionCells(S);+A.scrollCellToVisible(A.getSelectionCell())}}}else{y=function(T){var m=C[T];null==m&&(m=new mxCell(T,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),m.vertex=!0,C[T]=m,S.push(m));return m};var C={};S=[];for(D=0;D<t.length;D++)if(";"!=t[D].charAt(0)){var M=t[D].split("->");2<=M.length&&(q=y(M[0]),B=y(M[M.length-1]),M=new mxCell(2<M.length?M[1]:"",new mxGeometry),M.edge=!0,M.geometry.relative=!0,q.insertEdge(M,!0),B.insertEdge(M,!1),S.push(M))}if(0<S.length){t=document.createElement("div");t.style.visibility=+"hidden";document.body.appendChild(t);A=new Graph(t);A.getModel().beginUpdate();try{S=A.importCells(S);for(D=0;D<S.length;D++)A.getModel().isVertex(S[D])&&(O=A.getPreferredSizeForCell(S[D]),S[D].geometry.width=Math.max(S[D].geometry.width,O.width),S[D].geometry.height=Math.max(S[D].geometry.height,O.height));D=!0;"horizontalFlow"==k||"verticalFlow"==k?((new mxHierarchicalLayout(A,"horizontalFlow"==k?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(A.getDefaultParent(),S),D=!1):"circle"==+k?(new mxCircleLayout(A)).execute(A.getDefaultParent()):(U=new mxFastOrganicLayout(A),U.disableEdgeStyle=!1,U.forceConstant=180,U.execute(A.getDefaultParent()));D&&(P=new mxParallelEdgeLayout(A),P.spacing=30,P.execute(A.getDefaultParent()))}finally{A.getModel().endUpdate()}A.clearCellOverlays();O=[];b.editor.graph.getModel().beginUpdate();try{S=A.getModel().getChildren(A.getDefaultParent()),n=mxEvent.isAltDown(u)?n:b.editor.graph.getCenterInsertPoint(A.getBoundingBoxFromGeometry(S,!0)),O=b.editor.graph.importCells(S,+n.x,n.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",O))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(O);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());A.destroy();t.parentNode.removeChild(t)}}}function l(){return"list"==v.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==v.value||+"mermaid2drawio"==v.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==v.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==v.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":+"plantUmlSvg"==v.value||"plantUmlTxt"==v.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var n=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var p=document.createElement("textarea");p.style.boxSizing="border-box";p.style.resize=+"none";p.style.width="100%";p.style.height="354px";p.style.marginBottom="16px";var v=document.createElement("select");v.className="geBtn";if("formatSql"==f||"mermaid"==f&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())v.style.display="none";var F=document.createElement("option");F.setAttribute("value","list");mxUtils.write(F,mxResources.get("list"));"plantUml"!=f&&"mermaid"!=f&&v.appendChild(F);null!=f&&"fromText"!=f||F.setAttribute("selected","selected");F=document.createElement("option");+F.setAttribute("value","table");mxUtils.write(F,mxResources.get("formatSql"));"formatSql"==f&&(v.appendChild(F),F.setAttribute("selected","selected"));F=document.createElement("option");F.setAttribute("value","mermaid");mxUtils.write(F,mxResources.get("image"));if("mermaid"==f)if("undefined"!==typeof mxMermaidToDrawio){var H=document.createElement("option");H.setAttribute("value","mermaid2drawio");H.setAttribute("selected","selected");mxUtils.write(H,mxResources.get("diagram"));v.appendChild(H)}else v.style.display=+"none";v.appendChild(F);F=document.createElement("option");F.setAttribute("value","diagram");mxUtils.write(F,mxResources.get("diagram"));H=document.createElement("option");H.setAttribute("value","circle");mxUtils.write(H,mxResources.get("circle"));var E=document.createElement("option");E.setAttribute("value","horizontalFlow");mxUtils.write(E,mxResources.get("horizontalFlow"));var K=document.createElement("option");K.setAttribute("value","verticalFlow");mxUtils.write(K,mxResources.get("verticalFlow"));+"plantUml"!=f&&"mermaid"!=f&&(v.appendChild(F),v.appendChild(H),v.appendChild(E),v.appendChild(K));F=document.createElement("option");F.setAttribute("value","plantUmlSvg");mxUtils.write(F,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==f&&F.setAttribute("selected","selected");H=document.createElement("option");H.setAttribute("value","plantUmlPng");mxUtils.write(H,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");E=document.createElement("option");E.setAttribute("value",+"plantUmlTxt");mxUtils.write(E,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(v.appendChild(F),v.appendChild(H),v.appendChild(E));var d=l();p.value=d;e.appendChild(p);this.init=function(){p.focus()};Graph.fileSupport&&(p.addEventListener("dragover",function(g){g.stopPropagation();g.preventDefault()},!1),p.addEventListener("drop",function(g){g.stopPropagation();g.preventDefault();if(0<g.dataTransfer.files.length){g=+g.dataTransfer.files[0];var k=new FileReader;k.onload=function(u){p.value=u.target.result};k.readAsText(g)}},!1));e.appendChild(v);mxEvent.addListener(v,"change",function(){var g=l();if(0==p.value.length||p.value==d)d=g,p.value=d});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(F=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==f?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),F.className="geBtn",e.appendChild(F));F=mxUtils.button(mxResources.get("close"),+function(){p.value==d?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});F.className="geBtn";b.editor.cancelFirst&&e.appendChild(F);H=mxUtils.button(mxResources.get("insert"),function(g){try{b.hideDialog(),c(p.value,v.value,g)}catch(k){b.handleError(k)}});H.className="geBtn gePrimaryBtn";e.appendChild(H);b.editor.cancelFirst||e.appendChild(F);this.container=e},NewDialog=function(b,e,f,c,l,n,p,v,F,H,E,K,d,g,k,u,t,x){function A(la){null!=la&&(ka=Ca=la?135:140);la=!0;+if(null!=Ua)for(;m<Ua.length&&(la||0!=mxUtils.mod(m,30));){var va=Ua[m++];va=q(va.url,va.libs,va.title,va.tooltip?va.tooltip:va.title,va.select,va.imgUrl,va.info,va.onClick,va.preview,va.noImg,va.clibs,va.type);la&&va.click();la=!1}}function J(la,va,ta,ma,ra,za){if(null!=la&&mxUtils.isAncestorNode(document.body,ma)){la=mxUtils.parseXml(la);la=Editor.parseDiagramNode(la.documentElement,null,!0);var Ga=new mxCodec(la.ownerDocument),Ia=new mxGraphModel;Ga.decode(la,Ia);b.sidebar.createTooltip(ma,Ia.root.children,+Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=ra?mxResources.get(ra):null,!0,new mxPoint(va,ta),!0,function(){R=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=za&&S(ma,null,null,za,infoObj,clibs)},!0,!1)}}function D(){var la=document.createElement("div");la.style.position="absolute";la.style.overflow="visible";la.style.left="8px";la.style.right="8px";la.style.bottom="8px";la.style.top="8px";mxUtils.write(la,mxResources.get("describeYourDiagram")+":");mxUtils.br(la);var va=document.createElement("input");va.setAttribute("type","text");va.setAttribute("placeholder",mxResources.get("processForHiringNewEmployee"));va.style.width="100%";va.style.marginTop="6px";va.style.marginBottom="4px";va.style.boxSizing="border-box";la.appendChild(va);la.init=function(){va.focus()};mxUtils.br(la);var ta=document.createElement("div");-ta.style.top="86px";ta.style.left="2px";ta.style.right="2px";ta.style.bottom="2px";ta.style.position="absolute";ta.style.border="1px solid #424242";var na=document.createElement("div");na.style.boxSizing="border-box";na.style.position="relative";na.style.textAlign="center";na.style.top="50%";mxUtils.write(na,mxResources.get("blankDiagram"));ta.appendChild(na);var ra=document.createElement("select");ra.className="geBtn";ra.style.maxWidth="160px";ra.style.marginLeft="0px";na=document.createElement("option");-mxUtils.write(na,mxResources.get("diagramType"));na.setAttribute("value","");ra.appendChild(na);for(var za=0;za<EditorUi.mermaidDiagramTypes.length;za++){na=document.createElement("option");var Ga=EditorUi.mermaidDiagramTypes[za],Ia=Ga;Ga==urlParams["smart-template-type"]&&na.setAttribute("selected","selected");"erDiagram"==Ia&&(Ia="entityRelationshipDiagram");Ia=mxResources.get(Ia,null,Ia.charAt(0).toUpperCase()+Ia.substring(1).replace(/[A-Z]/g," $&"));na.setAttribute("value",Ga);mxUtils.write(na,-Ia);ra.appendChild(na)}var Pa=mxUtils.button(mxResources.get("generate"),function(){var La=va.value,Na=ra.value.replace(/([A-Z])/g," $1").toLowerCase();La="Write the declaration code for a detailed and complex "+(""!=Na?Na:"graph")+' that shows "'+(""!=La?La:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Na=""!=ra.value?" ("+mxUtils.trim(mxUtils.getTextContent(ra.options[ra.selectedIndex]))+")":"";var Va="gantt"==ra.value||"pie"==ra.value||-"timeline"==ra.value||"quadrantchart"==ra.value||"c4context"==ra.value,Ma=va.value+Na;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(Qa){Va||(ha=aa=Qa,xa="Smart Template: "+Ma)}));b.spinner.spin(document.body,mxResources.get("loading"))&&b.generateOpenAiMermaidDiagram(La,function(Qa,Ya,Ha,fb){b.spinner.stop();ta.innerHTML="";var Ta=document.createElement("img");Ta.setAttribute("title",Ma);Ta.src="data:image/svg+xml;base64,"+Ya.substring(Ya.indexOf(",")+-1);Ta.style.cursor="pointer";Ta.style.width="100%";Ta.style.height="100%";ta.appendChild(Ta);Qa=b.createMermaidXml(Qa,EditorUi.defaultMermaidConfig,Ya,Ha,fb,Ma);var ib="<mxfile><diagram>"+Graph.compress(Qa)+"</diagram></mxfile>";if(Va||"undefined"===typeof mxMermaidToDrawio)ha=aa=Qa;Qa=L.cloneNode(!0);ta.appendChild(Qa);Ya=function(gb){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Ha=function(gb){S||J(ib,mxEvent.getClientX(gb),mxEvent.getClientY(gb),Ta,Ma)};mxEvent.addGestureListeners(Ta,-Ya,null,Ha);mxEvent.addGestureListeners(Qa,Ya,null,Ha)},function(Qa){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();b.handleError(Qa)})});Pa.setAttribute("disabled","disabled");Pa.className="geBtn gePrimaryBtn";na=function(){window.setTimeout(function(){""!=va.value?Pa.removeAttribute("disabled"):Pa.setAttribute("disabled","disabled")},0)};za=urlParams["smart-template"];null!=za&&"1"!=za&&(va.value=decodeURIComponent(za),na(),"1"==urlParams["smart-template-generate"]&&-window.setTimeout(function(){Pa.click()},0));mxEvent.addListener(va,"change",na);mxEvent.addListener(va,"keydown",na);mxEvent.addListener(va,"cut",na);mxEvent.addListener(va,"paste",na);mxEvent.addListener(va,"keydown",function(La){13==La.keyCode&&Pa.click()});na=document.createElement("div");na.style.height="40px";na.style.marginTop="4px";na.style.marginBottom="4px";na.style.whiteSpace="nowrap";na.style.overflowX="auto";na.style.overflowY="hidden";na.appendChild(ra);na.appendChild(Pa);la.appendChild(na);-la.appendChild(ta);return la}function G(){null!=aa&&aa==ha&&EditorUi.logEvent({category:"OPENAI-DIAGRAM",action:"templateGenerated",label:xa});if(ia&&null!=g)f||b.hideDialog(),g(ia,oa,T.value);else if(c)f||b.hideDialog(),c(aa,T.value,pa,ca);else{var la=T.value;if(null!=la&&0<la.length){var va=function(na,ra,za){b.createFile(za,aa,null!=ca&&0<ca.length?ca:null,na,function(){b.hideDialog()},null,ra,null,null!=fa&&0<fa.length?fa:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var ta=new SaveDialog(b,-la,mxUtils.bind(this,function(na,ra,za){va(ra,za,na.value)}),null,null,null,null,b.mode);b.showDialog(ta.container,420,150,!0,!1);ta.init()}else b.pickFolder(b.mode,function(na){va(b.mode,na,la)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function R(la,va,ta,na,ra,za,Ga){return da!=la?(null!=da&&(da.style.backgroundColor="transparent",da.style.border="2px solid transparent",0<da.getElementsByTagName("table").length&&(da.getElementsByTagName("table")[0].style.visibility=-"visible"),da==sa&&(sa.style.backgroundImage=Ea,sa.style.backgroundPosition="center center",sa.style.backgroundRepeat="no-repeat",sa.style.backgroundSize="contain",wa.style.visibility="hidden",Ca.style.visibility="hidden",Fa.style.visibility="hidden",Aa.style.visibility="hidden",Da.style.visibility=null!=ha?"visible":"hidden",sa.getElementsByTagName("table")[0].style.visibility="visible")),""!=la.style.backgroundImage&&0<la.getElementsByTagName("table").length&&(la.getElementsByTagName("table")[0].style.visibility=-"hidden"),la==sa&&(va=ha,null!=va?(Da.style.visibility="visible",Da.style.visibility=null!=ha?"visible":"hidden",Aa.style.visibility="visible"):(wa.style.visibility="visible",Ca.style.visibility="visible",Fa.style.visibility="visible",Aa.style.visibility="hidden",Da.style.visibility="hidden")),I.removeAttribute("disabled"),aa=va,ca=ta,fa=za,da=la,ia=na,pa=Ga,oa=ra,da.style.border=F,!0):!1}function V(){sa.style.backgroundImage="";sa.getElementsByTagName("table")[0].style.visibility="hidden";wa.style.visibility=-"visible";Ca.style.visibility="visible";Fa.style.visibility="visible";Aa.style.visibility="hidden";Da.style.visibility="hidden";wa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?wa.select():document.execCommand("selectAll",!1,null)}function Q(){wa.style.visibility="hidden";Ca.style.visibility="hidden";Fa.style.visibility="hidden";sa.style.backgroundImage=Ea;sa.style.backgroundSize="contain";Aa.style.visibility="visible";Da.style.visibility="visible"}function P(la){var va=mxUtils.trim(wa.value);-if(la||""==va)null!=xa&&(wa.value=xa,Q());else{wa.style.visibility="hidden";Ca.style.visibility="hidden";Fa.style.visibility="hidden";var ta=!1;la='Write a detailed and complex MermaidJS declaration for "'+(""!=va?va:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(na){na!=b.emptyDiagramXml&&(ta=!0,aa=na)}));sa.style.backgroundImage="url("+Editor.spinImage+-")";sa.style.backgroundSize="12px 12px";b.generateOpenAiMermaidDiagram(la,function(na,ra,za,Ga){da==sa&&"hidden"==wa.style.visibility&&(Ea="url(data:image/svg+xml;base64,"+ra.substring(ra.indexOf(",")+1)+")",sa.setAttribute("title",va),ha=aa=na=ta?aa:b.createMermaidXml(na,EditorUi.defaultMermaidConfig,ra,za,Ga,va),xa=va,Q())},function(na){da==sa&&(wa.style.visibility="visible",Ca.style.visibility="visible",Fa.style.visibility="visible",Aa.style.visibility="visible",Da.style.visibility="visible",b.handleError(na))})}}-function q(la,va,ta,na,ra,za,Ga,Ia,Pa,La,Na,Va){function Ma(Oa,bb){null==fb?(Ta=Oa,Ta=/^https?:\/\//.test(Ta)?b.editor.isCorsEnabledForUrl(Ta)?Ta:PROXY_URL+"?url="+encodeURIComponent(Ta):TEMPLATE_PATH+"/"+Ta,mxUtils.get(Ta,mxUtils.bind(this,function(cb){200<=cb.getStatus()&&299>=cb.getStatus()&&(fb=cb.getText());bb(fb,Ta)}))):bb(fb,Ta)}function Qa(Oa,bb){if(null==la||N||b.sidebar.currentElt==Ha)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=O){var cb="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+-O.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+O.naturalWidth+'" height="'+O.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";J(cb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),ta,la)}else b.sidebar.currentElt=Ha,N=!0,Ma(la,function(hb){if(N&&b.sidebar.currentElt==Ha)try{J(hb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),Ha,bb)}catch(Za){b.sidebar.currentElt=null,b.handleError(Za)}N=!1})}function Ya(){var Oa=document.createElement("table");+ta.style.top="86px";ta.style.left="2px";ta.style.right="2px";ta.style.bottom="2px";ta.style.position="absolute";ta.style.border="1px solid #424242";var ma=document.createElement("div");ma.style.boxSizing="border-box";ma.style.position="relative";ma.style.textAlign="center";ma.style.top="50%";mxUtils.write(ma,mxResources.get("blankDiagram"));ta.appendChild(ma);var ra=document.createElement("select");ra.className="geBtn";ra.style.maxWidth="160px";ra.style.marginLeft="0px";ma=document.createElement("option");+mxUtils.write(ma,mxResources.get("diagramType"));ma.setAttribute("value","");ra.appendChild(ma);for(var za=0;za<EditorUi.mermaidDiagramTypes.length;za++){ma=document.createElement("option");var Ga=EditorUi.mermaidDiagramTypes[za],Ia=Ga;Ga==urlParams["smart-template-type"]&&ma.setAttribute("selected","selected");"erDiagram"==Ia&&(Ia="entityRelationshipDiagram");Ia=mxResources.get(Ia,null,Ia.charAt(0).toUpperCase()+Ia.substring(1).replace(/[A-Z]/g," $&"));ma.setAttribute("value",Ga);mxUtils.write(ma,+Ia);ra.appendChild(ma)}var Pa=mxUtils.button(mxResources.get("generate"),function(){var La=va.value,Na=ra.value.replace(/([A-Z])/g," $1").toLowerCase();La="Write the declaration code for a detailed and complex "+(""!=Na?Na:"graph")+' that shows "'+(""!=La?La:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Na=""!=ra.value?" ("+mxUtils.trim(mxUtils.getTextContent(ra.options[ra.selectedIndex]))+")":"";var Va="gantt"==ra.value||"pie"==ra.value||+"timeline"==ra.value||"quadrantchart"==ra.value||"c4context"==ra.value,Ma=va.value+Na;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(Qa){Va||(ha=aa=Qa,wa="Smart Template: "+Ma)}));b.spinner.spin(document.body,mxResources.get("loading"))&&b.generateOpenAiMermaidDiagram(La,function(Qa,Ya,Ha,fb){b.spinner.stop();ta.innerHTML="";var Ta=document.createElement("img");Ta.setAttribute("title",Ma);Ta.src="data:image/svg+xml;base64,"+Ya.substring(Ya.indexOf(",")++1);Ta.style.cursor="pointer";Ta.style.width="100%";Ta.style.height="100%";ta.appendChild(Ta);Qa=b.createMermaidXml(Qa,EditorUi.defaultMermaidConfig,Ya,Ha,fb,Ma);var ib="<mxfile><diagram>"+Graph.compress(Qa)+"</diagram></mxfile>";if(Va||"undefined"===typeof mxMermaidToDrawio)ha=aa=Qa;Qa=L.cloneNode(!0);ta.appendChild(Qa);Ya=function(gb){R=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Ha=function(gb){R||J(ib,mxEvent.getClientX(gb),mxEvent.getClientY(gb),Ta,Ma)};mxEvent.addGestureListeners(Ta,+Ya,null,Ha);mxEvent.addGestureListeners(Qa,Ya,null,Ha)},function(Qa){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();b.handleError(Qa)})});Pa.setAttribute("disabled","disabled");Pa.className="geBtn gePrimaryBtn";ma=function(){window.setTimeout(function(){""!=va.value?Pa.removeAttribute("disabled"):Pa.setAttribute("disabled","disabled")},0)};za=urlParams["smart-template"];null!=za&&"1"!=za&&(va.value=decodeURIComponent(za),ma(),"1"==urlParams["smart-template-generate"]&&+window.setTimeout(function(){Pa.click()},0));mxEvent.addListener(va,"change",ma);mxEvent.addListener(va,"keydown",ma);mxEvent.addListener(va,"cut",ma);mxEvent.addListener(va,"paste",ma);mxEvent.addListener(va,"keydown",function(La){13==La.keyCode&&Pa.click()});ma=document.createElement("div");ma.style.height="40px";ma.style.marginTop="4px";ma.style.marginBottom="4px";ma.style.whiteSpace="nowrap";ma.style.overflowX="auto";ma.style.overflowY="hidden";ma.appendChild(ra);ma.appendChild(Pa);la.appendChild(ma);+la.appendChild(ta);return la}function G(){null!=aa&&aa==ha&&EditorUi.logEvent({category:"OPENAI-DIAGRAM",action:"templateGenerated",label:wa});if(ia&&null!=g)f||b.hideDialog(),g(ia,pa,T.value);else if(c)f||b.hideDialog(),c(aa,T.value,na,ca);else{var la=T.value;if(null!=la&&0<la.length){var va=function(ma,ra,za){b.createFile(za,aa,null!=ca&&0<ca.length?ca:null,ma,function(){b.hideDialog()},null,ra,null,null!=ea&&0<ea.length?ea:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var ta=new SaveDialog(b,+la,mxUtils.bind(this,function(ma,ra,za){va(ra,za,ma.value)}),null,null,null,null,b.mode);b.showDialog(ta.container,420,150,!0,!1);ta.init()}else b.pickFolder(b.mode,function(ma){va(b.mode,ma,la)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function S(la,va,ta,ma,ra,za,Ga){return fa!=la?(null!=fa&&(fa.style.backgroundColor="transparent",fa.style.border="2px solid transparent",0<fa.getElementsByTagName("table").length&&(fa.getElementsByTagName("table")[0].style.visibility=+"visible"),fa==sa&&(sa.style.backgroundImage=Fa,sa.style.backgroundPosition="center center",sa.style.backgroundRepeat="no-repeat",sa.style.backgroundSize="contain",xa.style.visibility="hidden",Aa.style.visibility="hidden",Ea.style.visibility="hidden",Ja.style.visibility="hidden",Da.style.visibility=null!=ha?"visible":"hidden",sa.getElementsByTagName("table")[0].style.visibility="visible")),""!=la.style.backgroundImage&&0<la.getElementsByTagName("table").length&&(la.getElementsByTagName("table")[0].style.visibility=+"hidden"),la==sa&&(va=ha,null!=va?(Da.style.visibility="visible",Da.style.visibility=null!=ha?"visible":"hidden",Ja.style.visibility="visible"):(xa.style.visibility="visible",Aa.style.visibility="visible",Ea.style.visibility="visible",Ja.style.visibility="hidden",Da.style.visibility="hidden")),I.removeAttribute("disabled"),aa=va,ca=ta,ea=za,fa=la,ia=ma,na=Ga,pa=ra,fa.style.border=F,!0):!1}function U(){sa.style.backgroundImage="";sa.getElementsByTagName("table")[0].style.visibility="hidden";xa.style.visibility=+"visible";Aa.style.visibility="visible";Ea.style.visibility="visible";Ja.style.visibility="hidden";Da.style.visibility="hidden";xa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?xa.select():document.execCommand("selectAll",!1,null)}function P(){xa.style.visibility="hidden";Aa.style.visibility="hidden";Ea.style.visibility="hidden";sa.style.backgroundImage=Fa;sa.style.backgroundSize="contain";Ja.style.visibility="visible";Da.style.visibility="visible"}function O(la){var va=mxUtils.trim(xa.value);+if(la||""==va)null!=wa&&(xa.value=wa,P());else{xa.style.visibility="hidden";Aa.style.visibility="hidden";Ea.style.visibility="hidden";var ta=!1;la='Write a detailed and complex MermaidJS declaration for "'+(""!=va?va:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ma){ma!=b.emptyDiagramXml&&(ta=!0,aa=ma)}));sa.style.backgroundImage="url("+Editor.spinImage++")";sa.style.backgroundSize="12px 12px";b.generateOpenAiMermaidDiagram(la,function(ma,ra,za,Ga){fa==sa&&"hidden"==xa.style.visibility&&(Fa="url(data:image/svg+xml;base64,"+ra.substring(ra.indexOf(",")+1)+")",sa.setAttribute("title",va),ha=aa=ma=ta?aa:b.createMermaidXml(ma,EditorUi.defaultMermaidConfig,ra,za,Ga,va),wa=va,P())},function(ma){fa==sa&&(xa.style.visibility="visible",Aa.style.visibility="visible",Ea.style.visibility="visible",Ja.style.visibility="visible",Da.style.visibility="visible",b.handleError(ma))})}}+function q(la,va,ta,ma,ra,za,Ga,Ia,Pa,La,Na,Va){function Ma(Oa,bb){null==fb?(Ta=Oa,Ta=/^https?:\/\//.test(Ta)?b.editor.isCorsEnabledForUrl(Ta)?Ta:PROXY_URL+"?url="+encodeURIComponent(Ta):TEMPLATE_PATH+"/"+Ta,mxUtils.get(Ta,mxUtils.bind(this,function(cb){200<=cb.getStatus()&&299>=cb.getStatus()&&(fb=cb.getText());bb(fb,Ta)}))):bb(fb,Ta)}function Qa(Oa,bb){if(null==la||N||b.sidebar.currentElt==Ha)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=Q){var cb="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='++Q.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Q.naturalWidth+'" height="'+Q.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";J(cb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),ta,la)}else b.sidebar.currentElt=Ha,N=!0,Ma(la,function(hb){if(N&&b.sidebar.currentElt==Ha)try{J(hb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),Ha,bb)}catch(Za){b.sidebar.currentElt=null,b.handleError(Za)}N=!1})}function Ya(){var Oa=document.createElement("table");Oa.setAttribute("width","100%");Oa.setAttribute("height","100%");Oa.style.background="light-dark(rgba(255,255,255,0.85), transparent)";Oa.style.lineHeight="1.3em";Oa.style.border="none";var bb=document.createElement("tbody"),cb=document.createElement("tr"),hb=document.createElement("td");hb.setAttribute("align","center");hb.setAttribute("valign","middle");var Za=document.createElement("span");Za.style.display="inline-block";Za.style.padding="2px 8px";Za.style.userSelect="none";Za.style.borderRadius="8px";Za.style.background="rgba(255,255,255,0.7)";Za.style.overflow="hidden";Za.style.textOverflow="ellipsis";Za.style.maxWidth=ka-34+"px";mxUtils.write(Za,mxResources.get(ta,null,ta));hb.appendChild(Za);cb.appendChild(hb);bb.appendChild(cb);Oa.appendChild(bb);return Oa}var Ha=null;if("generative"!=Va||null==sa){Ha=document.createElement("div");Ha.className="geTemplate geAdaptiveAsset";Ha.style.backgroundOrigin="content-box";Ha.style.backgroundPosition="center center";Ha.style.backgroundRepeat="no-repeat";-Ha.style.backgroundSize="contain";Ha.style.boxSizing="border-box";Ha.style.borderRadius="12px";Ha.style.position="relative";Ha.style.height=ka+"px";Ha.style.width=Ba+"px";Ha.style.padding="4px";Ha.style.border="2px solid transparent";var fb=null,Ta=la;null!=ta?Ha.setAttribute("title",mxResources.get(ta,null,ta)):null!=na&&0<na.length&&Ha.setAttribute("title",na)}else Ha=sa;if(null!=za){Ha.style.display="inline-flex";Ha.style.justifyContent="center";Ha.style.alignItems="center";ra=document.createElement("img");-ra.setAttribute("src",za);ra.setAttribute("alt",na);ra.style.maxWidth=ka+"px";ra.style.maxHeight=Ba+"px";O=ra;var ib=za.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ha.appendChild(ra);ra.onerror=function(){this.src!=ib?this.src=ib:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ha,mxUtils.bind(this,function(Oa){R(Ha,null,null,la,Ga,Na)}),null,null);mxEvent.addListener(Ha,"dblclick",function(Oa){G();mxEvent.consume(Oa)})}else if(!La&&null!=la&&0<la.length){var gb=-function(Oa){z.spin(qa)&&Ma(la,function(bb,cb){z.stop();null!=bb&&(R(Ha,bb,va,null,null,Na,cb),Oa&&G())})};za=Pa||TEMPLATE_PATH+"/"+la.substring(0,la.length-4)+".png";Ha.style.backgroundImage="url("+za+")";null!=ta&&Ha.appendChild(Ya());mxEvent.addGestureListeners(Ha,mxUtils.bind(this,function(Oa){gb()}),null,null);mxEvent.addListener(Ha,"dblclick",function(Oa){gb(!0);mxEvent.consume(Oa)})}else Ha.appendChild(Ya()),"generative"==Va&&null==sa&&(Ha.style.backgroundImage=Ea,Ha.style.overflow="visible",-Ha.appendChild(Da),Ha.appendChild(Aa),Ha.appendChild(wa),Ha.appendChild(Ca),Ha.appendChild(Fa),sa=Ha),ra&&R(Ha),null!=Ia?(mxEvent.addGestureListeners(Ha,null,null,mxUtils.bind(this,function(Oa){R(Ha,null,null,la,Ga)})),mxEvent.addListener(Ha,"click",Ia)):(mxEvent.addListener(Ha,"click",function(Oa){R(Ha,null,null,la,Ga)&&"generative"==Va&&null==ha&&V()}),mxEvent.addListener(Ha,"dblclick",function(Oa){"generative"!=Va?G():"hidden"==wa.style.visibility&&V();mxEvent.consume(Oa)}));null!=la&&(za=L.cloneNode(!0),-Ha.appendChild(za),mxEvent.addGestureListeners(za,mxUtils.bind(this,function(Oa){S=b.sidebar.currentElt==Ha}),null,null),mxEvent.addListener(za,"click",mxUtils.bind(this,function(Oa){S||Qa(Oa,null!=ta?ta:na);mxEvent.consume(Oa)})));qa.appendChild(Ha);return Ha}function y(){function la(Ma,Qa){Ma=mxResources.get(Ma,null,Ma.substring(0,1).toUpperCase()+Ma.substring(1));18<Ma.length&&(Ma=Ma.substring(0,18)+"…");return Ma+(null!=Qa?" ("+Qa.length+")":"")}function va(Ma,Qa,Ya){mxEvent.addListener(Qa,-"click",function(){Wa!=Qa&&(null!=Wa&&(Wa.style.backgroundColor=""),Wa=Qa,Wa.style.backgroundColor=p,qa.scrollTop=0,qa.innerText="",m=0,null!=Ja[Ma].content?(qa.appendChild(Ja[Ma].content),aa=ha,Ua=null,null!=Ja[Ma].content.init&&Ja[Ma].content.init()):(Ua=Ya?Ra[Ma][Ya]:Ja[Ma],W=null,A(!1)))});null!=urlParams["smart-template"]&&"smartTemplate"==Ma&&Qa.click()}db&&(db=!1,mxEvent.addListener(qa,"scroll",function(Ma){qa.scrollTop+qa.clientHeight>=qa.scrollHeight&&(A(),mxEvent.consume(Ma))}));if(0<ab){var ta=-document.createElement("div");ta.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ta,mxResources.get("custom"));ma.appendChild(ta);for(var na in Sa){var ra=document.createElement("div");ta=na;var za=Sa[na];18<ta.length&&(ta=ta.substring(0,18)+"…");ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";ra.setAttribute("title",ta+" ("+-za.length+")");mxUtils.write(ra,ra.getAttribute("title"));null!=H&&(ra.style.padding=H);ma.appendChild(ra);(function(Ma,Qa){mxEvent.addListener(ra,"click",function(){Wa!=Qa&&(Wa.style.backgroundColor="",Wa=Qa,Wa.style.backgroundColor=p,qa.scrollTop=0,qa.innerText="",m=0,Ua=Sa[Ma],W=null,A(!1))})})(na,ra)}ta=document.createElement("div");ta.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ta,"draw.io");ma.appendChild(ta)}for(na in Ja){ta=-za=null;if(null!=Ja[na].content)ra=document.createElement(Ga?"ul":"div"),ta=la(na),ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",ra.setAttribute("title",ta),mxUtils.write(ra,ta),ma.appendChild(ra),ta=ra;else{var Ga=Ra[na];ta=ra=document.createElement(Ga?"ul":"div");za=Ja[na];var Ia=la(na,za);if(null!=Ga){za=document.createElement("li");var Pa=document.createElement("div");-Pa.className="geTempTreeCaret";Pa.setAttribute("title",Ia);mxUtils.write(Pa,Ia);ta=Pa;za.appendChild(Pa);Ia=document.createElement("ul");Ia.className="geTempTreeNested";Ia.style.visibility="hidden";for(var La in Ga){var Na=document.createElement("li"),Va=la(La,Ga[La]);Na.setAttribute("title",Va);mxUtils.write(Na,Va);va(na,Na,La);Ia.appendChild(Na)}za.appendChild(Ia);ra.className="geTempTree";ra.appendChild(za);(function(Ma,Qa){mxEvent.addListener(Qa,"click",function(){Ma.style.visibility="visible";-Ma.classList.toggle("geTempTreeActive");Ma.classList.toggle("geTempTreeNested")&&setTimeout(function(){Ma.style.visibility="hidden"},550);Qa.classList.toggle("geTempTreeCaret-down")})})(Ia,Pa)}else ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",ra.setAttribute("title",Ia),mxUtils.write(ra,Ia);null!=H&&(ra.style.padding=H);ma.appendChild(ra)}va(na,ta);null==Wa&&ta.click()}A(!1)}-u=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;l=null!=l?l:!1;p=null!=p?p:"light-dark(#ebf2f9, "+Editor.darkColor+")";F=null!=F?F:"2px dashed light-dark(#29b6f2, #00a8ff)";E=null!=E?E:EditorUi.templateFile;var B=document.createElement("div");B.style.userSelect="none";B.style.height="100%";var C=document.createElement("div");C.style.whiteSpace="nowrap";C.style.height="46px";f&&B.appendChild(C);var M=document.createElement("img");M.setAttribute("border",+Ha.style.backgroundSize="contain";Ha.style.boxSizing="border-box";Ha.style.borderRadius="12px";Ha.style.position="relative";Ha.style.height=ka+"px";Ha.style.width=Ca+"px";Ha.style.padding="4px";Ha.style.border="2px solid transparent";var fb=null,Ta=la;null!=ta?Ha.setAttribute("title",mxResources.get(ta,null,ta)):null!=ma&&0<ma.length&&Ha.setAttribute("title",ma)}else Ha=sa;if(null!=za){Ha.style.display="inline-flex";Ha.style.justifyContent="center";Ha.style.alignItems="center";ra=document.createElement("img");+ra.setAttribute("src",za);ra.setAttribute("alt",ma);ra.style.maxWidth=ka+"px";ra.style.maxHeight=Ca+"px";Q=ra;var ib=za.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ha.appendChild(ra);ra.onerror=function(){this.src!=ib?this.src=ib:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ha,mxUtils.bind(this,function(Oa){S(Ha,null,null,la,Ga,Na)}),null,null);mxEvent.addListener(Ha,"dblclick",function(Oa){G();mxEvent.consume(Oa)})}else if(!La&&null!=la&&0<la.length){var gb=+function(Oa){z.spin(qa)&&Ma(la,function(bb,cb){z.stop();null!=bb&&(S(Ha,bb,va,null,null,Na,cb),Oa&&G())})};za=Pa||TEMPLATE_PATH+"/"+la.substring(0,la.length-4)+".png";Ha.style.backgroundImage="url("+za+")";null!=ta&&Ha.appendChild(Ya());mxEvent.addGestureListeners(Ha,mxUtils.bind(this,function(Oa){gb()}),null,null);mxEvent.addListener(Ha,"dblclick",function(Oa){gb(!0);mxEvent.consume(Oa)})}else Ha.appendChild(Ya()),"generative"==Va&&null==sa&&(Ha.style.backgroundImage=Fa,Ha.style.overflow="visible",+Ha.appendChild(Da),Ha.appendChild(Ja),Ha.appendChild(xa),Ha.appendChild(Aa),Ha.appendChild(Ea),sa=Ha),ra&&S(Ha),null!=Ia?(mxEvent.addGestureListeners(Ha,null,null,mxUtils.bind(this,function(Oa){S(Ha,null,null,la,Ga)})),mxEvent.addListener(Ha,"click",Ia)):(mxEvent.addListener(Ha,"click",function(Oa){S(Ha,null,null,la,Ga)&&"generative"==Va&&null==ha&&U()}),mxEvent.addListener(Ha,"dblclick",function(Oa){"generative"!=Va?G():"hidden"==xa.style.visibility&&U();mxEvent.consume(Oa)}));null!=la&&(za=L.cloneNode(!0),+Ha.appendChild(za),mxEvent.addGestureListeners(za,mxUtils.bind(this,function(Oa){R=b.sidebar.currentElt==Ha}),null,null),mxEvent.addListener(za,"click",mxUtils.bind(this,function(Oa){R||Qa(Oa,null!=ta?ta:ma);mxEvent.consume(Oa)})));qa.appendChild(Ha);return Ha}function y(){function la(Ma,Qa){Ma=mxResources.get(Ma,null,Ma.substring(0,1).toUpperCase()+Ma.substring(1));18<Ma.length&&(Ma=Ma.substring(0,18)+"…");return Ma+(null!=Qa?" ("+Qa.length+")":"")}function va(Ma,Qa,Ya){mxEvent.addListener(Qa,+"click",function(){Wa!=Qa&&(null!=Wa&&(Wa.style.backgroundColor=""),Wa=Qa,Wa.style.backgroundColor=p,qa.scrollTop=0,qa.innerText="",m=0,null!=Ba[Ma].content?(qa.appendChild(Ba[Ma].content),aa=ha,Ua=null,null!=Ba[Ma].content.init&&Ba[Ma].content.init()):(Ua=Ya?Ra[Ma][Ya]:Ba[Ma],W=null,A(!1)))});null!=urlParams["smart-template"]&&"smartTemplate"==Ma&&Qa.click()}db&&(db=!1,mxEvent.addListener(qa,"scroll",function(Ma){qa.scrollTop+qa.clientHeight>=qa.scrollHeight&&(A(),mxEvent.consume(Ma))}));if(0<ab){var ta=+document.createElement("div");ta.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ta,mxResources.get("custom"));oa.appendChild(ta);for(var ma in Sa){var ra=document.createElement("div");ta=ma;var za=Sa[ma];18<ta.length&&(ta=ta.substring(0,18)+"…");ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";ra.setAttribute("title",ta+" ("++za.length+")");mxUtils.write(ra,ra.getAttribute("title"));null!=H&&(ra.style.padding=H);oa.appendChild(ra);(function(Ma,Qa){mxEvent.addListener(ra,"click",function(){Wa!=Qa&&(Wa.style.backgroundColor="",Wa=Qa,Wa.style.backgroundColor=p,qa.scrollTop=0,qa.innerText="",m=0,Ua=Sa[Ma],W=null,A(!1))})})(ma,ra)}ta=document.createElement("div");ta.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ta,"draw.io");oa.appendChild(ta)}for(ma in Ba){ta=+za=null;if(null!=Ba[ma].content)ra=document.createElement(Ga?"ul":"div"),ta=la(ma),ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",ra.setAttribute("title",ta),mxUtils.write(ra,ta),oa.appendChild(ra),ta=ra;else{var Ga=Ra[ma];ta=ra=document.createElement(Ga?"ul":"div");za=Ba[ma];var Ia=la(ma,za);if(null!=Ga){za=document.createElement("li");var Pa=document.createElement("div");+Pa.className="geTempTreeCaret";Pa.setAttribute("title",Ia);mxUtils.write(Pa,Ia);ta=Pa;za.appendChild(Pa);Ia=document.createElement("ul");Ia.className="geTempTreeNested";Ia.style.visibility="hidden";for(var La in Ga){var Na=document.createElement("li"),Va=la(La,Ga[La]);Na.setAttribute("title",Va);mxUtils.write(Na,Va);va(ma,Na,La);Ia.appendChild(Na)}za.appendChild(Ia);ra.className="geTempTree";ra.appendChild(za);(function(Ma,Qa){mxEvent.addListener(Qa,"click",function(){Ma.style.visibility="visible";+Ma.classList.toggle("geTempTreeActive");Ma.classList.toggle("geTempTreeNested")&&setTimeout(function(){Ma.style.visibility="hidden"},550);Qa.classList.toggle("geTempTreeCaret-down")})})(Ia,Pa)}else ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",ra.setAttribute("title",Ia),mxUtils.write(ra,Ia);null!=H&&(ra.style.padding=H);oa.appendChild(ra)}va(ma,ta);null==Wa&&ta.click()}A(!1)}+v=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;l=null!=l?l:!1;p=null!=p?p:"light-dark(#ebf2f9, "+Editor.darkColor+")";F=null!=F?F:"2px dashed light-dark(#29b6f2, #00a8ff)";E=null!=E?E:EditorUi.templateFile;var B=document.createElement("div");B.style.userSelect="none";B.style.height="100%";var C=document.createElement("div");C.style.whiteSpace="nowrap";C.style.height="46px";f&&B.appendChild(C);var M=document.createElement("img");M.setAttribute("border","0");M.setAttribute("align","absmiddle");M.style.width="40px";M.style.height="40px";M.style.marginRight="10px";M.style.paddingBottom="4px";M.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?-IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||u||!f||C.appendChild(M);f&&mxUtils.write(C,(u?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");M=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?M=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?M=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?M=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=-b.gitHub?M=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?M=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(M=b.trello.extension);var T=document.createElement("input");T.setAttribute("value",b.defaultFilename+M);T.style.marginLeft="10px";T.style.width=e||u?"144px":"244px";this.init=function(){f&&Editor.selectFilename(T);null!=qa.parentNode&&null!=qa.parentNode.parentNode&&mxEvent.addGestureListeners(qa.parentNode.parentNode,mxUtils.bind(this,function(la){null!=b.sidebar&&-b.sidebar.hideTooltip()}),null,null)};f&&(C.appendChild(T),x?T.style.width=e||u?"350px":"450px":null!=b.editor.diagramFileTypes&&(x=FilenameDialog.createFileTypes(b,T,b.editor.diagramFileTypes),x.style.marginLeft="6px",x.style.width=e||u?"80px":"180px",C.appendChild(x)));x=!1;var m=0,z=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),I=mxUtils.button(v||mxResources.get("create"),function(){I.setAttribute("disabled",-"disabled");G();I.removeAttribute("disabled")});I.className="geBtn gePrimaryBtn";var L=document.createElement("img");L.setAttribute("src",Editor.magnifyImage);L.setAttribute("title",mxResources.get("preview"));L.className="geAdaptiveAsset geActiveButton";L.style.position="absolute";L.style.borderRadius="16px";L.style.background="white";L.style.cursor="default";L.style.padding="2px";L.style.opacity="0.8";L.style.height="16px";L.style.right="2px";L.style.top="2px";var N=!1,O=null,S=!1;if(K||d){var U=-[],W=null,X=null,Z=null,Y=function(la){I.setAttribute("disabled","disabled");for(var va=0;va<U.length;va++)U[va].className=va==la?"geBtn gePrimaryBtn":"geBtn"};x=!0;v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.height="30px";B.appendChild(v);u=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ma.style.display="";ua.style.display="";qa.style.left="160px";Y(0);qa.scrollTop=0;qa.innerText="";m=0;W!=Ua&&(Ua=W,Ja=X,ab=Z,ma.innerText="",y(),W=null)});U.push(u);-v.appendChild(u);var ba=function(la){ma.style.display="none";ua.style.display="none";qa.style.left="30px";Y(la?-1:1);null==W&&(W=Ua);qa.scrollTop=0;qa.innerText="";z.spin(qa);var va=function(ta,na,ra){m=0;z.stop();Ua=ta;ra=ra||{};var za=0,Ga;for(Ga in ra)za+=ra[Ga].length;if(na)qa.innerText=na;else if(0==ta.length&&0==za)qa.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(qa.innerText="",0<za){ma.style.display="";qa.style.left="160px";ma.innerText="";ab=0;Ja={"draw.io":ta};-for(Ga in ra)Ja[Ga]=ra[Ga];y()}else A(!0)};la?d(ea.value,va):K(va)};K&&(u=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ba()}),v.appendChild(u),U.push(u));if(d){u=document.createElement("span");u.style.marginLeft="10px";u.innerText=mxResources.get("search")+":";v.appendChild(u);var ea=document.createElement("input");ea.style.marginRight="10px";ea.style.marginLeft="10px";ea.style.width="220px";mxEvent.addListener(ea,"keypress",function(la){13==la.keyCode&&ba(!0)});v.appendChild(ea);-u=mxUtils.button(mxResources.get("search"),function(){ba(!0)});u.className="geBtn";v.appendChild(u)}Y(0)}var ca=null,fa=null,aa=null,da=null,ia=null,pa=null,oa=null,ha=null,xa=null,qa=document.createElement("div");qa.style.border="1px solid #d3d3d3";qa.style.position="absolute";qa.style.left="160px";qa.style.right="34px";v=(f?72:40)+(x?30:0);qa.style.top=v+"px";qa.style.bottom="68px";qa.style.margin="6px 0 0 -1px";qa.style.padding="6px";qa.style.overflow="auto";var ua=document.createElement("div");-ua.style.cssText="position:absolute;left:30px;width:128px;top:"+v+"px;height:22px;margin-top: 6px;white-space: nowrap;";var ya=document.createElement("input");ya.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";ya.setAttribute("placeholder",mxResources.get("search"));ya.setAttribute("type","text");ua.appendChild(ya);var ja=document.createElement("img");ja.setAttribute("src",Editor.magnifyImage);ja.setAttribute("title",mxResources.get("search"));+IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||v||!f||C.appendChild(M);f&&mxUtils.write(C,(v?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");M=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?M=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?M=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?M=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=+b.gitHub?M=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?M=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(M=b.trello.extension);var T=document.createElement("input");T.setAttribute("value",b.defaultFilename+M);T.style.marginLeft="10px";T.style.width=e||v?"144px":"244px";this.init=function(){f&&Editor.selectFilename(T);null!=qa.parentNode&&null!=qa.parentNode.parentNode&&mxEvent.addGestureListeners(qa.parentNode.parentNode,mxUtils.bind(this,function(la){null!=b.sidebar&&+b.sidebar.hideTooltip()}),null,null)};f&&(C.appendChild(T),x?T.style.width=e||v?"350px":"450px":null!=b.editor.diagramFileTypes&&(x=FilenameDialog.createFileTypes(b,T,b.editor.diagramFileTypes),x.style.marginLeft="6px",x.style.width=e||v?"80px":"180px",C.appendChild(x)));x=!1;var m=0,z=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),I=mxUtils.button(u||mxResources.get("create"),function(){I.setAttribute("disabled",+"disabled");G();I.removeAttribute("disabled")});I.className="geBtn gePrimaryBtn";var L=document.createElement("img");L.setAttribute("src",Editor.magnifyImage);L.setAttribute("title",mxResources.get("preview"));L.className="geAdaptiveAsset geActiveButton";L.style.position="absolute";L.style.borderRadius="16px";L.style.background="white";L.style.cursor="default";L.style.padding="2px";L.style.opacity="0.8";L.style.height="16px";L.style.right="2px";L.style.top="2px";var N=!1,Q=null,R=!1;if(K||d){var V=+[],W=null,X=null,Z=null,Y=function(la){I.setAttribute("disabled","disabled");for(var va=0;va<V.length;va++)V[va].className=va==la?"geBtn gePrimaryBtn":"geBtn"};x=!0;u=document.createElement("div");u.style.whiteSpace="nowrap";u.style.height="30px";B.appendChild(u);v=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){oa.style.display="";ua.style.display="";qa.style.left="160px";Y(0);qa.scrollTop=0;qa.innerText="";m=0;W!=Ua&&(Ua=W,Ba=X,ab=Z,oa.innerText="",y(),W=null)});V.push(v);+u.appendChild(v);var ba=function(la){oa.style.display="none";ua.style.display="none";qa.style.left="30px";Y(la?-1:1);null==W&&(W=Ua);qa.scrollTop=0;qa.innerText="";z.spin(qa);var va=function(ta,ma,ra){m=0;z.stop();Ua=ta;ra=ra||{};var za=0,Ga;for(Ga in ra)za+=ra[Ga].length;if(ma)qa.innerText=ma;else if(0==ta.length&&0==za)qa.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(qa.innerText="",0<za){oa.style.display="";qa.style.left="160px";oa.innerText="";ab=0;Ba={"draw.io":ta};+for(Ga in ra)Ba[Ga]=ra[Ga];y()}else A(!0)};la?d(da.value,va):K(va)};K&&(v=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ba()}),u.appendChild(v),V.push(v));if(d){v=document.createElement("span");v.style.marginLeft="10px";v.innerText=mxResources.get("search")+":";u.appendChild(v);var da=document.createElement("input");da.style.marginRight="10px";da.style.marginLeft="10px";da.style.width="220px";mxEvent.addListener(da,"keypress",function(la){13==la.keyCode&&ba(!0)});u.appendChild(da);+v=mxUtils.button(mxResources.get("search"),function(){ba(!0)});v.className="geBtn";u.appendChild(v)}Y(0)}var ca=null,ea=null,aa=null,fa=null,ia=null,na=null,pa=null,ha=null,wa=null,qa=document.createElement("div");qa.style.border="1px solid #d3d3d3";qa.style.position="absolute";qa.style.left="160px";qa.style.right="34px";u=(f?72:40)+(x?30:0);qa.style.top=u+"px";qa.style.bottom="68px";qa.style.margin="6px 0 0 -1px";qa.style.padding="6px";qa.style.overflow="auto";var ua=document.createElement("div");+ua.style.cssText="position:absolute;left:30px;width:128px;top:"+u+"px;height:22px;margin-top: 6px;white-space: nowrap;";var ya=document.createElement("input");ya.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";ya.setAttribute("placeholder",mxResources.get("search"));ya.setAttribute("type","text");ua.appendChild(ya);var ja=document.createElement("img");ja.setAttribute("src",Editor.magnifyImage);ja.setAttribute("title",mxResources.get("search"));ja.className="geAdaptiveAsset";ja.style.position="relative";ja.style.cursor="pointer";ja.style.opacity="0.5";ja.style.height="16px";ja.style.left="-20px";ja.style.top="4px";ja.style.background="url('"+b.editor.transparentImage+"')";ua.appendChild(ja);mxEvent.addListener(ja,"click",function(){ja.getAttribute("src")!=Editor.magnifyImage&&(ja.setAttribute("src",Editor.magnifyImage),ja.setAttribute("title",mxResources.get("search")),ya.value="",null!=Xa&&(Xa.click(),Xa=null));ya.focus()});mxEvent.addListener(ya,-"keydown",mxUtils.bind(this,function(la){if(13==la.keyCode){var va=ya.value;if(""==va)null!=Xa&&(Xa.click(),Xa=null);else{if(null==NewDialog.tagsList[E]){var ta={};for(Na in Ja)if(null==Ja[Na].content)for(var na=Ja[Na],ra=0;ra<na.length;ra++){var za=na[ra];if(null!=za.tags)for(var Ga=za.tags.toLowerCase().split(";"),Ia=0;Ia<Ga.length;Ia++)null==ta[Ga[Ia]]&&(ta[Ga[Ia]]=[]),ta[Ga[Ia]].push(za)}NewDialog.tagsList[E]=ta}var Pa=va.toLowerCase().split(" ");ta=NewDialog.tagsList[E];if(0<ab&&null==ta.__tagsList__){for(Na in Sa)for(na=-Sa[Na],ra=0;ra<na.length;ra++)for(za=na[ra],Ga=za.title.split(" "),Ga.push(Na),Ia=0;Ia<Ga.length;Ia++){var La=Ga[Ia].toLowerCase();null==ta[La]&&(ta[La]=[]);ta[La].push(za)}ta.__tagsList__=!0}var Na=[];na={};for(ra=Ga=0;ra<Pa.length;ra++)if(0<Pa[ra].length){La=ta[Pa[ra]];var Va={};Na=[];if(null!=La)for(Ia=0;Ia<La.length;Ia++)za=La[Ia],0==Ga==(null==na[za.url])&&(Va[za.url]=!0,Na.push(za));na=Va;Ga++}qa.scrollTop=0;qa.innerText="";m=0;ta=document.createElement("div");ta.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";-mxUtils.write(ta,mxResources.get(0==Na.length?"noResultsFor":"resultsFor",[va]));qa.appendChild(ta);null!=Wa&&null==Xa&&(Wa.style.backgroundColor="",Xa=Wa,Wa=ta);Ua=Na;W=null;A(!1)}mxEvent.consume(la)}}));mxEvent.addListener(ya,"keyup",mxUtils.bind(this,function(la){""==ya.value?(ja.setAttribute("src",Editor.magnifyImage),ja.setAttribute("title",mxResources.get("search"))):(ja.setAttribute("src",Editor.crossImage),ja.setAttribute("title",mxResources.get("reset")))}));v+=23;var ma=document.createElement("div");-ma.style.cssText="position:absolute;left:30px;width:128px;top:"+v+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(qa,"scroll",function(){b.sidebar.hideTooltip()});var ka=140,Ba=ka,sa=null,Ea="url("+Editor.sparklesImage+")",wa=document.createElement("textarea");wa.setAttribute("placeholder",mxResources.get("describeYourDiagram"));wa.style.position="absolute";wa.style.fontFamily="sans-serif";wa.style.outline="none";wa.style.left="0px";wa.style.right="0px";-wa.style.top="0px";wa.style.bottom="38px";wa.style.resize="none";wa.style.boxSizing="border-box";wa.style.fontSize="12px";wa.style.border="none";wa.style.margin="8px";var Ca=document.createElement("button");Ca.className="geBtn gePrimaryBtn";Ca.style.position="absolute";Ca.style.bottom="0px";Ca.style.height="30px";Ca.style.right="0px";Ca.style.left="0px";Ca.style.margin="8px";Ca.style.fontSize="14px";Ca.style.borderRadius="4px";Ca.setAttribute("disabled","disabled");Ca.setAttribute("title",mxResources.get("ok"));-mxUtils.write(Ca,mxResources.get("ok"));var Da=L.cloneNode(!0),Ka=!1;mxEvent.addGestureListeners(Da,function(la){Ka=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(la){if(!Ka&&null!=ha){var va="<mxfile><diagram>"+Graph.compress(ha)+"</diagram></mxfile>";J(va,mxEvent.getClientX(la),mxEvent.getClientY(la),sa,xa)}});var Aa=L.cloneNode(!0);Aa.setAttribute("src",Editor.editImage);Aa.setAttribute("title",mxResources.get("edit"));Aa.style.right="";Aa.style.left="2px";var Fa=-L.cloneNode(!0);Fa.setAttribute("src",Editor.helpImage);Fa.setAttribute("title",mxResources.get("help"));Fa.style.opacity="1";Fa.style.right="-8px";Fa.style.top="-8px";mxEvent.addListener(Fa,"click",function(la){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(la)});wa.style.visibility="hidden";Ca.style.visibility="hidden";Aa.style.visibility="hidden";Fa.style.visibility="hidden";Da.style.visibility="hidden";mxEvent.addListener(Aa,"click",V);mxEvent.addListener(wa,-"input",function(){""!=wa.value?Ca.removeAttribute("disabled"):Ca.setAttribute("disabled","disabled")});mxEvent.addListener(Ca,"click",function(){P()});mxEvent.addListener(wa,"keydown",function(la){13!=la.keyCode||mxEvent.isShiftDown(la)?27==la.keyCode&&(P(!0),mxEvent.consume(la)):(P(),mxEvent.consume(la))});var Ja={},Ra={},Sa={},ab=0,db=!0,Wa=null,Xa=null;Ja.basic=[{title:"blankDiagram"}];var Ua=Ja.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==-typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ja.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(Ja.smartTemplate={content:D()});if(!e){var eb=function(){mxUtils.get($a,function(la){if(!jb){jb=!0;la=la.getXml().documentElement.firstChild;for(var va={};null!=la;){if("undefined"!==typeof la.getAttribute)if("parsererror"==la.nodeName)null!=window.console&&-console.log("Parser error in "+E+": "+la.textContent);else if("clibs"==la.nodeName){for(var ta=la.getAttribute("name"),na=la.getElementsByTagName("add"),ra=[],za=0;za<na.length;za++)ra.push(encodeURIComponent(mxUtils.getTextContent(na[za])));null!=ta&&0<ra.length&&(va[ta]=ra.join(";"))}else if(ra=la.getAttribute("url"),null!=ra){na=la.getAttribute("section");ta=la.getAttribute("subsection");if(null==na&&(za=ra.indexOf("/"),na=ra.substring(0,za),null==ta)){var Ga=ra.indexOf("/",za+1);-1<Ga&&(ta=ra.substring(za+-1,Ga))}za=Ja[na];null==za&&(za=[],Ja[na]=za);ra=la.getAttribute("clibs");null!=va[ra]&&(ra=va[ra]);ra={url:la.getAttribute("url"),libs:la.getAttribute("libs"),title:la.getAttribute("title"),tooltip:la.getAttribute("name")||la.getAttribute("url"),preview:la.getAttribute("preview"),clibs:ra,tags:la.getAttribute("tags")};za.push(ra);null!=ta&&(za=Ra[na],null==za&&(za={},Ra[na]=za),na=za[ta],null==na&&(na=[],za[ta]=na),na.push(ra))}la=la.nextSibling}z.stop();y()}})};B.appendChild(ua);B.appendChild(ma);-B.appendChild(qa);var jb=!1,$a=E;/^https?:\/\//.test($a)&&!b.editor.isCorsEnabledForUrl($a)&&($a=PROXY_URL+"?url="+encodeURIComponent($a));z.spin(qa);null!=t?t(function(la,va){Sa=la;Z=ab=va;eb()},eb):eb();X=Ja}mxEvent.addListener(T,"keypress",function(la){b.dialog.container.firstChild==B&&13==la.keyCode&&G()});t=document.createElement("div");t.style.marginTop=e?"4px":"16px";t.style.textAlign="right";t.style.position="absolute";t.style.left="40px";t.style.bottom="24px";t.style.right="40px";v=mxUtils.button(mxResources.get("cancel"),-function(){null!=n&&n();b.hideDialog(!0)});v.className="geBtn";!b.editor.cancelFirst||l&&null==n||t.appendChild(v);e||"1"==urlParams.embed||l||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var la=new FilenameDialog(b,"",mxResources.get("create"),function(va){null!=va&&0<va.length&&b.editor.loadUrl(b.editor.getProxiedUrl(va),function(ta){aa=ta;ca=null;templateRealURl=va;b.hideDialog();G()},function(ta){b.handleError(ta)})},+"keydown",mxUtils.bind(this,function(la){if(13==la.keyCode){var va=ya.value;if(""==va)null!=Xa&&(Xa.click(),Xa=null);else{if(null==NewDialog.tagsList[E]){var ta={};for(Na in Ba)if(null==Ba[Na].content)for(var ma=Ba[Na],ra=0;ra<ma.length;ra++){var za=ma[ra];if(null!=za.tags)for(var Ga=za.tags.toLowerCase().split(";"),Ia=0;Ia<Ga.length;Ia++)null==ta[Ga[Ia]]&&(ta[Ga[Ia]]=[]),ta[Ga[Ia]].push(za)}NewDialog.tagsList[E]=ta}var Pa=va.toLowerCase().split(" ");ta=NewDialog.tagsList[E];if(0<ab&&null==ta.__tagsList__){for(Na in Sa)for(ma=+Sa[Na],ra=0;ra<ma.length;ra++)for(za=ma[ra],Ga=za.title.split(" "),Ga.push(Na),Ia=0;Ia<Ga.length;Ia++){var La=Ga[Ia].toLowerCase();null==ta[La]&&(ta[La]=[]);ta[La].push(za)}ta.__tagsList__=!0}var Na=[];ma={};for(ra=Ga=0;ra<Pa.length;ra++)if(0<Pa[ra].length){La=ta[Pa[ra]];var Va={};Na=[];if(null!=La)for(Ia=0;Ia<La.length;Ia++)za=La[Ia],0==Ga==(null==ma[za.url])&&(Va[za.url]=!0,Na.push(za));ma=Va;Ga++}qa.scrollTop=0;qa.innerText="";m=0;ta=document.createElement("div");ta.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";+mxUtils.write(ta,mxResources.get(0==Na.length?"noResultsFor":"resultsFor",[va]));qa.appendChild(ta);null!=Wa&&null==Xa&&(Wa.style.backgroundColor="",Xa=Wa,Wa=ta);Ua=Na;W=null;A(!1)}mxEvent.consume(la)}}));mxEvent.addListener(ya,"keyup",mxUtils.bind(this,function(la){""==ya.value?(ja.setAttribute("src",Editor.magnifyImage),ja.setAttribute("title",mxResources.get("search"))):(ja.setAttribute("src",Editor.crossImage),ja.setAttribute("title",mxResources.get("reset")))}));u+=23;var oa=document.createElement("div");+oa.style.cssText="position:absolute;left:30px;width:128px;top:"+u+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(qa,"scroll",function(){b.sidebar.hideTooltip()});var ka=140,Ca=ka,sa=null,Fa="url("+Editor.sparklesImage+")",xa=document.createElement("textarea");xa.setAttribute("placeholder",mxResources.get("describeYourDiagram"));xa.style.position="absolute";xa.style.fontFamily="sans-serif";xa.style.outline="none";xa.style.left="0px";xa.style.right="0px";+xa.style.top="0px";xa.style.bottom="38px";xa.style.resize="none";xa.style.boxSizing="border-box";xa.style.fontSize="12px";xa.style.border="none";xa.style.margin="8px";var Aa=document.createElement("button");Aa.className="geBtn gePrimaryBtn";Aa.style.position="absolute";Aa.style.bottom="0px";Aa.style.height="30px";Aa.style.right="0px";Aa.style.left="0px";Aa.style.margin="8px";Aa.style.fontSize="14px";Aa.style.borderRadius="4px";Aa.setAttribute("disabled","disabled");Aa.setAttribute("title",mxResources.get("ok"));+mxUtils.write(Aa,mxResources.get("ok"));var Da=L.cloneNode(!0),Ka=!1;mxEvent.addGestureListeners(Da,function(la){Ka=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(la){if(!Ka&&null!=ha){var va="<mxfile><diagram>"+Graph.compress(ha)+"</diagram></mxfile>";J(va,mxEvent.getClientX(la),mxEvent.getClientY(la),sa,wa)}});var Ja=L.cloneNode(!0);Ja.setAttribute("src",Editor.editImage);Ja.setAttribute("title",mxResources.get("edit"));Ja.style.right="";Ja.style.left="2px";var Ea=+L.cloneNode(!0);Ea.setAttribute("src",Editor.helpImage);Ea.setAttribute("title",mxResources.get("help"));Ea.style.opacity="1";Ea.style.right="-8px";Ea.style.top="-8px";mxEvent.addListener(Ea,"click",function(la){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(la)});xa.style.visibility="hidden";Aa.style.visibility="hidden";Ja.style.visibility="hidden";Ea.style.visibility="hidden";Da.style.visibility="hidden";mxEvent.addListener(Ja,"click",U);mxEvent.addListener(xa,+"input",function(){""!=xa.value?Aa.removeAttribute("disabled"):Aa.setAttribute("disabled","disabled")});mxEvent.addListener(Aa,"click",function(){O()});mxEvent.addListener(xa,"keydown",function(la){13!=la.keyCode||mxEvent.isShiftDown(la)?27==la.keyCode&&(O(!0),mxEvent.consume(la)):(O(),mxEvent.consume(la))});var Ba={},Ra={},Sa={},ab=0,db=!0,Wa=null,Xa=null;Ba.basic=[{title:"blankDiagram"}];var Ua=Ba.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==+typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ba.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(Ba.smartTemplate={content:D()});if(!e){var eb=function(){mxUtils.get($a,function(la){if(!jb){jb=!0;la=la.getXml().documentElement.firstChild;for(var va={};null!=la;){if("undefined"!==typeof la.getAttribute)if("parsererror"==la.nodeName)null!=window.console&&+console.log("Parser error in "+E+": "+la.textContent);else if("clibs"==la.nodeName){for(var ta=la.getAttribute("name"),ma=la.getElementsByTagName("add"),ra=[],za=0;za<ma.length;za++)ra.push(encodeURIComponent(mxUtils.getTextContent(ma[za])));null!=ta&&0<ra.length&&(va[ta]=ra.join(";"))}else if(ra=la.getAttribute("url"),null!=ra){ma=la.getAttribute("section");ta=la.getAttribute("subsection");if(null==ma&&(za=ra.indexOf("/"),ma=ra.substring(0,za),null==ta)){var Ga=ra.indexOf("/",za+1);-1<Ga&&(ta=ra.substring(za++1,Ga))}za=Ba[ma];null==za&&(za=[],Ba[ma]=za);ra=la.getAttribute("clibs");null!=va[ra]&&(ra=va[ra]);ra={url:la.getAttribute("url"),libs:la.getAttribute("libs"),title:la.getAttribute("title"),tooltip:la.getAttribute("name")||la.getAttribute("url"),preview:la.getAttribute("preview"),clibs:ra,tags:la.getAttribute("tags")};za.push(ra);null!=ta&&(za=Ra[ma],null==za&&(za={},Ra[ma]=za),ma=za[ta],null==ma&&(ma=[],za[ta]=ma),ma.push(ra))}la=la.nextSibling}z.stop();y()}})};B.appendChild(ua);B.appendChild(oa);+B.appendChild(qa);var jb=!1,$a=E;/^https?:\/\//.test($a)&&!b.editor.isCorsEnabledForUrl($a)&&($a=PROXY_URL+"?url="+encodeURIComponent($a));z.spin(qa);null!=t?t(function(la,va){Sa=la;Z=ab=va;eb()},eb):eb();X=Ba}mxEvent.addListener(T,"keypress",function(la){b.dialog.container.firstChild==B&&13==la.keyCode&&G()});t=document.createElement("div");t.style.marginTop=e?"4px":"16px";t.style.textAlign="right";t.style.position="absolute";t.style.left="40px";t.style.bottom="24px";t.style.right="40px";u=mxUtils.button(mxResources.get("cancel"),+function(){null!=n&&n();b.hideDialog(!0)});u.className="geBtn";!b.editor.cancelFirst||l&&null==n||t.appendChild(u);e||"1"==urlParams.embed||l||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var la=new FilenameDialog(b,"",mxResources.get("create"),function(va){null!=va&&0<va.length&&b.editor.loadUrl(b.editor.getProxiedUrl(va),function(ta){aa=ta;ca=null;templateRealURl=va;b.hideDialog();G()},function(ta){b.handleError(ta)})},mxResources.get("url"),null,null,null,!1);b.showDialog(la.container,300,80,!0,!0);la.init()}),e.className="geBtn",t.appendChild(e));Graph.fileSupport&&k&&(k=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var la=document.createElement("input");la.setAttribute("multiple","multiple");la.setAttribute("type","file");mxEvent.addListener(la,"change",function(va){b.openFiles(la.files,!0);la.value=""});la.style.display="none";document.body.appendChild(la);b.newDlgFileInputElt=-la}b.newDlgFileInputElt.click()}),k.className="geBtn",t.appendChild(k));t.appendChild(I);b.editor.cancelFirst||null!=c||l&&null==n||t.appendChild(v);B.appendChild(t);this.container=B};NewDialog.tagsList={};-var SaveDialog=function(b,e,f,c,l,n,p,u){function F(B,C,M,T,m,z){var I=null;if(null==c||0>mxUtils.indexOf(c,B))if(m=null!=m?m:b.getTitleForService(B),0<=mxUtils.indexOf(V,B)||null!=b.getServiceForName(B)){I=document.createElement("option");if("pick"==z)I.innerHTML=mxUtils.htmlEntities(m)+" – "+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"...",I.setAttribute("value","pickFolder-"+B),I.setAttribute("title",m+" - "+mxResources.get("pickFolder")+"...");else{var L=B+-(null!=M?"-"+M:""),N=q[L];null!=N&&null!=N.option&&N.option.parentNode.removeChild(N.option);N=null;if(null!=C){"/"==C.charAt(C.length-1)&&(C=C.substring(0,C.length-1));"/"==C.charAt(0)&&(C=C.substring(1));N=C;if(B!=App.MODE_GITHUB&&B==App.MODE_GITLAB){var O=N.lastIndexOf("/");0<=O&&(N=N.substring(O+1))}40<N.length&&(N=N.substring(0,20)+"..."+N.substring(N.length-20))}I.innerHTML=mxUtils.htmlEntities(m)+(null!=N?" – "+mxUtils.htmlEntities(N):"");I.setAttribute("title",m+-(null!=C?" ("+C+")":"")+(null!=M&&decodeURIComponent(M)!=C?" ["+M+"]":""));I.setAttribute("value",L);q[L]={option:I,mode:B,path:C,id:M};SaveDialog.lastValue==L&&null==u?T=!0:null==T&&("root"==z?T=null==u&&b.mode==B||null!=B&&B==u:"pickFolder-"==G.value.substring(0,11)&&(T=!0));T&&I.setAttribute("selected","selected")}G.appendChild(I)}return I}function H(B){b.pickFolder(B,function(C){var M=null;B==App.MODE_GOOGLE&&null!=C.docs&&0<C.docs.length?M={mode:B,path:C.docs[0].name,id:C.docs[0].id}:B==App.MODE_ONEDRIVE&&-null!=C.value&&0<C.value.length?M={mode:B,path:C.value[0].name,id:OneDriveFile.prototype.getIdOf(C.value[0])}:(B==App.MODE_GITHUB||B==App.MODE_GITLAB)&&null!=C&&0<C.length&&(M={mode:B,path:decodeURIComponent(C),id:C});null!=M&&(R.style.display="",b.addRecent(M,"Folders",5),C=F(M.mode,M.path,M.id,!0),G.innerHTML="",q={},E(),M=G.selectedIndex,G.value=C.value,0>G.selectedIndex&&(G.selectedIndex=M))},!0,!0,!0,!0)}function E(){var B=b.getRecent("Folders"),C=0;if(null!=B&&0<B.length){for(var M=0;M<B.length;M++)null!=-F(B[M].mode,B[M].path,B[M].id)&&C++;0<C&&G.appendChild(Q.cloneNode(!0))}F(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");F(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(F(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),F(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&F(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);F(App.MODE_GITHUB,null,null,null,null,"pick");F(App.MODE_GITLAB,null,-null,null,null,"pick");F(App.MODE_TRELLO);B=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&B&&F(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=c&&0<=mxUtils.indexOf(c,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&F(App.MODE_BROWSER);B&&F("download");Editor.popupsAllowed&&F("_blank",null,null,null,mxResources.get("openInNewWindow"));0<C&&(G.appendChild(Q.cloneNode(!0)),C=G.value,G.appendChild(R),-G.value=C);if("pickFolder-"==G.value.substring(0,11)||"reset"==G.value)C=document.createElement("option"),C.setAttribute("value",""),C.setAttribute("selected","selected"),mxUtils.write(C,mxResources.get("pickFolder")+"..."),G.insertBefore(C,G.firstChild);P=G.value}function K(){if("reset"==G.value)b.resetRecent("Folders"),G.innerHTML="",G.value="",pickFolderOption=null,q={},E();else if("pickFolder-"==G.value.substring(0,11)){var B=G.value.substring(11);G.value=P;H(B)}else if(null!=D&&null!=q[G.value]&&+la}b.newDlgFileInputElt.click()}),k.className="geBtn",t.appendChild(k));t.appendChild(I);b.editor.cancelFirst||null!=c||l&&null==n||t.appendChild(u);B.appendChild(t);this.container=B};NewDialog.tagsList={};+var SaveDialog=function(b,e,f,c,l,n,p,v){function F(B,C,M,T,m,z){var I=null;if(null==c||0>mxUtils.indexOf(c,B))if(m=null!=m?m:b.getTitleForService(B),0<=mxUtils.indexOf(U,B)||null!=b.getServiceForName(B)){I=document.createElement("option");if("pick"==z)I.innerHTML=mxUtils.htmlEntities(m)+" – "+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"...",I.setAttribute("value","pickFolder-"+B),I.setAttribute("title",m+" - "+mxResources.get("pickFolder")+"...");else{var L=B++(null!=M?"-"+M:""),N=q[L];null!=N&&null!=N.option&&N.option.parentNode.removeChild(N.option);N=null;if(null!=C){"/"==C.charAt(C.length-1)&&(C=C.substring(0,C.length-1));"/"==C.charAt(0)&&(C=C.substring(1));N=C;if(B!=App.MODE_GITHUB&&B==App.MODE_GITLAB){var Q=N.lastIndexOf("/");0<=Q&&(N=N.substring(Q+1))}40<N.length&&(N=N.substring(0,20)+"..."+N.substring(N.length-20))}I.innerHTML=mxUtils.htmlEntities(m)+(null!=N?" – "+mxUtils.htmlEntities(N):"");I.setAttribute("title",m++(null!=C?" ("+C+")":"")+(null!=M&&decodeURIComponent(M)!=C?" ["+M+"]":""));I.setAttribute("value",L);q[L]={option:I,mode:B,path:C,id:M};SaveDialog.lastValue==L&&null==v?T=!0:null==T&&("root"==z?T=null==v&&b.mode==B||null!=B&&B==v:"pickFolder-"==G.value.substring(0,11)&&(T=!0));T&&I.setAttribute("selected","selected")}G.appendChild(I)}return I}function H(B){b.pickFolder(B,function(C){var M=null;B==App.MODE_GOOGLE&&null!=C.docs&&0<C.docs.length?M={mode:B,path:C.docs[0].name,id:C.docs[0].id}:B==App.MODE_ONEDRIVE&&+null!=C.value&&0<C.value.length?M={mode:B,path:C.value[0].name,id:OneDriveFile.prototype.getIdOf(C.value[0])}:(B==App.MODE_GITHUB||B==App.MODE_GITLAB)&&null!=C&&0<C.length&&(M={mode:B,path:decodeURIComponent(C),id:C});null!=M&&(S.style.display="",b.addRecent(M,"Folders",5),C=F(M.mode,M.path,M.id,!0),G.innerHTML="",q={},E(),M=G.selectedIndex,G.value=C.value,0>G.selectedIndex&&(G.selectedIndex=M))},!0,!0,!0,!0)}function E(){var B=b.getRecent("Folders"),C=0;if(null!=B&&0<B.length){for(var M=0;M<B.length;M++)null!=+F(B[M].mode,B[M].path,B[M].id)&&C++;0<C&&G.appendChild(P.cloneNode(!0))}F(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");F(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(F(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),F(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&F(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);F(App.MODE_GITHUB,null,null,null,null,"pick");F(App.MODE_GITLAB,null,+null,null,null,"pick");F(App.MODE_TRELLO);B=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&B&&F(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=c&&0<=mxUtils.indexOf(c,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&F(App.MODE_BROWSER);B&&F("download");Editor.popupsAllowed&&F("_blank",null,null,null,mxResources.get("openInNewWindow"));0<C&&(G.appendChild(P.cloneNode(!0)),C=G.value,G.appendChild(S),+G.value=C);if("pickFolder-"==G.value.substring(0,11)||"reset"==G.value)C=document.createElement("option"),C.setAttribute("value",""),C.setAttribute("selected","selected"),mxUtils.write(C,mxResources.get("pickFolder")+"..."),G.insertBefore(C,G.firstChild);O=G.value}function K(){if("reset"==G.value)b.resetRecent("Folders"),G.innerHTML="",G.value="",pickFolderOption=null,q={},E();else if("pickFolder-"==G.value.substring(0,11)){var B=G.value.substring(11);G.value=O;H(B)}else if(null!=D&&null!=q[G.value]&&null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[D.value].extension){B=b.getExtensionForService(q[G.value].mode);var C=J.value;null!=B&&0>e.indexOf(".")&&0>C.indexOf(".")&&(J.value=C+B)}y.innerHTML="";mxUtils.write(y,mxResources.get("download"==G.value||"_blank"==G.value?"ok":"save"));""==G.value?y.setAttribute("disabled","disabled"):y.removeAttribute("disabled")}var d=document.createElement("div");d.style.display="flex";d.style.flexWrap="wrap";d.style.whiteSpace="nowrap";var g=-document.createElement("div");g.style.display="grid";g.style.gap="5px 8px";g.style.gridAutoRows="auto auto 44px";g.style.gridAutoColumns="0fr minmax(0,1fr)";g.style.width="100%";var k=null,v=null;if(null!=l&&null!=n&&"image/"==n.substring(0,6)&&("image/svg"!=n.substring(0,9)||mxClient.IS_SVG)){g.style.display="inline-grid";g.style.flexBasis="75%";k=document.createElement("div");k.style.display="inline-block";k.style.height="auto";k.style.maxWidth="25%";k.style.margin="auto";var t=document.createElement("img"),-x=p?l:btoa(unescape(encodeURIComponent(l)));t.setAttribute("src","data:"+n+";base64,"+x);t.style.boxSizing="border-box";t.style.maxHeight="50px";t.style.maxWidth="100%";t.style.paddingLeft="10px";k.appendChild(t);mxClient.IS_FF||"image/png"!=n||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(v=mxUtils.button(mxResources.get("copy"),function(){var B=b.base64ToBlob(x,"image/png");B=new ClipboardItem({"image/png":B,"text/html":new Blob(['<img src="data:'+n+";base64,"+x+'">'],{type:"text/html"})});+document.createElement("div");g.style.display="grid";g.style.gap="5px 8px";g.style.gridAutoRows="auto auto 44px";g.style.gridAutoColumns="0fr minmax(0,1fr)";g.style.width="100%";var k=null,u=null;if(null!=l&&null!=n&&"image/"==n.substring(0,6)&&("image/svg"!=n.substring(0,9)||mxClient.IS_SVG)){g.style.display="inline-grid";g.style.flexBasis="75%";k=document.createElement("div");k.style.display="inline-block";k.style.height="auto";k.style.maxWidth="25%";k.style.margin="auto";var t=document.createElement("img"),+x=p?l:btoa(unescape(encodeURIComponent(l)));t.setAttribute("src","data:"+n+";base64,"+x);t.style.boxSizing="border-box";t.style.maxHeight="50px";t.style.maxWidth="100%";t.style.paddingLeft="10px";k.appendChild(t);mxClient.IS_FF||"image/png"!=n||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(u=mxUtils.button(mxResources.get("copy"),function(){var B=b.base64ToBlob(x,"image/png");B=new ClipboardItem({"image/png":B,"text/html":new Blob(['<img src="data:'+n+";base64,"+x+'">'],{type:"text/html"})});navigator.clipboard.write([B]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(C){b.handleError(C)}))},null,"geBtn"));Editor.popupsAllowed&&(null==c||0>mxUtils.indexOf(c,"_blank"))?(k.setAttribute("title",mxResources.get("openInNewWindow")),k.style.cursor="pointer",mxEvent.addGestureListeners(k,null,null,function(B){mxEvent.isPopupTrigger(B)||b.openInNewWindow(l,n,p)})):k.setAttribute("title",mxResources.get("preview"))}t=document.createElement("div");t.style.display="flex";t.style.padding="1px";t.style.alignItems="center";t.style.justifyContent="flex-end";t.style.gridColumn="1";t.style.whiteSpace="nowrap";var A=document.createElement("div");A.style.display="grid";A.style.padding="1px";A.style.alignItems="center";A.style.gridColumn="2";A.style.gridAutoColumns="minmax(0,1fr) auto";A.style.gap="6px";mxUtils.write(t,mxResources.get("saveAs")+":");var J=document.createElement("input");J.setAttribute("type","text");J.setAttribute("value",e);J.style.boxSizing="border-box";J.style.width="100%";A.appendChild(J);g.appendChild(t);g.appendChild(A);var D=null;null!=b.editor.diagramFileTypes&&null==n&&(t=t.cloneNode(!1),A=A.cloneNode(!1),mxUtils.write(t,mxResources.get("type")+":"),D=FilenameDialog.createFileTypes(b,J,b.editor.diagramFileTypes),D.style.boxSizing="border-box",D.style.width="100%",A.appendChild(D),g.appendChild(t),g.appendChild(A));t=t.cloneNode(!1);A=A.cloneNode(!1);mxUtils.write(t,mxResources.get("where")+":");var G=document.createElement("select");-G.style.textOverflow="ellipsis";G.style.gridColumn="1";var R=document.createElement("option");mxUtils.write(R,mxResources.get("reset"));R.setAttribute("value","reset");var V=["browser","device","download","_blank"],Q=document.createElement("option");Q.setAttribute("disabled","disabled");Q.innerHTML="-----------------";var P=null,q={},y=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=G.value;var B=q[SaveDialog.lastValue];null!=B&&f(J,B.mode,B.id)},null,"geBtn gePrimaryBtn");+G.style.textOverflow="ellipsis";G.style.gridColumn="1";var S=document.createElement("option");mxUtils.write(S,mxResources.get("reset"));S.setAttribute("value","reset");var U=["browser","device","download","_blank"],P=document.createElement("option");P.setAttribute("disabled","disabled");P.innerHTML="-----------------";var O=null,q={},y=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=G.value;var B=q[SaveDialog.lastValue];null!=B&&f(J,B.mode,B.id)},null,"geBtn gePrimaryBtn");mxEvent.addListener(J,"keypress",function(B){13==B.keyCode&&y.click()});mxEvent.addListener(G,"change",K);E();K();A.appendChild(G);null!=SaveDialog.lastValue&&null!=q[SaveDialog.lastValue]&&(G.value=SaveDialog.lastValue);g.appendChild(t);g.appendChild(A);d.appendChild(g);null!=k&&d.appendChild(k);g=document.createElement("div");g.style.flexBasis="100%";g.style.textAlign="right";g.style.marginTop=null!=n?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||g.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));-k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&g.appendChild(k);null!=v&&g.appendChild(v);g.appendChild(y);b.editor.cancelFirst||g.appendChild(k);d.appendChild(g);this.init=function(){Editor.selectFilename(J)};this.container=d},CreateDialog=function(b,e,f,c,l,n,p,u,F,H,E,K,d,g,k,v,t){function x(P,q,y,B){function C(){mxEvent.addListener(M,"click",function(){var L=y;if(p){var N=D.value,O=N.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>O){L=null!=-L?L:Q.value;var S="";L==App.MODE_GOOGLE?S=b.drive.extension:L==App.MODE_GITHUB?S=b.gitHub.extension:L==App.MODE_GITLAB?S=b.gitLab.extension:L==App.MODE_TRELLO?S=b.trello.extension:L==App.MODE_DROPBOX?S=b.dropbox.extension:L==App.MODE_ONEDRIVE?S=b.oneDrive.extension:L==App.MODE_DEVICE&&(S=".drawio");0<=O&&(N=N.substring(0,O));D.value=N+S}}A(y)})}var M=document.createElement("a");M.style.overflow="hidden";var T=document.createElement("img");T.src=P;T.setAttribute("border","0");T.setAttribute("align",+k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&g.appendChild(k);null!=u&&g.appendChild(u);g.appendChild(y);b.editor.cancelFirst||g.appendChild(k);d.appendChild(g);this.init=function(){Editor.selectFilename(J)};this.container=d},CreateDialog=function(b,e,f,c,l,n,p,v,F,H,E,K,d,g,k,u,t){function x(O,q,y,B){function C(){mxEvent.addListener(M,"click",function(){var L=y;if(p){var N=D.value,Q=N.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>Q){L=null!=+L?L:P.value;var R="";L==App.MODE_GOOGLE?R=b.drive.extension:L==App.MODE_GITHUB?R=b.gitHub.extension:L==App.MODE_GITLAB?R=b.gitLab.extension:L==App.MODE_TRELLO?R=b.trello.extension:L==App.MODE_DROPBOX?R=b.dropbox.extension:L==App.MODE_ONEDRIVE?R=b.oneDrive.extension:L==App.MODE_DEVICE&&(R=".drawio");0<=Q&&(N=N.substring(0,Q));D.value=N+R}}A(y)})}var M=document.createElement("a");M.style.overflow="hidden";var T=document.createElement("img");T.src=O;T.setAttribute("border","0");T.setAttribute("align","absmiddle");T.style.width="60px";T.style.height="60px";T.style.paddingBottom="6px";M.style.display="inline-block";M.className="geBaseButton";M.style.position="relative";M.style.margin="4px";M.style.padding="8px 8px 10px 8px";M.style.whiteSpace="nowrap";M.appendChild(T);M.style.color="gray";M.style.fontSize="11px";var m=document.createElement("div");M.appendChild(m);mxUtils.write(m,q);if(null!=B&&null==b[B]){T.style.visibility="hidden";mxUtils.setOpacity(m,10);var z=new Spinner({lines:12,length:12,-width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});z.spin(M);var I=window.setTimeout(function(){null==b[B]&&(z.stop(),M.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[B]&&(window.clearTimeout(I),mxUtils.setOpacity(m,100),T.style.visibility="",z.stop(),C())}))}else C();R.appendChild(M);++V==K&&(mxUtils.br(R),V=0)}function A(P){var q=D.value;if(null==P||null!=q&&0<q.length)t&&b.hideDialog(),-f(q,P,D)}E="1"==urlParams.noDevice?!1:E;p=null!=p?p:!0;u=null!=u?u:!0;K=null!=K?K:4;t=null!=t?t:!0;n=document.createElement("div");n.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(n);var J=document.createElement("h2");mxUtils.write(J,l||mxResources.get("create"));J.style.marginTop="0px";J.style.marginBottom="24px";n.appendChild(J);l=document.createElement("span");mxUtils.write(l,mxResources.get("filename")+":");l.style.maxWidth="106px";l.style.overflow="hidden";l.style.textOverflow="ellipsis";-l.style.display="inline-block";n.appendChild(l);var D=document.createElement("input");D.setAttribute("value",e);D.style.width="180px";D.style.marginLeft="10px";D.style.marginBottom="20px";D.style.maxWidth="70%";this.init=function(){Editor.selectFilename(D)};n.appendChild(D);null!=v&&null!=b.editor.diagramFileTypes&&(v=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),v.style.marginLeft="6px",v.style.width="90px",n.appendChild(v));v=null;if("1"!=urlParams.noDevice&&null!=d&&null!=g&&"image/"==+width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});z.spin(M);var I=window.setTimeout(function(){null==b[B]&&(z.stop(),M.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[B]&&(window.clearTimeout(I),mxUtils.setOpacity(m,100),T.style.visibility="",z.stop(),C())}))}else C();S.appendChild(M);++U==K&&(mxUtils.br(S),U=0)}function A(O){var q=D.value;if(null==O||null!=q&&0<q.length)t&&b.hideDialog(),+f(q,O,D)}E="1"==urlParams.noDevice?!1:E;p=null!=p?p:!0;v=null!=v?v:!0;K=null!=K?K:4;t=null!=t?t:!0;n=document.createElement("div");n.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(n);var J=document.createElement("h2");mxUtils.write(J,l||mxResources.get("create"));J.style.marginTop="0px";J.style.marginBottom="24px";n.appendChild(J);l=document.createElement("span");mxUtils.write(l,mxResources.get("filename")+":");l.style.maxWidth="106px";l.style.overflow="hidden";l.style.textOverflow="ellipsis";+l.style.display="inline-block";n.appendChild(l);var D=document.createElement("input");D.setAttribute("value",e);D.style.width="180px";D.style.marginLeft="10px";D.style.marginBottom="20px";D.style.maxWidth="70%";this.init=function(){Editor.selectFilename(D)};n.appendChild(D);null!=u&&null!=b.editor.diagramFileTypes&&(u=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),u.style.marginLeft="6px",u.style.width="90px",n.appendChild(u));u=null;if("1"!=urlParams.noDevice&&null!=d&&null!=g&&"image/"==g.substring(0,6)&&("image/svg"!=g.substring(0,9)||mxClient.IS_SVG)){D.style.width="160px";l=document.createElement("img");var G=k?d:btoa(unescape(encodeURIComponent(d)));l.setAttribute("src","data:"+g+";base64,"+G);l.style.position="absolute";l.style.top="70px";l.style.right="100px";l.style.maxWidth="120px";l.style.maxHeight="80px";mxUtils.setPrefixedStyle(l.style,"transform","translate(50%,-50%)");n.appendChild(l);mxClient.IS_FF||"image/png"!=g||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||-(v=mxUtils.button(mxResources.get("copy"),function(P){P=b.base64ToBlob(G,"image/png");P=new ClipboardItem({"image/png":P,"text/html":new Blob(['<img src="data:'+g+";base64,"+G+'">'],{type:"text/html"})});navigator.clipboard.write([P]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(q){b.handleError(q)}))}),v.style.marginTop="6px",v.className="geBtn");F&&Editor.popupsAllowed&&(l.style.cursor="pointer",mxEvent.addGestureListeners(l,-null,null,function(P){mxEvent.isPopupTrigger(P)||A("_blank")}))}mxUtils.br(n);var R=document.createElement("div");R.style.textAlign="center";var V=0;R.style.marginTop="6px";n.appendChild(R);var Q=document.createElement("select");Q.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(d,mxResources.get("googleDrive")),Q.appendChild(d),x(IMAGE_PATH+"/google-drive-logo.svg",-mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(d,mxResources.get("oneDrive")),Q.appendChild(d),b.mode==App.MODE_ONEDRIVE&&d.setAttribute("selected","selected"),x(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_DROPBOX),-mxUtils.write(d,mxResources.get("dropbox")),Q.appendChild(d),b.mode==App.MODE_DROPBOX&&d.setAttribute("selected","selected"),x(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_GITHUB),mxUtils.write(d,mxResources.get("github")),Q.appendChild(d),x(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(d=document.createElement("option"),-d.setAttribute("value",App.MODE_GITLAB),mxUtils.write(d,mxResources.get("gitlab")),Q.appendChild(d),x(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_TRELLO),mxUtils.write(d,mxResources.get("trello")),Q.appendChild(d),x(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||-null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)d=document.createElement("option"),d.setAttribute("value",App.MODE_DEVICE),mxUtils.write(d,mxResources.get("device")),Q.appendChild(d),b.mode!=App.MODE_DEVICE&&u||d.setAttribute("selected","selected"),E&&x(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);u&&isLocalStorage&&"0"!=urlParams.browser&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_BROWSER),mxUtils.write(u,mxResources.get("browser")),Q.appendChild(u),-b.mode==App.MODE_BROWSER&&u.setAttribute("selected","selected"),x(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));u=document.createElement("div");u.style.marginTop="26px";u.style.textAlign="center";null!=H&&(E=mxUtils.button(mxResources.get("help"),function(){b.openLink(H)}),E.className="geBtn",u.appendChild(E));E=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});-E.className="geBtn";b.editor.cancelFirst&&null==c&&u.appendChild(E);null==c&&(d=mxUtils.button(mxResources.get("decideLater"),function(){A(null)}),d.className="geBtn",u.appendChild(d));F&&Editor.popupsAllowed&&(F=mxUtils.button(mxResources.get("openInNewWindow"),function(){A("_blank")}),F.className="geBtn",u.appendChild(F));CreateDialog.showDownloadButton&&(F=mxUtils.button(mxResources.get("download"),function(){A("download")}),F.className="geBtn",u.appendChild(F),null!=v&&(F.style.marginTop="6px",-u.style.marginTop="6px"));null!=v&&(mxUtils.br(u),u.appendChild(v));b.editor.cancelFirst&&null==c||u.appendChild(E);mxEvent.addListener(D,"keypress",function(P){13==P.keyCode?A(App.MODE_DEVICE):27==P.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});n.appendChild(u);this.container=n};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;-var PopupDialog=function(b,e,f,c,l){l=null!=l?l:!0;var n=document.createElement("div");n.style.textAlign="left";n.style.height="100%";mxUtils.write(n,mxResources.get("fileOpenLocation"));mxUtils.br(n);mxUtils.br(n);var p=mxUtils.button(mxResources.get("openInThisWindow"),function(){l&&b.hideDialog();null!=c&&c()});p.className="geBtn";p.style.marginBottom="8px";p.style.width="280px";n.appendChild(p);mxUtils.br(n);var u=mxUtils.button(mxResources.get("openInNewWindow"),function(){l&&b.hideDialog();-null!=f&&f();b.openLink(e,null,!0)});u.className="geBtn gePrimaryBtn";u.style.width=p.style.width;n.appendChild(u);mxUtils.br(n);mxUtils.br(n);mxUtils.write(n,mxResources.get("allowPopups"));this.container=n},ImageDialog=function(b,e,f,c,l,n,p,u){function F(){0<K.value.length?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled");"data:"!=K.value.substring(0,5)?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}n=null!=n?n:!0;var H=b.editor.graph,E=document.createElement("div");+(u=mxUtils.button(mxResources.get("copy"),function(O){O=b.base64ToBlob(G,"image/png");O=new ClipboardItem({"image/png":O,"text/html":new Blob(['<img src="data:'+g+";base64,"+G+'">'],{type:"text/html"})});navigator.clipboard.write([O]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(q){b.handleError(q)}))}),u.style.marginTop="6px",u.className="geBtn");F&&Editor.popupsAllowed&&(l.style.cursor="pointer",mxEvent.addGestureListeners(l,+null,null,function(O){mxEvent.isPopupTrigger(O)||A("_blank")}))}mxUtils.br(n);var S=document.createElement("div");S.style.textAlign="center";var U=0;S.style.marginTop="6px";n.appendChild(S);var P=document.createElement("select");P.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(d,mxResources.get("googleDrive")),P.appendChild(d),x(IMAGE_PATH+"/google-drive-logo.svg",+mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(d,mxResources.get("oneDrive")),P.appendChild(d),b.mode==App.MODE_ONEDRIVE&&d.setAttribute("selected","selected"),x(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_DROPBOX),+mxUtils.write(d,mxResources.get("dropbox")),P.appendChild(d),b.mode==App.MODE_DROPBOX&&d.setAttribute("selected","selected"),x(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_GITHUB),mxUtils.write(d,mxResources.get("github")),P.appendChild(d),x(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(d=document.createElement("option"),+d.setAttribute("value",App.MODE_GITLAB),mxUtils.write(d,mxResources.get("gitlab")),P.appendChild(d),x(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_TRELLO),mxUtils.write(d,mxResources.get("trello")),P.appendChild(d),x(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||+null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)d=document.createElement("option"),d.setAttribute("value",App.MODE_DEVICE),mxUtils.write(d,mxResources.get("device")),P.appendChild(d),b.mode!=App.MODE_DEVICE&&v||d.setAttribute("selected","selected"),E&&x(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);v&&isLocalStorage&&"0"!=urlParams.browser&&(v=document.createElement("option"),v.setAttribute("value",App.MODE_BROWSER),mxUtils.write(v,mxResources.get("browser")),P.appendChild(v),+b.mode==App.MODE_BROWSER&&v.setAttribute("selected","selected"),x(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));v=document.createElement("div");v.style.marginTop="26px";v.style.textAlign="center";null!=H&&(E=mxUtils.button(mxResources.get("help"),function(){b.openLink(H)}),E.className="geBtn",v.appendChild(E));E=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});+E.className="geBtn";b.editor.cancelFirst&&null==c&&v.appendChild(E);null==c&&(d=mxUtils.button(mxResources.get("decideLater"),function(){A(null)}),d.className="geBtn",v.appendChild(d));F&&Editor.popupsAllowed&&(F=mxUtils.button(mxResources.get("openInNewWindow"),function(){A("_blank")}),F.className="geBtn",v.appendChild(F));CreateDialog.showDownloadButton&&(F=mxUtils.button(mxResources.get("download"),function(){A("download")}),F.className="geBtn",v.appendChild(F),null!=u&&(F.style.marginTop="6px",+v.style.marginTop="6px"));null!=u&&(mxUtils.br(v),v.appendChild(u));b.editor.cancelFirst&&null==c||v.appendChild(E);mxEvent.addListener(D,"keypress",function(O){13==O.keyCode?A(App.MODE_DEVICE):27==O.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});n.appendChild(v);this.container=n};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;+var PopupDialog=function(b,e,f,c,l){l=null!=l?l:!0;var n=document.createElement("div");n.style.textAlign="left";n.style.height="100%";mxUtils.write(n,mxResources.get("fileOpenLocation"));mxUtils.br(n);mxUtils.br(n);var p=mxUtils.button(mxResources.get("openInThisWindow"),function(){l&&b.hideDialog();null!=c&&c()});p.className="geBtn";p.style.marginBottom="8px";p.style.width="280px";n.appendChild(p);mxUtils.br(n);var v=mxUtils.button(mxResources.get("openInNewWindow"),function(){l&&b.hideDialog();+null!=f&&f();b.openLink(e,null,!0)});v.className="geBtn gePrimaryBtn";v.style.width=p.style.width;n.appendChild(v);mxUtils.br(n);mxUtils.br(n);mxUtils.write(n,mxResources.get("allowPopups"));this.container=n},ImageDialog=function(b,e,f,c,l,n,p,v){function F(){0<K.value.length?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled");"data:"!=K.value.substring(0,5)?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}n=null!=n?n:!0;var H=b.editor.graph,E=document.createElement("div");mxUtils.write(E,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";e.style.paddingRight="20px";var K=document.createElement("input");K.setAttribute("value",f);K.setAttribute("type","text");K.setAttribute("spellcheck","false");K.setAttribute("autocorrect","off");K.setAttribute("autocomplete","off");K.setAttribute("autocapitalize","off");K.style.marginTop="6px";K.style.width=(Graph.fileSupport?460:340)-20+"px";K.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";K.style.backgroundRepeat="no-repeat";K.style.backgroundPosition="100% 50%";K.style.paddingRight="14px";f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";f.style.display="inline-block";f.style.top="3px";f.style.background="url('"+b.editor.transparentImage+-"')";mxEvent.addListener(f,"click",function(){K.value="";K.focus()});e.appendChild(K);e.appendChild(f);E.appendChild(e);var d=u,g,k,v=function(D,G,R,V){var Q="data:"==D.substring(0,5);!b.isOffline()||Q&&"undefined"===typeof chrome?0<D.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(D,function(P){b.spinner.stop();b.hideDialog();var q=!1===V?1:null!=G&&null!=R?Math.max(G/P.width,R/P.height):Math.min(1,Math.min(520/P.width,520/P.height));n&&(D=b.convertDataUri(D));c(D,-Math.round(Number(P.width)*q),Math.round(Number(P.height)*q),d,g,k)},function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(D,null,null,d,g,k)):(D=b.convertDataUri(D),G=null==G?120:G,R=null==R?100:R,b.hideDialog(),c(D,G,R,d,g,k))},t=function(D,G){if(null!=D){var R=l?null:H.getModel().getGeometry(H.getSelectionCell());null!=R?v(D,R.width,R.height,G):v(D,null,null,G)}else b.hideDialog(),c(null)};this.init=function(){K.focus();-if(Graph.fileSupport){K.setAttribute("placeholder",mxResources.get("dragImagesHere"));var D=E.parentNode,G=null;mxEvent.addListener(D,"dragleave",function(R){null!=G&&(G.parentNode.removeChild(G),G=null);R.stopPropagation();R.preventDefault()});mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(R){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=b.highlightElement(D));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(R){null!=G&&(G.parentNode.removeChild(G),-G=null);if(0<R.dataTransfer.files.length)b.importFiles(R.dataTransfer.files,0,0,b.maxImageSize,function(Q,P,q,y,B,C,M,T){t(Q,T)},function(){},function(Q){return"image/"==Q.type.substring(0,6)},function(Q){for(var P=0;P<Q.length;P++)Q[P]()},!mxEvent.isControlDown(R),null,null,!0);else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var V=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(V)&&t(decodeURIComponent(V))}R.stopPropagation();R.preventDefault()}),-!1)}};u=document.createElement("div");u.style.marginTop="14px";u.style.textAlign="center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&u.appendChild(f);ImageDialog.filePicked=function(D){D.action==google.picker.Action.PICKED&&null!=D.docs[0].thumbnails&&(D=D.docs[0].thumbnails[D.docs[0].thumbnails.length-1],null!=D&&(K.value=D.url));K.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var x=document.createElement("input");-x.setAttribute("multiple","multiple");x.setAttribute("type","file");mxEvent.addListener(x,"change",function(D){null!=x.files&&(b.importFiles(x.files,0,0,b.maxImageSize,function(G,R,V,Q,P,q){t(G)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var R=0;R<G.length;R++)G[R]()},!0),x.type="",x.type="file",x.value="")});x.style.display="none";document.body.appendChild(x);b.imgDlgFileInputElt=x}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});-e.className="geBtn";u.appendChild(e)}mxEvent.addListener(K,"keypress",function(D){13==D.keyCode&&t(K.value)});var A=mxUtils.button(mxResources.get("crop"),function(){var D=new CropImageDialog(b,K.value,d,function(G,R,V){d=G;g=R;k=V});b.showDialog(D.container,300,390,!0,!0)});p&&(A.className="geBtn",u.appendChild(A));var J=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=K.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var D=b.editor.createImageUrlConverter().convert(K.value),-G=new Image;G.onload=function(){b.editor.convertImageToDataUri(D,function(R){b.confirmImageResize(function(V){b.resizeImage(G,R,mxUtils.bind(this,function(Q,P,q){b.spinner.stop();null!=Q&&Q.length<b.maxImageBytes?(K.value=Q,F()):b.handleError({message:mxResources.get("imageTooBig")})}),V,b.maxImageSize)},G.width>b.maxImageSize||G.height>b.maxImageSize||R.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};G.onerror=function(){b.spinner.stop();-b.handleError({message:mxResources.get("fileNotFound")})};G.src=D}});J.className="geBtn";mxEvent.addListener(K,"change",function(D){d=null;F()});F();u.appendChild(J);p=mxUtils.button(mxResources.get("apply"),function(){t(K.value)});p.className="geBtn gePrimaryBtn";u.appendChild(p);b.editor.cancelFirst||u.appendChild(f);Graph.fileSupport&&(u.style.marginTop="120px",E.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",E.style.backgroundPosition="center 65%",E.style.backgroundRepeat="no-repeat",-p=document.createElement("div"),p.style.position="absolute",p.style.width="420px",p.style.top="58%",p.style.textAlign="center",p.style.fontSize="18px",p.style.color="#a0c3ff",mxUtils.write(p,mxResources.get("dragImagesHere")),E.appendChild(p));E.appendChild(u);this.container=E},LinkDialog=function(b,e,f,c,l,n,p){function u(D,G){var R=document.createElement("option");mxUtils.write(R,mxResources.get(D));R.value=D;A.appendChild(R);J[D]=G}var F=document.createElement("div");F.style.height="100%";mxUtils.write(F,+"')";mxEvent.addListener(f,"click",function(){K.value="";K.focus()});e.appendChild(K);e.appendChild(f);E.appendChild(e);var d=v,g,k,u=function(D,G,S,U){var P="data:"==D.substring(0,5);!b.isOffline()||P&&"undefined"===typeof chrome?0<D.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(D,function(O){b.spinner.stop();b.hideDialog();var q=!1===U?1:null!=G&&null!=S?Math.max(G/O.width,S/O.height):Math.min(1,Math.min(520/O.width,520/O.height));n&&(D=b.convertDataUri(D));c(D,+Math.round(Number(O.width)*q),Math.round(Number(O.height)*q),d,g,k)},function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(D,null,null,d,g,k)):(D=b.convertDataUri(D),G=null==G?120:G,S=null==S?100:S,b.hideDialog(),c(D,G,S,d,g,k))},t=function(D,G){if(null!=D){var S=l?null:H.getModel().getGeometry(H.getSelectionCell());null!=S?u(D,S.width,S.height,G):u(D,null,null,G)}else b.hideDialog(),c(null)};this.init=function(){K.focus();+if(Graph.fileSupport){K.setAttribute("placeholder",mxResources.get("dragImagesHere"));var D=E.parentNode,G=null;mxEvent.addListener(D,"dragleave",function(S){null!=G&&(G.parentNode.removeChild(G),G=null);S.stopPropagation();S.preventDefault()});mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(S){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=b.highlightElement(D));S.stopPropagation();S.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(S){null!=G&&(G.parentNode.removeChild(G),+G=null);if(0<S.dataTransfer.files.length)b.importFiles(S.dataTransfer.files,0,0,b.maxImageSize,function(P,O,q,y,B,C,M,T){t(P,T)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var O=0;O<P.length;O++)P[O]()},!mxEvent.isControlDown(S),null,null,!0);else if(0<=mxUtils.indexOf(S.dataTransfer.types,"text/uri-list")){var U=S.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(U)&&t(decodeURIComponent(U))}S.stopPropagation();S.preventDefault()}),+!1)}};v=document.createElement("div");v.style.marginTop="14px";v.style.textAlign="center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&v.appendChild(f);ImageDialog.filePicked=function(D){D.action==google.picker.Action.PICKED&&null!=D.docs[0].thumbnails&&(D=D.docs[0].thumbnails[D.docs[0].thumbnails.length-1],null!=D&&(K.value=D.url));K.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var x=document.createElement("input");+x.setAttribute("multiple","multiple");x.setAttribute("type","file");mxEvent.addListener(x,"change",function(D){null!=x.files&&(b.importFiles(x.files,0,0,b.maxImageSize,function(G,S,U,P,O,q){t(G)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var S=0;S<G.length;S++)G[S]()},!0),x.type="",x.type="file",x.value="")});x.style.display="none";document.body.appendChild(x);b.imgDlgFileInputElt=x}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});+e.className="geBtn";v.appendChild(e)}mxEvent.addListener(K,"keypress",function(D){13==D.keyCode&&t(K.value)});var A=mxUtils.button(mxResources.get("crop"),function(){var D=new CropImageDialog(b,K.value,d,function(G,S,U){d=G;g=S;k=U});b.showDialog(D.container,300,390,!0,!0)});p&&(A.className="geBtn",v.appendChild(A));var J=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=K.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var D=b.editor.createImageUrlConverter().convert(K.value),+G=new Image;G.onload=function(){b.editor.convertImageToDataUri(D,function(S){b.confirmImageResize(function(U){b.resizeImage(G,S,mxUtils.bind(this,function(P,O,q){b.spinner.stop();null!=P&&P.length<b.maxImageBytes?(K.value=P,F()):b.handleError({message:mxResources.get("imageTooBig")})}),U,b.maxImageSize)},G.width>b.maxImageSize||G.height>b.maxImageSize||S.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};G.onerror=function(){b.spinner.stop();+b.handleError({message:mxResources.get("fileNotFound")})};G.src=D}});J.className="geBtn";mxEvent.addListener(K,"change",function(D){d=null;F()});F();v.appendChild(J);p=mxUtils.button(mxResources.get("apply"),function(){t(K.value)});p.className="geBtn gePrimaryBtn";v.appendChild(p);b.editor.cancelFirst||v.appendChild(f);Graph.fileSupport&&(v.style.marginTop="120px",E.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",E.style.backgroundPosition="center 65%",E.style.backgroundRepeat="no-repeat",+p=document.createElement("div"),p.style.position="absolute",p.style.width="420px",p.style.top="58%",p.style.textAlign="center",p.style.fontSize="18px",p.style.color="#a0c3ff",mxUtils.write(p,mxResources.get("dragImagesHere")),E.appendChild(p));E.appendChild(v);this.container=E},LinkDialog=function(b,e,f,c,l,n,p){function v(D,G){var S=document.createElement("option");mxUtils.write(S,mxResources.get(D));S.value=D;A.appendChild(S);J[D]=G}var F=document.createElement("div");F.style.height="100%";mxUtils.write(F,mxResources.get("editLink")+":");var H=document.createElement("div");H.className="geTitle";H.style.backgroundColor="transparent";H.style.borderColor="transparent";H.style.whiteSpace="nowrap";H.style.textOverflow="clip";H.style.cursor="default";var E=document.createElement("input");E.setAttribute("placeholder",mxResources.get("dragUrlsHere"));E.setAttribute("type","text");E.style.marginTop="6px";E.style.width="414px";E.style.boxSizing="border-box";E.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";E.style.backgroundRepeat="no-repeat";E.style.backgroundPosition="100% 50%";E.style.paddingRight="14px";E.style.marginBottom="4px";var K=document.createElement("div");K.setAttribute("title",mxResources.get("reset"));K.style.position="relative";K.style.left="-16px";K.style.width="12px";K.style.height="14px";K.style.cursor="pointer";K.style.display="inline-block";K.style.top="3px";K.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(K,"click",function(){E.value="";E.focus()});-var d=document.createElement("input");d.style.cssText="margin-right:8px;margin-bottom:8px;";d.setAttribute("value","url");d.setAttribute("type","radio");d.setAttribute("name","geLinkDialogOption");var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","geLinkDialogOption");var k=document.createElement("select");k.style.width="414px";var v=document.createElement("input");v.setAttribute("type",-"checkbox");v.style.margin="0 6p 0 6px";null!=p&&(v.setAttribute("checked","checked"),v.defaultChecked=!0);p=null!=p?p:"_blank";v.setAttribute("title",p);n&&(E.style.width="200px");if(l&&null!=b.pages){null!=e&&Graph.isPageLink(e)?(g.setAttribute("checked","checked"),g.defaultChecked=!0):(E.setAttribute("value",e),d.setAttribute("checked","checked"),d.defaultChecked=!0);H.appendChild(d);H.appendChild(E);H.appendChild(K);n&&(H.appendChild(v),mxUtils.write(H,mxResources.get("openInNewWindow")));mxUtils.br(H);+var d=document.createElement("input");d.style.cssText="margin-right:8px;margin-bottom:8px;";d.setAttribute("value","url");d.setAttribute("type","radio");d.setAttribute("name","geLinkDialogOption");var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","geLinkDialogOption");var k=document.createElement("select");k.style.width="414px";var u=document.createElement("input");u.setAttribute("type",+"checkbox");u.style.margin="0 6p 0 6px";null!=p&&(u.setAttribute("checked","checked"),u.defaultChecked=!0);p=null!=p?p:"_blank";u.setAttribute("title",p);n&&(E.style.width="200px");if(l&&null!=b.pages){null!=e&&Graph.isPageLink(e)?(g.setAttribute("checked","checked"),g.defaultChecked=!0):(E.setAttribute("value",e),d.setAttribute("checked","checked"),d.defaultChecked=!0);H.appendChild(d);H.appendChild(E);H.appendChild(K);n&&(H.appendChild(u),mxUtils.write(H,mxResources.get("openInNewWindow")));mxUtils.br(H);H.appendChild(g);l=!1;for(n=0;n<b.pages.length;n++)K=document.createElement("option"),mxUtils.write(K,b.pages[n].getName()||mxResources.get("pageWithNumber",[n+1])),K.setAttribute("value","data:page/id,"+b.pages[n].getId()),e==K.getAttribute("value")&&(K.setAttribute("selected","selected"),l=!0),k.appendChild(K);if(!l&&g.checked){var t=document.createElement("option");mxUtils.write(t,mxResources.get("pageNotFound"));t.setAttribute("disabled","disabled");t.setAttribute("selected","selected");t.setAttribute("value",-"pageNotFound");k.appendChild(t);mxEvent.addListener(k,"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)})}H.appendChild(k)}else E.setAttribute("value",e),H.appendChild(E),H.appendChild(K);F.appendChild(H);var x=mxUtils.button(f,function(){b.hideDialog();c(g.checked?"pageNotFound"!==k.value?k.value:e:E.value,LinkDialog.selectedDocs,v.checked?p:null)});x.style.verticalAlign="middle";x.className="geBtn gePrimaryBtn";this.init=function(){g.checked?k.focus():(E.focus(),mxClient.IS_GC||-mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(k,"focus",function(){d.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(E,"focus",function(){g.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});if(Graph.fileSupport){var D=F.parentNode,G=null;mxEvent.addListener(D,"dragleave",function(R){null!=G&&(G.parentNode.removeChild(G),G=null);R.stopPropagation();R.preventDefault()});-mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(R){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=b.highlightElement(D));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(R){try{null!=G&&(G.parentNode.removeChild(G),G=null),0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")&&(E.value=decodeURIComponent(R.dataTransfer.getData("text/uri-list")),d.setAttribute("checked","checked"),d.checked=!0,x.click())}catch(V){b.handleError(V)}R.stopPropagation();-R.preventDefault()}),!1)}};f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="right";b.isOffline()||f.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));H=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});H.style.verticalAlign="middle";H.className="geBtn";b.editor.cancelFirst&&f.appendChild(H);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(D){if(D.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=D.docs;+"pageNotFound");k.appendChild(t);mxEvent.addListener(k,"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)})}H.appendChild(k)}else E.setAttribute("value",e),H.appendChild(E),H.appendChild(K);F.appendChild(H);var x=mxUtils.button(f,function(){b.hideDialog();c(g.checked?"pageNotFound"!==k.value?k.value:e:E.value,LinkDialog.selectedDocs,u.checked?p:null)});x.style.verticalAlign="middle";x.className="geBtn gePrimaryBtn";this.init=function(){g.checked?k.focus():(E.focus(),mxClient.IS_GC||+mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(k,"focus",function(){d.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(E,"focus",function(){g.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});if(Graph.fileSupport){var D=F.parentNode,G=null;mxEvent.addListener(D,"dragleave",function(S){null!=G&&(G.parentNode.removeChild(G),G=null);S.stopPropagation();S.preventDefault()});+mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(S){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=b.highlightElement(D));S.stopPropagation();S.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(S){try{null!=G&&(G.parentNode.removeChild(G),G=null),0<=mxUtils.indexOf(S.dataTransfer.types,"text/uri-list")&&(E.value=decodeURIComponent(S.dataTransfer.getData("text/uri-list")),d.setAttribute("checked","checked"),d.checked=!0,x.click())}catch(U){b.handleError(U)}S.stopPropagation();+S.preventDefault()}),!1)}};f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="right";b.isOffline()||f.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));H=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});H.style.verticalAlign="middle";H.className="geBtn";b.editor.cancelFirst&&f.appendChild(H);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(D){if(D.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=D.docs;var G=D.docs[0].url;"application/mxe"==D.docs[0].mimeType||null!=D.docs[0].mimeType&&"application/vnd.jgraph."==D.docs[0].mimeType.substring(0,23)?G="https://www.draw.io/#G"+D.docs[0].id:"application/vnd.google-apps.folder"==D.docs[0].mimeType&&(G="https://drive.google.com/#folders/"+D.docs[0].id);E.value=G;E.focus()}else LinkDialog.selectedDocs=null;E.focus()};var A=document.createElement("select");A.className="geBtn";A.style.position="relative";A.style.top="1px";A.style.maxWidth="120px";var J={};-l=document.createElement("option");mxUtils.write(l,mxResources.get("select")+"...");l.value="";A.appendChild(l);"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&u("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var D=b.drive.createLinkPicker();b.linkPicker=D.setCallback(function(G){LinkDialog.filePicked(G)}).build()}b.linkPicker.setVisible(!0)}))});-"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&u("dropbox",function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(D){E.value=D[0].link;E.focus()}})});null!=b.oneDrive&&u("oneDrive",function(){b.oneDrive.pickFile(function(D,G){null!=G&&null!=G.value&&0<G.value.length&&(E.value=G.value[0].webUrl,E.focus())},!0)});null!=b.gitHub&&u("github",function(){b.gitHub.pickFile(function(D){if(null!=D){D=D.split("/");var G=D[0],R=D[1],V=D[2];D=D.slice(3,D.length).join("/");-E.value="https://github.com/"+G+"/"+R+"/blob/"+V+"/"+D;E.focus()}})});null!=b.gitLab&&u("gitlab",function(){b.gitLab.pickFile(function(D){if(null!=D){D=D.split("/");var G=D[0],R=D[1],V=D[2];D=D.slice(3,D.length).join("/");E.value=DRAWIO_GITLAB_URL+"/"+G+"/"+R+"/blob/"+V+"/"+D;E.focus()}})});1<A.children.length&&(f.appendChild(A),mxEvent.addListener(A,"change",function(D){null!=J[A.value]&&(J[A.value](),A.value="")}));mxEvent.addListener(E,"keypress",function(D){13==D.keyCode&&x.click()});f.appendChild(x);+l=document.createElement("option");mxUtils.write(l,mxResources.get("select")+"...");l.value="";A.appendChild(l);"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&v("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var D=b.drive.createLinkPicker();b.linkPicker=D.setCallback(function(G){LinkDialog.filePicked(G)}).build()}b.linkPicker.setVisible(!0)}))});+"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&v("dropbox",function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(D){E.value=D[0].link;E.focus()}})});null!=b.oneDrive&&v("oneDrive",function(){b.oneDrive.pickFile(function(D,G){null!=G&&null!=G.value&&0<G.value.length&&(E.value=G.value[0].webUrl,E.focus())},!0)});null!=b.gitHub&&v("github",function(){b.gitHub.pickFile(function(D){if(null!=D){D=D.split("/");var G=D[0],S=D[1],U=D[2];D=D.slice(3,D.length).join("/");+E.value="https://github.com/"+G+"/"+S+"/blob/"+U+"/"+D;E.focus()}})});null!=b.gitLab&&v("gitlab",function(){b.gitLab.pickFile(function(D){if(null!=D){D=D.split("/");var G=D[0],S=D[1],U=D[2];D=D.slice(3,D.length).join("/");E.value=DRAWIO_GITLAB_URL+"/"+G+"/"+S+"/blob/"+U+"/"+D;E.focus()}})});1<A.children.length&&(f.appendChild(A),mxEvent.addListener(A,"change",function(D){null!=J[A.value]&&(J[A.value](),A.value="")}));mxEvent.addListener(E,"keypress",function(D){13==D.keyCode&&x.click()});f.appendChild(x);b.editor.cancelFirst||f.appendChild(H);F.appendChild(f);this.container=F},FeedbackDialog=function(b,e,f,c){var l=document.createElement("div"),n=document.createElement("div");mxUtils.write(n,mxResources.get("sendYourFeedback"));n.style.fontSize="18px";n.style.marginBottom="18px";l.appendChild(n);n=document.createElement("div");mxUtils.write(n,mxResources.get("yourEmailAddress")+(f?"":" ("+mxResources.get("required")+")"));l.appendChild(n);var p=document.createElement("input");p.setAttribute("type",-"text");p.style.marginTop="6px";p.style.width="600px";var u=mxUtils.button(mxResources.get("sendMessage"),function(){var K=E.value+(H.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;K.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=-FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(p.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+":\n"+K),function(d){b.spinner.stop();200<=d.getStatus()&&299>=d.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});u.className=-"geBtn gePrimaryBtn";if(!f){u.setAttribute("disabled","disabled");var F=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(p,"change",function(){0<p.value.length&&0<F.test(p.value)?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")});mxEvent.addListener(p,"keyup",function(){0<p.value.length&&F.test(p.value)?u.removeAttribute("disabled"):u.setAttribute("disabled",+"text");p.style.marginTop="6px";p.style.width="600px";var v=mxUtils.button(mxResources.get("sendMessage"),function(){var K=E.value+(H.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;K.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=+FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(p.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+":\n"+K),function(d){b.spinner.stop();200<=d.getStatus()&&299>=d.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});v.className=+"geBtn gePrimaryBtn";if(!f){v.setAttribute("disabled","disabled");var F=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(p,"change",function(){0<p.value.length&&0<F.test(p.value)?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")});mxEvent.addListener(p,"keyup",function(){0<p.value.length&&F.test(p.value)?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")})}l.appendChild(p);this.init=function(){p.focus()};var H=document.createElement("input");H.setAttribute("type","checkbox");H.setAttribute("checked","checked");H.defaultChecked=!0;f=document.createElement("p");f.style.marginTop="14px";f.appendChild(H);n=document.createElement("span");mxUtils.write(n," "+mxResources.get("includeCopyOfMyDiagram"));f.appendChild(n);mxEvent.addListener(n,"click",function(K){H.checked=!H.checked;mxEvent.consume(K)});l.appendChild(f);n=document.createElement("div");-mxUtils.write(n,mxResources.get("feedback"));l.appendChild(n);var E=document.createElement("textarea");E.style.resize="none";E.style.width="600px";E.style.height="140px";E.style.marginTop="6px";E.setAttribute("placeholder",mxResources.get("comments"));l.appendChild(E);f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";b.editor.cancelFirst?(f.appendChild(n),f.appendChild(u)):(f.appendChild(u),+mxUtils.write(n,mxResources.get("feedback"));l.appendChild(n);var E=document.createElement("textarea");E.style.resize="none";E.style.width="600px";E.style.height="140px";E.style.marginTop="6px";E.setAttribute("placeholder",mxResources.get("comments"));l.appendChild(E);f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";b.editor.cancelFirst?(f.appendChild(n),f.appendChild(v)):(f.appendChild(v),f.appendChild(n));l.appendChild(f);this.container=l};FeedbackDialog.maxAttachmentSize=1E6;var RevisionDialog=function(b,e,f){var c=document.createElement("div"),l=document.createElement("h3");l.style.marginTop="3px";mxUtils.write(l,mxResources.get("revisionHistory"));c.appendChild(l);l=document.createElement("div");l.style.position="absolute";l.style.overflow="auto";l.style.width="170px";l.style.height="378px";c.appendChild(l);var n=document.createElement("div");n.style.position="absolute";n.style.left="200px";n.style.width="470px";n.style.height="376px";n.style.overflow="hidden";n.style.borderWidth=-"1px";n.style.borderStyle="solid";var p=document.createElement("div");p.style.position="absolute";p.style.display="none";p.style.textAlign="center";p.style.padding="8px";p.style.borderRadius="8px";p.style.left="50%";p.style.top="50%";p.style.whiteSpace="nowrap";p.style.transform="translate(-50%, -50%)";p.style.background="inherit";p.style.border="1px solid";n.appendChild(p);mxEvent.disableContextMenu(n);c.appendChild(n);var u=new Graph(n);u.setTooltips(!1);u.setEnabled(!1);u.setPanning(!0);u.panningHandler.ignoreCell=-!0;u.panningHandler.useLeftButtonForPanning=!0;u.minFitScale=null;u.maxFitScale=null;u.centerZoom=!0;var F=0,H=null,E=0,K=u.getGlobalVariable;u.getGlobalVariable=function(X){return"page"==X&&null!=H&&null!=H[E]?H[E].getAttribute("name"):"pagenumber"==X?E+1:"pagecount"==X?null!=H?H.length:1:K.apply(this,arguments)};u.getLinkForCell=function(){return null};for(var d=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,-shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),g=b.getCurrentFile(),k=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),v={},t=0;t<k.length;t++)v[k[t].getAttribute("id")]=k[t];var x=null,A=null,J=null,D=null,G=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=J&&u.zoomIn()},20);G.setAttribute("disabled","disabled");var R=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=J&&u.zoomOut()},20);R.setAttribute("disabled",-"disabled");var V=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=J&&(1==u.view.scale?(u.maxFitScale=8,u.fit(8)):u.zoomActual(),u.center())},20);V.setAttribute("disabled","disabled");var Q=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"),null,20);Q.setAttribute("disabled","disabled");var P=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"),null,20);P.setAttribute("disabled","disabled");var q=n.cloneNode(!1);q.style.pointerEvent=+"1px";n.style.borderStyle="solid";var p=document.createElement("div");p.style.position="absolute";p.style.display="none";p.style.textAlign="center";p.style.padding="8px";p.style.borderRadius="8px";p.style.left="50%";p.style.top="50%";p.style.whiteSpace="nowrap";p.style.transform="translate(-50%, -50%)";p.style.background="inherit";p.style.border="1px solid";n.appendChild(p);mxEvent.disableContextMenu(n);c.appendChild(n);var v=new Graph(n);v.setTooltips(!1);v.setEnabled(!1);v.setPanning(!0);v.panningHandler.ignoreCell=+!0;v.panningHandler.useLeftButtonForPanning=!0;v.minFitScale=null;v.maxFitScale=null;v.centerZoom=!0;var F=0,H=null,E=0,K=v.getGlobalVariable;v.getGlobalVariable=function(X){return"page"==X&&null!=H&&null!=H[E]?H[E].getAttribute("name"):"pagenumber"==X?E+1:"pagecount"==X?null!=H?H.length:1:K.apply(this,arguments)};v.getLinkForCell=function(){return null};for(var d=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,+shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),g=b.getCurrentFile(),k=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),u={},t=0;t<k.length;t++)u[k[t].getAttribute("id")]=k[t];var x=null,A=null,J=null,D=null,G=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=J&&v.zoomIn()},20);G.setAttribute("disabled","disabled");var S=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=J&&v.zoomOut()},20);S.setAttribute("disabled",+"disabled");var U=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=J&&(1==v.view.scale?(v.maxFitScale=8,v.fit(8)):v.zoomActual(),v.center())},20);U.setAttribute("disabled","disabled");var P=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"),null,20);P.setAttribute("disabled","disabled");var O=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"),null,20);O.setAttribute("disabled","disabled");var q=n.cloneNode(!1);q.style.pointerEvent="none";n.parentNode.appendChild(q);var y=new Graph(q);y.setTooltips(!1);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var B=document.createElement("div");B.style.textAlign="left";B.style.color="gray";B.style.backgroundColor="transparent";B.style.overflow="hidden";B.style.textOverflow="ellipsis";B.style.whiteSpace="nowrap";B.style.cursor="default";B.style.height="100%";B.style.display=-"inline-flex";B.style.alignItems="center";B.style.flexGrow="1";mxEvent.addListener(B,"click",function(){var X=mxUtils.getTextContent(B);""!=X&&b.alert(X)});var C=null;mxEvent.addGestureListeners(Q,function(X){try{var Z=null!=H[F]?v[H[F].getAttribute("id")]:null;mxUtils.setOpacity(Q,20);p.innerText="";if(null==Z)p.style.display="inline-block",mxUtils.write(p,mxResources.get("pageNotFound"));else{C=B.innerHTML;B.innerHTML=mxResources.get("current");n.style.display="none";q.style.display="";q.style.backgroundColor=-n.style.backgroundColor;var Y=Editor.parseDiagramNode(Z);(new mxCodec(Y.ownerDocument)).decode(Y,y.getModel());y.view.scaleAndTranslate(u.view.scale,u.view.translate.x,u.view.translate.y);y.mathEnabled="1"==Y.getAttribute("math");y.setAdaptiveColors(Y.getAttribute("adaptiveColors"));Editor.MathJaxRender&&y.mathEnabled&&Editor.MathJaxRender(y.container)}}catch(ba){p.style.display="inline-block",p.innerText="",mxUtils.write(p,mxResources.get("pageNotFound")+": "+ba.message)}},null,function(){mxUtils.setOpacity(Q,-60);p.style.display="none";p.innerText="";"none"==n.style.display&&(n.style.display="",B.innerHTML=C,q.style.display="none")});mxEvent.addListener(P,"click",mxUtils.bind(this,function(X){null!=J&&(X=b.getPagesForNode(J.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(X,null,2),function(Z){try{if(0<Z.length&&b.editor.graph.isEnabled()){var Y=[JSON.parse(Z)];b.confirm(mxResources.get("areYouSure"),function(){try{g.patch(Y,null,!0,!0),b.hideDialog(),+"inline-flex";B.style.alignItems="center";B.style.flexGrow="1";mxEvent.addListener(B,"click",function(){var X=mxUtils.getTextContent(B);""!=X&&b.alert(X)});var C=null;mxEvent.addGestureListeners(P,function(X){try{var Z=null!=H[F]?u[H[F].getAttribute("id")]:null;mxUtils.setOpacity(P,20);p.innerText="";if(null==Z)p.style.display="inline-block",mxUtils.write(p,mxResources.get("pageNotFound"));else{C=B.innerHTML;B.innerHTML=mxResources.get("current");n.style.display="none";q.style.display="";q.style.backgroundColor=+n.style.backgroundColor;var Y=Editor.parseDiagramNode(Z);(new mxCodec(Y.ownerDocument)).decode(Y,y.getModel());y.view.scaleAndTranslate(v.view.scale,v.view.translate.x,v.view.translate.y);y.mathEnabled="1"==Y.getAttribute("math");y.setAdaptiveColors(Y.getAttribute("adaptiveColors"));Editor.MathJaxRender&&y.mathEnabled&&Editor.MathJaxRender(y.container)}}catch(ba){p.style.display="inline-block",p.innerText="",mxUtils.write(p,mxResources.get("pageNotFound")+": "+ba.message)}},null,function(){mxUtils.setOpacity(P,+60);p.style.display="none";p.innerText="";"none"==n.style.display&&(n.style.display="",B.innerHTML=C,q.style.display="none")});mxEvent.addListener(O,"click",mxUtils.bind(this,function(X){null!=J&&(X=b.getPagesForNode(J.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(X,null,2),function(Z){try{if(0<Z.length&&b.editor.graph.isEnabled()){var Y=[JSON.parse(Z)];b.confirm(mxResources.get("areYouSure"),function(){try{g.patch(Y,null,!0,!0),b.hideDialog(),b.hideDialog()}catch(ba){b.handleError(ba)}})}else b.hideDialog()}catch(ba){b.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close")),b.showDialog(X.container,620,460,!0,!0),X.init())}));var M=mxUtils.button(mxResources.get("restore"),function(X){null!=J&&null!=D&&b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(D):b.spinner.spin(document.body,mxResources.get("restoring"))&&(M.setAttribute("disabled","disabled"),g.save(!0,function(Z){b.spinner.stop();M.removeAttribute("disabled");b.replaceFileData(D);b.hideDialog()},function(Z){b.spinner.stop();M.removeAttribute("disabled");b.editor.setStatus("");b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)}))})});M.className="geBtn gePrimaryBtn";M.setAttribute("disabled","disabled");var T=document.createElement("select");T.setAttribute("disabled","disabled");T.style.userSelect="none";T.style.maxWidth="100px";T.style.marginLeft="10px";T.style.display="none";var m=null;mxEvent.addListener(T,"change",function(X){null!=m&&(m(X),mxEvent.consume(X))});var z=mxUtils.button(mxResources.get("open"),function(){null!=J&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(J.documentElement)),b.openLink(b.getUrl(),null,!0))});z.className="geBtn";z.setAttribute("disabled","disabled");var I=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});I.className="geBtn";I.setAttribute("disabled","disabled");null!=f&&(z.style.display="none");k=document.createElement("div");k.style.position="absolute";k.style.top="482px";k.style.right="28px";k.style.left="32px";k.style.justifyContent="end";k.style.display="flex";var L=document.createElement("div");L.className="geToolbarContainer";L.style.backgroundColor="transparent";L.style.display="flex";L.style.alignItems="center";L.style.justifyContent="stretch";L.style.left="32px";L.style.right="32px";L.style.border="none";L.style.top="440px";L.style.height="28px";var N=-null;if(null!=e&&0<e.length){n.style.cursor="move";var O=document.createElement("table");O.style.borderWidth="1px";O.style.borderStyle="solid";O.style.borderCollapse="collapse";O.style.borderSpacing="0px";O.style.width="100%";var S=document.createElement("tbody"),U=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(F=mxUtils.indexOf(b.pages,b.currentPage));for(t=e.length-1;0<=t;t--){var W=function(X){var Z=new Date(X.modifiedDate),Y=null;if(0<=Z.getTime()){var ba=function(ca){d.stop();-p.innerText="";var fa=mxUtils.parseXml(ca),aa=b.editor.extractGraphModel(fa.documentElement,!0);if(null!=aa){var da=function(xa){null!=xa&&(xa=ia(Editor.parseDiagramNode(xa)));return xa},ia=function(xa){var qa=xa.getAttribute("background");if(null==qa||""==qa||qa==mxConstants.NONE)qa=u.defaultPageBackgroundColor;n.style.backgroundColor=mxUtils.getLightDarkColor(qa);(new mxCodec(xa.ownerDocument)).decode(xa,u.getModel());u.maxFitScale=1;u.fit(8);u.center();u.mathEnabled="1"==xa.getAttribute("math");-u.setAdaptiveColors(xa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&u.mathEnabled&&Editor.MathJaxRender(u.container);return xa};T.style.display="none";T.innerText="";J=fa;D=ca;H=parseSelectFunction=null;E=0;if("mxfile"==aa.nodeName){fa=aa.getElementsByTagName("diagram");H=[];for(ca=0;ca<fa.length;ca++)H.push(fa[ca]);E=Math.min(F,H.length-1);0<H.length&&da(H[E]);if(1<H.length)for(T.removeAttribute("disabled"),T.style.display="",ca=0;ca<H.length;ca++){fa=document.createElement("option");fa.setAttribute("title",-pa+" ("+H[ca].getAttribute("id")+")");fa.setAttribute("value",ca);var pa=H[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);aa=b.getPageById(H[ca].getAttribute("id"));var oa="";if(null!=aa){var ha=new DiagramPage(H[ca]);b.getHashValueForPages([aa])!=b.getHashValueForPages([ha])&&(oa=" (M)")}else oa=" (X)";mxUtils.write(fa,pa+oa);ca==E&&fa.setAttribute("selected","selected");T.appendChild(fa)}m=function(){try{var xa=parseInt(T.value);E=F=xa;da(H[xa])}catch(qa){T.value=F,b.handleError(qa)}}}else ia(aa);-pa=X.lastModifyingUserName;null!=pa&&20<pa.length&&(pa=pa.substring(0,20)+"...");B.innerText="";mxUtils.write(B,(null!=pa?pa+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());B.setAttribute("title",Y.getAttribute("title"));G.removeAttribute("disabled");R.removeAttribute("disabled");V.removeAttribute("disabled");Q.removeAttribute("disabled");P.removeAttribute("disabled");null!=g&&g.isRestricted()||(b.editor.graph.isEnabled()&&M.removeAttribute("disabled"),z.removeAttribute("disabled"),I.removeAttribute("disabled"));-mxUtils.setOpacity(G,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(V,60);mxUtils.setOpacity(Q,60);mxUtils.setOpacity(P,60)}else T.style.display="none",T.innerText="",B.innerText="",p.innerText="",mxUtils.write(B,mxResources.get("errorLoadingFile")),mxUtils.write(p,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottomWidth="1px";Y.style.borderBottomStyle="solid";Y.style.fontSize="12px";Y.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding=-"6px";ea.style.whiteSpace="nowrap";X==e[e.length-1]?mxUtils.write(ea,mxResources.get("current")):Z.toDateString()===U?mxUtils.write(ea,Z.toLocaleTimeString()):mxUtils.write(ea,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());Y.appendChild(ea);Y.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ca){A!=X&&(d.stop(),-null!=x&&(x.style.backgroundColor=""),A=X,x=Y,x.style.backgroundColor="light-dark(#ebf2f9, #000000)",D=J=null,B.removeAttribute("title"),B.innerText=mxResources.get("loading")+"...",n.style.backgroundColor=u.defaultPageBackgroundColor,p.innerText="",u.getModel().clear(),M.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),z.setAttribute("disabled",-"disabled"),T.setAttribute("disabled","disabled"),mxUtils.setOpacity(G,20),mxUtils.setOpacity(R,20),mxUtils.setOpacity(V,20),mxUtils.setOpacity(Q,20),mxUtils.setOpacity(P,20),d.spin(n),X.getXml(function(fa){if(A==X)try{ba(fa)}catch(aa){B.innerText=mxResources.get("error")+": "+aa.message}},function(fa){d.stop();T.style.display="none";T.innerText="";B.innerText="";mxUtils.write(B,mxResources.get("errorLoadingFile"));mxUtils.write(p,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(Y,-"dblclick",function(ca){z.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);S.appendChild(Y)}return Y}(e[t]);null!=W&&t==e.length-1&&(N=W)}O.appendChild(S);l.appendChild(O)}else null==g||null==b.drive&&g.constructor==window.DriveFile||null==b.dropbox&&g.constructor==window.DropboxFile?(n.style.display="none",L.style.display="none",mxUtils.write(l,mxResources.get("notAvailable"))):(n.style.display="none",L.style.display=-"none",mxUtils.write(l,mxResources.get("noRevisions")));this.init=function(){null!=N&&N.click()};l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";L.appendChild(B);L.appendChild(Q);L.appendChild(R);L.appendChild(V);L.appendChild(G);L.appendChild(T);L.appendChild(P);b.editor.cancelFirst&&k.appendChild(l);k.appendChild(z);null!=g&&g.constructor==DriveFile&&k.appendChild(I);k.appendChild(M);b.editor.cancelFirst||k.appendChild(l);c.appendChild(k);c.appendChild(L);-this.container=c},DraftDialog=function(b,e,f,c,l,n,p,u,F){var H=document.createElement("div"),E=document.createElement("div");E.style.marginTop="0px";E.style.whiteSpace="nowrap";E.style.overflow="auto";E.style.lineHeight="normal";mxUtils.write(E,e);H.appendChild(E);var K=document.createElement("select"),d=mxUtils.bind(this,function(){"-1"==K.value?(K.value=K.options[0].value,d(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var Q=this,P;return $jscomp.asyncExecutePromiseGeneratorProgram(function(q){for(P=-0;P<F.length;P++)l.apply(Q,[P,mxUtils.bind(Q,function(){})]);b.hideDialog(!0);q.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(A=mxUtils.parseXml(F[K.value].data),J=b.editor.extractGraphModel(A.documentElement,!0),D=0,this.init())});if(null!=F){K.style.marginLeft="4px";for(e=0;e<F.length;e++){var g=document.createElement("option");g.setAttribute("value",e);var k=new Date(F[e].created),v=new Date(F[e].modified);mxUtils.write(g,k.toLocaleDateString()+" "+k.toLocaleTimeString()+" - "+-(k.toDateString(),v.toDateString(),v.toLocaleDateString())+" "+v.toLocaleTimeString());K.appendChild(g)}g=document.createElement("option");g.setAttribute("value","-1");mxUtils.write(g,mxResources.get("deleteAll"));K.appendChild(g);E.appendChild(K);mxEvent.addListener(K,"change",d)}null==f&&(f=F[0].data);var t=document.createElement("div");t.style.position="absolute";t.style.border="1px solid lightGray";t.style.marginTop="10px";t.style.left="40px";t.style.right="40px";t.style.top="46px";t.style.bottom=-"74px";t.style.overflow="hidden";mxEvent.disableContextMenu(t);H.appendChild(t);var x=new Graph(t);x.setEnabled(!1);x.setPanning(!0);x.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";x.panningHandler.ignoreCell=!0;x.panningHandler.useLeftButtonForPanning=!0;x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;var A=mxUtils.parseXml(f),J=b.editor.extractGraphModel(A.documentElement,!0),D=0,G=null,R=x.getGlobalVariable;x.getGlobalVariable=function(Q){return"page"==Q&&null!=G&&null!=G[D]?G[D].getAttribute("name"):-"pagenumber"==Q?D+1:"pagecount"==Q?null!=G?G.length:1:R.apply(this,arguments)};x.getLinkForCell=function(){return null};f=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){x.zoomIn()},20);E=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){x.zoomOut()},20);e=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==x.view.scale?(x.maxFitScale=8,x.fit(8)):x.zoomActual();x.center()},20);p=mxUtils.button(p||mxResources.get("discard"),-function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var Q=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(P){l.apply(Q,[K.value,mxUtils.bind(Q,function(){null!=K.parentNode&&(K.options[K.selectedIndex].parentNode.removeChild(K.options[K.selectedIndex]),1<K.options.length?(K.value=K.options[0].value,d()):b.hideDialog(!0))})]);P.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});p.className="geBtn";var V=document.createElement("select");-V.style.maxWidth="80px";V.style.position="relative";V.style.top="-2px";V.style.verticalAlign="bottom";V.style.marginRight="6px";V.style.display="none";n=mxUtils.button(n||mxResources.get("edit"),function(){c.apply(this,[K.value])});n.className="geBtn gePrimaryBtn";g=document.createElement("div");g.style.position="absolute";g.style.bottom="30px";g.style.right="40px";g.style.textAlign="right";k=document.createElement("div");k.className="geToolbarContainer";k.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";-this.init=function(){function Q(B){if(null!=B){var C=B.getAttribute("background");if(null==C||""==C||C==mxConstants.NONE)C="light-dark(#ffffff, transparent)";t.style.backgroundColor=C;(new mxCodec(B.ownerDocument)).decode(B,x.getModel());x.maxFitScale=1;x.fit(8);x.center()}return B}function P(B){null!=B&&(B=Q(Editor.parseDiagramNode(B)));return B}mxEvent.addListener(V,"change",function(B){D=parseInt(V.value);P(G[D]);mxEvent.consume(B)});if("mxfile"==J.nodeName){var q=J.getElementsByTagName("diagram");-G=[];for(var y=0;y<q.length;y++)G.push(q[y]);0<G.length&&P(G[D]);V.innerText="";if(1<G.length)for(V.style.display="",y=0;y<G.length;y++)q=document.createElement("option"),mxUtils.write(q,G[y].getAttribute("name")||mxResources.get("pageWithNumber",[y+1])),q.setAttribute("value",y),y==D&&q.setAttribute("selected","selected"),V.appendChild(q);else V.style.display="none"}else Q(J)};k.appendChild(V);k.appendChild(f);k.appendChild(E);k.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});-f.className="geBtn";u=null!=u?mxUtils.button(mxResources.get("ignore"),u):null;null!=u&&(u.className="geBtn");b.editor.cancelFirst?(g.appendChild(f),null!=u&&g.appendChild(u),g.appendChild(p),g.appendChild(n)):(g.appendChild(n),g.appendChild(p),null!=u&&g.appendChild(u),g.appendChild(f));H.appendChild(g);H.appendChild(k);this.container=H},FindWindow=function(b,e,f,c,l,n){function p(m,z,I){if("object"===typeof z.value&&null!=z.value.attributes){z=z.value.attributes;for(var L=0;L<z.length;L++)if("label"!=-z[L].nodeName){var N=mxUtils.trim(z[L].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==m&&0<=N.indexOf(I)||null!=m&&m.test(N))return!0}}return!1}function u(){g?(C.removeAttribute("disabled"),M.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"));D.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled")}function F(m,z,I){y.innerText="";var L=E.model.getDescendants(E.model.getRoot()),N=D.value.toLowerCase(),-O=R.checked?new RegExp(N):null,S=null;v=null;K!=N&&(K=N,d=null,k=!1);var U=null==d;if(0<N.length){if(k){k=!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}m=(W+1)%b.pages.length;d=null;do k=!1,L=b.pages[m],E=b.createTemporaryGraph(E.getStylesheet()),b.updatePageRoot(L),E.model.setRoot(L.root),m=(m+1)%b.pages.length;while(!F(!0,z,I)&&m!=W);d&&(d=null,I?b.editor.graph.model.execute(new SelectPage(b,L)):b.selectPage(L));k=!1;E=b.editor.graph;return F(!0,z,I)}for(X=0;X<L.length;X++){W=-E.view.getState(L[X]);z&&(U=U||W==d);if(null!=W&&null!=W.cell.value&&(U||null==S)&&(E.model.isVertex(W.cell)||E.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(Q.innerHTML=E.sanitizeHtml(E.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([Q])):label=E.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;z&&n&&W==d&&(label=label.substr(t),Z=t);var Y=""==G.value;if(null==O&&(0<=label.indexOf(N)||Y&&p(O,W.cell,N))||null!=O&&(O.test(label)||-Y&&p(O,W.cell,N)))if(n&&(null!=O?(Y=label.match(O),null!=Y&&0<Y.length&&(v=Y[0].toLowerCase(),t=Z+Y.index+v.length)):(v=N,t=Z+label.indexOf(N)+v.length)),U){S=W;break}else null==S&&(S=W)}U=U||W==d}}if(null!=S){if(X==L.length&&V.checked)return d=null,k=!0,F(!0,z,I);d=S;E.scrollCellToVisible(d.cell);E.isEnabled()&&!E.isCellLocked(d.cell)?I||E.getSelectionCell()==d.cell&&1==E.getSelectionCount()||E.setSelectionCell(d.cell):E.highlightCell(d.cell)}else{if(!m&&V.checked)return k=!0,F(!0,z,I);E.isEnabled()&&-!I&&E.clearSelection()}g=null!=S;n&&!m&&u();return 0==N.length||null!=S}var H=b.actions.get("findReplace"),E=b.editor.graph,K=null,d=null,g=!1,k=!1,v=null,t=0,x=1,A=document.createElement("div");A.style.userSelect="none";A.style.overflow="hidden";A.style.padding="10px";A.style.height="100%";var J=n?"260px":"200px",D=document.createElement("input");D.setAttribute("placeholder",mxResources.get("find"));D.setAttribute("type","text");D.style.marginTop="4px";D.style.marginBottom="6px";D.style.width=J;-D.style.fontSize="12px";D.style.borderRadius="4px";D.style.padding="6px";A.appendChild(D);mxUtils.br(A);if(n){var G=document.createElement("input");G.setAttribute("placeholder",mxResources.get("replaceWith"));G.setAttribute("type","text");G.style.marginTop="4px";G.style.marginBottom="6px";G.style.width=J;G.style.fontSize="12px";G.style.borderRadius="4px";G.style.padding="6px";A.appendChild(G);mxUtils.br(A);mxEvent.addListener(G,"input",u)}var R=document.createElement("input");R.setAttribute("id",-"geFindWinRegExChck");R.setAttribute("type","checkbox");R.style.marginRight="4px";A.appendChild(R);J=document.createElement("label");J.setAttribute("for","geFindWinRegExChck");A.appendChild(J);mxUtils.write(J,mxResources.get("regularExpression"));A.appendChild(J);J=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");J.style.position="relative";J.style.marginLeft="6px";J.style.top="3px";A.appendChild(J);mxUtils.br(A);var V=document.createElement("input");V.setAttribute("id","geFindWinAllPagesChck");-V.setAttribute("type","checkbox");V.style.marginRight="4px";A.appendChild(V);J=document.createElement("label");J.setAttribute("for","geFindWinAllPagesChck");A.appendChild(J);mxUtils.write(J,mxResources.get("allPages"));A.appendChild(J);var Q=document.createElement("div");mxUtils.br(A);J=document.createElement("div");J.style.left="0px";J.style.right="0px";J.style.marginTop="6px";J.style.padding="0 6px 0 6px";J.style.textAlign="center";A.appendChild(J);var P=mxUtils.button(mxResources.get("reset"),-function(){y.innerText="";D.value="";D.style.backgroundColor="";n&&(G.value="",u());K=d=null;k=!1;D.focus()});P.setAttribute("title",mxResources.get("reset"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow="ellipsis";P.className="geBtn";n||J.appendChild(P);var q=mxUtils.button(mxResources.get("find"),function(){try{D.style.backgroundColor=F()?"":"light-dark(#ffcfcf, #ff0000)"}catch(m){b.handleError(m)}});q.setAttribute("title",-mxResources.get("find")+" (Enter)");q.style.float="none";q.style.width="120px";q.style.marginTop="6px";q.style.marginLeft="8px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";q.className="geBtn gePrimaryBtn";J.appendChild(q);var y=document.createElement("div");y.style.marginTop="10px";if(n){var B=function(m,z,I,L,N){if(null==N||"1"!=N.html)return L=m.toLowerCase().indexOf(z,L),0>L?m:m.substr(0,L)+I+m.substr(L+z.length);var O=m;z=mxUtils.htmlEntities(z,!1,!1,!1);N=[];var S=-1;for(m=m.replace(/<br>/ig,-"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(S=m.indexOf("<",S+1));)N.push(S);S=m.match(/<[^>]*>/g);m=m.replace(/<[^>]*>/g,"");L=m.toLowerCase().indexOf(z,L);if(0>L)return O;O=L+z.length;I=mxUtils.htmlEntities(I);m=m.substr(0,L)+I+m.substr(O);for(var U=0,W=0;W<N.length;W++){if(N[W]-U<L)m=m.substr(0,N[W])+S[W]+m.substr(N[W]);else{var X=N[W]-U<O?L+U:N[W]+(I.length-z.length);m=m.substr(0,X)+S[W]+m.substr(X)}U+=S[W].length}return m.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,-"$1").replace(/\n/g,"<br>")},C=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=v&&null!=d){var m=d.cell,z=E.getLabel(m);E.isCellEditable(m)&&E.model.setValue(m,B(z,v,G.value,t-v.length,E.getCurrentCellStyle(m)));D.style.backgroundColor=F(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(I){b.handleError(I)}});C.setAttribute("title",mxResources.get("replFind"));C.style.float="none";C.style.width="120px";C.style.marginTop="6px";C.style.marginLeft="8px";C.style.overflow="hidden";C.style.textOverflow=-"ellipsis";C.className="geBtn gePrimaryBtn";C.setAttribute("disabled","disabled");J.appendChild(C);mxUtils.br(J);var M=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=v&&null!=d){var m=d.cell,z=E.getLabel(m);E.model.setValue(m,B(z,v,G.value,t-v.length,E.getCurrentCellStyle(m)));C.setAttribute("disabled","disabled");M.setAttribute("disabled","disabled")}}catch(I){b.handleError(I)}});M.setAttribute("title",mxResources.get("replace"));M.style.float="none";M.style.width="120px";M.style.marginTop=-"6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn gePrimaryBtn";M.setAttribute("disabled","disabled");J.appendChild(M);var T=mxUtils.button(mxResources.get("replaceAll"),function(){y.innerText="";K=null;var m=b.currentPage,z=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;E.getModel().beginUpdate();try{for(var I=0,L={};F(!1,!0,!0)&&100>I;){var N=d.cell,O=E.getLabel(N),S=L[N.id];if(S&&S.replAllMrk==x&&S.replAllPos>=t)break;L[N.id]=-{replAllMrk:x,replAllPos:t};E.isCellEditable(N)&&(E.model.setValue(N,B(O,v,G.value,t-v.length,E.getCurrentCellStyle(N))),I++)}m!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,m));mxUtils.write(y,mxResources.get("matchesRepl",[I]))}catch(U){b.handleError(U)}finally{E.getModel().endUpdate(),b.editor.graph.setSelectionCells(z),b.editor.graph.rendering=!0}x++});T.setAttribute("title",mxResources.get("replaceAll"));T.style.float="none";T.style.width="120px";T.style.marginTop="6px";T.style.marginLeft=-"8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");J.appendChild(T);mxUtils.br(J);J.appendChild(P);P=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));P.setAttribute("title",mxResources.get("close"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow="ellipsis";P.className="geBtn";-J.appendChild(P);mxUtils.br(J);J.appendChild(y)}else P.style.width="90px",q.style.width="90px";mxEvent.addListener(D,"keyup",function(m){if(91==m.keyCode||93==m.keyCode||17==m.keyCode)mxEvent.consume(m);else if(27==m.keyCode)H.funct();else if(K!=D.value.toLowerCase()||13==m.keyCode)try{D.style.backgroundColor=F()?"":"light-dark(#ffcfcf, #ff0000)"}catch(z){D.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(A,"keydown",function(m){70==m.keyCode&&b.keyHandler.isControlDown(m)&&+null;if(null!=e&&0<e.length){n.style.cursor="move";var Q=document.createElement("table");Q.style.borderWidth="1px";Q.style.borderStyle="solid";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%";var R=document.createElement("tbody"),V=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(F=mxUtils.indexOf(b.pages,b.currentPage));for(t=e.length-1;0<=t;t--){var W=function(X){var Z=new Date(X.modifiedDate),Y=null;if(0<=Z.getTime()){var ba=function(ca){d.stop();+p.innerText="";var ea=mxUtils.parseXml(ca),aa=b.editor.extractGraphModel(ea.documentElement,!0);if(null!=aa){var fa=function(wa){null!=wa&&(wa=ia(Editor.parseDiagramNode(wa)));return wa},ia=function(wa){var qa=wa.getAttribute("background");if(null==qa||""==qa||qa==mxConstants.NONE)qa=v.defaultPageBackgroundColor;n.style.backgroundColor=mxUtils.getLightDarkColor(qa);(new mxCodec(wa.ownerDocument)).decode(wa,v.getModel());v.maxFitScale=1;v.fit(8);v.center();v.mathEnabled="1"==wa.getAttribute("math");+v.setAdaptiveColors(wa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&v.mathEnabled&&Editor.MathJaxRender(v.container);return wa};T.style.display="none";T.innerText="";J=ea;D=ca;H=parseSelectFunction=null;E=0;if("mxfile"==aa.nodeName){ea=aa.getElementsByTagName("diagram");H=[];for(ca=0;ca<ea.length;ca++)H.push(ea[ca]);E=Math.min(F,H.length-1);0<H.length&&fa(H[E]);if(1<H.length)for(T.removeAttribute("disabled"),T.style.display="",ca=0;ca<H.length;ca++){ea=document.createElement("option");ea.setAttribute("title",+na+" ("+H[ca].getAttribute("id")+")");ea.setAttribute("value",ca);var na=H[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);aa=b.getPageById(H[ca].getAttribute("id"));var pa="";if(null!=aa){var ha=new DiagramPage(H[ca]);b.getHashValueForPages([aa])!=b.getHashValueForPages([ha])&&(pa=" (M)")}else pa=" (X)";mxUtils.write(ea,na+pa);ca==E&&ea.setAttribute("selected","selected");T.appendChild(ea)}m=function(){try{var wa=parseInt(T.value);E=F=wa;fa(H[wa])}catch(qa){T.value=F,b.handleError(qa)}}}else ia(aa);+na=X.lastModifyingUserName;null!=na&&20<na.length&&(na=na.substring(0,20)+"...");B.innerText="";mxUtils.write(B,(null!=na?na+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());B.setAttribute("title",Y.getAttribute("title"));G.removeAttribute("disabled");S.removeAttribute("disabled");U.removeAttribute("disabled");P.removeAttribute("disabled");O.removeAttribute("disabled");null!=g&&g.isRestricted()||(b.editor.graph.isEnabled()&&M.removeAttribute("disabled"),z.removeAttribute("disabled"),I.removeAttribute("disabled"));+mxUtils.setOpacity(G,60);mxUtils.setOpacity(S,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(P,60);mxUtils.setOpacity(O,60)}else T.style.display="none",T.innerText="",B.innerText="",p.innerText="",mxUtils.write(B,mxResources.get("errorLoadingFile")),mxUtils.write(p,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottomWidth="1px";Y.style.borderBottomStyle="solid";Y.style.fontSize="12px";Y.style.cursor="pointer";var da=document.createElement("td");da.style.padding=+"6px";da.style.whiteSpace="nowrap";X==e[e.length-1]?mxUtils.write(da,mxResources.get("current")):Z.toDateString()===V?mxUtils.write(da,Z.toLocaleTimeString()):mxUtils.write(da,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());Y.appendChild(da);Y.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ca){A!=X&&(d.stop(),+null!=x&&(x.style.backgroundColor=""),A=X,x=Y,x.style.backgroundColor="light-dark(#ebf2f9, #000000)",D=J=null,B.removeAttribute("title"),B.innerText=mxResources.get("loading")+"...",n.style.backgroundColor=v.defaultPageBackgroundColor,p.innerText="",v.getModel().clear(),M.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),z.setAttribute("disabled",+"disabled"),T.setAttribute("disabled","disabled"),mxUtils.setOpacity(G,20),mxUtils.setOpacity(S,20),mxUtils.setOpacity(U,20),mxUtils.setOpacity(P,20),mxUtils.setOpacity(O,20),d.spin(n),X.getXml(function(ea){if(A==X)try{ba(ea)}catch(aa){B.innerText=mxResources.get("error")+": "+aa.message}},function(ea){d.stop();T.style.display="none";T.innerText="";B.innerText="";mxUtils.write(B,mxResources.get("errorLoadingFile"));mxUtils.write(p,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(Y,+"dblclick",function(ca){z.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);R.appendChild(Y)}return Y}(e[t]);null!=W&&t==e.length-1&&(N=W)}Q.appendChild(R);l.appendChild(Q)}else null==g||null==b.drive&&g.constructor==window.DriveFile||null==b.dropbox&&g.constructor==window.DropboxFile?(n.style.display="none",L.style.display="none",mxUtils.write(l,mxResources.get("notAvailable"))):(n.style.display="none",L.style.display=+"none",mxUtils.write(l,mxResources.get("noRevisions")));this.init=function(){null!=N&&N.click()};l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";L.appendChild(B);L.appendChild(P);L.appendChild(S);L.appendChild(U);L.appendChild(G);L.appendChild(T);L.appendChild(O);b.editor.cancelFirst&&k.appendChild(l);k.appendChild(z);null!=g&&g.constructor==DriveFile&&k.appendChild(I);k.appendChild(M);b.editor.cancelFirst||k.appendChild(l);c.appendChild(k);c.appendChild(L);+this.container=c},DraftDialog=function(b,e,f,c,l,n,p,v,F){var H=document.createElement("div"),E=document.createElement("div");E.style.marginTop="0px";E.style.whiteSpace="nowrap";E.style.overflow="auto";E.style.lineHeight="normal";mxUtils.write(E,e);H.appendChild(E);var K=document.createElement("select"),d=mxUtils.bind(this,function(){"-1"==K.value?(K.value=K.options[0].value,d(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var P=this,O;return $jscomp.asyncExecutePromiseGeneratorProgram(function(q){for(O=+0;O<F.length;O++)l.apply(P,[O,mxUtils.bind(P,function(){})]);b.hideDialog(!0);q.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(A=mxUtils.parseXml(F[K.value].data),J=b.editor.extractGraphModel(A.documentElement,!0),D=0,this.init())});if(null!=F){K.style.marginLeft="4px";for(e=0;e<F.length;e++){var g=document.createElement("option");g.setAttribute("value",e);var k=new Date(F[e].created),u=new Date(F[e].modified);mxUtils.write(g,k.toLocaleDateString()+" "+k.toLocaleTimeString()+" - "++(k.toDateString(),u.toDateString(),u.toLocaleDateString())+" "+u.toLocaleTimeString());K.appendChild(g)}g=document.createElement("option");g.setAttribute("value","-1");mxUtils.write(g,mxResources.get("deleteAll"));K.appendChild(g);E.appendChild(K);mxEvent.addListener(K,"change",d)}null==f&&(f=F[0].data);var t=document.createElement("div");t.style.position="absolute";t.style.border="1px solid lightGray";t.style.marginTop="10px";t.style.left="40px";t.style.right="40px";t.style.top="46px";t.style.bottom=+"74px";t.style.overflow="hidden";mxEvent.disableContextMenu(t);H.appendChild(t);var x=new Graph(t);x.setEnabled(!1);x.setPanning(!0);x.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";x.panningHandler.ignoreCell=!0;x.panningHandler.useLeftButtonForPanning=!0;x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;var A=mxUtils.parseXml(f),J=b.editor.extractGraphModel(A.documentElement,!0),D=0,G=null,S=x.getGlobalVariable;x.getGlobalVariable=function(P){return"page"==P&&null!=G&&null!=G[D]?G[D].getAttribute("name"):+"pagenumber"==P?D+1:"pagecount"==P?null!=G?G.length:1:S.apply(this,arguments)};x.getLinkForCell=function(){return null};f=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){x.zoomIn()},20);E=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){x.zoomOut()},20);e=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==x.view.scale?(x.maxFitScale=8,x.fit(8)):x.zoomActual();x.center()},20);p=mxUtils.button(p||mxResources.get("discard"),+function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var P=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(O){l.apply(P,[K.value,mxUtils.bind(P,function(){null!=K.parentNode&&(K.options[K.selectedIndex].parentNode.removeChild(K.options[K.selectedIndex]),1<K.options.length?(K.value=K.options[0].value,d()):b.hideDialog(!0))})]);O.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});p.className="geBtn";var U=document.createElement("select");+U.style.maxWidth="80px";U.style.position="relative";U.style.top="-2px";U.style.verticalAlign="bottom";U.style.marginRight="6px";U.style.display="none";n=mxUtils.button(n||mxResources.get("edit"),function(){c.apply(this,[K.value])});n.className="geBtn gePrimaryBtn";g=document.createElement("div");g.style.position="absolute";g.style.bottom="30px";g.style.right="40px";g.style.textAlign="right";k=document.createElement("div");k.className="geToolbarContainer";k.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";+this.init=function(){function P(B){if(null!=B){var C=B.getAttribute("background");if(null==C||""==C||C==mxConstants.NONE)C="light-dark(#ffffff, transparent)";t.style.backgroundColor=C;(new mxCodec(B.ownerDocument)).decode(B,x.getModel());x.maxFitScale=1;x.fit(8);x.center()}return B}function O(B){null!=B&&(B=P(Editor.parseDiagramNode(B)));return B}mxEvent.addListener(U,"change",function(B){D=parseInt(U.value);O(G[D]);mxEvent.consume(B)});if("mxfile"==J.nodeName){var q=J.getElementsByTagName("diagram");+G=[];for(var y=0;y<q.length;y++)G.push(q[y]);0<G.length&&O(G[D]);U.innerText="";if(1<G.length)for(U.style.display="",y=0;y<G.length;y++)q=document.createElement("option"),mxUtils.write(q,G[y].getAttribute("name")||mxResources.get("pageWithNumber",[y+1])),q.setAttribute("value",y),y==D&&q.setAttribute("selected","selected"),U.appendChild(q);else U.style.display="none"}else P(J)};k.appendChild(U);k.appendChild(f);k.appendChild(E);k.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});+f.className="geBtn";v=null!=v?mxUtils.button(mxResources.get("ignore"),v):null;null!=v&&(v.className="geBtn");b.editor.cancelFirst?(g.appendChild(f),null!=v&&g.appendChild(v),g.appendChild(p),g.appendChild(n)):(g.appendChild(n),g.appendChild(p),null!=v&&g.appendChild(v),g.appendChild(f));H.appendChild(g);H.appendChild(k);this.container=H},FindWindow=function(b,e,f,c,l,n){function p(m,z,I){if("object"===typeof z.value&&null!=z.value.attributes){z=z.value.attributes;for(var L=0;L<z.length;L++)if("label"!=+z[L].nodeName){var N=mxUtils.trim(z[L].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==m&&0<=N.indexOf(I)||null!=m&&m.test(N))return!0}}return!1}function v(){g?(C.removeAttribute("disabled"),M.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"));D.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled")}function F(m,z,I){y.innerText="";var L=E.model.getDescendants(E.model.getRoot()),N=D.value.toLowerCase(),+Q=S.checked?new RegExp(N):null,R=null;u=null;K!=N&&(K=N,d=null,k=!1);var V=null==d;if(0<N.length){if(k){k=!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}m=(W+1)%b.pages.length;d=null;do k=!1,L=b.pages[m],E=b.createTemporaryGraph(E.getStylesheet()),b.updatePageRoot(L),E.model.setRoot(L.root),m=(m+1)%b.pages.length;while(!F(!0,z,I)&&m!=W);d&&(d=null,I?b.editor.graph.model.execute(new SelectPage(b,L)):b.selectPage(L));k=!1;E=b.editor.graph;return F(!0,z,I)}for(X=0;X<L.length;X++){W=+E.view.getState(L[X]);z&&(V=V||W==d);if(null!=W&&null!=W.cell.value&&(V||null==R)&&(E.model.isVertex(W.cell)||E.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(P.innerHTML=E.sanitizeHtml(E.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([P])):label=E.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;z&&n&&W==d&&(label=label.substr(t),Z=t);var Y=""==G.value;if(null==Q&&(0<=label.indexOf(N)||Y&&p(Q,W.cell,N))||null!=Q&&(Q.test(label)||+Y&&p(Q,W.cell,N)))if(n&&(null!=Q?(Y=label.match(Q),null!=Y&&0<Y.length&&(u=Y[0].toLowerCase(),t=Z+Y.index+u.length)):(u=N,t=Z+label.indexOf(N)+u.length)),V){R=W;break}else null==R&&(R=W)}V=V||W==d}}if(null!=R){if(X==L.length&&U.checked)return d=null,k=!0,F(!0,z,I);d=R;E.scrollCellToVisible(d.cell);E.isEnabled()&&!E.isCellLocked(d.cell)?I||E.getSelectionCell()==d.cell&&1==E.getSelectionCount()||E.setSelectionCell(d.cell):E.highlightCell(d.cell)}else{if(!m&&U.checked)return k=!0,F(!0,z,I);E.isEnabled()&&+!I&&E.clearSelection()}g=null!=R;n&&!m&&v();return 0==N.length||null!=R}var H=b.actions.get("findReplace"),E=b.editor.graph,K=null,d=null,g=!1,k=!1,u=null,t=0,x=1,A=document.createElement("div");A.style.userSelect="none";A.style.overflow="hidden";A.style.padding="10px";A.style.height="100%";var J=n?"260px":"200px",D=document.createElement("input");D.setAttribute("placeholder",mxResources.get("find"));D.setAttribute("type","text");D.style.marginTop="4px";D.style.marginBottom="6px";D.style.width=J;+D.style.fontSize="12px";D.style.borderRadius="4px";D.style.padding="6px";A.appendChild(D);mxUtils.br(A);if(n){var G=document.createElement("input");G.setAttribute("placeholder",mxResources.get("replaceWith"));G.setAttribute("type","text");G.style.marginTop="4px";G.style.marginBottom="6px";G.style.width=J;G.style.fontSize="12px";G.style.borderRadius="4px";G.style.padding="6px";A.appendChild(G);mxUtils.br(A);mxEvent.addListener(G,"input",v)}var S=document.createElement("input");S.setAttribute("id",+"geFindWinRegExChck");S.setAttribute("type","checkbox");S.style.marginRight="4px";A.appendChild(S);J=document.createElement("label");J.setAttribute("for","geFindWinRegExChck");A.appendChild(J);mxUtils.write(J,mxResources.get("regularExpression"));A.appendChild(J);J=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");J.style.position="relative";J.style.marginLeft="6px";J.style.top="3px";A.appendChild(J);mxUtils.br(A);var U=document.createElement("input");U.setAttribute("id","geFindWinAllPagesChck");+U.setAttribute("type","checkbox");U.style.marginRight="4px";A.appendChild(U);J=document.createElement("label");J.setAttribute("for","geFindWinAllPagesChck");A.appendChild(J);mxUtils.write(J,mxResources.get("allPages"));A.appendChild(J);var P=document.createElement("div");mxUtils.br(A);J=document.createElement("div");J.style.left="0px";J.style.right="0px";J.style.marginTop="6px";J.style.padding="0 6px 0 6px";J.style.textAlign="center";A.appendChild(J);var O=mxUtils.button(mxResources.get("reset"),+function(){y.innerText="";D.value="";D.style.backgroundColor="";n&&(G.value="",v());K=d=null;k=!1;D.focus()});O.setAttribute("title",mxResources.get("reset"));O.style.float="none";O.style.width="120px";O.style.marginTop="6px";O.style.marginLeft="8px";O.style.overflow="hidden";O.style.textOverflow="ellipsis";O.className="geBtn";n||J.appendChild(O);var q=mxUtils.button(mxResources.get("find"),function(){try{D.style.backgroundColor=F()?"":"light-dark(#ffcfcf, #ff0000)"}catch(m){b.handleError(m)}});q.setAttribute("title",+mxResources.get("find")+" (Enter)");q.style.float="none";q.style.width="120px";q.style.marginTop="6px";q.style.marginLeft="8px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";q.className="geBtn gePrimaryBtn";J.appendChild(q);var y=document.createElement("div");y.style.marginTop="10px";if(n){var B=function(m,z,I,L,N){if(null==N||"1"!=N.html)return L=m.toLowerCase().indexOf(z,L),0>L?m:m.substr(0,L)+I+m.substr(L+z.length);var Q=m;z=mxUtils.htmlEntities(z,!1,!1,!1);N=[];var R=-1;for(m=m.replace(/<br>/ig,+"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(R=m.indexOf("<",R+1));)N.push(R);R=m.match(/<[^>]*>/g);m=m.replace(/<[^>]*>/g,"");L=m.toLowerCase().indexOf(z,L);if(0>L)return Q;Q=L+z.length;I=mxUtils.htmlEntities(I);m=m.substr(0,L)+I+m.substr(Q);for(var V=0,W=0;W<N.length;W++){if(N[W]-V<L)m=m.substr(0,N[W])+R[W]+m.substr(N[W]);else{var X=N[W]-V<Q?L+V:N[W]+(I.length-z.length);m=m.substr(0,X)+R[W]+m.substr(X)}V+=R[W].length}return m.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,+"$1").replace(/\n/g,"<br>")},C=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=u&&null!=d){var m=d.cell,z=E.getLabel(m);E.isCellEditable(m)&&E.model.setValue(m,B(z,u,G.value,t-u.length,E.getCurrentCellStyle(m)));D.style.backgroundColor=F(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(I){b.handleError(I)}});C.setAttribute("title",mxResources.get("replFind"));C.style.float="none";C.style.width="120px";C.style.marginTop="6px";C.style.marginLeft="8px";C.style.overflow="hidden";C.style.textOverflow=+"ellipsis";C.className="geBtn gePrimaryBtn";C.setAttribute("disabled","disabled");J.appendChild(C);mxUtils.br(J);var M=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=u&&null!=d){var m=d.cell,z=E.getLabel(m);E.model.setValue(m,B(z,u,G.value,t-u.length,E.getCurrentCellStyle(m)));C.setAttribute("disabled","disabled");M.setAttribute("disabled","disabled")}}catch(I){b.handleError(I)}});M.setAttribute("title",mxResources.get("replace"));M.style.float="none";M.style.width="120px";M.style.marginTop=+"6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn gePrimaryBtn";M.setAttribute("disabled","disabled");J.appendChild(M);var T=mxUtils.button(mxResources.get("replaceAll"),function(){y.innerText="";K=null;var m=b.currentPage,z=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;E.getModel().beginUpdate();try{for(var I=0,L={};F(!1,!0,!0)&&100>I;){var N=d.cell,Q=E.getLabel(N),R=L[N.id];if(R&&R.replAllMrk==x&&R.replAllPos>=t)break;L[N.id]=+{replAllMrk:x,replAllPos:t};E.isCellEditable(N)&&(E.model.setValue(N,B(Q,u,G.value,t-u.length,E.getCurrentCellStyle(N))),I++)}m!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,m));mxUtils.write(y,mxResources.get("matchesRepl",[I]))}catch(V){b.handleError(V)}finally{E.getModel().endUpdate(),b.editor.graph.setSelectionCells(z),b.editor.graph.rendering=!0}x++});T.setAttribute("title",mxResources.get("replaceAll"));T.style.float="none";T.style.width="120px";T.style.marginTop="6px";T.style.marginLeft=+"8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");J.appendChild(T);mxUtils.br(J);J.appendChild(O);O=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));O.setAttribute("title",mxResources.get("close"));O.style.float="none";O.style.width="120px";O.style.marginTop="6px";O.style.marginLeft="8px";O.style.overflow="hidden";O.style.textOverflow="ellipsis";O.className="geBtn";+J.appendChild(O);mxUtils.br(J);J.appendChild(y)}else O.style.width="90px",q.style.width="90px";mxEvent.addListener(D,"keyup",function(m){if(91==m.keyCode||93==m.keyCode||17==m.keyCode)mxEvent.consume(m);else if(27==m.keyCode)H.funct();else if(K!=D.value.toLowerCase()||13==m.keyCode)try{D.style.backgroundColor=F()?"":"light-dark(#ffcfcf, #ff0000)"}catch(z){D.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(A,"keydown",function(m){70==m.keyCode&&b.keyHandler.isControlDown(m)&&!mxEvent.isShiftDown(m)&&(H.funct(),mxEvent.consume(m))});this.window=new mxWindow(mxResources.get("find")+(n?"/"+mxResources.get("replace"):""),A,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null),-null!=b.pages&&1<b.pages.length?V.removeAttribute("disabled"):(V.checked=!1,V.setAttribute("disabled","disabled"))):E.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,e,f,c,l,n){var p=b.editor.graph,u=document.createElement("div");u.style.textAlign="center";u.style.userSelect="none";u.style.overflow="hidden";u.style.height="100%";if(n){var F=function(){var k=p.freehand.getStrokeColor(!0);null!=k&&k!=mxConstants.NONE&&1<k.length&&"string"===typeof k&&("default"==k?k=-mxResources.get("useBlackAndWhite"):(k="#"==k.charAt(0)?k.substring(1).toUpperCase():k,k=ColorDialog.prototype.colorNames[k]),null!=k&&K.setAttribute("title",k))},H=document.createElement("input");H.setAttribute("id","geFreehandBrush");H.setAttribute("type","checkbox");H.checked=p.freehand.isPerfectFreehandMode();H.style.margin="10px 5px 0px 10px";H.style.float="left";u.appendChild(H);p.freehand.setPerfectFreehandMode(H.checked);var E=document.createElement("label");E.setAttribute("for","geFreehandBrush");-E.style.float="left";E.style.marginTop="10px";u.appendChild(E);mxUtils.write(E,mxResources.get("brush"));u.appendChild(E);var K=document.createElement("tempDiv");K.style.display="block";K.style.width="100%";K.style.height="100%";K.style.borderRadius="2px";K.style.boxSizing="border-box";K.style.border="1px solid black";K.style.backgroundColor=p.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){K.style.backgroundColor=p.freehand.getStrokeColor()});F();E=mxUtils.button("",mxUtils.bind(this,-function(k){b.pickColor(p.freehand.getStrokeColor(!0),function(v){p.freehand.setStrokeColor(v);K.style.backgroundColor=p.freehand.getStrokeColor();F()},"default");mxEvent.consume(k)}));E.style.position="absolute";E.style.boxSizing="border-box";E.style.padding="2px";E.style.top="8px";E.style.right="8px";E.style.width="28px";E.style.height="18px";E.className="geColorBtn";E.innerText="";E.appendChild(K);u.appendChild(E);E=document.createElement("img");E.setAttribute("title",mxResources.get("settings"));-E.setAttribute("src",Editor.gearImage);E.className="geToolbarButton geAdaptiveAsset";E.style.position="absolute";E.style.boxSizing="border-box";E.style.padding="2px";E.style.top="8px";E.style.right="38px";E.style.width="18px";E.style.height="18px";E.style.opacity="0.6";u.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(k){k=p.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",k,function(v){!isNaN(v)&&0<v&&20>=v&&p.freehand.setSmoothing(parseInt(v))})}));-mxUtils.br(u);var d=document.createElement("input");d.setAttribute("type","range");d.setAttribute("min","2");d.setAttribute("max","30");d.setAttribute("value",p.freehand.getBrushSize());d.style.width="90%";d.style.visibility="hidden";u.appendChild(d);mxUtils.br(u);E=function(){p.freehand.setPerfectFreehandMode(H.checked);d.style.visibility=H.checked?"visible":"hidden"};mxEvent.addListener(H,"change",E);E();mxEvent.addListener(d,"change",function(){p.freehand.setBrushSize(parseInt(this.value))})}var g=-mxUtils.button(mxResources.get("startDrawing"),function(){p.freehand.isDrawing()?p.freehand.stopDrawing():p.freehand.startDrawing()});g.setAttribute("title",mxResources.get("startDrawing")+" (X)");g.style.margin=n?"5px 0 0 0":"10px 0 0 0";g.style.width="90%";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.style.textAlign="center";g.className="geBtn gePrimaryBtn";u.appendChild(g);this.window=new mxWindow(mxResources.get("freehand"),u,e,f,c,l,!0,!0);this.window.destroyOnClose=+null!=b.pages&&1<b.pages.length?U.removeAttribute("disabled"):(U.checked=!1,U.setAttribute("disabled","disabled"))):E.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,e,f,c,l,n){var p=b.editor.graph,v=document.createElement("div");v.style.textAlign="center";v.style.userSelect="none";v.style.overflow="hidden";v.style.height="100%";if(n){var F=function(){var k=p.freehand.getStrokeColor(!0);null!=k&&k!=mxConstants.NONE&&1<k.length&&"string"===typeof k&&("default"==k?k=+mxResources.get("useBlackAndWhite"):(k="#"==k.charAt(0)?k.substring(1).toUpperCase():k,k=ColorDialog.prototype.colorNames[k]),null!=k&&K.setAttribute("title",k))},H=document.createElement("input");H.setAttribute("id","geFreehandBrush");H.setAttribute("type","checkbox");H.checked=p.freehand.isPerfectFreehandMode();H.style.margin="10px 5px 0px 10px";H.style.float="left";v.appendChild(H);p.freehand.setPerfectFreehandMode(H.checked);var E=document.createElement("label");E.setAttribute("for","geFreehandBrush");+E.style.float="left";E.style.marginTop="10px";v.appendChild(E);mxUtils.write(E,mxResources.get("brush"));v.appendChild(E);var K=document.createElement("tempDiv");K.style.display="block";K.style.width="100%";K.style.height="100%";K.style.borderRadius="2px";K.style.boxSizing="border-box";K.style.border="1px solid black";K.style.backgroundColor=p.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){K.style.backgroundColor=p.freehand.getStrokeColor()});F();E=mxUtils.button("",mxUtils.bind(this,+function(k){b.pickColor(p.freehand.getStrokeColor(!0),function(u){p.freehand.setStrokeColor(u);K.style.backgroundColor=p.freehand.getStrokeColor();F()},"default");mxEvent.consume(k)}));E.style.position="absolute";E.style.boxSizing="border-box";E.style.padding="2px";E.style.top="8px";E.style.right="8px";E.style.width="28px";E.style.height="18px";E.className="geColorBtn";E.innerText="";E.appendChild(K);v.appendChild(E);E=document.createElement("img");E.setAttribute("title",mxResources.get("settings"));+E.setAttribute("src",Editor.gearImage);E.className="geToolbarButton geAdaptiveAsset";E.style.position="absolute";E.style.boxSizing="border-box";E.style.padding="2px";E.style.top="8px";E.style.right="38px";E.style.width="18px";E.style.height="18px";E.style.opacity="0.6";v.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(k){k=p.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",k,function(u){!isNaN(u)&&0<u&&20>=u&&p.freehand.setSmoothing(parseInt(u))})}));+mxUtils.br(v);var d=document.createElement("input");d.setAttribute("type","range");d.setAttribute("min","2");d.setAttribute("max","30");d.setAttribute("value",p.freehand.getBrushSize());d.style.width="90%";d.style.visibility="hidden";v.appendChild(d);mxUtils.br(v);E=function(){p.freehand.setPerfectFreehandMode(H.checked);d.style.visibility=H.checked?"visible":"hidden"};mxEvent.addListener(H,"change",E);E();mxEvent.addListener(d,"change",function(){p.freehand.setBrushSize(parseInt(this.value))})}var g=+mxUtils.button(mxResources.get("startDrawing"),function(){p.freehand.isDrawing()?p.freehand.stopDrawing():p.freehand.startDrawing()});g.setAttribute("title",mxResources.get("startDrawing")+" (X)");g.style.margin=n?"5px 0 0 0":"10px 0 0 0";g.style.width="90%";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.style.textAlign="center";g.className="geBtn gePrimaryBtn";v.appendChild(g);this.window=new mxWindow(mxResources.get("freehand"),v,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);p.addListener("freehandStateChanged",mxUtils.bind(this,function(){g.innerText="";mxUtils.write(g,mxResources.get(p.freehand.isDrawing()?"stopDrawing":"startDrawing"));var k=document.createElement("span");k.style.opacity="0.7";k.style["float"]="right";mxUtils.write(k,"X");g.appendChild(k);g.setAttribute("title",mxResources.get(p.freehand.isDrawing()?"stopDrawing":"startDrawing")+" (X)");g.className="geBtn"+(p.freehand.isDrawing()?-" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){p.freehand.isDrawing()&&p.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,e,f,c,l){var n=b.editor.graph,p=document.createElement("div");p.style.userSelect="none";p.style.overflow="hidden";p.style.height="100%";var u=document.createElement("div");u.style.display="flex";u.style.alignItems="center";-u.style.justifyContent="center";u.style.paddingTop="20px";var F=document.createElement("input");F.setAttribute("type","checkbox");F.style.marginRight="4px";F.checked=!0;var H=document.createElement("input");H.setAttribute("type","checkbox");H.style.marginRight="4px";H.checked=!0;var E=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(n.isSelectionEmpty()?n.getVerticesAndEdges():n.getSelectionCells(),F.checked,H.checked)}));-E.setAttribute("title","Convert Colors");E.className="geBtn gePrimaryBtn";u.appendChild(E);p.appendChild(u);u=u.cloneNode(!1);u.appendChild(H);u.style.paddingTop="8px";mxUtils.write(u,mxResources.get("background"));p.appendChild(u);u=u.cloneNode(!1);u.appendChild(F);u.style.paddingTop="8px";mxUtils.write(u,mxResources.get("labels"));p.appendChild(u);this.window=new mxWindow(mxResources.get("adaptiveColors"),p,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);-this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,e,f,c,l){function n(){P=!0;t.value=q;K.isSelectionEmpty()?(A.setAttribute("disabled","disabled"),"selectionOnly"==t.value&&(t.value="includeCopyOfMyDiagram")):A.removeAttribute("disabled");b.isDiagramEmpty()?(x.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==t.value&&(t.value="help")):x.removeAttribute("disabled");-P=!1}function p(B,C,M){var T=document.createElement("button");T.className="geBtn gePrimaryBtn";T.style.padding="4px";T.style.height="auto";T.style.position="relative";"flex"==M?(T.style.overflow="hidden",T.style.textOverflow="ellipsis",T.style.whiteSpace="nowrap",T.style.margin="0px",T.style.flexGrow="1"):(T.style.display="block",T.style.margin="8px",T.style.left="50%",T.style.transform="translateX(-50%)");mxUtils.write(T,B);T.setAttribute("title",B);mxEvent.addListener(T,"click",C);return T}function u(B){var C=+" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){p.freehand.isDrawing()&&p.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,e,f,c,l){var n=b.editor.graph,p=document.createElement("div");p.style.userSelect="none";p.style.overflow="hidden";p.style.height="100%";var v=document.createElement("div");v.style.display="flex";v.style.alignItems="center";+v.style.justifyContent="center";v.style.paddingTop="20px";var F=document.createElement("input");F.setAttribute("type","checkbox");F.style.marginRight="4px";F.checked=!0;var H=document.createElement("input");H.setAttribute("type","checkbox");H.style.marginRight="4px";H.checked=!0;var E=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(n.isSelectionEmpty()?n.getVerticesAndEdges():n.getSelectionCells(),F.checked,H.checked)}));+E.setAttribute("title","Convert Colors");E.className="geBtn gePrimaryBtn";v.appendChild(E);p.appendChild(v);v=v.cloneNode(!1);v.appendChild(H);v.style.paddingTop="8px";mxUtils.write(v,mxResources.get("background"));p.appendChild(v);v=v.cloneNode(!1);v.appendChild(F);v.style.paddingTop="8px";mxUtils.write(v,mxResources.get("labels"));p.appendChild(v);this.window=new mxWindow(mxResources.get("adaptiveColors"),p,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);+this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,e,f,c,l){function n(){O=!0;t.value=q;K.isSelectionEmpty()?(A.setAttribute("disabled","disabled"),"selectionOnly"==t.value&&(t.value="includeCopyOfMyDiagram")):A.removeAttribute("disabled");b.isDiagramEmpty()?(x.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==t.value&&(t.value="help")):x.removeAttribute("disabled");+O=!1}function p(B,C,M){var T=document.createElement("button");T.className="geBtn gePrimaryBtn";T.style.padding="4px";T.style.height="auto";T.style.position="relative";"flex"==M?(T.style.overflow="hidden",T.style.textOverflow="ellipsis",T.style.whiteSpace="nowrap",T.style.margin="0px",T.style.flexGrow="1"):(T.style.display="block",T.style.margin="8px",T.style.left="50%",T.style.transform="translateX(-50%)");mxUtils.write(T,B);T.setAttribute("title",B);mxEvent.addListener(T,"click",C);return T}function v(B){var C=document.createElement("div");C.style.display="block";C.style.position="relative";C.style.backgroundColor="#e0e0e0";C.style.borderRadius="4px";C.style.wordWrap="break-word";C.style.textAlign="left";C.style.padding="6px";C.style.margin="12px";C.style.left="0px";C.style.right="0px";mxUtils.write(C,B);g.appendChild(C);return C}function F(B){var C=B.indexOf("<mxGraphModel "),M=B.indexOf("</mxGraphModel>");0>C&&(C=B.indexOf("<mxGraphModel>"));if(0<=C&&M>C){var T=mxUtils,m=T.trim,z=B.substring(0,C),I=z.indexOf("```");-0<=I&&(z=z.substring(z,0,I+6));T=m.call(T,z);C=B.substring(C,M+15);m=mxUtils;z=m.trim;B=B.substring(M+15);M=B.lastIndexOf("```");0<=M&&(B=B.substring(M+3));return[T,C,z.call(m,B)]}return null}function H(B){var C=u(B);C.style.cursor="pointer";C.style.marginBottom="2px";C.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(C,"click",function(U){Q.value=B;Q.focus()});var M=u("");M.style.marginTop="2px";var T=b.currentPage,m=B,z=[],I=null;if("includeCopyOfMyDiagram"==t.value||"selectionOnly"==-t.value){var L=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==t.value&&(L.isObjectIgnored=function(U){return U.constructor==mxCell&&!K.model.isRoot(U)&&!K.model.isLayer(U)&&!K.isCellSelected(U)&&!K.isAncestorSelected(U)});I=L.encode(K.getModel());L.document.appendChild(I);z.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+mxUtils.getXml(I)})}else"create"==+0<=I&&(z=z.substring(z,0,I+6));T=m.call(T,z);C=B.substring(C,M+15);m=mxUtils;z=m.trim;B=B.substring(M+15);M=B.lastIndexOf("```");0<=M&&(B=B.substring(M+3));return[T,C,z.call(m,B)]}return null}function H(B){var C=v(B);C.style.cursor="pointer";C.style.marginBottom="2px";C.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(C,"click",function(V){P.value=B;P.focus()});var M=v("");M.style.marginTop="2px";var T=b.currentPage,m=B,z=[],I=null;if("includeCopyOfMyDiagram"==t.value||"selectionOnly"==+t.value){var L=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==t.value&&(L.isObjectIgnored=function(V){return V.constructor==mxCell&&!K.model.isRoot(V)&&!K.model.isLayer(V)&&!K.isCellSelected(V)&&!K.isAncestorSelected(V)});I=L.encode(K.getModel());L.document.appendChild(I);z.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+mxUtils.getXml(I)})}else"create"==t.value?(m=D.value.replace(/([A-Z])/g," $1").toLowerCase(),m="Write the declaration code for a "+(""!=m?m:"graph")+' that shows "'+(""!=B?B:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.'):z.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});z.push({role:"user",content:m});var N={model:Editor.gptModel,-messages:z},O=0;for(z=0;z<N.messages.length;z++)O+=N.messages[z].content.match(/\b\w+\b|[^\w\s]|=/g).length;var S=mxUtils.bind(this,function(){M.innerHTML="";mxUtils.write(M,mxResources.get("loading")+"...");var U=document.createElement("img");U.setAttribute("title","Processing "+O+" tokens");U.setAttribute("src",IMAGE_PATH+"/spin.gif");U.style.marginLeft="6px";M.appendChild(U);M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,function(W){var X=-new mxXmlRequest(Editor.gptUrl,JSON.stringify(N),"POST");X.setRequestHeaders=mxUtils.bind(this,function(ba,ea){ba.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);ba.setRequestHeader("Content-Type","application/json")});var Z=mxUtils.bind(this,function(ba){W.clear();M.innerHTML="";mxUtils.write(M,ba.message);M.appendChild(p(mxResources.get("tryAgain"),S));M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(ba)}),Y=mxUtils.bind(this,function(ba){var ea=-F(ba),ca=null!=ea?b.stringToCells(ea[1]):null;if(null!=ca&&0<ca.length){ba=document.createElement("div");ba.style.display="inline-block";ba.style.position="relative";ba.style.transform="translateX(-50%)";ba.style.padding="6px";ba.style.left="50%";var fa=mxUtils.parseXml(ea[1]),aa=new mxCodec(fa),da=new mxGraphModel;aa.decode(fa.documentElement,da);var ia=null;null!=I&&(fa=new mxCodec(I.ownerDocument),ia=new mxGraphModel,fa.decode(I,ia));fa=mxUtils.bind(this,function(pa){K.model.beginUpdate();try{if(null!=-ia&&null!=b.getPageIndex(T)){b.selectPage(T);var oa=b.diffCells(ia.root,da.root);b.patchPage(T,oa,null,!0)}else{var ha=da.getChildren(da.getChildAt(da.getRoot(),0));K.setSelectionCells(K.importCells(ha))}}finally{K.model.endUpdate()}mxEvent.consume(pa)});aa=K.getBoundingBoxFromGeometry(ca);null!=aa?(ba.style.cursor="move",ba.appendChild(b.sidebar.createVertexTemplateFromCells(ca,aa.width,aa.height,"",!0,null,!0,!0,fa,160,120))):(ba.style.padding="14px",mxUtils.write(ba,mxResources.get("noPreview")));-M.innerHTML="";C=M;0<ea[0].length&&(mxUtils.write(C,ea[0]),mxUtils.br(C));C.appendChild(ba);ca=document.createElement("div");ca.style.display="flex";ca.style.gap="6px";ca.style.margin="6px";ca.appendChild(p(mxResources.get("tryAgain"),S,"flex"));ca.appendChild(p(mxResources.get(null!=I?"apply":"insert"),fa,"flex"));M.appendChild(ca);0<ea[2].length&&(mxUtils.br(C),mxUtils.write(C,ea[2]));C.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else M.innerHTML="",C=M,mxUtils.write(C,ba),-M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});X.send(mxUtils.bind(this,function(ba){if(W.clear())try{if(200<=ba.getStatus()&&299>=ba.getStatus()){var ea=JSON.parse(ba.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",N,"response:",ea);var ca=mxUtils.trim(ea.choices[0].message.content);if("create"==t.value){var fa=b.extractMermaidDeclaration(ca);null!=fa?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ia){Y(ia)})),b.generateMermaidImage(fa,null,function(){},-function(ia){mxMermaidToDrawio.resetListeners();Z(ia)})):(Y(ca),M.appendChild(p(mxResources.get("tryAgain"),S)))}else Y(ca)}else{var aa="Error: "+ba.getStatus();try{var da=JSON.parse(ba.getText());null!=da&&null!=da.error&&null!=da.error.message&&(aa=da.error.message)}catch(ia){}M.innerHTML="";mxUtils.write(M,aa);M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ia){Z(ia)}}),Z)}),function(W){M.innerHTML="";mxUtils.write(M,W.message);M.appendChild(p(mxResources.get("tryAgain"),-S));M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});S()}function E(){""!=mxUtils.trim(Q.value)&&(H(Q.value),Q.value="")}var K=b.editor.graph,d=document.createElement("div");d.style.textAlign="center";d.style.overflow="hidden";d.style.height="100%";var g=document.createElement("div");g.style.position="absolute";g.style.overflow="auto";g.style.top="0px";g.style.left="0px";g.style.right="0px";g.style.bottom="104px";d.appendChild(g);var k=document.createElement("div");k.style.position=-"absolute";k.style.boxSizing="border-box";k.style.borderRadius="4px";k.style.border="1px solid lightgray";k.style.margin="8px 8px 16px 8px";k.style.padding="8px";k.style.left="0px";k.style.right="0px";k.style.bottom="0px";k.style.padding="6px";k.style.height="80px";var v=document.createElement("div");v.style.display="flex";v.style.gap="6px";v.style.marginBottom="6px";var t=document.createElement("select");t.style.textOverflow="ellipsis";t.style.flexGrow="1";t.style.padding="4px";t.style.minWidth=-"0";k.appendChild(v);var x=document.createElement("option");x.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(x,mxResources.get("includeCopyOfMyDiagram"));t.appendChild(x);var A=document.createElement("option");A.setAttribute("value","selectionOnly");mxUtils.write(A,mxResources.get("selectionOnly"));t.appendChild(A);v.appendChild(t);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var J=document.createElement("option");J.setAttribute("value","create");mxUtils.write(J,+messages:z},Q=0;for(z=0;z<N.messages.length;z++)Q+=N.messages[z].content.match(/\b\w+\b|[^\w\s]|=/g).length;var R=mxUtils.bind(this,function(){M.innerHTML="";mxUtils.write(M,mxResources.get("loading")+"...");var V=document.createElement("img");V.setAttribute("title","Processing "+Q+" tokens");V.setAttribute("src",IMAGE_PATH+"/spin.gif");V.style.marginLeft="6px";M.appendChild(V);M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,function(W){var X=+new mxXmlRequest(Editor.gptUrl,JSON.stringify(N),"POST");X.setRequestHeaders=mxUtils.bind(this,function(ba,da){ba.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);ba.setRequestHeader("Content-Type","application/json")});var Z=mxUtils.bind(this,function(ba){W.clear();M.innerHTML="";mxUtils.write(M,ba.message);M.appendChild(p(mxResources.get("tryAgain"),R));M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(ba)}),Y=mxUtils.bind(this,function(ba){var da=+F(ba),ca=null!=da?b.stringToCells(da[1]):null;if(null!=ca&&0<ca.length){ba=document.createElement("div");ba.style.display="inline-block";ba.style.position="relative";ba.style.transform="translateX(-50%)";ba.style.padding="6px";ba.style.left="50%";var ea=mxUtils.parseXml(da[1]),aa=new mxCodec(ea),fa=new mxGraphModel;aa.decode(ea.documentElement,fa);var ia=null;null!=I&&(ea=new mxCodec(I.ownerDocument),ia=new mxGraphModel,ea.decode(I,ia));ea=mxUtils.bind(this,function(na){K.model.beginUpdate();try{if(null!=+ia&&null!=b.getPageIndex(T)){b.selectPage(T);var pa=b.diffCells(ia.root,fa.root);b.patchPage(T,pa,null,!0)}else{var ha=fa.getChildren(fa.getChildAt(fa.getRoot(),0));K.setSelectionCells(K.importCells(ha))}}finally{K.model.endUpdate()}mxEvent.consume(na)});aa=K.getBoundingBoxFromGeometry(ca);null!=aa?(ba.style.cursor="move",ba.appendChild(b.sidebar.createVertexTemplateFromCells(ca,aa.width,aa.height,"",!0,null,!0,!0,ea,160,120))):(ba.style.padding="14px",mxUtils.write(ba,mxResources.get("noPreview")));+M.innerHTML="";C=M;0<da[0].length&&(mxUtils.write(C,da[0]),mxUtils.br(C));C.appendChild(ba);ca=document.createElement("div");ca.style.display="flex";ca.style.gap="6px";ca.style.margin="6px";ca.appendChild(p(mxResources.get("tryAgain"),R,"flex"));ca.appendChild(p(mxResources.get(null!=I?"apply":"insert"),ea,"flex"));M.appendChild(ca);0<da[2].length&&(mxUtils.br(C),mxUtils.write(C,da[2]));C.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else M.innerHTML="",C=M,mxUtils.write(C,ba),+M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});X.send(mxUtils.bind(this,function(ba){if(W.clear())try{if(200<=ba.getStatus()&&299>=ba.getStatus()){var da=JSON.parse(ba.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",N,"response:",da);var ca=mxUtils.trim(da.choices[0].message.content);if("create"==t.value){var ea=b.extractMermaidDeclaration(ca);null!=ea?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ia){Y(ia)})),b.generateMermaidImage(ea,null,function(){},+function(ia){mxMermaidToDrawio.resetListeners();Z(ia)})):(Y(ca),M.appendChild(p(mxResources.get("tryAgain"),R)))}else Y(ca)}else{var aa="Error: "+ba.getStatus();try{var fa=JSON.parse(ba.getText());null!=fa&&null!=fa.error&&null!=fa.error.message&&(aa=fa.error.message)}catch(ia){}M.innerHTML="";mxUtils.write(M,aa);M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ia){Z(ia)}}),Z)}),function(W){M.innerHTML="";mxUtils.write(M,W.message);M.appendChild(p(mxResources.get("tryAgain"),+R));M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});R()}function E(){""!=mxUtils.trim(P.value)&&(H(P.value),P.value="")}var K=b.editor.graph,d=document.createElement("div");d.style.textAlign="center";d.style.overflow="hidden";d.style.height="100%";var g=document.createElement("div");g.style.position="absolute";g.style.overflow="auto";g.style.top="0px";g.style.left="0px";g.style.right="0px";g.style.bottom="104px";d.appendChild(g);var k=document.createElement("div");k.style.position=+"absolute";k.style.boxSizing="border-box";k.style.borderRadius="4px";k.style.border="1px solid lightgray";k.style.margin="8px 8px 16px 8px";k.style.padding="8px";k.style.left="0px";k.style.right="0px";k.style.bottom="0px";k.style.padding="6px";k.style.height="80px";var u=document.createElement("div");u.style.display="flex";u.style.gap="6px";u.style.marginBottom="6px";var t=document.createElement("select");t.style.textOverflow="ellipsis";t.style.flexGrow="1";t.style.padding="4px";t.style.minWidth=+"0";k.appendChild(u);var x=document.createElement("option");x.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(x,mxResources.get("includeCopyOfMyDiagram"));t.appendChild(x);var A=document.createElement("option");A.setAttribute("value","selectionOnly");mxUtils.write(A,mxResources.get("selectionOnly"));t.appendChild(A);u.appendChild(t);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var J=document.createElement("option");J.setAttribute("value","create");mxUtils.write(J,mxResources.get("create"));t.appendChild(J)}J=document.createElement("option");J.setAttribute("value","help");mxUtils.write(J,mxResources.get("help"));t.appendChild(J);J=document.createElement("option");J.setAttribute("value","reset");mxUtils.write(J,mxResources.get("reset"));t.appendChild(J);var D=document.createElement("select");D.style.textOverflow="ellipsis";D.style.flexGrow="1";D.style.padding="4px";D.style.minWidth="0";for(J=0;J<EditorUi.mermaidDiagramTypes.length;J++){var G=document.createElement("option"),-R=EditorUi.mermaidDiagramTypes[J],V=R;"erDiagram"==V&&(V="entityRelationshipDiagram");V=mxResources.get(V,null,V.charAt(0).toUpperCase()+V.substring(1).replace(/[A-Z]/g," $&"));G.setAttribute("value",R);mxUtils.write(G,V);D.appendChild(G)}v.appendChild(D);v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.textOverflow="clip";v.style.cursor="default";var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.width="100%";Q.style.outline="none";Q.style.border="none";-Q.style.background="transparent";Q.style.padding="8px 26px 8px 8px";Q.style.boxSizing="border-box";v.appendChild(Q);J=document.createElement("img");J.setAttribute("src",Editor.sendImage);J.setAttribute("title",mxResources.get("sendMessage"));J.className="geAdaptiveAsset";J.style.position="relative";J.style.cursor="pointer";J.style.opacity="0.5";J.style.height="19px";J.style.left="-24px";J.style.top="5px";J.style.background="url('"+b.editor.transparentImage+"')";v.appendChild(J);k.appendChild(v);K.isSelectionEmpty()?-b.isDiagramEmpty()?t.value="help":t.value="includeCopyOfMyDiagram":t.value="selectionOnly";var P=!1,q=t.value,y=function(){Q.setAttribute("placeholder",mxResources.get("create"==t.value?"describeYourDiagram":"askMeAnything"));"create"==t.value?(t.style.width="",D.style.display=""):(t.style.width="100%",D.style.display="none")};y();mxEvent.addListener(t,"change",function(){P||("reset"==t.value?(t.value=q,g.innerHTML=""):q=t.value,y())});K.selectionModel.addListener(mxEvent.CHANGE,n);K.getModel().addListener(mxEvent.CHANGE,-n);n();mxEvent.addListener(J,"click",E);mxEvent.addListener(Q,"keydown",function(B){13!=B.keyCode||mxEvent.isShiftDown(B)||E()});d.appendChild(k);this.window=new mxWindow(mxResources.get("chatWindowTitle"),d,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){K.getModel().removeListener(n)}));this.window.addListener("show",-mxUtils.bind(this,function(){this.window.fit();Q.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,e,f,c,l){var n=b.editor.graph,p=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)p=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var u=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(F,H){if(n.isEnabled()){var E=new FilenameDialog(b,"",mxResources.get("add"),function(K){b.hideDialog();if(null!=K&&0<K.length){K=-K.split(" ");for(var d=[],g=[],k=0;k<K.length;k++){var v=mxUtils.trim(K[k]);""!=v&&(g.push(v),0>mxUtils.indexOf(F,v)&&d.push(v))}n.isSelectionEmpty()?H(F.concat(d)):n.addTagsForCells(n.getSelectionCells(),g)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(E.container,320,80,!0,!0);E.init()}},p);p=u.div;this.window=new mxWindow(mxResources.get("tags"),p,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;-this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){u.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign="center";var n=document.createElement("p");n.style.fontSize="16pt";n.style.padding="0px";n.style.margin="0px";n.style.color="gray";mxUtils.write(n,mxResources.get("authorizationRequired"));var p="Unknown",-u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.marginRight="10px";e==b.drive?(p=mxResources.get("googleDrive"),u.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(p=mxResources.get("dropbox"),u.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(p=mxResources.get("oneDrive"),u.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(p=mxResources.get("github"),u.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(p=mxResources.get("gitlab"),-u.src=IMAGE_PATH+"/gitlab-logo.svg",u.style.width="32px"):e==b.trello&&(p=mxResources.get("trello"),u.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[p]));var F=document.createElement("input");F.setAttribute("type","checkbox");p=mxUtils.button(mxResources.get("authorize"),function(){c(F.checked)});p.insertBefore(u,p.firstChild);p.style.marginTop="6px";p.className="geBigButton";p.style.fontSize="18px";p.style.padding="14px";+S=EditorUi.mermaidDiagramTypes[J],U=S;"erDiagram"==U&&(U="entityRelationshipDiagram");U=mxResources.get(U,null,U.charAt(0).toUpperCase()+U.substring(1).replace(/[A-Z]/g," $&"));G.setAttribute("value",S);mxUtils.write(G,U);D.appendChild(G)}u.appendChild(D);u=document.createElement("div");u.style.whiteSpace="nowrap";u.style.textOverflow="clip";u.style.cursor="default";var P=document.createElement("input");P.setAttribute("type","text");P.style.width="100%";P.style.outline="none";P.style.border="none";+P.style.background="transparent";P.style.padding="8px 26px 8px 8px";P.style.boxSizing="border-box";u.appendChild(P);J=document.createElement("img");J.setAttribute("src",Editor.sendImage);J.setAttribute("title",mxResources.get("sendMessage"));J.className="geAdaptiveAsset";J.style.position="relative";J.style.cursor="pointer";J.style.opacity="0.5";J.style.height="19px";J.style.left="-24px";J.style.top="5px";J.style.background="url('"+b.editor.transparentImage+"')";u.appendChild(J);k.appendChild(u);K.isSelectionEmpty()?+b.isDiagramEmpty()?t.value="help":t.value="includeCopyOfMyDiagram":t.value="selectionOnly";var O=!1,q=t.value,y=function(){P.setAttribute("placeholder",mxResources.get("create"==t.value?"describeYourDiagram":"askMeAnything"));"create"==t.value?(t.style.width="",D.style.display=""):(t.style.width="100%",D.style.display="none")};y();mxEvent.addListener(t,"change",function(){O||("reset"==t.value?(t.value=q,g.innerHTML=""):q=t.value,y())});K.selectionModel.addListener(mxEvent.CHANGE,n);K.getModel().addListener(mxEvent.CHANGE,+n);n();mxEvent.addListener(J,"click",E);mxEvent.addListener(P,"keydown",function(B){13!=B.keyCode||mxEvent.isShiftDown(B)||E()});d.appendChild(k);this.window=new mxWindow(mxResources.get("chatWindowTitle"),d,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){K.getModel().removeListener(n)}));this.window.addListener("show",+mxUtils.bind(this,function(){this.window.fit();P.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,e,f,c,l){var n=b.editor.graph,p=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)p=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var v=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(F,H){if(n.isEnabled()){var E=new FilenameDialog(b,"",mxResources.get("add"),function(K){b.hideDialog();if(null!=K&&0<K.length){K=+K.split(" ");for(var d=[],g=[],k=0;k<K.length;k++){var u=mxUtils.trim(K[k]);""!=u&&(g.push(u),0>mxUtils.indexOf(F,u)&&d.push(u))}n.isSelectionEmpty()?H(F.concat(d)):n.addTagsForCells(n.getSelectionCells(),g)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(E.container,320,80,!0,!0);E.init()}},p);p=v.div;this.window=new mxWindow(mxResources.get("tags"),p,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;+this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){v.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign="center";var n=document.createElement("p");n.style.fontSize="16pt";n.style.padding="0px";n.style.margin="0px";n.style.color="gray";mxUtils.write(n,mxResources.get("authorizationRequired"));var p="Unknown",+v=document.createElement("img");v.setAttribute("border","0");v.setAttribute("align","absmiddle");v.style.marginRight="10px";e==b.drive?(p=mxResources.get("googleDrive"),v.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(p=mxResources.get("dropbox"),v.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(p=mxResources.get("oneDrive"),v.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(p=mxResources.get("github"),v.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(p=mxResources.get("gitlab"),+v.src=IMAGE_PATH+"/gitlab-logo.svg",v.style.width="32px"):e==b.trello&&(p=mxResources.get("trello"),v.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[p]));var F=document.createElement("input");F.setAttribute("type","checkbox");p=mxUtils.button(mxResources.get("authorize"),function(){c(F.checked)});p.insertBefore(v,p.firstChild);p.style.marginTop="6px";p.className="geBigButton";p.style.fontSize="18px";p.style.padding="14px";l.appendChild(n);l.appendChild(b);l.appendChild(p);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(F),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberMe")),f.appendChild(n),l.appendChild(f),F.checked=!0,F.defaultChecked=!0,mxEvent.addListener(n,"click",function(H){F.checked=!F.checked;mxEvent.consume(H)}));this.container=l},MoreShapesDialog=function(b,e,f){f=null!=f?f:b.sidebar.entries;var c=document.createElement("div"),l=[];if(null!=b.sidebar.customEntries)for(var n=-0;n<b.sidebar.customEntries.length;n++){for(var p=b.sidebar.customEntries[n]||{},u={title:b.getResource(p.title),entries:[]},F=0;null!=p.entries&&F<p.entries.length;F++){var H=p.entries[F];u.entries.push({id:H.id,title:b.getResource(H.title),desc:b.getResource(H.desc),image:H.preview})}0<u.entries.length&&l.push(u)}for(n=0;n<f.length;n++)if(null==b.sidebar.enabledLibraries)l.push(f[n]);else{u={title:f[n].title,entries:[]};for(F=0;F<f[n].entries.length;F++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,-f[n].entries[F].id)&&u.entries.push(f[n].entries[F]);0<u.entries.length&&l.push(u)}f=l;if(e){n=mxUtils.bind(this,function(R){for(var V=0;V<R.length;V++)(function(Q){var P=k.cloneNode(!1);P.style.fontWeight="bold";P.style.backgroundColor="light-dark(#e5e5e5, #505759)";P.style.padding="6px 0px 6px 20px";mxUtils.write(P,Q.title);E.appendChild(P);for(var q=0;q<Q.entries.length;q++)(function(y){var B=k.cloneNode(!1);B.style.cursor="pointer";B.style.padding="4px 0px 4px 20px";B.style.whiteSpace="nowrap";+0;n<b.sidebar.customEntries.length;n++){for(var p=b.sidebar.customEntries[n]||{},v={title:b.getResource(p.title),entries:[]},F=0;null!=p.entries&&F<p.entries.length;F++){var H=p.entries[F];v.entries.push({id:H.id,title:b.getResource(H.title),desc:b.getResource(H.desc),image:H.preview})}0<v.entries.length&&l.push(v)}for(n=0;n<f.length;n++)if(null==b.sidebar.enabledLibraries)l.push(f[n]);else{v={title:f[n].title,entries:[]};for(F=0;F<f[n].entries.length;F++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,+f[n].entries[F].id)&&v.entries.push(f[n].entries[F]);0<v.entries.length&&l.push(v)}f=l;if(e){n=mxUtils.bind(this,function(S){for(var U=0;U<S.length;U++)(function(P){var O=k.cloneNode(!1);O.style.fontWeight="bold";O.style.backgroundColor="light-dark(#e5e5e5, #505759)";O.style.padding="6px 0px 6px 20px";mxUtils.write(O,P.title);E.appendChild(O);for(var q=0;q<P.entries.length;q++)(function(y){var B=k.cloneNode(!1);B.style.cursor="pointer";B.style.padding="4px 0px 4px 20px";B.style.whiteSpace="nowrap";B.style.overflow="hidden";B.style.textOverflow="ellipsis";B.setAttribute("title",y.title+" ("+y.id+")");var C=document.createElement("input");C.setAttribute("type","checkbox");C.checked=b.sidebar.isEntryVisible(y.id);C.defaultChecked=C.checked;B.appendChild(C);mxUtils.write(B," "+y.title);E.appendChild(B);var M=function(T){if(null==T||"INPUT"!=mxEvent.getSource(T).nodeName){K.style.textAlign="center";K.style.padding="0px";K.style.color="";K.innerText="";if(null!=y.desc){var m=document.createElement("pre");m.style.boxSizing="border-box";m.style.fontFamily="inherit";m.style.margin="20px";m.style.right="0px";m.style.textAlign="left";mxUtils.write(m,y.desc);K.appendChild(m)}null!=y.imageCallback?y.imageCallback(K):null!=y.image?(m=document.createElement("img"),m.setAttribute("border","0"),m.style.maxWidth="100%",m.setAttribute("src",y.image),K.appendChild(m)):null==y.desc&&(K.style.padding="20px",K.style.color="rgb(179, 179, 179)",mxUtils.write(K,mxResources.get("noPreview")));null!=d&&(d.style.backgroundColor=-"");d=B;d.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=T&&mxEvent.consume(T)}};mxEvent.addListener(B,"click",M);mxEvent.addListener(B,"dblclick",function(T){C.checked=!C.checked;mxEvent.consume(T)});g.push(function(){return C.checked?y.id:null});0==V&&0==q&&M()})(Q.entries[q])})(R[V])});F=document.createElement("div");F.className="geDialogTitle";mxUtils.write(F,mxResources.get("shapes"));F.style.position="absolute";F.style.top="0px";F.style.left="0px";F.style.lineHeight="40px";F.style.height=+"");d=B;d.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=T&&mxEvent.consume(T)}};mxEvent.addListener(B,"click",M);mxEvent.addListener(B,"dblclick",function(T){C.checked=!C.checked;mxEvent.consume(T)});g.push(function(){return C.checked?y.id:null});0==U&&0==q&&M()})(P.entries[q])})(S[U])});F=document.createElement("div");F.className="geDialogTitle";mxUtils.write(F,mxResources.get("shapes"));F.style.position="absolute";F.style.top="0px";F.style.left="0px";F.style.lineHeight="40px";F.style.height="40px";F.style.right="0px";var E=document.createElement("div"),K=document.createElement("div");E.style.position="absolute";E.style.top="40px";E.style.left="0px";E.style.width="202px";E.style.bottom="60px";E.style.overflow="auto";K.style.position="absolute";K.style.left="202px";K.style.right="0px";K.style.top="40px";K.style.bottom="60px";K.style.overflow="auto";K.style.borderLeftStyle="solid";K.style.borderLeftWidth="1px";K.style.textAlign="center";var d=null,g=[],k=document.createElement("div");k.style.position=-"relative";k.style.left="0px";k.style.right="0px";n(f);c.style.padding="30px";c.appendChild(F);c.appendChild(E);c.appendChild(K);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.position="relative";v.style.top="1px";v.checked=b.sidebar.sidebarTitles;-v.defaultChecked=v.checked;f.appendChild(v);n=document.createElement("span");mxUtils.write(n," "+mxResources.get("labels"));n.style.paddingRight="20px";f.appendChild(n);mxEvent.addListener(n,"click",function(R){v.checked=!v.checked;mxEvent.consume(R)});var t=document.createElement("input");t.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)n=document.createElement("span"),n.style.paddingRight="20px",n.appendChild(t),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),-t.style.position="relative",t.style.top="1px",t.checked=!0,t.defaultChecked=!0,mxEvent.addListener(n,"click",function(R){mxEvent.getSource(R)!=t&&(t.checked=!t.checked,mxEvent.consume(R))}),f.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";F=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var R=[],V=0;V<g.length;V++){var Q=g[V].apply(this,arguments);null!=Q&&R.push(Q)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&-"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(V=mxUtils.indexOf(R,".scratchpad"),null!=b.scratchpad!=(0<=V&&0<R.splice(V,1).length)&&b.toggleScratchpad(),V=mxUtils.indexOf(R,"search"),mxSettings.settings.search=0<=V&&0<R.splice(V,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),t.checked&&mxSettings.save());b.sidebar.showEntries(R.join(";"),t.checked,!0);b.setSidebarTitles(v.checked,t.checked)});F.className="geBtn gePrimaryBtn"}else{var x=document.createElement("table");-n=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";F=document.createElement("tr");x.style.width="100%";e=document.createElement("td");l=document.createElement("td");p=document.createElement("td");var A=mxUtils.bind(this,function(R,V,Q){var P=document.createElement("input");P.type="checkbox";x.appendChild(P);P.checked=b.sidebar.isEntryVisible(Q);var q=document.createElement("span");mxUtils.write(q,V);V=document.createElement("div");V.style.display="block";V.appendChild(P);-V.appendChild(q);mxEvent.addListener(q,"click",function(y){P.checked=!P.checked;mxEvent.consume(y)});R.appendChild(V);return function(){return P.checked?Q:null}});F.appendChild(e);F.appendChild(l);F.appendChild(p);n.appendChild(F);x.appendChild(n);g=[];var J=0;for(n=0;n<f.length;n++)for(F=0;F<f[n].entries.length;F++)J++;var D=[e,l,p],G=0;for(n=0;n<f.length;n++)(function(R){for(var V=0;V<R.entries.length;V++){var Q=R.entries[V];g.push(A(D[Math.floor(G/(J/3))],Q.title,Q.id));G++}})(f[n]);c.appendChild(x);-f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";t=document.createElement("input");isLocalStorage&&(t.setAttribute("type","checkbox"),t.checked=!0,t.defaultChecked=!0,f.appendChild(t),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),f.appendChild(n),mxEvent.addListener(n,"click",function(R){t.checked=!t.checked;mxEvent.consume(R)}));c.appendChild(f);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});-n.className="geBtn";F=mxUtils.button(mxResources.get("apply"),function(){for(var R=["search"],V=0;V<g.length;V++){var Q=g[V].apply(this,arguments);null!=Q&&R.push(Q)}b.sidebar.showEntries(0<R.length?R.join(";"):"",t.checked);b.hideDialog()});F.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(n),f.appendChild(F)):(f.appendChild(F),f.appendChild(n));c.appendChild(f);this.container=c},PluginsDialog=function(b,-e,f,c){function l(){F=!0;if(0==u.length)p.innerText=mxResources.get("noPlugins");else{p.innerText="";for(var g=0;g<u.length;g++){var k=document.createElement("span");k.style.display="flex";k.style.alignItems="center";k.style.whiteSpace="nowrap";var v=document.createElement("img");v.src=Editor.trashImage;v.style.position="relative";v.style.cursor="pointer";v.style.marginRight="4px";v.style.display="inline-block";v.style.width="18px";v.setAttribute("title",mxResources.get("delete"));k.appendChild(v);-mxUtils.write(k,u[g]);p.appendChild(k);mxUtils.br(p);mxEvent.addListener(v,"click",function(t){return function(){b.confirm(mxResources.get("delete")+' "'+u[t]+'"?',function(){null!=f&&f(u[t]);u.splice(t,1);l()})}}(g))}}}var n=document.createElement("div"),p=document.createElement("div");p.style.height="180px";p.style.overflow="auto";var u=mxSettings.getPlugins().slice(),F=!1;n.appendChild(p);l();F=!1;var H=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(g){g&&0>mxUtils.indexOf(u,-g)&&u.push(g);l()})}:function(){var g=document.createElement("div"),k=document.createElement("span");k.style.marginTop="6px";mxUtils.write(k,mxResources.get("builtinPlugins")+": ");g.appendChild(k);var v=document.createElement("select");v.style.width="150px";for(k=0;k<App.publicPlugin.length;k++){var t=document.createElement("option");mxUtils.write(t,App.publicPlugin[k]);t.value=App.publicPlugin[k];v.appendChild(t)}g.appendChild(v);mxUtils.br(g);mxUtils.br(g);k=mxUtils.button(mxResources.get("custom")+-"...",function(){var x=new FilenameDialog(b,"",mxResources.get("add"),function(A){b.hideDialog();if(null!=A&&0<A.length){A=A.split(";");for(var J=0;J<A.length;J++){var D=A[J],G=App.pluginRegistry[D];null!=G&&(D=G);0<D.length&&0>mxUtils.indexOf(u,D)&&u.push(D)}l()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(x.container,300,80,!0,!0);x.init()});k.className="geBtn";ALLOW_CUSTOM_PLUGINS||(k.style.display="none");g=new CustomDialog(b,g,mxUtils.bind(this,function(){var x=-App.pluginRegistry[v.value];0>mxUtils.indexOf(u,x)&&(u.push(x),l())}),null,null,null,k);b.showDialog(g.container,360,100,!0,!0)});H.className="geBtn";var E=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});E.className="geBtn";var K=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){F?(mxSettings.setPlugins(u),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});K.className="geBtn gePrimaryBtn";var d=document.createElement("div");-d.style.marginTop="14px";d.style.textAlign="right";b.isOffline()||d.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(c||d.appendChild(E),d.appendChild(H),d.appendChild(K)):(d.appendChild(H),d.appendChild(K),c||d.appendChild(E));n.appendChild(d);this.container=n},CropImageDialog=function(b,e,f,c){function l(){var R=t.checked,V=x.checked,Q=g.geometry,P=F.width,q=F.height,y=(300-P)/2,B=(300-q)/2;Q.x<y?(Q.width-=y-Q.x,Q.x=y):Q.x+Q.width>y+P&&(Q.width=y+P-Q.x,-Q.x=Math.min(Q.x,y+P));Q.y<B?(Q.height-=B-Q.y,Q.y=B):Q.y+Q.height>B+q&&(Q.height=B+q-Q.y,Q.y=Math.min(Q.y,B+q));var C=(Q.x-y)/P*100;P=100-(Q.x+Q.width-y)/P*100;y=(Q.y-B)/q*100;Q=100-(Q.y+Q.height-B)/q*100;return"inset("+mxUtils.format(y)+"% "+mxUtils.format(P)+"% "+mxUtils.format(Q)+"% "+mxUtils.format(C)+"%"+(R?" round "+d+"%":V?" round 50%":"")+")"}function n(R){null!=E&&(!0!==R&&(E.model.setGeometry(g,K.clone()),d=5,J.value=d),E.model.setStyle(g,k+l()),E.selectAll(),A.style.visibility=t.checked?-"visible":"hidden")}var p=document.createElement("div"),u=document.createElement("div");u.style.height="300px";u.style.width="300px";u.style.display="inline-flex";u.style.justifyContent="center";u.style.alignItems="center";u.style.position="absolute";var F=document.createElement("img");F.onload=function(){function R(){E.model.setStyle(g,k+l())}E=new Graph(H);E.autoExtend=!1;E.autoScroll=!1;E.setGridEnabled(!1);E.setEnabled(!0);E.setPanning(!1);E.setConnectable(!1);E.getRubberband().setEnabled(!1);-E.graphHandler.allowLivePreview=!1;var V=E.createVertexHandler;E.createVertexHandler=function(){var O=V.apply(this,arguments);O.livePreview=!1;return O};if(null!=f)try{if("inset"==f.substring(0,5)){var Q=g.geometry,P=F.width,q=F.height,y=(300-P)/2,B=(300-q)/2,C=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),M=parseFloat(C[0]),T=parseFloat(C[1]),m=parseFloat(C[2]),z=parseFloat(C[3]);isFinite(M)&&isFinite(T)&&isFinite(m)&&isFinite(z)?(Q.x=z/100*P+y,Q.y=M/100*q+B,Q.width=(100-T)/100*P+y-Q.x,Q.height=(100--m)/100*q+B-Q.y,"round"==C[4]?"50%"==C[5]?x.setAttribute("checked","checked"):(d=parseInt(C[5]),J.value=d,t.setAttribute("checked","checked"),A.style.visibility="visible"):v.setAttribute("checked","checked")):f=null}else f=null}catch(O){}g.style=k+(f?f:l());g.vertex=!0;E.addCell(g,null,null,null,null);E.selectAll();E.addListener(mxEvent.CELLS_MOVED,R);E.addListener(mxEvent.CELLS_RESIZED,R);var I=E.graphHandler.mouseUp,L=E.graphHandler.mouseDown;E.graphHandler.mouseUp=function(){I.apply(this,arguments);-H.style.backgroundColor="#fff9"};E.graphHandler.mouseDown=function(){L.apply(this,arguments);H.style.backgroundColor=""};E.dblClick=function(){};var N=E.getSelectionModel().changeSelection;E.getSelectionModel().changeSelection=function(){N.call(this,[g],[g])}};F.onerror=function(){F.onload=null;F.src=Editor.errorImage};F.setAttribute("src",e);F.style.maxWidth="300px";F.style.maxHeight="300px";u.appendChild(F);p.appendChild(u);var H=document.createElement("div");H.style.width="300px";H.style.height=-"300px";H.style.overflow="hidden";H.style.backgroundColor="#fff9";p.appendChild(H);var E=null,K=new mxGeometry(100,100,100,100),d=5,g=new mxCell("",K.clone(),""),k="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",v=document.createElement("input");v.setAttribute("type","radio");v.setAttribute("id","croppingRect");v.setAttribute("name","croppingShape");v.setAttribute("checked","checked");v.style.margin="5px";p.appendChild(v);e=document.createElement("label");+"relative";k.style.left="0px";k.style.right="0px";n(f);c.style.padding="30px";c.appendChild(F);c.appendChild(E);c.appendChild(K);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.position="relative";u.style.top="1px";u.checked=b.sidebar.sidebarTitles;+u.defaultChecked=u.checked;f.appendChild(u);n=document.createElement("span");mxUtils.write(n," "+mxResources.get("labels"));n.style.paddingRight="20px";f.appendChild(n);mxEvent.addListener(n,"click",function(S){u.checked=!u.checked;mxEvent.consume(S)});var t=document.createElement("input");t.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)n=document.createElement("span"),n.style.paddingRight="20px",n.appendChild(t),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),+t.style.position="relative",t.style.top="1px",t.checked=!0,t.defaultChecked=!0,mxEvent.addListener(n,"click",function(S){mxEvent.getSource(S)!=t&&(t.checked=!t.checked,mxEvent.consume(S))}),f.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";F=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var S=[],U=0;U<g.length;U++){var P=g[U].apply(this,arguments);null!=P&&S.push(P)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&+"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(U=mxUtils.indexOf(S,".scratchpad"),null!=b.scratchpad!=(0<=U&&0<S.splice(U,1).length)&&b.toggleScratchpad(),U=mxUtils.indexOf(S,"search"),mxSettings.settings.search=0<=U&&0<S.splice(U,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),t.checked&&mxSettings.save());b.sidebar.showEntries(S.join(";"),t.checked,!0);b.setSidebarTitles(u.checked,t.checked)});F.className="geBtn gePrimaryBtn"}else{var x=document.createElement("table");+n=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";F=document.createElement("tr");x.style.width="100%";e=document.createElement("td");l=document.createElement("td");p=document.createElement("td");var A=mxUtils.bind(this,function(S,U,P){var O=document.createElement("input");O.type="checkbox";x.appendChild(O);O.checked=b.sidebar.isEntryVisible(P);var q=document.createElement("span");mxUtils.write(q,U);U=document.createElement("div");U.style.display="block";U.appendChild(O);+U.appendChild(q);mxEvent.addListener(q,"click",function(y){O.checked=!O.checked;mxEvent.consume(y)});S.appendChild(U);return function(){return O.checked?P:null}});F.appendChild(e);F.appendChild(l);F.appendChild(p);n.appendChild(F);x.appendChild(n);g=[];var J=0;for(n=0;n<f.length;n++)for(F=0;F<f[n].entries.length;F++)J++;var D=[e,l,p],G=0;for(n=0;n<f.length;n++)(function(S){for(var U=0;U<S.entries.length;U++){var P=S.entries[U];g.push(A(D[Math.floor(G/(J/3))],P.title,P.id));G++}})(f[n]);c.appendChild(x);+f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";t=document.createElement("input");isLocalStorage&&(t.setAttribute("type","checkbox"),t.checked=!0,t.defaultChecked=!0,f.appendChild(t),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),f.appendChild(n),mxEvent.addListener(n,"click",function(S){t.checked=!t.checked;mxEvent.consume(S)}));c.appendChild(f);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});+n.className="geBtn";F=mxUtils.button(mxResources.get("apply"),function(){for(var S=["search"],U=0;U<g.length;U++){var P=g[U].apply(this,arguments);null!=P&&S.push(P)}b.sidebar.showEntries(0<S.length?S.join(";"):"",t.checked);b.hideDialog()});F.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(n),f.appendChild(F)):(f.appendChild(F),f.appendChild(n));c.appendChild(f);this.container=c},PluginsDialog=function(b,+e,f,c){function l(){F=!0;if(0==v.length)p.innerText=mxResources.get("noPlugins");else{p.innerText="";for(var g=0;g<v.length;g++){var k=document.createElement("span");k.style.display="flex";k.style.alignItems="center";k.style.whiteSpace="nowrap";var u=document.createElement("img");u.src=Editor.trashImage;u.style.position="relative";u.style.cursor="pointer";u.style.marginRight="4px";u.style.display="inline-block";u.style.width="18px";u.setAttribute("title",mxResources.get("delete"));k.appendChild(u);+mxUtils.write(k,v[g]);p.appendChild(k);mxUtils.br(p);mxEvent.addListener(u,"click",function(t){return function(){b.confirm(mxResources.get("delete")+' "'+v[t]+'"?',function(){null!=f&&f(v[t]);v.splice(t,1);l()})}}(g))}}}var n=document.createElement("div"),p=document.createElement("div");p.style.height="180px";p.style.overflow="auto";var v=mxSettings.getPlugins().slice(),F=!1;n.appendChild(p);l();F=!1;var H=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(g){g&&0>mxUtils.indexOf(v,+g)&&v.push(g);l()})}:function(){var g=document.createElement("div"),k=document.createElement("span");k.style.marginTop="6px";mxUtils.write(k,mxResources.get("builtinPlugins")+": ");g.appendChild(k);var u=document.createElement("select");u.style.width="150px";for(k=0;k<App.publicPlugin.length;k++){var t=document.createElement("option");mxUtils.write(t,App.publicPlugin[k]);t.value=App.publicPlugin[k];u.appendChild(t)}g.appendChild(u);mxUtils.br(g);mxUtils.br(g);k=mxUtils.button(mxResources.get("custom")++"...",function(){var x=new FilenameDialog(b,"",mxResources.get("add"),function(A){b.hideDialog();if(null!=A&&0<A.length){A=A.split(";");for(var J=0;J<A.length;J++){var D=A[J],G=App.pluginRegistry[D];null!=G&&(D=G);0<D.length&&0>mxUtils.indexOf(v,D)&&v.push(D)}l()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(x.container,300,80,!0,!0);x.init()});k.className="geBtn";ALLOW_CUSTOM_PLUGINS||(k.style.display="none");g=new CustomDialog(b,g,mxUtils.bind(this,function(){var x=+App.pluginRegistry[u.value];0>mxUtils.indexOf(v,x)&&(v.push(x),l())}),null,null,null,k);b.showDialog(g.container,360,100,!0,!0)});H.className="geBtn";var E=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});E.className="geBtn";var K=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){F?(mxSettings.setPlugins(v),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});K.className="geBtn gePrimaryBtn";var d=document.createElement("div");+d.style.marginTop="14px";d.style.textAlign="right";b.isOffline()||d.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(c||d.appendChild(E),d.appendChild(H),d.appendChild(K)):(d.appendChild(H),d.appendChild(K),c||d.appendChild(E));n.appendChild(d);this.container=n},CropImageDialog=function(b,e,f,c){function l(){var S=t.checked,U=x.checked,P=g.geometry,O=F.width,q=F.height,y=(300-O)/2,B=(300-q)/2;P.x<y?(P.width-=y-P.x,P.x=y):P.x+P.width>y+O&&(P.width=y+O-P.x,+P.x=Math.min(P.x,y+O));P.y<B?(P.height-=B-P.y,P.y=B):P.y+P.height>B+q&&(P.height=B+q-P.y,P.y=Math.min(P.y,B+q));var C=(P.x-y)/O*100;O=100-(P.x+P.width-y)/O*100;y=(P.y-B)/q*100;P=100-(P.y+P.height-B)/q*100;return"inset("+mxUtils.format(y)+"% "+mxUtils.format(O)+"% "+mxUtils.format(P)+"% "+mxUtils.format(C)+"%"+(S?" round "+d+"%":U?" round 50%":"")+")"}function n(S){null!=E&&(!0!==S&&(E.model.setGeometry(g,K.clone()),d=5,J.value=d),E.model.setStyle(g,k+l()),E.selectAll(),A.style.visibility=t.checked?+"visible":"hidden")}var p=document.createElement("div"),v=document.createElement("div");v.style.height="300px";v.style.width="300px";v.style.display="inline-flex";v.style.justifyContent="center";v.style.alignItems="center";v.style.position="absolute";var F=document.createElement("img");F.onload=function(){function S(){E.model.setStyle(g,k+l())}E=new Graph(H);E.autoExtend=!1;E.autoScroll=!1;E.setGridEnabled(!1);E.setEnabled(!0);E.setPanning(!1);E.setConnectable(!1);E.getRubberband().setEnabled(!1);+E.graphHandler.allowLivePreview=!1;var U=E.createVertexHandler;E.createVertexHandler=function(){var Q=U.apply(this,arguments);Q.livePreview=!1;return Q};if(null!=f)try{if("inset"==f.substring(0,5)){var P=g.geometry,O=F.width,q=F.height,y=(300-O)/2,B=(300-q)/2,C=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),M=parseFloat(C[0]),T=parseFloat(C[1]),m=parseFloat(C[2]),z=parseFloat(C[3]);isFinite(M)&&isFinite(T)&&isFinite(m)&&isFinite(z)?(P.x=z/100*O+y,P.y=M/100*q+B,P.width=(100-T)/100*O+y-P.x,P.height=(100-+m)/100*q+B-P.y,"round"==C[4]?"50%"==C[5]?x.setAttribute("checked","checked"):(d=parseInt(C[5]),J.value=d,t.setAttribute("checked","checked"),A.style.visibility="visible"):u.setAttribute("checked","checked")):f=null}else f=null}catch(Q){}g.style=k+(f?f:l());g.vertex=!0;E.addCell(g,null,null,null,null);E.selectAll();E.addListener(mxEvent.CELLS_MOVED,S);E.addListener(mxEvent.CELLS_RESIZED,S);var I=E.graphHandler.mouseUp,L=E.graphHandler.mouseDown;E.graphHandler.mouseUp=function(){I.apply(this,arguments);+H.style.backgroundColor="#fff9"};E.graphHandler.mouseDown=function(){L.apply(this,arguments);H.style.backgroundColor=""};E.dblClick=function(){};var N=E.getSelectionModel().changeSelection;E.getSelectionModel().changeSelection=function(){N.call(this,[g],[g])}};F.onerror=function(){F.onload=null;F.src=Editor.errorImage};F.setAttribute("src",e);F.style.maxWidth="300px";F.style.maxHeight="300px";v.appendChild(F);p.appendChild(v);var H=document.createElement("div");H.style.width="300px";H.style.height=+"300px";H.style.overflow="hidden";H.style.backgroundColor="#fff9";p.appendChild(H);var E=null,K=new mxGeometry(100,100,100,100),d=5,g=new mxCell("",K.clone(),""),k="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",u=document.createElement("input");u.setAttribute("type","radio");u.setAttribute("id","croppingRect");u.setAttribute("name","croppingShape");u.setAttribute("checked","checked");u.style.margin="5px";p.appendChild(u);e=document.createElement("label");e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle"));p.appendChild(e);var t=document.createElement("input");t.setAttribute("type","radio");t.setAttribute("id","croppingRounded");t.setAttribute("name","croppingShape");t.style.margin="5px";p.appendChild(t);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));p.appendChild(e);var x=document.createElement("input");x.setAttribute("type","radio");x.setAttribute("id",-"croppingEllipse");x.setAttribute("name","croppingShape");x.style.margin="5px";p.appendChild(x);e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));p.appendChild(e);mxEvent.addListener(v,"change",n);mxEvent.addListener(t,"change",n);mxEvent.addListener(x,"change",n);var A=document.createElement("div");A.style.textAlign="center";A.style.visibility="hidden";var J=document.createElement("input");J.setAttribute("type","range");J.setAttribute("min",-"1");J.setAttribute("max","49");J.setAttribute("value",d);J.setAttribute("title",mxResources.get("arcSize"));A.appendChild(J);p.appendChild(A);mxEvent.addListener(J,"change",function(){d=this.value;n(!0)});e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";u=mxUtils.button(mxResources.get("apply"),function(){c(l(),g.geometry.width,g.geometry.height);b.hideDialog()});u.className="geBtn gePrimaryBtn";var D=mxUtils.button(mxResources.get("reset"),function(){c(null,-F.width,F.height);b.hideDialog()});D.className="geBtn";var G=document.createElement("div");G.style.marginTop="10px";G.style.textAlign="right";b.editor.cancelFirst?(G.appendChild(e),G.appendChild(D),G.appendChild(u)):(G.appendChild(D),G.appendChild(u),G.appendChild(e));p.appendChild(G);this.container=p},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,l=document.createElement("div"),n=document.createElement("table"),p=document.createElement("tbody"),-u=document.createElement("tr"),F=document.createElement("td"),H=document.createElement("td");n.style.paddingLeft="6px";mxUtils.write(F,mxResources.get("relative")+":");var E=document.createElement("input");E.setAttribute("type","checkbox");null!=c&&c.relative&&(E.setAttribute("checked","checked"),E.defaultChecked=!0);this.init=function(){E.focus()};H.appendChild(E);u.appendChild(F);u.appendChild(H);p.appendChild(u);u=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");-mxUtils.write(F,mxResources.get("left")+":");var K=document.createElement("input");K.setAttribute("type","text");K.style.width="100px";K.value=null!=c?c.x:"";H.appendChild(K);u.appendChild(F);u.appendChild(H);p.appendChild(u);u=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");mxUtils.write(F,mxResources.get("top")+":");var d=document.createElement("input");d.setAttribute("type","text");d.style.width="100px";d.value=null!=c?c.y:"";H.appendChild(d);u.appendChild(F);-u.appendChild(H);p.appendChild(u);u=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");mxUtils.write(F,mxResources.get("dx")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value=null!=c&&null!=c.offset?c.offset.x:"";H.appendChild(g);u.appendChild(F);u.appendChild(H);p.appendChild(u);u=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");mxUtils.write(F,mxResources.get("dy")+-":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=c&&null!=c.offset?c.offset.y:"";H.appendChild(k);u.appendChild(F);u.appendChild(H);p.appendChild(u);u=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");mxUtils.write(F,mxResources.get("width")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=c?c.width:"";H.appendChild(v);u.appendChild(F);u.appendChild(H);-p.appendChild(u);u=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");mxUtils.write(F,mxResources.get("height")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c?c.height:"";H.appendChild(t);u.appendChild(F);u.appendChild(H);p.appendChild(u);u=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");mxUtils.write(F,mxResources.get("rotation")+":");var x=document.createElement("input");-x.setAttribute("type","text");x.style.width="100px";x.value=1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";H.appendChild(x);u.appendChild(F);u.appendChild(H);p.appendChild(u);n.appendChild(p);l.appendChild(n);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var A=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var J=0;J<e.length;J++){var D=f.getCellGeometry(e[J]);null!=-D&&(D=D.clone(),f.isCellMovable(e[J])&&(D.relative=E.checked,0<mxUtils.trim(K.value).length&&(D.x=Number(K.value)),0<mxUtils.trim(d.value).length&&(D.y=Number(d.value)),0<mxUtils.trim(g.value).length&&(null==D.offset&&(D.offset=new mxPoint),D.offset.x=Number(g.value)),0<mxUtils.trim(k.value).length&&(null==D.offset&&(D.offset=new mxPoint),D.offset.y=Number(k.value))),f.isCellResizable(e[J])&&(0<mxUtils.trim(v.value).length&&(D.width=Number(v.value)),0<mxUtils.trim(t.value).length&&(D.height=Number(t.value))),+"croppingEllipse");x.setAttribute("name","croppingShape");x.style.margin="5px";p.appendChild(x);e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));p.appendChild(e);mxEvent.addListener(u,"change",n);mxEvent.addListener(t,"change",n);mxEvent.addListener(x,"change",n);var A=document.createElement("div");A.style.textAlign="center";A.style.visibility="hidden";var J=document.createElement("input");J.setAttribute("type","range");J.setAttribute("min",+"1");J.setAttribute("max","49");J.setAttribute("value",d);J.setAttribute("title",mxResources.get("arcSize"));A.appendChild(J);p.appendChild(A);mxEvent.addListener(J,"change",function(){d=this.value;n(!0)});e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";v=mxUtils.button(mxResources.get("apply"),function(){c(l(),g.geometry.width,g.geometry.height);b.hideDialog()});v.className="geBtn gePrimaryBtn";var D=mxUtils.button(mxResources.get("reset"),function(){c(null,+F.width,F.height);b.hideDialog()});D.className="geBtn";var G=document.createElement("div");G.style.marginTop="10px";G.style.textAlign="right";b.editor.cancelFirst?(G.appendChild(e),G.appendChild(D),G.appendChild(v)):(G.appendChild(D),G.appendChild(v),G.appendChild(e));p.appendChild(G);this.container=p},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,l=document.createElement("div"),n=document.createElement("table"),p=document.createElement("tbody"),+v=document.createElement("tr"),F=document.createElement("td"),H=document.createElement("td");n.style.paddingLeft="6px";mxUtils.write(F,mxResources.get("relative")+":");var E=document.createElement("input");E.setAttribute("type","checkbox");null!=c&&c.relative&&(E.setAttribute("checked","checked"),E.defaultChecked=!0);this.init=function(){E.focus()};H.appendChild(E);v.appendChild(F);v.appendChild(H);p.appendChild(v);v=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");+mxUtils.write(F,mxResources.get("left")+":");var K=document.createElement("input");K.setAttribute("type","text");K.style.width="100px";K.value=null!=c?c.x:"";H.appendChild(K);v.appendChild(F);v.appendChild(H);p.appendChild(v);v=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");mxUtils.write(F,mxResources.get("top")+":");var d=document.createElement("input");d.setAttribute("type","text");d.style.width="100px";d.value=null!=c?c.y:"";H.appendChild(d);v.appendChild(F);+v.appendChild(H);p.appendChild(v);v=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");mxUtils.write(F,mxResources.get("dx")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value=null!=c&&null!=c.offset?c.offset.x:"";H.appendChild(g);v.appendChild(F);v.appendChild(H);p.appendChild(v);v=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");mxUtils.write(F,mxResources.get("dy")++":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=c&&null!=c.offset?c.offset.y:"";H.appendChild(k);v.appendChild(F);v.appendChild(H);p.appendChild(v);v=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");mxUtils.write(F,mxResources.get("width")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=c?c.width:"";H.appendChild(u);v.appendChild(F);v.appendChild(H);+p.appendChild(v);v=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");mxUtils.write(F,mxResources.get("height")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c?c.height:"";H.appendChild(t);v.appendChild(F);v.appendChild(H);p.appendChild(v);v=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");mxUtils.write(F,mxResources.get("rotation")+":");var x=document.createElement("input");+x.setAttribute("type","text");x.style.width="100px";x.value=1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";H.appendChild(x);v.appendChild(F);v.appendChild(H);p.appendChild(v);n.appendChild(p);l.appendChild(n);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var A=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var J=0;J<e.length;J++){var D=f.getCellGeometry(e[J]);null!=+D&&(D=D.clone(),f.isCellMovable(e[J])&&(D.relative=E.checked,0<mxUtils.trim(K.value).length&&(D.x=Number(K.value)),0<mxUtils.trim(d.value).length&&(D.y=Number(d.value)),0<mxUtils.trim(g.value).length&&(null==D.offset&&(D.offset=new mxPoint),D.offset.x=Number(g.value)),0<mxUtils.trim(k.value).length&&(null==D.offset&&(D.offset=new mxPoint),D.offset.y=Number(k.value))),f.isCellResizable(e[J])&&(0<mxUtils.trim(u.value).length&&(D.width=Number(u.value)),0<mxUtils.trim(t.value).length&&(D.height=Number(t.value))),f.getModel().setGeometry(e[J],D));0<mxUtils.trim(x.value).length&&f.setCellStyles(mxConstants.STYLE_ROTATION,Number(x.value),[e[J]])}}finally{f.getModel().endUpdate()}});A.className="geBtn gePrimaryBtn";mxEvent.addListener(l,"keypress",function(J){13==J.keyCode&&A.click()});n=document.createElement("div");n.style.marginTop="20px";n.style.textAlign="right";b.editor.cancelFirst?(n.appendChild(c),n.appendChild(A)):(n.appendChild(A),n.appendChild(c));l.appendChild(n);this.container=l},LibraryDialog=function(b,-e,f,c,l,n,p){function u(Q){for(Q=document.elementFromPoint(Q.clientX,Q.clientY);null!=Q&&Q.parentNode!=k;)Q=Q.parentNode;var P=null;if(null!=Q){var q=k.firstChild;for(P=0;null!=q&&q!=Q;)q=q.nextSibling,P++}return P}function F(Q,P,q,y,B,C,M,T,m){try{if(b.spinner.stop(),null==P||"image/"==P.substring(0,6))if(null==Q&&null!=M||null==t[Q]){var z=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0<Z.title.length?-Z.title:mxResources.get("untitled"));X.style.color=null==Z.title||0==Z.title.length?"#d0d0d0":""};k.style.backgroundImage="";v.style.display="none";var I=B,L=C;if(B>b.maxImageSize||C>b.maxImageSize){var N=Math.min(1,Math.min(b.maxImageSize/Math.max(1,B)),b.maxImageSize/Math.max(1,C));B*=N;C*=N}I>L?(L=Math.round(100*L/I),I=100):(I=Math.round(100*I/L),L=100);var O=document.createElement("div");O.setAttribute("draggable","true");O.style.display="inline-block";O.style.position="relative";O.style.padding=-"0 12px";O.style.cursor="move";mxUtils.setPrefixedStyle(O.style,"transition","transform .1s ease-in-out");if(null!=Q){var S=document.createElement("img");S.setAttribute("src",D.convert(Q));S.style.width=I+"px";S.style.height=L+"px";S.style.margin="10px";S.style.paddingBottom=Math.floor((100-L)/2)+"px";S.style.paddingLeft=Math.floor((100-I)/2)+"px";O.appendChild(S)}else if(null!=M){var U=b.stringToCells("<"==M.xml.charAt(0)?M.xml:Graph.decompress(M.xml));0<U.length&&(b.sidebar.createThumb(U,100,100,-O,null,!0,!1,null,null,Editor.isDarkMode()?"#2a252f":"#ffffff"),O.firstChild.style.display="inline-block",O.firstChild.style.cursor="")}var W=document.createElement("img");W.setAttribute("src",Editor.closeBlackImage);W.setAttribute("border","0");W.setAttribute("title",mxResources.get("delete"));W.setAttribute("align","top");W.style.paddingTop="4px";W.style.position="absolute";W.style.marginLeft="-12px";W.style.zIndex="1";W.style.cursor="pointer";mxEvent.addListener(W,"dragstart",function(fa){mxEvent.consume(fa)});-(function(fa,aa,da){mxEvent.addListener(W,"click",function(ia){t[aa]=null;for(var pa=0;pa<K.length;pa++)if(null!=K[pa].data&&K[pa].data==aa||null!=K[pa].xml&&null!=da&&K[pa].xml==da.xml){K.splice(pa,1);break}O.parentNode.removeChild(fa);0==K.length&&(k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(ia)});mxEvent.addListener(W,"dblclick",function(ia){mxEvent.consume(ia)})})(O,Q,M);O.appendChild(W);O.style.marginBottom="30px";var X=document.createElement("div");-X.style.position="absolute";X.style.boxSizing="border-box";X.style.bottom="-18px";X.style.left="10px";X.style.right="10px";X.style.backgroundColor="light-dark(#ffffff, transparent)";X.style.overflow="hidden";X.style.textAlign="center";X.setAttribute("title",mxResources.get("rename"));var Z=null;null!=Q?(Z={data:Q,w:B,h:C,title:m},null!=T&&(Z.aspect=T),t[Q]=S,K.push(Z)):null!=M&&(M.aspect="fixed",K.push(M),Z=M);mxEvent.addListener(X,"keydown",function(fa){13==fa.keyCode&&null!=J&&(J(),J=null,mxEvent.consume(fa))});-z();O.appendChild(X);mxEvent.addListener(X,"mousedown",function(fa){"true"!=X.getAttribute("contentEditable")&&mxEvent.consume(fa)});U=function(fa){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var aa=new FilenameDialog(b,Z.title||"",mxResources.get("ok"),function(da){null!=da&&(Z.title=da,z())},mxResources.get("enterValue"));b.showDialog(aa.container,300,80,!0,!0);aa.init();mxEvent.consume(fa)}else if("true"!=X.getAttribute("contentEditable")){null!=-J&&(J(),J=null);if(null==Z.title||0==Z.title.length)X.innerText="";X.style.textOverflow="";X.style.whiteSpace="";X.style.cursor="text";X.style.color="";X.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(X.style,"user-select","text");X.focus();document.execCommand("selectAll",!1,null);J=function(){X.removeAttribute("contentEditable");X.style.cursor="pointer";Z.title=mxUtils.getTextContent(X);z()};mxEvent.consume(fa)}};mxEvent.addListener(X,"click",U);mxEvent.addListener(O,"dblclick",-U);k.appendChild(O);mxEvent.addListener(O,"dragstart",function(fa){null==J&&(null==Q&&null!=M&&(W.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=M.xml&&fa.dataTransfer.setData("Text",M.xml),x=u(fa),mxClient.IS_GC&&(O.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(O.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(O,30);W.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(O,"dragend",function(fa){"hidden"==W.style.visibility&&-(W.style.visibility="",X.style.visibility="");x=null;mxUtils.setOpacity(O,100);mxUtils.setPrefixedStyle(O.style,"transform",null)})}else G||(G=!0,b.handleError({message:mxResources.get("fileExists")}));else{B=!1;try{if(I=mxUtils.parseXml(Q),"mxlibrary"==I.documentElement.nodeName){L=JSON.parse(mxUtils.getTextContent(I.documentElement));if(null!=L&&0<L.length)for(var Y=0;Y<L.length;Y++)null!=L[Y].xml?F(null,null,0,0,0,0,L[Y]):F(L[Y].data,null,0,0,L[Y].w,L[Y].h,null,"fixed",L[Y].title);B=!0}else if("mxfile"==-I.documentElement.nodeName){var ba=I.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=Editor.getDiagramNodeXml(ba[Y]);U=b.stringToCells(ea);if(0<U.length){var ca=b.editor.graph.getBoundingBoxFromGeometry(U);null!=ca&&F(null,null,0,0,0,0,{xml:ea,w:ca.width,h:ca.height})}}B=!0}}catch(fa){null!=window.console&&console.error("Error in library dialog: "+fa)}B||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(fa){null!=window.console&&-console.log("Error in library dialog: "+fa)}return null}function H(Q){Q.dataTransfer.dropEffect=null!=x?"move":"copy";Q.stopPropagation();Q.preventDefault()}function E(Q){Q.stopPropagation();Q.preventDefault();G=!1;A=u(Q);if(null!=x)null!=A&&A<k.children.length?(K.splice(A>x?A-1:A,0,K.splice(x,1)[0]),k.insertBefore(k.children[x],k.children[A])):(K.push(K.splice(x,1)[0]),k.appendChild(k.children[x]));else if(0<Q.dataTransfer.files.length)b.importFiles(Q.dataTransfer.files,0,0,b.maxImageSize,R(Q));-else if(0<=mxUtils.indexOf(Q.dataTransfer.types,"text/uri-list")){var P=decodeURIComponent(Q.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(P)||/(\.png)($|\?)/i.test(P)||/(\.gif)($|\?)/i.test(P)||/(\.svg)($|\?)/i.test(P))&&b.loadImage(P,function(q){F(P,null,0,0,q.width,q.height);k.scrollTop=k.scrollHeight})}Q.stopPropagation();Q.preventDefault()}var K=[];f=document.createElement("div");f.style.height="100%";var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.height=+e,f,c,l,n,p){function v(P){for(P=document.elementFromPoint(P.clientX,P.clientY);null!=P&&P.parentNode!=k;)P=P.parentNode;var O=null;if(null!=P){var q=k.firstChild;for(O=0;null!=q&&q!=P;)q=q.nextSibling,O++}return O}function F(P,O,q,y,B,C,M,T,m){try{if(b.spinner.stop(),null==O||"image/"==O.substring(0,6))if(null==P&&null!=M||null==t[P]){var z=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0<Z.title.length?+Z.title:mxResources.get("untitled"));X.style.color=null==Z.title||0==Z.title.length?"#d0d0d0":""};k.style.backgroundImage="";u.style.display="none";var I=B,L=C;if(B>b.maxImageSize||C>b.maxImageSize){var N=Math.min(1,Math.min(b.maxImageSize/Math.max(1,B)),b.maxImageSize/Math.max(1,C));B*=N;C*=N}I>L?(L=Math.round(100*L/I),I=100):(I=Math.round(100*I/L),L=100);var Q=document.createElement("div");Q.setAttribute("draggable","true");Q.style.display="inline-block";Q.style.position="relative";Q.style.padding=+"0 12px";Q.style.cursor="move";mxUtils.setPrefixedStyle(Q.style,"transition","transform .1s ease-in-out");if(null!=P){var R=document.createElement("img");R.setAttribute("src",D.convert(P));R.style.width=I+"px";R.style.height=L+"px";R.style.margin="10px";R.style.paddingBottom=Math.floor((100-L)/2)+"px";R.style.paddingLeft=Math.floor((100-I)/2)+"px";Q.appendChild(R)}else if(null!=M){var V=b.stringToCells("<"==M.xml.charAt(0)?M.xml:Graph.decompress(M.xml));0<V.length&&(b.sidebar.createThumb(V,100,100,+Q,null,!0,!1,null,null,Editor.isDarkMode()?"#2a252f":"#ffffff"),Q.firstChild.style.display="inline-block",Q.firstChild.style.cursor="")}var W=document.createElement("img");W.setAttribute("src",Editor.closeBlackImage);W.setAttribute("border","0");W.setAttribute("title",mxResources.get("delete"));W.setAttribute("align","top");W.style.paddingTop="4px";W.style.position="absolute";W.style.marginLeft="-12px";W.style.zIndex="1";W.style.cursor="pointer";mxEvent.addListener(W,"dragstart",function(ea){mxEvent.consume(ea)});+(function(ea,aa,fa){mxEvent.addListener(W,"click",function(ia){t[aa]=null;for(var na=0;na<K.length;na++)if(null!=K[na].data&&K[na].data==aa||null!=K[na].xml&&null!=fa&&K[na].xml==fa.xml){K.splice(na,1);break}Q.parentNode.removeChild(ea);0==K.length&&(k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(ia)});mxEvent.addListener(W,"dblclick",function(ia){mxEvent.consume(ia)})})(Q,P,M);Q.appendChild(W);Q.style.marginBottom="30px";var X=document.createElement("div");+X.style.position="absolute";X.style.boxSizing="border-box";X.style.bottom="-18px";X.style.left="10px";X.style.right="10px";X.style.backgroundColor="light-dark(#ffffff, transparent)";X.style.overflow="hidden";X.style.textAlign="center";X.setAttribute("title",mxResources.get("rename"));var Z=null;null!=P?(Z={data:P,w:B,h:C,title:m},null!=T&&(Z.aspect=T),t[P]=R,K.push(Z)):null!=M&&(M.aspect="fixed",K.push(M),Z=M);mxEvent.addListener(X,"keydown",function(ea){13==ea.keyCode&&null!=J&&(J(),J=null,mxEvent.consume(ea))});+z();Q.appendChild(X);mxEvent.addListener(X,"mousedown",function(ea){"true"!=X.getAttribute("contentEditable")&&mxEvent.consume(ea)});V=function(ea){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var aa=new FilenameDialog(b,Z.title||"",mxResources.get("ok"),function(fa){null!=fa&&(Z.title=fa,z())},mxResources.get("enterValue"));b.showDialog(aa.container,300,80,!0,!0);aa.init();mxEvent.consume(ea)}else if("true"!=X.getAttribute("contentEditable")){null!=+J&&(J(),J=null);if(null==Z.title||0==Z.title.length)X.innerText="";X.style.textOverflow="";X.style.whiteSpace="";X.style.cursor="text";X.style.color="";X.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(X.style,"user-select","text");X.focus();document.execCommand("selectAll",!1,null);J=function(){X.removeAttribute("contentEditable");X.style.cursor="pointer";Z.title=mxUtils.getTextContent(X);z()};mxEvent.consume(ea)}};mxEvent.addListener(X,"click",V);mxEvent.addListener(Q,"dblclick",+V);k.appendChild(Q);mxEvent.addListener(Q,"dragstart",function(ea){null==J&&(null==P&&null!=M&&(W.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=M.xml&&ea.dataTransfer.setData("Text",M.xml),x=v(ea),mxClient.IS_GC&&(Q.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(Q.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(Q,30);W.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(Q,"dragend",function(ea){"hidden"==W.style.visibility&&+(W.style.visibility="",X.style.visibility="");x=null;mxUtils.setOpacity(Q,100);mxUtils.setPrefixedStyle(Q.style,"transform",null)})}else G||(G=!0,b.handleError({message:mxResources.get("fileExists")}));else{B=!1;try{if(I=mxUtils.parseXml(P),"mxlibrary"==I.documentElement.nodeName){L=JSON.parse(mxUtils.getTextContent(I.documentElement));if(null!=L&&0<L.length)for(var Y=0;Y<L.length;Y++)null!=L[Y].xml?F(null,null,0,0,0,0,L[Y]):F(L[Y].data,null,0,0,L[Y].w,L[Y].h,null,"fixed",L[Y].title);B=!0}else if("mxfile"==+I.documentElement.nodeName){var ba=I.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var da=Editor.getDiagramNodeXml(ba[Y]);V=b.stringToCells(da);if(0<V.length){var ca=b.editor.graph.getBoundingBoxFromGeometry(V);null!=ca&&F(null,null,0,0,0,0,{xml:da,w:ca.width,h:ca.height})}}B=!0}}catch(ea){null!=window.console&&console.error("Error in library dialog: "+ea)}B||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ea){null!=window.console&&+console.log("Error in library dialog: "+ea)}return null}function H(P){P.dataTransfer.dropEffect=null!=x?"move":"copy";P.stopPropagation();P.preventDefault()}function E(P){P.stopPropagation();P.preventDefault();G=!1;A=v(P);if(null!=x)null!=A&&A<k.children.length?(K.splice(A>x?A-1:A,0,K.splice(x,1)[0]),k.insertBefore(k.children[x],k.children[A])):(K.push(K.splice(x,1)[0]),k.appendChild(k.children[x]));else if(0<P.dataTransfer.files.length)b.importFiles(P.dataTransfer.files,0,0,b.maxImageSize,S(P));+else if(0<=mxUtils.indexOf(P.dataTransfer.types,"text/uri-list")){var O=decodeURIComponent(P.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(O)||/(\.png)($|\?)/i.test(O)||/(\.gif)($|\?)/i.test(O)||/(\.svg)($|\?)/i.test(O))&&b.loadImage(O,function(q){F(O,null,0,0,q.width,q.height);k.scrollTop=k.scrollHeight})}P.stopPropagation();P.preventDefault()}var K=[];f=document.createElement("div");f.style.height="100%";var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.height="40px";f.appendChild(d);mxUtils.write(d,mxResources.get("filename")+":");null==e&&(e=b.defaultLibraryName+".xml");var g=document.createElement("input");g.setAttribute("value",e);g.style.marginRight="20px";g.style.marginLeft="10px";g.style.width="500px";null==l||l.isRenamable()||g.setAttribute("disabled","true");this.init=function(){if(null==l||l.isRenamable())g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)};d.appendChild(g);Editor.enableUncompressedLibraries&&(g.style.width="420px",e=document.createElement("input"),e.setAttribute("type","checkbox"),e.style.marginRight="10px",d.appendChild(e),mxUtils.write(d,mxResources.get("compressed")));var k=document.createElement("div");k.style.borderWidth="1px 0px 1px 0px";k.style.borderColor="#d3d3d3";k.style.borderStyle="solid";k.style.marginTop="6px";k.style.overflow="auto";k.style.height="340px";k.style.backgroundPosition="center center";k.style.backgroundRepeat="no-repeat";0==K.length&&Graph.fileSupport&&(k.style.backgroundImage=-"url('"+IMAGE_PATH+"/droptarget.png')");var v=document.createElement("div");v.style.position="absolute";v.style.width="640px";v.style.top="260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";mxUtils.write(v,mxResources.get("dragImagesHere"));f.appendChild(v);var t={},x=null,A=null,J=null;d=function(Q){"true"!=mxEvent.getSource(Q).getAttribute("contentEditable")&&null!=J&&(J(),J=null,mxEvent.consume(Q))};mxEvent.addListener(k,"mousedown",d);mxEvent.addListener(k,"pointerdown",-d);mxEvent.addListener(k,"touchstart",d);var D=new mxUrlConverter,G=!1;if(null!=c)for(d=0;d<c.length;d++)e=c[d],F(e.data,null,0,0,e.w,e.h,e,e.aspect,e.title);mxEvent.addListener(k,"dragleave",function(Q){v.style.cursor="";for(var P=mxEvent.getSource(Q);null!=P;){if(P==k||P==v){Q.stopPropagation();Q.preventDefault();break}P=P.parentNode}});var R=function(Q){return function(P,q,y,B,C,M,T,m,z){null!=z&&EditorUi.isVisioFilename(z.name)?b.importVisio(z,mxUtils.bind(this,function(I){F(I,q,y,B,C,M,T,"fixed",-mxEvent.isAltDown(Q)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," "))})):null!=z&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(P,z.name)?b.isExternalDataComms()?b.parseFile(z,mxUtils.bind(this,function(I){4==I.readyState&&(b.spinner.stop(),200<=I.status&&299>=I.status&&(F(I.responseText,q,y,B,C,M,T,"fixed",mxEvent.isAltDown(Q)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),k.scrollTop=k.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):-(F(P,q,y,B,C,M,T,"fixed",mxEvent.isAltDown(Q)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),k.scrollTop=k.scrollHeight)}};mxEvent.addListener(k,"dragover",H);mxEvent.addListener(k,"drop",E);mxEvent.addListener(v,"dragover",H);mxEvent.addListener(v,"drop",E);f.appendChild(k);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";b.editor.cancelFirst&&-c.appendChild(d);"draw.io"!=b.getServiceName()||null==l||l.constructor!=DriveLibrary&&l.constructor!=GitHubLibrary||(e=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(l,function(Q){if(null!=Q){var P=b.getSearch("create title mode url drive splash state clibs ui".split(" "));P+=(0==P.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(Q);Q=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+P,null,null,null,null,"Check out the library I made using @drawio");-b.showDialog(Q.container,450,240,!0);Q.init()}else l.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(l.getId(),l)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),e.className="geBtn",c.appendChild(e));e=mxUtils.button(mxResources.get("export"),function(){var Q=b.createLibraryDataFromImages(K),-P=g.value;/(\.xml)$/i.test(P)||(P+=".xml");b.isLocalFileSave()?b.saveLocalFile(Q,P,"text/xml",null,null,null!=p?p:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(P)+"&format=xml&xml="+encodeURIComponent(Q))).simulate(document,"_blank")});e.setAttribute("id","btnDownload");e.className="geBtn";c.appendChild(e);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var V=document.createElement("input");V.setAttribute("multiple","multiple");V.setAttribute("type","file");mxEvent.addListener(V,-"change",function(Q){G=!1;b.importFiles(V.files,0,0,b.maxImageSize,function(P,q,y,B,C,M,T,m,z){null!=V.files&&(R(Q)(P,q,y,B,C,M,T,m,z),V.type="",V.type="file",V.value="")});k.scrollTop=k.scrollHeight});V.style.display="none";document.body.appendChild(V);b.libDlgFileInputElt=V}e=mxUtils.button(mxResources.get("import"),function(){null!=J&&(J(),J=null);b.libDlgFileInputElt.click()});e.setAttribute("id","btnAddImage");e.className="geBtn";c.appendChild(e)}e=mxUtils.button(mxResources.get("addImages"),-function(){null!=J&&(J(),J=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(Q,P,q){G=!1;if(null!=Q){if("data:image/"==Q.substring(0,11)){var y=Q.indexOf(",");0<y&&(Q=Q.substring(0,y)+";base64,"+Q.substring(y+1))}F(Q,null,0,0,P,q);k.scrollTop=k.scrollHeight}})});e.setAttribute("id","btnAddImageUrl");e.className="geBtn";c.appendChild(e);this.saveBtnClickHandler=function(Q,P,q,y){b.saveLibrary(Q,P,q,y)};e=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=J&&-(J(),J=null);this.saveBtnClickHandler(g.value,K,l,n)}));e.setAttribute("id","btnSave");e.className="geBtn gePrimaryBtn";c.appendChild(e);b.editor.cancelFirst||c.appendChild(d);f.appendChild(c);this.container=f},EditShapeDialog=function(b,e,f,c,l){c=null!=c?c:300;l=null!=l?l:120;var n=document.createElement("table"),p=document.createElement("tbody");n.style.cellPadding="4px";var u=document.createElement("tr");var F=document.createElement("td");F.setAttribute("colspan","2");F.style.fontSize="10pt";-mxUtils.write(F,f);u.appendChild(F);p.appendChild(u);u=document.createElement("tr");F=document.createElement("td");var H=document.createElement("textarea");H.style.outline="none";H.style.resize="none";H.style.width=c-200+"px";H.style.height=l+"px";this.textarea=H;this.init=function(){H.focus();H.scrollTop=0};F.appendChild(H);u.appendChild(F);F=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top="6px";f.style.width="200px";-f.style.height=l+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);F.appendChild(f);var E=new Graph(f);E.setEnabled(!1);var K=b.editor.graph.cloneCell(e);E.addCells([K]);f=E.view.getState(K);var d="";null!=f.shape&&null!=f.shape.stencil&&(d=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(H,d||"");f=E.getGraphBounds();l=Math.min(160/f.width,(l-40)/f.height);E.view.scaleAndTranslate(l,20/l-f.x,20/l-f.y);u.appendChild(F);p.appendChild(u);u=document.createElement("tr");-F=document.createElement("td");F.setAttribute("colspan","2");F.style.paddingTop="2px";F.style.whiteSpace="nowrap";F.setAttribute("align","right");b.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),l.className="geBtn",F.appendChild(l));l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&F.appendChild(l);var g=function(k,v,t){var x=H.value,A=mxUtils.parseXml(x);-x=mxUtils.getPrettyXml(A.documentElement);A=A.documentElement.getElementsByTagName("parsererror");if(null!=A&&0<A.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(t&&b.hideDialog(),A=!k.model.contains(v),!t||A||x!=d){x=Graph.compress(x);k.getModel().beginUpdate();try{if(A){var J=b.editor.graph.getFreeInsertPoint();v.geometry.x=J.x;v.geometry.y=J.y;k.addCell(v)}k.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+x+")",[v])}catch(D){throw D;-}finally{k.getModel().endUpdate()}A&&(k.setSelectionCell(v),k.scrollCellToVisible(v))}};f=mxUtils.button(mxResources.get("preview"),function(){g(E,K,!1)});f.className="geBtn";F.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){g(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";F.appendChild(f);b.editor.cancelFirst||F.appendChild(l);u.appendChild(F);p.appendChild(u);n.appendChild(p);this.container=n},CustomDialog=function(b,e,f,c,l,n,p,u,F,H,E,K){var d=document.createElement("div");-d.appendChild(e);var g=document.createElement("div");g.style.marginTop=null!=K?K:"30px";g.style.textAlign="right";null!=p&&g.appendChild(p);b.isOffline()||null==n||g.appendChild(b.createHelpIcon(n));e=mxUtils.button(F||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});e.className="geBtn";u&&(e.style.display="none");b.editor.cancelFirst&&g.appendChild(e);l=mxUtils.button(l||mxResources.get("ok"),mxUtils.bind(this,function(){H||b.hideDialog(null,null,this.container);if(null!=f){var k=-f();if("string"===typeof k){b.showError(mxResources.get("error"),k);return}}H&&b.hideDialog(null,null,this.container)}));g.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(e);if(null!=E)for(u=0;u<E.length;u++)(function(k,v,t){k=mxUtils.button(k,function(x){v(x)});null!=t&&k.setAttribute("title",t);k.className="geBtn";g.appendChild(k)})(E[u][0],E[u][1],E[u][2]);d.appendChild(g);this.cancelBtn=e;this.okButton=l;this.container=d},BtnDialog=function(b,e,f,c){var l=document.createElement("div");-l.style.textAlign="center";var n=document.createElement("p");n.style.fontSize="16pt";n.style.padding="0px";n.style.margin="0px";n.style.color="gray";mxUtils.write(n,mxResources.get("done"));var p="Unknown",u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.marginRight="10px";e==b.drive?(p=mxResources.get("googleDrive"),u.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(p=mxResources.get("dropbox"),u.src=IMAGE_PATH+"/dropbox-logo-white.svg"):-e==b.oneDrive?(p=mxResources.get("oneDrive"),u.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(p=mxResources.get("github"),u.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(p=mxResources.get("gitlab"),u.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.trello&&(p=mxResources.get("trello"),u.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[p],"You are now authorized in {1}"));f=mxUtils.button(f,c);f.insertBefore(u,f.firstChild);-f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";l.appendChild(n);l.appendChild(b);l.appendChild(f);this.container=l},FontDialog=function(b,e,f,c,l){function n(J){this.style.border="";13==J.keyCode&&A.click()}var p=document.createElement("table"),u=document.createElement("tbody");p.style.marginTop="8px";var F=document.createElement("tr");var H=document.createElement("td");H.colSpan=2;H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.fontWeight=-"bold";var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-bottom:8px;";E.setAttribute("value","sysfonts");E.setAttribute("type","radio");E.setAttribute("name","current-fontdialog");E.setAttribute("id","fontdialog-sysfonts");H.appendChild(E);var K=document.createElement("label");K.setAttribute("for","fontdialog-sysfonts");mxUtils.write(K,mxResources.get("sysFonts",null,"System Fonts"));H.appendChild(K);F.appendChild(H);u.appendChild(F);F=document.createElement("tr");H=document.createElement("td");-H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",null,"Font Name")+":");F.appendChild(H);var d=document.createElement("input");"s"==c&&d.setAttribute("value",e);d.style.marginLeft="4px";d.style.width="250px";d.className="dlg_fontName_s";H=document.createElement("td");H.appendChild(d);F.appendChild(H);u.appendChild(F);F=document.createElement("tr");H=document.createElement("td");H.colSpan=2;H.style.whiteSpace=+"url('"+IMAGE_PATH+"/droptarget.png')");var u=document.createElement("div");u.style.position="absolute";u.style.width="640px";u.style.top="260px";u.style.textAlign="center";u.style.fontSize="22px";u.style.color="#a0c3ff";mxUtils.write(u,mxResources.get("dragImagesHere"));f.appendChild(u);var t={},x=null,A=null,J=null;d=function(P){"true"!=mxEvent.getSource(P).getAttribute("contentEditable")&&null!=J&&(J(),J=null,mxEvent.consume(P))};mxEvent.addListener(k,"mousedown",d);mxEvent.addListener(k,"pointerdown",+d);mxEvent.addListener(k,"touchstart",d);var D=new mxUrlConverter,G=!1;if(null!=c)for(d=0;d<c.length;d++)e=c[d],F(e.data,null,0,0,e.w,e.h,e,e.aspect,e.title);mxEvent.addListener(k,"dragleave",function(P){u.style.cursor="";for(var O=mxEvent.getSource(P);null!=O;){if(O==k||O==u){P.stopPropagation();P.preventDefault();break}O=O.parentNode}});var S=function(P){return function(O,q,y,B,C,M,T,m,z){null!=z&&EditorUi.isVisioFilename(z.name)?b.importVisio(z,mxUtils.bind(this,function(I){F(I,q,y,B,C,M,T,"fixed",+mxEvent.isAltDown(P)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," "))})):null!=z&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(O,z.name)?b.isExternalDataComms()?b.parseFile(z,mxUtils.bind(this,function(I){4==I.readyState&&(b.spinner.stop(),200<=I.status&&299>=I.status&&(F(I.responseText,q,y,B,C,M,T,"fixed",mxEvent.isAltDown(P)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),k.scrollTop=k.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):+(F(O,q,y,B,C,M,T,"fixed",mxEvent.isAltDown(P)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),k.scrollTop=k.scrollHeight)}};mxEvent.addListener(k,"dragover",H);mxEvent.addListener(k,"drop",E);mxEvent.addListener(u,"dragover",H);mxEvent.addListener(u,"drop",E);f.appendChild(k);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";b.editor.cancelFirst&&+c.appendChild(d);"draw.io"!=b.getServiceName()||null==l||l.constructor!=DriveLibrary&&l.constructor!=GitHubLibrary||(e=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(l,function(P){if(null!=P){var O=b.getSearch("create title mode url drive splash state clibs ui".split(" "));O+=(0==O.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(P);P=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+O,null,null,null,null,"Check out the library I made using @drawio");+b.showDialog(P.container,450,240,!0);P.init()}else l.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(l.getId(),l)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),e.className="geBtn",c.appendChild(e));e=mxUtils.button(mxResources.get("export"),function(){var P=b.createLibraryDataFromImages(K),+O=g.value;/(\.xml)$/i.test(O)||(O+=".xml");b.isLocalFileSave()?b.saveLocalFile(P,O,"text/xml",null,null,null!=p?p:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(O)+"&format=xml&xml="+encodeURIComponent(P))).simulate(document,"_blank")});e.setAttribute("id","btnDownload");e.className="geBtn";c.appendChild(e);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var U=document.createElement("input");U.setAttribute("multiple","multiple");U.setAttribute("type","file");mxEvent.addListener(U,+"change",function(P){G=!1;b.importFiles(U.files,0,0,b.maxImageSize,function(O,q,y,B,C,M,T,m,z){null!=U.files&&(S(P)(O,q,y,B,C,M,T,m,z),U.type="",U.type="file",U.value="")});k.scrollTop=k.scrollHeight});U.style.display="none";document.body.appendChild(U);b.libDlgFileInputElt=U}e=mxUtils.button(mxResources.get("import"),function(){null!=J&&(J(),J=null);b.libDlgFileInputElt.click()});e.setAttribute("id","btnAddImage");e.className="geBtn";c.appendChild(e)}e=mxUtils.button(mxResources.get("addImages"),+function(){null!=J&&(J(),J=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(P,O,q){G=!1;if(null!=P){if("data:image/"==P.substring(0,11)){var y=P.indexOf(",");0<y&&(P=P.substring(0,y)+";base64,"+P.substring(y+1))}F(P,null,0,0,O,q);k.scrollTop=k.scrollHeight}})});e.setAttribute("id","btnAddImageUrl");e.className="geBtn";c.appendChild(e);this.saveBtnClickHandler=function(P,O,q,y){b.saveLibrary(P,O,q,y)};e=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=J&&+(J(),J=null);this.saveBtnClickHandler(g.value,K,l,n)}));e.setAttribute("id","btnSave");e.className="geBtn gePrimaryBtn";c.appendChild(e);b.editor.cancelFirst||c.appendChild(d);f.appendChild(c);this.container=f},EditShapeDialog=function(b,e,f,c,l){c=null!=c?c:300;l=null!=l?l:120;var n=document.createElement("table"),p=document.createElement("tbody");n.style.cellPadding="4px";var v=document.createElement("tr");var F=document.createElement("td");F.setAttribute("colspan","2");F.style.fontSize="10pt";+mxUtils.write(F,f);v.appendChild(F);p.appendChild(v);v=document.createElement("tr");F=document.createElement("td");var H=document.createElement("textarea");H.style.outline="none";H.style.resize="none";H.style.width=c-200+"px";H.style.height=l+"px";this.textarea=H;this.init=function(){H.focus();H.scrollTop=0};F.appendChild(H);v.appendChild(F);F=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top="6px";f.style.width="200px";+f.style.height=l+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);F.appendChild(f);var E=new Graph(f);E.setEnabled(!1);var K=b.editor.graph.cloneCell(e);E.addCells([K]);f=E.view.getState(K);var d="";null!=f.shape&&null!=f.shape.stencil&&(d=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(H,d||"");f=E.getGraphBounds();l=Math.min(160/f.width,(l-40)/f.height);E.view.scaleAndTranslate(l,20/l-f.x,20/l-f.y);v.appendChild(F);p.appendChild(v);v=document.createElement("tr");+F=document.createElement("td");F.setAttribute("colspan","2");F.style.paddingTop="2px";F.style.whiteSpace="nowrap";F.setAttribute("align","right");b.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),l.className="geBtn",F.appendChild(l));l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&F.appendChild(l);var g=function(k,u,t){var x=H.value,A=mxUtils.parseXml(x);+x=mxUtils.getPrettyXml(A.documentElement);A=A.documentElement.getElementsByTagName("parsererror");if(null!=A&&0<A.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(t&&b.hideDialog(),A=!k.model.contains(u),!t||A||x!=d){x=Graph.compress(x);k.getModel().beginUpdate();try{if(A){var J=b.editor.graph.getFreeInsertPoint();u.geometry.x=J.x;u.geometry.y=J.y;k.addCell(u)}k.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+x+")",[u])}catch(D){throw D;+}finally{k.getModel().endUpdate()}A&&(k.setSelectionCell(u),k.scrollCellToVisible(u))}};f=mxUtils.button(mxResources.get("preview"),function(){g(E,K,!1)});f.className="geBtn";F.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){g(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";F.appendChild(f);b.editor.cancelFirst||F.appendChild(l);v.appendChild(F);p.appendChild(v);n.appendChild(p);this.container=n},CustomDialog=function(b,e,f,c,l,n,p,v,F,H,E,K){var d=document.createElement("div");+d.appendChild(e);var g=document.createElement("div");g.style.marginTop=null!=K?K:"30px";g.style.textAlign="right";null!=p&&g.appendChild(p);b.isOffline()||null==n||g.appendChild(b.createHelpIcon(n));e=mxUtils.button(F||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});e.className="geBtn";v&&(e.style.display="none");b.editor.cancelFirst&&g.appendChild(e);l=mxUtils.button(l||mxResources.get("ok"),mxUtils.bind(this,function(){H||b.hideDialog(null,null,this.container);if(null!=f){var k=+f();if("string"===typeof k){b.showError(mxResources.get("error"),k);return}}H&&b.hideDialog(null,null,this.container)}));g.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(e);if(null!=E)for(v=0;v<E.length;v++)(function(k,u,t){k=mxUtils.button(k,function(x){u(x)});null!=t&&k.setAttribute("title",t);k.className="geBtn";g.appendChild(k)})(E[v][0],E[v][1],E[v][2]);d.appendChild(g);this.cancelBtn=e;this.okButton=l;this.container=d},BtnDialog=function(b,e,f,c){var l=document.createElement("div");+l.style.textAlign="center";var n=document.createElement("p");n.style.fontSize="16pt";n.style.padding="0px";n.style.margin="0px";n.style.color="gray";mxUtils.write(n,mxResources.get("done"));var p="Unknown",v=document.createElement("img");v.setAttribute("border","0");v.setAttribute("align","absmiddle");v.style.marginRight="10px";e==b.drive?(p=mxResources.get("googleDrive"),v.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(p=mxResources.get("dropbox"),v.src=IMAGE_PATH+"/dropbox-logo-white.svg"):+e==b.oneDrive?(p=mxResources.get("oneDrive"),v.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(p=mxResources.get("github"),v.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(p=mxResources.get("gitlab"),v.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.trello&&(p=mxResources.get("trello"),v.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[p],"You are now authorized in {1}"));f=mxUtils.button(f,c);f.insertBefore(v,f.firstChild);+f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";l.appendChild(n);l.appendChild(b);l.appendChild(f);this.container=l},FontDialog=function(b,e,f,c,l){function n(J){this.style.border="";13==J.keyCode&&A.click()}var p=document.createElement("table"),v=document.createElement("tbody");p.style.marginTop="8px";var F=document.createElement("tr");var H=document.createElement("td");H.colSpan=2;H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.fontWeight=+"bold";var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-bottom:8px;";E.setAttribute("value","sysfonts");E.setAttribute("type","radio");E.setAttribute("name","current-fontdialog");E.setAttribute("id","fontdialog-sysfonts");H.appendChild(E);var K=document.createElement("label");K.setAttribute("for","fontdialog-sysfonts");mxUtils.write(K,mxResources.get("sysFonts",null,"System Fonts"));H.appendChild(K);F.appendChild(H);v.appendChild(F);F=document.createElement("tr");H=document.createElement("td");+H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",null,"Font Name")+":");F.appendChild(H);var d=document.createElement("input");"s"==c&&d.setAttribute("value",e);d.style.marginLeft="4px";d.style.width="250px";d.className="dlg_fontName_s";H=document.createElement("td");H.appendChild(d);F.appendChild(H);v.appendChild(F);F=document.createElement("tr");H=document.createElement("td");H.colSpan=2;H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.fontWeight="bold";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","googlefonts");g.setAttribute("type","radio");g.setAttribute("name","current-fontdialog");g.setAttribute("id","fontdialog-googlefonts");H.appendChild(g);K=document.createElement("label");K.setAttribute("for","fontdialog-googlefonts");mxUtils.write(K,mxResources.get("googleFonts",null,"Google Fonts"));H.appendChild(K);if(!b.isOffline()||-EditorUi.isElectronApp)K=b.createHelpIcon("https://fonts.google.com/"),H.appendChild(K);F.appendChild(H);"0"!=urlParams.isGoogleFontsEnabled&&u.appendChild(F);F=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",null,"Font Name")+":");F.appendChild(H);var k=document.createElement("input");"g"==c&&k.setAttribute("value",e);k.style.marginLeft="4px";-k.style.width="250px";k.className="dlg_fontName_g";H=document.createElement("td");H.appendChild(k);F.appendChild(H);"0"!=urlParams.isGoogleFontsEnabled&&u.appendChild(F);F=document.createElement("tr");H=document.createElement("td");H.colSpan=2;H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.fontWeight="bold";var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","webfonts");v.setAttribute("type","radio");v.setAttribute("name",-"current-fontdialog");v.setAttribute("id","fontdialog-webfonts");H.appendChild(v);K=document.createElement("label");K.setAttribute("for","fontdialog-webfonts");mxUtils.write(K,mxResources.get("webfonts",null,"Web Fonts"));H.appendChild(K);F.appendChild(H);Editor.enableWebFonts&&u.appendChild(F);F=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",-null,"Font Name")+":");F.appendChild(H);var t=document.createElement("input");"w"==c&&(Editor.enableWebFonts?t.setAttribute("value",e):d.setAttribute("value",e));t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontName_w";H=document.createElement("td");H.appendChild(t);F.appendChild(H);Editor.enableWebFonts&&u.appendChild(F);F=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";-mxUtils.write(H,mxResources.get("fontUrl",null,"Font URL")+":");F.appendChild(H);var x=document.createElement("input");x.setAttribute("value",f||"");x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontUrl";H=document.createElement("td");H.appendChild(x);F.appendChild(H);Editor.enableWebFonts&&u.appendChild(F);this.init=function(){var J=d;"g"==c?J=k:"w"==c&&Editor.enableWebFonts&&(J=t);J.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?J.select():document.execCommand("selectAll",+EditorUi.isElectronApp)K=b.createHelpIcon("https://fonts.google.com/"),H.appendChild(K);F.appendChild(H);"0"!=urlParams.isGoogleFontsEnabled&&v.appendChild(F);F=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",null,"Font Name")+":");F.appendChild(H);var k=document.createElement("input");"g"==c&&k.setAttribute("value",e);k.style.marginLeft="4px";+k.style.width="250px";k.className="dlg_fontName_g";H=document.createElement("td");H.appendChild(k);F.appendChild(H);"0"!=urlParams.isGoogleFontsEnabled&&v.appendChild(F);F=document.createElement("tr");H=document.createElement("td");H.colSpan=2;H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.fontWeight="bold";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","webfonts");u.setAttribute("type","radio");u.setAttribute("name",+"current-fontdialog");u.setAttribute("id","fontdialog-webfonts");H.appendChild(u);K=document.createElement("label");K.setAttribute("for","fontdialog-webfonts");mxUtils.write(K,mxResources.get("webfonts",null,"Web Fonts"));H.appendChild(K);F.appendChild(H);Editor.enableWebFonts&&v.appendChild(F);F=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",+null,"Font Name")+":");F.appendChild(H);var t=document.createElement("input");"w"==c&&(Editor.enableWebFonts?t.setAttribute("value",e):d.setAttribute("value",e));t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontName_w";H=document.createElement("td");H.appendChild(t);F.appendChild(H);Editor.enableWebFonts&&v.appendChild(F);F=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";+mxUtils.write(H,mxResources.get("fontUrl",null,"Font URL")+":");F.appendChild(H);var x=document.createElement("input");x.setAttribute("value",f||"");x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontUrl";H=document.createElement("td");H.appendChild(x);F.appendChild(H);Editor.enableWebFonts&&v.appendChild(F);this.init=function(){var J=d;"g"==c?J=k:"w"==c&&Editor.enableWebFonts&&(J=t);J.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?J.select():document.execCommand("selectAll",!1,null)};F=document.createElement("tr");H=document.createElement("td");H.colSpan=2;H.style.paddingTop="20px";H.style.whiteSpace="nowrap";H.setAttribute("align","right");b.isOffline()||H.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();l()});e.className="geBtn";b.editor.cancelFirst&&H.appendChild(e);var A=mxUtils.button(mxResources.get("apply"),function(){if(E.checked){var J=d.value;var D="s"}else if(g.checked){J=-k.value;var G=Editor.GOOGLE_FONTS+encodeURIComponent(J).replace(/%20/g,"+");D="g"}else v.checked&&(J=t.value,G=x.value,D="w");var R=J;var V=G,Q=D,P=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,q=p.querySelector(".dlg_fontName_"+Q);null==q||null!=R&&0!=R.length?(q=p.querySelector(".dlg_fontUrl"),null==q||"w"!=Q||P.test(V)?R=!0:(q.style.border="1px solid red",R=!1)):(q.style.border="1px solid red",R=!1);R&&(l(J,G,D),b.hideDialog())});A.className="geBtn gePrimaryBtn";-mxEvent.addListener(d,"keypress",n);mxEvent.addListener(k,"keypress",n);mxEvent.addListener(t,"keypress",n);mxEvent.addListener(x,"keypress",n);mxEvent.addListener(d,"focus",function(){E.setAttribute("checked","checked");E.checked=!0});mxEvent.addListener(k,"focus",function(){g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(t,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(x,"focus",function(){v.setAttribute("checked","checked");v.checked=-!0});H.appendChild(A);b.editor.cancelFirst||H.appendChild(e);F.appendChild(H);u.appendChild(F);p.appendChild(u);this.container=p};+k.value;var G=Editor.GOOGLE_FONTS+encodeURIComponent(J).replace(/%20/g,"+");D="g"}else u.checked&&(J=t.value,G=x.value,D="w");var S=J;var U=G,P=D,O=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,q=p.querySelector(".dlg_fontName_"+P);null==q||null!=S&&0!=S.length?(q=p.querySelector(".dlg_fontUrl"),null==q||"w"!=P||O.test(U)?S=!0:(q.style.border="1px solid red",S=!1)):(q.style.border="1px solid red",S=!1);S&&(l(J,G,D),b.hideDialog())});A.className="geBtn gePrimaryBtn";+mxEvent.addListener(d,"keypress",n);mxEvent.addListener(k,"keypress",n);mxEvent.addListener(t,"keypress",n);mxEvent.addListener(x,"keypress",n);mxEvent.addListener(d,"focus",function(){E.setAttribute("checked","checked");E.checked=!0});mxEvent.addListener(k,"focus",function(){g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(t,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(x,"focus",function(){u.setAttribute("checked","checked");u.checked=+!0});H.appendChild(A);b.editor.cancelFirst||H.appendChild(e);F.appendChild(H);v.appendChild(F);p.appendChild(v);this.container=p};function AspectDialog(b,e,f,c,l){this.aspect={pageId:e||(b.pages?b.pages[0].getId():null),layerIds:f||[]};e=document.createElement("div");var n=document.createElement("h5");n.style.margin="0 0 10px";mxUtils.write(n,mxResources.get("pages"));e.appendChild(n);f=document.createElement("div");f.className="geAspectDlgList";e.appendChild(f);n=document.createElement("h5");n.style.margin="0 0 10px";mxUtils.write(n,mxResources.get("layers"));e.appendChild(n);n=document.createElement("div");n.className="geAspectDlgList";e.appendChild(n);this.pagesContainer=f;this.layersContainer=n;this.ui=b;f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="center";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});n.className="geBtn";b.editor.cancelFirst&&f.appendChild(n);var p=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));f.appendChild(p);p.className="geBtn gePrimaryBtn";b.editor.cancelFirst||f.appendChild(n);p.setAttribute("disabled","disabled");this.okBtn=p;e.appendChild(f);this.container=e}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var e=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(e.getId(),e.getName(),e.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};@@ -12671,11 +12671,11 @@ AspectDialog.prototype.createPageItem=function(b,e,f){var c=document.createElemethis.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var n=l.model;n=n.getChildCells(n.getRoot());for(var p=0;p<n.length;p++)this.createLayerItem(n[p],b,l,f)});mxEvent.addListener(c,"click",e);this.aspect.pageId==b&&e()};AspectDialog.prototype.createLayerItem=function(b,e,f,c){e=f.convertValueToString(b)||mxResources.get("background")||"Background";var l=document.createElement("div");l.setAttribute("data-layer-id",b.id);l.className="geAspectDlgListItem";l.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.layersContainer.appendChild(l);this.createViewer(l.childNodes[0],c,b.id);c=mxUtils.bind(this,function(){0<=l.className.indexOf("geAspectDlgListItemSelected")?(l.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(l.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(l,"click",c);-1!=this.aspect.layerIds.indexOf(b.id)&&c()};-var FilePropertiesDialog=function(b,e){function f(D){var G=H;H=function(R,V){try{D(function(){G(R,V)},V)}catch(Q){V(Q)}}}var c=document.createElement("table"),l=document.createElement("tbody");c.style.width="100%";c.style.marginTop="8px";c.style.tableLayout="fixed";var n=b.getCurrentFile(),p=null!=n&&null!=n.getTitle()?n.getTitle():b.defaultFilename,u=/(\.png)$/i.test(p),F=/(\.svg)$/i.test(p),H=function(D,G){D()},E=null!=n?n.isLocked():!1;var K=document.createElement("tr");var d=document.createElement("td");+var FilePropertiesDialog=function(b,e){function f(D){var G=H;H=function(S,U){try{D(function(){G(S,U)},U)}catch(P){U(P)}}}var c=document.createElement("table"),l=document.createElement("tbody");c.style.width="100%";c.style.marginTop="8px";c.style.tableLayout="fixed";var n=b.getCurrentFile(),p=null!=n&&null!=n.getTitle()?n.getTitle():b.defaultFilename,v=/(\.png)$/i.test(p),F=/(\.svg)$/i.test(p),H=function(D,G){D()},E=null!=n?n.isLocked():!1;var K=document.createElement("tr");var d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("locked")+":");K.appendChild(d);var g=document.createElement("input");g.setAttribute("type","checkbox");E&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(g);K.appendChild(d);l.appendChild(K);this.init=function(){g.focus()};f(function(D,G){null!=b.fileNode&&E!=g.checked?window.setTimeout(function(){null!=-n&&n.setLocked(g.checked);D()},0):D()});if(u||F){p=1;u=0;K=b.fileNode;null!=K&&(K.hasAttribute("scale")&&(p=parseFloat(K.getAttribute("scale"))),K.hasAttribute("border")&&(u=parseInt(K.getAttribute("border"))));K=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("zoom")+":");K.appendChild(d);var k=document.createElement("input");k.setAttribute("value",100*p+"%");k.style.marginLeft="4px";k.style.width="100%";-d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(k);K.appendChild(d);l.appendChild(K);K=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("borderWidth")+":");K.appendChild(d);var v=document.createElement("input");v.setAttribute("value",u);v.style.marginLeft="4px";v.style.width="100%";d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(v);K.appendChild(d);l.appendChild(K);-this.init=this.init||function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};f(function(D,G){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(k.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(v.value))),null!=n&&n.fileChanged());D()})}else if(!/(\.html)$/i.test(p)&&!/(\.svg)$/i.test(p)){var t=null!=n?n.isCompressed():Editor.defaultCompressed;K=document.createElement("tr");d=document.createElement("td");+n&&n.setLocked(g.checked);D()},0):D()});if(v||F){p=1;v=0;K=b.fileNode;null!=K&&(K.hasAttribute("scale")&&(p=parseFloat(K.getAttribute("scale"))),K.hasAttribute("border")&&(v=parseInt(K.getAttribute("border"))));K=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("zoom")+":");K.appendChild(d);var k=document.createElement("input");k.setAttribute("value",100*p+"%");k.style.marginLeft="4px";k.style.width="100%";+d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(k);K.appendChild(d);l.appendChild(K);K=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("borderWidth")+":");K.appendChild(d);var u=document.createElement("input");u.setAttribute("value",v);u.style.marginLeft="4px";u.style.width="100%";d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(u);K.appendChild(d);l.appendChild(K);+this.init=this.init||function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};f(function(D,G){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(k.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(u.value))),null!=n&&n.fileChanged());D()})}else if(!/(\.html)$/i.test(p)&&!/(\.svg)$/i.test(p)){var t=null!=n?n.isCompressed():Editor.defaultCompressed;K=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("compressed")+":");K.appendChild(d);var x=document.createElement("input");x.setAttribute("type","checkbox");t&&(x.setAttribute("checked","checked"),x.defaultChecked=!0);d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(x);K.appendChild(d);l.appendChild(K);this.init=this.init||function(){x.focus()};f(function(D,G){null!=b.fileNode&&t!=x.checked?window.setTimeout(function(){b.fileNode.setAttribute("compressed",x.checked?"true":"false");null!=n&&(n.compressionChanged(x.checked),n.fileChanged());D()},0):D()})}if(null!=n&&n.isRealtimeOptional()){K=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("realtimeCollaboration")+":");K.appendChild(d);var A=document.createElement("input");A.setAttribute("type","checkbox");var J=n.isRealtimeEnabled();if(J="disabled"!=b.drive.getCustomProperty(n.desc,"collaboration"))A.setAttribute("checked","checked"),A.defaultChecked=!0;f(function(D,G){A.checked!=J?n.setRealtimeEnabled(A.checked,D,G):D()});this.init=null!=this.init?this.init:function(){A.focus()};d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(A);d.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));K.appendChild(d);l.appendChild(K)}null!=n&&@@ -12683,22 +12683,22 @@ x.checked?window.setTimeout(function(){b.fileNode.setAttribute("compressed",x.chd=document.createElement("td"),d.style.whiteSpace="nowrap",d.appendChild(p),K.appendChild(d),l.appendChild(K));null!=e&&(K=document.createElement("tr"),d=document.createElement("td"),d.style.whiteSpace="nowrap",d.style.overflow="hidden",d.style.textOverflow="ellipsis",d.style.fontSize="10pt",mxUtils.write(d,mxResources.get("publicDiagramUrl")+":"),K.appendChild(d),p=document.createElement("a"),p.setAttribute("href",e),p.setAttribute("title",e),p.style.whiteSpace="nowrap",p.style.overflow="hidden",p.style.textOverflow="ellipsis",p.style.display="block",p.style.margin="2px 0px 2px 8px",p.style.fontSize="10pt",mxUtils.write(p,e),mxEvent.addListener(p,"click",function(D){b.openLink(e);mxEvent.consume(D)}),d=document.createElement("td"),d.appendChild(p),K.appendChild(d),l.appendChild(K));null!=n&&null!=n.fileObject&&null!=n.fileObject.path&&(K=document.createElement("tr"),d=document.createElement("td"),d.style.whiteSpace="nowrap",d.style.overflow="hidden",d.style.textOverflow="ellipsis",d.style.fontSize="10pt",mxUtils.write(d,mxResources.get("pathFilename")+":"),K.appendChild(d),p=document.createElement("input"),p.setAttribute("title",n.fileObject.path),p.setAttribute("value",n.fileObject.path),p.setAttribute("disabled","disabled"),p.style.marginLeft="4px",p.style.width="100%",d=document.createElement("td"),d.appendChild(p),K.appendChild(d),l.appendChild(K));this.init=null!=this.init?this.init:function(){};p=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&-H(function(){b.spinner.stop();b.hideDialog()},function(D){b.spinner.stop();b.handleError(D,mxResources.get("error"))})});p.className="geBtn gePrimaryBtn";K=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align","right");u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";b.editor.cancelFirst&&d.appendChild(u);d.appendChild(p);b.editor.cancelFirst||d.appendChild(u);K.appendChild(d);+H(function(){b.spinner.stop();b.hideDialog()},function(D){b.spinner.stop();b.handleError(D,mxResources.get("error"))})});p.className="geBtn gePrimaryBtn";K=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align","right");v=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});v.className="geBtn";b.editor.cancelFirst&&d.appendChild(v);d.appendChild(p);b.editor.cancelFirst||d.appendChild(v);K.appendChild(d);l.appendChild(K);c.appendChild(l);this.container=c},ConnectionPointsDialog=function(b,e){function f(){null!=l&&l.destroy()}var c=document.createElement("div");c.style.userSelect="none";var l=null;this.init=function(){function n(B,C,M){B=new mxCell("",new mxGeometry(B,C,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");B.vertex=!0;B.cp=!0;B.constObj=M;return K.addCell(B)}function p(B){B=K.getSelectionCells();K.deleteCells(B)}-function u(){var B=parseInt(Q.value)||0;B=0>B?0:100<B?100:B;Q.value=B;var C=parseInt(q.value)||0;C=0>C?0:100<C?100:C;q.value=C;var M=parseInt(P.value)||0,T=parseInt(y.value)||0;M=new mxConnectionConstraint(new mxPoint(B/100,C/100),!1,null,M,T);B=K.getConnectionPoint(k,M);C=K.getSelectionCell();if(null!=C){C.constObj=M;M=C.geometry.clone();T=K.view.scale;var m=K.view.translate;M.x=(B.x-3*T)/T-m.x;M.y=(B.y-3*T)/T-m.y;K.model.setGeometry(C,M)}}function F(B){if(B.constObj)return{x:B.constObj.point.x,-y:B.constObj.point.y,dx:B.constObj.dx,dy:B.constObj.dy};var C=0,M=0,T=d.geometry,m=mxUtils.format((B.geometry.x+3-T.x)/T.width);B=mxUtils.format((B.geometry.y+3-T.y)/T.height);0>m?(C=m*T.width,m=0):1<m&&(C=(m-1)*T.width,m=1);0>B?(M=B*T.height,B=0):1<B&&(M=(B-1)*T.height,B=1);return{x:m,y:B,dx:parseInt(C),dy:parseInt(M)}}function H(B){if(1==K.getSelectionCount()){var C=K.getSelectionCell();B&&(C.constObj=null);B=F(C);Q.value=100*B.x;q.value=100*B.y;P.value=B.dx;y.value=B.dy;V.style.visibility=""}else V.style.visibility=+function v(){var B=parseInt(P.value)||0;B=0>B?0:100<B?100:B;P.value=B;var C=parseInt(q.value)||0;C=0>C?0:100<C?100:C;q.value=C;var M=parseInt(O.value)||0,T=parseInt(y.value)||0;M=new mxConnectionConstraint(new mxPoint(B/100,C/100),!1,null,M,T);B=K.getConnectionPoint(k,M);C=K.getSelectionCell();if(null!=C){C.constObj=M;M=C.geometry.clone();T=K.view.scale;var m=K.view.translate;M.x=(B.x-3*T)/T-m.x;M.y=(B.y-3*T)/T-m.y;K.model.setGeometry(C,M)}}function F(B){if(B.constObj)return{x:B.constObj.point.x,+y:B.constObj.point.y,dx:B.constObj.dx,dy:B.constObj.dy};var C=0,M=0,T=d.geometry,m=mxUtils.format((B.geometry.x+3-T.x)/T.width);B=mxUtils.format((B.geometry.y+3-T.y)/T.height);0>m?(C=m*T.width,m=0):1<m&&(C=(m-1)*T.width,m=1);0>B?(M=B*T.height,B=0):1<B&&(M=(B-1)*T.height,B=1);return{x:m,y:B,dx:parseInt(C),dy:parseInt(M)}}function H(B){if(1==K.getSelectionCount()){var C=K.getSelectionCell();B&&(C.constObj=null);B=F(C);P.value=100*B.x;q.value=100*B.y;O.value=B.dx;y.value=B.dy;U.style.visibility=""}else U.style.visibility="hidden"}var E=document.createElement("div");E.style.width="350px";E.style.height="350px";E.style.overflow="hidden";E.style.border="1px solid lightGray";E.style.boxSizing="border-box";mxEvent.disableContextMenu(E);c.appendChild(E);var K=new Graph(E);K.transparentBackground=!1;K.autoExtend=!1;K.autoScroll=!1;K.setGridEnabled(!1);K.setEnabled(!0);K.setPanning(!0);K.setConnectable(!1);K.setTooltips(!1);K.minFitScale=null;K.maxFitScale=null;K.centerZoom=!0;K.maxFitScale=2;E=e.geometry;var d=new mxCell(e.value,new mxGeometry(0,0,E.width,E.height),e.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;fillColor=none;");d.vertex=!0;K.addCell(d);K.dblClick=function(B,C){if(null!=C&&C!=d)K.setSelectionCell(C);else{C=mxUtils.convertPoint(K.container,mxEvent.getClientX(B),mxEvent.getClientY(B));mxEvent.consume(B);B=K.view.scale;var M=K.view.translate;K.setSelectionCell(n((C.x-3*B)/B-M.x,(C.y-3*B)/B-M.y))}};l=new mxKeyHandler(K);l.bindKey(46,p);l.bindKey(8,p);K.getRubberband().isForceRubberbandEvent=-function(B){return 0==B.evt.button&&(null==B.getCell()||B.getCell()==d)};K.panningHandler.isForcePanningEvent=function(B){return 2==B.evt.button};var g=K.isCellSelectable;K.isCellSelectable=function(B){return B==d?!1:g.apply(this,arguments)};K.getLinkForCell=function(){return null};var k=K.view.getState(d);E=K.getAllConnectionConstraints(k);for(var v=0;null!=E&&v<E.length;v++){var t=K.getConnectionPoint(k,E[v]);n(t.x-3,t.y-3,E[v])}K.fit(8);K.center();v=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),+function(B){return 0==B.evt.button&&(null==B.getCell()||B.getCell()==d)};K.panningHandler.isForcePanningEvent=function(B){return 2==B.evt.button};var g=K.isCellSelectable;K.isCellSelectable=function(B){return B==d?!1:g.apply(this,arguments)};K.getLinkForCell=function(){return null};var k=K.view.getState(d);E=K.getAllConnectionConstraints(k);for(var u=0;null!=E&&u<E.length;u++){var t=K.getConnectionPoint(k,E[u]);n(t.x-3,t.y-3,E[u])}K.fit(8);K.center();u=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){K.zoomIn()},20);t=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){K.zoomOut()},20);var x=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==K.view.scale?(K.maxFitScale=8,K.fit(8)):K.zoomActual();K.center()},20),A=function(){b.prompt(mxResources.get("gridSize"),K.gridSize,function(B){!isNaN(B)&&0<B&&(K.setGridSize(B),K.setGridEnabled(!0),K.refresh())})},J=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(B){mxEvent.isShiftDown(B)?-A():(K.setGridEnabled(!K.isGridEnabled()),K.refresh())},20);mxEvent.addListener(J,"dblclick",A);var D=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),p,20);mxUtils.setOpacity(D,10);E=document.createElement("div");E.style.display="flex";E.style.alignItems="center";E.style.paddingTop="6px";E.appendChild(v);E.appendChild(t);E.appendChild(x);E.appendChild(J);E.appendChild(D);c.appendChild(E);var G=document.createElement("input");G.setAttribute("type","number");G.setAttribute("min","1");-G.setAttribute("value","1");G.style.width="45px";G.style.position="relative";G.style.margin="0 4px 0 4px";var R=document.createElement("select");R.style.position="relative";t=["left","right","top","bottom"];for(v=0;v<t.length;v++)x=t[v],J=document.createElement("option"),mxUtils.write(J,mxResources.get(x)),J.value=x,R.appendChild(J);v=mxUtils.button(mxResources.get("add"),function(){var B=parseInt(G.value);B=1>B?1:100<B?100:B;G.value=B;for(var C=R.value,M=d.geometry,T=[],m=0;m<B;m++){switch(C){case "left":var z=-M.x;var I=M.y+(m+1)*M.height/(B+1);break;case "right":z=M.x+M.width;I=M.y+(m+1)*M.height/(B+1);break;case "top":z=M.x+(m+1)*M.width/(B+1);I=M.y;break;case "bottom":z=M.x+(m+1)*M.width/(B+1),I=M.y+M.height}T.push(n(z-3,I-3))}K.setSelectionCells(T)});v.style.marginLeft="auto";E.appendChild(v);E.appendChild(G);E.appendChild(R);var V=document.createElement("div");V.style.margin="4px 0px 8px 0px";V.style.whiteSpace="nowrap";V.style.height="24px";E=document.createElement("span");mxUtils.write(E,mxResources.get("dx"));-V.appendChild(E);var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.setAttribute("max","100");Q.style.width="45px";Q.style.margin="0 4px 0 4px";V.appendChild(Q);mxUtils.write(V,"%");var P=document.createElement("input");P.setAttribute("type","number");P.style.width="45px";P.style.margin="0 4px 0 4px";V.appendChild(P);mxUtils.write(V,"pt");E=document.createElement("span");mxUtils.write(E,mxResources.get("dy"));E.style.marginLeft="12px";V.appendChild(E);-var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min","0");q.setAttribute("max","100");q.style.width="45px";q.style.margin="0 4px 0 4px";V.appendChild(q);mxUtils.write(V,"%");var y=document.createElement("input");y.setAttribute("type","number");y.style.width="45px";y.style.margin="0 4px 0 4px";V.appendChild(y);mxUtils.write(V,"pt");c.appendChild(V);H();K.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<K.getSelectionCount()?mxUtils.setOpacity(D,60):-mxUtils.setOpacity(D,10);H()});K.addListener(mxEvent.CELLS_MOVED,H);mxEvent.addListener(Q,"change",u);mxEvent.addListener(q,"change",u);mxEvent.addListener(P,"change",u);mxEvent.addListener(y,"change",u);E=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});E.className="geBtn";v=mxUtils.button(mxResources.get("apply"),function(){var B=K.model.cells,C=[],M=[],T;for(T in B){var m=B[T];m.cp&&M.push(F(m))}M.sort(function(z,I){return z.x!=I.x?z.x-I.x:z.y!=I.y?z.y-I.y:z.dx!=I.dx?z.dx--I.dx:z.dy-I.dy});for(B=0;B<M.length;B++)0<B&&M[B].x==M[B-1].x&&M[B].y==M[B-1].y&&M[B].dx==M[B-1].dx&&M[B].dy==M[B-1].dy||C.push("["+M[B].x+","+M[B].y+",0,"+M[B].dx+","+M[B].dy+"]");b.editor.graph.setCellStyles("points","["+C.join(",")+"]",[e]);f();b.hideDialog()});v.className="geBtn gePrimaryBtn";t=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[e]);f();b.hideDialog()});t.className="geBtn";x=document.createElement("div");x.style.marginTop="10px";x.style.textAlign=-"right";b.isOffline()||x.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&x.appendChild(E);x.appendChild(t);x.appendChild(v);b.editor.cancelFirst||x.appendChild(E);c.appendChild(x)};this.destroy=f;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=+A():(K.setGridEnabled(!K.isGridEnabled()),K.refresh())},20);mxEvent.addListener(J,"dblclick",A);var D=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),p,20);mxUtils.setOpacity(D,10);E=document.createElement("div");E.style.display="flex";E.style.alignItems="center";E.style.paddingTop="6px";E.appendChild(u);E.appendChild(t);E.appendChild(x);E.appendChild(J);E.appendChild(D);c.appendChild(E);var G=document.createElement("input");G.setAttribute("type","number");G.setAttribute("min","1");+G.setAttribute("value","1");G.style.width="45px";G.style.position="relative";G.style.margin="0 4px 0 4px";var S=document.createElement("select");S.style.position="relative";t=["left","right","top","bottom"];for(u=0;u<t.length;u++)x=t[u],J=document.createElement("option"),mxUtils.write(J,mxResources.get(x)),J.value=x,S.appendChild(J);u=mxUtils.button(mxResources.get("add"),function(){var B=parseInt(G.value);B=1>B?1:100<B?100:B;G.value=B;for(var C=S.value,M=d.geometry,T=[],m=0;m<B;m++){switch(C){case "left":var z=+M.x;var I=M.y+(m+1)*M.height/(B+1);break;case "right":z=M.x+M.width;I=M.y+(m+1)*M.height/(B+1);break;case "top":z=M.x+(m+1)*M.width/(B+1);I=M.y;break;case "bottom":z=M.x+(m+1)*M.width/(B+1),I=M.y+M.height}T.push(n(z-3,I-3))}K.setSelectionCells(T)});u.style.marginLeft="auto";E.appendChild(u);E.appendChild(G);E.appendChild(S);var U=document.createElement("div");U.style.margin="4px 0px 8px 0px";U.style.whiteSpace="nowrap";U.style.height="24px";E=document.createElement("span");mxUtils.write(E,mxResources.get("dx"));+U.appendChild(E);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("min","0");P.setAttribute("max","100");P.style.width="45px";P.style.margin="0 4px 0 4px";U.appendChild(P);mxUtils.write(U,"%");var O=document.createElement("input");O.setAttribute("type","number");O.style.width="45px";O.style.margin="0 4px 0 4px";U.appendChild(O);mxUtils.write(U,"pt");E=document.createElement("span");mxUtils.write(E,mxResources.get("dy"));E.style.marginLeft="12px";U.appendChild(E);+var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min","0");q.setAttribute("max","100");q.style.width="45px";q.style.margin="0 4px 0 4px";U.appendChild(q);mxUtils.write(U,"%");var y=document.createElement("input");y.setAttribute("type","number");y.style.width="45px";y.style.margin="0 4px 0 4px";U.appendChild(y);mxUtils.write(U,"pt");c.appendChild(U);H();K.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<K.getSelectionCount()?mxUtils.setOpacity(D,60):+mxUtils.setOpacity(D,10);H()});K.addListener(mxEvent.CELLS_MOVED,H);mxEvent.addListener(P,"change",v);mxEvent.addListener(q,"change",v);mxEvent.addListener(O,"change",v);mxEvent.addListener(y,"change",v);E=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});E.className="geBtn";u=mxUtils.button(mxResources.get("apply"),function(){var B=K.model.cells,C=[],M=[],T;for(T in B){var m=B[T];m.cp&&M.push(F(m))}M.sort(function(z,I){return z.x!=I.x?z.x-I.x:z.y!=I.y?z.y-I.y:z.dx!=I.dx?z.dx-+I.dx:z.dy-I.dy});for(B=0;B<M.length;B++)0<B&&M[B].x==M[B-1].x&&M[B].y==M[B-1].y&&M[B].dx==M[B-1].dx&&M[B].dy==M[B-1].dy||C.push("["+M[B].x+","+M[B].y+",0,"+M[B].dx+","+M[B].dy+"]");b.editor.graph.setCellStyles("points","["+C.join(",")+"]",[e]);f();b.hideDialog()});u.className="geBtn gePrimaryBtn";t=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[e]);f();b.hideDialog()});t.className="geBtn";x=document.createElement("div");x.style.marginTop="10px";x.style.textAlign=+"right";b.isOffline()||x.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&x.appendChild(E);x.appendChild(t);x.appendChild(u);b.editor.cancelFirst||x.appendChild(E);c.appendChild(x)};this.destroy=f;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";Editor.thinShapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI5Ljc1IDI5Ljc1Wm0tMTMgNS40NXEuNC4wNS43NS4wNUgxOS4wNXY0LjY1cTAgLjI1LjE3NS40MjV0LjQyNS4xNzVIMzkuOXEuMjUgMCAuNDI1LS4xNzV0LjE3NS0uNDI1VjE5LjY1cTAtLjI1LS4xNzUtLjQyNXQtLjQyNS0uMTc1aC00LjY1VjE3LjVxMC0uMzUtLjA1LS43NWg0LjdxMS4xNSAwIDIgLjg3NS44NS44NzUuODUgMi4wMjVWMzkuOXEwIDEuMTUtLjg1IDItLjg1Ljg1LTIgLjg1SDE5LjY1cS0xLjE1IDAtMi4wMjUtLjg1dC0uODc1LTJabTEuNS0zLjk1cS01LjQ1IDAtOS4yMjUtMy44LTMuNzc1LTMuOC0zLjc3NS05LjIgMC01LjQ1IDMuNzc1LTkuMjI1UTEyLjggNS4yNSAxOC4yNSA1LjI1cTUuNCAwIDkuMiAzLjc3NSAzLjggMy43NzUgMy44IDkuMjI1IDAgNS40LTMuOCA5LjItMy44IDMuOC05LjIgMy44Wm0tLjA1LTIuM3E0LjQ1IDAgNy42LTMuMTI1IDMuMTUtMy4xMjUgMy4xNS03LjU3NXQtMy4xMjUtNy42UTIyLjcgNy41IDE4LjI1IDcuNXQtNy42IDMuMTI1UTcuNSAxMy43NSA3LjUgMTguMnQzLjEyNSA3LjZxMy4xMjUgMy4xNSA3LjU3NSAzLjE1Wm0uMDUtMTAuN1oiLz48L3N2Zz4=";@@ -12778,33 +12778,33 @@ type:"bool",defVal:!1,isVisible:function(m,z){z=z.editorUi.editor.graph.model;redefVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(m,z){var I=mxUtils.getValue(m.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||z.editorUi.editor.graph.isSwimlane(m.vertices[0])||null==I||I==mxConstants.NONE||0==mxUtils.getValue(m.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(m.style,mxConstants.STYLE_OPACITY,100)||null!=m.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(m,z){return 0<m.vertices.length&&z.editorUi.editor.graph.isContainer(m.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## An optional data object can be specified to define the metadata for the connector.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto, width or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,[email protected],default,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';-Editor.createRoughCanvas=function(m){var z=rough.canvas({getContext:function(){return m}});z.draw=function(I){var L=I.sets||[];I=I.options||this.getDefaultOptions();for(var N=0;N<L.length;N++){var O=L[N];switch(O.type){case "path":null!=I.stroke&&this._drawToContext(m,O,I);break;case "fillPath":this._drawToContext(m,O,I);break;case "fillSketch":this.fillSketch(m,O,I)}}};z.fillSketch=function(I,L,N){var O=m.state.strokeColor,S=m.state.strokeWidth,U=m.state.strokeAlpha,W=m.state.dashed,X=N.fillWeight;-0>X&&(X=N.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);m.setStrokeColor(N.fill||"");m.setStrokeWidth(X);m.setDashed(!1);this._drawToContext(I,L,N);m.setDashed(W);m.setStrokeWidth(S);m.setStrokeColor(O);m.setStrokeAlpha(U)};z._drawToContext=function(I,L,N){I.begin();for(var O=0;O<L.ops.length;O++){var S=L.ops[O],U=S.data;switch(S.op){case "move":I.moveTo(U[0],U[1]);break;case "bcurveTo":I.curveTo(U[0],U[1],U[2],U[3],U[4],U[5]);break;case "lineTo":I.lineTo(U[0],U[1])}}I.end();"fillPath"===L.type&&-N.filled?I.fill():I.stroke()};return z};(function(){function m(O,S,U){this.canvas=O;this.rc=S;this.shape=U;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,m.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,m.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,m.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=+Editor.createRoughCanvas=function(m){var z=rough.canvas({getContext:function(){return m}});z.draw=function(I){var L=I.sets||[];I=I.options||this.getDefaultOptions();for(var N=0;N<L.length;N++){var Q=L[N];switch(Q.type){case "path":null!=I.stroke&&this._drawToContext(m,Q,I);break;case "fillPath":this._drawToContext(m,Q,I);break;case "fillSketch":this.fillSketch(m,Q,I)}}};z.fillSketch=function(I,L,N){var Q=m.state.strokeColor,R=m.state.strokeWidth,V=m.state.strokeAlpha,W=m.state.dashed,X=N.fillWeight;+0>X&&(X=N.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);m.setStrokeColor(N.fill||"");m.setStrokeWidth(X);m.setDashed(!1);this._drawToContext(I,L,N);m.setDashed(W);m.setStrokeWidth(R);m.setStrokeColor(Q);m.setStrokeAlpha(V)};z._drawToContext=function(I,L,N){I.begin();for(var Q=0;Q<L.ops.length;Q++){var R=L.ops[Q],V=R.data;switch(R.op){case "move":I.moveTo(V[0],V[1]);break;case "bcurveTo":I.curveTo(V[0],V[1],V[2],V[3],V[4],V[5]);break;case "lineTo":I.lineTo(V[0],V[1])}}I.end();"fillPath"===L.type&&+N.filled?I.fill():I.stroke()};return z};(function(){function m(Q,R,V){this.canvas=Q;this.rc=R;this.shape=V;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,m.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,m.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,m.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,m.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,m.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,m.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,m.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,m.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,m.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,m.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,m.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,m.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,m.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,m.prototype.fillAndStroke);-this.path=[];this.passThrough=!1}m.prototype.moveOp="M";m.prototype.lineOp="L";m.prototype.quadOp="Q";m.prototype.curveOp="C";m.prototype.closeOp="Z";m.prototype.getStyle=function(O,S){var U=1;if(null!=this.shape.state){var W=this.shape.state.cell.id;if(null!=W)for(var X=0;X<W.length;X++)U=(U<<5)-U+W.charCodeAt(X)<<0}U={strokeWidth:this.canvas.state.strokeWidth,seed:U,preserveVertices:!0};W=this.rc.getDefaultOptions();U.stroke=O?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:-mxConstants.NONE;O=null;(U.filled=S)?(U.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,O=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):U.fill="";U.bowing=mxUtils.getValue(this.shape.style,"bowing",W.bowing);U.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",W.hachureAngle);U.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",W.curveFitting);U.roughness=mxUtils.getValue(this.shape.style,"jiggle",-W.roughness);U.simplification=mxUtils.getValue(this.shape.style,"simplification",W.simplification);U.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",W.disableMultiStroke);U.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",W.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);U.hachureGap="auto"==S?-1:S;U.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);U.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",-S);U.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);U.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==S&&(S="auto");"auto"==S&&(S=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&S.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&S.push(mxUtils.hex2rgb(Editor.darkColor)),S=null!=U.fill&&(null!=O||0<=mxUtils.indexOf(S,mxUtils.hex2rgb(U.fill)))?-"solid":W.fillStyle);U.fillStyle=S;return U};m.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};m.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};m.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var O=2;O<arguments.length;O+=2)this.lastX=arguments[O-1],this.lastY=arguments[O],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};-m.prototype.lineTo=function(O,S){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,O,S),this.lastX=O,this.lastY=S)};m.prototype.moveTo=function(O,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,O,S),this.lastX=O,this.lastY=S,this.firstX=O,this.firstY=S)};m.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};m.prototype.quadTo=function(O,S,U,W){this.passThrough?-this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,O,S,U,W),this.lastX=U,this.lastY=W)};m.prototype.curveTo=function(O,S,U,W,X,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,O,S,U,W,X,Z),this.lastX=X,this.lastY=Z)};m.prototype.arcTo=function(O,S,U,W,X,Z,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ba=mxUtils.arcToCurves(this.lastX,this.lastY,O,S,U,W,X,Z,Y);if(null!=ba)for(var ea=0;ea<ba.length;ea+=-6)this.curveTo(ba[ea],ba[ea+1],ba[ea+2],ba[ea+3],ba[ea+4],ba[ea+5]);this.lastX=Z;this.lastY=Y}};m.prototype.rect=function(O,S,U,W){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(O,S,U,W,this.getStyle(!0,!0)))};m.prototype.ellipse=function(O,S,U,W){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(O+U/2,S+W/2,U,W,this.getStyle(!0,!0)))};m.prototype.roundrect=-function(O,S,U,W,X,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(O+X,S),this.lineTo(O+U-X,S),this.quadTo(O+U,S,O+U,S+Z),this.lineTo(O+U,S+W-Z),this.quadTo(O+U,S+W,O+U-X,S+W),this.lineTo(O+X,S+W),this.quadTo(O,S+W,O,S+W-Z),this.lineTo(O,S+Z),this.quadTo(O,S,O+X,S))};m.prototype.drawPath=function(O){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),O)}catch(U){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in O)this.nextShape.options[S]=-O[S];O.stroke!=mxConstants.NONE&&null!=O.stroke||delete this.nextShape.options.stroke;O.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};m.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};m.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};m.prototype.fillAndStroke=function(){this.passThrough?+this.path=[];this.passThrough=!1}m.prototype.moveOp="M";m.prototype.lineOp="L";m.prototype.quadOp="Q";m.prototype.curveOp="C";m.prototype.closeOp="Z";m.prototype.getStyle=function(Q,R){var V=1;if(null!=this.shape.state){var W=this.shape.state.cell.id;if(null!=W)for(var X=0;X<W.length;X++)V=(V<<5)-V+W.charCodeAt(X)<<0}V={strokeWidth:this.canvas.state.strokeWidth,seed:V,preserveVertices:!0};W=this.rc.getDefaultOptions();V.stroke=Q?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:+mxConstants.NONE;Q=null;(V.filled=R)?(V.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Q=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):V.fill="";V.bowing=mxUtils.getValue(this.shape.style,"bowing",W.bowing);V.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",W.hachureAngle);V.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",W.curveFitting);V.roughness=mxUtils.getValue(this.shape.style,"jiggle",+W.roughness);V.simplification=mxUtils.getValue(this.shape.style,"simplification",W.simplification);V.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",W.disableMultiStroke);V.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",W.disableMultiStrokeFill);R=mxUtils.getValue(this.shape.style,"hachureGap",-1);V.hachureGap="auto"==R?-1:R;V.dashGap=mxUtils.getValue(this.shape.style,"dashGap",R);V.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",+R);V.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",R);R=mxUtils.getValue(this.shape.style,"fillWeight",-1);V.fillWeight="auto"==R?-1:R;R=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==R&&(R="auto");"auto"==R&&(R=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&R.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&R.push(mxUtils.hex2rgb(Editor.darkColor)),R=null!=V.fill&&(null!=Q||0<=mxUtils.indexOf(R,mxUtils.hex2rgb(V.fill)))?+"solid":W.fillStyle);V.fillStyle=R;return V};m.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};m.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};m.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Q=2;Q<arguments.length;Q+=2)this.lastX=arguments[Q-1],this.lastY=arguments[Q],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};+m.prototype.lineTo=function(Q,R){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,Q,R),this.lastX=Q,this.lastY=R)};m.prototype.moveTo=function(Q,R){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,R),this.lastX=Q,this.lastY=R,this.firstX=Q,this.firstY=R)};m.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};m.prototype.quadTo=function(Q,R,V,W){this.passThrough?+this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Q,R,V,W),this.lastX=V,this.lastY=W)};m.prototype.curveTo=function(Q,R,V,W,X,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,R,V,W,X,Z),this.lastX=X,this.lastY=Z)};m.prototype.arcTo=function(Q,R,V,W,X,Z,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ba=mxUtils.arcToCurves(this.lastX,this.lastY,Q,R,V,W,X,Z,Y);if(null!=ba)for(var da=0;da<ba.length;da+=+6)this.curveTo(ba[da],ba[da+1],ba[da+2],ba[da+3],ba[da+4],ba[da+5]);this.lastX=Z;this.lastY=Y}};m.prototype.rect=function(Q,R,V,W){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,R,V,W,this.getStyle(!0,!0)))};m.prototype.ellipse=function(Q,R,V,W){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+V/2,R+W/2,V,W,this.getStyle(!0,!0)))};m.prototype.roundrect=+function(Q,R,V,W,X,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(Q+X,R),this.lineTo(Q+V-X,R),this.quadTo(Q+V,R,Q+V,R+Z),this.lineTo(Q+V,R+W-Z),this.quadTo(Q+V,R+W,Q+V-X,R+W),this.lineTo(Q+X,R+W),this.quadTo(Q,R+W,Q,R+W-Z),this.lineTo(Q,R+Z),this.quadTo(Q,R,Q+X,R))};m.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(V){}this.passThrough=!1}else if(null!=this.nextShape){for(var R in Q)this.nextShape.options[R]=+Q[R];Q.stroke!=mxConstants.NONE&&null!=Q.stroke||delete this.nextShape.options.stroke;Q.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};m.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};m.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};m.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};m.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;-this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(O){return new m(O,Editor.createRoughCanvas(O),this)};var z=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(O){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?z.apply(this,arguments):"comic"==mxUtils.getValue(this.style,-"sketchStyle","rough")?this.createComicCanvas(O):this.createRoughCanvas(O)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(O,S,U,W,X){null!=O.handJiggle&&O.handJiggle.passThrough||I.apply(this,arguments)};var L=mxShape.prototype.paint;mxShape.prototype.paint=function(O){var S=O.addTolerance,U=!0;null!=this.style&&(U="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=O.handJiggle&&O.handJiggle.constructor==m&&!this.outline){O.save();-var W=this.fill,X=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,Y=O.setStrokeColor;O.setStrokeColor=function(){};var ba=O.setFillColor;O.setFillColor=function(){};U||null==W||(this.configurePointerEvents=function(){});O.handJiggle.passThrough=!0;L.apply(this,arguments);O.handJiggle.passThrough=!1;O.setFillColor=ba;O.setStrokeColor=Y;this.configurePointerEvents=Z;this.stroke=X;this.fill=W;O.restore();U&&null!=W&&(O.addTolerance=function(){})}L.apply(this,arguments);O.addTolerance=-S};var N=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(O,S,U,W,X,Z){null!=O.handJiggle&&O.handJiggle.constructor==m?(O.handJiggle.passThrough=!0,N.apply(this,arguments),O.handJiggle.passThrough=!1):N.apply(this,arguments)}})();Editor.fastCompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:Graph.arrayBufferToString(pako.deflateRaw(m))};Editor.fastDecompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:pako.inflateRaw(Graph.stringToArrayBuffer(atob(m)),-{to:"string"})};Editor.extractGraphModel=function(m,z,I){if(null!=m&&"undefined"!==typeof pako){var L=m.ownerDocument.getElementsByTagName("div"),N=[];if(null!=L&&0<L.length)for(var O=0;O<L.length;O++)if("mxgraph"==L[O].getAttribute("class")){N.push(L[O]);break}0<N.length&&(L=N[0].getAttribute("data-mxgraph"),null!=L?(N=JSON.parse(L),null!=N&&null!=N.xml&&(m=mxUtils.parseXml(N.xml),m=m.documentElement)):(N=N[0].getElementsByTagName("div"),0<N.length&&(L=mxUtils.getTextContent(N[0]),L=Graph.decompress(L,+this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Q){return new m(Q,Editor.createRoughCanvas(Q),this)};var z=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?z.apply(this,arguments):"comic"==mxUtils.getValue(this.style,+"sketchStyle","rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,R,V,W,X){null!=Q.handJiggle&&Q.handJiggle.passThrough||I.apply(this,arguments)};var L=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var R=Q.addTolerance,V=!0;null!=this.style&&(V="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==m&&!this.outline){Q.save();+var W=this.fill,X=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,Y=Q.setStrokeColor;Q.setStrokeColor=function(){};var ba=Q.setFillColor;Q.setFillColor=function(){};V||null==W||(this.configurePointerEvents=function(){});Q.handJiggle.passThrough=!0;L.apply(this,arguments);Q.handJiggle.passThrough=!1;Q.setFillColor=ba;Q.setStrokeColor=Y;this.configurePointerEvents=Z;this.stroke=X;this.fill=W;Q.restore();V&&null!=W&&(Q.addTolerance=function(){})}L.apply(this,arguments);Q.addTolerance=+R};var N=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,R,V,W,X,Z){null!=Q.handJiggle&&Q.handJiggle.constructor==m?(Q.handJiggle.passThrough=!0,N.apply(this,arguments),Q.handJiggle.passThrough=!1):N.apply(this,arguments)}})();Editor.fastCompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:Graph.arrayBufferToString(pako.deflateRaw(m))};Editor.fastDecompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:pako.inflateRaw(Graph.stringToArrayBuffer(atob(m)),+{to:"string"})};Editor.extractGraphModel=function(m,z,I){if(null!=m&&"undefined"!==typeof pako){var L=m.ownerDocument.getElementsByTagName("div"),N=[];if(null!=L&&0<L.length)for(var Q=0;Q<L.length;Q++)if("mxgraph"==L[Q].getAttribute("class")){N.push(L[Q]);break}0<N.length&&(L=N[0].getAttribute("data-mxgraph"),null!=L?(N=JSON.parse(L),null!=N&&null!=N.xml&&(m=mxUtils.parseXml(N.xml),m=m.documentElement)):(N=N[0].getElementsByTagName("div"),0<N.length&&(L=mxUtils.getTextContent(N[0]),L=Graph.decompress(L,null,I),0<L.length&&(m=mxUtils.parseXml(L),m=m.documentElement))))}if(null!=m&&"svg"==m.nodeName)if(L=m.getAttribute("content"),null!=L&&"<"!=L.charAt(0)&&"%"!=L.charAt(0)&&(L=unescape(window.atob?atob(L):Base64.decode(cont,L))),null!=L&&"%"==L.charAt(0)&&(L=decodeURIComponent(L)),null!=L&&0<L.length)m=mxUtils.parseXml(L).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==m||z||(N=null,"diagram"==m.nodeName?N=m:"mxfile"==m.nodeName&&(L=m.getElementsByTagName("diagram"),0<L.length&&(N=L[Math.max(0,Math.min(L.length-1,urlParams.page||0))])),null!=N&&(m=Editor.parseDiagramNode(N,I)));null==m||"mxGraphModel"==m.nodeName||z&&"mxfile"==m.nodeName||(m=null);return m};Editor.parseDiagramNode=function(m,z,I){Editor.validateDiagramNode(m);var L=mxUtils.trim(mxUtils.getTextContent(m)),N=null;0<L.length?(z=Graph.decompress(L,null,z),null!=z&&0<z.length&&(N=mxUtils.parseXml(z).documentElement)):(m=mxUtils.getChildNodes(m),0<m.length&&(N=m[0],I&&(N=Editor.parseDiagramNode(N,z,!1)),z=mxUtils.createXmlDocument(),z.appendChild(z.importNode(N,!0)),N=z.documentElement));return N};Editor.getDiagramNodeXml=function(m){Editor.validateDiagramNode(m);var z=mxUtils.getNodeValue(m),I=null;0<z.length?I=Graph.decompress(z):(m=m.getElementsByTagName("mxGraphModel"),null!=m&&0<m.length&&(I=mxUtils.getXml(m[0])));return I};Editor.validateDiagramNode=function(m){if(0==mxUtils.trim(mxUtils.getTextContent(m)).length&&0==mxUtils.getChildNodes(m).length){var z=new mxCodec,I=new mxGraphModel;m.appendChild(z.encode(I))}return m};Editor.extractGraphModelFromPdf=function(m){var z=null;m=m.substring(m.indexOf(",")+1);m=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m,!0);if("%PDF-1.7"==m.substring(0,8)){var I=m.indexOf("EmbeddedFile");if(-1<I){var L=m.indexOf("stream",I)+9;if(0<m.substring(I,L).indexOf("application#2Fvnd.jgraph.mxfile")){var N=m.indexOf("endstream",L-1);return pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(L,N)),{to:"string"})}}for(I=m.indexOf("/ObjStm");0<I;){L=-m.indexOf("stream",I)+9;N=m.indexOf("endstream",L-1);L=pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(L,N)),{to:"string"});N=L.indexOf("/Subject <");if(0<N){I=L.substring(N+14,L.indexOf(">",N));if(null!=I){z=I;I=[];for(L=0;L<z.length;L+=2)N=z.substr(L,2),"00"!=N&&I.push(String.fromCharCode(parseInt(N,16)));z=I.join("")}break}I=m.indexOf("/ObjStm",I+1)}}if(null==z&&"%PDF-1.4"==m.substring(0,8)){I="";N=L=0;for(var O=[],S=null;N<m.length;){var U=m.charCodeAt(N);N+=1;10!=U&&(I+=String.fromCharCode(U));-U=="/Subject (%3Cmxfile".charCodeAt(L)?L++:L=0;if(19==L){var W=m.indexOf("%3C%2Fmxfile%3E",N)+15;N-=9;if(W>N){z=m.substring(N,W);break}}10==U&&("endobj"==I?S=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(S=[],O[I.split(" ")[0]]=S):null!=S&&S.push(I),I="")}}null==z&&null!=O&&(z=Editor.extractGraphModelFromXref(O));null!=z&&(z=decodeURIComponent(z.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return z};Editor.extractGraphModelFromXref=function(m){var z=m.trailer,I=null;null!=+m.indexOf("stream",I)+9;N=m.indexOf("endstream",L-1);L=pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(L,N)),{to:"string"});N=L.indexOf("/Subject <");if(0<N){I=L.substring(N+14,L.indexOf(">",N));if(null!=I){z=I;I=[];for(L=0;L<z.length;L+=2)N=z.substr(L,2),"00"!=N&&I.push(String.fromCharCode(parseInt(N,16)));z=I.join("")}break}I=m.indexOf("/ObjStm",I+1)}}if(null==z&&"%PDF-1.4"==m.substring(0,8)){I="";N=L=0;for(var Q=[],R=null;N<m.length;){var V=m.charCodeAt(N);N+=1;10!=V&&(I+=String.fromCharCode(V));+V=="/Subject (%3Cmxfile".charCodeAt(L)?L++:L=0;if(19==L){var W=m.indexOf("%3C%2Fmxfile%3E",N)+15;N-=9;if(W>N){z=m.substring(N,W);break}}10==V&&("endobj"==I?R=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(R=[],Q[I.split(" ")[0]]=R):null!=R&&R.push(I),I="")}}null==z&&null!=Q&&(z=Editor.extractGraphModelFromXref(Q));null!=z&&(z=decodeURIComponent(z.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return z};Editor.extractGraphModelFromXref=function(m){var z=m.trailer,I=null;null!=z&&(z=/.* \/Info (\d+) (\d+) R/g.exec(z.join("\n")),null!=z&&0<z.length&&(z=m[z[1]],null!=z&&(z=/.* \/Subject (\d+) (\d+) R/g.exec(z.join("\n")),null!=z&&0<z.length&&(m=m[z[1]],null!=m&&(m=m.join("\n"),I=m.substring(1,m.length-1))))));return I};Editor.extractParserError=function(m,z){var I=null;m=null!=m?m.getElementsByTagName("parsererror"):null;null!=m&&0<m.length&&(I=z||mxResources.get("invalidChars"),z=m[0].getElementsByTagName("div"),0<z.length&&(I=mxUtils.getTextContent(z[0])));return null!=I?mxUtils.trim(I):I};Editor.addRetryToError=function(m,z){null!=m&&(m=null!=m.error?m.error:m,null==m.retry&&(m.retry=z))};Editor.mermaidToDrawio=function(m,z,I){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(m,z,I)};Editor.configure=function(m){if(null!=m){Editor.config=m;Editor.configVersion=m.version;m.debug&&(urlParams.test="1");null!=m.defaultFonts&&(Menus.prototype.defaultFonts=m.defaultFonts);null!=m.presetColors&&(ColorDialog.prototype.presetColors=m.presetColors);null!=m.defaultColors&&(ColorDialog.prototype.defaultColors=m.defaultColors);null!=m.colorNames&&(ColorDialog.prototype.colorNames=m.colorNames);null!=m.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=m.defaultColorSchemes);null!=m.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=m.defaultEdgeLength);null!=m.selectParentLayer&&(Graph.selectParentLayer=m.selectParentLayer);null!=m.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=m.autosaveDelay);null!=m.templateFile&&(EditorUi.templateFile=@@ -12831,41 +12831,41 @@ N.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.gz);null!=L&&I.setAttribute("backgroundImage",JSON.stringify(L));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?I.setAttribute("adaptiveColors",this.graph.adaptiveColors):I.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(L=this.graph.extFonts.map(function(N){return N.name+"^"+N.url}),I.setAttribute("extFonts",L.join("|")));return I};Editor.prototype.isDataSvg=function(m){try{var z=mxUtils.parseXml(m).documentElement.getAttribute("content");if(null!=z&&(null!=z&&"<"!=z.charAt(0)&&"%"!=z.charAt(0)&&(z=unescape(window.atob?atob(z):Base64.decode(cont,z))),null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z)),null!=z&&0<z.length)){var I=mxUtils.parseXml(z).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(L){}return!1};Editor.prototype.extractGraphModel=function(m,z,I){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();f.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);this.graph.useCssTransforms=-!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(m,z){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var I=function(){L=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};m=null!=m?m:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var L=null;Editor.doMathJaxRender=function(S){try{null==L?(MathJax.typesetClear([S]),-MathJax.typeset([S]),I()):L!=S&&Editor.mathJaxQueue.push(S)}catch(U){MathJax.typesetClear([S]),null!=U.retry?(L=S,U.retry.then(function(){MathJax.typesetPromise([S]).then(I)["catch"](function(W){console.log("Error in MathJax.typesetPromise: "+W.toString());I()})})["catch"](function(W){console.log("Error in MathJax.retry: "+W.toString());I()})):null!=window.console&&console.log("Error in MathJax.typeset: "+U.toString())}};window.MathJax=null!=z?z:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},-loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var S=0;S<Editor.mathJaxQueue.length;S++)Editor.doMathJaxRender(Editor.mathJaxQueue[S])}}};Editor.MathJaxRender=function(S){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(S):Editor.mathJaxQueue.push(S)};Editor.onMathJaxDone=function(){};var N=Editor.prototype.init;Editor.prototype.init=function(){N.apply(this,-arguments);var S=mxUtils.bind(this,function(U,W){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,S);this.graph.addListener(mxEvent.REFRESH,S)};z=document.getElementsByTagName("script");if(null!=z&&0<z.length){var O=document.createElement("script");O.setAttribute("type","text/javascript");O.setAttribute("src",m);z[0].parentNode.appendChild(O)}}};Editor.prototype.csvToArray=function(m){if(0<m.length){var z=-"",I=[""],L=0,N=!0,O;m=$jscomp.makeIterator(m);for(O=m.next();!O.done;O=m.next())O=O.value,'"'===O?(N&&O===z&&(I[L]+=O),N=!N):","===O&&N?O=I[++L]="":I[L]+=O,z=O;return I}return[]};Editor.prototype.getProxiedUrl=function(m){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(m)){var z=EditorUi.isVisioFilename(m);z=/\.png$/i.test(m)||/\.pdf$/i.test(m)||z;var I="t="+(new Date).getTime();m=PROXY_URL+"?url="+encodeURIComponent(m)++!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(m,z){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var I=function(){L=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};m=null!=m?m:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var L=null;Editor.doMathJaxRender=function(R){try{null==L?(MathJax.typesetClear([R]),+MathJax.typeset([R]),I()):L!=R&&Editor.mathJaxQueue.push(R)}catch(V){MathJax.typesetClear([R]),null!=V.retry?(L=R,V.retry.then(function(){MathJax.typesetPromise([R]).then(I)["catch"](function(W){console.log("Error in MathJax.typesetPromise: "+W.toString());I()})})["catch"](function(W){console.log("Error in MathJax.retry: "+W.toString());I()})):null!=window.console&&console.log("Error in MathJax.typeset: "+V.toString())}};window.MathJax=null!=z?z:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},+loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])}}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.onMathJaxDone=function(){};var N=Editor.prototype.init;Editor.prototype.init=function(){N.apply(this,+arguments);var R=mxUtils.bind(this,function(V,W){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,R);this.graph.addListener(mxEvent.REFRESH,R)};z=document.getElementsByTagName("script");if(null!=z&&0<z.length){var Q=document.createElement("script");Q.setAttribute("type","text/javascript");Q.setAttribute("src",m);z[0].parentNode.appendChild(Q)}}};Editor.prototype.csvToArray=function(m){if(0<m.length){var z=+"",I=[""],L=0,N=!0,Q;m=$jscomp.makeIterator(m);for(Q=m.next();!Q.done;Q=m.next())Q=Q.value,'"'===Q?(N&&Q===z&&(I[L]+=Q),N=!N):","===Q&&N?Q=I[++L]="":I[L]+=Q,z=Q;return I}return[]};Editor.prototype.getProxiedUrl=function(m){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(m)){var z=EditorUi.isVisioFilename(m);z=/\.png$/i.test(m)||/\.pdf$/i.test(m)||z;var I="t="+(new Date).getTime();m=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+I+(z?"&base64=1":"")}return m};Editor.prototype.isCorsEnabledForUrl=function(m){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||m.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(m)||"https://raw.githubusercontent.com/"===m.substring(0,34)||"https://fonts.googleapis.com/"===m.substring(0,29)||"https://fonts.gstatic.com/"===m.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var m=new mxUrlConverter;m.updateBaseUrl();var z=m.convert,I=this;m.convert=function(L){null!=L&&navigator.onLine&&("http://"!=L.substring(0,7)&&"https://"!=L.substring(0,8)||L.substring(0,m.baseUrl.length)==m.baseUrl||I.crossOriginImages&&I.isCorsEnabledForUrl(L)?"chrome-extension://"!=L.substring(0,19)&&(L=z.apply(this,arguments)):L=PROXY_URL+"?url="+encodeURIComponent(L));return L};return m};Editor.createSvgDataUri=function(m){return"data:image/svg+xml;base64,"+-btoa(unescape(encodeURIComponent(m)))};Editor.prototype.convertImageToDataUri=function(m,z,I,L,N){try{var O=!0,S=window.setTimeout(mxUtils.bind(this,function(){O=!1;z(m)}),this.timeout),U=mxUtils.bind(this,function(){null!=L?this.convertImageToDataUri(m,z,I,L,!0):z(m)});if(/(\.svg)$/i.test(m)&&!N)mxUtils.get(m,mxUtils.bind(this,function(X){window.clearTimeout(S);O&&(200>X.getStatus()||299<X.getStatus()?U():z(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(S);-O&&U()}));else{var W=new Image;this.crossOriginImages&&(W.crossOrigin="anonymous");W.onload=function(){window.clearTimeout(S);if(O)try{L=null!=L&&N?L:1;var X=document.createElement("canvas"),Z=X.getContext("2d");Z.scale(L,L);X.height=W.height*L;X.width=W.width*L;Z.drawImage(W,0,0);z(X.toDataURL())}catch(Y){z(m)}};W.onerror=function(){window.clearTimeout(S);O&&(null!=I?I():z(m))};W.src=m}}catch(X){null!=I?I():z(m)}};Editor.prototype.convertImages=function(m,z,I,L){function N(){0<O.length?O.shift()():-z(m)}null==L&&(L=this.createImageUrlConverter());var O=[],S=I||{};I=mxUtils.bind(this,function(U,W){U=m.getElementsByTagName(U);for(var X=0;X<U.length;X++)mxUtils.bind(this,function(Z){O.push(mxUtils.bind(this,function(){try{if(null!=Z){var Y=L.convert(Z.getAttribute(W));if(null!=Y&&"data:"!=Y.substring(0,5)){var ba=S[Y];null==ba?this.convertImageToDataUri(Y,function(ea){null!=ea&&(S[Y]=ea,Z.setAttribute(W,ea));N()},null,Editor.svgRasterScale):(Z.setAttribute(W,ba),N())}else null!=Y&&Z.setAttribute(W,-Y),N()}}catch(ea){N()}}))})(U[X])});I("image","xlink:href");I("img","src");N()};Editor.base64Encode=function(m){for(var z="",I=0,L=m.length,N,O,S;I<L;){N=m.charCodeAt(I++)&255;if(I==L){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4);z+="==";break}O=m.charCodeAt(I++);if(I==L){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&-3)<<4|(O&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2);z+="=";break}S=m.charCodeAt(I++);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4|(O&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2|(S&192)>>6);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return z};-Editor.prototype.loadUrl=function(m,z,I,L,N,O,S,U){try{var W=!S&&(L||/(\.png)($|\?)/i.test(m)||/(\.jpe?g)($|\?)/i.test(m)||/(\.gif)($|\?)/i.test(m)||/(\.pdf)($|\?)/i.test(m));N=null!=N?N:!0;var X=mxUtils.bind(this,function(){mxUtils.get(m,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=z){var Y=Z.getText();if(W){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();-Y=Array(Z.length);for(var ba=0;ba<Z.length;ba++)Y[ba]=String.fromCharCode(Z[ba]);Y=Y.join("")}O=null!=O?O:"data:image/png;base64,";Y=O+Editor.base64Encode(Y)}z(Y)}}else null!=I&&(0==Z.getStatus()?I({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?I({message:mxResources.get("fileNotFound"),code:Z.getStatus()},Z):I({message:this.getErrorMessage(Z)},Z))}),function(Z){null!=I&&I({message:mxResources.get("error")+" "+Z.getStatus()})},W,this.timeout,function(){N&&null!=I&&I({code:App.ERROR_TIMEOUT,-retry:X})},U)});X()}catch(Z){null!=I&&I(Z)}};Editor.prototype.getErrorMessage=function(m){var z=mxResources.get("error")+" "+m.getStatus();try{var I=m.getText(),L=JSON.parse(I);null!=L&&null!=L.error&&null!=L.error.message&&(z=L.error.message+" ("+z+")")}catch(N){}return z};Editor.prototype.absoluteCssFonts=function(m){var z=null;if(null!=m){var I=m.split("url(");if(0<I.length){z=[I[0]];m=window.location.pathname;var L=null!=m?m.lastIndexOf("/"):-1;0<=L&&(m=m.substring(0,L+1));L=document.getElementsByTagName("base");-var N=null;null!=L&&0<L.length&&(N=L[0].getAttribute("href"));for(var O=1;O<I.length;O++)if(L=I[O].indexOf(")"),0<L){var S=Editor.trimCssUrl(I[O].substring(0,L));this.graph.isRelativeUrl(S)&&(S=null!=N?N+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":m)+S);z.push('url("'+S+'"'+I[O].substring(L))}else z.push(I[O])}else z=[m]}return null!=z?z.join(""):null};Editor.prototype.mapFontUrl=function(m,z,I){/^https?:\/\//.test(z)&&!this.isCorsEnabledForUrl(z)&&(z=PROXY_URL+"?url="+-encodeURIComponent(z));I(m,z)};Editor.prototype.embedCssFonts=function(m,z){var I=m.split("url("),L=0;null==this.cachedFonts&&(this.cachedFonts={});var N=mxUtils.bind(this,function(){if(0==L){for(var W=[I[0]],X=1;X<I.length;X++){var Z=I[X].indexOf(")");W.push('url("');W.push(this.cachedFonts[Editor.trimCssUrl(I[X].substring(0,Z))]);W.push('"'+I[X].substring(Z))}z(W.join(""))}});if(0<I.length){for(m=1;m<I.length;m++){var O=I[m].indexOf(")"),S=null,U=I[m].indexOf("format(",O);0<U&&(S=Editor.trimCssUrl(I[m].substring(U+-7,I[m].indexOf(")",U))));mxUtils.bind(this,function(W){if(null==this.cachedFonts[W]){this.cachedFonts[W]=W;L++;var X="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(W))X="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(W))X="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(W))X="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(W))X="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(W))X="application/vnd.ms-fontobject";-else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(W))X="application/font-sfnt";this.mapFontUrl(X,W,mxUtils.bind(this,function(Z,Y){this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedFonts[W]=ba;L--;N()}),mxUtils.bind(this,function(ba){L--;N()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[m].substring(0,O)),S)}N()}else z(m)};Editor.prototype.loadFonts=function(m){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(z){this.resolvedFontCss=-z;null!=m&&m()})):null!=m&&m()};Editor.prototype.createGoogleFontCache=function(){var m={},z;for(z in Graph.fontMapping)Graph.isCssFontUrl(z)&&(m[z]=Graph.fontMapping[z]);return m};Editor.prototype.embedExtFonts=function(m){var z=this.graph.getCustomFonts();if(0<z.length){var I=[],L=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var N=mxUtils.bind(this,function(){0==L&&this.embedCssFonts(I.join(""),m)}),O=0;O<z.length;O++)mxUtils.bind(this,function(S,U){Graph.isCssFontUrl(U)?-null==this.cachedGoogleFonts[U]?(L++,this.loadUrl(Graph.rewriteGoogleFontUrl(U),mxUtils.bind(this,function(W){this.cachedGoogleFonts[U]=W;I.push(W+"\n");L--;N()}),mxUtils.bind(this,function(W){L--;I.push("@import url("+U+");\n");N()}))):I.push(this.cachedGoogleFonts[U]+"\n"):I.push('@font-face {font-family: "'+S+'";src: url("'+U+'")}\n')})(z[O].name,z[O].url);N()}else m()};Editor.prototype.addMathCss=function(m){m=m.getElementsByTagName("defs");if(null!=m&&0<m.length)for(var z=document.getElementsByTagName("style"),-I=0;I<z.length;I++){var L=mxUtils.getTextContent(z[I]);0>L.indexOf("mxPageSelector")&&0<L.indexOf("MathJax")&&m[0].appendChild(z[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(m,z){z=null!=z?z:this.absoluteCssFonts(this.fontCss);if(null!=z){var I=mxUtils.getSvgDefs(m),L=z.split("\n");z=[];for(var N=[],O=0;O<L.length;O++)"@import"==L[O].substring(0,7)?z.push(L[O]):N.push(L[O]);m=m.ownerDocument;m=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"style"):m.createElement("style");-m.setAttribute("type","text/css");0<z.length&&(mxUtils.setTextContent(m,z.join("\n")),I.appendChild(m));0<N.length&&(m=m.cloneNode(!1),mxUtils.setTextContent(m,N.join("\n")),I.appendChild(m))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(m,z,I){var L=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(L/m,L/z))};Editor.prototype.exportToCanvas=function(m,z,I,L,N,O,S,U,W,X,Z,Y,ba,ea,ca,fa,aa,da){try{O=-null!=O?O:!0;S=null!=S?S:!0;Y=null!=Y?Y:this.graph;ba=null!=ba?ba:0;var ia=W?null:Y.background;ia==mxConstants.NONE&&(ia=null);null==ia&&(ia=L);null==ia&&0==W&&(ia="dark"==fa&&"none"!=Y.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(Y.getSvg(null,null,ba,ea,null,S,null,null,null,X,null,fa,aa,da),mxUtils.bind(this,function(pa){try{var oa=new Image;oa.onload=mxUtils.bind(this,function(){try{var xa=function(){mxClient.IS_SF?window.setTimeout(function(){ja.drawImage(oa,0,0);m(qa,pa)},-0):(ja.drawImage(oa,0,0),m(qa,pa))},qa=document.createElement("canvas"),ua=parseInt(pa.getAttribute("width")),ya=parseInt(pa.getAttribute("height"));U=null!=U?U:1;null!=z&&(U=O?Math.min(1,Math.min(3*z/(4*ya),z/ua)):z/ua);U=this.getMaxCanvasScale(ua,ya,U);ua=Math.ceil(U*ua);ya=Math.ceil(U*ya);qa.setAttribute("width",ua);qa.setAttribute("height",ya);var ja=qa.getContext("2d");null!=ia&&(ja.beginPath(),ja.rect(0,0,ua,ya),ja.fillStyle=ia,ja.fill());1!=U&&ja.scale(U,U);if(ca){var ma=Y.view,ka=ma.scale;-ma.scale=1;var Ba=btoa(unescape(encodeURIComponent(ma.createSvgGrid(ma.gridColor))));ma.scale=ka;Ba="data:image/svg+xml;base64,"+Ba;var sa=Y.gridSize*ma.gridSteps*U,Ea=Y.getGraphBounds(),wa=ma.translate.x*ka,Ca=ma.translate.y*ka,Da=wa+(Ea.x-wa)/ka-ba,Ka=Ca+(Ea.y-Ca)/ka-ba,Aa=new Image;Aa.onload=function(){try{for(var Fa=-Math.round(sa-mxUtils.mod((wa-Da)*U,sa)),Ja=-Math.round(sa-mxUtils.mod((Ca-Ka)*U,sa));Fa<ua;Fa+=sa)for(var Ra=Ja;Ra<ya;Ra+=sa)ja.drawImage(Aa,Fa/U,Ra/U);xa()}catch(Sa){null!=N&&N(Sa)}};-Aa.onerror=function(Fa){null!=N&&N(Fa)};Aa.src=Ba}else xa()}catch(Fa){null!=N&&N(Fa)}});oa.onerror=function(xa){null!=N&&N(xa)};X&&this.graph.addSvgShadow(pa);this.graph.mathEnabled&&this.addMathCss(pa);var ha=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(pa,this.resolvedFontCss),oa.src=Editor.createSvgDataUri(mxUtils.getXml(pa))}catch(xa){null!=N&&N(xa)}});this.embedExtFonts(mxUtils.bind(this,function(xa){try{null!=xa&&this.addFontCss(pa,xa),this.loadFonts(ha)}catch(qa){null!=-N&&N(qa)}}))}catch(xa){null!=N&&N(xa)}}),I,Z)}catch(pa){null!=N&&N(pa)}};Editor.crcTable=[];for(var l=0;256>l;l++)for(var n=l,p=0;8>p;p++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[l]=n;Editor.updateCRC=function(m,z,I,L){for(var N=0;N<L;N++)m=Editor.crcTable[(m^z.charCodeAt(I+N))&255]^m>>>8;return m};Editor.crc32=function(m){for(var z=-1,I=0;I<m.length;I++)z=z>>>8^Editor.crcTable[(z^m.charCodeAt(I))&255];return(z^-1)>>>0};Editor.writeGraphModelToPng=function(m,z,I,L,N){function O(Z,Y){var ba=-W;W+=Y;return Z.substring(ba,W)}function S(Z){Z=O(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function U(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}m=m.substring(m.indexOf(",")+1);m=window.atob?atob(m):Base64.decode(m,!0);var W=0;if(O(m,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=N&&N();else if(O(m,4),"IHDR"!=O(m,4))null!=N&&N();else{O(m,17);N=m.substring(0,W);do{var X=S(m);if("IDAT"==O(m,4)){N=m.substring(0,-W-8);"pHYs"==z&&"dpi"==I?(I=Math.round(L/.0254),I=U(I)+U(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==z?String.fromCharCode(0):"")+L;L=4294967295;L=Editor.updateCRC(L,z,0,4);L=Editor.updateCRC(L,I,0,I.length);N+=U(I.length)+z+I+U(L^4294967295);N+=m.substring(W-8,m.length);break}N+=m.substring(W-8,W-4+X);O(m,X);O(m,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(N):Base64.encode(N,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";-var u=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(m,z){u.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var F=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){F.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(m,z){var I=null;null!=m.editor.graph.getModel().getParent(z)?I=z.getId():+btoa(unescape(encodeURIComponent(m)))};Editor.prototype.convertImageToDataUri=function(m,z,I,L,N){try{var Q=!0,R=window.setTimeout(mxUtils.bind(this,function(){Q=!1;z(m)}),this.timeout),V=mxUtils.bind(this,function(){null!=L?this.convertImageToDataUri(m,z,I,L,!0):z(m)});if(/(\.svg)$/i.test(m)&&!N)mxUtils.get(m,mxUtils.bind(this,function(X){window.clearTimeout(R);Q&&(200>X.getStatus()||299<X.getStatus()?V():z(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(R);+Q&&V()}));else{var W=new Image;this.crossOriginImages&&(W.crossOrigin="anonymous");W.onload=function(){window.clearTimeout(R);if(Q)try{L=null!=L&&N?L:1;var X=document.createElement("canvas"),Z=X.getContext("2d");Z.scale(L,L);X.height=W.height*L;X.width=W.width*L;Z.drawImage(W,0,0);z(X.toDataURL())}catch(Y){z(m)}};W.onerror=function(){window.clearTimeout(R);Q&&(null!=I?I():z(m))};W.src=m}}catch(X){null!=I?I():z(m)}};Editor.prototype.convertImages=function(m,z,I,L){function N(){0<Q.length?Q.shift()():+z(m)}null==L&&(L=this.createImageUrlConverter());var Q=[],R=I||{};I=mxUtils.bind(this,function(V,W){V=m.getElementsByTagName(V);for(var X=0;X<V.length;X++)mxUtils.bind(this,function(Z){Q.push(mxUtils.bind(this,function(){try{if(null!=Z){var Y=L.convert(Z.getAttribute(W));if(null!=Y&&"data:"!=Y.substring(0,5)){var ba=R[Y];null==ba?this.convertImageToDataUri(Y,function(da){null!=da&&(R[Y]=da,Z.setAttribute(W,da));N()},null,Editor.svgRasterScale):(Z.setAttribute(W,ba),N())}else null!=Y&&Z.setAttribute(W,+Y),N()}}catch(da){N()}}))})(V[X])});I("image","xlink:href");I("img","src");N()};Editor.base64Encode=function(m){for(var z="",I=0,L=m.length,N,Q,R;I<L;){N=m.charCodeAt(I++)&255;if(I==L){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4);z+="==";break}Q=m.charCodeAt(I++);if(I==L){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&+3)<<4|(Q&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);z+="=";break}R=m.charCodeAt(I++);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4|(Q&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2|(R&192)>>6);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R&63)}return z};+Editor.prototype.loadUrl=function(m,z,I,L,N,Q,R,V){try{var W=!R&&(L||/(\.png)($|\?)/i.test(m)||/(\.jpe?g)($|\?)/i.test(m)||/(\.gif)($|\?)/i.test(m)||/(\.pdf)($|\?)/i.test(m));N=null!=N?N:!0;var X=mxUtils.bind(this,function(){mxUtils.get(m,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=z){var Y=Z.getText();if(W){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();+Y=Array(Z.length);for(var ba=0;ba<Z.length;ba++)Y[ba]=String.fromCharCode(Z[ba]);Y=Y.join("")}Q=null!=Q?Q:"data:image/png;base64,";Y=Q+Editor.base64Encode(Y)}z(Y)}}else null!=I&&(0==Z.getStatus()?I({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?I({message:mxResources.get("fileNotFound"),code:Z.getStatus()},Z):I({message:this.getErrorMessage(Z)},Z))}),function(Z){null!=I&&I({message:mxResources.get("error")+" "+Z.getStatus()})},W,this.timeout,function(){N&&null!=I&&I({code:App.ERROR_TIMEOUT,+retry:X})},V)});X()}catch(Z){null!=I&&I(Z)}};Editor.prototype.getErrorMessage=function(m){var z=mxResources.get("error")+" "+m.getStatus();try{var I=m.getText(),L=JSON.parse(I);null!=L&&null!=L.error&&null!=L.error.message&&(z=L.error.message+" ("+z+")")}catch(N){}return z};Editor.prototype.absoluteCssFonts=function(m){var z=null;if(null!=m){var I=m.split("url(");if(0<I.length){z=[I[0]];m=window.location.pathname;var L=null!=m?m.lastIndexOf("/"):-1;0<=L&&(m=m.substring(0,L+1));L=document.getElementsByTagName("base");+var N=null;null!=L&&0<L.length&&(N=L[0].getAttribute("href"));for(var Q=1;Q<I.length;Q++)if(L=I[Q].indexOf(")"),0<L){var R=Editor.trimCssUrl(I[Q].substring(0,L));this.graph.isRelativeUrl(R)&&(R=null!=N?N+R:window.location.protocol+"//"+window.location.hostname+("/"==R.charAt(0)?"":m)+R);z.push('url("'+R+'"'+I[Q].substring(L))}else z.push(I[Q])}else z=[m]}return null!=z?z.join(""):null};Editor.prototype.mapFontUrl=function(m,z,I){/^https?:\/\//.test(z)&&!this.isCorsEnabledForUrl(z)&&(z=PROXY_URL+"?url="++encodeURIComponent(z));I(m,z)};Editor.prototype.embedCssFonts=function(m,z){var I=m.split("url("),L=0;null==this.cachedFonts&&(this.cachedFonts={});var N=mxUtils.bind(this,function(){if(0==L){for(var W=[I[0]],X=1;X<I.length;X++){var Z=I[X].indexOf(")");W.push('url("');W.push(this.cachedFonts[Editor.trimCssUrl(I[X].substring(0,Z))]);W.push('"'+I[X].substring(Z))}z(W.join(""))}});if(0<I.length){for(m=1;m<I.length;m++){var Q=I[m].indexOf(")"),R=null,V=I[m].indexOf("format(",Q);0<V&&(R=Editor.trimCssUrl(I[m].substring(V++7,I[m].indexOf(")",V))));mxUtils.bind(this,function(W){if(null==this.cachedFonts[W]){this.cachedFonts[W]=W;L++;var X="application/x-font-ttf";if("svg"==R||/(\.svg)($|\?)/i.test(W))X="image/svg+xml";else if("otf"==R||"embedded-opentype"==R||/(\.otf)($|\?)/i.test(W))X="application/x-font-opentype";else if("woff"==R||/(\.woff)($|\?)/i.test(W))X="application/font-woff";else if("woff2"==R||/(\.woff2)($|\?)/i.test(W))X="application/font-woff2";else if("eot"==R||/(\.eot)($|\?)/i.test(W))X="application/vnd.ms-fontobject";+else if("sfnt"==R||/(\.sfnt)($|\?)/i.test(W))X="application/font-sfnt";this.mapFontUrl(X,W,mxUtils.bind(this,function(Z,Y){this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedFonts[W]=ba;L--;N()}),mxUtils.bind(this,function(ba){L--;N()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[m].substring(0,Q)),R)}N()}else z(m)};Editor.prototype.loadFonts=function(m){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(z){this.resolvedFontCss=+z;null!=m&&m()})):null!=m&&m()};Editor.prototype.createGoogleFontCache=function(){var m={},z;for(z in Graph.fontMapping)Graph.isCssFontUrl(z)&&(m[z]=Graph.fontMapping[z]);return m};Editor.prototype.embedExtFonts=function(m){var z=this.graph.getCustomFonts();if(0<z.length){var I=[],L=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var N=mxUtils.bind(this,function(){0==L&&this.embedCssFonts(I.join(""),m)}),Q=0;Q<z.length;Q++)mxUtils.bind(this,function(R,V){Graph.isCssFontUrl(V)?+null==this.cachedGoogleFonts[V]?(L++,this.loadUrl(Graph.rewriteGoogleFontUrl(V),mxUtils.bind(this,function(W){this.cachedGoogleFonts[V]=W;I.push(W+"\n");L--;N()}),mxUtils.bind(this,function(W){L--;I.push("@import url("+V+");\n");N()}))):I.push(this.cachedGoogleFonts[V]+"\n"):I.push('@font-face {font-family: "'+R+'";src: url("'+V+'")}\n')})(z[Q].name,z[Q].url);N()}else m()};Editor.prototype.addMathCss=function(m){m=m.getElementsByTagName("defs");if(null!=m&&0<m.length)for(var z=document.getElementsByTagName("style"),+I=0;I<z.length;I++){var L=mxUtils.getTextContent(z[I]);0>L.indexOf("mxPageSelector")&&0<L.indexOf("MathJax")&&m[0].appendChild(z[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(m,z){z=null!=z?z:this.absoluteCssFonts(this.fontCss);if(null!=z){var I=mxUtils.getSvgDefs(m),L=z.split("\n");z=[];for(var N=[],Q=0;Q<L.length;Q++)"@import"==L[Q].substring(0,7)?z.push(L[Q]):N.push(L[Q]);m=m.ownerDocument;m=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"style"):m.createElement("style");+m.setAttribute("type","text/css");0<z.length&&(mxUtils.setTextContent(m,z.join("\n")),I.appendChild(m));0<N.length&&(m=m.cloneNode(!1),mxUtils.setTextContent(m,N.join("\n")),I.appendChild(m))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(m,z,I){var L=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(L/m,L/z))};Editor.prototype.exportToCanvas=function(m,z,I,L,N,Q,R,V,W,X,Z,Y,ba,da,ca,ea,aa,fa){try{Q=+null!=Q?Q:!0;R=null!=R?R:!0;Y=null!=Y?Y:this.graph;ba=null!=ba?ba:0;var ia=W?null:Y.background;ia==mxConstants.NONE&&(ia=null);null==ia&&(ia=L);null==ia&&0==W&&(ia="dark"==ea&&"none"!=Y.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(Y.getSvg(null,null,ba,da,null,R,null,null,null,X,null,ea,aa,fa),mxUtils.bind(this,function(na){try{var pa=new Image;pa.onload=mxUtils.bind(this,function(){try{var wa=function(){mxClient.IS_SF?window.setTimeout(function(){ja.drawImage(pa,0,0);m(qa,na)},+0):(ja.drawImage(pa,0,0),m(qa,na))},qa=document.createElement("canvas"),ua=parseInt(na.getAttribute("width")),ya=parseInt(na.getAttribute("height"));V=null!=V?V:1;null!=z&&(V=Q?Math.min(1,Math.min(3*z/(4*ya),z/ua)):z/ua);V=this.getMaxCanvasScale(ua,ya,V);ua=Math.ceil(V*ua);ya=Math.ceil(V*ya);qa.setAttribute("width",ua);qa.setAttribute("height",ya);var ja=qa.getContext("2d");null!=ia&&(ja.beginPath(),ja.rect(0,0,ua,ya),ja.fillStyle=ia,ja.fill());1!=V&&ja.scale(V,V);if(ca){var oa=Y.view,ka=oa.scale;+oa.scale=1;var Ca=btoa(unescape(encodeURIComponent(oa.createSvgGrid(oa.gridColor))));oa.scale=ka;Ca="data:image/svg+xml;base64,"+Ca;var sa=Y.gridSize*oa.gridSteps*V,Fa=Y.getGraphBounds(),xa=oa.translate.x*ka,Aa=oa.translate.y*ka,Da=xa+(Fa.x-xa)/ka-ba,Ka=Aa+(Fa.y-Aa)/ka-ba,Ja=new Image;Ja.onload=function(){try{for(var Ea=-Math.round(sa-mxUtils.mod((xa-Da)*V,sa)),Ba=-Math.round(sa-mxUtils.mod((Aa-Ka)*V,sa));Ea<ua;Ea+=sa)for(var Ra=Ba;Ra<ya;Ra+=sa)ja.drawImage(Ja,Ea/V,Ra/V);wa()}catch(Sa){null!=N&&N(Sa)}};+Ja.onerror=function(Ea){null!=N&&N(Ea)};Ja.src=Ca}else wa()}catch(Ea){null!=N&&N(Ea)}});pa.onerror=function(wa){null!=N&&N(wa)};X&&this.graph.addSvgShadow(na);this.graph.mathEnabled&&this.addMathCss(na);var ha=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(na,this.resolvedFontCss),pa.src=Editor.createSvgDataUri(mxUtils.getXml(na))}catch(wa){null!=N&&N(wa)}});this.embedExtFonts(mxUtils.bind(this,function(wa){try{null!=wa&&this.addFontCss(na,wa),this.loadFonts(ha)}catch(qa){null!=+N&&N(qa)}}))}catch(wa){null!=N&&N(wa)}}),I,Z)}catch(na){null!=N&&N(na)}};Editor.crcTable=[];for(var l=0;256>l;l++)for(var n=l,p=0;8>p;p++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[l]=n;Editor.updateCRC=function(m,z,I,L){for(var N=0;N<L;N++)m=Editor.crcTable[(m^z.charCodeAt(I+N))&255]^m>>>8;return m};Editor.crc32=function(m){for(var z=-1,I=0;I<m.length;I++)z=z>>>8^Editor.crcTable[(z^m.charCodeAt(I))&255];return(z^-1)>>>0};Editor.writeGraphModelToPng=function(m,z,I,L,N){function Q(Z,Y){var ba=+W;W+=Y;return Z.substring(ba,W)}function R(Z){Z=Q(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function V(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}m=m.substring(m.indexOf(",")+1);m=window.atob?atob(m):Base64.decode(m,!0);var W=0;if(Q(m,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=N&&N();else if(Q(m,4),"IHDR"!=Q(m,4))null!=N&&N();else{Q(m,17);N=m.substring(0,W);do{var X=R(m);if("IDAT"==Q(m,4)){N=m.substring(0,+W-8);"pHYs"==z&&"dpi"==I?(I=Math.round(L/.0254),I=V(I)+V(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==z?String.fromCharCode(0):"")+L;L=4294967295;L=Editor.updateCRC(L,z,0,4);L=Editor.updateCRC(L,I,0,I.length);N+=V(I.length)+z+I+V(L^4294967295);N+=m.substring(W-8,m.length);break}N+=m.substring(W-8,W-4+X);Q(m,X);Q(m,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(N):Base64.encode(N,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";+var v=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(m,z){v.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var F=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){F.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(m,z){var I=null;null!=m.editor.graph.getModel().getParent(z)?I=z.getId():null!=m.currentPage&&(I=m.currentPage.getId());return I});if(null!=window.StyleFormatPanel){var H=Format.prototype.init;Format.prototype.init=function(){H.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var E=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?E.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(m){return"simple"==-Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var K=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(m){m=K.apply(this,arguments);var z=this.editorUi,I=z.editor.graph;if(I.isEnabled()){var L=z.getCurrentFile();null!=L&&L.isAutosaveOptional()&&m.appendChild(this.createOption(mxResources.get("autosave"),function(){return z.editor.autosave},function(S){z.editor.setAutosave(S);z.editor.autosave&&L.isModified()&&L.fileChanged()},-{install:function(S){this.listener=function(){S(z.editor.autosave)};z.editor.addListener("autosaveChanged",this.listener)},destroy:function(){z.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){var N=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(S){z.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=function(){S(I.mathEnabled)};z.addListener("mathEnabledChanged",-this.listener)},destroy:function(){z.removeListener(this.listener)}});m.appendChild(N);if(!z.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var O=z.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");O.style.position="absolute";O.style.left="85%";N.appendChild(O)}}return m};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",+Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var K=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(m){m=K.apply(this,arguments);var z=this.editorUi,I=z.editor.graph;if(I.isEnabled()){var L=z.getCurrentFile();null!=L&&L.isAutosaveOptional()&&m.appendChild(this.createOption(mxResources.get("autosave"),function(){return z.editor.autosave},function(R){z.editor.setAutosave(R);z.editor.autosave&&L.isModified()&&L.fileChanged()},+{install:function(R){this.listener=function(){R(z.editor.autosave)};z.editor.addListener("autosaveChanged",this.listener)},destroy:function(){z.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){var N=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(R){z.actions.get("mathematicalTypesetting").funct()},{install:function(R){this.listener=function(){R(I.mathEnabled)};z.addListener("mathEnabledChanged",+this.listener)},destroy:function(){z.removeListener(this.listener)}});m.appendChild(N);if(!z.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var Q=z.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");Q.style.position="absolute";Q.style.left="85%";N.appendChild(Q)}}return m};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(m){return"0"==mxUtils.getValue(m.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(m){return"1"==mxUtils.getValue(m.style,"fixedSize",@@ -12889,93 +12889,93 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispNamestroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=-function(m,z,I,L){if(null!=z){var N=mxUtils.bind(this,function(S){if(null!=S)if(I)for(var U=0;U<S.length;U++){if("function"!==typeof S[U].isVisible||S[U].isVisible(L,this))z[S[U].name]=S[U]}else for(var W in z){var X=!1;for(U=0;U<S.length;U++)if(S[U].name==W&&S[U].type==z[W].type){X=!0;break}X||delete z[W]}}),O=this.editorUi.editor.graph.view.getState(m);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],-O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),N(O.shape.customProperties));m=m.getAttribute("customProperties");if(null!=m)try{N(JSON.parse(m))}catch(S){}}};var d=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var m=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=m.style.shape&&+function(m,z,I,L){if(null!=z){var N=mxUtils.bind(this,function(R){if(null!=R)if(I)for(var V=0;V<R.length;V++){if("function"!==typeof R[V].isVisible||R[V].isVisible(L,this))z[R[V].name]=R[V]}else for(var W in z){var X=!1;for(V=0;V<R.length;V++)if(R[V].name==W&&R[V].type==z[W].type){X=!0;break}X||delete z[W]}}),Q=this.editorUi.editor.graph.view.getState(m);null!=Q&&null!=Q.shape&&(Q.shape.commonCustomPropAdded||(Q.shape.commonCustomPropAdded=!0,Q.shape.customProperties=Q.shape.customProperties||[],+Q.cell.vertex?Array.prototype.push.apply(Q.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(Q.shape.customProperties,Editor.commonEdgeProperties)),N(Q.shape.customProperties));m=m.getAttribute("customProperties");if(null!=m)try{N(JSON.parse(m))}catch(R){}}};var d=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var m=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=m.style.shape&&!m.containsLabel&&0<m.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));d.apply(this,arguments);if(Editor.enableCustomProperties){for(var z={},I=m.vertices,L=m.edges,N=0;N<I.length;N++)this.findCommonProperties(I[N],z,0==N,m);for(N=0;N<L.length;N++)this.findCommonProperties(L[N],z,0==I.length&&0==N,m);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(z).length&&this.container.appendChild(this.addProperties(this.createPanel(),z,m))}};var g=StyleFormatPanel.prototype.addStyleOps;-StyleFormatPanel.prototype.addStyleOps=function(m){var z=this.editorUi.getSelectionState();1==z.cells.length?this.addActions(m,["copyStyle","pasteStyle"]):1<=z.cells.length&&this.addActions(m,["pasteStyle","pasteData"]);g.apply(this,arguments);return m};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(m,z,I,L){function N(ja,ma,ka,Ba,sa){if(null!=ka.valueChanged)ka.valueChanged(ma,sa);else{ba.getModel().beginUpdate();try{sa=[];var Ea=[];if(null!=ka.index){for(var wa=-[],Ca=ka.parentRow.nextSibling;Ca&&Ca.getAttribute("data-pName")==ja;)wa.push(Ca.getAttribute("data-pValue")),Ca=Ca.nextSibling;ka.index<wa.length?null!=Ba?wa.splice(Ba,1):wa[ka.index]=ma:wa.push(ma);null!=ka.size&&wa.length>ka.size&&(wa=wa.slice(0,ka.size));ma=wa.join(",");null!=ka.countProperty&&(ba.setCellStyles(ka.countProperty,wa.length,ba.getSelectionCells()),sa.push(ka.countProperty),Ea.push(wa.length))}ba.setCellStyles(ja,ma,ba.getSelectionCells());sa.push(ja);Ea.push(ma);if(null!=ka.dependentProps)for(ja=-0;ja<ka.dependentProps.length;ja++){var Da=ka.dependentPropsDefVal[ja],Ka=ka.dependentPropsVals[ja];if(Ka.length>ma)Ka=Ka.slice(0,ma);else for(var Aa=Ka.length;Aa<ma;Aa++)Ka.push(Da);Ka=Ka.join(",");ba.setCellStyles(ka.dependentProps[ja],Ka,ba.getSelectionCells());sa.push(ka.dependentProps[ja]);Ea.push(Ka)}if("function"==typeof ka.onChange)ka.onChange(ba,ma);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",Ea,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}}-function O(ja,ma,ka){var Ba=mxUtils.getOffset(m,!0),sa=mxUtils.getOffset(ja,!0);ma.style.position="absolute";ma.style.left=sa.x-Ba.x+"px";ma.style.top=sa.y-Ba.y+"px";ma.style.width=ja.offsetWidth+"px";ma.style.height=ja.offsetHeight-(ka?4:0)+"px";ma.style.zIndex=5}function S(ja,ma,ka){function Ba(Ea){if(null==Ea||Ea==mxConstants.NONE)sa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==Ea)sa.style.background="";else{var wa=mxUtils.getLightDarkColor(Ea);mxUtils.isLightDarkColor(Ea)&&-wa.light!=wa.dark?sa.style.background="linear-gradient(to right bottom, "+wa.cssText+" 50%, "+mxUtils.invertLightDarkColor(wa).cssText+" 50.3%)":sa.style.background=Ea}}var sa=document.createElement("div");sa.style.width="32px";sa.style.height="8px";sa.style.margin="2px";sa.style.borderStyle="solid";sa.style.borderWidth="1px";Ba(ma);btn=mxUtils.button("",mxUtils.bind(Y,function(Ea){this.editorUi.pickColor(ma,function(wa){N(ja,wa,ka);Ba(wa)});mxEvent.consume(Ea)}));btn.style.height="18px";btn.style.width=-"40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(sa);return btn}function U(ja,ma,ka,Ba,sa,Ea,wa){null!=ma&&(ma=ma.split(","),ea.push({name:ja,values:ma,type:ka,defVal:Ba,countProperty:sa,parentRow:Ea,isDeletable:!0,flipBkg:wa}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Ca){for(var Da=Ea,Ka=0;null!=Da.nextSibling;)if(Da.nextSibling.getAttribute("data-pName")==ja)Da=Da.nextSibling,Ka++;else break;var Aa={type:ka,parentRow:Ea,index:Ka,isDeletable:!0,-defVal:Ba,countProperty:sa};Ka=Z(ja,"",Aa,0==Ka%2,wa);N(ja,Ba,Aa);Da.parentNode.insertBefore(Ka,Da.nextSibling);mxEvent.consume(Ca)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function W(ja,ma,ka,Ba,sa,Ea,wa){if(0<sa){var Ca=Array(sa);ma=null!=ma?ma.split(","):[];for(var Da=0;Da<sa;Da++)Ca[Da]=null!=ma[Da]?ma[Da]:null!=Ba?Ba:"";ea.push({name:ja,values:Ca,type:ka,defVal:Ba,parentRow:Ea,flipBkg:wa,size:sa})}return document.createElement("div")}function X(ja,-ma,ka){var Ba=document.createElement("input");Ba.type="checkbox";Ba.checked="1"==ma;mxEvent.addListener(Ba,"change",function(){N(ja,Ba.checked?"1":"0",ka)});return Ba}function Z(ja,ma,ka,Ba,sa){var Ea=ka.dispName,wa=ka.type,Ca=document.createElement("tr");Ca.className="gePropRow"+(sa?"Dark":"")+(Ba?"Alt":"")+" gePropNonHeaderRow";Ca.setAttribute("data-pName",ja);Ca.setAttribute("data-pValue",ma);Ba=!1;null!=ka.index&&(Ca.setAttribute("data-index",ka.index),Ea=(null!=Ea?Ea:"")+"["+ka.index+"]",Ba=-!0);var Da=document.createElement("td");Da.className="gePropRowCell";Ea=mxResources.get(Ea,null,Ea);mxUtils.write(Da,Ea);Da.setAttribute("title",Ea);Ba&&(Da.style.textAlign="right");Ca.appendChild(Da);Da=document.createElement("td");Da.className="gePropRowCell";Da.setAttribute("title",null!=ma?ma:mxResources.get("none"));if("color"==wa)Da.appendChild(S(ja,ma,ka));else if("bool"==wa||"boolean"==wa)Da.appendChild(X(ja,ma,ka));else if("enum"==wa){var Ka=ka.enumList;for(sa=0;sa<Ka.length;sa++)if(Ea=Ka[sa],-Ea.val==ma){mxUtils.write(Da,mxResources.get(Ea.dispName,null,Ea.dispName));break}mxEvent.addListener(Da,"click",mxUtils.bind(Y,function(){var Aa=document.createElement("select"),Fa=null;O(Da,Aa);for(var Ja=0;Ja<Ka.length;Ja++){var Ra=Ka[Ja],Sa=document.createElement("option");Sa.value=mxUtils.htmlEntities(Ra.val);mxUtils.write(Sa,mxResources.get(Ra.dispName,null,Ra.dispName));Aa.appendChild(Sa);null==Ra.val&&(Sa.value="null",Fa=Sa)}Aa.value=null==ma&&null!=Fa?"null":ma;m.appendChild(Aa);mxEvent.addListener(Aa,-"change",function(){var ab=mxUtils.htmlEntities(Aa.value);if(Aa[Aa.selectedIndex]==Fa||"null"==ab.value)ab=null;N(ja,ab,ka)});Aa.focus();mxEvent.addListener(Aa,"blur",function(){m.removeChild(Aa)})}))}else"dynamicArr"==wa?Da.appendChild(U(ja,ma,ka.subType,ka.subDefVal,ka.countProperty,Ca,sa)):"staticArr"==wa?Da.appendChild(W(ja,ma,ka.subType,ka.subDefVal,ka.size,Ca,sa)):"readOnly"==wa?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=ma,sa.style.borderWidth="0px","id"==ja?-(sa.style.width="190px",sa.style.position="relative",sa.style.right="6px",sa.style.float="right",sa.style.background="none",sa.style.textAlign="right",Ca.firstChild.setAttribute("colspan","2"),sa.setAttribute("title",ma),Ca.firstChild.appendChild(sa)):(sa.style.width="96px",Da.appendChild(sa))):(Da.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ma)),mxEvent.addListener(Da,"click",mxUtils.bind(Y,function(){function Aa(){var Ja=Fa.value;Ja=0==Ja.length&&"string"!=wa&&"numbers"!=wa?0:Ja;ka.allowAuto&&-(null!=Ja.trim&&"auto"==Ja.trim().toLowerCase()?(Ja="auto",wa="string"):(Ja=parseFloat(Ja),Ja=isNaN(Ja)?0:Ja));null!=ka.min&&Ja<ka.min?Ja=ka.min:null!=ka.max&&Ja>ka.max&&(Ja=ka.max);var Ra=null;try{Ra="numbers"==wa?Ja.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==wa?parseInt(Ja):Ja)+"")}catch(Sa){}N(ja,Ra,ka,null,Fa)}var Fa=document.createElement("input");O(Da,Fa,!0);Fa.value=decodeURIComponent(ma);Fa.className="gePropEditor";"int"!=wa&&"float"!=wa||ka.allowAuto||(Fa.type="number",-Fa.step="int"==wa?"1":"any",null!=ka.min&&(Fa.min=parseFloat(ka.min)),null!=ka.max&&(Fa.max=parseFloat(ka.max)));m.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(Ja){13==Ja.keyCode&&Aa()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){Aa()})})));ka.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(Y,function(Aa){N(ja,"",ka,ka.index);mxEvent.consume(Aa)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",Da.appendChild(sa));Ca.appendChild(Da);-return Ca}var Y=this,ba=this.editorUi.editor.graph,ea=[];m.style.position="relative";m.style.padding="0";var ca=document.createElement("table");ca.className="geProperties";ca.style.whiteSpace="nowrap";ca.style.width="100%";var fa=document.createElement("tr");fa.className="gePropHeader";var aa=document.createElement("th");aa.className="gePropHeaderCell";aa.style.paddingLeft="16px";aa.style.backgroundRepeat="no-repeat";aa.style.backgroundPosition="-2px 50%";aa.style.backgroundSize="20px";mxUtils.write(aa,-mxResources.get("property"));fa.style.cursor="pointer";var da=function(){var ja=ca.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){aa.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var ma="none";for(var ka=m.childNodes.length-1;0<=ka;ka--)try{var Ba=m.childNodes[ka],sa=Ba.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||m.removeChild(Ba)}catch(Ea){}}else aa.style.backgroundImage="url('"+Editor.arrowDownImage+"')",ma="";for(ka=0;ka<ja.length;ka++)ja[ka].style.display=-ma};mxEvent.addListener(fa,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;da()});fa.appendChild(aa);var ia=document.createElement("th");ia.className="gePropHeaderCell";ia.style.paddingLeft="4px";mxUtils.write(ia,mxResources.get("value"));fa.appendChild(ia);ca.appendChild(fa);var pa=ia=!1;fa=null;1==I.vertices.length&&0==I.edges.length?fa=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(fa=I.edges[0].id);null==fa||L||ca.appendChild(Z("id",mxUtils.htmlEntities(fa),-{dispName:"id",type:"readOnly"},!0,!1));for(var oa in z)if(L=z[oa],"function"!=typeof L.isVisible||L.isVisible(I,this)){var ha=null!=L.getValue?L.getValue():null!=I.style[oa]?mxUtils.htmlEntities(I.style[oa]+""):null!=L.getDefaultValue?L.getDefaultValue(I,this):L.defVal;if("separator"==L.type)pa=!pa;else{if("staticArr"==L.type)L.size=parseInt(I.style[L.sizeProperty]||z[L.sizeProperty].defVal)||0;else if(null!=L.dependentProps){var xa=L.dependentProps,qa=[],ua=[];for(fa=0;fa<xa.length;fa++){var ya=-I.style[xa[fa]];ua.push(z[xa[fa]].subDefVal);qa.push(null!=ya?ya.split(","):[])}L.dependentPropsDefVal=ua;L.dependentPropsVals=qa}ca.appendChild(Z(oa,ha,L,ia,pa));ia=!ia}}for(fa=0;fa<ea.length;fa++)for(L=ea[fa],z=L.parentRow,I=0;I<L.values.length;I++)oa=Z(L.name,L.values[I],{type:L.type,parentRow:L.parentRow,isDeletable:L.isDeletable,index:I,defVal:L.defVal,countProperty:L.countProperty,size:L.size},0==I%2,L.flipBkg),z.parentNode.insertBefore(oa,z.nextSibling),z=oa;m.appendChild(ca);da();return m};-StyleFormatPanel.prototype.addStyles=function(m){if(null!=this.defaultColorSchemes){var z=function(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})},I=this.editorUi,L=I.editor.graph,N=document.createElement("div");N.style.whiteSpace="nowrap";N.style.paddingLeft="24px";N.style.paddingRight="20px";m.style.paddingLeft="16px";m.style.paddingBottom="6px";m.style.position="relative";m.appendChild(N);var O=document.createElement("div");-O.style.whiteSpace="nowrap";O.style.position="relative";O.style.textAlign="center";O.style.width="210px";for(var S=[],U=0;U<this.defaultColorSchemes.length;U++){var W=document.createElement("div");W.style.display="inline-block";W.style.width="6px";W.style.height="6px";W.style.marginLeft="4px";W.style.marginRight="3px";W.style.borderRadius="3px";W.style.cursor="pointer";W.style.background="transparent";W.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ea){mxEvent.addListener(W,"click",-mxUtils.bind(this,function(){X(ea)}))})(U);S.push(W);O.appendChild(W)}var X=mxUtils.bind(this,function(ea){null!=S[ea]&&(null!=this.format.currentScheme&&null!=S[this.format.currentScheme]&&(S[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ea,Z(this.defaultColorSchemes[this.format.currentScheme]),S[this.format.currentScheme].style.background="#84d7ff")}),Z=mxUtils.bind(this,function(ea){var ca=mxUtils.clone(L.defaultVertexStyle);ca[mxConstants.STYLE_STROKECOLOR]=-null!=ca[mxConstants.STYLE_STROKECOLOR]?ca[mxConstants.STYLE_STROKECOLOR]:"default";ca[mxConstants.STYLE_FILLCOLOR]=null!=ca[mxConstants.STYLE_FILLCOLOR]?ca[mxConstants.STYLE_FILLCOLOR]:"default";ca[mxConstants.STYLE_FONTCOLOR]=null!=ca[mxConstants.STYLE_FONTCOLOR]?ca[mxConstants.STYLE_FONTCOLOR]:"default";L.replaceDefaultColors(new mxCell,ca);var fa=mxUtils.bind(this,function(da){var ia=mxUtils.button("",mxUtils.bind(this,function(ha){L.getModel().beginUpdate();try{for(var xa=I.getSelectionState().cells,-qa=0;qa<xa.length;qa++){var ua=L.getModel().getStyle(xa[qa]);null!=da?(mxEvent.isShiftDown(ha)||(ua=""==da.fill||null==da.fill?mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,da.fill),ua=""==da.gradient||null==da.gradient?mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,da.gradient),mxEvent.isControlDown(ha)||mxClient.IS_MAC&&mxEvent.isMetaDown(ha)||!L.getModel().isVertex(xa[qa])||(ua=-""==da.font||null==da.font?mxUtils.setStyle(ua,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_FONTCOLOR,da.font))),mxEvent.isAltDown(ha)||(ua=""==da.stroke||null==da.fill?mxUtils.setStyle(ua,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_STROKECOLOR,da.stroke))):(ua=mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,null),ua=mxUtils.setStyle(ua,mxConstants.STYLE_STROKECOLOR,null),ua=mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,null),L.getModel().isVertex(xa[qa])&&-(ua=mxUtils.setStyle(ua,mxConstants.STYLE_FONTCOLOR,null)));L.getModel().setStyle(xa[qa],ua)}}finally{L.getModel().endUpdate()}}));ia.className="geStyleButton";ia.style.width="36px";ia.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ia.style.margin="0px 6px 6px 0px";if(null!=da){var pa="1px solid";null!=da.border&&(pa=da.border);if(null!=da.gradient)ia.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(da.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(da.gradient).cssText+-" 100%)";else if(da.fill==mxConstants.NONE)ia.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==da.fill||""==da.fill)ia.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var oa=mxUtils.getLightDarkColor(da.fill);ia.style.backgroundImage="linear-gradient(to right bottom, "+oa.cssText+" 50%, "+oa.light+" 50.3%)"}null==da.stroke||da.stroke==mxConstants.NONE?ia.style.border=pa+" transparent":""==da.stroke?ia.style.border=-"1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(oa=mxUtils.getLightDarkColor(da.stroke),ia.style.border=pa+" "+oa.cssText,ia.style.borderRightColor=oa.light,ia.style.borderBottomColor=ia.style.borderRightColor);null!=da.title&&ia.setAttribute("title",da.title)}else pa=mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff"),oa=mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000"),ia.style.backgroundColor=pa,ia.style.border="1px solid "+-oa;ia.style.borderRadius="0";N.appendChild(ia);null!=da&&null!=da.gradient&&(pa=ia.cloneNode(!1),pa.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(da.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(da.gradient).light+") 100%)",pa.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",pa.style.backgroundColor="transparent",N.appendChild(pa),pa.style.marginLeft="-42px",mxEvent.addListener(pa,"click",function(){ia.click()}))});N.innerText=-"";if(null!=ea)for(var aa=0;aa<ea.length;aa++)0<aa&&0==mxUtils.mod(aa,4)&&mxUtils.br(N),fa(ea[aa])});null==this.format.currentScheme?X(Math.min(S.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):X(this.format.currentScheme);U=10>=this.defaultColorSchemes.length?28:8;var Y=document.createElement("div");Y.style.cssText="position:absolute;left:10px;top:8px;bottom:"+U+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";-mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ba=document.createElement("div");ba.style.cssText="position:absolute;left:202px;top:8px;bottom:"+U+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";-1<this.defaultColorSchemes.length&&(m.appendChild(Y),m.appendChild(ba));mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));z(Y);z(ba);Z(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&m.appendChild(O)}return m}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};+StyleFormatPanel.prototype.addStyleOps=function(m){var z=this.editorUi.getSelectionState();1==z.cells.length?this.addActions(m,["copyStyle","pasteStyle"]):1<=z.cells.length&&this.addActions(m,["pasteStyle","pasteData"]);g.apply(this,arguments);return m};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(m,z,I,L){function N(ja,oa,ka,Ca,sa){if(null!=ka.valueChanged)ka.valueChanged(oa,sa);else{ba.getModel().beginUpdate();try{sa=[];var Fa=[];if(null!=ka.index){for(var xa=+[],Aa=ka.parentRow.nextSibling;Aa&&Aa.getAttribute("data-pName")==ja;)xa.push(Aa.getAttribute("data-pValue")),Aa=Aa.nextSibling;ka.index<xa.length?null!=Ca?xa.splice(Ca,1):xa[ka.index]=oa:xa.push(oa);null!=ka.size&&xa.length>ka.size&&(xa=xa.slice(0,ka.size));oa=xa.join(",");null!=ka.countProperty&&(ba.setCellStyles(ka.countProperty,xa.length,ba.getSelectionCells()),sa.push(ka.countProperty),Fa.push(xa.length))}ba.setCellStyles(ja,oa,ba.getSelectionCells());sa.push(ja);Fa.push(oa);if(null!=ka.dependentProps)for(ja=+0;ja<ka.dependentProps.length;ja++){var Da=ka.dependentPropsDefVal[ja],Ka=ka.dependentPropsVals[ja];if(Ka.length>oa)Ka=Ka.slice(0,oa);else for(var Ja=Ka.length;Ja<oa;Ja++)Ka.push(Da);Ka=Ka.join(",");ba.setCellStyles(ka.dependentProps[ja],Ka,ba.getSelectionCells());sa.push(ka.dependentProps[ja]);Fa.push(Ka)}if("function"==typeof ka.onChange)ka.onChange(ba,oa);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",Fa,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}}+function Q(ja,oa,ka){var Ca=mxUtils.getOffset(m,!0),sa=mxUtils.getOffset(ja,!0);oa.style.position="absolute";oa.style.left=sa.x-Ca.x+"px";oa.style.top=sa.y-Ca.y+"px";oa.style.width=ja.offsetWidth+"px";oa.style.height=ja.offsetHeight-(ka?4:0)+"px";oa.style.zIndex=5}function R(ja,oa,ka){function Ca(Fa){if(null==Fa||Fa==mxConstants.NONE)sa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==Fa)sa.style.background="";else{var xa=mxUtils.getLightDarkColor(Fa);mxUtils.isLightDarkColor(Fa)&&+xa.light!=xa.dark?sa.style.background="linear-gradient(to right bottom, "+xa.cssText+" 50%, "+mxUtils.invertLightDarkColor(xa).cssText+" 50.3%)":sa.style.background=Fa}}var sa=document.createElement("div");sa.style.width="32px";sa.style.height="8px";sa.style.margin="2px";sa.style.borderStyle="solid";sa.style.borderWidth="1px";Ca(oa);btn=mxUtils.button("",mxUtils.bind(Y,function(Fa){this.editorUi.pickColor(oa,function(xa){N(ja,xa,ka);Ca(xa)});mxEvent.consume(Fa)}));btn.style.height="18px";btn.style.width=+"40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(sa);return btn}function V(ja,oa,ka,Ca,sa,Fa,xa){null!=oa&&(oa=oa.split(","),da.push({name:ja,values:oa,type:ka,defVal:Ca,countProperty:sa,parentRow:Fa,isDeletable:!0,flipBkg:xa}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Aa){for(var Da=Fa,Ka=0;null!=Da.nextSibling;)if(Da.nextSibling.getAttribute("data-pName")==ja)Da=Da.nextSibling,Ka++;else break;var Ja={type:ka,parentRow:Fa,index:Ka,isDeletable:!0,+defVal:Ca,countProperty:sa};Ka=Z(ja,"",Ja,0==Ka%2,xa);N(ja,Ca,Ja);Da.parentNode.insertBefore(Ka,Da.nextSibling);mxEvent.consume(Aa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function W(ja,oa,ka,Ca,sa,Fa,xa){if(0<sa){var Aa=Array(sa);oa=null!=oa?oa.split(","):[];for(var Da=0;Da<sa;Da++)Aa[Da]=null!=oa[Da]?oa[Da]:null!=Ca?Ca:"";da.push({name:ja,values:Aa,type:ka,defVal:Ca,parentRow:Fa,flipBkg:xa,size:sa})}return document.createElement("div")}function X(ja,+oa,ka){var Ca=document.createElement("input");Ca.type="checkbox";Ca.checked="1"==oa;mxEvent.addListener(Ca,"change",function(){N(ja,Ca.checked?"1":"0",ka)});return Ca}function Z(ja,oa,ka,Ca,sa){var Fa=ka.dispName,xa=ka.type,Aa=document.createElement("tr");Aa.className="gePropRow"+(sa?"Dark":"")+(Ca?"Alt":"")+" gePropNonHeaderRow";Aa.setAttribute("data-pName",ja);Aa.setAttribute("data-pValue",oa);Ca=!1;null!=ka.index&&(Aa.setAttribute("data-index",ka.index),Fa=(null!=Fa?Fa:"")+"["+ka.index+"]",Ca=+!0);var Da=document.createElement("td");Da.className="gePropRowCell";Fa=mxResources.get(Fa,null,Fa);mxUtils.write(Da,Fa);Da.setAttribute("title",Fa);Ca&&(Da.style.textAlign="right");Aa.appendChild(Da);Da=document.createElement("td");Da.className="gePropRowCell";Da.setAttribute("title",null!=oa?oa:mxResources.get("none"));if("color"==xa)Da.appendChild(R(ja,oa,ka));else if("bool"==xa||"boolean"==xa)Da.appendChild(X(ja,oa,ka));else if("enum"==xa){var Ka=ka.enumList;for(sa=0;sa<Ka.length;sa++)if(Fa=Ka[sa],+Fa.val==oa){mxUtils.write(Da,mxResources.get(Fa.dispName,null,Fa.dispName));break}mxEvent.addListener(Da,"click",mxUtils.bind(Y,function(){var Ja=document.createElement("select"),Ea=null;Q(Da,Ja);for(var Ba=0;Ba<Ka.length;Ba++){var Ra=Ka[Ba],Sa=document.createElement("option");Sa.value=mxUtils.htmlEntities(Ra.val);mxUtils.write(Sa,mxResources.get(Ra.dispName,null,Ra.dispName));Ja.appendChild(Sa);null==Ra.val&&(Sa.value="null",Ea=Sa)}Ja.value=null==oa&&null!=Ea?"null":oa;m.appendChild(Ja);mxEvent.addListener(Ja,+"change",function(){var ab=mxUtils.htmlEntities(Ja.value);if(Ja[Ja.selectedIndex]==Ea||"null"==ab.value)ab=null;N(ja,ab,ka)});Ja.focus();mxEvent.addListener(Ja,"blur",function(){m.removeChild(Ja)})}))}else"dynamicArr"==xa?Da.appendChild(V(ja,oa,ka.subType,ka.subDefVal,ka.countProperty,Aa,sa)):"staticArr"==xa?Da.appendChild(W(ja,oa,ka.subType,ka.subDefVal,ka.size,Aa,sa)):"readOnly"==xa?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=oa,sa.style.borderWidth="0px","id"==ja?+(sa.style.width="190px",sa.style.position="relative",sa.style.right="6px",sa.style.float="right",sa.style.background="none",sa.style.textAlign="right",Aa.firstChild.setAttribute("colspan","2"),sa.setAttribute("title",oa),Aa.firstChild.appendChild(sa)):(sa.style.width="96px",Da.appendChild(sa))):(Da.innerHTML=mxUtils.htmlEntities(decodeURIComponent(oa)),mxEvent.addListener(Da,"click",mxUtils.bind(Y,function(){function Ja(){var Ba=Ea.value;Ba=0==Ba.length&&"string"!=xa&&"numbers"!=xa?0:Ba;ka.allowAuto&&+(null!=Ba.trim&&"auto"==Ba.trim().toLowerCase()?(Ba="auto",xa="string"):(Ba=parseFloat(Ba),Ba=isNaN(Ba)?0:Ba));null!=ka.min&&Ba<ka.min?Ba=ka.min:null!=ka.max&&Ba>ka.max&&(Ba=ka.max);var Ra=null;try{Ra="numbers"==xa?Ba.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==xa?parseInt(Ba):Ba)+"")}catch(Sa){}N(ja,Ra,ka,null,Ea)}var Ea=document.createElement("input");Q(Da,Ea,!0);Ea.value=decodeURIComponent(oa);Ea.className="gePropEditor";"int"!=xa&&"float"!=xa||ka.allowAuto||(Ea.type="number",+Ea.step="int"==xa?"1":"any",null!=ka.min&&(Ea.min=parseFloat(ka.min)),null!=ka.max&&(Ea.max=parseFloat(ka.max)));m.appendChild(Ea);mxEvent.addListener(Ea,"keypress",function(Ba){13==Ba.keyCode&&Ja()});Ea.focus();mxEvent.addListener(Ea,"blur",function(){Ja()})})));ka.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(Y,function(Ja){N(ja,"",ka,ka.index);mxEvent.consume(Ja)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",Da.appendChild(sa));Aa.appendChild(Da);+return Aa}var Y=this,ba=this.editorUi.editor.graph,da=[];m.style.position="relative";m.style.padding="0";var ca=document.createElement("table");ca.className="geProperties";ca.style.whiteSpace="nowrap";ca.style.width="100%";var ea=document.createElement("tr");ea.className="gePropHeader";var aa=document.createElement("th");aa.className="gePropHeaderCell";aa.style.paddingLeft="16px";aa.style.backgroundRepeat="no-repeat";aa.style.backgroundPosition="-2px 50%";aa.style.backgroundSize="20px";mxUtils.write(aa,+mxResources.get("property"));ea.style.cursor="pointer";var fa=function(){var ja=ca.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){aa.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var oa="none";for(var ka=m.childNodes.length-1;0<=ka;ka--)try{var Ca=m.childNodes[ka],sa=Ca.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||m.removeChild(Ca)}catch(Fa){}}else aa.style.backgroundImage="url('"+Editor.arrowDownImage+"')",oa="";for(ka=0;ka<ja.length;ka++)ja[ka].style.display=+oa};mxEvent.addListener(ea,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;fa()});ea.appendChild(aa);var ia=document.createElement("th");ia.className="gePropHeaderCell";ia.style.paddingLeft="4px";mxUtils.write(ia,mxResources.get("value"));ea.appendChild(ia);ca.appendChild(ea);var na=ia=!1;ea=null;1==I.vertices.length&&0==I.edges.length?ea=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(ea=I.edges[0].id);null==ea||L||ca.appendChild(Z("id",mxUtils.htmlEntities(ea),+{dispName:"id",type:"readOnly"},!0,!1));for(var pa in z)if(L=z[pa],"function"!=typeof L.isVisible||L.isVisible(I,this)){var ha=null!=L.getValue?L.getValue():null!=I.style[pa]?mxUtils.htmlEntities(I.style[pa]+""):null!=L.getDefaultValue?L.getDefaultValue(I,this):L.defVal;if("separator"==L.type)na=!na;else{if("staticArr"==L.type)L.size=parseInt(I.style[L.sizeProperty]||z[L.sizeProperty].defVal)||0;else if(null!=L.dependentProps){var wa=L.dependentProps,qa=[],ua=[];for(ea=0;ea<wa.length;ea++){var ya=+I.style[wa[ea]];ua.push(z[wa[ea]].subDefVal);qa.push(null!=ya?ya.split(","):[])}L.dependentPropsDefVal=ua;L.dependentPropsVals=qa}ca.appendChild(Z(pa,ha,L,ia,na));ia=!ia}}for(ea=0;ea<da.length;ea++)for(L=da[ea],z=L.parentRow,I=0;I<L.values.length;I++)pa=Z(L.name,L.values[I],{type:L.type,parentRow:L.parentRow,isDeletable:L.isDeletable,index:I,defVal:L.defVal,countProperty:L.countProperty,size:L.size},0==I%2,L.flipBkg),z.parentNode.insertBefore(pa,z.nextSibling),z=pa;m.appendChild(ca);fa();return m};+StyleFormatPanel.prototype.addStyles=function(m){if(null!=this.defaultColorSchemes){var z=function(da){mxEvent.addListener(da,"mouseenter",function(){da.style.opacity="1"});mxEvent.addListener(da,"mouseleave",function(){da.style.opacity="0.5"})},I=this.editorUi,L=I.editor.graph,N=document.createElement("div");N.style.whiteSpace="nowrap";N.style.paddingLeft="24px";N.style.paddingRight="20px";m.style.paddingLeft="16px";m.style.paddingBottom="6px";m.style.position="relative";m.appendChild(N);var Q=document.createElement("div");+Q.style.whiteSpace="nowrap";Q.style.position="relative";Q.style.textAlign="center";Q.style.width="210px";for(var R=[],V=0;V<this.defaultColorSchemes.length;V++){var W=document.createElement("div");W.style.display="inline-block";W.style.width="6px";W.style.height="6px";W.style.marginLeft="4px";W.style.marginRight="3px";W.style.borderRadius="3px";W.style.cursor="pointer";W.style.background="transparent";W.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(da){mxEvent.addListener(W,"click",+mxUtils.bind(this,function(){X(da)}))})(V);R.push(W);Q.appendChild(W)}var X=mxUtils.bind(this,function(da){null!=R[da]&&(null!=this.format.currentScheme&&null!=R[this.format.currentScheme]&&(R[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=da,Z(this.defaultColorSchemes[this.format.currentScheme]),R[this.format.currentScheme].style.background="#84d7ff")}),Z=mxUtils.bind(this,function(da){var ca=mxUtils.clone(L.defaultVertexStyle);ca[mxConstants.STYLE_STROKECOLOR]=+null!=ca[mxConstants.STYLE_STROKECOLOR]?ca[mxConstants.STYLE_STROKECOLOR]:"default";ca[mxConstants.STYLE_FILLCOLOR]=null!=ca[mxConstants.STYLE_FILLCOLOR]?ca[mxConstants.STYLE_FILLCOLOR]:"default";ca[mxConstants.STYLE_FONTCOLOR]=null!=ca[mxConstants.STYLE_FONTCOLOR]?ca[mxConstants.STYLE_FONTCOLOR]:"default";L.replaceDefaultColors(new mxCell,ca);var ea=mxUtils.bind(this,function(fa){var ia=mxUtils.button("",mxUtils.bind(this,function(ha){L.getModel().beginUpdate();try{for(var wa=I.getSelectionState().cells,+qa=0;qa<wa.length;qa++){var ua=L.getModel().getStyle(wa[qa]);null!=fa?(mxEvent.isShiftDown(ha)||(ua=""==fa.fill||null==fa.fill?mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,fa.fill),ua=""==fa.gradient||null==fa.gradient?mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,fa.gradient),mxEvent.isControlDown(ha)||mxClient.IS_MAC&&mxEvent.isMetaDown(ha)||!L.getModel().isVertex(wa[qa])||(ua=+""==fa.font||null==fa.font?mxUtils.setStyle(ua,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_FONTCOLOR,fa.font))),mxEvent.isAltDown(ha)||(ua=""==fa.stroke||null==fa.fill?mxUtils.setStyle(ua,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_STROKECOLOR,fa.stroke))):(ua=mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,null),ua=mxUtils.setStyle(ua,mxConstants.STYLE_STROKECOLOR,null),ua=mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,null),L.getModel().isVertex(wa[qa])&&+(ua=mxUtils.setStyle(ua,mxConstants.STYLE_FONTCOLOR,null)));L.getModel().setStyle(wa[qa],ua)}}finally{L.getModel().endUpdate()}}));ia.className="geStyleButton";ia.style.width="36px";ia.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ia.style.margin="0px 6px 6px 0px";if(null!=fa){var na="1px solid";null!=fa.border&&(na=fa.border);if(null!=fa.gradient)ia.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(fa.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(fa.gradient).cssText++" 100%)";else if(fa.fill==mxConstants.NONE)ia.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==fa.fill||""==fa.fill)ia.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var pa=mxUtils.getLightDarkColor(fa.fill);ia.style.backgroundImage="linear-gradient(to right bottom, "+pa.cssText+" 50%, "+pa.light+" 50.3%)"}null==fa.stroke||fa.stroke==mxConstants.NONE?ia.style.border=na+" transparent":""==fa.stroke?ia.style.border=+"1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(pa=mxUtils.getLightDarkColor(fa.stroke),ia.style.border=na+" "+pa.cssText,ia.style.borderRightColor=pa.light,ia.style.borderBottomColor=ia.style.borderRightColor);null!=fa.title&&ia.setAttribute("title",fa.title)}else na=mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff"),pa=mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000"),ia.style.backgroundColor=na,ia.style.border="1px solid "++pa;ia.style.borderRadius="0";N.appendChild(ia);null!=fa&&null!=fa.gradient&&(na=ia.cloneNode(!1),na.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(fa.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(fa.gradient).light+") 100%)",na.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",na.style.backgroundColor="transparent",N.appendChild(na),na.style.marginLeft="-42px",mxEvent.addListener(na,"click",function(){ia.click()}))});N.innerText=+"";if(null!=da)for(var aa=0;aa<da.length;aa++)0<aa&&0==mxUtils.mod(aa,4)&&mxUtils.br(N),ea(da[aa])});null==this.format.currentScheme?X(Math.min(R.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):X(this.format.currentScheme);V=10>=this.defaultColorSchemes.length?28:8;var Y=document.createElement("div");Y.style.cssText="position:absolute;left:10px;top:8px;bottom:"+V+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";+mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ba=document.createElement("div");ba.style.cssText="position:absolute;left:202px;top:8px;bottom:"+V+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";+1<this.defaultColorSchemes.length&&(m.appendChild(Y),m.appendChild(ba));mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));z(Y);z(ba);Z(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&m.appendChild(Q)}return m}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.isGoogleFontUrl=function(m){return m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||m.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(m){return Graph.isGoogleFontUrl(m)};Graph.rewriteGoogleFontUrl=function(m){null!=m&&m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(m=Editor.GOOGLE_FONTS_CSS2+m.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return m};Graph.createFontElement=function(m,z){var I=Graph.fontMapping[z];null==I&&Graph.isCssFontUrl(z)?(m=document.createElement("link"),m.setAttribute("rel","stylesheet"),m.setAttribute("type","text/css"),m.setAttribute("charset","UTF-8"),m.setAttribute("href",Graph.rewriteGoogleFontUrl(z))):(null==I&&(I='@font-face {\nfont-family: "'+m+'";\nsrc: url("'+z+'");\n}'),m=document.createElement("style"),mxUtils.write(m,I));return m};Graph.addRecentCustomFont=function(m,z){};Graph.addFont=function(m,z,I){if(null!=m&&0<m.length&&null!=z&&0<z.length){var L=m.toLowerCase();if("helvetica"!=L&&"arial"!=m&&"sans-serif"!=L){var N=Graph.customFontElements[L];null!=N&&N.url!=z&&(N.elt.parentNode.removeChild(N.elt),N=null);null==N?(N=z,"http:"==z.substring(0,5)&&(N=PROXY_URL+"?url="+encodeURIComponent(z)),N={name:m,url:z,elt:Graph.createFontElement(m,N)},Graph.customFontElements[L]=N,z=document.getElementsByTagName("head")[0],null!=I&&("link"==N.elt.nodeName.toLowerCase()?(N.elt.onload=I,N.elt.onerror=I):I()),null!=z&&z.appendChild(N.elt)):null!=I&&I()}else null!=I&&I()}else null!=I&&I();return m};Graph.getFontUrl=function(m,z){m=Graph.customFontElements[m.toLowerCase()];null!=m&&(z=m.url);return z};Graph.processFontAttributes=function(m){m=m.getElementsByTagName("*");for(var z=0;z<m.length;z++){var I=m[z].getAttribute("data-font-src");if(null!=I){var L="FONT"==m[z].nodeName?m[z].getAttribute("face"):m[z].style.fontFamily;null!=L&&Graph.addFont(L,I)}}};Graph.processFontStyle=function(m){if(null!=m){var z=mxUtils.getValue(m,"fontSource",null);if(null!=z){var I=mxUtils.getValue(m,mxConstants.STYLE_FONTFAMILY,null);if(null!=I)try{Graph.addFont(I,decodeURIComponent(z))}catch(L){}}}return m};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var k=Graph.prototype.init;Graph.prototype.init=function(){function m(N){z=N}k.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var z=null;mxEvent.addListener(this.container,"mouseenter",m);mxEvent.addListener(this.container,"mousemove",m);mxEvent.addListener(this.container,"mouseleave",function(N){z=null});this.isMouseInsertPoint=function(){return null!=-z};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=z?this.getPointForEvent(z):I.apply(this,arguments)};var L=this.layoutManager.getLayout;this.layoutManager.getLayout=function(N){var O=this.graph.getCellStyle(N);if(null!=O&&"rack"==O.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=O.rackUnitSize?parseFloat(O.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=O.marginLeft||0;S.marginRight=O.marginRight||0;S.marginTop=-O.marginTop||0;S.marginBottom=O.marginBottom||0;S.allowGaps=O.allowGaps||0;S.horizontal="1"==mxUtils.getValue(O,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return L.apply(this,arguments)};this.updateGlobalUrlVariables()};var v=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(m,z){return Graph.processFontStyle(v.apply(this,arguments))};var t=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(m,z,I,L,N,O,S,U,W,X,-Z,Y){t.apply(this,arguments);Graph.processFontAttributes(Y)};var x=mxText.prototype.redraw;mxText.prototype.redraw=function(){x.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(m,z,I,L){function N(){for(var fa=U.getSelectionCells(),aa=[],da=0;da<fa.length;da++)U.isCellVisible(fa[da])&&aa.push(fa[da]);U.setSelectionCells(aa)}function O(fa){U.setHiddenTags(fa?[]:W.slice());N();U.refresh()}function S(fa,-aa){Z.innerText="";if(0<fa.length){var da=document.createElement("table");da.setAttribute("cellpadding","2");da.style.boxSizing="border-box";da.style.tableLayout="fixed";da.style.width="100%";var ia=document.createElement("tbody");if(null!=fa&&0<fa.length)for(var pa=0;pa<fa.length;pa++)(function(oa){function ha(){var ma=U.getCellsForTags([oa],null,null,!0);U.isEnabled()?U.setSelectionCells(ma):U.highlightCells(ma,null,null,70)}var xa=0>mxUtils.indexOf(U.hiddenTags,oa),qa=document.createElement("tr"),-ua=document.createElement("td");ua.style.align="center";ua.style.width="16px";var ya=document.createElement("img");ya.setAttribute("src",xa?Editor.visibleImage:Editor.hiddenImage);ya.setAttribute("title",mxResources.get(xa?"hideIt":"show",[oa]));mxUtils.setOpacity(ya,xa?75:25);ya.className="geAdaptiveAsset";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.style.width="16px";if(z||Editor.isDarkMode())ya.style.filter="invert(100%)";ua.appendChild(ya);mxEvent.addListener(ya,"click",function(ma){mxEvent.isShiftDown(ma)?-O(0<=mxUtils.indexOf(U.hiddenTags,oa)):(U.toggleHiddenTag(oa),N(),U.refresh());mxEvent.consume(ma)});qa.appendChild(ua);ua=document.createElement("td");ua.style.align="center";ua.style.width="16px";ya=document.createElement("img");ya.setAttribute("src",Editor.selectImage);ya.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(ya,xa?75:25);ya.className="geAdaptiveAsset";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.style.width="16px";if(z||Editor.isDarkMode())ya.style.filter=-"invert(100%)";mxEvent.addListener(ya,"click",function(ma){O(!0);ha();mxEvent.consume(ma)});ua.appendChild(ya);qa.appendChild(ua);ua=document.createElement("td");ua.style.overflow="hidden";ua.style.whiteSpace="nowrap";ua.style.textOverflow="ellipsis";ua.style.verticalAlign="middle";ua.style.cursor="pointer";ua.setAttribute("title",oa);a=document.createElement("a");mxUtils.write(a,oa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,xa?100:40);ua.appendChild(a);mxEvent.addListener(ua,-"click",function(ma){if(mxEvent.isShiftDown(ma))O(!0),ha();else if(xa&&0<U.hiddenTags.length)O(!0);else{var ka=W.slice(),Ba=mxUtils.indexOf(ka,oa);ka.splice(Ba,1);U.setHiddenTags(ka);N();U.refresh()}mxEvent.consume(ma)});qa.appendChild(ua);if(U.isEnabled()){ua=document.createElement("td");ua.style.verticalAlign="middle";ua.style.textAlign="center";ua.style.width="18px";if(null==aa){ua.style.align="center";ua.style.width="16px";ya=document.createElement("img");ya.setAttribute("src",Editor.trashImage);-ya.setAttribute("title",mxResources.get("removeIt",[oa]));mxUtils.setOpacity(ya,xa?75:25);ya.className="geAdaptiveAsset";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.style.width="16px";if(z||Editor.isDarkMode())ya.style.filter="invert(100%)";mxEvent.addListener(ya,"click",function(ma){var ka=mxUtils.indexOf(W,oa);0<=ka&&W.splice(ka,1);U.removeTagsForCells(U.model.getDescendants(U.model.getRoot()),[oa]);U.refresh();mxEvent.consume(ma)});ua.appendChild(ya)}else{var ja=document.createElement("input");-ja.setAttribute("type","checkbox");ja.style.margin="0px";ja.defaultChecked=null!=aa&&0<=mxUtils.indexOf(aa,oa);ja.checked=ja.defaultChecked;ja.style.background="transparent";ja.setAttribute("title",mxResources.get(ja.defaultChecked?"removeIt":"add",[oa]));mxEvent.addListener(ja,"change",function(ma){ja.checked?U.addTagsForCells(U.getSelectionCells(),[oa]):U.removeTagsForCells(U.getSelectionCells(),[oa]);mxEvent.consume(ma)});ua.appendChild(ja)}qa.appendChild(ua)}ia.appendChild(qa)})(fa[pa]);da.appendChild(ia);-Z.appendChild(da)}}var U=this,W=U.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var Z=document.createElement("div");Z.style.position="absolute";Z.style.boxSizing="border-box";Z.style.userSelect="none";Z.style.overflow="auto";Z.style.padding="3px";Z.style.left="0px";Z.style.right="0px";Z.style.top="0px";Z.style.bottom="0px";X.appendChild(Z);U.addListener(mxEvent.ROOT,function(){W=U.hiddenTags.slice()});-var Y=mxUtils.bind(this,function(fa,aa){if(m()){fa=U.getAllTags();for(aa=0;aa<fa.length;aa++)0>mxUtils.indexOf(W,fa[aa])&&W.push(fa[aa]);W.sort();U.isSelectionEmpty()?S(W):S(W,U.getCommonTagsForCells(U.getSelectionCells()))}});U.selectionModel.addListener(mxEvent.CHANGE,Y);U.model.addListener(mxEvent.CHANGE,Y);U.addListener(mxEvent.REFRESH,Y);var ba=document.createElement("div");ba.className="geToolbarContainer";ba.style.position="absolute";ba.style.display="flex";ba.style.bottom="0px";ba.style.left=-"0px";ba.style.right="0px";ba.style.height="26px";ba.style.overflow="hidden";ba.style.padding="3px 4px 4px 4px";ba.style.borderWidth="1px 0px 0px 0px";ba.style.borderStyle="solid";ba.style.whiteSpace="nowrap";if(U.isEnabled()){Z.style.bottom="34px";var ea=document.createElement("a");ea.className="geToolbarButton geAdaptiveAsset geToggleItem";ea.style.width="16px";ea.style.height="18px";ea.style.backgroundPosition="center center";ea.style.backgroundRepeat="no-repeat";ea.style.backgroundSize="20px";-ea.style.margin="0 2px";ea.style.display="inline-block";ea.style.cursor="pointer";var ca=ea.cloneNode(!1);ca.style.backgroundImage="url("+Editor.visibleImage+")";ca.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(ca,"click",function(fa){U.setHiddenTags([]);mxEvent.isShiftDown(fa)||(W=U.hiddenTags.slice());N();U.refresh();mxEvent.consume(fa)});ba.appendChild(ca);null!=I&&(ea=ea.cloneNode(!1),ea.style.backgroundImage="url("+Editor.plusImage+")",ea.setAttribute("title",mxResources.get("add")),-mxEvent.addListener(ea,"click",function(fa){I(W,function(aa){W=aa;Y()});mxEvent.consume(fa)}),ba.appendChild(ea));X.appendChild(ba)}null!=L&&ba.appendChild(L);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var m=this.extFonts;m=null!=m?m.slice():[];for(var z in Graph.customFontElements){var I=Graph.customFontElements[z];m.push({name:I.name,url:I.url})}return m};Graph.prototype.setFont=function(m,z){Graph.addFont(m,z);var I=Editor.guid();document.execCommand("fontname",!1,I);for(var L=-this.cellEditor.textarea.getElementsByTagName("font"),N=!1,O=0;O<L.length;O++)L[O].getAttribute("face")==I&&(N=!0,L[O].setAttribute("face",m),null!=z?L[O].setAttribute("data-font-src",z):L[O].removeAttribute("data-font-src"));N||document.execCommand("fontname",!1,m)};var A=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return A.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;+z};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=z?this.getPointForEvent(z):I.apply(this,arguments)};var L=this.layoutManager.getLayout;this.layoutManager.getLayout=function(N){var Q=this.graph.getCellStyle(N);if(null!=Q&&"rack"==Q.childLayout){var R=new mxStackLayout(this.graph,!1);R.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;R.marginLeft=Q.marginLeft||0;R.marginRight=Q.marginRight||0;R.marginTop=+Q.marginTop||0;R.marginBottom=Q.marginBottom||0;R.allowGaps=Q.allowGaps||0;R.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");R.resizeParent=!1;R.fill=!0;return R}return L.apply(this,arguments)};this.updateGlobalUrlVariables()};var u=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(m,z){return Graph.processFontStyle(u.apply(this,arguments))};var t=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(m,z,I,L,N,Q,R,V,W,X,+Z,Y){t.apply(this,arguments);Graph.processFontAttributes(Y)};var x=mxText.prototype.redraw;mxText.prototype.redraw=function(){x.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(m,z,I,L){function N(){for(var ea=V.getSelectionCells(),aa=[],fa=0;fa<ea.length;fa++)V.isCellVisible(ea[fa])&&aa.push(ea[fa]);V.setSelectionCells(aa)}function Q(ea){V.setHiddenTags(ea?[]:W.slice());N();V.refresh()}function R(ea,+aa){Z.innerText="";if(0<ea.length){var fa=document.createElement("table");fa.setAttribute("cellpadding","2");fa.style.boxSizing="border-box";fa.style.tableLayout="fixed";fa.style.width="100%";var ia=document.createElement("tbody");if(null!=ea&&0<ea.length)for(var na=0;na<ea.length;na++)(function(pa){function ha(){var oa=V.getCellsForTags([pa],null,null,!0);V.isEnabled()?V.setSelectionCells(oa):V.highlightCells(oa,null,null,70)}var wa=0>mxUtils.indexOf(V.hiddenTags,pa),qa=document.createElement("tr"),+ua=document.createElement("td");ua.style.align="center";ua.style.width="16px";var ya=document.createElement("img");ya.setAttribute("src",wa?Editor.visibleImage:Editor.hiddenImage);ya.setAttribute("title",mxResources.get(wa?"hideIt":"show",[pa]));mxUtils.setOpacity(ya,wa?75:25);ya.className="geAdaptiveAsset";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.style.width="16px";if(z||Editor.isDarkMode())ya.style.filter="invert(100%)";ua.appendChild(ya);mxEvent.addListener(ya,"click",function(oa){mxEvent.isShiftDown(oa)?+Q(0<=mxUtils.indexOf(V.hiddenTags,pa)):(V.toggleHiddenTag(pa),N(),V.refresh());mxEvent.consume(oa)});qa.appendChild(ua);ua=document.createElement("td");ua.style.align="center";ua.style.width="16px";ya=document.createElement("img");ya.setAttribute("src",Editor.selectImage);ya.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(ya,wa?75:25);ya.className="geAdaptiveAsset";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.style.width="16px";if(z||Editor.isDarkMode())ya.style.filter=+"invert(100%)";mxEvent.addListener(ya,"click",function(oa){Q(!0);ha();mxEvent.consume(oa)});ua.appendChild(ya);qa.appendChild(ua);ua=document.createElement("td");ua.style.overflow="hidden";ua.style.whiteSpace="nowrap";ua.style.textOverflow="ellipsis";ua.style.verticalAlign="middle";ua.style.cursor="pointer";ua.setAttribute("title",pa);a=document.createElement("a");mxUtils.write(a,pa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,wa?100:40);ua.appendChild(a);mxEvent.addListener(ua,+"click",function(oa){if(mxEvent.isShiftDown(oa))Q(!0),ha();else if(wa&&0<V.hiddenTags.length)Q(!0);else{var ka=W.slice(),Ca=mxUtils.indexOf(ka,pa);ka.splice(Ca,1);V.setHiddenTags(ka);N();V.refresh()}mxEvent.consume(oa)});qa.appendChild(ua);if(V.isEnabled()){ua=document.createElement("td");ua.style.verticalAlign="middle";ua.style.textAlign="center";ua.style.width="18px";if(null==aa){ua.style.align="center";ua.style.width="16px";ya=document.createElement("img");ya.setAttribute("src",Editor.trashImage);+ya.setAttribute("title",mxResources.get("removeIt",[pa]));mxUtils.setOpacity(ya,wa?75:25);ya.className="geAdaptiveAsset";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.style.width="16px";if(z||Editor.isDarkMode())ya.style.filter="invert(100%)";mxEvent.addListener(ya,"click",function(oa){var ka=mxUtils.indexOf(W,pa);0<=ka&&W.splice(ka,1);V.removeTagsForCells(V.model.getDescendants(V.model.getRoot()),[pa]);V.refresh();mxEvent.consume(oa)});ua.appendChild(ya)}else{var ja=document.createElement("input");+ja.setAttribute("type","checkbox");ja.style.margin="0px";ja.defaultChecked=null!=aa&&0<=mxUtils.indexOf(aa,pa);ja.checked=ja.defaultChecked;ja.style.background="transparent";ja.setAttribute("title",mxResources.get(ja.defaultChecked?"removeIt":"add",[pa]));mxEvent.addListener(ja,"change",function(oa){ja.checked?V.addTagsForCells(V.getSelectionCells(),[pa]):V.removeTagsForCells(V.getSelectionCells(),[pa]);mxEvent.consume(oa)});ua.appendChild(ja)}qa.appendChild(ua)}ia.appendChild(qa)})(ea[na]);fa.appendChild(ia);+Z.appendChild(fa)}}var V=this,W=V.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var Z=document.createElement("div");Z.style.position="absolute";Z.style.boxSizing="border-box";Z.style.userSelect="none";Z.style.overflow="auto";Z.style.padding="3px";Z.style.left="0px";Z.style.right="0px";Z.style.top="0px";Z.style.bottom="0px";X.appendChild(Z);V.addListener(mxEvent.ROOT,function(){W=V.hiddenTags.slice()});+var Y=mxUtils.bind(this,function(ea,aa){if(m()){ea=V.getAllTags();for(aa=0;aa<ea.length;aa++)0>mxUtils.indexOf(W,ea[aa])&&W.push(ea[aa]);W.sort();V.isSelectionEmpty()?R(W):R(W,V.getCommonTagsForCells(V.getSelectionCells()))}});V.selectionModel.addListener(mxEvent.CHANGE,Y);V.model.addListener(mxEvent.CHANGE,Y);V.addListener(mxEvent.REFRESH,Y);var ba=document.createElement("div");ba.className="geToolbarContainer";ba.style.position="absolute";ba.style.display="flex";ba.style.bottom="0px";ba.style.left=+"0px";ba.style.right="0px";ba.style.height="26px";ba.style.overflow="hidden";ba.style.padding="3px 4px 4px 4px";ba.style.borderWidth="1px 0px 0px 0px";ba.style.borderStyle="solid";ba.style.whiteSpace="nowrap";if(V.isEnabled()){Z.style.bottom="34px";var da=document.createElement("a");da.className="geToolbarButton geAdaptiveAsset geToggleItem";da.style.width="16px";da.style.height="18px";da.style.backgroundPosition="center center";da.style.backgroundRepeat="no-repeat";da.style.backgroundSize="20px";+da.style.margin="0 2px";da.style.display="inline-block";da.style.cursor="pointer";var ca=da.cloneNode(!1);ca.style.backgroundImage="url("+Editor.visibleImage+")";ca.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(ca,"click",function(ea){V.setHiddenTags([]);mxEvent.isShiftDown(ea)||(W=V.hiddenTags.slice());N();V.refresh();mxEvent.consume(ea)});ba.appendChild(ca);null!=I&&(da=da.cloneNode(!1),da.style.backgroundImage="url("+Editor.plusImage+")",da.setAttribute("title",mxResources.get("add")),+mxEvent.addListener(da,"click",function(ea){I(W,function(aa){W=aa;Y()});mxEvent.consume(ea)}),ba.appendChild(da));X.appendChild(ba)}null!=L&&ba.appendChild(L);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var m=this.extFonts;m=null!=m?m.slice():[];for(var z in Graph.customFontElements){var I=Graph.customFontElements[z];m.push({name:I.name,url:I.url})}return m};Graph.prototype.setFont=function(m,z){Graph.addFont(m,z);var I=Editor.guid();document.execCommand("fontname",!1,I);for(var L=+this.cellEditor.textarea.getElementsByTagName("font"),N=!1,Q=0;Q<L.length;Q++)L[Q].getAttribute("face")==I&&(N=!0,L[Q].setAttribute("face",m),null!=z?L[Q].setAttribute("data-font-src",z):L[Q].removeAttribute("data-font-src"));N||document.execCommand("fontname",!1,m)};var A=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return A.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 m=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=m)for(var z in m)this.globalVars[z]=m[z]}catch(I){null!=window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var J=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(m){var z=J.apply(this,arguments);-null==z&&null!=this.globalVars&&(z=this.globalVars[m]);return z};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var m=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(m.ownerDocument)).decode(m)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var D=Graph.prototype.getSvg;Graph.prototype.getSvg=function(m,z,I,L,N,O,S,U,W,X,Z,Y,ba,ea,ca,fa){var aa=D.apply(this,arguments);if(null!=Y){var da=aa.getAttribute("style");-null==da&&(da="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;aa.setAttribute("style",da+(" color-scheme: "+Y+";"))}var ia=this.getCustomFonts();if(Z&&0<ia.length){var pa=aa.ownerDocument;da=null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"style"):pa.createElement("style");null!=pa.setAttributeNS?da.setAttributeNS("type","text/css"):da.setAttribute("type","text/css");for(var oa="",ha="",xa=0;xa<ia.length;xa++){var qa=ia[xa].name,-ua=ia[xa].url;Graph.isCssFontUrl(ua)?oa+="@import url("+Graph.rewriteGoogleFontUrl(ua)+");\n":ha+='@font-face {\nfont-family: "'+qa+'";\nsrc: url("'+ua+'");\n}\n'}da.appendChild(pa.createTextNode(oa+ha));aa.getElementsByTagName("defs")[0].appendChild(da)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(aa);this.mathEnabled&&(document.body.appendChild(aa),Editor.MathJaxRender(aa),aa.parentNode.removeChild(aa),da=aa.ownerDocument.getElementById("MJX-SVG-styles"),-null!=da&&aa.getElementsByTagName("defs")[0].appendChild(da.cloneNode(!0)));return aa};var G=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(m){G.apply(this,arguments);null!=m.secondLabel&&(m.secondLabel.destroy(),m.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(m){return[m.shape,m.text,m.secondLabel,m.control]};var R=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){R.apply(this,arguments);this.enumerationState=-0};var V=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(m){null!=m.shape&&this.redrawEnumerationState(m);return V.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(m){m=decodeURIComponent(mxUtils.getValue(m.style,"enumerateValue",""));""==m&&(m=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(m)+"</div>"};mxGraphView.prototype.redrawEnumerationState=+null==z&&null!=this.globalVars&&(z=this.globalVars[m]);return z};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var m=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(m.ownerDocument)).decode(m)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var D=Graph.prototype.getSvg;Graph.prototype.getSvg=function(m,z,I,L,N,Q,R,V,W,X,Z,Y,ba,da,ca,ea){var aa=D.apply(this,arguments);if(null!=Y){var fa=aa.getAttribute("style");+null==fa&&(fa="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;aa.setAttribute("style",fa+(" color-scheme: "+Y+";"))}var ia=this.getCustomFonts();if(Z&&0<ia.length){var na=aa.ownerDocument;fa=null!=na.createElementNS?na.createElementNS(mxConstants.NS_SVG,"style"):na.createElement("style");null!=na.setAttributeNS?fa.setAttributeNS("type","text/css"):fa.setAttribute("type","text/css");for(var pa="",ha="",wa=0;wa<ia.length;wa++){var qa=ia[wa].name,+ua=ia[wa].url;Graph.isCssFontUrl(ua)?pa+="@import url("+Graph.rewriteGoogleFontUrl(ua)+");\n":ha+='@font-face {\nfont-family: "'+qa+'";\nsrc: url("'+ua+'");\n}\n'}fa.appendChild(na.createTextNode(pa+ha));aa.getElementsByTagName("defs")[0].appendChild(fa)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(aa);this.mathEnabled&&(document.body.appendChild(aa),Editor.MathJaxRender(aa),aa.parentNode.removeChild(aa),fa=aa.ownerDocument.getElementById("MJX-SVG-styles"),+null!=fa&&aa.getElementsByTagName("defs")[0].appendChild(fa.cloneNode(!0)));return aa};var G=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(m){G.apply(this,arguments);null!=m.secondLabel&&(m.secondLabel.destroy(),m.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(m){return[m.shape,m.text,m.secondLabel,m.control]};var S=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){S.apply(this,arguments);this.enumerationState=+0};var U=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(m){null!=m.shape&&this.redrawEnumerationState(m);return U.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(m){m=decodeURIComponent(mxUtils.getValue(m.style,"enumerateValue",""));""==m&&(m=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(m)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(m){var z="1"==mxUtils.getValue(m.style,"enumerate",0);z&&null==m.secondLabel?(m.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),m.secondLabel.size=12,m.secondLabel.state=m,m.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(m,m.secondLabel)):z||null==m.secondLabel||(m.secondLabel.destroy(),m.secondLabel=null);z=m.secondLabel;if(null!=z){var I=m.view.scale,L=this.createEnumerationValue(m);m=this.graph.model.isVertex(m.cell)?-new mxRectangle(m.x+m.width-4*I,m.y+4*I,0,0):mxRectangle.fromPoint(m.view.getPoint(m));z.bounds.equals(m)&&z.value==L&&z.scale==I||(z.bounds=m,z.value=L,z.scale=I,z.redraw())}};var Q=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();Q.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var P=-Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){P.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(m,z){"data:action/json,"==m.substring(0,17)&&(m=JSON.parse(m.substring(17)),null!=m.actions&&this.executeCustomActions(m.actions,null,z))};Graph.prototype.executeCustomActions=function(m,z,I){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),-null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var L=!1,N=0,O=0,S=mxUtils.bind(this,function(){L||(L=!0,this.model.beginUpdate())}),U=mxUtils.bind(this,function(){L&&(L=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<N&&N--;0==N&&X()}),X=mxUtils.bind(this,function(){if(O<m.length){var Z=this.stoppingCustomActions,Y=m[O++],ba=[];if(null!=Y.open)if(U(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,-I))return}else this.openLink(Y.open);null==Y.wait||Z||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;W()}),N++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=Y.wait?parseInt(Y.wait):1E3),U());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(N++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,-!0)),0,1,W,Z?0:Y.fadeIn.delay));null!=Y.fadeOut&&(N++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,W,Z?0:Y.fadeOut.delay));null!=Y.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,!0),!0)));null!=Y.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(S(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){S();var ea=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ea),-1);this.setCellsVisible(ea,!0)}null!=Y.hide&&(S(),ea=this.getCellsForAction(Y.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ea),0),this.setCellsVisible(ea,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&&(S(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&null!=Y.style.key&&(S(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));ea=[];null!=-Y.select&&this.isEnabled()&&(ea=this.getCellsForAction(Y.select),this.setSelectionCells(ea));null!=Y.highlight&&(ea=this.getCellsForAction(Y.highlight),this.highlightCells(ea,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity));null!=Y.scroll&&(ea=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<ea.length&&this.scrollCellToVisible(ea[0]);null!=I&&null!=Y.explore&&Graph.exploreFromCell(this,I,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var ca=-Y.tags.toggle;0==ca.length&&(ca=this.getAllTags());for(ea=0;ea<ca.length;ea++)this.toggleHiddenTag(ca[ea])}ca=null;null!=Y.tags.hidden&&(null==ca&&(ca=[]),ca=ca.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==ca&&(ca=[]);var fa=this.getAllTags();for(ea=0;ea<fa.length;ea++)0>mxUtils.indexOf(Y.tags.visible,fa[ea])&&0>mxUtils.indexOf(ca,fa[ea])&&ca.push(fa[ea])}null!=ca&&this.setHiddenTags(ca);this.refresh()}0<ba.length&&(N++,this.executeAnimations(ba,W,Z?1:Y.steps,Z?0:Y.delay));0==N?X():U()}else this.stoppingCustomActions=-this.executingCustomActions=!1,U(),null!=z&&z()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(m,z){var I=this.getLinkForCell(z);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(z,this.updateCustomLink(m,I));if(this.isHtmlLabel(z)){var L=document.createElement("div");L.innerHTML=Graph.sanitizeHtml(this.getLabel(z));for(var N=L.getElementsByTagName("a"),O=!1,S=0;S<N.length;S++)I=N[S].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(N[S].setAttribute("href",-this.updateCustomLink(m,I)),O=!0);O&&this.labelChanged(z,L.innerHTML)}};Graph.prototype.updateCustomLink=function(m,z){if("data:action/json,"==z.substring(0,17))try{var I=JSON.parse(z.substring(17));null!=I.actions&&(this.updateCustomLinkActions(m,I.actions),z="data:action/json,"+JSON.stringify(I))}catch(L){}return z};Graph.prototype.updateCustomLinkActions=function(m,z){for(var I=0;I<z.length;I++){var L=z[I],N;for(N in L)this.updateCustomLinkAction(m,L[N],"cells"),this.updateCustomLinkAction(m,L[N],-"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(m,z,I){if(null!=z&&null!=z[I]){for(var L=[],N=0;N<z[I].length;N++)if("*"==z[I][N])L.push(z[I][N]);else{var O=m[z[I][N]];null!=O?""!=O&&L.push(O):L.push(z[I][N])}z[I]=L}};Graph.prototype.getCellsForAction=function(m,z){z=this.getCellsById(m.cells).concat(this.getCellsForTags(m.tags,null,z));if(null!=m.excludeCells){for(var I=[],L=0;L<z.length;L++)0>m.excludeCells.indexOf(z[L].id)&&I.push(z[L]);z=I}return z};Graph.prototype.getCellsById=-function(m){var z=[];if(null!=m)for(var I=0;I<m.length;I++)if("*"==m[I]){var L=this.model.getRoot();z=z.concat(this.model.filterDescendants(function(O){return O!=L},L))}else{var N=this.model.getCell(m[I]);null!=N&&z.push(N)}return z};var q=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(m){return q.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(m))};Graph.prototype.setHiddenTags=function(m){this.hiddenTags=m;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};+new mxRectangle(m.x+m.width-4*I,m.y+4*I,0,0):mxRectangle.fromPoint(m.view.getPoint(m));z.bounds.equals(m)&&z.value==L&&z.scale==I||(z.bounds=m,z.value=L,z.scale=I,z.redraw())}};var P=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();P.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var O=+Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){O.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(m,z){"data:action/json,"==m.substring(0,17)&&(m=JSON.parse(m.substring(17)),null!=m.actions&&this.executeCustomActions(m.actions,null,z))};Graph.prototype.executeCustomActions=function(m,z,I){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),+null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var L=!1,N=0,Q=0,R=mxUtils.bind(this,function(){L||(L=!0,this.model.beginUpdate())}),V=mxUtils.bind(this,function(){L&&(L=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<N&&N--;0==N&&X()}),X=mxUtils.bind(this,function(){if(Q<m.length){var Z=this.stoppingCustomActions,Y=m[Q++],ba=[];if(null!=Y.open)if(V(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,+I))return}else this.openLink(Y.open);null==Y.wait||Z||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;W()}),N++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=Y.wait?parseInt(Y.wait):1E3),V());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(N++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,+!0)),0,1,W,Z?0:Y.fadeIn.delay));null!=Y.fadeOut&&(N++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,W,Z?0:Y.fadeOut.delay));null!=Y.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,!0),!0)));null!=Y.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(R(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){R();var da=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(da),+1);this.setCellsVisible(da,!0)}null!=Y.hide&&(R(),da=this.getCellsForAction(Y.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(da),0),this.setCellsVisible(da,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&&(R(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&null!=Y.style.key&&(R(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));da=[];null!=+Y.select&&this.isEnabled()&&(da=this.getCellsForAction(Y.select),this.setSelectionCells(da));null!=Y.highlight&&(da=this.getCellsForAction(Y.highlight),this.highlightCells(da,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity));null!=Y.scroll&&(da=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<da.length&&this.scrollCellToVisible(da[0]);null!=I&&null!=Y.explore&&Graph.exploreFromCell(this,I,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var ca=+Y.tags.toggle;0==ca.length&&(ca=this.getAllTags());for(da=0;da<ca.length;da++)this.toggleHiddenTag(ca[da])}ca=null;null!=Y.tags.hidden&&(null==ca&&(ca=[]),ca=ca.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==ca&&(ca=[]);var ea=this.getAllTags();for(da=0;da<ea.length;da++)0>mxUtils.indexOf(Y.tags.visible,ea[da])&&0>mxUtils.indexOf(ca,ea[da])&&ca.push(ea[da])}null!=ca&&this.setHiddenTags(ca);this.refresh()}0<ba.length&&(N++,this.executeAnimations(ba,W,Z?1:Y.steps,Z?0:Y.delay));0==N?X():V()}else this.stoppingCustomActions=+this.executingCustomActions=!1,V(),null!=z&&z()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(m,z){var I=this.getLinkForCell(z);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(z,this.updateCustomLink(m,I));if(this.isHtmlLabel(z)){var L=document.createElement("div");L.innerHTML=Graph.sanitizeHtml(this.getLabel(z));for(var N=L.getElementsByTagName("a"),Q=!1,R=0;R<N.length;R++)I=N[R].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(N[R].setAttribute("href",+this.updateCustomLink(m,I)),Q=!0);Q&&this.labelChanged(z,L.innerHTML)}};Graph.prototype.updateCustomLink=function(m,z){if("data:action/json,"==z.substring(0,17))try{var I=JSON.parse(z.substring(17));null!=I.actions&&(this.updateCustomLinkActions(m,I.actions),z="data:action/json,"+JSON.stringify(I))}catch(L){}return z};Graph.prototype.updateCustomLinkActions=function(m,z){for(var I=0;I<z.length;I++){var L=z[I],N;for(N in L)this.updateCustomLinkAction(m,L[N],"cells"),this.updateCustomLinkAction(m,L[N],+"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(m,z,I){if(null!=z&&null!=z[I]){for(var L=[],N=0;N<z[I].length;N++)if("*"==z[I][N])L.push(z[I][N]);else{var Q=m[z[I][N]];null!=Q?""!=Q&&L.push(Q):L.push(z[I][N])}z[I]=L}};Graph.prototype.getCellsForAction=function(m,z){z=this.getCellsById(m.cells).concat(this.getCellsForTags(m.tags,null,z));if(null!=m.excludeCells){for(var I=[],L=0;L<z.length;L++)0>m.excludeCells.indexOf(z[L].id)&&I.push(z[L]);z=I}return z};Graph.prototype.getCellsById=+function(m){var z=[];if(null!=m)for(var I=0;I<m.length;I++)if("*"==m[I]){var L=this.model.getRoot();z=z.concat(this.model.filterDescendants(function(Q){return Q!=L},L))}else{var N=this.model.getCell(m[I]);null!=N&&z.push(N)}return z};var q=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(m){return q.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(m))};Graph.prototype.setHiddenTags=function(m){this.hiddenTags=m;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(m){var z=mxUtils.indexOf(this.hiddenTags,m);0>z?this.hiddenTags.push(m):0<=z&&this.hiddenTags.splice(z,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(m){if(null==m||0==m.length||0==this.hiddenTags.length)return!1;m=m.split(" ");if(m.length>this.hiddenTags.length)return!1;for(var z=0;z<m.length;z++)if(0>mxUtils.indexOf(this.hiddenTags,m[z]))return!1;return!0};Graph.prototype.getCellsForTags=function(m,z,I,-L){var N=[];if(null!=m){z=null!=z?z:this.model.getDescendants(this.model.getRoot());for(var O=0,S={},U=0;U<m.length;U++)0<m[U].length&&(S[m[U]]=!0,O++);for(U=0;U<z.length;U++)if(I&&this.model.getParent(z[U])==this.model.root||this.model.isVertex(z[U])||this.model.isEdge(z[U])){var W=this.getTagsForCell(z[U]),X=!1;if(0<W.length&&(W=W.split(" "),W.length>=m.length)){for(var Z=X=0;Z<W.length&&X<O;Z++)null!=S[W[Z]]&&X++;X=X==O}X&&(1!=L||this.isCellVisible(z[U]))&&N.push(z[U])}}return N};Graph.prototype.getAllTags=-function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(m){for(var z=null,I=[],L=0;L<m.length;L++){var N=this.getTagsForCell(m[L]);I=[];if(0<N.length){N=N.split(" ");for(var O={},S=0;S<N.length;S++)if(null==z||null!=z[N[S]])O[N[S]]=!0,I.push(N[S]);z=O}else return[]}return I};Graph.prototype.getTagsForCells=function(m){for(var z=[],I={},L=0;L<m.length;L++){var N=this.getTagsForCell(m[L]);if(0<N.length){N=N.split(" ");for(var O=-0;O<N.length;O++)null==I[N[O]]&&(I[N[O]]=!0,z.push(N[O]))}}return z};Graph.prototype.getTagsForCell=function(m){return this.getAttributeForCell(m,"tags","")};Graph.prototype.addTagsForCells=function(m,z){if(0<m.length&&0<z.length){this.model.beginUpdate();try{for(var I=0;I<m.length;I++){for(var L=this.getTagsForCell(m[I]),N=L.split(" "),O=!1,S=0;S<z.length;S++){var U=mxUtils.trim(z[S]);""!=U&&0>mxUtils.indexOf(N,U)&&(L=0<L.length?L+" "+U:U,O=!0)}O&&this.setAttributeForCell(m[I],"tags",L)}}finally{this.model.endUpdate()}}};-Graph.prototype.removeTagsForCells=function(m,z){if(0<m.length&&0<z.length){this.model.beginUpdate();try{for(var I=0;I<m.length;I++){var L=this.getTagsForCell(m[I]);if(0<L.length){for(var N=L.split(" "),O=!1,S=0;S<z.length;S++){var U=mxUtils.indexOf(N,z[S]);0<=U&&(N.splice(U,1),O=!0)}O&&this.setAttributeForCell(m[I],"tags",N.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(m){this.model.beginUpdate();try{for(var z=0;z<m.length;z++)this.model.setVisible(m[z],!this.model.isVisible(m[z]))}finally{this.model.endUpdate()}};-Graph.prototype.setCellsVisible=function(m,z){this.model.beginUpdate();try{for(var I=0;I<m.length;I++)this.model.setVisible(m[I],z)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(m,z,I,L){for(var N=0;N<m.length;N++)this.highlightCell(m[N],z,I,L)};Graph.prototype.highlightCell=function(m,z,I,L,N){z=null!=z?z:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;m=this.view.getState(m);var O=null;null!=m&&(N=null!=N?N:4,N=Math.max(N+1,mxUtils.getValue(m.style,mxConstants.STYLE_STROKEWIDTH,-1)+N),O=new mxCellHighlight(this,z,N,!1),null!=L&&(O.opacity=L),O.highlight(m),window.setTimeout(function(){null!=O.shape&&(mxUtils.setPrefixedStyle(O.shape.node.style,"transition","all 1200ms ease-in-out"),O.shape.node.style.opacity=0);window.setTimeout(function(){O.destroy()},1200)},I));return O};Graph.prototype.addSvgShadow=function(m,z,I,L){I=null!=I?I:!1;L=null!=L?L:!0;var N=m.ownerDocument,O=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"filter"):N.createElement("filter");O.setAttribute("id",-this.shadowId);var S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):N.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");O.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feOffset"):N.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result",-"offsetBlur");O.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feFlood"):N.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");O.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feComposite"):N.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");-S.setAttribute("result","offsetBlur");O.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feBlend"):N.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");O.appendChild(S);S=m.getElementsByTagName("defs");0==S.length?(N=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"defs"):N.createElement("defs"),null!=m.firstChild?m.insertBefore(N,m.firstChild):m.appendChild(N)):N=S[0];N.appendChild(O);I||(z=null!=z?z:m.getElementsByTagName("g")[0],-null!=z&&(z.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(m.getAttribute("width")))&&L&&(m.setAttribute("width",parseInt(m.getAttribute("width"))+6),m.setAttribute("height",parseInt(m.getAttribute("height"))+6),z=m.getAttribute("viewBox"),null!=z&&0<z.length&&(z=z.split(" "),3<z.length&&(w=parseFloat(z[2])+6,h=parseFloat(z[3])+6,m.setAttribute("viewBox",z[0]+" "+z[1]+" "+w+" "+h))))));return O};Graph.prototype.setShadowVisible=function(m,z){mxClient.IS_SVG&&!mxClient.IS_SF&&(z=+L){var N=[];if(null!=m){z=null!=z?z:this.model.getDescendants(this.model.getRoot());for(var Q=0,R={},V=0;V<m.length;V++)0<m[V].length&&(R[m[V]]=!0,Q++);for(V=0;V<z.length;V++)if(I&&this.model.getParent(z[V])==this.model.root||this.model.isVertex(z[V])||this.model.isEdge(z[V])){var W=this.getTagsForCell(z[V]),X=!1;if(0<W.length&&(W=W.split(" "),W.length>=m.length)){for(var Z=X=0;Z<W.length&&X<Q;Z++)null!=R[W[Z]]&&X++;X=X==Q}X&&(1!=L||this.isCellVisible(z[V]))&&N.push(z[V])}}return N};Graph.prototype.getAllTags=+function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(m){for(var z=null,I=[],L=0;L<m.length;L++){var N=this.getTagsForCell(m[L]);I=[];if(0<N.length){N=N.split(" ");for(var Q={},R=0;R<N.length;R++)if(null==z||null!=z[N[R]])Q[N[R]]=!0,I.push(N[R]);z=Q}else return[]}return I};Graph.prototype.getTagsForCells=function(m){for(var z=[],I={},L=0;L<m.length;L++){var N=this.getTagsForCell(m[L]);if(0<N.length){N=N.split(" ");for(var Q=+0;Q<N.length;Q++)null==I[N[Q]]&&(I[N[Q]]=!0,z.push(N[Q]))}}return z};Graph.prototype.getTagsForCell=function(m){return this.getAttributeForCell(m,"tags","")};Graph.prototype.addTagsForCells=function(m,z){if(0<m.length&&0<z.length){this.model.beginUpdate();try{for(var I=0;I<m.length;I++){for(var L=this.getTagsForCell(m[I]),N=L.split(" "),Q=!1,R=0;R<z.length;R++){var V=mxUtils.trim(z[R]);""!=V&&0>mxUtils.indexOf(N,V)&&(L=0<L.length?L+" "+V:V,Q=!0)}Q&&this.setAttributeForCell(m[I],"tags",L)}}finally{this.model.endUpdate()}}};+Graph.prototype.removeTagsForCells=function(m,z){if(0<m.length&&0<z.length){this.model.beginUpdate();try{for(var I=0;I<m.length;I++){var L=this.getTagsForCell(m[I]);if(0<L.length){for(var N=L.split(" "),Q=!1,R=0;R<z.length;R++){var V=mxUtils.indexOf(N,z[R]);0<=V&&(N.splice(V,1),Q=!0)}Q&&this.setAttributeForCell(m[I],"tags",N.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(m){this.model.beginUpdate();try{for(var z=0;z<m.length;z++)this.model.setVisible(m[z],!this.model.isVisible(m[z]))}finally{this.model.endUpdate()}};+Graph.prototype.setCellsVisible=function(m,z){this.model.beginUpdate();try{for(var I=0;I<m.length;I++)this.model.setVisible(m[I],z)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(m,z,I,L){for(var N=0;N<m.length;N++)this.highlightCell(m[N],z,I,L)};Graph.prototype.highlightCell=function(m,z,I,L,N){z=null!=z?z:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;m=this.view.getState(m);var Q=null;null!=m&&(N=null!=N?N:4,N=Math.max(N+1,mxUtils.getValue(m.style,mxConstants.STYLE_STROKEWIDTH,+1)+N),Q=new mxCellHighlight(this,z,N,!1),null!=L&&(Q.opacity=L),Q.highlight(m),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,"transition","all 1200ms ease-in-out"),Q.shape.node.style.opacity=0);window.setTimeout(function(){Q.destroy()},1200)},I));return Q};Graph.prototype.addSvgShadow=function(m,z,I,L){I=null!=I?I:!1;L=null!=L?L:!0;var N=m.ownerDocument,Q=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"filter"):N.createElement("filter");Q.setAttribute("id",+this.shadowId);var R=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):N.createElement("feGaussianBlur");R.setAttribute("in","SourceAlpha");R.setAttribute("stdDeviation",this.svgShadowBlur);R.setAttribute("result","blur");Q.appendChild(R);R=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feOffset"):N.createElement("feOffset");R.setAttribute("in","blur");R.setAttribute("dx",this.svgShadowSize);R.setAttribute("dy",this.svgShadowSize);R.setAttribute("result",+"offsetBlur");Q.appendChild(R);R=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feFlood"):N.createElement("feFlood");R.setAttribute("flood-color",this.svgShadowColor);R.setAttribute("flood-opacity",this.svgShadowOpacity);R.setAttribute("result","offsetColor");Q.appendChild(R);R=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feComposite"):N.createElement("feComposite");R.setAttribute("in","offsetColor");R.setAttribute("in2","offsetBlur");R.setAttribute("operator","in");+R.setAttribute("result","offsetBlur");Q.appendChild(R);R=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feBlend"):N.createElement("feBlend");R.setAttribute("in","SourceGraphic");R.setAttribute("in2","offsetBlur");Q.appendChild(R);R=m.getElementsByTagName("defs");0==R.length?(N=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"defs"):N.createElement("defs"),null!=m.firstChild?m.insertBefore(N,m.firstChild):m.appendChild(N)):N=R[0];N.appendChild(Q);I||(z=null!=z?z:m.getElementsByTagName("g")[0],+null!=z&&(z.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(m.getAttribute("width")))&&L&&(m.setAttribute("width",parseInt(m.getAttribute("width"))+6),m.setAttribute("height",parseInt(m.getAttribute("height"))+6),z=m.getAttribute("viewBox"),null!=z&&0<z.length&&(z=z.split(" "),3<z.length&&(w=parseFloat(z[2])+6,h=parseFloat(z[3])+6,m.setAttribute("viewBox",z[0]+" "+z[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(m,z){mxClient.IS_SVG&&!mxClient.IS_SF&&(z=null!=z?z:!0,(this.shadowVisible=m)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),z&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var m=this.model.getChildCount(this.model.root),z=0;do var I=this.model.getChildAt(this.model.root,z);while(z++<m&&"1"==mxUtils.getValue(this.getCellStyle(I),"locked","0"));null!=I&&this.setDefaultParent(I)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+@@ -12989,365 +12989,365 @@ STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PAT[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=-[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(m){var z=null;null!=m&&0<m.length&&("ER"==m.substring(0,2)?z="mxgraph.er":"sysML"==m.substring(0,5)&&(z="mxgraph.sysml"));return z};var y=mxMarker.createMarker;mxMarker.createMarker=function(m,z,I,L,N,O,S,U,W,X){if(null!=I&&null==mxMarker.markers[I]){var Z=this.getPackageForType(I);null!=Z&&mxStencilRegistry.getStencil(Z)}return y.apply(this,arguments)};var B=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(m,-z,I,L,N,O){"1"==mxUtils.getValue(z.style,"lineShape",null)&&m.setFillColor(mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return B.apply(this,arguments)};PrintDialog.prototype.create=function(m,z,I){function L(){ea.value=Math.max(1,Math.min(X,Math.max(parseInt(ea.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(X,Math.min(parseInt(ea.value),parseInt(ba.value))))}function N(Aa){m.lastPrintPagesRadioChecked=Y.checked;m.lastPrintSelectionOnlyChecked=fa.checked;m.lastPrintCropRadioChecked=-da.checked;m.lastPrintFitRadioChecked=ia.checked;Y.checked&&ba.value<ea.value?(m.lastPrintPagesFromInput=ba.value,m.lastPrintPagesToInput=ea.value):(m.lastPrintPagesFromInput=null,m.lastPrintPagesToInput=null);sa.value=Math.max(1,Math.min(1600,parseInt(sa.value)))+"%";m.lastPrintZoom=sa.value;m.lastPrintBorder=Ba.value;m.lastPrintGrid=Ea.checked;m.lastPrintTransparent=wa.checked;m.lastPrintInclude=Ca.checked;m.lastPrintSheetsAcross=ma.value;m.lastPrintSheetsDown=ka.value;var Fa={};Fa.border=parseInt(Ba.value);-Fa.scale=parseInt(sa.value)/100;Fa.grid=Ea.checked;Fa.transparent=wa.checked;Fa.includeCopy=Ca.checked;Fa.sheetsAcross=parseInt(ma.value);Fa.sheetsDown=parseInt(ka.value);Fa.pagesFrom=parseInt(ba.value);Fa.pagesTo=parseInt(ea.value);Fa.allPages=Z.checked;Fa.selection=fa.checked;Fa.pageView=aa.checked;Fa.crop=da.checked;Fa.fit=ia.checked;return null!=I?I(!Aa,Fa):m.print(!Aa,Fa)}var O=m.editor.graph,S=document.createElement("div"),U=document.createElement("h3");U.style.width="100%";U.style.textAlign=-"center";U.style.marginTop="0px";mxUtils.write(U,z||mxResources.get("print"));S.appendChild(U);var W=1,X=1;U=document.createElement("div");U.style.whiteSpace="nowrap";var Z=document.createElement("input");Z.style.marginRight="8px";Z.style.marginBottom="8px";Z.setAttribute("type","radio");Z.setAttribute("name","pages-printdialog");U.appendChild(Z);z=document.createElement("span");mxUtils.write(z,mxResources.get("allPages"));mxEvent.addListener(z,"click",function(){Z.checked=!0});U.appendChild(z);mxUtils.br(U);-var Y=Z.cloneNode(!0);U.appendChild(Y);z=document.createElement("span");mxUtils.write(z,mxResources.get("pages")+":");U.appendChild(z);mxEvent.addListener(z,"click",function(){Y.checked=!0});var ba=document.createElement("input");ba.style.margin="0 4px";ba.setAttribute("value","1");ba.setAttribute("type","number");ba.setAttribute("min","1");ba.style.width="40px";U.appendChild(ba);z=document.createElement("span");mxUtils.write(z,mxResources.get("to"));U.appendChild(z);var ea=ba.cloneNode(!0);U.appendChild(ea);-mxEvent.addListener(ba,"focus",function(){Y.checked=!0});mxEvent.addListener(ea,"focus",function(){Y.checked=!0});mxEvent.addListener(ba,"change",L);mxEvent.addListener(ea,"change",L);if(null!=m.pages&&(X=m.pages.length,null!=m.currentPage))for(var ca=0;ca<X;ca++)if(m.currentPage==m.pages[ca]){W=ca+1;break}null!=m.lastPrintPagesFromInput&&null!=m.lastPrintPagesToInput?(ba.value=Math.min(X,Math.max(1,m.lastPrintPagesFromInput)),ea.value=Math.min(X,Math.max(1,m.lastPrintPagesToInput))):(ba.value=W,-ea.value=W);ba.setAttribute("max",X);ea.setAttribute("max",X);ca=mxUtils.button(mxResources.get("currentPage"),function(Aa){ba.value=W;ea.value=W;Y.checked=!0});ca.setAttribute("title",mxResources.get("currentPage"));ca.style.marginLeft="4px";ca.style.maxWidth="100px";ca.style.overflow="hidden";ca.style.textOverflow="ellipsis";ca.style.whiteSpace="nowrap";U.appendChild(ca);1<X&&S.appendChild(U);U=document.createElement("div");U.style.borderBottom="1px solid lightGray";U.style.paddingBottom="12px";-U.style.marginBottom="12px";U.style.whiteSpace="nowrap";var fa=document.createElement("input");fa.setAttribute("name","pages-printdialog");fa.setAttribute("type",1==X?"checkbox":"radio");fa.style.marginRight="8px";O.isSelectionEmpty()&&fa.setAttribute("disabled","disabled");O.isEnabled()&&(U.appendChild(fa),z=document.createElement("span"),mxUtils.write(z,mxResources.get("selectionOnly")),U.appendChild(z));(O.isEnabled()||1<X)&&S.appendChild(U);!m.isPagesEnabled()||m.lastPrintPagesRadioChecked?Y.checked=-!0:!O.isSelectionEmpty()&&m.lastPrintSelectionOnlyChecked?fa.checked=!0:Z.checked=!0;O.isSelectionEmpty()||mxEvent.addListener(z,"click",function(){fa.checked=!fa.checked});O=document.createElement("div");O.style.whiteSpace="nowrap";var aa=document.createElement("input");aa.style.marginBottom="8px";aa.style.marginRight="8px";aa.setAttribute("type","radio");aa.setAttribute("name","printSize");O.appendChild(aa);z=document.createElement("span");mxUtils.write(z,mxResources.get("pageView"));O.appendChild(z);-mxEvent.addListener(O,"click",function(){aa.checked=!0});S.appendChild(O);O=document.createElement("div");O.style.whiteSpace="nowrap";var da=document.createElement("input");da.style.marginBottom="8px";da.style.marginRight="8px";da.setAttribute("type","radio");da.setAttribute("name","printSize");O.appendChild(da);z=document.createElement("span");mxUtils.write(z,mxResources.get("crop"));O.appendChild(z);mxEvent.addListener(O,"click",function(){da.checked=!0});S.appendChild(O);O=document.createElement("div");-O.style.whiteSpace="nowrap";var ia=document.createElement("input");ia.style.marginBottom="8px";ia.style.marginRight="8px";ia.setAttribute("type","radio");ia.setAttribute("name","printSize");z=document.createElement("div");z.style.display="inline-block";z.style.verticalAlign="top";z.style.paddingTop="2px";z.appendChild(ia);O.appendChild(z);U=document.createElement("table");U.style.display="inline-block";U.style.borderSpacing="0";ca=document.createElement("tbody");var pa=document.createElement("tr"),-oa=pa.cloneNode(!0),ha=document.createElement("td"),xa=ha.cloneNode(!0),qa=ha.cloneNode(!0),ua=ha.cloneNode(!0),ya=ha.cloneNode(!0),ja=ha.cloneNode(!0);ha.style.textAlign="right";ua.style.textAlign="right";mxUtils.write(ha,mxResources.get("fitTo"));mxEvent.addListener(O,"click",function(Aa){mxEvent.getSource(Aa)!=ia&&(ia.checked=!ia.checked)});var ma=document.createElement("input");ma.style.margin="0 2px";ma.style.boxSizing="border-box";ma.setAttribute("value",m.lastPrintSheetsAcross||"1");ma.setAttribute("min",-"1");ma.setAttribute("type","number");ma.style.width="40px";xa.appendChild(ma);z=document.createElement("span");mxUtils.write(z,mxResources.get("fitToSheetsAcross"));qa.appendChild(z);mxUtils.write(ua,mxResources.get("fitToBy"));var ka=ma.cloneNode(!0);ka.setAttribute("value",m.lastPrintSheetsDown||"1");ya.appendChild(ka);mxEvent.addListener(ma,"click",function(Aa){ia.checked=!0;mxEvent.consume(Aa)});mxEvent.addListener(ka,"click",function(Aa){ia.checked=!0;mxEvent.consume(Aa)});m.lastPrintCropRadioChecked?-da.checked=!0:m.lastPrintFitRadioChecked?ia.checked=!0:aa.checked=!0;z=document.createElement("span");mxUtils.write(z,mxResources.get("fitToSheetsDown"));ja.appendChild(z);pa.appendChild(ha);pa.appendChild(xa);pa.appendChild(qa);oa.appendChild(ua);oa.appendChild(ya);oa.appendChild(ja);ca.appendChild(pa);ca.appendChild(oa);U.appendChild(ca);O.appendChild(U);S.appendChild(O);O=document.createElement("div");O.style.borderTop="1px solid lightGray";O.style.whiteSpace="nowrap";O.style.paddingTop="12px";-O.style.marginTop="12px";O.style.paddingLeft="8px";mxUtils.write(O,mxResources.get("borderWidth")+":");var Ba=document.createElement("input");Ba.setAttribute("type","number");Ba.setAttribute("min","0");Ba.style.width="40px";Ba.style.marginLeft="4px";Ba.value=null!=m.lastPrintBorder?m.lastPrintBorder:mxPrintPreview.prototype.pageMargin;O.appendChild(Ba);z=document.createElement("span");z.style.marginLeft="8px";mxUtils.write(z,mxResources.get("zoom")+":");O.appendChild(z);var sa=document.createElement("input");-sa.style.width="60px";sa.style.marginLeft="4px";sa.value=null!=m.lastPrintZoom?m.lastPrintZoom:"100%";O.appendChild(sa);mxUtils.br(O);var Ea=document.createElement("input");Ea.setAttribute("type","checkbox");Ea.style.marginTop="12px";Ea.checked=null!=m.lastPrintGrid?m.lastPrintGrid:!1;O.appendChild(Ea);z=document.createElement("span");z.style.marginLeft="4px";z.style.marginRight="8px";mxUtils.write(z,mxResources.get("grid"));O.appendChild(z);mxEvent.addListener(z,"click",function(Aa){Ea.checked=!0;-mxEvent.consume(Aa)});var wa=document.createElement("input");wa.setAttribute("type","checkbox");wa.style.marginTop="10px";wa.checked=null!=m.lastPrintTransparent?m.lastPrintTransparent:!1;null!=I&&(O.appendChild(wa),z=document.createElement("span"),z.style.marginLeft="4px",mxUtils.write(z,mxResources.get("transparentBackground")),O.appendChild(z),mxEvent.addListener(z,"click",function(Aa){wa.checked=!0;mxEvent.consume(Aa)}));var Ca=document.createElement("input");Ca.setAttribute("type","checkbox");-Ca.style.marginTop="10px";Ca.checked=null!=m.lastPrintInclude?m.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=m.getServiceName()||(mxUtils.br(O),O.appendChild(Ca),z=document.createElement("span"),z.style.marginLeft="4px",mxUtils.write(z,mxResources.get("includeCopyOfMyDiagram")),O.appendChild(z),mxEvent.addListener(z,"click",function(Aa){Ca.checked=!0;mxEvent.consume(Aa)}));S.appendChild(O);z=document.createElement("div");z.style.marginTop="40px";z.style.textAlign=-"right";z.style.whiteSpace="nowrap";m.isOffline()||null!=I||z.appendChild(m.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));O=mxUtils.button(mxResources.get("cancel"),function(){m.hideDialog()});O.className="geBtn";m.editor.cancelFirst&&z.appendChild(O);PrintDialog.previewEnabled&&null==I&&(U=mxUtils.button(mxResources.get("preview"),function(){try{m.hideDialog(),N(!1)}catch(Aa){m.handleError(Aa)}}),U.className="geBtn",z.appendChild(U));U=mxUtils.button(mxResources.get(null!=I?"export":-PrintDialog.previewEnabled?"print":"ok"),function(){try{m.hideDialog(),N(!0)}catch(Aa){m.handleError(Aa)}});U.className="geBtn gePrimaryBtn";z.appendChild(U);m.editor.cancelFirst||z.appendChild(O);S.appendChild(z);if(m.editor.isChromelessView()){var Da=function(){Editor.isDarkMode()?(S.classList.add("geDarkMode"),S.style.colorScheme="dark"):(S.classList.remove("geDarkMode"),S.style.colorScheme="light")};m.addListener("darkModeChanged",Da);Da();var Ka=function(Aa,Fa){Aa=Fa.getProperty("dialog");S.parentNode==-Aa.container&&(m.editor.removeListener(Ka),m.removeListener(Da))};m.editor.addListener("hideDialog",Ka)}this.container=S};var C=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var m=this.image;null!=m&&null!=m.src&&Graph.isPageLink(m.src)&&(m={originalSrc:m.src});this.page.viewState.backgroundImage=-m}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else C.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&-this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(m=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=m?m:"default"),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 M=document.createElement("canvas"),T=new Image;T.onload=function(){try{M.getContext("2d").drawImage(T,+[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(m){var z=null;null!=m&&0<m.length&&("ER"==m.substring(0,2)?z="mxgraph.er":"sysML"==m.substring(0,5)&&(z="mxgraph.sysml"));return z};var y=mxMarker.createMarker;mxMarker.createMarker=function(m,z,I,L,N,Q,R,V,W,X){if(null!=I&&null==mxMarker.markers[I]){var Z=this.getPackageForType(I);null!=Z&&mxStencilRegistry.getStencil(Z)}return y.apply(this,arguments)};var B=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(m,+z,I,L,N,Q){"1"==mxUtils.getValue(z.style,"lineShape",null)&&m.setFillColor(mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return B.apply(this,arguments)};PrintDialog.prototype.create=function(m,z,I,L){function N(){ca.value=Math.max(1,Math.min(Z,Math.max(parseInt(ca.value),parseInt(da.value))));da.value=Math.max(1,Math.min(Z,Math.min(parseInt(ca.value),parseInt(da.value))))}function Q(Ea){m.lastPrintPagesRadioChecked=ba.checked;m.lastPrintSelectionOnlyChecked=aa.checked;m.lastPrintCropRadioChecked=+ia.checked;m.lastPrintFitRadioChecked=na.checked;ba.checked&&da.value<ca.value?(m.lastPrintPagesFromInput=da.value,m.lastPrintPagesToInput=ca.value):(m.lastPrintPagesFromInput=null,m.lastPrintPagesToInput=null);Fa.value=Math.max(1,Math.min(1600,parseInt(Fa.value)))+"%";m.lastPrintZoom=Fa.value;m.lastPrintBorder=sa.value;m.lastPrintGrid=xa.checked;m.lastPrintTransparent=Aa.checked;m.lastPrintInclude=Da.checked;m.lastPrintSheetsAcross=ka.value;m.lastPrintSheetsDown=Ca.value;var Ba={};Ba.border=parseInt(sa.value);+Ba.scale=parseInt(Fa.value)/100;Ba.grid=xa.checked;Ba.transparent=Aa.checked;Ba.includeCopy=Da.checked;Ba.sheetsAcross=parseInt(ka.value);Ba.sheetsDown=parseInt(Ca.value);Ba.pagesFrom=parseInt(da.value);Ba.pagesTo=parseInt(ca.value);Ba.allPages=Y.checked;Ba.selection=aa.checked;Ba.pageView=fa.checked;Ba.crop=ia.checked;Ba.fit=na.checked;return null!=I?I(!Ea,Ba):m.print(!Ea,Ba)}var R=m.editor.graph,V=document.createElement("div"),W=document.createElement("h3");W.style.width="100%";W.style.textAlign=+"center";W.style.marginTop="0px";mxUtils.write(W,z||mxResources.get("print"));V.appendChild(W);var X=1,Z=1;W=document.createElement("div");W.style.whiteSpace="nowrap";var Y=document.createElement("input");Y.style.marginRight="8px";Y.style.marginBottom="8px";Y.setAttribute("type","radio");Y.setAttribute("name","pages-printdialog");W.appendChild(Y);z=document.createElement("span");mxUtils.write(z,mxResources.get("allPages"));mxEvent.addListener(z,"click",function(){Y.checked=!0});W.appendChild(z);mxUtils.br(W);+var ba=Y.cloneNode(!0);W.appendChild(ba);z=document.createElement("span");mxUtils.write(z,mxResources.get("pages")+":");W.appendChild(z);mxEvent.addListener(z,"click",function(){ba.checked=!0});var da=document.createElement("input");da.style.margin="0 4px";da.setAttribute("value","1");da.setAttribute("type","number");da.setAttribute("min","1");da.style.width="40px";W.appendChild(da);z=document.createElement("span");mxUtils.write(z,mxResources.get("to"));W.appendChild(z);var ca=da.cloneNode(!0);W.appendChild(ca);+mxEvent.addListener(da,"focus",function(){ba.checked=!0});mxEvent.addListener(ca,"focus",function(){ba.checked=!0});mxEvent.addListener(da,"change",N);mxEvent.addListener(ca,"change",N);if(null!=m.pages&&(Z=m.pages.length,null!=m.currentPage))for(var ea=0;ea<Z;ea++)if(m.currentPage==m.pages[ea]){X=ea+1;break}null!=m.lastPrintPagesFromInput&&null!=m.lastPrintPagesToInput?(da.value=Math.min(Z,Math.max(1,m.lastPrintPagesFromInput)),ca.value=Math.min(Z,Math.max(1,m.lastPrintPagesToInput))):(da.value=+X,ca.value=X);da.setAttribute("max",Z);ca.setAttribute("max",Z);ea=mxUtils.button(mxResources.get("currentPage"),function(Ea){da.value=X;ca.value=X;ba.checked=!0});ea.setAttribute("title",mxResources.get("currentPage"));ea.style.marginLeft="4px";ea.style.maxWidth="100px";ea.style.overflow="hidden";ea.style.textOverflow="ellipsis";ea.style.whiteSpace="nowrap";W.appendChild(ea);1<Z&&V.appendChild(W);W=document.createElement("div");W.style.borderBottom="1px solid lightGray";W.style.paddingBottom="12px";+W.style.marginBottom="12px";W.style.whiteSpace="nowrap";var aa=document.createElement("input");aa.setAttribute("name","pages-printdialog");aa.setAttribute("type",1==Z?"checkbox":"radio");aa.style.marginRight="8px";R.isSelectionEmpty()&&aa.setAttribute("disabled","disabled");R.isEnabled()&&(W.appendChild(aa),z=document.createElement("span"),mxUtils.write(z,mxResources.get("selectionOnly")),W.appendChild(z));(R.isEnabled()||1<Z)&&V.appendChild(W);!m.isPagesEnabled()||m.lastPrintPagesRadioChecked?ba.checked=+!0:!R.isSelectionEmpty()&&m.lastPrintSelectionOnlyChecked?aa.checked=!0:Y.checked=!0;R.isSelectionEmpty()||mxEvent.addListener(z,"click",function(){aa.checked=!aa.checked});R=document.createElement("div");R.style.whiteSpace="nowrap";var fa=document.createElement("input");fa.style.marginBottom="8px";fa.style.marginRight="8px";fa.setAttribute("type","radio");fa.setAttribute("name","printSize");R.appendChild(fa);z=document.createElement("span");mxUtils.write(z,mxResources.get("pageView"));R.appendChild(z);+mxEvent.addListener(R,"click",function(){fa.checked=!0});V.appendChild(R);R=document.createElement("div");R.style.whiteSpace="nowrap";var ia=document.createElement("input");ia.style.marginBottom="8px";ia.style.marginRight="8px";ia.setAttribute("type","radio");ia.setAttribute("name","printSize");R.appendChild(ia);z=document.createElement("span");mxUtils.write(z,mxResources.get("crop"));R.appendChild(z);mxEvent.addListener(R,"click",function(){ia.checked=!0});V.appendChild(R);R=document.createElement("div");+R.style.whiteSpace="nowrap";var na=document.createElement("input");na.style.marginBottom="8px";na.style.marginRight="8px";na.setAttribute("type","radio");na.setAttribute("name","printSize");z=document.createElement("div");z.style.display="inline-block";z.style.verticalAlign="top";z.style.paddingTop="2px";z.appendChild(na);R.appendChild(z);W=document.createElement("table");W.style.display="inline-block";W.style.borderSpacing="0";ea=document.createElement("tbody");var pa=document.createElement("tr"),+ha=pa.cloneNode(!0),wa=document.createElement("td"),qa=wa.cloneNode(!0),ua=wa.cloneNode(!0),ya=wa.cloneNode(!0),ja=wa.cloneNode(!0),oa=wa.cloneNode(!0);wa.style.textAlign="right";ya.style.textAlign="right";mxUtils.write(wa,mxResources.get("fitTo"));mxEvent.addListener(R,"click",function(Ea){mxEvent.getSource(Ea)!=na&&(na.checked=!na.checked)});var ka=document.createElement("input");ka.style.margin="0 2px";ka.style.boxSizing="border-box";ka.setAttribute("value",m.lastPrintSheetsAcross||"1");ka.setAttribute("min",+"1");ka.setAttribute("type","number");ka.style.width="40px";qa.appendChild(ka);z=document.createElement("span");mxUtils.write(z,mxResources.get("fitToSheetsAcross"));ua.appendChild(z);mxUtils.write(ya,mxResources.get("fitToBy"));var Ca=ka.cloneNode(!0);Ca.setAttribute("value",m.lastPrintSheetsDown||"1");ja.appendChild(Ca);mxEvent.addListener(ka,"click",function(Ea){na.checked=!0;mxEvent.consume(Ea)});mxEvent.addListener(Ca,"click",function(Ea){na.checked=!0;mxEvent.consume(Ea)});m.lastPrintCropRadioChecked?+ia.checked=!0:m.lastPrintFitRadioChecked?na.checked=!0:fa.checked=!0;z=document.createElement("span");mxUtils.write(z,mxResources.get("fitToSheetsDown"));oa.appendChild(z);pa.appendChild(wa);pa.appendChild(qa);pa.appendChild(ua);ha.appendChild(ya);ha.appendChild(ja);ha.appendChild(oa);ea.appendChild(pa);ea.appendChild(ha);W.appendChild(ea);R.appendChild(W);V.appendChild(R);R=document.createElement("div");R.style.borderTop="1px solid lightGray";R.style.whiteSpace="nowrap";R.style.paddingTop="12px";+R.style.marginTop="12px";R.style.paddingLeft="8px";mxUtils.write(R,mxResources.get("borderWidth")+":");var sa=document.createElement("input");sa.setAttribute("type","number");sa.setAttribute("min","0");sa.style.width="40px";sa.style.marginLeft="4px";sa.value=null!=m.lastPrintBorder?m.lastPrintBorder:mxPrintPreview.prototype.pageMargin;R.appendChild(sa);z=document.createElement("span");z.style.marginLeft="8px";mxUtils.write(z,mxResources.get("zoom")+":");R.appendChild(z);var Fa=document.createElement("input");+Fa.style.width="60px";Fa.style.marginLeft="4px";Fa.value=null!=m.lastPrintZoom?m.lastPrintZoom:"100%";R.appendChild(Fa);mxUtils.br(R);var xa=document.createElement("input");xa.setAttribute("type","checkbox");xa.style.marginTop="12px";xa.checked=null!=m.lastPrintGrid?m.lastPrintGrid:!1;R.appendChild(xa);z=document.createElement("span");z.style.marginLeft="4px";z.style.marginRight="8px";mxUtils.write(z,mxResources.get("grid"));R.appendChild(z);mxEvent.addListener(z,"click",function(Ea){xa.checked=!0;+mxEvent.consume(Ea)});var Aa=document.createElement("input");Aa.setAttribute("type","checkbox");Aa.style.marginTop="10px";Aa.checked=null!=m.lastPrintTransparent?m.lastPrintTransparent:!1;null!=I&&(R.appendChild(Aa),z=document.createElement("span"),z.style.marginLeft="4px",mxUtils.write(z,mxResources.get("transparentBackground")),R.appendChild(z),mxEvent.addListener(z,"click",function(Ea){Aa.checked=!0;mxEvent.consume(Ea)}));var Da=document.createElement("input");Da.setAttribute("type","checkbox");+Da.style.marginTop="10px";Da.checked=null!=m.lastPrintInclude?m.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=m.getServiceName()||(mxUtils.br(R),R.appendChild(Da),z=document.createElement("span"),z.style.marginLeft="4px",mxUtils.write(z,mxResources.get("includeCopyOfMyDiagram")),R.appendChild(z),mxEvent.addListener(z,"click",function(Ea){Da.checked=!0;mxEvent.consume(Ea)}));V.appendChild(R);z=document.createElement("div");z.style.marginTop="40px";z.style.textAlign=+"right";z.style.whiteSpace="nowrap";m.isOffline()||null!=I||z.appendChild(m.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));R=mxUtils.button(mxResources.get("cancel"),function(){m.hideDialog()});R.className="geBtn";m.editor.cancelFirst&&z.appendChild(R);PrintDialog.previewEnabled&&null==I&&(W=mxUtils.button(mxResources.get("preview"),function(){try{m.hideDialog(),Q(!1)}catch(Ea){m.handleError(Ea)}}),W.className="geBtn",z.appendChild(W));L=null!=L?L:null!=I?"export":PrintDialog.previewEnabled?+"print":"ok";L=mxUtils.button(mxResources.get(L),function(){try{m.hideDialog(),Q(!0)}catch(Ea){m.handleError(Ea)}});L.className="geBtn gePrimaryBtn";z.appendChild(L);m.editor.cancelFirst||z.appendChild(R);V.appendChild(z);if(m.editor.isChromelessView()){var Ka=function(){Editor.isDarkMode()?(V.classList.add("geDarkMode"),V.style.colorScheme="dark"):(V.classList.remove("geDarkMode"),V.style.colorScheme="light")};m.addListener("darkModeChanged",Ka);Ka();var Ja=function(Ea,Ba){Ea=Ba.getProperty("dialog");+V.parentNode==Ea.container&&(m.editor.removeListener(Ja),m.removeListener(Ka))};m.editor.addListener("hideDialog",Ja)}this.container=V};var C=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var m=this.image;null!=m&&null!=m.src&&Graph.isPageLink(m.src)&&(m={originalSrc:m.src});+this.page.viewState.backgroundImage=m}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else C.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),+null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(m=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=m?m:"default"),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 M=document.createElement("canvas"),T=new Image;T.onload=function(){try{M.getContext("2d").drawImage(T,0,0);var m=M.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=m&&6<m.length}catch(z){}};T.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(m){}Editor.prototype.useCanvasForExport=!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;c.previousAdaptiveColors=c.adaptiveColors;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(b)})();-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.16";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.1.0";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");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(d,g,k,v,t,x,A){if(null!=d){t=null!=t?t:Error(d);t.stack=null!=t.stack?t.stack:"";x=null!=x?x:0>d.indexOf("NetworkError")&&0>d.indexOf("SecurityError")&&0>d.indexOf("NS_ERROR_FAILURE")&&0>d.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&d!=EditorUi.lastErrorMessage&&0>d.indexOf("extension:")&&0>d.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>t.stack.indexOf("extension:")&&0>t.stack.indexOf("<anonymous>:")&&-0>t.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=d,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+x+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=v?":colno:"+encodeURIComponent(v):"")+(""!=t.stack?"&stack="+encodeURIComponent(t.stack):""))}catch(J){}try{A||null==window.console||console.error(x,d,g,k,v,t)}catch(J){}}};EditorUi.logEvent=+EditorUi.logError=function(d,g,k,u,t,x,A){if(null!=d){t=null!=t?t:Error(d);t.stack=null!=t.stack?t.stack:"";x=null!=x?x:0>d.indexOf("NetworkError")&&0>d.indexOf("SecurityError")&&0>d.indexOf("NS_ERROR_FAILURE")&&0>d.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&d!=EditorUi.lastErrorMessage&&0>d.indexOf("extension:")&&0>d.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>t.stack.indexOf("extension:")&&0>t.stack.indexOf("<anonymous>:")&&+0>t.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=d,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+x+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=u?":colno:"+encodeURIComponent(u):"")+(""!=t.stack?"&stack="+encodeURIComponent(t.stack):""))}catch(J){}try{A||null==window.console||console.error(x,d,g,k,u,t)}catch(J){}}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(k){}};EditorUi.sendReport=function(d,g){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,d.length>g&&(d=d.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],g=0;g<arguments.length;g++)d.push(arguments[g]);console.log.apply(console,d)}}catch(k){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.embedSvgImages=function(d){d=d.getElementsByTagName("image");for(var g=[],k=0;k<d.length;k++)g.push(d[k]);for(k=0;k<g.length;k++)EditorUi.replaceSvgImage(g[k])};EditorUi.replaceSvgImage=function(d){try{var g=null;g=null==d.getAttributeNS?d.getAttribute("xlink:href"):d.getAttributeNS(mxConstants.NS_XLINK,"href");var k=EditorUi.getSvgSubtree(g);if(null!=k&&"svg"==k.nodeName){k.setAttribute("x",d.getAttribute("x"));k.setAttribute("y",d.getAttribute("y"));k.setAttribute("width",d.getAttribute("width"));k.setAttribute("height",d.getAttribute("height"));k.style.fontFamily=-"initial";var v=mxUtils.createElementNs(k.ownerDocument,mxConstants.NS_SVG,"g");v.appendChild(k);d.hasAttribute("transform")&&v.setAttribute("transform",d.getAttribute("transform"));d.parentNode.replaceChild(v,d)}}catch(t){}};EditorUi.getSvgSubtree=function(d){var g=Graph.getSvgFromDataUri(d);d=null;if(null!=g){d=Graph.sanitizeNode(mxUtils.parseXml(g).documentElement);g=d.getElementsByTagName("style");if(0<g.length){var k="svg-image-"+Editor.guid();d.setAttribute("id",k);for(var v=document.implementation.createHTMLDocument(""),-t=document.createElement("style"),x=0;x<g.length;x++){t.textContent=g[x].textContent;v.body.appendChild(t);for(var A="",J=0;J<t.sheet.cssRules.length;J++){var D=t.sheet.cssRules[J];if(null!=D.selectorText){for(var G=D.selectorText.split(","),R=0;R<G.length;R++)G[R]="#"+k+" "+G[R];D.selectorText=G.join(",")}A+=D.cssText+"\n"}g[x].textContent=A}}g=d.getElementsByTagName("*");for(k=0;k<g.length;k++)g[k].removeAttribute("data-cell-id")}return d};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';+"initial";var u=mxUtils.createElementNs(k.ownerDocument,mxConstants.NS_SVG,"g");u.appendChild(k);d.hasAttribute("transform")&&u.setAttribute("transform",d.getAttribute("transform"));d.parentNode.replaceChild(u,d)}}catch(t){}};EditorUi.getSvgSubtree=function(d){var g=Graph.getSvgFromDataUri(d);d=null;if(null!=g){d=Graph.sanitizeNode(mxUtils.parseXml(g).documentElement);g=d.getElementsByTagName("style");if(0<g.length){var k="svg-image-"+Editor.guid();d.setAttribute("id",k);for(var u=document.implementation.createHTMLDocument(""),+t=document.createElement("style"),x=0;x<g.length;x++){t.textContent=g[x].textContent;u.body.appendChild(t);for(var A="",J=0;J<t.sheet.cssRules.length;J++){var D=t.sheet.cssRules[J];if(null!=D.selectorText){for(var G=D.selectorText.split(","),S=0;S<G.length;S++)G[S]="#"+k+" "+G[S];D.selectorText=G.join(",")}A+=D.cssText+"\n"}g[x].textContent=A}}g=d.getElementsByTagName("*");for(k=0;k<g.length;k++)g[k].removeAttribute("data-cell-id")}return d};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.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;EditorUi.prototype.webpSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(t){}try{var g=document.createElement("canvas"),k=new Image;k.onload=function(){try{g.getContext("2d").drawImage(k,0,0);var t=g.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=t&&6<t.length}catch(x){}};k.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){}try{g=-document.createElement("canvas");g.width=g.height=1;var v=g.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==v.match("image/jpeg");v=g.toDataURL("image/webp");EditorUi.prototype.webpSupported=null!==v.match("image/webp")}catch(t){}})();EditorUi.prototype.createButtonContainer=function(){var d=document.createElement("div");d.className="geButtonContainer";d.style.overflow="1"==urlParams.embed?"hidden":"";return d};EditorUi.prototype.openLink=function(d,g,k){return this.editor.graph.openLink(d,+document.createElement("canvas");g.width=g.height=1;var u=g.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==u.match("image/jpeg");u=g.toDataURL("image/webp");EditorUi.prototype.webpSupported=null!==u.match("image/webp")}catch(t){}})();EditorUi.prototype.createButtonContainer=function(){var d=document.createElement("div");d.className="geButtonContainer";d.style.overflow="1"==urlParams.embed?"hidden":"";return d};EditorUi.prototype.openLink=function(d,g,k){return this.editor.graph.openLink(d,g,k)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,g){g(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,g,k){localStorage.setItem(d,g);null!=k&&k()};EditorUi.prototype.isLocked=function(){var d=this.getCurrentFile();return null!=d&&d.isLocked()};EditorUi.prototype.removeLocalData=function(d,g){localStorage.removeItem(d);g()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){var g=this.editor.graph;g.mathEnabled=d;null!=g.view.backgroundImage&&(g.view.backgroundImage.destroy(),g.view.backgroundImage=null);this.editor.updateGraphComponents();g.refresh();g.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(d){this.editor.graph.setAdaptiveColors(d);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=-function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(d,g,k){var v=null==d||null==g;k=null!=k?k:24;var t=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",-speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),x=this.timeout,A=t.spin,J=null,D=null,G=mxUtils.bind(this,function(V){null!=V&&V()});t.spin=function(V,Q,P,q){q=null!=q?q:x;var y=!1;if(!this.active){var B=Date.now();null!=P&&(J=window.setTimeout(function(){t.stop();J=null;P({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:D})},q));A.call(this,V);this.active=!0;null!=Q&&(v&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/+function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(d,g,k){var u=null==d||null==g;k=null!=k?k:24;var t=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",+speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),x=this.timeout,A=t.spin,J=null,D=null,G=mxUtils.bind(this,function(U){null!=U&&U()});t.spin=function(U,P,O,q){q=null!=q?q:x;var y=!1;if(!this.active){var B=Date.now();null!=O&&(J=window.setTimeout(function(){t.stop();J=null;O({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:D})},q));A.call(this,U);this.active=!0;null!=P&&(u&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),y=document.createElement("div"),y.className="geSpinnerStatus",y.style.position="absolute",y.style.whiteSpace="nowrap",y.style.background="#4B4243",y.style.color="white",y.style.fontFamily=Editor.defaultHtmlFont,y.style.fontSize="9pt",y.style.padding="6px",y.style.paddingLeft="10px",y.style.paddingRight="10px",y.style.zIndex=2E9,y.style.left=Math.max(0,d)+"px",y.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(y.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(y.style,"transform",-"translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(y.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=Q.substring(Q.length-3,Q.length)&&"!"!=Q.charAt(Q.length-1)&&(Q+="..."),y.innerHTML=mxUtils.htmlEntities(Q),V.appendChild(y),t.status=y);this.pause=mxUtils.bind(this,function(){var C=G;this.active&&(q=Math.max(0,q-(Date.now()-B)),C=mxUtils.bind(this,function(M){this.spin(V,Q,P,q);if(null!=M)try{M(),D=mxUtils.bind(this,function(){this.spin(V,Q,P,q);try{M()}catch(T){null!=P&&P(T)}})}catch(T){null!=-P&&P(T)}}));this.stop();return C});y=!0}return y};var R=t.stop;t.stop=function(){R.call(this);this.active&&(this.active=!1,null!=J&&(window.clearTimeout(J),J=null),null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status),t.status=null)};t.pause=function(){return G};return t};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),k=this.editor.extractGraphModel(g.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(v){}return!1};+"translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(y.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=P.substring(P.length-3,P.length)&&"!"!=P.charAt(P.length-1)&&(P+="..."),y.innerHTML=mxUtils.htmlEntities(P),U.appendChild(y),t.status=y);this.pause=mxUtils.bind(this,function(){var C=G;this.active&&(q=Math.max(0,q-(Date.now()-B)),C=mxUtils.bind(this,function(M){this.spin(U,P,O,q);if(null!=M)try{M(),D=mxUtils.bind(this,function(){this.spin(U,P,O,q);try{M()}catch(T){null!=O&&O(T)}})}catch(T){null!=+O&&O(T)}}));this.stop();return C});y=!0}return y};var S=t.stop;t.stop=function(){S.call(this);this.active&&(this.active=!1,null!=J&&(window.clearTimeout(J),J=null),null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status),t.status=null)};t.pause=function(){return G};return t};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),k=this.editor.extractGraphModel(g.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(u){}return!1};EditorUi.isVisioFilename=function(d){return/(\.v(dx|sdx?))($|\?)/i.test(d)||/(\.vs(x|sx?))($|\?)/i.test(d)};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=-g.getFunction,v=this.editor.graph,t=this;g.getFunction=function(x){if(v.isSelectionEmpty()&&null!=t.pages&&0<t.pages.length){var A=t.getSelectedPageIndex();if(mxEvent.isShiftDown(x)){if(37==x.keyCode)return function(){0<A&&t.movePage(A,A-1)};if(38==x.keyCode)return function(){0<A&&t.movePage(A,0)};if(39==x.keyCode)return function(){A<t.pages.length-1&&t.movePage(A,A+1)};if(40==x.keyCode)return function(){A<t.pages.length-1&&t.movePage(A,t.pages.length-1)}}else if(mxEvent.isControlDown(x)||mxClient.IS_MAC&&-mxEvent.isMetaDown(x)){if(37==x.keyCode)return function(){0<A&&t.selectNextPage(!1)};if(38==x.keyCode)return function(){0<A&&t.selectPage(t.pages[0])};if(39==x.keyCode)return function(){A<t.pages.length-1&&t.selectNextPage(!0)};if(40==x.keyCode)return function(){A<t.pages.length-1&&t.selectPage(t.pages[t.pages.length-1])}}}return!(65<=x.keyCode&&90>=x.keyCode)||v.isSelectionEmpty()||mxEvent.isAltDown(x)||mxEvent.isShiftDown(x)||mxEvent.isControlDown(x)||mxClient.IS_MAC&&mxEvent.isMetaDown(x)?k.apply(this,-arguments):null}}return g};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var g=e.apply(this,arguments);if(null==g)try{var k=d.indexOf("<mxfile ");if(0<=k){var v=d.lastIndexOf("</mxfile>");v>k&&(g=d.substring(k,v+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else{var t=mxUtils.parseXml(d),x=this.editor.extractGraphModel(t.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);+g.getFunction,u=this.editor.graph,t=this;g.getFunction=function(x){if(u.isSelectionEmpty()&&null!=t.pages&&0<t.pages.length){var A=t.getSelectedPageIndex();if(mxEvent.isShiftDown(x)){if(37==x.keyCode)return function(){0<A&&t.movePage(A,A-1)};if(38==x.keyCode)return function(){0<A&&t.movePage(A,0)};if(39==x.keyCode)return function(){A<t.pages.length-1&&t.movePage(A,A+1)};if(40==x.keyCode)return function(){A<t.pages.length-1&&t.movePage(A,t.pages.length-1)}}else if(mxEvent.isControlDown(x)||mxClient.IS_MAC&&+mxEvent.isMetaDown(x)){if(37==x.keyCode)return function(){0<A&&t.selectNextPage(!1)};if(38==x.keyCode)return function(){0<A&&t.selectPage(t.pages[0])};if(39==x.keyCode)return function(){A<t.pages.length-1&&t.selectNextPage(!0)};if(40==x.keyCode)return function(){A<t.pages.length-1&&t.selectPage(t.pages[t.pages.length-1])}}}return!(65<=x.keyCode&&90>=x.keyCode)||u.isSelectionEmpty()||mxEvent.isAltDown(x)||mxEvent.isShiftDown(x)||mxEvent.isControlDown(x)||mxClient.IS_MAC&&mxEvent.isMetaDown(x)?k.apply(this,+arguments):null}}return g};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var g=e.apply(this,arguments);if(null==g)try{var k=d.indexOf("<mxfile ");if(0<=k){var u=d.lastIndexOf("</mxfile>");u>k&&(g=d.substring(k,u+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else{var t=mxUtils.parseXml(d),x=this.editor.extractGraphModel(t.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=x?mxUtils.getXml(x):""}}catch(A){}return g};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var g=d.indexOf('<meta charset="utf-8">');0<=g&&(d=d.slice(0,g)+'<meta charset="utf-8"/>'+d.slice(g+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d,g){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[d],"patches",g);d=this.validateFileData(d);d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var k=null!=d?this.editor.extractGraphModel(d,-!0):null;null!=k&&(d=k);if(null!=d){k=this.editor.graph;k.model.beginUpdate();try{var v=null!=this.pages?this.pages.slice():null,t=d.getElementsByTagName("diagram");if(1<t.length||1==t.length&&t[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var x=t.length-1;0<=x;x--){var A=this.updatePageRoot(new DiagramPage(t[x]));null==A.getName()&&A.setName(mxResources.get("pageWithNumber",[x+1]));k.model.execute(new ChangePage(this,A,0==x?A:null,0))}}else null==this.fileNode&&-(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=v)for(x=0;x<v.length;x++)k.model.execute(new ChangePage(this,-v[x],null));var J=this.getCurrentFile();null!=J&&J.fileReplaced(g)}finally{k.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){g=null!=g?g:this.editor.graph;t=null!=t?t:!1;D=null!=D?D:!0;R=null!=R?R:!Editor.defaultCompressed;var P=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var q="_blank";else P=q=v;if(null==d)return"";var y=d;if("mxfile"!=y.nodeName.toLowerCase()){if(R){var B=d.ownerDocument.createElement("diagram");B.setAttribute("name",+!0):null;null!=k&&(d=k);if(null!=d){k=this.editor.graph;k.model.beginUpdate();try{var u=null!=this.pages?this.pages.slice():null,t=d.getElementsByTagName("diagram");if(1<t.length||1==t.length&&t[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var x=t.length-1;0<=x;x--){var A=this.updatePageRoot(new DiagramPage(t[x]));null==A.getName()&&A.setName(mxResources.get("pageWithNumber",[x+1]));k.model.execute(new ChangePage(this,A,0==x?A:null,0))}}else null==this.fileNode&&+(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=u)for(x=0;x<u.length;x++)k.model.execute(new ChangePage(this,+u[x],null));var J=this.getCurrentFile();null!=J&&J.fileReplaced(g)}finally{k.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,g,k,u,t,x,A,J,D,G,S,U,P){g=null!=g?g:this.editor.graph;t=null!=t?t:!1;D=null!=D?D:!0;S=null!=S?S:!Editor.defaultCompressed;var O=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var q="_blank";else O=q=u;if(null==d)return"";var y=d;if("mxfile"!=y.nodeName.toLowerCase()){if(S){var B=d.ownerDocument.createElement("diagram");B.setAttribute("name",mxResources.get("pageWithNumber",[1]));B.setAttribute("id",Editor.guid());B.appendChild(d)}else{B=Graph.zapGremlins(mxUtils.getXml(d));y=Graph.compress(B);if(Graph.decompress(y)!=B)return B;B=d.ownerDocument.createElement("diagram");B.setAttribute("name",mxResources.get("pageWithNumber",[1]));B.setAttribute("id",Editor.guid());mxUtils.setTextContent(B,y)}y=d.ownerDocument.createElement("mxfile");y.appendChild(B)}G?(y=y.cloneNode(!0),y.removeAttribute("modified"),y.removeAttribute("host"),y.removeAttribute("agent"),y.removeAttribute("etag"),y.removeAttribute("userAgent"),y.removeAttribute("version"),y.removeAttribute("editor"),y.removeAttribute("type")):(y.removeAttribute("userAgent"),y.removeAttribute("modified"),y.removeAttribute("version"),y.removeAttribute("editor"),y.removeAttribute("pages"),y.removeAttribute("type"),y.removeAttribute("etag"),mxClient.IS_CHROMEAPP?y.setAttribute("host","Chrome"):EditorUi.isElectronApp?y.setAttribute("host","Electron"):y.setAttribute("host",window.location.hostname),y.setAttribute("agent",-null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),y.setAttribute("version",EditorUi.VERSION),1<y.getElementsByTagName("diagram").length&&null!=this.pages&&y.setAttribute("pages",this.pages.length));null!=V&&(y=y.cloneNode(!0),y.setAttribute("scale",V));null!=Q&&(y=y.cloneNode(!0),y.setAttribute("border",Q));d=R?mxUtils.getPrettyXml(y):mxUtils.getXml(y);if(!x&&!t&&(A||null!=k&&/(\.html)$/i.test(k.getTitle())))d=this.getHtml2(mxUtils.getXml(y),g,null!=k?k.getTitle():null,q,P);else if(x||-!t&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(v=null),k=this.getSvgFileProperties(y),d=this.getEmbeddedSvg(d,g,v,null,J,D,P,null,null,k.scale,k.border,null,Editor.svgFileTheme);return d};EditorUi.prototype.getXmlFileData=function(d,g,k,v){d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.defaultCompressed;var t=this.editor.getGraphXml(d,v);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(D){var G=D.getElementsByTagName("mxGraphModel"),-R=0<G.length?G[0]:null;G=D;null==R&&k?(R=mxUtils.getNodeValue(D),0<R.length&&(R=Graph.decompress(R),null!=R&&0<R.length&&(G=D.cloneNode(!1),G.appendChild(mxUtils.parseXml(R).documentElement)))):null==R||k?G=D.cloneNode(!0):(G=D.cloneNode(!1),mxUtils.setTextContent(G,Graph.compressNode(R)));t.appendChild(G)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(t),t=this.fileNode.cloneNode(!1),g)d(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var x=this.pages[g],-A=x.node;if(x!=this.currentPage)if(x.needsUpdate){var J=new mxCodec(mxUtils.createXmlDocument());J=J.encode(new mxGraphModel(x.root));this.editor.graph.saveViewState(x.viewState,J,null,v);EditorUi.removeChildNodes(A);A.appendChild(J);delete x.needsUpdate}else v&&(this.updatePageRoot(x),null!=x.viewState.backgroundImage&&(null!=x.viewState.backgroundImage.originalSrc?x.viewState.backgroundImage=this.createImageForPageLink(x.viewState.backgroundImage.originalSrc,x):Graph.isPageLink(x.viewState.backgroundImage.src)&&-(x.viewState.backgroundImage=this.createImageForPageLink(x.viewState.backgroundImage.src,x))),null!=x.viewState.backgroundImage&&null!=x.viewState.backgroundImage.originalSrc&&(J=new mxCodec(mxUtils.createXmlDocument()),J=J.encode(new mxGraphModel(x.root)),this.editor.graph.saveViewState(x.viewState,J,null,v),A=A.cloneNode(!1),A.appendChild(J)));d(A)}return t};EditorUi.prototype.anonymizeString=function(d,g){for(var k=[],v=0;v<d.length;v++){var t=d.charAt(v);0<=EditorUi.ignoredAnonymizedChars.indexOf(t)?+null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),y.setAttribute("version",EditorUi.VERSION),1<y.getElementsByTagName("diagram").length&&null!=this.pages&&y.setAttribute("pages",this.pages.length));null!=U&&(y=y.cloneNode(!0),y.setAttribute("scale",U));null!=P&&(y=y.cloneNode(!0),y.setAttribute("border",P));d=S?mxUtils.getPrettyXml(y):mxUtils.getXml(y);if(!x&&!t&&(A||null!=k&&/(\.html)$/i.test(k.getTitle())))d=this.getHtml2(mxUtils.getXml(y),g,null!=k?k.getTitle():null,q,O);else if(x||+!t&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(u=null),k=this.getSvgFileProperties(y),d=this.getEmbeddedSvg(d,g,u,null,J,D,O,null,null,k.scale,k.border,null,Editor.svgFileTheme);return d};EditorUi.prototype.getXmlFileData=function(d,g,k,u){d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.defaultCompressed;var t=this.editor.getGraphXml(d,u);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(D){var G=D.getElementsByTagName("mxGraphModel"),+S=0<G.length?G[0]:null;G=D;null==S&&k?(S=mxUtils.getNodeValue(D),0<S.length&&(S=Graph.decompress(S),null!=S&&0<S.length&&(G=D.cloneNode(!1),G.appendChild(mxUtils.parseXml(S).documentElement)))):null==S||k?G=D.cloneNode(!0):(G=D.cloneNode(!1),mxUtils.setTextContent(G,Graph.compressNode(S)));t.appendChild(G)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(t),t=this.fileNode.cloneNode(!1),g)d(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var x=this.pages[g],+A=x.node;if(x!=this.currentPage)if(x.needsUpdate){var J=new mxCodec(mxUtils.createXmlDocument());J=J.encode(new mxGraphModel(x.root));this.editor.graph.saveViewState(x.viewState,J,null,u);EditorUi.removeChildNodes(A);A.appendChild(J);delete x.needsUpdate}else u&&(this.updatePageRoot(x),null!=x.viewState.backgroundImage&&(null!=x.viewState.backgroundImage.originalSrc?x.viewState.backgroundImage=this.createImageForPageLink(x.viewState.backgroundImage.originalSrc,x):Graph.isPageLink(x.viewState.backgroundImage.src)&&+(x.viewState.backgroundImage=this.createImageForPageLink(x.viewState.backgroundImage.src,x))),null!=x.viewState.backgroundImage&&null!=x.viewState.backgroundImage.originalSrc&&(J=new mxCodec(mxUtils.createXmlDocument()),J=J.encode(new mxGraphModel(x.root)),this.editor.graph.saveViewState(x.viewState,J,null,u),A=A.cloneNode(!1),A.appendChild(J)));d(A)}return t};EditorUi.prototype.anonymizeString=function(d,g){for(var k=[],u=0;u<d.length;u++){var t=d.charAt(u);0<=EditorUi.ignoredAnonymizedChars.indexOf(t)?k.push(t):isNaN(parseInt(t))?t.toLowerCase()!=t?k.push(String.fromCharCode(65+Math.round(25*Math.random()))):t.toUpperCase()!=t?k.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(t)?k.push(" "):k.push("?"):k.push(g?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSERT].length;g++)try{var k=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);-null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));d[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(k)}catch(x){d[EditorUi.DIFF_INSERT][g].data=x.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var v in d[EditorUi.DIFF_UPDATE]){var t=d[EditorUi.DIFF_UPDATE][v];null!=t.name&&(t.name=this.anonymizeString(t.name));null!=t.cells&&(g=mxUtils.bind(this,function(x){var A=t.cells[x];if(null!=A){for(var J in A)null!=A[J].value&&(A[J].value="["+A[J].value.length+"]"),-null!=A[J].xmlValue&&(A[J].xmlValue="["+A[J].xmlValue.length+"]"),null!=A[J].style&&(A[J].style="["+A[J].style.length+"]"),mxUtils.isEmptyObject(A[J])&&delete A[J];mxUtils.isEmptyObject(A)&&delete t.cells[x]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(t.cells)&&delete t.cells);mxUtils.isEmptyObject(t)&&delete d[EditorUi.DIFF_UPDATE][v]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,+null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));d[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(k)}catch(x){d[EditorUi.DIFF_INSERT][g].data=x.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var u in d[EditorUi.DIFF_UPDATE]){var t=d[EditorUi.DIFF_UPDATE][u];null!=t.name&&(t.name=this.anonymizeString(t.name));null!=t.cells&&(g=mxUtils.bind(this,function(x){var A=t.cells[x];if(null!=A){for(var J in A)null!=A[J].value&&(A[J].value="["+A[J].value.length+"]"),+null!=A[J].xmlValue&&(A[J].xmlValue="["+A[J].xmlValue.length+"]"),null!=A[J].style&&(A[J].style="["+A[J].style.length+"]"),mxUtils.isEmptyObject(A[J])&&delete A[J];mxUtils.isEmptyObject(A)&&delete t.cells[x]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(t.cells)&&delete t.cells);mxUtils.isEmptyObject(t)&&delete d[EditorUi.DIFF_UPDATE][u]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,g){if(null!=d.attributes)for(var k=0;k<d.attributes.length;k++)"as"!=d.attributes[k].name&&d.setAttribute(d.attributes[k].name,this.anonymizeString(d.attributes[k].value,g));if(null!=d.childNodes)for(k=0;k<d.childNodes.length;k++)this.anonymizeAttributes(d.childNodes[k],g)};EditorUi.prototype.anonymizeNode=function(d,g){g=d.getElementsByTagName("mxCell");for(var k=0;k<g.length;k++)null!=g[k].getAttribute("value")&&g[k].setAttribute("value","["+g[k].getAttribute("value").length+"]"),null!=g[k].getAttribute("xmlValue")&&g[k].setAttribute("xmlValue","["+g[k].getAttribute("xmlValue").length+"]"),null!=g[k].getAttribute("style")&&g[k].setAttribute("style","["+g[k].getAttribute("style").length+"]"),null!=g[k].parentNode&&"root"!=g[k].parentNode.nodeName&&null!=g[k].parentNode.parentNode&&(g[k].setAttribute("id",g[k].parentNode.getAttribute("id")),g[k].parentNode.parentNode.replaceChild(g[k],g[k].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),this.editor.setStatus(""),d?g.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){this.spinner.stop();g.handleFileError(k,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),-mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){t=null!=t?t:!0;x=null!=x?x:!1;G=null!=G?G:!Editor.defaultCompressed;var P=this.editor.graph;if((g||!d&&null!=D&&/(\.svg)$/i.test(D.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var q=P.getGlobalVariable;P=this.createTemporaryGraph(P.getStylesheet());P.setBackgroundImage=this.editor.graph.setBackgroundImage;P.background=this.editor.graph.background;var y=-null!=this.pages?this.pages[0]:null;null==y||this.currentPage==y?P.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&P.setBackgroundImage(y.viewState.backgroundImage);P.getGlobalVariable=function(B){return"page"==B&&null!=y?y.getName():"pagenumber"==B?1:q.apply(this,arguments)};document.body.appendChild(P.container);null!=y&&P.model.setRoot(y.root)}A=null!=A?A:this.getXmlFileData(t,x,G,R);D=null!=D?D:this.getCurrentFile();d=this.createFileData(A,P,D,window.location.href,-d,g,k,v,t,J,G,V,Q);P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);return d};EditorUi.prototype.getHtml=function(d,g,k,v,t,x){x=null!=x?x:!0;var A=null,J=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){A=x?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var D=g.view.scale;x=Math.floor(A.x/D-g.view.translate.x);D=Math.floor(A.y/D-g.view.translate.y);A=g.background;null==t&&(g=this.getBasenames().join(";"),0<g.length&&(J=EditorUi.drawHost+"/embed.js?s="+g));-d.setAttribute("x0",x);d.setAttribute("y0",D)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=v&&d.setAttribute("edit",v));null!=t&&(t=t.replace(/&/g,"&"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";v=Graph.compress(d);Graph.decompress(v)!=d&&(v=encodeURIComponent(d));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':-"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+"</head>\n<body"+(null==t&&null!=A&&A!=mxConstants.NONE?' style="background-color:'+A+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+v+"</div>\n</div>\n"+-(null==t?'<script type="text/javascript" src="'+J+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,g,k,v,t){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=t&&(t=t.replace(/&/g,"&"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,+mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(d,g,k,u,t,x,A,J,D,G,S,U,P){t=null!=t?t:!0;x=null!=x?x:!1;G=null!=G?G:!Editor.defaultCompressed;var O=this.editor.graph;if((g||!d&&null!=D&&/(\.svg)$/i.test(D.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var q=O.getGlobalVariable;O=this.createTemporaryGraph(O.getStylesheet());O.setBackgroundImage=this.editor.graph.setBackgroundImage;O.background=this.editor.graph.background;var y=+null!=this.pages?this.pages[0]:null;null==y||this.currentPage==y?O.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&O.setBackgroundImage(y.viewState.backgroundImage);O.getGlobalVariable=function(B){return"page"==B&&null!=y?y.getName():"pagenumber"==B?1:q.apply(this,arguments)};document.body.appendChild(O.container);null!=y&&O.model.setRoot(y.root)}A=null!=A?A:this.getXmlFileData(t,x,G,S);D=null!=D?D:this.getCurrentFile();d=this.createFileData(A,O,D,window.location.href,+d,g,k,u,t,J,G,U,P);O!=this.editor.graph&&O.container.parentNode.removeChild(O.container);return d};EditorUi.prototype.getHtml=function(d,g,k,u,t,x){x=null!=x?x:!0;var A=null,J=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){A=x?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var D=g.view.scale;x=Math.floor(A.x/D-g.view.translate.x);D=Math.floor(A.y/D-g.view.translate.y);A=g.background;null==t&&(g=this.getBasenames().join(";"),0<g.length&&(J=EditorUi.drawHost+"/embed.js?s="+g));+d.setAttribute("x0",x);d.setAttribute("y0",D)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=u&&d.setAttribute("edit",u));null!=t&&(t=t.replace(/&/g,"&"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";u=Graph.compress(d);Graph.decompress(u)!=d&&(u=encodeURIComponent(d));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':+"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+"</head>\n<body"+(null==t&&null!=A&&A!=mxConstants.NONE?' style="background-color:'+A+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+u+"</div>\n</div>\n"++(null==t?'<script type="text/javascript" src="'+J+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,g,k,u,t){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=t&&(t=t.replace(/&/g,"&"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==t?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var g=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null,k=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[g],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");d=null!=g?this.editor.extractGraphModel(g,!0):null;null!=d&&(g=d);if(null!=g&&"mxfile"==g.nodeName&&(d=g.getElementsByTagName("diagram"),-k={},0<d.length)){var v=this.getHashObject(),t=null;this.fileNode=g;this.pages=[];for(var x=0;x<d.length;x++){null==d[x].getAttribute("id")&&d[x].setAttribute("id",x);g=new DiagramPage(d[x]);null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[x+1]));this.pages.push(g);if(null==v.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||null!=v.pageId&&g.getId()==v.pageId)t=g;if(null==k[g.getId()])k[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=+k={},0<d.length)){var u=this.getHashObject(),t=null;this.fileNode=g;this.pages=[];for(var x=0;x<d.length;x++){null==d[x].getAttribute("id")&&d[x].setAttribute("id",x);g=new DiagramPage(d[x]);null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[x+1]));this.pages.push(g);if(null==u.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||null!=u.pageId&&g.getId()==u.pageId)t=g;if(null==k[g.getId()])k[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=null!=t?t:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}null==this.fileNode&&null!=g&&(this.fileNode=g.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(g.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(g);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),-this.scrollToPage());if(null!=urlParams["layer-ids"])try{var A=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(x=0;x<A.length;x++)g[A[x]]=!0;var J=this.editor.graph.getModel(),D=J.getChildren(J.root);for(x=0;x<D.length;x++){var G=D[x];J.setVisible(G,g[G.id]||!1)}}catch(R){}};EditorUi.prototype.getBaseFilename=function(d){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=-g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,k,v,t,x,A,J,D,G,R,V,Q,P,q,y){try{v=null!=v?v:this.editor.graph.isSelectionEmpty();var B=this.getBaseFilename(!t),C=B+("xml"==d||"pdf"==d&&R?".drawio":"")+"."+d;-if("xml"==d){var M=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,v,t,null,null,null,g);this.saveData(C,d,M,"text/xml")}else if("html"==d)M=this.getHtml2(this.getFileData(!0),this.editor.graph,B),this.saveData(C,d,M,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==d?C=B+".png":"jpeg"==d&&(C=B+".jpg"),this.saveRequest(C,d,mxUtils.bind(this,function(L,N){try{return this.createDownloadRequest(L,d,v,N,A,t,J,D,G,R,V,void 0,-void 0,!x,Q,P,q,y)}catch(O){this.handleError(O)}}));else{var T=null,m=mxUtils.bind(this,function(L){L.length<=MAX_REQUEST_SIZE?this.saveData(C,"svg",L,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});if("svg"==d){var z=this.editor.graph.background;if(A||z==mxConstants.NONE)z=null;var I=this.editor.graph.getSvg(z,null,null,null,null,v);k&&this.editor.graph.addSvgShadow(I);this.editor.convertImages(I,-mxUtils.bind(this,mxUtils.bind(this,function(L){this.spinner.stop();m(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(L))})))}else C=B+".svg",T=this.getFileData(!1,!0,null,mxUtils.bind(this,function(L){this.spinner.stop();m(L)}),v)}}catch(L){this.handleError(L)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,v,t,x,A,J,D,G,R,V,Q,P,q,y,B,C){d=this.downloadRequestBuilder(d,g,k,v,t,x,A,J,D,G,R,V,Q,P,q,y,B,C);g="";for(var M in d)k=d[M],null!=k&&(g+=M+"="+encodeURIComponent(k)+-"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(d,g,k,v,t,x,A,J,D,G,R,V,Q,P,q,y,B,C){var M=this.editor.graph,T=M.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==x?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var m=null,z=null,I=null;if(!EditorUi.isElectronApp&&(T.width*T.height>MAX_AREA||k.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==g&&(null!=R?(m=R.from,z=R.to):0==x&&(I=+this.scrollToPage());if(null!=urlParams["layer-ids"])try{var A=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(x=0;x<A.length;x++)g[A[x]]=!0;var J=this.editor.graph.getModel(),D=J.getChildren(J.root);for(x=0;x<D.length;x++){var G=D[x];J.setVisible(G,g[G.id]||!1)}}catch(S){}};EditorUi.prototype.getBaseFilename=function(d){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=+g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,k,u,t,x,A,J,D,G,S,U,P,O,q,y){try{u=null!=u?u:this.editor.graph.isSelectionEmpty();var B=this.getBaseFilename(!t),C=B+("xml"==d||"pdf"==d&&S?".drawio":"")+"."+d;+if("xml"==d){var M=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,u,t,null,null,null,g);this.saveData(C,d,M,"text/xml")}else if("html"==d)M=this.getHtml2(this.getFileData(!0),this.editor.graph,B),this.saveData(C,d,M,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==d?C=B+".png":"jpeg"==d&&(C=B+".jpg"),this.saveRequest(C,d,mxUtils.bind(this,function(L,N){try{return this.createDownloadRequest(L,d,u,N,A,t,J,D,G,S,U,void 0,+void 0,!x,P,O,q,y)}catch(Q){this.handleError(Q)}}));else{var T=null,m=mxUtils.bind(this,function(L){L.length<=MAX_REQUEST_SIZE?this.saveData(C,"svg",L,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});if("svg"==d){var z=this.editor.graph.background;if(A||z==mxConstants.NONE)z=null;var I=this.editor.graph.getSvg(z,null,null,null,null,u);k&&this.editor.graph.addSvgShadow(I);this.editor.convertImages(I,+mxUtils.bind(this,mxUtils.bind(this,function(L){this.spinner.stop();m(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(L))})))}else C=B+".svg",T=this.getFileData(!1,!0,null,mxUtils.bind(this,function(L){this.spinner.stop();m(L)}),u)}}catch(L){this.handleError(L)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,u,t,x,A,J,D,G,S,U,P,O,q,y,B,C){d=this.downloadRequestBuilder(d,g,k,u,t,x,A,J,D,G,S,U,P,O,q,y,B,C);g="";for(var M in d)k=d[M],null!=k&&(g+=M+"="+encodeURIComponent(k)++"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(d,g,k,u,t,x,A,J,D,G,S,U,P,O,q,y,B,C){var M=this.editor.graph,T=M.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==x?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var m=null,z=null,I=null;if(!EditorUi.isElectronApp&&(T.width*T.height>MAX_AREA||k.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==g&&(null!=S?(m=S.from,z=S.to):0==x&&(I="1"));"xmlpng"==g&&(G="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(x=0;x<this.pages.length;x++)if(this.pages[x]==this.currentPage){m=x;break}x=M.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!t?t||null!=x&&x!=mxConstants.NONE||(x="#ffffff"):x=mxConstants.NONE;t={globalVars:M.getExportVariables()};D&&(t.grid={size:M.gridSize,steps:M.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:M.view.gridColor});Graph.translateDiagram&&-(t.diagramLanguage=Graph.diagramLanguage);return{format:g,from:m,to:z,allPages:I,bg:null!=x?x:mxConstants.NONE,base64:v,embedXml:G,xml:k,filename:null!=d?d:"",extras:JSON.stringify(t),scale:A,border:J,pageMargin:q,w:V&&isFinite(V)?V:null,h:Q&&isFinite(Q)?Q:null,crop:null!=P&&P?"1":"0",fit:null!=y&&y?"1":"0",sheetsAcross:B,sheetsDown:C}};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));-if(null!=d&&1<d.length){var g=d.indexOf("#");0<=g&&(d=d.substring(0,g))}return d};EditorUi.prototype.getHashObject=function(){var d=window.location.hash,g={};if(null!=d&&0<d.length){var k=d.lastIndexOf("#");if(0<k){d=decodeURIComponent(d.substring(k+1));try{g=JSON.parse(d)}catch(v){}}}return g};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var d=this.getHashObject();d.pageId=this.currentPage.getId();this.setHashObject(d)}else this.setHashObject(null)};-EditorUi.prototype.setHashObject=function(d){if(Editor.enableHashObjects){var g=window.location.hash;if(null==g||""==g)g="#";var k=g.lastIndexOf("#");0<k&&(g=g.substring(0,k));try{null==d||mxUtils.isEmptyObject(d)||(g=g+"#"+encodeURIComponent(JSON.stringify(d)))}catch(v){}0<k&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};EditorUi.prototype.loadDescriptor=function(d,g,k){var v=window.location.hash,t=mxUtils.bind(this,function(A){var J=null!=d.data?d.data:"";null!=A&&0<A.length&&-(0<J.length&&(J+="\n"),J+=A);A=new LocalFile(this,"csv"!=d.format&&0<J.length?J:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);A.getHash=function(){return v};this.fileLoaded(A);"csv"==d.format&&this.importCsv(J,mxUtils.bind(this,function(Q){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var D=null!=d.interval?parseInt(d.interval):6E4,G=null,R=mxUtils.bind(this,function(){var Q=this.currentPage;-mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(P){Q===this.currentPage&&(200<=P.getStatus()&&300>=P.getStatus()?(this.updateDiagram(P.getText()),V()):this.handleError({message:mxResources.get("error")+" "+P.getStatus()}))}),mxUtils.bind(this,function(P){this.handleError(P)}))}),V=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(R,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){V();-R()}));V();R()}null!=g&&g()});if(null!=d.url&&0<d.url.length){var x=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(x,mxUtils.bind(this,function(A){t(A)}),mxUtils.bind(this,function(A){null!=k&&k(A)}))}else t("")};EditorUi.prototype.updateDiagram=function(d){function g(T){var m=new mxCellOverlay(T.image||t.warningImage,T.tooltip,T.align,T.valign,T.offset);m.addListener(mxEvent.CLICK,function(z,I){v.alert(T.tooltip)});return m}var k=null,v=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=-null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var t=this.editor.graph,x=t.getModel();x.beginUpdate();var A=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var J=x.getCell(d.getAttribute("id"));if(null!=J){try{var D=d.getAttribute("value");if(null!=D){var G=mxUtils.parseXml(D).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))x.setValue(J,G);else for(var R=G.attributes,V=0;V<R.length;V++)t.setAttributeForCell(J,R[V].nodeName,0<R[V].nodeValue.length?-R[V].nodeValue:null)}}catch(T){null!=window.console&&console.log("Error in value for "+J.id+": "+T)}try{var Q=d.getAttribute("style");null!=Q&&t.model.setStyle(J,Q)}catch(T){null!=window.console&&console.log("Error in style for "+J.id+": "+T)}try{var P=d.getAttribute("icon");if(null!=P){var q=0<P.length?JSON.parse(P):null;null!=q&&q.append||t.removeCellOverlays(J);null!=q&&t.addCellOverlay(J,g(q))}}catch(T){null!=window.console&&console.log("Error in icon for "+J.id+": "+T)}try{var y=d.getAttribute("geometry");+(t.diagramLanguage=Graph.diagramLanguage);return{format:g,from:m,to:z,allPages:I,bg:null!=x?x:mxConstants.NONE,base64:u,embedXml:G,xml:k,filename:null!=d?d:"",extras:JSON.stringify(t),scale:A,border:J,pageMargin:q,w:U&&isFinite(U)?U:null,h:P&&isFinite(P)?P:null,crop:null!=O&&O?"1":"0",fit:null!=y&&y?"1":"0",sheetsAcross:B,sheetsDown:C}};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));+if(null!=d&&1<d.length){var g=d.indexOf("#");0<=g&&(d=d.substring(0,g))}return d};EditorUi.prototype.getHashObject=function(){var d=window.location.hash,g={};if(null!=d&&0<d.length){var k=d.lastIndexOf("#");if(0<k){d=decodeURIComponent(d.substring(k+1));try{g=JSON.parse(d)}catch(u){}}}return g};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var d=this.getHashObject();d.pageId=this.currentPage.getId();this.setHashObject(d)}else this.setHashObject(null)};+EditorUi.prototype.setHashObject=function(d){if(Editor.enableHashObjects){var g=window.location.hash;if(null==g||""==g)g="#";var k=g.lastIndexOf("#");0<k&&(g=g.substring(0,k));try{null==d||mxUtils.isEmptyObject(d)||(g=g+"#"+encodeURIComponent(JSON.stringify(d)))}catch(u){}0<k&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};EditorUi.prototype.loadDescriptor=function(d,g,k){var u=window.location.hash,t=mxUtils.bind(this,function(A){var J=null!=d.data?d.data:"";null!=A&&0<A.length&&+(0<J.length&&(J+="\n"),J+=A);A=new LocalFile(this,"csv"!=d.format&&0<J.length?J:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);A.getHash=function(){return u};this.fileLoaded(A);"csv"==d.format&&this.importCsv(J,mxUtils.bind(this,function(P){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var D=null!=d.interval?parseInt(d.interval):6E4,G=null,S=mxUtils.bind(this,function(){var P=this.currentPage;+mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(O){P===this.currentPage&&(200<=O.getStatus()&&300>=O.getStatus()?(this.updateDiagram(O.getText()),U()):this.handleError({message:mxResources.get("error")+" "+O.getStatus()}))}),mxUtils.bind(this,function(O){this.handleError(O)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(S,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();+S()}));U();S()}null!=g&&g()});if(null!=d.url&&0<d.url.length){var x=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(x,mxUtils.bind(this,function(A){t(A)}),mxUtils.bind(this,function(A){null!=k&&k(A)}))}else t("")};EditorUi.prototype.updateDiagram=function(d){function g(T){var m=new mxCellOverlay(T.image||t.warningImage,T.tooltip,T.align,T.valign,T.offset);m.addListener(mxEvent.CLICK,function(z,I){u.alert(T.tooltip)});return m}var k=null,u=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=+null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var t=this.editor.graph,x=t.getModel();x.beginUpdate();var A=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var J=x.getCell(d.getAttribute("id"));if(null!=J){try{var D=d.getAttribute("value");if(null!=D){var G=mxUtils.parseXml(D).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))x.setValue(J,G);else for(var S=G.attributes,U=0;U<S.length;U++)t.setAttributeForCell(J,S[U].nodeName,0<S[U].nodeValue.length?+S[U].nodeValue:null)}}catch(T){null!=window.console&&console.log("Error in value for "+J.id+": "+T)}try{var P=d.getAttribute("style");null!=P&&t.model.setStyle(J,P)}catch(T){null!=window.console&&console.log("Error in style for "+J.id+": "+T)}try{var O=d.getAttribute("icon");if(null!=O){var q=0<O.length?JSON.parse(O):null;null!=q&&q.append||t.removeCellOverlays(J);null!=q&&t.addCellOverlay(J,g(q))}}catch(T){null!=window.console&&console.log("Error in icon for "+J.id+": "+T)}try{var y=d.getAttribute("geometry");if(null!=y){y=JSON.parse(y);var B=t.getCellGeometry(J);if(null!=B){B=B.clone();for(key in y){var C=parseFloat(y[key]);"dx"==key?B.x+=C:"dy"==key?B.y+=C:"dw"==key?B.width+=C:"dh"==key?B.height+=C:B[key]=parseFloat(y[key])}t.model.setGeometry(J,B)}}}catch(T){null!=window.console&&console.log("Error in icon for "+J.id+": "+T)}}}else if("model"==d.nodeName){for(var M=d.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(d.firstChild)).decode(M,x)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(t.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))t.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(A=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{x.endUpdate()}null!=A&&this.chromelessResize&&this.chromelessResize(!0,A)}return k};EditorUi.prototype.getCopyFilename=function(d,g){var k=null!=-d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var v=k.lastIndexOf(".");0<=v&&(d=k.substring(v),k=k.substring(0,v));if(g){g=k;var t=new Date;k=t.getFullYear();v=t.getMonth()+1;var x=t.getDate(),A=t.getHours(),J=t.getMinutes();t=t.getSeconds();k=g+(" "+(k+"-"+v+"-"+x+"-"+A+"-"+J+"-"+t))}return k=mxResources.get("copyOf",[k])+d};EditorUi.prototype.logIfModified=function(d,g){try{null!=d&&g&&EditorUi.debug("File.closed",[d])}catch(k){}};EditorUi.prototype.fileLoaded=function(d,g,k){var v=-this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var t=!1;this.hideDialog();null!=v&&(v.removeListener(this.descriptorChangedListener),this.logIfModified(v,!0),v.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var x=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=v&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!g&&null!=+d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var u=k.lastIndexOf(".");0<=u&&(d=k.substring(u),k=k.substring(0,u));if(g){g=k;var t=new Date;k=t.getFullYear();u=t.getMonth()+1;var x=t.getDate(),A=t.getHours(),J=t.getMinutes();t=t.getSeconds();k=g+(" "+(k+"-"+u+"-"+x+"-"+A+"-"+J+"-"+t))}return k=mxResources.get("copyOf",[k])+d};EditorUi.prototype.logIfModified=function(d,g){try{null!=d&&g&&EditorUi.debug("File.closed",[d])}catch(k){}};EditorUi.prototype.fileLoaded=function(d,g,k){var u=+this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var t=!1;this.hideDialog();null!=u&&(u.removeListener(this.descriptorChangedListener),this.logIfModified(u,!0),u.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var x=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=u&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!g&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();g||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?d.addUnsavedStatus():this.editor.setStatus(""):this.editor.setStatus('<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>");!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();null!=k&&k();this.editor.fireEvent(new mxEventObject("fileLoaded"));t=!0;if(!this.isOffline()&&null!=d.getMode()){var A="1"==urlParams.sketch?"sketch":uiTheme;if(null==A)A="default";else if("sketch"==A||"min"==A)A+=Editor.isDarkMode()?"-dark":"-light"}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(J){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(J){}}catch(J){this.fileLoadedError=J;if(null!=d)try{d.close()}catch(D){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,-mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=v?this.fileLoaded(v)||x():x()});g?d():(null!=J.fallbackFileData&&(J.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var D=new LocalFile(this,J.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(D)})}),this.handleError(J,mxResources.get("errorLoadingFile"),d,!0,null,null,!0))}else x();return t};EditorUi.prototype.getHashValueForPages=function(d,g){var k=-0,v=new mxGraphModel,t=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var x=0;x<d.length;x++){this.updatePageRoot(d[x]);var A=d[x].node.cloneNode(!1);A.removeAttribute("name");v.root=d[x].root;var J=t.encode(v);this.editor.graph.saveViewState(d[x].viewState,J,!0);J.removeAttribute("pageWidth");J.removeAttribute("pageHeight");A.appendChild(J);null!=g&&(g.eltCount+=A.getElementsByTagName("*").length,g.nodeCount+=A.getElementsByTagName("mxCell").length);k=(k<<5)-k+-this.hashValue(A,function(D,G,R,V){return!V||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?V&&"mxCell"==D.nodeName&&"previous"==G?null:R:Math.round(R)},g)<<0}return k};EditorUi.prototype.hashValue=function(d,g,k){var v=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(v^=this.hashValue(d.nodeName,g,k));if(null!=d.attributes){null!=k&&(k.attrCount+=d.attributes.length);-for(var t=0;t<d.attributes.length;t++){var x=d.attributes[t].name,A=null!=g?g(d,x,d.attributes[t].value,!0):d.attributes[t].value;null!=A&&(v^=this.hashValue(x,g,k)+this.hashValue(A,g,k))}}if(null!=d.childNodes)for(t=0;t<d.childNodes.length;t++)v=(v<<5)-v+this.hashValue(d.childNodes[t],g,k)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);g=0;null!=k&&(k.byteCount+=d.length);for(t=0;t<d.length;t++)g=(g<<5)-g+d.charCodeAt(t)<<0;v^=g}return v};EditorUi.prototype.descriptorChanged=function(){};-EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,g,k,v,t,x,A){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};+mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=u?this.fileLoaded(u)||x():x()});g?d():(null!=J.fallbackFileData&&(J.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var D=new LocalFile(this,J.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(D)})}),this.handleError(J,mxResources.get("errorLoadingFile"),d,!0,null,null,!0))}else x();return t};EditorUi.prototype.getHashValueForPages=function(d,g){var k=+0,u=new mxGraphModel,t=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var x=0;x<d.length;x++){this.updatePageRoot(d[x]);var A=d[x].node.cloneNode(!1);A.removeAttribute("name");u.root=d[x].root;var J=t.encode(u);this.editor.graph.saveViewState(d[x].viewState,J,!0);J.removeAttribute("pageWidth");J.removeAttribute("pageHeight");A.appendChild(J);null!=g&&(g.eltCount+=A.getElementsByTagName("*").length,g.nodeCount+=A.getElementsByTagName("mxCell").length);k=(k<<5)-k++this.hashValue(A,function(D,G,S,U){return!U||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?U&&"mxCell"==D.nodeName&&"previous"==G?null:S:Math.round(S)},g)<<0}return k};EditorUi.prototype.hashValue=function(d,g,k){var u=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(u^=this.hashValue(d.nodeName,g,k));if(null!=d.attributes){null!=k&&(k.attrCount+=d.attributes.length);+for(var t=0;t<d.attributes.length;t++){var x=d.attributes[t].name,A=null!=g?g(d,x,d.attributes[t].value,!0):d.attributes[t].value;null!=A&&(u^=this.hashValue(x,g,k)+this.hashValue(A,g,k))}}if(null!=d.childNodes)for(t=0;t<d.childNodes.length;t++)u=(u<<5)-u+this.hashValue(d.childNodes[t],g,k)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);g=0;null!=k&&(k.byteCount+=d.length);for(t=0;t<d.length;t++)g=(g<<5)-g+d.charCodeAt(t)<<0;u^=g}return u};EditorUi.prototype.descriptorChanged=function(){};+EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,g,k,u,t,x,A){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){if(!Editor.defaultCompressed)for(var g=0;g<d.length;g++)null!=d[g].xml&&"<"!=d[g].xml.charAt(0)&&(d[g].xml=mxUtils.trim(Graph.decompress(d[g].xml)));g=mxUtils.createXmlDocument();var k=g.createElement("mxlibrary");mxUtils.setTextContent(k,JSON.stringify(d,null,2));g.appendChild(k);return mxUtils.getXml(g,"\n")};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var g=this.sidebar.palettes[d];if(null!=g){for(var k=0;k<g.length;k++)g[k].parentNode.removeChild(g[k]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d,g){var k=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=d||!g){null==d&&(g=this.sidebar.palettes["L.scratchpad"],null==g&&(g=this.sidebar.palettes.search),null!=g&&(d=g[g.length-1].nextSibling));-d=null!=d?d:k.firstChild.nextSibling.nextSibling;g=k.lastChild;var v=g.previousSibling;k.insertBefore(g,d);k.insertBefore(v,g)}};EditorUi.prototype.loadLibrary=function(d,g){var k=mxUtils.parseXml(d.getData());if("mxlibrary"==k.documentElement.nodeName){var v=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(d,v,k.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.showSidebar=-function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(d,g,k,v){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());var t=null;if(d.constructor!=StorageLibrary||".scratchpad"!=d.title){null==this.openLibraries&&(this.openLibraries=[]);for(var x=0;x<this.openLibraries.length;x++)if(this.openLibraries[x].file.getHash()==d.getHash()){mxUtils.remove(this.openLibraries[x],-this.openLibraries);break}t={file:d,images:g,title:k,expand:v};this.openLibraries.push(t)}else this.scratchpad=d;x=this.sidebar.palettes[d.getHash()];x=null!=x?x[x.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var A=null,J=mxUtils.bind(this,function(C,M){0==C.length&&d.isEditable()?(null==A&&(A=document.createElement("div"),A.className="geDropTarget",mxUtils.write(A,mxResources.get("dragElementsHere"))),M.appendChild(A)):this.addLibraryEntries(C,M)});null!=this.sidebar&&null!=-g&&this.sidebar.addEntries(g);null==k&&(k=d.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var D=this.sidebar.addPalette(d.getHash(),k,null!=v?v:!0,mxUtils.bind(this,function(C){J(g,C)}));null!=t&&(t.div=D);this.repositionLibrary(x,"L.scratchpad"!=d.getHash());v=D.parentNode.previousSibling;k=v.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=d.title&&v.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+k);var G=document.createElement("div");G.style.backgroundColor=-"inherit";v.style.position="relative";var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.crossImage);R.setAttribute("title",mxResources.get("close"));R.setAttribute("valign","absmiddle");R.setAttribute("border","0");R.style.position="relative";R.style.top="2px";R.style.width="14px";R.style.cursor="pointer";R.style.margin="0 3px";var V=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(R),mxEvent.addListener(R,"click",mxUtils.bind(this,-function(C){if(!mxEvent.isConsumed(C)){var M=mxUtils.bind(this,function(){null!=t&&mxUtils.remove(t,this.openLibraries);this.closeLibrary(d)});null!=V?this.confirm(mxResources.get("allChangesLost"),null,M,mxResources.get("cancel"),mxResources.get("discardChanges")):M();mxEvent.consume(C)}}));if(d.isEditable()){var Q=this.editor.graph,P=null;k=mxUtils.bind(this,function(C){this.showLibraryDialog(d.getTitle(),D,g,d,d.getMode());mxEvent.consume(C)});var q=mxUtils.bind(this,function(C){d.setModified(!0);-d.isAutosave()?(null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P),P=R.cloneNode(!1),P.setAttribute("src",Editor.spinImage),P.setAttribute("title",mxResources.get("saving")),P.style.cursor="default",P.style.marginRight="2px",P.style.marginTop="-2px",G.insertBefore(P,G.firstChild),this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P)})):null==V&&(V=R.cloneNode(!1),V.setAttribute("src",Editor.saveImage),V.setAttribute("title",mxResources.get("save")),-G.insertBefore(V,G.firstChild),mxEvent.addListener(V,"click",mxUtils.bind(this,function(M){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==V||d.isModified()||(V.parentNode.removeChild(V),V=null)});mxEvent.consume(M)})))}),y=mxUtils.bind(this,function(C,M,T,m){C=Q.cloneCells(mxUtils.sortCells(Q.model.getTopmostCells(C)));for(var z=0;z<C.length;z++){var I=Q.getCellGeometry(C[z]);null!=I&&I.translate(-M.x,-M.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(C,-M.width,M.height,m||"",!0,null,!1));C=mxUtils.getXml(this.editor.graph.encodeCells(C));Editor.defaultCompressed&&(C=Graph.compress(C));M={xml:C,w:M.width,h:M.height};null!=m&&(M.title=m);g.push(M);q(T);null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),A=null)}),B=mxUtils.bind(this,function(C){if(Q.isSelectionEmpty())Q.getRubberband().isActive()?(Q.getRubberband().execute(C),Q.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),-mxResources.get("ok"));else{var M=Q.getSelectionCells(),T=Q.view.getBounds(M);if(null!=T&&0<T.width&&0<T.height){var m=Q.view.scale;T.x/=m;T.y/=m;T.width/=m;T.height/=m;T.x-=Q.view.translate.x;T.y-=Q.view.translate.y;y(M,T)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(C)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(C){Q.isMouseDown&&null!=Q.panningManager&&null!=Q.graphHandler.first&&(Q.graphHandler.suspend(),-null!=Q.graphHandler.hint&&(Q.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="light-dark(#fefefe, #000000)",D.style.cursor="copy",Q.panningManager.stop(),Q.autoScroll=!1,mxEvent.consume(C))}),mxUtils.bind(this,function(C){Q.isMouseDown&&null!=Q.panningManager&&null!=Q.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,Q.panningManager.stop(),Q.graphHandler.reset(),Q.isMouseDown=!1,Q.autoScroll=!0,B(C),mxEvent.consume(C))}));mxEvent.addListener(D,-"mouseleave",mxUtils.bind(this,function(C){Q.isMouseDown&&null!=Q.graphHandler.first&&(Q.graphHandler.resume(),null!=Q.graphHandler.hint&&(Q.graphHandler.hint.style.visibility="visible"),D.style.backgroundColor="",D.style.cursor="",Q.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(C){D.style.backgroundColor="light-dark(#fefefe, #000000)";C.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();C.stopPropagation();C.preventDefault()})),-mxEvent.addListener(D,"drop",mxUtils.bind(this,function(C){D.style.cursor="";D.style.backgroundColor="";0<C.dataTransfer.files.length&&this.importFiles(C.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(M,T,m,z,I,L,N,O,S){if(null!=M&&"image/"==T.substring(0,6))M="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(M),M=[new mxCell("",new mxGeometry(0,0,I,L),M)],M[0].vertex=!0,y(M,new mxRectangle(0,0,I,L),C,mxEvent.isAltDown(C)?-null:N.substring(0,N.lastIndexOf(".")).replace(/_/g," ")),null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),A=null);else{var U=!1,W=mxUtils.bind(this,function(X,Z){null!=X&&"application/pdf"==Z&&(Z=Editor.extractGraphModelFromPdf(X),null!=Z&&0<Z.length&&(X=Z));if(null!=X)if(X=mxUtils.parseXml(X),"mxlibrary"==X.documentElement.nodeName)try{var Y=JSON.parse(mxUtils.getTextContent(X.documentElement));J(Y,D);g=g.concat(Y);q(C);this.spinner.stop();U=!0}catch(fa){}else if("mxfile"==-X.documentElement.nodeName)try{var ba=X.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=this.stringToCells(Editor.getDiagramNodeXml(ba[Y])),ca=this.editor.graph.getBoundingBoxFromGeometry(ea);null!=ca&&y(ea,new mxRectangle(0,0,ca.width,ca.height),C)}U=!0}catch(fa){null!=window.console&&console.log("error in drop handler:",fa)}U||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),-A=null)});null!=S&&null!=N&&EditorUi.isVisioFilename(N)?this.importVisio(S,function(X){W(X,"text/xml")},null,N):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(M,N)&&null!=S?this.isExternalDataComms()?this.parseFile(S,mxUtils.bind(this,function(X){4==X.readyState&&(this.spinner.stop(),200<=X.status&&299>=X.status?W(X.responseText,"text/xml"):this.handleError({message:mxResources.get(413==X.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),-this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):W(M,T)}}));C.stopPropagation();C.preventDefault()})),mxEvent.addListener(D,"dragleave",function(C){D.style.cursor="";D.style.backgroundColor="";C.stopPropagation();C.preventDefault()}));R=R.cloneNode(!1);R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("edit"));G.insertBefore(R,G.firstChild);mxEvent.addListener(R,"click",k);k=R.cloneNode(!1);k.setAttribute("src",Editor.plusImage);k.setAttribute("title",-mxResources.get("add"));G.insertBefore(k,G.firstChild);mxEvent.addListener(k,"click",B);".scratchpad"==d.title&&(this.addSelectionToScratchpad=B);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(k=this.createHelpIcon(EditorUi.scratchpadHelpLink),x=k.getElementsByTagName("img")[0],k.style.marginRight="1px",x.style.marginTop="-2px",x.style.opacity="",G.insertBefore(k,G.firstChild))}v.appendChild(G);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=-function(d,g){for(var k=0;k<d.length;k++)try{var v=d[k],t=v.data;if(null!=t){t="data:"==t.substring(0,5)?this.convertDataUri(t):t;var x="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==v.aspect&&(x+="aspect=fixed;");x=x+"image="+t+";";null!=v.style&&(x+=v.style);g.appendChild(this.sidebar.createVertexTemplate(x,v.w,v.h,"",v.title||"",!1,null,!0))}else if(null!=v.xml){var A=this.stringToCells("<"==v.xml.charAt(0)?v.xml:Graph.decompress(v.xml)),J=0==A.length?mxResources.get("drawingEmpty"):-null!=v.title?v.title:"";g.appendChild(this.sidebar.createVertexTemplateFromCells(A,v.w,v.h,J,!0,null,!0))}}catch(D){J=null!=D.message?mxResources.get("error")+": "+D.message:String(D),x=this.sidebar.createVertexTemplateFromCells(null,v.w,v.h,J,!0,null,!0),g.appendChild(x)}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=+d=null!=d?d:k.firstChild.nextSibling.nextSibling;g=k.lastChild;var u=g.previousSibling;k.insertBefore(g,d);k.insertBefore(u,g)}};EditorUi.prototype.loadLibrary=function(d,g){var k=mxUtils.parseXml(d.getData());if("mxlibrary"==k.documentElement.nodeName){var u=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(d,u,k.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.showSidebar=+function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(d,g,k,u){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());var t=null;if(d.constructor!=StorageLibrary||".scratchpad"!=d.title){null==this.openLibraries&&(this.openLibraries=[]);for(var x=0;x<this.openLibraries.length;x++)if(this.openLibraries[x].file.getHash()==d.getHash()){mxUtils.remove(this.openLibraries[x],+this.openLibraries);break}t={file:d,images:g,title:k,expand:u};this.openLibraries.push(t)}else this.scratchpad=d;x=this.sidebar.palettes[d.getHash()];x=null!=x?x[x.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var A=null,J=mxUtils.bind(this,function(C,M){0==C.length&&d.isEditable()?(null==A&&(A=document.createElement("div"),A.className="geDropTarget",mxUtils.write(A,mxResources.get("dragElementsHere"))),M.appendChild(A)):this.addLibraryEntries(C,M)});null!=this.sidebar&&null!=+g&&this.sidebar.addEntries(g);null==k&&(k=d.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var D=this.sidebar.addPalette(d.getHash(),k,null!=u?u:!0,mxUtils.bind(this,function(C){J(g,C)}));null!=t&&(t.div=D);this.repositionLibrary(x,"L.scratchpad"!=d.getHash());u=D.parentNode.previousSibling;k=u.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=d.title&&u.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+k);var G=document.createElement("div");G.style.backgroundColor=+"inherit";u.style.position="relative";var S=document.createElement("img");S.className="geAdaptiveAsset";S.setAttribute("src",Editor.crossImage);S.setAttribute("title",mxResources.get("close"));S.setAttribute("valign","absmiddle");S.setAttribute("border","0");S.style.position="relative";S.style.top="2px";S.style.width="14px";S.style.cursor="pointer";S.style.margin="0 3px";var U=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(S),mxEvent.addListener(S,"click",mxUtils.bind(this,+function(C){if(!mxEvent.isConsumed(C)){var M=mxUtils.bind(this,function(){null!=t&&mxUtils.remove(t,this.openLibraries);this.closeLibrary(d)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,M,mxResources.get("cancel"),mxResources.get("discardChanges")):M();mxEvent.consume(C)}}));if(d.isEditable()){var P=this.editor.graph,O=null;k=mxUtils.bind(this,function(C){this.showLibraryDialog(d.getTitle(),D,g,d,d.getMode());mxEvent.consume(C)});var q=mxUtils.bind(this,function(C){d.setModified(!0);+d.isAutosave()?(null!=O&&null!=O.parentNode&&O.parentNode.removeChild(O),O=S.cloneNode(!1),O.setAttribute("src",Editor.spinImage),O.setAttribute("title",mxResources.get("saving")),O.style.cursor="default",O.style.marginRight="2px",O.style.marginTop="-2px",G.insertBefore(O,G.firstChild),this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=O&&null!=O.parentNode&&O.parentNode.removeChild(O)})):null==U&&(U=S.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),+G.insertBefore(U,G.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(M){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==U||d.isModified()||(U.parentNode.removeChild(U),U=null)});mxEvent.consume(M)})))}),y=mxUtils.bind(this,function(C,M,T,m){C=P.cloneCells(mxUtils.sortCells(P.model.getTopmostCells(C)));for(var z=0;z<C.length;z++){var I=P.getCellGeometry(C[z]);null!=I&&I.translate(-M.x,-M.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(C,+M.width,M.height,m||"",!0,null,!1));C=mxUtils.getXml(this.editor.graph.encodeCells(C));Editor.defaultCompressed&&(C=Graph.compress(C));M={xml:C,w:M.width,h:M.height};null!=m&&(M.title=m);g.push(M);q(T);null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),A=null)}),B=mxUtils.bind(this,function(C){if(P.isSelectionEmpty())P.getRubberband().isActive()?(P.getRubberband().execute(C),P.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),+mxResources.get("ok"));else{var M=P.getSelectionCells(),T=P.view.getBounds(M);if(null!=T&&0<T.width&&0<T.height){var m=P.view.scale;T.x/=m;T.y/=m;T.width/=m;T.height/=m;T.x-=P.view.translate.x;T.y-=P.view.translate.y;y(M,T)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(C)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(C){P.isMouseDown&&null!=P.panningManager&&null!=P.graphHandler.first&&(P.graphHandler.suspend(),+null!=P.graphHandler.hint&&(P.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="light-dark(#fefefe, #000000)",D.style.cursor="copy",P.panningManager.stop(),P.autoScroll=!1,mxEvent.consume(C))}),mxUtils.bind(this,function(C){P.isMouseDown&&null!=P.panningManager&&null!=P.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,P.panningManager.stop(),P.graphHandler.reset(),P.isMouseDown=!1,P.autoScroll=!0,B(C),mxEvent.consume(C))}));mxEvent.addListener(D,+"mouseleave",mxUtils.bind(this,function(C){P.isMouseDown&&null!=P.graphHandler.first&&(P.graphHandler.resume(),null!=P.graphHandler.hint&&(P.graphHandler.hint.style.visibility="visible"),D.style.backgroundColor="",D.style.cursor="",P.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(C){D.style.backgroundColor="light-dark(#fefefe, #000000)";C.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();C.stopPropagation();C.preventDefault()})),+mxEvent.addListener(D,"drop",mxUtils.bind(this,function(C){D.style.cursor="";D.style.backgroundColor="";0<C.dataTransfer.files.length&&this.importFiles(C.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(M,T,m,z,I,L,N,Q,R){if(null!=M&&"image/"==T.substring(0,6))M="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(M),M=[new mxCell("",new mxGeometry(0,0,I,L),M)],M[0].vertex=!0,y(M,new mxRectangle(0,0,I,L),C,mxEvent.isAltDown(C)?+null:N.substring(0,N.lastIndexOf(".")).replace(/_/g," ")),null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),A=null);else{var V=!1,W=mxUtils.bind(this,function(X,Z){null!=X&&"application/pdf"==Z&&(Z=Editor.extractGraphModelFromPdf(X),null!=Z&&0<Z.length&&(X=Z));if(null!=X)if(X=mxUtils.parseXml(X),"mxlibrary"==X.documentElement.nodeName)try{var Y=JSON.parse(mxUtils.getTextContent(X.documentElement));J(Y,D);g=g.concat(Y);q(C);this.spinner.stop();V=!0}catch(ea){}else if("mxfile"==+X.documentElement.nodeName)try{var ba=X.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var da=this.stringToCells(Editor.getDiagramNodeXml(ba[Y])),ca=this.editor.graph.getBoundingBoxFromGeometry(da);null!=ca&&y(da,new mxRectangle(0,0,ca.width,ca.height),C)}V=!0}catch(ea){null!=window.console&&console.log("error in drop handler:",ea)}V||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),+A=null)});null!=R&&null!=N&&EditorUi.isVisioFilename(N)?this.importVisio(R,function(X){W(X,"text/xml")},null,N):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(M,N)&&null!=R?this.isExternalDataComms()?this.parseFile(R,mxUtils.bind(this,function(X){4==X.readyState&&(this.spinner.stop(),200<=X.status&&299>=X.status?W(X.responseText,"text/xml"):this.handleError({message:mxResources.get(413==X.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),+this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):W(M,T)}}));C.stopPropagation();C.preventDefault()})),mxEvent.addListener(D,"dragleave",function(C){D.style.cursor="";D.style.backgroundColor="";C.stopPropagation();C.preventDefault()}));S=S.cloneNode(!1);S.setAttribute("src",Editor.editImage);S.setAttribute("title",mxResources.get("edit"));G.insertBefore(S,G.firstChild);mxEvent.addListener(S,"click",k);k=S.cloneNode(!1);k.setAttribute("src",Editor.plusImage);k.setAttribute("title",+mxResources.get("add"));G.insertBefore(k,G.firstChild);mxEvent.addListener(k,"click",B);".scratchpad"==d.title&&(this.addSelectionToScratchpad=B);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(k=this.createHelpIcon(EditorUi.scratchpadHelpLink),x=k.getElementsByTagName("img")[0],k.style.marginRight="1px",x.style.marginTop="-2px",x.style.opacity="",G.insertBefore(k,G.firstChild))}u.appendChild(G);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=+function(d,g){for(var k=0;k<d.length;k++)try{var u=d[k],t=u.data;if(null!=t){t="data:"==t.substring(0,5)?this.convertDataUri(t):t;var x="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==u.aspect&&(x+="aspect=fixed;");x=x+"image="+t+";";null!=u.style&&(x+=u.style);g.appendChild(this.sidebar.createVertexTemplate(x,u.w,u.h,"",u.title||"",!1,null,!0))}else if(null!=u.xml){var A=this.stringToCells("<"==u.xml.charAt(0)?u.xml:Graph.decompress(u.xml)),J=0==A.length?mxResources.get("drawingEmpty"):+null!=u.title?u.title:"";g.appendChild(this.sidebar.createVertexTemplateFromCells(A,u.w,u.h,J,!0,null,!0))}}catch(D){J=null!=D.message?mxResources.get("error")+": "+D.message:String(D),x=this.sidebar.createVertexTemplateFromCells(null,u.w,u.h,J,!0,null,!0),g.appendChild(x)}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38);"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=-".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,g,k,v,t,x,A){d=new ImageDialog(this,d,g,k,v,t,x,A);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showLocalStorageDialog=function(d,g,k,v,t,x){var A=localStorage.getItem(g);d=new TextareaDialog(this,d,null!=A?JSON.stringify(JSON.parse(A),null,2):"",mxUtils.bind(this,function(J){if(null!=J)try{if(null!=x&&-x(J),J==A)this.hideDialog();else{if(0<J.length){var D=JSON.parse(J);localStorage.setItem(g,JSON.stringify(D))}else localStorage.removeItem(g);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(G){this.handleError(G)}}),null,mxResources.get("close"),null,null,null,!0,null,null,t,k,v);this.showDialog(d.container,660,480,!0,!1);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,g,k,v){d=null!=d?d:mxUtils.bind(this,function(t,x,A,J){x||(t=new ChangePageSetup(this,-v?A:null,t),t.ignoreColor=!v,null!=J&&v&&(t.shadowVisible=J),this.editor.graph.model.execute(t))});d=new BackgroundImageDialog(this,d,g,k,v);this.showDialog(d.container,400,v?240:220,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,g,k,v,t){d=new LibraryDialog(this,d,g,k,v,t);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(x){x&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var f=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=-function(d){var g=f.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.handleError=function(d,g,k,v,t,x,A){var J=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{A||EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,-d.filename,d.lineNumber,d.columnNumber,d,"INFO"),"1"!=urlParams.test&&!A||null==window.console||console.error("EditorUi.handleError:",d)}catch(Q){}if(null!=D||null!=g){A=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var G=mxResources.get("ok"),R=null;g=null!=g?g:mxResources.get("error");if(null!=D){null!=D.retry&&(G=mxResources.get("cancel"),R=function(){J();D.retry()});if(404==D.code||404==D.status||403==D.code){A=403==D.code?null!=D.message?mxUtils.htmlEntities(D.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),-!1):null!=t?t:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var V=null!=t?null:null!=x?x:window.location.hash;if(null!=V&&("#G"==V.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==V.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||-404==D.code||404==D.status)){V="#U"==V.substring(0,2)?V.substring(45,V.lastIndexOf("%26ex")):V.substring(2);this.showError(g,A,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+V);null!=v&&v()}),R,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Q(){B.innerText="";for(var C=0;C<P.length;C++){var M=document.createElement("option");mxUtils.write(M,P[C].displayName);M.value=C;B.appendChild(M);M=document.createElement("option");-M.innerHTML=" ";mxUtils.write(M,"<"+P[C].email+">");M.setAttribute("disabled","disabled");B.appendChild(M)}M=document.createElement("option");mxUtils.write(M,mxResources.get("addAccount"));M.value=P.length;B.appendChild(M)}var P=this.drive.getUsersList(),q=document.createElement("div"),y=document.createElement("div");y.style.marginBottom="6px";mxUtils.write(y,mxResources.get("changeUser")+": ");q.appendChild(y);var B=document.createElement("select");B.style.width="100%";Q();mxEvent.addListener(B,-"change",mxUtils.bind(this,function(){var C=B.value,M=P.length!=C;M&&this.drive.setUser(P[C]);this.drive.authorize(M,mxUtils.bind(this,function(){M||(P=this.drive.getUsersList(),Q())}),mxUtils.bind(this,function(T){this.handleError(T)}),!0)}));q.appendChild(B);q=new CustomDialog(this,q,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(q.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),+".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,g,k,u,t,x,A){d=new ImageDialog(this,d,g,k,u,t,x,A);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showLocalStorageDialog=function(d,g,k,u,t,x){var A=localStorage.getItem(g);d=new TextareaDialog(this,d,null!=A?JSON.stringify(JSON.parse(A),null,2):"",mxUtils.bind(this,function(J){if(null!=J)try{if(null!=x&&+x(J),J==A)this.hideDialog();else{if(0<J.length){var D=JSON.parse(J);localStorage.setItem(g,JSON.stringify(D))}else localStorage.removeItem(g);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(G){this.handleError(G)}}),null,mxResources.get("close"),null,null,null,!0,null,null,t,k,u);this.showDialog(d.container,660,480,!0,!1);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,g,k,u){d=null!=d?d:mxUtils.bind(this,function(t,x,A,J){x||(t=new ChangePageSetup(this,+u?A:null,t),t.ignoreColor=!u,null!=J&&u&&(t.shadowVisible=J),this.editor.graph.model.execute(t))});d=new BackgroundImageDialog(this,d,g,k,u);this.showDialog(d.container,400,u?240:220,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,g,k,u,t){d=new LibraryDialog(this,d,g,k,u,t);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(x){x&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var f=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=+function(d){var g=f.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.handleError=function(d,g,k,u,t,x,A){var J=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{A||EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,+d.filename,d.lineNumber,d.columnNumber,d,"INFO"),"1"!=urlParams.test&&!A||null==window.console||console.error("EditorUi.handleError:",d)}catch(P){}if(null!=D||null!=g){A=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var G=mxResources.get("ok"),S=null;g=null!=g?g:mxResources.get("error");if(null!=D){null!=D.retry&&(G=mxResources.get("cancel"),S=function(){J();D.retry()});if(404==D.code||404==D.status||403==D.code){A=403==D.code?null!=D.message?mxUtils.htmlEntities(D.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),+!1):null!=t?t:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var U=null!=t?null:null!=x?x:window.location.hash;if(null!=U&&("#G"==U.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==U.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||+404==D.code||404==D.status)){U="#U"==U.substring(0,2)?U.substring(45,U.lastIndexOf("%26ex")):U.substring(2);this.showError(g,A,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+U);null!=u&&u()}),S,mxResources.get("changeUser"),mxUtils.bind(this,function(){function P(){B.innerText="";for(var C=0;C<O.length;C++){var M=document.createElement("option");mxUtils.write(M,O[C].displayName);M.value=C;B.appendChild(M);M=document.createElement("option");+M.innerHTML=" ";mxUtils.write(M,"<"+O[C].email+">");M.setAttribute("disabled","disabled");B.appendChild(M)}M=document.createElement("option");mxUtils.write(M,mxResources.get("addAccount"));M.value=O.length;B.appendChild(M)}var O=this.drive.getUsersList(),q=document.createElement("div"),y=document.createElement("div");y.style.marginBottom="6px";mxUtils.write(y,mxResources.get("changeUser")+": ");q.appendChild(y);var B=document.createElement("select");B.style.width="100%";P();mxEvent.addListener(B,+"change",mxUtils.bind(this,function(){var C=B.value,M=O.length!=C;M&&this.drive.setUser(O[C]);this.drive.authorize(M,mxUtils.bind(this,function(){M||(O=this.drive.getUsersList(),P())}),mxUtils.bind(this,function(T){this.handleError(T)}),!0)}));q.appendChild(B);q=new CustomDialog(this,q,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(q.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),520,150);return}}null!=D.message?A=""==D.message&&null!=D.name?mxUtils.htmlEntities(D.name,!1):mxUtils.htmlEntities(D.message,!1):null!=D.response&&null!=D.response.error?A=mxUtils.htmlEntities(D.response.error,!1):"undefined"!==typeof window.App&&(D.code==App.ERROR_TIMEOUT?A=mxUtils.htmlEntities(mxResources.get("timeout"),!1):D.code==App.ERROR_BUSY?A=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof D&&0<D.length&&(A=mxUtils.htmlEntities(D,!1)))}t=d=null;null!=D&&null!=D.helpLink?-(d=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):null!=D&&null!=D.ownerEmail?(d=mxResources.get("contactOwner"),A+=mxUtils.htmlEntities(" ("+d+": "+D.ownerEmail+")",!1),t=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))})):null!=D&&null!=D.alternateAction&&(d=D.alternateAction.label,t=D.alternateAction.funct);this.showError(g,A,G,k,R,null,null,d,t,null,null,null,v?k:null)}else null!=k&&k()};EditorUi.prototype.alert=-function(d,g,k){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,k||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,g,k,v,t,x){d=null!=d?d:"";var A=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},J=Math.min(220,28*Math.ceil(Math.max(1,d.length)/50));d=new ConfirmDialog(this,d,function(){A();null!=g&&g()},function(){A();null!=k&&k()},v,t,null,null,null,null,J);this.showDialog(d.container,340,46+J,!0,x);d.init()};EditorUi.prototype.showBanner=-function(d,g,k,v,t,x,A,J,D){var G=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){x=null!=x?x:"bottom:10px;left:50%;";A=null!=A?A:"translate(-50%,120%)";J=null!=J?J:"translate(-50%,0%)";var R=t?500:1E3;G=t?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var V=document.createElement("div");V.style.cssText="position:absolute;"+-x+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";"+G;mxUtils.setPrefixedStyle(V.style,"transform",A);mxUtils.setPrefixedStyle(V.style,"transition","all "+R+"ms ease");V.className="geBtn gePrimaryBtn"+(t?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(V.style,"box-shadow","1px 1px 2px 0px #ddd");null!=D&&mxUtils.setPrefixedStyle(V.style,"transform-origin",D);if(!t){var Q=document.createElement("img");Q.setAttribute("src",IMAGE_PATH+"/logo.png");-Q.setAttribute("border","0");Q.setAttribute("align","absmiddle");Q.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";V.appendChild(Q);Q=document.createElement("img");Q.setAttribute("src",Dialog.prototype.closeImage);Q.setAttribute("title",mxResources.get(v?"doNotShowAgain":"close"));Q.setAttribute("border","0");Q.style.cssText=(t?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";V.appendChild(Q)}mxUtils.write(V,-g);document.body.appendChild(V);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var P=document.createElement("input");P.setAttribute("type","checkbox");P.setAttribute("id","geDoNotShowAgainCheckbox");P.style.marginRight="6px";if(!v){g.appendChild(P);var q=document.createElement("label");q.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(q,-mxResources.get("doNotShowAgain"));g.appendChild(q);V.style.paddingBottom=t?"16px":"30px";V.appendChild(g)}var y=mxUtils.bind(this,function(){null!=V.parentNode&&(V.parentNode.removeChild(V),this.bannerShowing=!1,P.checked||v)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});null!=Q&&mxEvent.addListener(Q,"click",mxUtils.bind(this,function(C){mxEvent.consume(C);y()}));var B=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(V.style,-"transform",A);window.setTimeout(mxUtils.bind(this,function(){y()}),R)});mxEvent.addListener(V,"click",mxUtils.bind(this,function(C){var M=mxEvent.getSource(C);M!=P&&M!=q?(null!=k&&k(),y(),mxEvent.consume(C)):B()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(V.style,"transform",J)}),R/2);window.setTimeout(B,t?4E3:3E4);G=!0}return G};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};-EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,g,k,v){d=d.toDataURL("image/"+k);if(null!=d&&6<d.length)null!=g&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(g))),0<v&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",v));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,g,k,v,t){var x="jpeg"==k?"jpg":k;v=this.getBaseFilename(v)+(null!=g?".drawio":-"")+"."+x;d=this.createImageDataUri(d,g,k,t);this.saveData(v,x,d.substring(d.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,g){d=new TextareaDialog(this,d,g,null,null,mxResources.get("close"));-this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,g,k,v,t,x){"text/xml"!=k||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.html)$/i.test(g)||(g=g+"."+(null!=x?x:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=v?this.base64ToBlob(d,k):new Blob([d],{type:k}),navigator.msSaveOrOpenBlob(d,g);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==-k?mxUtils.popup(d,!0):(k.document.write(d),k.document.close(),k.document.execCommand("SaveAs",!0,g),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(g+":",d):this.openInNewWindow(d,k,v);else{var A=document.createElement("a");x=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof A.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var J=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);-x=65==(J?parseInt(J[2],10):!1)?!1:x}if(x||this.isOffline()){A.href=URL.createObjectURL(v?this.base64ToBlob(d,k):new Blob([d],{type:k}));x?A.download=g:A.setAttribute("target","_blank");document.body.appendChild(A);try{window.setTimeout(function(){URL.revokeObjectURL(A.href)},2E4),A.click(),A.parentNode.removeChild(A)}catch(D){}}else this.createEchoRequest(d,g,k,v,t).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,k,v,t,x){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,-d+(null!=k?"&mime="+k:"")+(null!=t?"&format="+t:"")+(null!=x?"&base64="+x:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(v?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(d,g,k,v,t,x,A,J){x=null!=x?x:!1;A=null!=A?A:"vsdx"!=t&&(!mxClient.IS_IOS||!navigator.standalone);var D=mxUtils.bind(this,function(R,V,Q,P){try{if("_blank"==V)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(d,k,v);else if(null!=k&&"text/html"==k.substring(0,9)){var q=new EmbedDialog(this,d);this.showDialog(q.container,-450,240,!0,!0);q.init()}else{var y=window.open("about:blank");null==y?mxUtils.popup(d,!0):(y.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),y.document.close())}else if(V==App.MODE_DEVICE||"download"==V)this.doSaveLocalFile(d,R,k,v,null,J);else if(null!=R&&0<R.length){var B=mxUtils.bind(this,function(C){try{this.exportFile(d,R,k,v,V,C)}catch(M){this.handleError(M)}});null!=P?B(P):this.pickFolder(V,B)}}catch(C){this.handleError(C)}});t=[];x||t.push(App.MODE_BROWSER);A||t.push("_blank");-var G=new SaveDialog(this,g,mxUtils.bind(this,function(R,V,Q){D(R.value,V,R,Q);this.hideDialog(null,null,G.container)}),t,d,k,v);this.showDialog(G.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));G.init()};EditorUi.prototype.openInNewWindow=function(d,g,k){var v=window.open("about:blank");if(null==v||null==v.document)mxUtils.popup(d,!0);else{var t="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==g){var x=mxUtils.parseXml(d).documentElement.style.backgroundColor;-""!=x&&(t="background: "+x+";")}t='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+t+'">';"image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||k?(x=k?d:btoa(unescape(encodeURIComponent(d))),v.document.write(t+'<img style="max-width:100%;" src="data:'+g+";base64,"+x+'"/></body></html>')):v.document.write(t+d+"</body></html>"):v.document.write(t+"<pre>"+mxUtils.htmlEntities(d,!1)+"</pre></body></html>");v.document.close()}};var c=EditorUi.prototype.addChromelessToolbarItems;-EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var g=d(mxUtils.bind(this,function(v){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),+(d=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):null!=D&&null!=D.ownerEmail?(d=mxResources.get("contactOwner"),A+=mxUtils.htmlEntities(" ("+d+": "+D.ownerEmail+")",!1),t=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))})):null!=D&&null!=D.alternateAction&&(d=D.alternateAction.label,t=D.alternateAction.funct);this.showError(g,A,G,k,S,null,null,d,t,null,null,null,u?k:null)}else null!=k&&k()};EditorUi.prototype.alert=+function(d,g,k){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,k||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,g,k,u,t,x){d=null!=d?d:"";var A=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},J=Math.min(220,28*Math.ceil(Math.max(1,d.length)/50));d=new ConfirmDialog(this,d,function(){A();null!=g&&g()},function(){A();null!=k&&k()},u,t,null,null,null,null,J);this.showDialog(d.container,340,46+J,!0,x);d.init()};EditorUi.prototype.showBanner=+function(d,g,k,u,t,x,A,J,D){var G=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){x=null!=x?x:"bottom:10px;left:50%;";A=null!=A?A:"translate(-50%,120%)";J=null!=J?J:"translate(-50%,0%)";var S=t?500:1E3;G=t?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var U=document.createElement("div");U.style.cssText="position:absolute;"++x+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";"+G;mxUtils.setPrefixedStyle(U.style,"transform",A);mxUtils.setPrefixedStyle(U.style,"transition","all "+S+"ms ease");U.className="geBtn gePrimaryBtn"+(t?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(U.style,"box-shadow","1px 1px 2px 0px #ddd");null!=D&&mxUtils.setPrefixedStyle(U.style,"transform-origin",D);if(!t){var P=document.createElement("img");P.setAttribute("src",IMAGE_PATH+"/logo.png");+P.setAttribute("border","0");P.setAttribute("align","absmiddle");P.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";U.appendChild(P);P=document.createElement("img");P.setAttribute("src",Dialog.prototype.closeImage);P.setAttribute("title",mxResources.get(u?"doNotShowAgain":"close"));P.setAttribute("border","0");P.style.cssText=(t?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";U.appendChild(P)}mxUtils.write(U,+g);document.body.appendChild(U);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var O=document.createElement("input");O.setAttribute("type","checkbox");O.setAttribute("id","geDoNotShowAgainCheckbox");O.style.marginRight="6px";if(!u){g.appendChild(O);var q=document.createElement("label");q.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(q,+mxResources.get("doNotShowAgain"));g.appendChild(q);U.style.paddingBottom=t?"16px":"30px";U.appendChild(g)}var y=mxUtils.bind(this,function(){null!=U.parentNode&&(U.parentNode.removeChild(U),this.bannerShowing=!1,O.checked||u)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});null!=P&&mxEvent.addListener(P,"click",mxUtils.bind(this,function(C){mxEvent.consume(C);y()}));var B=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(U.style,+"transform",A);window.setTimeout(mxUtils.bind(this,function(){y()}),S)});mxEvent.addListener(U,"click",mxUtils.bind(this,function(C){var M=mxEvent.getSource(C);M!=O&&M!=q?(null!=k&&k(),y(),mxEvent.consume(C)):B()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(U.style,"transform",J)}),S/2);window.setTimeout(B,t?4E3:3E4);G=!0}return G};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};+EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,g,k,u){d=d.toDataURL("image/"+k);if(null!=d&&6<d.length)null!=g&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(g))),0<u&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",u));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,g,k,u,t){var x="jpeg"==k?"jpg":k;u=this.getBaseFilename(u)+(null!=g?".drawio":+"")+"."+x;d=this.createImageDataUri(d,g,k,t);this.saveData(u,x,d.substring(d.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,g){d=new TextareaDialog(this,d,g,null,null,mxResources.get("close"));+this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,g,k,u,t,x){"text/xml"!=k||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.html)$/i.test(g)||(g=g+"."+(null!=x?x:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=u?this.base64ToBlob(d,k):new Blob([d],{type:k}),navigator.msSaveOrOpenBlob(d,g);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==+k?mxUtils.popup(d,!0):(k.document.write(d),k.document.close(),k.document.execCommand("SaveAs",!0,g),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(g+":",d):this.openInNewWindow(d,k,u);else{var A=document.createElement("a");x=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof A.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var J=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);+x=65==(J?parseInt(J[2],10):!1)?!1:x}if(x||this.isOffline()){A.href=URL.createObjectURL(u?this.base64ToBlob(d,k):new Blob([d],{type:k}));x?A.download=g:A.setAttribute("target","_blank");document.body.appendChild(A);try{window.setTimeout(function(){URL.revokeObjectURL(A.href)},2E4),A.click(),A.parentNode.removeChild(A)}catch(D){}}else this.createEchoRequest(d,g,k,u,t).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,k,u,t,x){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,+d+(null!=k?"&mime="+k:"")+(null!=t?"&format="+t:"")+(null!=x?"&base64="+x:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(u?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(d,g,k,u,t,x,A,J){x=null!=x?x:!1;A=null!=A?A:"vsdx"!=t&&(!mxClient.IS_IOS||!navigator.standalone);var D=mxUtils.bind(this,function(S,U,P,O){try{if("_blank"==U)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(d,k,u);else if(null!=k&&"text/html"==k.substring(0,9)){var q=new EmbedDialog(this,d);this.showDialog(q.container,+450,240,!0,!0);q.init()}else{var y=window.open("about:blank");null==y?mxUtils.popup(d,!0):(y.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),y.document.close())}else if(U==App.MODE_DEVICE||"download"==U)this.doSaveLocalFile(d,S,k,u,null,J);else if(null!=S&&0<S.length){var B=mxUtils.bind(this,function(C){try{this.exportFile(d,S,k,u,U,C)}catch(M){this.handleError(M)}});null!=O?B(O):this.pickFolder(U,B)}}catch(C){this.handleError(C)}});t=[];x||t.push(App.MODE_BROWSER);A||t.push("_blank");+var G=new SaveDialog(this,g,mxUtils.bind(this,function(S,U,P){D(S.value,U,S,P);this.hideDialog(null,null,G.container)}),t,d,k,u);this.showDialog(G.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));G.init()};EditorUi.prototype.openInNewWindow=function(d,g,k){var u=window.open("about:blank");if(null==u||null==u.document)mxUtils.popup(d,!0);else{var t="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==g){var x=mxUtils.parseXml(d).documentElement.style.backgroundColor;+""!=x&&(t="background: "+x+";")}t='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+t+'">';"image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||k?(x=k?d:btoa(unescape(encodeURIComponent(d))),u.document.write(t+'<img style="max-width:100%;" src="data:'+g+";base64,"+x+'"/></body></html>')):u.document.write(t+d+"</body></html>"):u.document.write(t+"<pre>"+mxUtils.htmlEntities(d,!1)+"</pre></body></html>");u.document.close()}};var c=EditorUi.prototype.addChromelessToolbarItems;+EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var g=d(mxUtils.bind(this,function(u){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var t=g.getBoundingClientRect();this.tagsDialog.style.left=t.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";t=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=t.zIndex;document.body.appendChild(this.tagsDialog);-this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(v)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var v=this.editor.graph.getAllTags();g.style.display=0<v.length?"":"none"}))}c.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=+this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(u)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var u=this.editor.graph.getAllTags();g.style.display=0<u.length?"":"none"}))}c.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,-"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=d(mxUtils.bind(this,function(v){var t=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",t);null!=this.exportDialog&&+"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=d(mxUtils.bind(this,function(u){var t=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",t);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)t.apply(this);else{this.exportDialog=document.createElement("div");var x=k.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,80);this.exportDialog.style.left=x.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";x=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=x.zIndex;var A=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});A.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",t);this.editor.exportToCanvas(mxUtils.bind(this,function(J){A.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var D=this.createImageDataUri(J,null,"png");J=document.createElement("img");J.style.maxWidth="140px";J.style.maxHeight="140px";J.style.cursor="pointer";J.style.backgroundColor="white";J.setAttribute("title",mxResources.get("openInNewWindow"));J.setAttribute("border","0");J.setAttribute("src",D);this.exportDialog.appendChild(J);mxEvent.addListener(J,"click",mxUtils.bind(this,function(){this.openInNewWindow(D.substring(D.indexOf(",")+1),"image/png",!0);t.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(J){A.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),-this.exportDialog=null);this.handleError(J)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(v)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,k,v,t){this.isLocalFileSave()?this.saveLocalFile(k,d,v,t,g):this.saveRequest(d,g,mxUtils.bind(this,function(x,A){return this.createEchoRequest(k,x,v,t,g,A)}),k,t,v)};EditorUi.prototype.saveRequest=function(d,g,k,v,t,x,A){A=null!=A?A:!mxClient.IS_IOS||!navigator.standalone;var J=mxUtils.bind(this,-function(G,R,V,Q){if("_blank"==R||null!=G&&0<G.length){var P=k("_blank"==R?null:G,R==App.MODE_DEVICE||"download"==R||null==R||"_blank"==R?"0":"1");null!=P&&(R==App.MODE_DEVICE||"download"==R||"_blank"==R?P.simulate(document,"_blank"):(V=mxUtils.bind(this,function(q){x=null!=x?x:"pdf"==g?"application/pdf":"image/"+g;if(null!=v)try{this.exportFile(v,G,x,!0,R,q)}catch(y){this.handleError(y)}else this.spinner.spin(document.body,mxResources.get("saving"))&&P.send(mxUtils.bind(this,function(){this.spinner.stop();-if(200<=P.getStatus()&&299>=P.getStatus())try{this.exportFile(P.getText(),G,x,!0,R,q)}catch(y){this.handleError(y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}))}),null!=Q?V(Q):this.pickFolder(R,V)))}});t=[App.MODE_BROWSER];A||t.push("_blank");var D=new SaveDialog(this,d,mxUtils.bind(this,function(G,R,V){J(G.value,R,G,V);this.hideDialog(null,null,D.container)}),t,null,"application/pdf");this.showDialog(D.container,-420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));D.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,k,v,t,x){};EditorUi.prototype.getServiceForName=function(d){return null};EditorUi.prototype.getTitleForService=function(d){return mxResources.get(d)};EditorUi.prototype.pickFolder=function(d,g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,v,t,x,-A,J,D,G,R,V,Q,P){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(O){Editor.addRetryToError(O,mxUtils.bind(this,function(){this.exportSvg(d,g,k,v,t,x,A,J,D,G,R,V,Q,P)}));this.handleError(O)})))try{var q=this.editor.graph.isSelectionEmpty();k=null!=k?k:q;var y=g?null:this.editor.graph.background;y==mxConstants.NONE&&(y=null);null==y&&0==g&&(y=this.editor.graph.shapeBackgroundColor);var B=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&-(this.editor.graph.addForeignObjectWarning=function(){});var C=mxUtils.lightDarkColorSupported,M=mxUtils.preferDarkColor;if("light"==R||"dark"==R)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==R;var T=this.editor.graph.createSvgImageExport(t),m=this.editor.graph.getSvg(y,d,A,J,null,k,null,T,"blank"==G?"_blank":"self"==G?"_top":null,null,!Q,R,V);mxUtils.lightDarkColorSupported=C;mxUtils.preferDarkColor=M;this.editor.graph.addForeignObjectWarning=B;v&&this.editor.graph.addSvgShadow(m);-var z=this.getBaseFilename()+(t?".drawio":"")+".svg";P=null!=P?P:mxUtils.bind(this,function(O){this.isLocalFileSave()||O.length<=MAX_REQUEST_SIZE?this.saveData(z,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(O)}))});var I=mxUtils.bind(this,function(O){this.spinner.stop();t&&O.setAttribute("content",this.getFileData(!0,null,null,null,k,D,null,null,null,null,null,d,A));P(Graph.xmlDeclaration+-"\n"+(t?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(O))});this.editor.graph.mathEnabled&&this.editor.addMathCss(m);var L=mxUtils.bind(this,function(O){Editor.replaceSvgDataUris&&x&&EditorUi.embedSvgImages(O);Editor.foreignObjectImages&&Q?this.replaceAlternateContent(O,R,I):I(O)}),N=mxUtils.bind(this,function(O){x&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(O,L,this.thumbImageCache)):L(O)});Q?this.embedFonts(m,-N):(this.editor.addFontCss(m),N(m))}catch(O){this.handleError(O)}};EditorUi.prototype.replaceAlternateContent=function(d,g,k){function v(V,Q,P,q,y){var B=mxUtils.createElementNs(d.ownerDocument,mxConstants.NS_SVG,"image");B.setAttribute("x",Q);B.setAttribute("y",P+.5);B.setAttribute("width",q.width);B.setAttribute("height",q.height);null==B.setAttributeNS?B.setAttribute("xlink:href",y):B.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",y);V.replaceChild(B,V.lastChild);J()}function t(){if(A<R.length)R[A++](t)}-var x="";g=d.getElementsByTagName("style");for(var A=0;A<g.length;A++)x+=g[A].innerHTML;g=d.getElementsByTagName("switch");counter=g.length;var J=mxUtils.bind(this,function(){counter--;0==counter&&k(d)}),D={},G={},R=[];for(A=0;A<g.length;A++)mxUtils.bind(this,function(V){var Q=V.getElementsByTagName("div");if(0<Q.length)try{var P=Q[0].cloneNode(!0),q=parseInt(P.style.marginLeft),y=parseInt(P.style.paddingTop),B=P.getElementsByTagName("div")[1],C=Q=!1,M=P.style.alignItems,T=P.style.justifyContent;-if(null!=P.style.writingMode){var m=P.style.writingMode;C="vertical-"==m.substring(0,9);Q="-rl"==m.substring(m.length-3)}var z=!C&&"1px"==P.style.width||C&&"1px"==P.style.height;if(!C&&"1px"==P.style.height||C&&"1px"==P.style.width)P.style.alignItems=C&&Q?"unsafe flex-end":"unsafe flex-start";z&&(P.style.justifyContent="unsafe flex-start");P.style.paddingTop="";P.style.marginLeft="";var I=P.outerHTML,L=D[I];null==L&&(P.style.position="absolute",P.style.visibility="hidden",document.body.appendChild(P),-m=1,m="1px"==P.style.width?B.offsetWidth:parseInt(P.style.width),z=1,z="1px"==P.style.height?B.offsetHeight:parseInt(P.style.height),document.body.removeChild(P),L=new mxRectangle(q,y,m,z),D[I]=L);"1px"==P.style.height&&("unsafe center"==M?y-=L.height/2:"unsafe flex-end"==M&&(y-=L.height));if("1px"==P.style.width)if(!C&&"unsafe center"==T||C&&"unsafe center"==M)q-=L.width/2;else if(!C&&"unsafe flex-end"==T||C&&(!Q&&"unsafe flex-end"==M||Q&&"unsafe flex-start"==M))q-=L.width;L=new mxRectangle(q,y,-L.width,L.height+parseInt(B.style.fontSize)/4);R.push(mxUtils.bind(this,function(N){var O=G[I];null==O?Graph.htmlToPng(I,L.width,L.height,mxUtils.bind(this,function(S){v(V,q,y,L,S);G[I]=S;N()}),x):(v(V,q,y,L,O),N())}))}catch(N){J()}else J()})(g[A]);0==counter&&k(d);A=0;t()};EditorUi.prototype.addRadiobox=function(d,g,k,v,t,x,A){return this.addCheckbox(d,k,v,t,x,A,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,v,t,x,A,J){x=null!=x?x:!0;var D=document.createElement("input");D.style.marginRight=-"8px";D.style.marginTop="16px";D.setAttribute("type",A?"radio":"checkbox");A="geCheckbox-"+Editor.guid();D.id=A;null!=J&&D.setAttribute("name",J);k&&(D.setAttribute("checked","checked"),D.defaultChecked=!0);v&&D.setAttribute("disabled","disabled");x&&(d.appendChild(D),k=document.createElement("label"),mxUtils.write(k,g),k.setAttribute("for",A),d.appendChild(k),t||mxUtils.br(d));return D};EditorUi.prototype.addEditButton=function(d,g){var k=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);-k.style.marginLeft="24px";var v=this.getCurrentFile(),t="";null!=v&&v.getMode()!=App.MODE_DEVICE&&v.getMode()!=App.MODE_BROWSER&&(t=window.location.href);var x=document.createElement("select");x.style.maxWidth="200px";x.style.width="auto";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";v=document.createElement("option");v.setAttribute("value","blank");mxUtils.write(v,mxResources.get("makeCopy"));x.appendChild(v);var A=document.createElement("option");A.setAttribute("value",+this.exportDialog=null);this.handleError(J)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(u)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,k,u,t){this.isLocalFileSave()?this.saveLocalFile(k,d,u,t,g):this.saveRequest(d,g,mxUtils.bind(this,function(x,A){return this.createEchoRequest(k,x,u,t,g,A)}),k,t,u)};EditorUi.prototype.saveRequest=function(d,g,k,u,t,x,A){A=null!=A?A:!mxClient.IS_IOS||!navigator.standalone;var J=mxUtils.bind(this,+function(G,S,U,P){if("_blank"==S||null!=G&&0<G.length){var O=k("_blank"==S?null:G,S==App.MODE_DEVICE||"download"==S||null==S||"_blank"==S?"0":"1");null!=O&&(S==App.MODE_DEVICE||"download"==S||"_blank"==S?O.simulate(document,"_blank"):(U=mxUtils.bind(this,function(q){x=null!=x?x:"pdf"==g?"application/pdf":"image/"+g;if(null!=u)try{this.exportFile(u,G,x,!0,S,q)}catch(y){this.handleError(y)}else this.spinner.spin(document.body,mxResources.get("saving"))&&O.send(mxUtils.bind(this,function(){this.spinner.stop();+if(200<=O.getStatus()&&299>=O.getStatus())try{this.exportFile(O.getText(),G,x,!0,S,q)}catch(y){this.handleError(y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}))}),null!=P?U(P):this.pickFolder(S,U)))}});t=[App.MODE_BROWSER];A||t.push("_blank");var D=new SaveDialog(this,d,mxUtils.bind(this,function(G,S,U){J(G.value,S,G,U);this.hideDialog(null,null,D.container)}),t,null,"application/pdf");this.showDialog(D.container,+420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));D.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,k,u,t,x){};EditorUi.prototype.getServiceForName=function(d){return null};EditorUi.prototype.getTitleForService=function(d){return mxResources.get(d)};EditorUi.prototype.pickFolder=function(d,g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,u,t,x,+A,J,D,G,S,U,P,O){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(Q){Editor.addRetryToError(Q,mxUtils.bind(this,function(){this.exportSvg(d,g,k,u,t,x,A,J,D,G,S,U,P,O)}));this.handleError(Q)})))try{var q=this.editor.graph.isSelectionEmpty();k=null!=k?k:q;var y=g?null:this.editor.graph.background;y==mxConstants.NONE&&(y=null);null==y&&0==g&&(y=this.editor.graph.shapeBackgroundColor);var B=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&+(this.editor.graph.addForeignObjectWarning=function(){});var C=mxUtils.lightDarkColorSupported,M=mxUtils.preferDarkColor;if("light"==S||"dark"==S)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==S;var T=this.editor.graph.createSvgImageExport(t),m=this.editor.graph.getSvg(y,d,A,J,null,k,null,T,"blank"==G?"_blank":"self"==G?"_top":null,null,!P,S,U);mxUtils.lightDarkColorSupported=C;mxUtils.preferDarkColor=M;this.editor.graph.addForeignObjectWarning=B;u&&this.editor.graph.addSvgShadow(m);+var z=this.getBaseFilename()+(t?".drawio":"")+".svg";O=null!=O?O:mxUtils.bind(this,function(Q){this.isLocalFileSave()||Q.length<=MAX_REQUEST_SIZE?this.saveData(z,"svg",Q,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Q)}))});var I=mxUtils.bind(this,function(Q){this.spinner.stop();t&&Q.setAttribute("content",this.getFileData(!0,null,null,null,k,D,null,null,null,null,null,d,A));O(Graph.xmlDeclaration++"\n"+(t?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(Q))});this.editor.graph.mathEnabled&&this.editor.addMathCss(m);var L=mxUtils.bind(this,function(Q){Editor.replaceSvgDataUris&&x&&EditorUi.embedSvgImages(Q);Editor.foreignObjectImages&&P?this.replaceAlternateContent(Q,S,I):I(Q)}),N=mxUtils.bind(this,function(Q){x&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(Q,L,this.thumbImageCache)):L(Q)});P?this.embedFonts(m,+N):(this.editor.addFontCss(m),N(m))}catch(Q){this.handleError(Q)}};EditorUi.prototype.replaceAlternateContent=function(d,g,k){function u(U,P,O,q,y){var B=mxUtils.createElementNs(d.ownerDocument,mxConstants.NS_SVG,"image");B.setAttribute("x",P);B.setAttribute("y",O+.5);B.setAttribute("width",q.width);B.setAttribute("height",q.height);null==B.setAttributeNS?B.setAttribute("xlink:href",y):B.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",y);U.replaceChild(B,U.lastChild);J()}function t(){if(A<S.length)S[A++](t)}+var x="";g=d.getElementsByTagName("style");for(var A=0;A<g.length;A++)x+=g[A].innerHTML;g=d.getElementsByTagName("switch");counter=g.length;var J=mxUtils.bind(this,function(){counter--;0==counter&&k(d)}),D={},G={},S=[];for(A=0;A<g.length;A++)mxUtils.bind(this,function(U){var P=U.getElementsByTagName("div");if(0<P.length)try{var O=P[0].cloneNode(!0),q=parseInt(O.style.marginLeft),y=parseInt(O.style.paddingTop),B=O.getElementsByTagName("div")[1],C=P=!1,M=O.style.alignItems,T=O.style.justifyContent;+if(null!=O.style.writingMode){var m=O.style.writingMode;C="vertical-"==m.substring(0,9);P="-rl"==m.substring(m.length-3)}var z=!C&&"1px"==O.style.width||C&&"1px"==O.style.height;if(!C&&"1px"==O.style.height||C&&"1px"==O.style.width)O.style.alignItems=C&&P?"unsafe flex-end":"unsafe flex-start";z&&(O.style.justifyContent="unsafe flex-start");O.style.paddingTop="";O.style.marginLeft="";var I=O.outerHTML,L=D[I];null==L&&(O.style.position="absolute",O.style.visibility="hidden",document.body.appendChild(O),+m=1,m="1px"==O.style.width?B.offsetWidth:parseInt(O.style.width),z=1,z="1px"==O.style.height?B.offsetHeight:parseInt(O.style.height),document.body.removeChild(O),L=new mxRectangle(q,y,m,z),D[I]=L);"1px"==O.style.height&&("unsafe center"==M?y-=L.height/2:"unsafe flex-end"==M&&(y-=L.height));if("1px"==O.style.width)if(!C&&"unsafe center"==T||C&&"unsafe center"==M)q-=L.width/2;else if(!C&&"unsafe flex-end"==T||C&&(!P&&"unsafe flex-end"==M||P&&"unsafe flex-start"==M))q-=L.width;L=new mxRectangle(q,y,+L.width,L.height+parseInt(B.style.fontSize)/4);S.push(mxUtils.bind(this,function(N){var Q=G[I];null==Q?Graph.htmlToPng(I,L.width,L.height,mxUtils.bind(this,function(R){u(U,q,y,L,R);G[I]=R;N()}),x):(u(U,q,y,L,Q),N())}))}catch(N){J()}else J()})(g[A]);0==counter&&k(d);A=0;t()};EditorUi.prototype.addRadiobox=function(d,g,k,u,t,x,A){return this.addCheckbox(d,k,u,t,x,A,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,u,t,x,A,J){x=null!=x?x:!0;var D=document.createElement("input");D.style.marginRight=+"8px";D.style.marginTop="16px";D.setAttribute("type",A?"radio":"checkbox");A="geCheckbox-"+Editor.guid();D.id=A;null!=J&&D.setAttribute("name",J);k&&(D.setAttribute("checked","checked"),D.defaultChecked=!0);u&&D.setAttribute("disabled","disabled");x&&(d.appendChild(D),k=document.createElement("label"),mxUtils.write(k,g),k.setAttribute("for",A),d.appendChild(k),t||mxUtils.br(d));return D};EditorUi.prototype.addEditButton=function(d,g){var k=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);+k.style.marginLeft="24px";var u=this.getCurrentFile(),t="";null!=u&&u.getMode()!=App.MODE_DEVICE&&u.getMode()!=App.MODE_BROWSER&&(t=window.location.href);var x=document.createElement("select");x.style.maxWidth="200px";x.style.width="auto";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";u=document.createElement("option");u.setAttribute("value","blank");mxUtils.write(u,mxResources.get("makeCopy"));x.appendChild(u);var A=document.createElement("option");A.setAttribute("value","custom");mxUtils.write(A,mxResources.get("custom")+"...");x.appendChild(A);d.appendChild(x);mxEvent.addListener(x,"change",mxUtils.bind(this,function(){if("custom"==x.value){var J=new FilenameDialog(this,t,mxResources.get("ok"),function(D){null!=D?(t=D,A.setAttribute("title",D)):(x.value="blank",A.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){x.value="blank"});this.showDialog(J.container,300,80,!0,!1);J.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,function(){k.checked&&(null==g||g.checked)?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return k.checked?"blank"===x.value?"_blank":t:null},getEditInput:function(){return k},getEditSelect:function(){return x}}};EditorUi.prototype.addLinkSection=function(d,g){function k(){var J=document.createElement("div");J.style.width="100%";J.style.height="100%";J.style.boxSizing="border-box";null!=x&&x!=mxConstants.NONE?(J.style.border="1px solid black",-J.style.backgroundColor=x):(J.style.backgroundPosition="center center",J.style.backgroundRepeat="no-repeat",J.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");A.innerText="";A.appendChild(J)}mxUtils.write(d,mxResources.get("links")+":");var v=document.createElement("select");v.style.width="100px";v.style.padding="0px";v.style.marginLeft="8px";v.style.marginRight="10px";v.className="geBtn";var t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));-v.appendChild(t);t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("openInNewWindow"));v.appendChild(t);t=document.createElement("option");t.setAttribute("value","self");mxUtils.write(t,mxResources.get("openInThisWindow"));v.appendChild(t);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),v.appendChild(g));d.appendChild(v);mxUtils.write(d,mxResources.get("borderColor")+-":");var x="#0000ff",A=null;A=mxUtils.button("",mxUtils.bind(this,function(J){this.pickColor(x||"none",function(D){x=D;k()});mxEvent.consume(J)}));k();A.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";A.style.marginLeft="4px";A.style.height="22px";A.style.width="22px";A.style.position="relative";A.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";A.className="geColorBtn";d.appendChild(A);mxUtils.br(d);return{getColor:function(){return x},getTarget:function(){return v.value},-focus:function(){v.focus()}}};EditorUi.prototype.createUrlParameters=function(d,g,k,v,t,x){x=null!=x?x:[];k&&(x.push("lightbox=1"),"auto"!=d&&x.push("target="+d),null!=g&&g!=mxConstants.NONE&&x.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=v&&0<v.length&&x.push("edit="+encodeURIComponent(v)),t&&x.push("layers=1"),this.editor.graph.foldingEnabled&&x.push("nav=1"));return x};EditorUi.prototype.createLink=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){var P=this.getCurrentFile();D=this.createUrlParameters(d,-g,v,t,x,D);d=!0;null!=A?k="#U"+encodeURIComponent(A):J||null==P||""==P.getHash()?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+P.getHash(),d=!1);d&&null!=P&&null!=P.getTitle()&&P.getTitle()!=this.defaultFilename&&D.push("title="+encodeURIComponent(P.getTitle()));G&&1<k.length&&(D.push("open="+k.substring(1)),k="");R&&null!=this.currentPage&&D.push("page-id="+this.currentPage.getId());V&&D.push("transparent=1");-null!=Q&&D.push("dark="+Q);return(v&&(null!=A||null!=P&&P.getMode()!=App.MODE_GITHUB&&P.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+k};EditorUi.prototype.createHtml=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){this.getBasenames();var P={};""!=t&&t!=mxConstants.NONE&&(P.highlight=t);"auto"!==v&&(P.target=v);G||(P.lightbox=-!1);P.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(P.zoom=k/100);k=[];A&&(k.push("pages"),P.resize=!0,null!=this.pages&&null!=this.currentPage&&(P.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(k.push("zoom"),P.resize=!0);J&&k.push("layers");D&&k.push("tags");null!=Q&&(P["dark-mode"]=Q);0<k.length&&(G&&k.push("lightbox"),P.toolbar=k.join(" "));null!=R&&0<R.length&&(P.edit=R);null!=d?P.url=d:P.xml=this.getFileData(!0,null,null,null,null,!A);g='<div class="mxgraph" style="'+-(x?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(P))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";V(g,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+-'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,g,k,v){var t=document.createElement("div");t.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxResources.get("html"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";t.appendChild(x);var A=document.createElement("div");A.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var J=document.createElement("input");J.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";+J.style.backgroundColor=x):(J.style.backgroundPosition="center center",J.style.backgroundRepeat="no-repeat",J.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");A.innerText="";A.appendChild(J)}mxUtils.write(d,mxResources.get("links")+":");var u=document.createElement("select");u.style.width="100px";u.style.padding="0px";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";var t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));+u.appendChild(t);t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("openInNewWindow"));u.appendChild(t);t=document.createElement("option");t.setAttribute("value","self");mxUtils.write(t,mxResources.get("openInThisWindow"));u.appendChild(t);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),u.appendChild(g));d.appendChild(u);mxUtils.write(d,mxResources.get("borderColor")++":");var x="#0000ff",A=null;A=mxUtils.button("",mxUtils.bind(this,function(J){this.pickColor(x||"none",function(D){x=D;k()});mxEvent.consume(J)}));k();A.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";A.style.marginLeft="4px";A.style.height="22px";A.style.width="22px";A.style.position="relative";A.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";A.className="geColorBtn";d.appendChild(A);mxUtils.br(d);return{getColor:function(){return x},getTarget:function(){return u.value},+focus:function(){u.focus()}}};EditorUi.prototype.createUrlParameters=function(d,g,k,u,t,x){x=null!=x?x:[];k&&(x.push("lightbox=1"),"auto"!=d&&x.push("target="+d),null!=g&&g!=mxConstants.NONE&&x.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=u&&0<u.length&&x.push("edit="+encodeURIComponent(u)),t&&x.push("layers=1"),this.editor.graph.foldingEnabled&&x.push("nav=1"));return x};EditorUi.prototype.createLink=function(d,g,k,u,t,x,A,J,D,G,S,U,P){var O=this.getCurrentFile();D=this.createUrlParameters(d,+g,u,t,x,D);d=!0;null!=A?k="#U"+encodeURIComponent(A):J||null==O||""==O.getHash()?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+O.getHash(),d=!1);d&&null!=O&&null!=O.getTitle()&&O.getTitle()!=this.defaultFilename&&D.push("title="+encodeURIComponent(O.getTitle()));G&&1<k.length&&(D.push("open="+k.substring(1)),k="");S&&null!=this.currentPage&&D.push("page-id="+this.currentPage.getId());U&&D.push("transparent=1");+null!=P&&D.push("dark="+P);return(u&&(null!=A||null!=O&&O.getMode()!=App.MODE_GITHUB&&O.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+k};EditorUi.prototype.createHtml=function(d,g,k,u,t,x,A,J,D,G,S,U,P){this.getBasenames();var O={};""!=t&&t!=mxConstants.NONE&&(O.highlight=t);"auto"!==u&&(O.target=u);G||(O.lightbox=+!1);O.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(O.zoom=k/100);k=[];A&&(k.push("pages"),O.resize=!0,null!=this.pages&&null!=this.currentPage&&(O.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(k.push("zoom"),O.resize=!0);J&&k.push("layers");D&&k.push("tags");null!=P&&(O["dark-mode"]=P);0<k.length&&(G&&k.push("lightbox"),O.toolbar=k.join(" "));null!=S&&0<S.length&&(O.edit=S);null!=d?O.url=d:O.xml=this.getFileData(!0,null,null,null,null,!A);g='<div class="mxgraph" style="'++(x?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(O))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";U(g,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")++'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,g,k,u){var t=document.createElement("div");t.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxResources.get("html"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";t.appendChild(x);var A=document.createElement("div");A.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var J=document.createElement("input");J.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";J.setAttribute("value","url");J.setAttribute("type","radio");J.setAttribute("name","type-embedhtmldialog");x=J.cloneNode(!0);x.setAttribute("value","copy");A.appendChild(x);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));A.appendChild(D);mxUtils.br(A);A.appendChild(J);D=document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));A.appendChild(D);var G=this.getCurrentFile();null==k&&null!=G&&G.constructor==window.DriveFile&&(D=-document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),A.appendChild(D),mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId(),G)})));x.setAttribute("checked","checked");null==k&&J.setAttribute("disabled","disabled");t.appendChild(A);A=380;var R=this.addLinkSection(t),V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="8px";-V.style.marginTop="16px";D=document.createElement("option");D.setAttribute("value","light");mxUtils.write(D,mxResources.get("light"));V.appendChild(D);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));V.appendChild(D);D=document.createElement("option");D.setAttribute("value","auto");mxUtils.write(D,mxResources.get("automatic"));D.setAttribute("selected","selected");V.appendChild(D);D.setAttribute("selected","selected");mxUtils.write(t,mxResources.get("appearance")+-":");t.appendChild(V);mxUtils.br(t);A+=26;var Q=this.addCheckbox(t,mxResources.get("zoom"),!0,null,!0);mxUtils.write(t,":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft="4px";P.style.marginRight="12px";P.value="100%";t.appendChild(P);var q=this.addCheckbox(t,mxResources.get("fit"),!0);D=null!=this.pages&&1<this.pages.length;var y=y=this.addCheckbox(t,mxResources.get("allPages"),D,!D),B=this.addCheckbox(t,mxResources.get("layers"),+document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),A.appendChild(D),mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId(),G)})));x.setAttribute("checked","checked");null==k&&J.setAttribute("disabled","disabled");t.appendChild(A);A=380;var S=this.addLinkSection(t),U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";+U.style.marginTop="16px";D=document.createElement("option");D.setAttribute("value","light");mxUtils.write(D,mxResources.get("light"));U.appendChild(D);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));U.appendChild(D);D=document.createElement("option");D.setAttribute("value","auto");mxUtils.write(D,mxResources.get("automatic"));D.setAttribute("selected","selected");U.appendChild(D);D.setAttribute("selected","selected");mxUtils.write(t,mxResources.get("appearance")++":");t.appendChild(U);mxUtils.br(t);A+=26;var P=this.addCheckbox(t,mxResources.get("zoom"),!0,null,!0);mxUtils.write(t,":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft="4px";O.style.marginRight="12px";O.value="100%";t.appendChild(O);var q=this.addCheckbox(t,mxResources.get("fit"),!0);D=null!=this.pages&&1<this.pages.length;var y=y=this.addCheckbox(t,mxResources.get("allPages"),D,!D),B=this.addCheckbox(t,mxResources.get("layers"),!0),C=this.addCheckbox(t,mxResources.get("tags"),!0),M=this.addCheckbox(t,mxResources.get("lightbox"),!0),T=null;if(EditorUi.enableHtmlEditOption){T=this.addEditButton(t,M);var m=T.getEditInput();m.style.marginBottom="16px";A+=50;mxEvent.addListener(M,"change",function(){M.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");m.checked&&M.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,t,mxUtils.bind(this,-function(){v(J.checked?k:null,Q.checked,P.value,R.getTarget(),R.getColor(),q.checked,y.checked,B.checked,C.checked,M.checked,null!=T?T.getLink():null,null!=V?V.value:null)}),null,d,g);this.showDialog(d.container,340,A,!0,!0);x.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,k,v,t,x,A,J,D,G,R){var V=document.createElement("div");V.style.whiteSpace="nowrap";var Q=document.createElement("h3");mxUtils.write(Q,d||mxResources.get("publish"));Q.style.width="100%";Q.style.textAlign="center";-Q.style.marginTop="2px";Q.style.marginBottom="20px";V.appendChild(Q);var P=document.createElement("select");d=30;P.className="geBtn";P.style.marginBottom="8px";P.style.marginLeft="0px";P.style.width="100%";P.style.boxSizing="border-box";if(null==J||""==J.getHash())t=null!=t?t:"https://www.drawio.com/doc/faq/publish-diagram-as-link",Q=document.createElement("option"),mxUtils.write(Q,mxResources.get("makeCopy")),Q.setAttribute("value","copy"),P.appendChild(Q);Q=document.createElement("option");mxUtils.write(Q,-mxResources.get("authorizationRequired"));Q.setAttribute("value","auth");P.appendChild(Q);null!=J&&""!=J.getHash()||Q.setAttribute("disabled","disabled");J=document.createElement("option");J.setAttribute("value","public");P.appendChild(J);null!=A?(mxUtils.write(J,mxResources.get("publicDiagramUrl")),J.setAttribute("title",A),P.value="public"):(mxUtils.write(J,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),J.setAttribute("disabled","disabled"));V.appendChild(P);-mxUtils.br(V);P.focus();var q=null,y=null;if(null!=g||null!=k)d+=30,mxUtils.write(V,mxResources.get("width")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft="6px",q.style.marginRight="16px",q.style.marginBottom="10px",q.value="100%",V.appendChild(q),mxUtils.write(V,mxResources.get("height")+":"),y=document.createElement("input"),y.setAttribute("type","text"),y.style.width="50px",y.style.marginLeft="6px",y.style.marginBottom=-"10px",y.value=k+"px",V.appendChild(y),mxUtils.br(V);var B=this.addLinkSection(V,v),C=G?this.addCheckbox(V,mxResources.get("transparentBackground"),!1):null;null!=C&&(d+=20);var M=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(d+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),M=this.addCheckbox(V,mxResources.get("selectedPage")+": "+g));var T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft=-"8px";T.style.marginTop="16px";g=document.createElement("option");g.setAttribute("value","0");mxUtils.write(g,mxResources.get("light"));T.appendChild(g);g=document.createElement("option");g.setAttribute("value","1");mxUtils.write(g,mxResources.get("dark"));T.appendChild(g);g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));g.setAttribute("selected","selected");T.appendChild(g);R&&(mxUtils.write(V,mxResources.get("appearance")+":"),V.appendChild(T),-mxUtils.br(V),d+=30);var m=this.addCheckbox(V,mxResources.get("lightbox"),!0,null,null,!v),z=this.addEditButton(V,m),I=z.getEditInput();v&&(I.style.marginLeft=m.style.marginLeft,m.style.display="none",d-=20);var L=this.addCheckbox(V,mxResources.get("layers"),!0);L.style.marginLeft=I.style.marginLeft;L.style.marginTop="8px";var N=this.addCheckbox(V,mxResources.get("tags"),!0);N.style.marginLeft=I.style.marginLeft;N.style.marginBottom="16px";N.style.marginTop="16px";mxEvent.addListener(m,"change",function(){m.checked?-(L.removeAttribute("disabled"),I.removeAttribute("disabled"),N.removeAttribute("disabled")):(L.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));I.checked&&m.checked?z.getEditSelect().removeAttribute("disabled"):z.getEditSelect().setAttribute("disabled","disabled")});v=new CustomDialog(this,V,mxUtils.bind(this,function(){D(B.getTarget(),B.getColor(),null==M?!1:M.checked,m.checked,z.getLink(),L.checked,null!=q?q.value:null,null!=y?y.value:-null,N.checked,P.value,null!=C?C.checked:!1,T.value)}),null,mxResources.get("create"),t,x);this.showDialog(v.container,340,296+d,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)):null==P.parentNode;B.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,k,v,t){var x=document.createElement("div");x.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("image"));A.style.cssText=+function(){u(J.checked?k:null,P.checked,O.value,S.getTarget(),S.getColor(),q.checked,y.checked,B.checked,C.checked,M.checked,null!=T?T.getLink():null,null!=U?U.value:null)}),null,d,g);this.showDialog(d.container,340,A,!0,!0);x.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,k,u,t,x,A,J,D,G,S){var U=document.createElement("div");U.style.whiteSpace="nowrap";var P=document.createElement("h3");mxUtils.write(P,d||mxResources.get("publish"));P.style.width="100%";P.style.textAlign="center";+P.style.marginTop="2px";P.style.marginBottom="20px";U.appendChild(P);var O=document.createElement("select");d=30;O.className="geBtn";O.style.marginBottom="8px";O.style.marginLeft="0px";O.style.width="100%";O.style.boxSizing="border-box";if(null==J||""==J.getHash())t=null!=t?t:"https://www.drawio.com/doc/faq/publish-diagram-as-link",P=document.createElement("option"),mxUtils.write(P,mxResources.get("makeCopy")),P.setAttribute("value","copy"),O.appendChild(P);P=document.createElement("option");mxUtils.write(P,+mxResources.get("authorizationRequired"));P.setAttribute("value","auth");O.appendChild(P);null!=J&&""!=J.getHash()||P.setAttribute("disabled","disabled");J=document.createElement("option");J.setAttribute("value","public");O.appendChild(J);null!=A?(mxUtils.write(J,mxResources.get("publicDiagramUrl")),J.setAttribute("title",A),O.value="public"):(mxUtils.write(J,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),J.setAttribute("disabled","disabled"));U.appendChild(O);+mxUtils.br(U);O.focus();var q=null,y=null;if(null!=g||null!=k)d+=30,mxUtils.write(U,mxResources.get("width")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft="6px",q.style.marginRight="16px",q.style.marginBottom="10px",q.value="100%",U.appendChild(q),mxUtils.write(U,mxResources.get("height")+":"),y=document.createElement("input"),y.setAttribute("type","text"),y.style.width="50px",y.style.marginLeft="6px",y.style.marginBottom=+"10px",y.value=k+"px",U.appendChild(y),mxUtils.br(U);var B=this.addLinkSection(U,u),C=G?this.addCheckbox(U,mxResources.get("transparentBackground"),!1):null;null!=C&&(d+=20);var M=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(d+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),M=this.addCheckbox(U,mxResources.get("selectedPage")+": "+g));var T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft=+"8px";T.style.marginTop="16px";g=document.createElement("option");g.setAttribute("value","0");mxUtils.write(g,mxResources.get("light"));T.appendChild(g);g=document.createElement("option");g.setAttribute("value","1");mxUtils.write(g,mxResources.get("dark"));T.appendChild(g);g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));g.setAttribute("selected","selected");T.appendChild(g);S&&(mxUtils.write(U,mxResources.get("appearance")+":"),U.appendChild(T),+mxUtils.br(U),d+=30);var m=this.addCheckbox(U,mxResources.get("lightbox"),!0,null,null,!u),z=this.addEditButton(U,m),I=z.getEditInput();u&&(I.style.marginLeft=m.style.marginLeft,m.style.display="none",d-=20);var L=this.addCheckbox(U,mxResources.get("layers"),!0);L.style.marginLeft=I.style.marginLeft;L.style.marginTop="8px";var N=this.addCheckbox(U,mxResources.get("tags"),!0);N.style.marginLeft=I.style.marginLeft;N.style.marginBottom="16px";N.style.marginTop="16px";mxEvent.addListener(m,"change",function(){m.checked?+(L.removeAttribute("disabled"),I.removeAttribute("disabled"),N.removeAttribute("disabled")):(L.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));I.checked&&m.checked?z.getEditSelect().removeAttribute("disabled"):z.getEditSelect().setAttribute("disabled","disabled")});u=new CustomDialog(this,U,mxUtils.bind(this,function(){D(B.getTarget(),B.getColor(),null==M?!1:M.checked,m.checked,z.getLink(),L.checked,null!=q?q.value:null,null!=y?y.value:+null,N.checked,O.value,null!=C?C.checked:!1,T.value)}),null,mxResources.get("create"),t,x);this.showDialog(u.container,340,296+d,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)):null==O.parentNode;B.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,k,u,t){var x=document.createElement("div");x.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("image"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(t?"10":"4")+"px";x.appendChild(A);if(t){mxUtils.write(x,mxResources.get("zoom")+":");var J=document.createElement("input");J.setAttribute("type","text");J.style.marginRight="16px";J.style.width="60px";J.style.marginLeft="4px";J.style.marginRight="12px";J.value=this.lastExportZoom||"100%";x.appendChild(J);mxUtils.write(x,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight=-"16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";x.appendChild(D);mxUtils.br(x)}var G=this.addCheckbox(x,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),R=v?null:this.addCheckbox(x,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);A=this.editor.graph;var V=v?null:this.addCheckbox(x,mxResources.get("transparentBackground"),A.background==mxConstants.NONE||null==A.background);null!=V&&(V.style.marginBottom="16px");-d=new CustomDialog(this,x,mxUtils.bind(this,function(){var Q=parseInt(J.value)/100||1,P=parseInt(D.value)||0;k(!G.checked,null!=R?R.checked:!1,null!=V?V.checked:!1,Q,P)}),null,d,g);this.showDialog(d.container,300,(t?25:0)+(v?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,k,v,t,x,A,J,D){A=null!=A?A:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var R=this.editor.graph,V="jpeg"==J||"webp"==J?220:320,Q=document.createElement("h3");mxUtils.write(Q,-d);Q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(Q);mxUtils.write(G,mxResources.get("zoom")+":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft="4px";P.style.marginRight="12px";P.value=this.lastExportZoom||"100%";G.appendChild(P);mxUtils.write(G,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight=-"16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";G.appendChild(q);mxUtils.br(G);var y=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,R.isSelectionEmpty()),B=document.createElement("input");B.style.marginTop="16px";B.style.marginRight="8px";B.style.marginLeft="24px";B.setAttribute("disabled","disabled");B.setAttribute("type","checkbox");var C=document.createElement("select");C.style.marginTop="16px";C.style.marginLeft="8px";d=["selectionOnly","diagram",-"page"];for(Q=0;Q<d.length;Q++)if(!R.isSelectionEmpty()||"selectionOnly"!=d[Q]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(d[Q]));M.setAttribute("value",d[Q]);C.appendChild(M)}D?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(C),mxUtils.br(G),V+=26,mxEvent.addListener(C,"change",function(){"selectionOnly"==C.value&&(y.checked=!0)})):x&&(G.appendChild(B),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),V+=30,mxEvent.addListener(y,"change",function(){y.checked?-B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));R.isSelectionEmpty()?D&&(y.style.display="none",y.nextSibling.style.display="none",y.nextSibling.nextSibling.style.display="none",V-=30):(C.value="diagram",B.setAttribute("checked","checked"),B.defaultChecked=!0,mxEvent.addListener(y,"change",function(){C.value=y.checked?"selectionOnly":"diagram"}));var T=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=J&&"webp"!=J),m=document.createElement("select");+"16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";x.appendChild(D);mxUtils.br(x)}var G=this.addCheckbox(x,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),S=u?null:this.addCheckbox(x,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);A=this.editor.graph;var U=u?null:this.addCheckbox(x,mxResources.get("transparentBackground"),A.background==mxConstants.NONE||null==A.background);null!=U&&(U.style.marginBottom="16px");+d=new CustomDialog(this,x,mxUtils.bind(this,function(){var P=parseInt(J.value)/100||1,O=parseInt(D.value)||0;k(!G.checked,null!=S?S.checked:!1,null!=U?U.checked:!1,P,O)}),null,d,g);this.showDialog(d.container,300,(t?25:0)+(u?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,k,u,t,x,A,J,D){A=null!=A?A:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var S=this.editor.graph,U="jpeg"==J||"webp"==J?220:320,P=document.createElement("h3");mxUtils.write(P,+d);P.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(P);mxUtils.write(G,mxResources.get("zoom")+":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft="4px";O.style.marginRight="12px";O.value=this.lastExportZoom||"100%";G.appendChild(O);mxUtils.write(G,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight=+"16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";G.appendChild(q);mxUtils.br(G);var y=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,S.isSelectionEmpty()),B=document.createElement("input");B.style.marginTop="16px";B.style.marginRight="8px";B.style.marginLeft="24px";B.setAttribute("disabled","disabled");B.setAttribute("type","checkbox");var C=document.createElement("select");C.style.marginTop="16px";C.style.marginLeft="8px";d=["selectionOnly","diagram",+"page"];for(P=0;P<d.length;P++)if(!S.isSelectionEmpty()||"selectionOnly"!=d[P]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(d[P]));M.setAttribute("value",d[P]);C.appendChild(M)}D?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(C),mxUtils.br(G),U+=26,mxEvent.addListener(C,"change",function(){"selectionOnly"==C.value&&(y.checked=!0)})):x&&(G.appendChild(B),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),U+=30,mxEvent.addListener(y,"change",function(){y.checked?+B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));S.isSelectionEmpty()?D&&(y.style.display="none",y.nextSibling.style.display="none",y.nextSibling.nextSibling.style.display="none",U-=30):(C.value="diagram",B.setAttribute("checked","checked"),B.defaultChecked=!0,mxEvent.addListener(y,"change",function(){C.value=y.checked?"selectionOnly":"diagram"}));var T=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=J&&"webp"!=J),m=document.createElement("select");m.style.maxWidth="260px";m.style.marginLeft="8px";m.style.marginTop="16px";x=document.createElement("option");x.setAttribute("value","light");mxUtils.write(x,mxResources.get("light"));m.appendChild(x);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));m.appendChild(D);"svg"==J&&mxUtils.lightDarkColorSupported?(x=document.createElement("option"),x.setAttribute("value","auto"),mxUtils.write(x,mxResources.get("automatic")),x.setAttribute("selected",-"selected"),m.appendChild(x)):Editor.isDarkMode()?D.setAttribute("selected","selected"):x.setAttribute("selected","selected");mxUtils.write(G,mxResources.get("appearance")+":");G.appendChild(m);mxUtils.br(G);V+=26;var z=this.addCheckbox(G,mxResources.get("shadow"),R.shadowVisible),I=null;if("png"==J||"jpeg"==J||"webp"==J)I=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),V+=30;var L=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram")+":",A,null,-null,"jpeg"!=J&&"webp"!=J),N=document.createElement("select");N.style.maxWidth="260px";N.style.marginLeft="28px";"png"==J||"svg"==J?(A=function(){L.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")},R=document.createElement("option"),R.setAttribute("value","allPages"),mxUtils.write(R,mxResources.get("allPages")),N.appendChild(R),R=document.createElement("option"),R.setAttribute("value","currentPage"),mxUtils.write(R,mxResources.get("currentPage")),N.appendChild(R),L.style.marginBottom=-"12px",N.style.marginBottom="16px",G.appendChild(N),mxUtils.br(G),V+=20,null!=this.lastEmbedInclude&&(N.value=this.lastEmbedInclude),mxEvent.addListener(L,"change",A),A()):L.style.marginBottom="16px";var O=document.createElement("input");O.style.marginBottom="16px";O.style.marginRight="8px";O.setAttribute("type","checkbox");var S=document.createElement("input");S.style.marginBottom="16px";S.style.marginRight="8px";S.setAttribute("type","checkbox");g&&(O.checked=null!=this.lastEmbedImages?this.lastEmbedImages:-!0,G.appendChild(O),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),S.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,G.appendChild(S),mxUtils.write(G,mxResources.get("embedFonts")),mxUtils.br(G),V+=50);var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));U.appendChild(x);A=document.createElement("option");A.setAttribute("value",-"blank");mxUtils.write(A,mxResources.get("openInNewWindow"));U.appendChild(A);A=document.createElement("option");A.setAttribute("value","self");mxUtils.write(A,mxResources.get("openInThisWindow"));U.appendChild(A);A=document.createElement("div");mxUtils.write(A,mxResources.get("LinksLost"));A.style.margin="7px";A.style.display="none";"svg"==J&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(U),G.appendChild(A),mxUtils.br(G),mxUtils.br(G),V+=50);k=new CustomDialog(this,G,mxUtils.bind(this,-function(){this.lastExportBorder=q.value;this.lastExportZoom=P.value;this.lastEmbedImages=O.checked;this.lastEmbedFonts=S.checked;this.lastEmbedInclude=N.value;t(P.value,T.checked,!y.checked,z.checked,L.checked,O.checked&&g,q.value,B.checked,("png"==J||"svg"==J)&&"currentPage"==N.value,U.value,null!=I?I.checked:null,null!=m?m.value:null,C.value,S.checked)}),null,k,v);this.showDialog(k.container,340,V,!0,!0,null,null,null,null,!0);P.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?-P.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,k,v,t){var x=document.createElement("div");x.style.whiteSpace="nowrap";var A=this.editor.graph;if(null!=g){var J=document.createElement("h3");mxUtils.write(J,g);J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";x.appendChild(J)}var D=this.addCheckbox(x,mxResources.get("fit"),!0),G=this.addCheckbox(x,mxResources.get("shadow"),A.shadowVisible&&v,!v),R=this.addCheckbox(x,-k),V=this.addCheckbox(x,mxResources.get("lightbox"),!0),Q=this.addEditButton(x,V),P=Q.getEditInput(),q=1<A.model.getChildCount(A.model.getRoot()),y=this.addCheckbox(x,mxResources.get("layers"),q,!q);y.style.marginLeft=P.style.marginLeft;y.style.marginBottom="12px";y.style.marginTop="8px";mxEvent.addListener(V,"change",function(){V.checked?(q&&y.removeAttribute("disabled"),P.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));P.checked&&V.checked?-Q.getEditSelect().removeAttribute("disabled"):Q.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,x,mxUtils.bind(this,function(){d(D.checked,G.checked,R.checked,V.checked,Q.getLink(),y.checked)}),null,mxResources.get("embed"),t);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,k,v,t,x,A,J){function D(P){var q=" ",y="";v&&(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.lightboxHost+"/?client=1"+(null!=R?"&page="+R:"")+(t?"&edit=_blank":"")+(x?"&layers=1":"")+"');}})(this);\"",y+="cursor:pointer;");d&&(y+="max-width:100%;");var B="";k&&(B=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');A('<img src="'+P+'"'+B+(""!=y?' style="'+y+'"':"")+q+"/>")}var G=this.editor.graph.getGraphBounds(),R=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(P){var q=v?this.getFileData(!0):null;P=-this.createImageDataUri(P,q,"png");D(P)}),null,null,null,mxUtils.bind(this,function(P){J({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),G.width*G.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var V="";k&&(V="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var Q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(v?"1":"0")+V+"&xml="+encodeURIComponent(g));Q.send(mxUtils.bind(this,function(){200<=Q.getStatus()&&-299>=Q.getStatus()?D("data:image/png;base64,"+Q.getText()):J({message:mxResources.get("unknownError")})}))}else J({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,g,k,v,t,x,A){var J=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k,"auto"),D=J.getElementsByTagName("a");if(null!=D)for(var G=0;G<D.length;G++){var R=D[G].getAttribute("href");null!=R&&"#"==R.charAt(0)&&"_blank"==D[G].getAttribute("target")&&D[G].removeAttribute("target")}v&&-J.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(J);if(k){var V=" ",Q="";v&&(V="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(t?"&edit=_blank":"")+(x?"&layers=1":-"")+"');}})(this);\"",Q+="cursor:pointer;");d&&(Q+="max-width:100%;");this.editor.convertImages(J,mxUtils.bind(this,function(P){A('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(P))+'"'+(""!=Q?' style="'+Q+'"':"")+V+"/>")}))}else Q="",v&&(g=this.getSelectedPageIndex(),J.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+-EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(t?"&edit=_blank":"")+(x?"&layers=1":"")+"');}}})(this);"),Q+="cursor:pointer;"),d&&(d=parseInt(J.getAttribute("width")),t=parseInt(J.getAttribute("height")),J.setAttribute("viewBox","-0.5 -0.5 "+d+" "+t),Q+="max-width:100%;max-height:"+t+"px;",J.removeAttribute("height")),""!=Q&&J.setAttribute("style",Q),this.editor.addFontCss(J),this.editor.graph.mathEnabled&&this.editor.addMathCss(J),A(mxUtils.getXml(J))};EditorUi.prototype.timeSince=function(d){d=+"selected"),m.appendChild(x)):Editor.isDarkMode()?D.setAttribute("selected","selected"):x.setAttribute("selected","selected");mxUtils.write(G,mxResources.get("appearance")+":");G.appendChild(m);mxUtils.br(G);U+=26;var z=this.addCheckbox(G,mxResources.get("shadow"),S.shadowVisible),I=null;if("png"==J||"jpeg"==J||"webp"==J)I=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),U+=30;var L=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram")+":",A,null,+null,"jpeg"!=J&&"webp"!=J),N=document.createElement("select");N.style.maxWidth="260px";N.style.marginLeft="28px";"png"==J||"svg"==J?(A=function(){L.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")},S=document.createElement("option"),S.setAttribute("value","allPages"),mxUtils.write(S,mxResources.get("allPages")),N.appendChild(S),S=document.createElement("option"),S.setAttribute("value","currentPage"),mxUtils.write(S,mxResources.get("currentPage")),N.appendChild(S),L.style.marginBottom=+"12px",N.style.marginBottom="16px",G.appendChild(N),mxUtils.br(G),U+=20,null!=this.lastEmbedInclude&&(N.value=this.lastEmbedInclude),mxEvent.addListener(L,"change",A),A()):L.style.marginBottom="16px";var Q=document.createElement("input");Q.style.marginBottom="16px";Q.style.marginRight="8px";Q.setAttribute("type","checkbox");var R=document.createElement("input");R.style.marginBottom="16px";R.style.marginRight="8px";R.setAttribute("type","checkbox");g&&(Q.checked=null!=this.lastEmbedImages?this.lastEmbedImages:+!0,G.appendChild(Q),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),R.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,G.appendChild(R),mxUtils.write(G,mxResources.get("embedFonts")),mxUtils.br(G),U+=50);var V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="8px";x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));V.appendChild(x);A=document.createElement("option");A.setAttribute("value",+"blank");mxUtils.write(A,mxResources.get("openInNewWindow"));V.appendChild(A);A=document.createElement("option");A.setAttribute("value","self");mxUtils.write(A,mxResources.get("openInThisWindow"));V.appendChild(A);A=document.createElement("div");mxUtils.write(A,mxResources.get("LinksLost"));A.style.margin="7px";A.style.display="none";"svg"==J&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(V),G.appendChild(A),mxUtils.br(G),mxUtils.br(G),U+=50);k=new CustomDialog(this,G,mxUtils.bind(this,+function(){this.lastExportBorder=q.value;this.lastExportZoom=O.value;this.lastEmbedImages=Q.checked;this.lastEmbedFonts=R.checked;this.lastEmbedInclude=N.value;t(O.value,T.checked,!y.checked,z.checked,L.checked,Q.checked&&g,q.value,B.checked,("png"==J||"svg"==J)&&"currentPage"==N.value,V.value,null!=I?I.checked:null,null!=m?m.value:null,C.value,R.checked)}),null,k,u);this.showDialog(k.container,340,U,!0,!0,null,null,null,null,!0);O.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?+O.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,k,u,t){var x=document.createElement("div");x.style.whiteSpace="nowrap";var A=this.editor.graph;if(null!=g){var J=document.createElement("h3");mxUtils.write(J,g);J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";x.appendChild(J)}var D=this.addCheckbox(x,mxResources.get("fit"),!0),G=this.addCheckbox(x,mxResources.get("shadow"),A.shadowVisible&&u,!u),S=this.addCheckbox(x,+k),U=this.addCheckbox(x,mxResources.get("lightbox"),!0),P=this.addEditButton(x,U),O=P.getEditInput(),q=1<A.model.getChildCount(A.model.getRoot()),y=this.addCheckbox(x,mxResources.get("layers"),q,!q);y.style.marginLeft=O.style.marginLeft;y.style.marginBottom="12px";y.style.marginTop="8px";mxEvent.addListener(U,"change",function(){U.checked?(q&&y.removeAttribute("disabled"),O.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));O.checked&&U.checked?+P.getEditSelect().removeAttribute("disabled"):P.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,x,mxUtils.bind(this,function(){d(D.checked,G.checked,S.checked,U.checked,P.getLink(),y.checked)}),null,mxResources.get("embed"),t);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,k,u,t,x,A,J){function D(O){var q=" ",y="";u&&(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.lightboxHost+"/?client=1"+(null!=S?"&page="+S:"")+(t?"&edit=_blank":"")+(x?"&layers=1":"")+"');}})(this);\"",y+="cursor:pointer;");d&&(y+="max-width:100%;");var B="";k&&(B=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');A('<img src="'+O+'"'+B+(""!=y?' style="'+y+'"':"")+q+"/>")}var G=this.editor.graph.getGraphBounds(),S=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(O){var q=u?this.getFileData(!0):null;O=+this.createImageDataUri(O,q,"png");D(O)}),null,null,null,mxUtils.bind(this,function(O){J({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),G.width*G.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var U="";k&&(U="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var P=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(u?"1":"0")+U+"&xml="+encodeURIComponent(g));P.send(mxUtils.bind(this,function(){200<=P.getStatus()&&+299>=P.getStatus()?D("data:image/png;base64,"+P.getText()):J({message:mxResources.get("unknownError")})}))}else J({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,g,k,u,t,x,A){var J=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k,"auto"),D=J.getElementsByTagName("a");if(null!=D)for(var G=0;G<D.length;G++){var S=D[G].getAttribute("href");null!=S&&"#"==S.charAt(0)&&"_blank"==D[G].getAttribute("target")&&D[G].removeAttribute("target")}u&&+J.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(J);if(k){var U=" ",P="";u&&(U="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(t?"&edit=_blank":"")+(x?"&layers=1":+"")+"');}})(this);\"",P+="cursor:pointer;");d&&(P+="max-width:100%;");this.editor.convertImages(J,mxUtils.bind(this,function(O){A('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(O))+'"'+(""!=P?' style="'+P+'"':"")+U+"/>")}))}else P="",u&&(g=this.getSelectedPageIndex(),J.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"++EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(t?"&edit=_blank":"")+(x?"&layers=1":"")+"');}}})(this);"),P+="cursor:pointer;"),d&&(d=parseInt(J.getAttribute("width")),t=parseInt(J.getAttribute("height")),J.setAttribute("viewBox","-0.5 -0.5 "+d+" "+t),P+="max-width:100%;max-height:"+t+"px;",J.removeAttribute("height")),""!=P&&J.setAttribute("style",P),this.editor.addFontCss(J),this.editor.graph.mathEnabled&&this.editor.addMathCss(J),A(mxUtils.getXml(J))};EditorUi.prototype.timeSince=function(d){d=Math.floor((new Date-d)/1E3);var g=Math.floor(d/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(d/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(d/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(d/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(d/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,g){if(null!=d){var k=null;if("diagram"==d.nodeName)k=-d;else if("mxfile"==d.nodeName){var v=d.getElementsByTagName("diagram");if(0<v.length){k=v[0];var t=g.getGlobalVariable;g.getGlobalVariable=function(x){return"page"==x?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==x?1:t.apply(this,arguments)}}}null!=k&&(d=Editor.parseDiagramNode(k))}v=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(d)}catch(x){}finally{this.editor.graph=v}return d};EditorUi.prototype.getSvgFileProperties=function(d){return this.getPngFileProperties(d)};-EditorUi.prototype.getPngFileProperties=function(d){var g=1,k=0;if(null!=d){if(d.hasAttribute("scale")){var v=parseFloat(d.getAttribute("scale"));!isNaN(v)&&0<v&&(g=v)}d.hasAttribute("border")&&(v=parseInt(d.getAttribute("border")),!isNaN(v)&&0<v&&(k=v))}return{scale:g,border:k}};EditorUi.prototype.getEmbeddedPng=function(d,g,k,v,t){try{var x=this.editor.graph,A=null;if(null!=k&&0<k.length)x=this.createTemporaryGraph(x.getStylesheet()),document.body.appendChild(x.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,+d;else if("mxfile"==d.nodeName){var u=d.getElementsByTagName("diagram");if(0<u.length){k=u[0];var t=g.getGlobalVariable;g.getGlobalVariable=function(x){return"page"==x?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==x?1:t.apply(this,arguments)}}}null!=k&&(d=Editor.parseDiagramNode(k))}u=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(d)}catch(x){}finally{this.editor.graph=u}return d};EditorUi.prototype.getSvgFileProperties=function(d){return this.getPngFileProperties(d)};+EditorUi.prototype.getPngFileProperties=function(d){var g=1,k=0;if(null!=d){if(d.hasAttribute("scale")){var u=parseFloat(d.getAttribute("scale"));!isNaN(u)&&0<u&&(g=u)}d.hasAttribute("border")&&(u=parseInt(d.getAttribute("border")),!isNaN(u)&&0<u&&(k=u))}return{scale:g,border:k}};EditorUi.prototype.getEmbeddedPng=function(d,g,k,u,t){try{var x=this.editor.graph,A=null;if(null!=k&&0<k.length)x=this.createTemporaryGraph(x.getStylesheet()),document.body.appendChild(x.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0),x),A=k;else if(null!=this.pages&&this.currentPage!=this.pages[0]){x=this.createTemporaryGraph(x.getStylesheet());var J=x.getGlobalVariable;x.setBackgroundImage=this.editor.graph.setBackgroundImage;var D=this.pages[0];this.currentPage==D?x.setBackgroundImage(this.editor.graph.backgroundImage):null!=D.viewState&&null!=D.viewState&&x.setBackgroundImage(D.viewState.backgroundImage);x.getGlobalVariable=function(G){return"page"==G?D.getName():"pagenumber"==G?1:J.apply(this,arguments)};document.body.appendChild(x.container);-x.model.setRoot(D.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(G){try{null==A&&(A=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var R=G.toDataURL("image/png");R=Editor.writeGraphModelToPng(R,"tEXt","mxfile",encodeURIComponent(A));d(R.substring(R.lastIndexOf(",")+1));x!=this.editor.graph&&x.container.parentNode.removeChild(x.container)}catch(V){null!=g&&g(V)}}),null,null,null,mxUtils.bind(this,function(G){null!=g&&g(G)}),null,null,v,null,x.shadowVisible,null,x,t,null,-null,null,"diagram",null)}catch(G){null!=g&&g(G)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){J=null!=J?J:!0;R=null!=R?R:0;A=null!=D?D:g.background;A==mxConstants.NONE&&(A=null);null==A&&"none"==g.getAdaptiveColors()&&(A="#ffffff");D=this.editor.graph.createSvgImageExport(null!=d);x=g.getSvg(A,G,R,null,null,x,null,D,null,g.shadowVisible||V,null,Q,"diagram");(g.shadowVisible||V)&&g.addSvgShadow(x,null,null,0==R);null!=d&&x.setAttribute("content",d);null!=k&&x.setAttribute("resource",-k);var P=mxUtils.bind(this,function(q){q=(v?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(q);null!=t&&t(q);return q});g.mathEnabled&&this.editor.addMathCss(x);if(null!=t)this.embedFonts(x,mxUtils.bind(this,function(q){J?this.editor.convertImages(q,mxUtils.bind(this,function(y){P(y)})):P(q)}));else return P(x)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,-this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(d,k),g(d)}catch(v){g(d)}}))}catch(k){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(q){Editor.addRetryToError(q,mxUtils.bind(this,function(){this.exportImage(d,g,k,v,t,x,A,J,D,G,R,V,Q)}));this.handleError(q)}))){var P=this.editor.graph.isSelectionEmpty();-k=null!=k?k:P;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(q){this.spinner.stop();try{this.saveCanvas(q,t?this.getFileData(!0,null,null,null,k,J,null,null,null,null,null,d,x):null,D,null==this.pages||0==this.pages.length,R)}catch(y){this.handleError(y)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),null,k,d||1,g,v,null,null,x,A,G,V,Q)}catch(q){this.spinner.stop(),this.handleError(q)}}};-EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.addLocalPagesToMapping=function(d){d=null!=d?d:{};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)d[this.pages[g].getId()]=this.pages[g].getId();return d};EditorUi.prototype.importXml=function(d,g,k,v,t,x,A){g=null!=g?g:0;k=null!=k?k:0;var J=[];try{var D=this.editor.graph;if(null!=d&&0<d.length){D.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var R=this.editor.extractGraphModel(G.documentElement,-null!=this.pages);if(null!=R&&"mxfile"==R.nodeName&&null!=this.pages){var V=R.getElementsByTagName("diagram");if(1==V.length&&!x){if(R=Editor.parseDiagramNode(V[0]),null!=this.currentPage&&(d[V[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var Q=V[0].getAttribute("name");null!=Q&&""!=Q&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,Q))}}else if(0<V.length){x=[];var P=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[V[0].getAttribute("id")]=-this.pages[0].getId(),Q=V[0].getAttribute("name"),null!=Q&&""!=Q&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],Q)),R=Editor.parseDiagramNode(V[0]),v=!1,P=1);for(;P<V.length;P++){var q=V[P].getAttribute("id");V[P].removeAttribute("id");var y=this.updatePageRoot(new DiagramPage(V[P]));d[q]=V[P].getAttribute("id");var B=this.pages.length;null==y.getName()&&y.setName(mxResources.get("pageWithNumber",[B+1]));D.model.execute(new ChangePage(this,y,y,B,!0));x.push(y)}this.updatePageLinks(d,-x)}}if(null!=R&&"mxGraphModel"===R.nodeName){J=D.importGraphModel(R,g,k,v);if(null!=J)for(this.addLocalPagesToMapping(d),P=0;P<J.length;P++)this.updatePageLinksForCell(d,J[P]);var C=D.parseBackgroundImage(R.getAttribute("backgroundImage"));if(null!=C&&null!=C.originalSrc){this.updateBackgroundPageLink(d,C);var M=new ChangePageSetup(this,null,C);M.ignoreColor=!0;D.model.execute(M)}}A&&D.pasteCellStyles(D.includeDescendants(J),D.defaultVertexStyle,D.defaultEdgeStyle)}finally{D.model.endUpdate()}}}catch(T){if(t)throw T;-this.handleError(T)}return J};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(v){}};EditorUi.prototype.updatePageLinksForCell=-function(d,g){var k=document.createElement("div"),v=this.editor.graph,t=v.getLinkForCell(g);null!=t&&v.setLinkForCell(g,this.updatePageLink(d,t));if(v.isHtmlLabel(g)){k.innerHTML=Graph.sanitizeHtml(v.getLabel(g));for(var x=k.getElementsByTagName("a"),A=!1,J=0;J<x.length;J++)t=x[J].getAttribute("href"),null!=t&&(x[J].setAttribute("href",this.updatePageLink(d,t)),A=!0);A&&v.labelChanged(g,k.innerHTML)}for(J=0;J<v.model.getChildCount(g);J++)this.updatePageLinksForCell(d,v.model.getChildAt(g,J))};EditorUi.prototype.updatePageLink=-function(d,g){if(Graph.isPageLink(g)){var k=d[g.substring(g.indexOf(",")+1)];g=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==g.substring(0,17))try{var v=JSON.parse(g.substring(17));if(null!=v.actions){for(var t=0;t<v.actions.length;t++){var x=v.actions[t];if(null!=x.open&&Graph.isPageLink(x.open)){var A=x.open.substring(x.open.indexOf(",")+1);k=d[A];null!=k?x.open="data:page/id,"+k:null==this.getPageById(A)&&delete x.open}}g="data:action/json,"+JSON.stringify(v)}}catch(J){}return g};-EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,g,k,v,t){var x=mxUtils.bind(this,function(A){this.loadingExtensions=!1;null!=k?k(A):this.handleError(A)});this.createTimeout(null,mxUtils.bind(this,function(A){v=null!=v?v:d.name;var J=mxUtils.bind(this,function(G){A.clear()&&x(G)}),D=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var G=this.isRemoteVisioFormat(v);-try{var R=v.lastIndexOf(".");if(0<=R&&R<v.length)v.substring(R+1).toUpperCase();else{var V=v.lastIndexOf("/");0<=V&&V<v.length&&(v=v.substring(V+1))}}catch(P){}if(G)if(null==VSD_CONVERT_URL||this.isOffline())J({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{G=new FormData;G.append("file1",d,v);var Q=new XMLHttpRequest;Q.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(v)?"?stencil=1":""));Q.responseType="blob";this.addRemoteServiceSecurityCheck(Q);-null!=t&&Q.setRequestHeader("x-convert-custom",t);Q.onreadystatechange=mxUtils.bind(this,function(){if(4==Q.readyState&&A.clear())if(200<=Q.status&&299>=Q.status)try{var P=Q.response;if("text/xml"==P.type){var q=new FileReader;q.onload=mxUtils.bind(this,function(y){try{g(y.target.result)}catch(B){J({message:mxResources.get("errorLoadingFile")})}});q.readAsText(P)}else this.doImportVisio(P,g,J,v)}catch(y){J(y)}else try{""==Q.responseType||"text"==Q.responseType?J({message:Q.responseText}):(q=new FileReader,-q.onload=function(){try{J({message:JSON.parse(q.result).Message})}catch(y){J(y)}},q.readAsText(Q.response))}catch(y){J({})}});Q.send(G)}else if(A.clear())try{this.doImportVisio(d,g,J,v)}catch(P){J(P)}}else J({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?D():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",D,null,null,null,J))}),x)};EditorUi.prototype.importGraphML=function(d,g,k){var v=-mxUtils.bind(this,function(t){this.loadingExtensions=!1;null!=k?k(t):this.handleError(t)});this.createTimeout(null,mxUtils.bind(this,function(t){var x=mxUtils.bind(this,function(J){t.clear()&&v(J)}),A=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(t.clear())if(this.doImportGraphML)try{this.doImportGraphML(d,g,v)}catch(J){x(J)}else x({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?A():(this.loadingExtensions=!0,-mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))}),v)};EditorUi.prototype.exportVisio=function(d){if(this.spinner.spin(document.body,mxResources.get("loading"))){var g=mxUtils.bind(this,function(k){this.loadingExtensions=!1;this.handleError(k)});this.createTimeout(null,mxUtils.bind(this,function(k){var v=mxUtils.bind(this,function(x){k.clear()&&g(x)}),t=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(k.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),-(new VsdxExport(this)).exportCurrentDiagrams(d)||v({message:mxResources.get("unknownError")})}catch(x){v(x)}else v({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(t,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,v))}),g)}};EditorUi.prototype.convertLucidChart=function(d,g,k){var v=mxUtils.bind(this,function(t){this.loadingExtensions=!1;-null!=k?k(t):this.handleError(t)});this.createTimeout(null,mxUtils.bind(this,function(t){var x=mxUtils.bind(this,function(J){t.clear()&&v(J)}),A=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(t.clear())if("undefined"!==typeof window.LucidImporter)try{var J=JSON.parse(d);g(LucidImporter.importState(J));try{if(null!=window.console&&"1"==urlParams.test){var D=[(new Date).toISOString(),"convertLucidChart",J];null!=J.state&&D.push(JSON.parse(J.state));if(null!=J.svgThumbs)for(var G=0;G<J.svgThumbs.length;G++)D.push(Editor.createSvgDataUri(J.svgThumbs[G]));-null!=J.thumb&&D.push(J.thumb);console.log.apply(console,D)}}catch(R){}}catch(R){null!=window.console&&console.error(R),x(R)}else x({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(A,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",-function(){mxscript("js/orgchart/mxOrgChartLayout.js",A,null,null,null,x)},null,null,null,x)},null,null,null,x)},null,null,null,x)},null,null,null,x):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))}),v)};EditorUi.prototype.createMermaidXml=function(d,g,k,v,t,x){var A=new Graph(document.createElement("div"));k=A.insertVertex(null,null,null,0,0,v,t,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+k+";");A.setAttributeForCell(k,"mermaidData",JSON.stringify({data:d,-config:g},null,2));null!=x&&A.setAttributeForCell(k,"templatePrompt",x);d=(new mxCodec).encode(A.getModel());return mxUtils.getXml(d)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(d,g,k){var v=0,t=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(x){var A=new mxXmlRequest("https://www.draw.io/generate/v2",d,"POST"),J=mxUtils.bind(this,function(D){x.clear()&&k(D)});A.send(mxUtils.bind(this,function(D){if(x.isAlive())if(200<=D.getStatus()&&299>=D.getStatus())this.tryAndHandle(mxUtils.bind(this,-function(){var R=mxUtils.trim(D.getText());this.generateMermaidImage(R,null,mxUtils.bind(this,function(V,Q,P){this.tryAndHandle(mxUtils.bind(this,function(){x.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",d,"\nresult:",R),g(R,V,Q,P))}),J)}),J,mxUtils.bind(this,function(V){3>v++?x.clear()&&t():J(V)}))}),J);else{var G={message:mxResources.get("error")+" "+D.getStatus()};try{G=JSON.parse(D.getText()),G=G.error}catch(R){}J(G)}}),J)}),k)});t()};EditorUi.prototype.extractMermaidDeclaration=-function(d){d=mxUtils.trim(d);"o\n\n"==d.substring(0,3)&&(d=d.substring(3));var g=d.split("```");g=1<g.length?g:d.split("<pre>");g=1<g.length?g:d.split("~~~");g=1<g.length?g:d.split("%%");g=1<g.length?g:d.split("(Begins)");d=mxUtils.trim(1>=g.length?d:g[1]);g=d.split("\n");var k=1<g.length?g[1]:null;if(null!=k){var v=k.indexOf("-");0<v&&(k=k.substring(0,v))}if(0<g.length&&"mermaid"==mxUtils.trim(g[0])||null!=k&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k))g.shift(),d=mxUtils.trim(g.join("\n")),-g=d.split("\n");k=g[0].split(" ")[0].replace(/:$/,"");v=k.indexOf("-");0<v&&(k=k.substring(0,v));try{"mindmap"==k&&2<g.length&&(d=extractMermaidMindmap(g))}catch(t){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k)&&(d=null);return d};EditorUi.prototype.generateMermaidImage=function(d,g,k,v,t){var x=mxUtils.bind(this,function(J){this.loadingMermaid=!1;null!=v?v(J):this.handleError(J)}),A=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig);-g.securityLevel="strict";g.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&g.flowchart&&0<=d.indexOf("$$")&&(g.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(g.theme="dark");var J=mxUtils.bind(this,function(D){try{if(mxClient.IS_IE||mxClient.IS_IE11)D=D.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var G=mxUtils.parseXml(D).getElementsByTagName("svg");if(0<G.length&&"error"!=-G[0].getAttribute("aria-roledescription")){var R=parseFloat(G[0].getAttribute("width")),V=parseFloat(G[0].getAttribute("height"));if(isNaN(R)||isNaN(V))try{var Q=G[0].getAttribute("viewBox").split(/\s+/);R=parseFloat(Q[2]);V=parseFloat(Q[3])}catch(P){R=R||100,V=V||100}k(this.convertDataUri(Editor.createSvgDataUri(D)),R,V)}else null!=t?t():v({message:mxResources.get("invalidInput")})}catch(P){v(P)}});mermaid.mermaidAPI.initialize(g);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),-d).then(function(D){J(D.svg)}).catch(function(D){null!=t?t(D):v(D)})}catch(D){v(D)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(A,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(J){this.importXml(J,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",A,null,null,null,x)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))};-EditorUi.prototype.generatePlantUmlImage=function(d,g,k,v){function t(J,D,G){c1=J>>2;c2=(J&3)<<4|D>>4;c3=(D&15)<<2|G>>6;c4=G&63;r="";r+=x(c1&63);r+=x(c2&63);r+=x(c3&63);return r+=x(c4&63)}function x(J){if(10>J)return String.fromCharCode(48+J);J-=10;if(26>J)return String.fromCharCode(65+J);J-=26;if(26>J)return String.fromCharCode(97+J);J-=26;return 0==J?"-":1==J?"_":"?"}var A=new XMLHttpRequest;A.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(J){r="";-for(i=0;i<J.length;i+=3)r=i+2==J.length?r+t(J.charCodeAt(i),J.charCodeAt(i+1),0):i+1==J.length?r+t(J.charCodeAt(i),0,0):r+t(J.charCodeAt(i),J.charCodeAt(i+1),J.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(A.responseType="blob");A.onload=function(J){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(G){var R=new Image;R.onload=function(){try{var V=R.width,Q=R.height;-if(0==V&&0==Q){var P=D.result,q=P.indexOf(","),y=decodeURIComponent(escape(atob(P.substring(q+1)))),B=mxUtils.parseXml(y).getElementsByTagName("svg");0<B.length&&(V=parseFloat(B[0].getAttribute("width")),Q=parseFloat(B[0].getAttribute("height")))}k(D.result,V,Q)}catch(C){v(C)}};R.src=D.result};D.onerror=function(G){v(G)}}else v(J)};A.onerror=function(J){v(J)};A.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var v=this.editor.graph,t=null;v.getModel().beginUpdate();try{t=v.insertVertex(null,-null,"<pre>"+d+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),v.updateCellSize(t,!0)}finally{v.getModel().endUpdate()}return t};EditorUi.prototype.insertTextAt=function(d,g,k,v,t,x,A,J){x=null!=x?x:!0;A=null!=A?A:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(Q){4==Q.readyState&&200<=-Q.status&&299>=Q.status&&this.editor.graph.setSelectionCells(this.insertTextAt(Q.responseText,g,k,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(t||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var D=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,g,k,x,!0,J)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),null!=G&&0<G.length))return this.importXml(G,g,k,x,-!0,J);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var R=this.importXml(G,g,k,x,!0,J);if(0<R.length)return R}catch(Q){}this.loadImage(d,mxUtils.bind(this,function(Q){if("data:"==d.substring(0,5))this.resizeImage(Q,d,mxUtils.bind(this,function(y,B,C){D.setSelectionCell(D.insertVertex(null,null,"",D.snap(g),-D.snap(k),B,C,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(y)+";"))}),A,this.maxImageSize);else{var P=Math.min(1,Math.min(this.maxImageSize/Q.width,this.maxImageSize/Q.height)),q=Math.round(Q.width*P);Q=Math.round(Q.height*P);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(g),D.snap(k),q,Q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+-d+";"))}}),mxUtils.bind(this,function(){var Q=null;D.getModel().beginUpdate();try{Q=D.insertVertex(D.getDefaultParent(),null,d,D.snap(g),D.snap(k),1,1,"text;"+(v?"html=1;":"")),D.updateCellSize(Q),D.fireEvent(new mxEventObject("textInserted","cells",[Q]))}finally{D.getModel().endUpdate()}D.setSelectionCell(Q)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,g,k,x,null,J);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,-function(Q){this.editor.graph.setSelectionCells(this.importXml(Q,g,k,x,null,J))}),mxUtils.bind(this,function(Q){this.handleError(Q)}));else{D=this.editor.graph;t=null;D.getModel().beginUpdate();try{t=D.insertVertex(D.getDefaultParent(),null,"",D.snap(g),D.snap(k),1,1,"text;whiteSpace=wrap;"+(v?"html=1;":""));D.fireEvent(new mxEventObject("textInserted","cells",[t]));v&&(d=D.sanitizeHtml(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");t.value=d;D.updateCellSize(t);if(0<this.maxTextWidth&&-t.geometry.width>this.maxTextWidth){var V=D.getPreferredSizeForCell(t,this.maxTextWidth);t.geometry.width=V.width;t.geometry.height=V.height}Graph.isLink(t.value)&&D.setLinkForCell(t,t.value);t.geometry.width+=D.gridSize;t.geometry.height+=D.gridSize}finally{D.getModel().endUpdate()}return[t]}}return[]};EditorUi.prototype.formatFileSize=function(d){var g=-1;do d/=1024,g++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};EditorUi.prototype.convertDataUri=+x.model.setRoot(D.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(G){try{null==A&&(A=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var S=G.toDataURL("image/png");S=Editor.writeGraphModelToPng(S,"tEXt","mxfile",encodeURIComponent(A));d(S.substring(S.lastIndexOf(",")+1));x!=this.editor.graph&&x.container.parentNode.removeChild(x.container)}catch(U){null!=g&&g(U)}}),null,null,null,mxUtils.bind(this,function(G){null!=g&&g(G)}),null,null,u,null,x.shadowVisible,null,x,t,null,+null,null,"diagram",null)}catch(G){null!=g&&g(G)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,k,u,t,x,A,J,D,G,S,U,P){J=null!=J?J:!0;S=null!=S?S:0;A=null!=D?D:g.background;A==mxConstants.NONE&&(A=null);null==A&&"none"==g.getAdaptiveColors()&&(A="#ffffff");D=this.editor.graph.createSvgImageExport(null!=d);x=g.getSvg(A,G,S,null,null,x,null,D,null,g.shadowVisible||U,null,P,"diagram");(g.shadowVisible||U)&&g.addSvgShadow(x,null,null,0==S);null!=d&&x.setAttribute("content",d);null!=k&&x.setAttribute("resource",+k);var O=mxUtils.bind(this,function(q){q=(u?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(q);null!=t&&t(q);return q});g.mathEnabled&&this.editor.addMathCss(x);if(null!=t)this.embedFonts(x,mxUtils.bind(this,function(q){J?this.editor.convertImages(q,mxUtils.bind(this,function(y){O(y)})):O(q)}));else return O(x)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(d,k),g(d)}catch(u){g(d)}}))}catch(k){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,k,u,t,x,A,J,D,G,S,U,P){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(q){Editor.addRetryToError(q,mxUtils.bind(this,function(){this.exportImage(d,g,k,u,t,x,A,J,D,G,S,U,P)}));this.handleError(q)}))){var O=this.editor.graph.isSelectionEmpty();+k=null!=k?k:O;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(q){this.spinner.stop();try{this.saveCanvas(q,t?this.getFileData(!0,null,null,null,k,J,null,null,null,null,null,d,x):null,D,null==this.pages||0==this.pages.length,S)}catch(y){this.handleError(y)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),null,k,d||1,g,u,null,null,x,A,G,U,P)}catch(q){this.spinner.stop(),this.handleError(q)}}};+EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.addLocalPagesToMapping=function(d){d=null!=d?d:{};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)d[this.pages[g].getId()]=this.pages[g].getId();return d};EditorUi.prototype.importXml=function(d,g,k,u,t,x,A){g=null!=g?g:0;k=null!=k?k:0;var J=[];try{var D=this.editor.graph;if(null!=d&&0<d.length){D.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var S=this.editor.extractGraphModel(G.documentElement,+null!=this.pages);if(null!=S&&"mxfile"==S.nodeName&&null!=this.pages){var U=S.getElementsByTagName("diagram");if(1==U.length&&!x){if(S=Editor.parseDiagramNode(U[0]),null!=this.currentPage&&(d[U[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var P=U[0].getAttribute("name");null!=P&&""!=P&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,P))}}else if(0<U.length){x=[];var O=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[U[0].getAttribute("id")]=+this.pages[0].getId(),P=U[0].getAttribute("name"),null!=P&&""!=P&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],P)),S=Editor.parseDiagramNode(U[0]),u=!1,O=1);for(;O<U.length;O++){var q=U[O].getAttribute("id");U[O].removeAttribute("id");var y=this.updatePageRoot(new DiagramPage(U[O]));d[q]=U[O].getAttribute("id");var B=this.pages.length;null==y.getName()&&y.setName(mxResources.get("pageWithNumber",[B+1]));D.model.execute(new ChangePage(this,y,y,B,!0));x.push(y)}this.updatePageLinks(d,+x)}}if(null!=S&&"mxGraphModel"===S.nodeName){J=D.importGraphModel(S,g,k,u);if(null!=J)for(this.addLocalPagesToMapping(d),O=0;O<J.length;O++)this.updatePageLinksForCell(d,J[O]);var C=D.parseBackgroundImage(S.getAttribute("backgroundImage"));if(null!=C&&null!=C.originalSrc){this.updateBackgroundPageLink(d,C);var M=new ChangePageSetup(this,null,C);M.ignoreColor=!0;D.model.execute(M)}}A&&D.pasteCellStyles(D.includeDescendants(J),D.defaultVertexStyle,D.defaultEdgeStyle)}finally{D.model.endUpdate()}}}catch(T){if(t)throw T;+this.handleError(T)}return J};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(u){}};EditorUi.prototype.updatePageLinksForCell=+function(d,g){var k=document.createElement("div"),u=this.editor.graph,t=u.getLinkForCell(g);null!=t&&u.setLinkForCell(g,this.updatePageLink(d,t));if(u.isHtmlLabel(g)){k.innerHTML=Graph.sanitizeHtml(u.getLabel(g));for(var x=k.getElementsByTagName("a"),A=!1,J=0;J<x.length;J++)t=x[J].getAttribute("href"),null!=t&&(x[J].setAttribute("href",this.updatePageLink(d,t)),A=!0);A&&u.labelChanged(g,k.innerHTML)}for(J=0;J<u.model.getChildCount(g);J++)this.updatePageLinksForCell(d,u.model.getChildAt(g,J))};EditorUi.prototype.updatePageLink=+function(d,g){if(Graph.isPageLink(g)){var k=d[g.substring(g.indexOf(",")+1)];g=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==g.substring(0,17))try{var u=JSON.parse(g.substring(17));if(null!=u.actions){for(var t=0;t<u.actions.length;t++){var x=u.actions[t];if(null!=x.open&&Graph.isPageLink(x.open)){var A=x.open.substring(x.open.indexOf(",")+1);k=d[A];null!=k?x.open="data:page/id,"+k:null==this.getPageById(A)&&delete x.open}}g="data:action/json,"+JSON.stringify(u)}}catch(J){}return g};+EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,g,k,u,t){var x=mxUtils.bind(this,function(A){this.loadingExtensions=!1;null!=k?k(A):this.handleError(A)});this.createTimeout(null,mxUtils.bind(this,function(A){u=null!=u?u:d.name;var J=mxUtils.bind(this,function(G){A.clear()&&x(G)}),D=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var G=this.isRemoteVisioFormat(u);+try{var S=u.lastIndexOf(".");if(0<=S&&S<u.length)u.substring(S+1).toUpperCase();else{var U=u.lastIndexOf("/");0<=U&&U<u.length&&(u=u.substring(U+1))}}catch(O){}if(G)if(null==VSD_CONVERT_URL||this.isOffline())J({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{G=new FormData;G.append("file1",d,u);var P=new XMLHttpRequest;P.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(u)?"?stencil=1":""));P.responseType="blob";this.addRemoteServiceSecurityCheck(P);+null!=t&&P.setRequestHeader("x-convert-custom",t);P.onreadystatechange=mxUtils.bind(this,function(){if(4==P.readyState&&A.clear())if(200<=P.status&&299>=P.status)try{var O=P.response;if("text/xml"==O.type){var q=new FileReader;q.onload=mxUtils.bind(this,function(y){try{g(y.target.result)}catch(B){J({message:mxResources.get("errorLoadingFile")})}});q.readAsText(O)}else this.doImportVisio(O,g,J,u)}catch(y){J(y)}else try{""==P.responseType||"text"==P.responseType?J({message:P.responseText}):(q=new FileReader,+q.onload=function(){try{J({message:JSON.parse(q.result).Message})}catch(y){J(y)}},q.readAsText(P.response))}catch(y){J({})}});P.send(G)}else if(A.clear())try{this.doImportVisio(d,g,J,u)}catch(O){J(O)}}else J({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?D():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",D,null,null,null,J))}),x)};EditorUi.prototype.importGraphML=function(d,g,k){var u=+mxUtils.bind(this,function(t){this.loadingExtensions=!1;null!=k?k(t):this.handleError(t)});this.createTimeout(null,mxUtils.bind(this,function(t){var x=mxUtils.bind(this,function(J){t.clear()&&u(J)}),A=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(t.clear())if(this.doImportGraphML)try{this.doImportGraphML(d,g,u)}catch(J){x(J)}else x({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?A():(this.loadingExtensions=!0,+mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))}),u)};EditorUi.prototype.exportVisio=function(d){if(this.spinner.spin(document.body,mxResources.get("loading"))){var g=mxUtils.bind(this,function(k){this.loadingExtensions=!1;this.handleError(k)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(k){var u=mxUtils.bind(this,function(x){k.clear()&&g(x)}),t=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(k.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),+(new VsdxExport(this)).exportCurrentDiagrams(d)||u({message:mxResources.get("unknownError")})}catch(x){u(x)}else u({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(t,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,u))}),g):g({message:mxResources.get("serviceUnavailableOrBlocked")})}};EditorUi.prototype.convertLucidChart=function(d,g,k){var u=+mxUtils.bind(this,function(t){this.loadingExtensions=!1;null!=k?k(t):this.handleError(t)});this.createTimeout(null,mxUtils.bind(this,function(t){var x=mxUtils.bind(this,function(J){t.clear()&&u(J)}),A=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(t.clear())if("undefined"!==typeof window.LucidImporter)try{var J=JSON.parse(d);g(LucidImporter.importState(J));try{if(null!=window.console&&"1"==urlParams.test){var D=[(new Date).toISOString(),"convertLucidChart",J];null!=J.state&&D.push(JSON.parse(J.state));+if(null!=J.svgThumbs)for(var G=0;G<J.svgThumbs.length;G++)D.push(Editor.createSvgDataUri(J.svgThumbs[G]));null!=J.thumb&&D.push(J.thumb);console.log.apply(console,D)}}catch(S){}}catch(S){null!=window.console&&console.error(S),x(S)}else x({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(A,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",+function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",A,null,null,null,x)},null,null,null,x)},null,null,null,x)},null,null,null,x)},null,null,null,x):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))}),u)};EditorUi.prototype.createMermaidXml=function(d,g,k,u,t,x){var A=new Graph(document.createElement("div"));k=A.insertVertex(null,null,null,0,0,u,t,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="++k+";");A.setAttributeForCell(k,"mermaidData",JSON.stringify({data:d,config:g},null,2));null!=x&&A.setAttributeForCell(k,"templatePrompt",x);d=(new mxCodec).encode(A.getModel());return mxUtils.getXml(d)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(d,g,k){var u=0,t=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(x){var A=new mxXmlRequest("https://www.draw.io/generate/v2",d,"POST"),J=mxUtils.bind(this,function(D){x.clear()&&k(D)});A.send(mxUtils.bind(this,+function(D){if(x.isAlive())if(200<=D.getStatus()&&299>=D.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var S=mxUtils.trim(D.getText());this.generateMermaidImage(S,null,mxUtils.bind(this,function(U,P,O){this.tryAndHandle(mxUtils.bind(this,function(){x.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",d,"\nresult:",S),g(S,U,P,O))}),J)}),J,mxUtils.bind(this,function(U){3>u++?x.clear()&&t():J(U)}))}),J);else{var G={message:mxResources.get("error")+" "+D.getStatus()};+try{G=JSON.parse(D.getText()),G=G.error}catch(S){}J(G)}}),J)}),k)});t()};EditorUi.prototype.extractMermaidDeclaration=function(d){d=mxUtils.trim(d);"o\n\n"==d.substring(0,3)&&(d=d.substring(3));var g=d.split("```");g=1<g.length?g:d.split("<pre>");g=1<g.length?g:d.split("~~~");g=1<g.length?g:d.split("%%");g=1<g.length?g:d.split("(Begins)");d=mxUtils.trim(1>=g.length?d:g[1]);g=d.split("\n");var k=1<g.length?g[1]:null;if(null!=k){var u=k.indexOf("-");0<u&&(k=k.substring(0,u))}if(0<g.length&&"mermaid"==+mxUtils.trim(g[0])||null!=k&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k))g.shift(),d=mxUtils.trim(g.join("\n")),g=d.split("\n");k=g[0].split(" ")[0].replace(/:$/,"");u=k.indexOf("-");0<u&&(k=k.substring(0,u));try{"mindmap"==k&&2<g.length&&(d=extractMermaidMindmap(g))}catch(t){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k)&&(d=null);return d};EditorUi.prototype.generateMermaidImage=function(d,g,k,u,t){var x=mxUtils.bind(this,function(J){this.loadingMermaid=!1;null!=u?u(J):this.handleError(J)}),+A=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig);g.securityLevel="strict";g.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&g.flowchart&&0<=d.indexOf("$$")&&(g.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(g.theme="dark");var J=mxUtils.bind(this,function(D){try{if(mxClient.IS_IE||mxClient.IS_IE11)D=D.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,+' xml:space="preserve"');var G=mxUtils.parseXml(D).getElementsByTagName("svg");if(0<G.length&&"error"!=G[0].getAttribute("aria-roledescription")){var S=parseFloat(G[0].getAttribute("width")),U=parseFloat(G[0].getAttribute("height"));if(isNaN(S)||isNaN(U))try{var P=G[0].getAttribute("viewBox").split(/\s+/);S=parseFloat(P[2]);U=parseFloat(P[3])}catch(O){S=S||100,U=U||100}k(this.convertDataUri(Editor.createSvgDataUri(D)),S,U)}else null!=t?t():u({message:mxResources.get("invalidInput")})}catch(O){u(O)}});+mermaid.mermaidAPI.initialize(g);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d).then(function(D){J(D.svg)}).catch(function(D){null!=t?t(D):u(D)})}catch(D){u(D)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(A,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(J){this.importXml(J,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",+A,null,null,null,x)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))};EditorUi.prototype.generatePlantUmlImage=function(d,g,k,u){function t(J,D,G){c1=J>>2;c2=(J&3)<<4|D>>4;c3=(D&15)<<2|G>>6;c4=G&63;r="";r+=x(c1&63);r+=x(c2&63);r+=x(c3&63);return r+=x(c4&63)}function x(J){if(10>J)return String.fromCharCode(48+J);J-=10;if(26>J)return String.fromCharCode(65+J);J-=26;if(26>J)return String.fromCharCode(97+J);J-=26;return 0==J?"-":1==J?"_":"?"}var A=new XMLHttpRequest;A.open("GET",+("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(J){r="";for(i=0;i<J.length;i+=3)r=i+2==J.length?r+t(J.charCodeAt(i),J.charCodeAt(i+1),0):i+1==J.length?r+t(J.charCodeAt(i),0,0):r+t(J.charCodeAt(i),J.charCodeAt(i+1),J.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(A.responseType="blob");A.onload=function(J){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);+D.onloadend=function(G){var S=new Image;S.onload=function(){try{var U=S.width,P=S.height;if(0==U&&0==P){var O=D.result,q=O.indexOf(","),y=decodeURIComponent(escape(atob(O.substring(q+1)))),B=mxUtils.parseXml(y).getElementsByTagName("svg");0<B.length&&(U=parseFloat(B[0].getAttribute("width")),P=parseFloat(B[0].getAttribute("height")))}k(D.result,U,P)}catch(C){u(C)}};S.src=D.result};D.onerror=function(G){u(G)}}else u(J)};A.onerror=function(J){u(J)};A.send()};EditorUi.prototype.insertAsPreText=function(d,+g,k){var u=this.editor.graph,t=null;u.getModel().beginUpdate();try{t=u.insertVertex(null,null,"<pre>"+d+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),u.updateCellSize(t,!0)}finally{u.getModel().endUpdate()}return t};EditorUi.prototype.insertTextAt=function(d,g,k,u,t,x,A,J){x=null!=x?x:!0;A=null!=A?A:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g,+" "),mxUtils.bind(this,function(P){4==P.readyState&&200<=P.status&&299>=P.status&&this.editor.graph.setSelectionCells(this.insertTextAt(P.responseText,g,k,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(t||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var D=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,g,k,x,!0,J)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),+null!=G&&0<G.length))return this.importXml(G,g,k,x,!0,J);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var S=this.importXml(G,g,k,x,!0,J);if(0<S.length)return S}catch(P){}this.loadImage(d,mxUtils.bind(this,function(P){if("data:"==d.substring(0,5))this.resizeImage(P,d,mxUtils.bind(this,function(y,B,+C){D.setSelectionCell(D.insertVertex(null,null,"",D.snap(g),D.snap(k),B,C,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(y)+";"))}),A,this.maxImageSize);else{var O=Math.min(1,Math.min(this.maxImageSize/P.width,this.maxImageSize/P.height)),q=Math.round(P.width*O);P=Math.round(P.height*O);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(g),D.snap(k),q,P,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="++d+";"))}}),mxUtils.bind(this,function(){var P=null;D.getModel().beginUpdate();try{P=D.insertVertex(D.getDefaultParent(),null,d,D.snap(g),D.snap(k),1,1,"text;"+(u?"html=1;":"")),D.updateCellSize(P),D.fireEvent(new mxEventObject("textInserted","cells",[P]))}finally{D.getModel().endUpdate()}D.setSelectionCell(P)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,g,k,x,null,J);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,+function(P){this.editor.graph.setSelectionCells(this.importXml(P,g,k,x,null,J))}),mxUtils.bind(this,function(P){this.handleError(P)}));else{D=this.editor.graph;t=null;D.getModel().beginUpdate();try{t=D.insertVertex(D.getDefaultParent(),null,"",D.snap(g),D.snap(k),1,1,"text;whiteSpace=wrap;"+(u?"html=1;":""));D.fireEvent(new mxEventObject("textInserted","cells",[t]));u&&(d=D.sanitizeHtml(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");t.value=d;D.updateCellSize(t);if(0<this.maxTextWidth&&+t.geometry.width>this.maxTextWidth){var U=D.getPreferredSizeForCell(t,this.maxTextWidth);t.geometry.width=U.width;t.geometry.height=U.height}Graph.isLink(t.value)&&D.setLinkForCell(t,t.value);t.geometry.width+=D.gridSize;t.geometry.height+=D.gridSize}finally{D.getModel().endUpdate()}return[t]}}return[]};EditorUi.prototype.formatFileSize=function(d){var g=-1;do d/=1024,g++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var g=d.indexOf(";");0<g&&(d=d.substring(0,g)+d.substring(d.indexOf(",",g+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,g){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,g){if(d&&Graph.fileSupport){if(null==this.importFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.importFiles(k.files,null,null,this.maxImageSize),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.importFileInputElt=k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(A,J){StorageFile.listFiles(this,"F",A,J)});window.openBrowserFile=-mxUtils.bind(this,function(A,J,D){StorageFile.getFileContent(this,A,J,D)});window.deleteBrowserFile=mxUtils.bind(this,function(A,J,D){StorageFile.deleteFile(this,A,J,D)});if(!g){var v=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(A){this.hideDialog(A)}));window.openFile.setConsumer(mxUtils.bind(this,function(A,J){null!=J&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(J)?(A=new Blob([A],{type:"application/octet-stream"}),this.importVisio(A,-mxUtils.bind(this,function(D){this.importXml(D,0,0,!0)}),null,J)):this.editor.graph.setSelectionCells(this.importXml(A,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var t=this.dialog,x=t.close;this.dialog.close=mxUtils.bind(this,function(A){Editor.useLocalStorage=v;x.apply(t,arguments);A&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=-function(d,g,k){var v=this,t=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(x){if(mxUtils.isEmptyObject(x.files))k();else{var A=0,J,D=!1;x.forEach(function(G,R){G=R.name.toLowerCase();"diagram/diagram.xml"==G?(D=!0,R.async("string").then(function(V){0==V.indexOf("<mxfile ")?g(V):k()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>A&&(A=G,J=R))});0<A?J.async("string").then(function(G){(new XMLHttpRequest).upload&&v.isRemoteFileFormat(G,-d.name)?v.isOffline()?v.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):v.parseFileData(G,mxUtils.bind(this,function(R){4==R.readyState&&(200<=R.status&&299>=R.status?g(R.responseText):k())}),d.name):k()}):D||k()}},function(x){k(x)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,k))};EditorUi.prototype.importFile=function(d,g,k,v,t,x,A,-J,D,G,R,V){G=null!=G?G:!0;var Q=!1,P=null,q=mxUtils.bind(this,function(y){var B=null;null!=y&&"<mxlibrary"==y.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,y,A)),this.showSidebar()):B=this.importXml(y,k,v,G,null,null!=V?mxEvent.isControlDown(V):null);null!=J&&J(B)});"image"==g.substring(0,5)?(D=!1,"image/png"==g.substring(0,9)&&(R=R?null:this.extractGraphModelFromPng(d),null!=R&&0<R.length&&(P=this.importXml(R,k,v,G,null,null!=V?mxEvent.isControlDown(V):null),D=!0)),D||(D=this.editor.graph,-R=d.indexOf(";"),0<R&&(d=d.substring(0,R)+d.substring(d.indexOf(",",R+1))),G&&D.isGridEnabled()&&(k=D.snap(k),v=D.snap(v)),R="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==g.substring(0,9)&&(R+="editableCssRules=.*;"),P=[D.insertVertex(null,null,"",k,v,t,x,R+"image="+d+";")])):/(\.*<graphml )/.test(d)?(Q=!0,this.importGraphML(d,q)):null!=D&&null!=A&&EditorUi.isVisioFilename(A)?(Q=!0,this.importVisio(D,q)):(new XMLHttpRequest).upload&&-this.isRemoteFileFormat(d,A)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(Q=!0,g=mxUtils.bind(this,function(y){4==y.readyState&&(200<=y.status&&299>=y.status?q(y.responseText):null!=J&&(J(null),this.showError(mxResources.get("error"),413==y.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,g,A):this.parseFile(D,g,A)):0==d.indexOf("PK")&&null!=D?(Q=!0,this.importZipFile(D,q,mxUtils.bind(this,function(){P=-this.insertTextAt(this.validateFileData(d),k,v,!0,null,G);J(P)}))):/(\.v(sd|dx))($|\?)/i.test(A)||/(\.vs(s|x))($|\?)/i.test(A)||(P=this.insertTextAt(this.validateFileData(d),k,v,!0,null,G,null,null!=V?mxEvent.isControlDown(V):null));Q||null==J||J(P);return P};EditorUi.prototype.importFiles=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){v=null!=v?v:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var P=null!=g&&null!=k,q=!0;g=null!=g?g:0;k=null!=k?k:0;var y=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var B=R||-this.resampleThreshold,C=0;C<d.length;C++)if("image/svg"!==d[C].type.substring(0,9)&&"image/"===d[C].type.substring(0,6)&&d[C].size>B){y=!0;break}var M=mxUtils.bind(this,function(){var T=this.editor.graph,m=T.gridSize;t=null!=t?t:mxUtils.bind(this,function(S,U,W,X,Z,Y,ba,ea,ca){try{if(null!=S&&"<mxlibrary"==S.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,S,ba)),this.showSidebar(),null;this.isCompatibleString(S)&&1==d.length&&null!=Q&&"drop"==Q.type&&this.isBlankFile()&&-!this.canUndo()&&(P=!1,X=W=0);return this.importFile(S,U,W,X,Z,Y,ba,ea,ca,P,V,Q)}catch(fa){return this.handleError(fa),null}});x=null!=x?x:mxUtils.bind(this,function(S){T.setSelectionCells(S)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var z=d.length,I=z,L=[],N=mxUtils.bind(this,function(S,U){L[S]=U;if(0==--I){this.spinner.stop();if(null!=J)J(L);else{var W=[];T.getModel().beginUpdate();try{for(S=0;S<L.length;S++){var X=L[S]();null!=X&&(W=W.concat(X))}}finally{T.getModel().endUpdate()}}x(W)}}),-O=0;O<z;O++)mxUtils.bind(this,function(S){var U=d[S];if(null!=U){var W=new FileReader;W.onload=mxUtils.bind(this,function(X){if(null==A||A(U))try{if("image/"==U.type.substring(0,6))if("image/svg"==U.type.substring(0,9)){var Z=Graph.clipSvgDataUri(X.target.result),Y=Z.indexOf(","),ba=decodeURIComponent(escape(atob(Z.substring(Y+1)))),ea=mxUtils.parseXml(ba),ca=ea.getElementsByTagName("svg");if(0<ca.length){var fa=ca[0],aa=V?null:fa.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&-(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0,14)?N(S,mxUtils.bind(this,function(){try{if(null!=ea){var pa=ea.getElementsByTagName("svg");if(0<pa.length){var oa=pa[0],ha=oa.getAttribute("width"),xa=oa.getAttribute("height");ha=null!=ha&&"%"!=ha.charAt(ha.length-1)?parseFloat(ha):NaN;xa=null!=xa&&"%"!=xa.charAt(xa.length-1)?parseFloat(xa):NaN;var qa=oa.getAttribute("viewBox");-if(null==qa||0==qa.length)oa.setAttribute("viewBox","0 0 "+ha+" "+xa);else if(isNaN(ha)||isNaN(xa)){var ua=qa.split(" ");3<ua.length&&(ha=parseFloat(ua[2]),xa=parseFloat(ua[3]))}Z=Editor.createSvgDataUri(mxUtils.getXml(oa));var ya=Math.min(1,Math.min(v/Math.max(1,ha)),v/Math.max(1,xa)),ja=t(Z,U.type,g+S*m,k+S*m,Math.max(1,Math.round(ha*ya)),Math.max(1,Math.round(xa*ya)),U.name);if(null!=ja&&(isNaN(ha)||isNaN(xa))){var ma=new Image;ma.onload=mxUtils.bind(this,function(){ha=Math.max(1,ma.width);xa=-Math.max(1,ma.height);ja[0].geometry.width=ha;ja[0].geometry.height=xa;oa.setAttribute("viewBox","0 0 "+ha+" "+xa);Z=Editor.createSvgDataUri(mxUtils.getXml(oa));var ka=Z.indexOf(";");0<ka&&(Z=Z.substring(0,ka)+Z.substring(Z.indexOf(",",ka+1)));T.setCellStyles("image",Z,[ja[0]])});ma.src=Editor.createSvgDataUri(mxUtils.getXml(oa))}return ja}}}catch(ka){}return null})):N(S,mxUtils.bind(this,function(){return t(aa,"text/xml",g+S*m,k+S*m,0,0,U.name)}))}else N(S,mxUtils.bind(this,function(){return null}))}else{Y=-!1;if("image/png"==U.type){var da=V?null:this.extractGraphModelFromPng(X.target.result);if(null!=da&&0<da.length){var ia=new Image;ia.src=X.target.result;N(S,mxUtils.bind(this,function(){return t(da,"text/xml",g+S*m,k+S*m,ia.width,ia.height,U.name)}));Y=!0}}Y||(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(X.target.result,mxUtils.bind(this,function(pa){this.resizeImage(pa,X.target.result,mxUtils.bind(this,function(oa,ha,xa){N(S,mxUtils.bind(this,function(){if(null!=oa&&oa.length<G){var qa=q&&this.isResampleImageSize(U.size,R)?Math.min(1,Math.min(v/ha,v/xa)):1;return t(oa,U.type,g+S*m,k+S*m,Math.round(ha*qa),Math.round(xa*qa),U.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),q,v,R,U.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=-X.target.result,t(Z,U.type,g+S*m,k+S*m,240,160,U.name,function(pa){N(S,function(){return pa})},U)}catch(pa){N(S,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(pa,U)}else N(S,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(U.name)?t(null,U.type,g+S*m,k+S*m,240,160,U.name,function(X){N(S,function(){return X})},U):"image"==U.type.substring(0,5)||"application/pdf"==U.type?W.readAsDataURL(U):W.readAsText(U)}})(O)});if(y){y=[];for(C=0;C<d.length;C++)y.push(d[C]);-d=y;this.confirmImageResize(function(T){q=T;M()},D)}else M()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},v=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,t=function(x,A){if(x||g)mxSettings.setResizeImages(x?-A:null),mxSettings.save();k();d(A)};null==v||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(x){t(x,!0)},function(x){t(x,!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?226:200,!0,!0):t(!1,v)};EditorUi.prototype.parseFile=function(d,g,-k){k=null!=k?k:d.name;var v=new FileReader;v.onload=mxUtils.bind(this,function(){this.parseFileData(v.result,g,k)});v.readAsText(d)};EditorUi.prototype.parseFileData=function(d,g,k){var v=new XMLHttpRequest;v.open("POST",OPEN_URL);v.setRequestHeader("Content-Type","application/x-www-form-urlencoded");v.onreadystatechange=function(){g(v)};v.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(t){}};-EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,v,t,x,A){t=null!=t?t:this.maxImageSize;var J=Math.max(1,d.width),D=Math.max(1,d.height),G=g;if(v&&this.isResampleImageSize(null!=A?A:g.length,x))try{var R=Math.max(J/t,D/t);if(1<R){var V=Math.round(J/R),Q=Math.round(D/R),P=document.createElement("canvas");P.width=V;P.height=Q;P.getContext("2d").drawImage(d,0,0,V,Q);var q=P.toDataURL();if(q.length<g.length){var y=-document.createElement("canvas");y.width=V;y.height=Q;var B=y.toDataURL();q!==B&&(g=q,J=V,D=Q)}}}catch(C){}v&&G!=g&&t>this.maxImageSize/2&&g.length>this.maxImageBytes?this.resizeImage(d,g,k,v,t/1.5,x,A):k(g,J,D)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,k){try{var v=new Image;v.onload=function(){v.width=0<v.width?v.width:120;v.height=0<v.height?v.height:120;g(v)};null!=k&&(v.onerror=k);v.src=d}catch(t){if(null!=+mxUtils.bind(this,function(A,J,D){StorageFile.getFileContent(this,A,J,D)});window.deleteBrowserFile=mxUtils.bind(this,function(A,J,D){StorageFile.deleteFile(this,A,J,D)});if(!g){var u=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(A){this.hideDialog(A)}));window.openFile.setConsumer(mxUtils.bind(this,function(A,J){null!=J&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(J)?(A=new Blob([A],{type:"application/octet-stream"}),this.importVisio(A,+mxUtils.bind(this,function(D){this.importXml(D,0,0,!0)}),null,J)):this.editor.graph.setSelectionCells(this.importXml(A,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var t=this.dialog,x=t.close;this.dialog.close=mxUtils.bind(this,function(A){Editor.useLocalStorage=u;x.apply(t,arguments);A&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=+function(d,g,k){var u=this,t=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(x){if(mxUtils.isEmptyObject(x.files))k();else{var A=0,J,D=!1;x.forEach(function(G,S){G=S.name.toLowerCase();"diagram/diagram.xml"==G?(D=!0,S.async("string").then(function(U){0==U.indexOf("<mxfile ")?g(U):k()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>A&&(A=G,J=S))});0<A?J.async("string").then(function(G){(new XMLHttpRequest).upload&&u.isRemoteFileFormat(G,+d.name)?u.isOffline()?u.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):u.parseFileData(G,mxUtils.bind(this,function(S){4==S.readyState&&(200<=S.status&&299>=S.status?g(S.responseText):k())}),d.name):k()}):D||k()}},function(x){k(x)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,k))};EditorUi.prototype.importFile=function(d,g,k,u,t,x,A,+J,D,G,S,U){G=null!=G?G:!0;var P=!1,O=null,q=mxUtils.bind(this,function(y){var B=null;null!=y&&"<mxlibrary"==y.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,y,A)),this.showSidebar()):B=this.importXml(y,k,u,G,null,null!=U?mxEvent.isControlDown(U):null);null!=J&&J(B)});"image"==g.substring(0,5)?(D=!1,"image/png"==g.substring(0,9)&&(S=S?null:this.extractGraphModelFromPng(d),null!=S&&0<S.length&&(O=this.importXml(S,k,u,G,null,null!=U?mxEvent.isControlDown(U):null),D=!0)),D||(D=this.editor.graph,+S=d.indexOf(";"),0<S&&(d=d.substring(0,S)+d.substring(d.indexOf(",",S+1))),G&&D.isGridEnabled()&&(k=D.snap(k),u=D.snap(u)),S="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==g.substring(0,9)&&(S+="editableCssRules=.*;"),O=[D.insertVertex(null,null,"",k,u,t,x,S+"image="+d+";")])):/(\.*<graphml )/.test(d)?(P=!0,this.importGraphML(d,q)):null!=D&&null!=A&&EditorUi.isVisioFilename(A)?(P=!0,this.importVisio(D,q)):(new XMLHttpRequest).upload&&+this.isRemoteFileFormat(d,A)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(P=!0,g=mxUtils.bind(this,function(y){4==y.readyState&&(200<=y.status&&299>=y.status?q(y.responseText):null!=J&&(J(null),this.showError(mxResources.get("error"),413==y.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,g,A):this.parseFile(D,g,A)):0==d.indexOf("PK")&&null!=D?(P=!0,this.importZipFile(D,q,mxUtils.bind(this,function(){O=+this.insertTextAt(this.validateFileData(d),k,u,!0,null,G);J(O)}))):/(\.v(sd|dx))($|\?)/i.test(A)||/(\.vs(s|x))($|\?)/i.test(A)||(O=this.insertTextAt(this.validateFileData(d),k,u,!0,null,G,null,null!=U?mxEvent.isControlDown(U):null));P||null==J||J(O);return O};EditorUi.prototype.importFiles=function(d,g,k,u,t,x,A,J,D,G,S,U,P){u=null!=u?u:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var O=null!=g&&null!=k,q=!0;g=null!=g?g:0;k=null!=k?k:0;var y=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var B=S||+this.resampleThreshold,C=0;C<d.length;C++)if("image/svg"!==d[C].type.substring(0,9)&&"image/"===d[C].type.substring(0,6)&&d[C].size>B){y=!0;break}var M=mxUtils.bind(this,function(){var T=this.editor.graph,m=T.gridSize;t=null!=t?t:mxUtils.bind(this,function(R,V,W,X,Z,Y,ba,da,ca){try{if(null!=R&&"<mxlibrary"==R.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,R,ba)),this.showSidebar(),null;this.isCompatibleString(R)&&1==d.length&&null!=P&&"drop"==P.type&&this.isBlankFile()&&+!this.canUndo()&&(O=!1,X=W=0);return this.importFile(R,V,W,X,Z,Y,ba,da,ca,O,U,P)}catch(ea){return this.handleError(ea),null}});x=null!=x?x:mxUtils.bind(this,function(R){T.setSelectionCells(R)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var z=d.length,I=z,L=[],N=mxUtils.bind(this,function(R,V){L[R]=V;if(0==--I){this.spinner.stop();if(null!=J)J(L);else{var W=[];T.getModel().beginUpdate();try{for(R=0;R<L.length;R++){var X=L[R]();null!=X&&(W=W.concat(X))}}finally{T.getModel().endUpdate()}}x(W)}}),+Q=0;Q<z;Q++)mxUtils.bind(this,function(R){var V=d[R];if(null!=V){var W=new FileReader;W.onload=mxUtils.bind(this,function(X){if(null==A||A(V))try{if("image/"==V.type.substring(0,6))if("image/svg"==V.type.substring(0,9)){var Z=Graph.clipSvgDataUri(X.target.result),Y=Z.indexOf(","),ba=decodeURIComponent(escape(atob(Z.substring(Y+1)))),da=mxUtils.parseXml(ba),ca=da.getElementsByTagName("svg");if(0<ca.length){var ea=ca[0],aa=U?null:ea.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&+(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0,14)?N(R,mxUtils.bind(this,function(){try{if(null!=da){var na=da.getElementsByTagName("svg");if(0<na.length){var pa=na[0],ha=pa.getAttribute("width"),wa=pa.getAttribute("height");ha=null!=ha&&"%"!=ha.charAt(ha.length-1)?parseFloat(ha):NaN;wa=null!=wa&&"%"!=wa.charAt(wa.length-1)?parseFloat(wa):NaN;var qa=pa.getAttribute("viewBox");+if(null==qa||0==qa.length)pa.setAttribute("viewBox","0 0 "+ha+" "+wa);else if(isNaN(ha)||isNaN(wa)){var ua=qa.split(" ");3<ua.length&&(ha=parseFloat(ua[2]),wa=parseFloat(ua[3]))}Z=Editor.createSvgDataUri(mxUtils.getXml(pa));var ya=Math.min(1,Math.min(u/Math.max(1,ha)),u/Math.max(1,wa)),ja=t(Z,V.type,g+R*m,k+R*m,Math.max(1,Math.round(ha*ya)),Math.max(1,Math.round(wa*ya)),V.name);if(null!=ja&&(isNaN(ha)||isNaN(wa))){var oa=new Image;oa.onload=mxUtils.bind(this,function(){ha=Math.max(1,oa.width);wa=+Math.max(1,oa.height);ja[0].geometry.width=ha;ja[0].geometry.height=wa;pa.setAttribute("viewBox","0 0 "+ha+" "+wa);Z=Editor.createSvgDataUri(mxUtils.getXml(pa));var ka=Z.indexOf(";");0<ka&&(Z=Z.substring(0,ka)+Z.substring(Z.indexOf(",",ka+1)));T.setCellStyles("image",Z,[ja[0]])});oa.src=Editor.createSvgDataUri(mxUtils.getXml(pa))}return ja}}}catch(ka){}return null})):N(R,mxUtils.bind(this,function(){return t(aa,"text/xml",g+R*m,k+R*m,0,0,V.name)}))}else N(R,mxUtils.bind(this,function(){return null}))}else{Y=+!1;if("image/png"==V.type){var fa=U?null:this.extractGraphModelFromPng(X.target.result);if(null!=fa&&0<fa.length){var ia=new Image;ia.src=X.target.result;N(R,mxUtils.bind(this,function(){return t(fa,"text/xml",g+R*m,k+R*m,ia.width,ia.height,V.name)}));Y=!0}}Y||(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(X.target.result,mxUtils.bind(this,function(na){this.resizeImage(na,X.target.result,mxUtils.bind(this,function(pa,ha,wa){N(R,mxUtils.bind(this,function(){if(null!=pa&&pa.length<G){var qa=q&&this.isResampleImageSize(V.size,S)?Math.min(1,Math.min(u/ha,u/wa)):1;return t(pa,V.type,g+R*m,k+R*m,Math.round(ha*qa),Math.round(wa*qa),V.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),q,u,S,V.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=+X.target.result,t(Z,V.type,g+R*m,k+R*m,240,160,V.name,function(na){N(R,function(){return na})},V)}catch(na){N(R,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(na,V)}else N(R,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(V.name)?t(null,V.type,g+R*m,k+R*m,240,160,V.name,function(X){N(R,function(){return X})},V):"image"==V.type.substring(0,5)||"application/pdf"==V.type?W.readAsDataURL(V):W.readAsText(V)}})(Q)});if(y){y=[];for(C=0;C<d.length;C++)y.push(d[C]);+d=y;this.confirmImageResize(function(T){q=T;M()},D)}else M()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},u=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,t=function(x,A){if(x||g)mxSettings.setResizeImages(x?+A:null),mxSettings.save();k();d(A)};null==u||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(x){t(x,!0)},function(x){t(x,!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?226:200,!0,!0):t(!1,u)};EditorUi.prototype.parseFile=function(d,g,+k){k=null!=k?k:d.name;var u=new FileReader;u.onload=mxUtils.bind(this,function(){this.parseFileData(u.result,g,k)});u.readAsText(d)};EditorUi.prototype.parseFileData=function(d,g,k){var u=new XMLHttpRequest;u.open("POST",OPEN_URL);u.setRequestHeader("Content-Type","application/x-www-form-urlencoded");u.onreadystatechange=function(){g(u)};u.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(t){}};+EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,u,t,x,A){t=null!=t?t:this.maxImageSize;var J=Math.max(1,d.width),D=Math.max(1,d.height),G=g;if(u&&this.isResampleImageSize(null!=A?A:g.length,x))try{var S=Math.max(J/t,D/t);if(1<S){var U=Math.round(J/S),P=Math.round(D/S),O=document.createElement("canvas");O.width=U;O.height=P;O.getContext("2d").drawImage(d,0,0,U,P);var q=O.toDataURL();if(q.length<g.length){var y=+document.createElement("canvas");y.width=U;y.height=P;var B=y.toDataURL();q!==B&&(g=q,J=U,D=P)}}}catch(C){}u&&G!=g&&t>this.maxImageSize/2&&g.length>this.maxImageBytes?this.resizeImage(d,g,k,u,t/1.5,x,A):k(g,J,D)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,k){try{var u=new Image;u.onload=function(){u.width=0<u.width?u.width:120;u.height=0<u.height?u.height:120;g(u)};null!=k&&(u.onerror=k);u.src=d}catch(t){if(null!=k)k(t);else throw t;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var l=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());l.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var n=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var d=this,g=this.editor.graph,k=g.isEnabled;g.isEnabled=function(){return k.apply(this,arguments)&&!d.isLocked()};Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(m){var z=m.getEvent();return null==m.getState()&&!mxEvent.isMouseEvent(z)&&-!g.freehand.isDrawing()||mxEvent.isPopupTrigger(z)&&(null==m.getState()||mxEvent.isControlDown(z)||mxEvent.isShiftDown(z))});g.cellEditor.editPlantUmlData=function(m,z,I){var L=JSON.parse(I);z=new TextareaDialog(d,mxResources.get("plantUml")+":",L.data,function(N){null!=N&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(N,L.format,function(O,S,U){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==L.format)g.labelChanged(m,"<pre>"+O+"</pre>"),g.updateCellSize(m,-!0);else{g.setCellStyles("image",d.convertDataUri(O),[m]);var W=g.model.getGeometry(m);null!=W&&(W=W.clone(),W.width=S,W.height=U,g.cellsResized([m],[W],!1))}g.setAttributeForCell(m,"plantUmlData",JSON.stringify({data:N,format:L.format}))}finally{g.getModel().endUpdate()}},function(O){d.handleError(O)})},null,null,400,220);d.showDialog(z.container,420,300,!0,!0);z.init()};g.cellEditor.editMermaidData=function(m,z,I){var L=JSON.parse(I);z=new TextareaDialog(d,mxResources.get("mermaid")+":",L.data,-function(N){null!=N&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(N,L.config,function(O,S,U){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",O,[m]);var W=g.model.getGeometry(m);null!=W&&(W=W.clone(),W.width=Math.max(W.width,S),W.height=Math.max(W.height,U),g.cellsResized([m],[W],!1));g.setAttributeForCell(m,"mermaidData",JSON.stringify({data:N,config:L.config},null,2))}finally{g.getModel().endUpdate()}},function(O){d.handleError(O)})},-null,null,400,220);d.showDialog(z.container,420,300,!0,!0);z.init()};var v=g.cellEditor.startEditing;g.cellEditor.startEditing=function(m,z){try{var I=this.graph.getAttributeForCell(m,"plantUmlData");if(null!=I)this.editPlantUmlData(m,z,I);else if(I=this.graph.getAttributeForCell(m,"mermaidData"),null!=I&&window.isMermaidEnabled)this.editMermaidData(m,z,I);else{var L=g.getCellStyle(m);"1"==mxUtils.getValue(L,"metaEdit","0")?d.showDataDialog(m):v.apply(this,arguments)}}catch(N){d.handleError(N)}};+!g.freehand.isDrawing()||mxEvent.isPopupTrigger(z)&&(null==m.getState()||mxEvent.isControlDown(z)||mxEvent.isShiftDown(z))});g.cellEditor.editPlantUmlData=function(m,z,I){var L=JSON.parse(I);z=new TextareaDialog(d,mxResources.get("plantUml")+":",L.data,function(N){null!=N&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(N,L.format,function(Q,R,V){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==L.format)g.labelChanged(m,"<pre>"+Q+"</pre>"),g.updateCellSize(m,+!0);else{g.setCellStyles("image",d.convertDataUri(Q),[m]);var W=g.model.getGeometry(m);null!=W&&(W=W.clone(),W.width=R,W.height=V,g.cellsResized([m],[W],!1))}g.setAttributeForCell(m,"plantUmlData",JSON.stringify({data:N,format:L.format}))}finally{g.getModel().endUpdate()}},function(Q){d.handleError(Q)})},null,null,400,220);d.showDialog(z.container,420,300,!0,!0);z.init()};g.cellEditor.editMermaidData=function(m,z,I){var L=JSON.parse(I);z=new TextareaDialog(d,mxResources.get("mermaid")+":",L.data,+function(N){null!=N&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(N,L.config,function(Q,R,V){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",Q,[m]);var W=g.model.getGeometry(m);null!=W&&(W=W.clone(),W.width=Math.max(W.width,R),W.height=Math.max(W.height,V),g.cellsResized([m],[W],!1));g.setAttributeForCell(m,"mermaidData",JSON.stringify({data:N,config:L.config},null,2))}finally{g.getModel().endUpdate()}},function(Q){d.handleError(Q)})},+null,null,400,220);d.showDialog(z.container,420,300,!0,!0);z.init()};var u=g.cellEditor.startEditing;g.cellEditor.startEditing=function(m,z){try{var I=this.graph.getAttributeForCell(m,"plantUmlData");if(null!=I)this.editPlantUmlData(m,z,I);else if(I=this.graph.getAttributeForCell(m,"mermaidData"),null!=I&&window.isMermaidEnabled)this.editMermaidData(m,z,I);else{var L=g.getCellStyle(m);"1"==mxUtils.getValue(L,"metaEdit","0")?d.showDataDialog(m):u.apply(this,arguments)}}catch(N){d.handleError(N)}};g.getLinkTitle=function(m){return d.getLinkTitle(m)};g.customLinkClicked=function(m,z){var I=!1;try{var L=this.getGraphBounds();d.handleCustomLink(m,z);I=!0;d.chromelessResize&&!L.equals(this.getGraphBounds())&&(d.chromelessResize(),this.scrollCellToVisible(z))}catch(N){d.handleError(N)}return I};var t=g.parseBackgroundImage;g.parseBackgroundImage=function(m){var z=t.apply(this,arguments);null!=z&&null!=z.src&&Graph.isPageLink(z.src)&&(z={originalSrc:z.src});return z};var x=g.setBackgroundImage;g.setBackgroundImage=function(m){null!=m&&null!=m.originalSrc&&(m=d.createImageForPageLink(m.originalSrc,d.currentPage,this));x.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(m,z){m=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=m){var I=m.indexOf(",");if(0<I)for(m=m.substring(I+1),z=z.getProperty("patches"),I=0;I<z.length;I++)if(null!=z[I][EditorUi.DIFF_UPDATE]&&null!=z[I][EditorUi.DIFF_UPDATE][m]||null!=z[I][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(z[I][EditorUi.DIFF_REMOVE],m)){g.refreshBackgroundImage();break}}}));var A=g.getBackgroundImageObject;g.getBackgroundImageObject=function(m,z){var I=A.apply(this,arguments);null!=I&&null!=I.originalSrc&&(I=z?d.createImageForPageLink(I.originalSrc,null,null,!0):{src:I.originalSrc});return I};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var J=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(m){m=null!=m?m:"";"1"==urlParams.dev&&(m+=(0<m.length?"&":"?")+"dev=1");return J.apply(this,arguments)};var D=g.addClickHandler;g.addClickHandler=function(m,z,I){var L=z;z=-function(N,O,S){if(null==O){var U=mxEvent.getSource(N);"a"==U.nodeName.toLowerCase()&&(O=U.getAttribute("href"))}null!=O&&g.isCustomLink(O)&&(mxEvent.isTouchEvent(N)||!mxEvent.isPopupTrigger(N))&&g.customLinkClicked(O,S)&&mxEvent.consume(N);null!=L&&L(N,O,S)};D.call(this,m,z,I)};n.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(m,z,I){g.isSelectionEmpty()&&-"simple"==Editor.currentTheme&&this.addMenuItems(m,["zoomIn","zoomOut","-"],null,I);G.apply(this,arguments);g.isSelectionEmpty()||null==d.addSelectionToScratchpad||this.addMenuItems(m,["-","addToScratchpad"],null,I);g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(m,["-","exitGroup","home"],null,I)};var R=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(m,z,I){if(d.editor.graph.isSelectionEmpty())R.apply(this,arguments),d.menus.addMenuItems(m,["copyAsImage"],+function(N,Q,R){if(null==Q){var V=mxEvent.getSource(N);"a"==V.nodeName.toLowerCase()&&(Q=V.getAttribute("href"))}null!=Q&&g.isCustomLink(Q)&&(mxEvent.isTouchEvent(N)||!mxEvent.isPopupTrigger(N))&&g.customLinkClicked(Q,R)&&mxEvent.consume(N);null!=L&&L(N,Q,R)};D.call(this,m,z,I)};n.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(m,z,I){g.isSelectionEmpty()&&+"simple"==Editor.currentTheme&&this.addMenuItems(m,["zoomIn","zoomOut","-"],null,I);G.apply(this,arguments);g.isSelectionEmpty()||null==d.addSelectionToScratchpad||this.addMenuItems(m,["-","addToScratchpad"],null,I);g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(m,["-","exitGroup","home"],null,I)};var S=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(m,z,I){if(d.editor.graph.isSelectionEmpty())S.apply(this,arguments),d.menus.addMenuItems(m,["copyAsImage"],null,I);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(m,z,I):this.addPopupMenuArrangeItems(m,z,I),this.addMenuItems(m,"- cut copy copyAsImage duplicate -".split(" "),null,I),this.isShowCellEditItems()||this.addPopupDeleteItem(m,z,I),this.addMenuItems(m,["lockUnlock","-"],null,I),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(z)&&g.isCellEditable(z)&&(this.addSubmenu("editCell",m,null,mxResources.get("edit")),m.addSeparator(),g.getModel().isEdge(z))){this.addSubmenu("line",m);var L=g.getModel().getGeometry(z);null!=L&&null!=L.points&&0<L.points.length&&this.addMenuItems(m,["clearWaypoints"],null,I)}1==g.getSelectionCount()&&this.addMenuItems(m,["enterGroup"],null,I);L=d.getSelectionState();null!=L.mergeCell?this.addMenuItem(m,"mergeCells"):(1<L.style.colspan||1<L.style.rowspan)&&this.addMenuItem(m,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=-function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var V=g.getExportVariables;g.getExportVariables=function(){var m=V.apply(this,arguments),z=d.getCurrentFile();null!=z&&(m.filename=z.getTitle());m.pagecount=null!=d.pages?d.pages.length:1;m.page=null!=d.currentPage?d.currentPage.getName():"";m.pagenumber=null!=d.pages&&null!=d.currentPage?-mxUtils.indexOf(d.pages,d.currentPage)+1:1;return m};var Q=g.getGlobalVariable;g.getGlobalVariable=function(m){var z=d.getCurrentFile();return"filename"==m&&null!=z?z.getTitle():"page"==m&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==m?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==m?null!=d.pages?d.pages.length:1:Q.apply(this,arguments)};var P=null,q=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var m=this.getCurrentFile(),-z=null!=m&&null!=m.getTitle()?m.getTitle():this.defaultFilename;P!=z&&m==q&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());P=z;q=m}));var y=g.labelLinkClicked;g.labelLinkClicked=function(m,z,I){var L=z.getAttribute("href");if(null==L||!g.isCustomLink(L)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))y.apply(this,arguments);else{if(!g.isEnabled()||null!=m&&g.isCellLocked(m.cell))g.customLinkClicked(L),g.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=+function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var U=g.getExportVariables;g.getExportVariables=function(){var m=U.apply(this,arguments),z=d.getCurrentFile();null!=z&&(m.filename=z.getTitle());m.pagecount=null!=d.pages?d.pages.length:1;m.page=null!=d.currentPage?d.currentPage.getName():"";m.pagenumber=null!=d.pages&&null!=d.currentPage?+mxUtils.indexOf(d.pages,d.currentPage)+1:1;return m};var P=g.getGlobalVariable;g.getGlobalVariable=function(m){var z=d.getCurrentFile();return"filename"==m&&null!=z?z.getTitle():"page"==m&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==m?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==m?null!=d.pages?d.pages.length:1:P.apply(this,arguments)};var O=null,q=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var m=this.getCurrentFile(),+z=null!=m&&null!=m.getTitle()?m.getTitle():this.defaultFilename;O!=z&&m==q&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());O=z;q=m}));var y=g.labelLinkClicked;g.labelLinkClicked=function(m,z,I){var L=z.getAttribute("href");if(null==L||!g.isCustomLink(L)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))y.apply(this,arguments);else{if(!g.isEnabled()||null!=m&&g.isCellLocked(m.cell))g.customLinkClicked(L),g.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=function(){var m=d.defaultFilename,z=d.getCurrentFile();null!=z&&(m=null!=z.getTitle()?z.getTitle():m);return m};var B=this.actions.get("print");B.setEnabled(!mxClient.IS_IOS||!navigator.standalone);B.visible=B.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&g.addListener(mxEvent.ESCAPE,function(m,z){null!=z&&g.isEnabled()&&!g.isEditing()&&null!=z.getProperty("event")&&d.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(m){var z=g.cellEditor.text2,I=null;null!=z&&(mxEvent.addListener(z,"dragleave",function(L){null!=I&&(I.parentNode.removeChild(I),I=null);L.stopPropagation();L.preventDefault()}),mxEvent.addListener(z,"dragover",mxUtils.bind(this,function(L){null==I&&(!mxClient.IS_IE||10<document.documentMode)&&(I=this.highlightElement(z));L.stopPropagation();L.preventDefault()})),mxEvent.addListener(z,"drop",mxUtils.bind(this,function(L){null!=I&&(I.parentNode.removeChild(I),I=null);if(0<L.dataTransfer.files.length)this.importFiles(L.dataTransfer.files,-0,0,this.maxImageSize,function(O,S,U,W,X,Z){g.insertImage(O,X,Z)},function(){},function(O){return"image/"==O.type.substring(0,6)},function(O){for(var S=0;S<O.length;S++)O[S]()},mxEvent.isControlDown(L));else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var N=L.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(N)?this.loadImage(decodeURIComponent(N),mxUtils.bind(this,function(O){var S=Math.max(1,O.width);O=Math.max(1,O.height);var U=this.maxImageSize;U=Math.min(1,-Math.min(U/Math.max(1,S)),U/Math.max(1,O));g.insertImage(decodeURIComponent(N),S*U,O*U)})):document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(L.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(L.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"));L.stopPropagation();L.preventDefault()})))}));if(Editor.isSettingsEnabled()){B=+0,0,this.maxImageSize,function(Q,R,V,W,X,Z){g.insertImage(Q,X,Z)},function(){},function(Q){return"image/"==Q.type.substring(0,6)},function(Q){for(var R=0;R<Q.length;R++)Q[R]()},mxEvent.isControlDown(L));else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var N=L.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(N)?this.loadImage(decodeURIComponent(N),mxUtils.bind(this,function(Q){var R=Math.max(1,Q.width);Q=Math.max(1,Q.height);var V=this.maxImageSize;V=Math.min(1,+Math.min(V/Math.max(1,R)),V/Math.max(1,Q));g.insertImage(decodeURIComponent(N),R*V,Q*V)})):document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(L.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(L.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"));L.stopPropagation();L.preventDefault()})))}));if(Editor.isSettingsEnabled()){B=this.editor.graph.view;var C=mxSettings.getUnit();B.setUnit(C);Editor.pageSizeUnit=C==mxConstants.METERS?mxConstants.MILLIMETERS:C;B.addListener("unitChanged",function(m,z){m=z.getProperty("unit");mxSettings.setUnit(m);mxSettings.save();Editor.pageSizeUnit=m==mxConstants.METERS?mxConstants.MILLIMETERS:m});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,B.unit);this.refresh()}if("1"==urlParams.styledev){B=document.getElementById("geFooter");null!=B&&(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)})),B.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(m,z){0<this.editor.graph.getSelectionCount()?(m=this.editor.graph.getSelectionCell(),m=this.editor.graph.getModel().getStyle(m),this.styleInput.value=m||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var M=this.isSelectionAllowed;this.isSelectionAllowed=function(m){return mxEvent.getSource(m)==this.styleInput?!0:M.apply(this,arguments)}}B=document.getElementById("geInfo");null!=B&&B.parentNode.removeChild(B);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var T=null;mxEvent.addListener(g.container,"dragleave",function(m){g.isEnabled()&&(null!=T&&(T.parentNode.removeChild(T),T=null),m.stopPropagation(),m.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(m){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=this.highlightElement(g.container));-null!=this.sidebar&&this.sidebar.hideTooltip();m.stopPropagation();m.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(m){null!=T&&(T.parentNode.removeChild(T),T=null);if(g.isEnabled()){var z=mxUtils.convertPoint(g.container,mxEvent.getClientX(m),mxEvent.getClientY(m)),I=m.dataTransfer.files,L=g.view.translate,N=g.view.scale,O=z.x/N-L.x,S=z.y/N-L.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(m)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&-this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(m)&&(S=O=null),this.importFiles(I,O,S,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(m),null,null,mxEvent.isShiftDown(m),m));else{mxEvent.isAltDown(m)&&(S=O=0);var U=0<=mxUtils.indexOf(m.dataTransfer.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):null;z=this.extractGraphModelFromEvent(m,null!=this.pages);if(null!=z)g.setSelectionCells(this.importXml(z,O,S,!0));else if(0<=mxUtils.indexOf(m.dataTransfer.types,+null!=this.sidebar&&this.sidebar.hideTooltip();m.stopPropagation();m.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(m){null!=T&&(T.parentNode.removeChild(T),T=null);if(g.isEnabled()){var z=mxUtils.convertPoint(g.container,mxEvent.getClientX(m),mxEvent.getClientY(m)),I=m.dataTransfer.files,L=g.view.translate,N=g.view.scale,Q=z.x/N-L.x,R=z.y/N-L.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(m)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&+this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(m)&&(R=Q=null),this.importFiles(I,Q,R,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(m),null,null,mxEvent.isShiftDown(m),m));else{mxEvent.isAltDown(m)&&(R=Q=0);var V=0<=mxUtils.indexOf(m.dataTransfer.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):null;z=this.extractGraphModelFromEvent(m,null!=this.pages);if(null!=z)g.setSelectionCells(this.importXml(z,Q,R,!0));else if(0<=mxUtils.indexOf(m.dataTransfer.types,"text/html")){var W=m.dataTransfer.getData("text/html");z=document.createElement("div");z.innerHTML=Graph.sanitizeHtml(W);var X=null;I=z.getElementsByTagName("img");null!=I&&1==I.length?(W=I[0].getAttribute("src"),null==W&&(W=I[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)||(X=!0)):(I=z.getElementsByTagName("a"),null!=I&&1==I.length?W=I[0].getAttribute("href"):(z=z.getElementsByTagName("pre"),null!=z&&1==z.length&&(W=mxUtils.getTextContent(z[0]))));var Z=!0,Y=mxUtils.bind(this,-function(){g.setSelectionCells(this.insertTextAt(W,O,S,!0,X,null,Z,mxEvent.isControlDown(m)))});X&&null!=W&&W.length>this.resampleThreshold?this.confirmImageResize(function(ba){Z=ba;Y()},mxEvent.isControlDown(m)):Y()}else null!=U&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(ba){var ea=Math.max(1,ba.width);ba=Math.max(1,ba.height);var ca=this.maxImageSize;ca=Math.min(1,Math.min(ca/Math.max(1,ea)),ca/Math.max(1,ba));g.setSelectionCell(g.insertVertex(null,-null,"",O,S,ea*ca,ba*ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+U+";"))}),mxUtils.bind(this,function(ba){g.setSelectionCells(this.insertTextAt(U,O,S,!0))})):0<=mxUtils.indexOf(m.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(m.dataTransfer.getData("text/plain"),O,S,!0))}}m.stopPropagation();m.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",+function(){g.setSelectionCells(this.insertTextAt(W,Q,R,!0,X,null,Z,mxEvent.isControlDown(m)))});X&&null!=W&&W.length>this.resampleThreshold?this.confirmImageResize(function(ba){Z=ba;Y()},mxEvent.isControlDown(m)):Y()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(ba){var da=Math.max(1,ba.width);ba=Math.max(1,ba.height);var ca=this.maxImageSize;ca=Math.min(1,Math.min(ca/Math.max(1,da)),ca/Math.max(1,ba));g.setSelectionCell(g.insertVertex(null,+null,"",Q,R,da*ca,ba*ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+V+";"))}),mxUtils.bind(this,function(ba){g.setSelectionCells(this.insertTextAt(V,Q,R,!0))})):0<=mxUtils.indexOf(m.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(m.dataTransfer.getData("text/plain"),Q,R,!0))}}m.stopPropagation();m.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&g.view.validateBackground()});g.addListener("enabledChanged",mxUtils.bind(this,function(){g.isEnabled()||this.hideShapePicker()}));d=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==d.embedViewport)mxUtils.fit(this.div);else{var m=parseInt(this.div.offsetLeft),z=-parseInt(this.div.offsetWidth),I=d.embedViewport.x+d.embedViewport.width,L=parseInt(this.div.offsetTop),N=parseInt(this.div.offsetHeight),O=d.embedViewport.y+d.embedViewport.height;this.div.style.left=Math.max(d.embedViewport.x,Math.min(m,I-z))+"px";this.div.style.top=Math.max(d.embedViewport.y,Math.min(L,O-N))+"px";this.div.style.height=Math.min(d.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(d.embedViewport.width,parseInt(this.div.style.width))+"px"}};+parseInt(this.div.offsetWidth),I=d.embedViewport.x+d.embedViewport.width,L=parseInt(this.div.offsetTop),N=parseInt(this.div.offsetHeight),Q=d.embedViewport.y+d.embedViewport.height;this.div.style.left=Math.max(d.embedViewport.x,Math.min(m,I-z))+"px";this.div.style.top=Math.max(d.embedViewport.y,Math.min(L,Q-N))+"px";this.div.style.height=Math.min(d.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(d.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(B=Editor.currentTheme,"simple"==B||"sketch"==B)Editor.currentTheme="",this.doSetCurrentTheme(B,mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}),!0);B=!1;null!=urlParams.dark?B=urlParams.dark:(B="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||B&&"auto"!=mxSettings.settings.darkMode||(B=mxSettings.settings.darkMode));"auto"==B&&this.isAutoDarkModeSupported()&&(B=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof B?"1"==B:B);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(m){this.isAutoDarkMode()&&this.setDarkMode(m.matches)}))}catch(m){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(m,z){g.enableFlowAnimation=Editor.enableAnimations;g.refresh()}));g.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&d.editor.loadFonts()};var p=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,g=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=g&&d<g?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<g&&d>=g&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=-d}p.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,k=this.sketchPickerMenuElt,v=this.editor.graph;k.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(G){mxEvent.getSource(G)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(G),mxEvent.getClientY(G)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var t=-document.createElement("div");t.style.position="absolute";t.style.width="10px";t.style.height="10px";t.style.borderRadius="5px";t.style.border="1px solid gray";t.style.background="#ffffff";t.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(t);this.bottomResizer=t;var x=null,A=null,J=null,D=null;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(G){D=parseInt(this.diagramContainer.style.height);A=mxEvent.getClientY(G);v.popupMenuHandler.hideMenu();mxEvent.consume(G)}));-t=t.cloneNode(!1);t.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(t);this.rightResizer=t;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(G){J=parseInt(this.diagramContainer.style.width);x=mxEvent.getClientX(G);v.popupMenuHandler.hideMenu();mxEvent.consume(G)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(G){var R=!1;null!=x&&(this.diagramContainer.style.width=Math.max(20,J+mxEvent.getClientX(G)-x)+"px",R=!0);null!=A&&(this.diagramContainer.style.height=-Math.max(20,D+mxEvent.getClientY(G)-A)+"px",R=!0);R&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(G){null==x&&null==A||mxEvent.consume(G);A=x=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=+d}p.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,k=this.sketchPickerMenuElt,u=this.editor.graph;k.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(G){mxEvent.getSource(G)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(G),mxEvent.getClientY(G)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var t=+document.createElement("div");t.style.position="absolute";t.style.width="10px";t.style.height="10px";t.style.borderRadius="5px";t.style.border="1px solid gray";t.style.background="#ffffff";t.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(t);this.bottomResizer=t;var x=null,A=null,J=null,D=null;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(G){D=parseInt(this.diagramContainer.style.height);A=mxEvent.getClientY(G);u.popupMenuHandler.hideMenu();mxEvent.consume(G)}));+t=t.cloneNode(!1);t.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(t);this.rightResizer=t;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(G){J=parseInt(this.diagramContainer.style.width);x=mxEvent.getClientX(G);u.popupMenuHandler.hideMenu();mxEvent.consume(G)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(G){var S=!1;null!=x&&(this.diagramContainer.style.width=Math.max(20,J+mxEvent.getClientX(G)-x)+"px",S=!0);null!=A&&(this.diagramContainer.style.height=+Math.max(20,D+mxEvent.getClientY(G)-A)+"px",S=!0);S&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(G){null==x&&null==A||mxEvent.consume(G);A=x=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";g.style.visibility="hidden";d.style.visibility="hidden";k.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(G){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(G){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=-"hidden";g.style.visibility="hidden";d.style.visibility="hidden";k.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,v=!1,t=0;t<k.types.length;t++)if("text/"===k.types[t].substring(0,5)){v=!0;break}if(!v){var x=-k.items;for(index in x){var A=x[index];if("file"===A.kind){if(d.isEditing())this.importFiles([A.getAsFile()],0,0,this.maxImageSize,function(D,G,R,V,Q,P){d.insertImage(D,Q,P)},function(){},function(D){return"image/"==D.type.substring(0,6)},function(D){for(var G=0;G<D.length;G++)D[G]()});else{var J=this.editor.graph.getInsertPoint();this.importFiles([A.getAsFile()],J.x,J.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(D){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){k.innerHTML=+"hidden";g.style.visibility="hidden";d.style.visibility="hidden";k.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,u=!1,t=0;t<k.types.length;t++)if("text/"===k.types[t].substring(0,5)){u=!0;break}if(!u){var x=+k.items;for(index in x){var A=x[index];if("file"===A.kind){if(d.isEditing())this.importFiles([A.getAsFile()],0,0,this.maxImageSize,function(D,G,S,U,P,O){d.insertImage(D,P,O)},function(){},function(D){return"image/"==D.type.substring(0,6)},function(D){for(var G=0;G<D.length;G++)D[G]()});else{var J=this.editor.graph.getInsertPoint();this.importFiles([A.getAsFile()],J.x,J.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(D){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){k.innerHTML=" ";k.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck","false");k.style.textRendering="optimizeSpeed";k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.background="transparent";k.style.color="transparent";k.style.position="absolute";k.style.whiteSpace="nowrap";k.style.overflow=-"hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize="none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=!0;k.innerHTML=" ";var v=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(x){var A=mxEvent.getSource(x);null==g.container||!g.isEnabled()||g.isMouseDown||-g.isEditing()||null!=this.dialog||"INPUT"==A.nodeName||"TEXTAREA"==A.nodeName||"true"==A.contentEditable||224!=x.keyCode&&(mxClient.IS_MAC||17!=x.keyCode)&&(!mxClient.IS_MAC||91!=x.keyCode&&93!=x.keyCode)||v||(k.style.left=g.container.scrollLeft+10+"px",k.style.top=g.container.scrollTop+10+"px",x=g.container.scrollLeft,A=g.container.scrollTop,g.container.appendChild(k),v=!0,k.focus(),document.execCommand("selectAll",!1,null),g.container.scrollLeft=x,g.container.scrollTop=A)}));mxEvent.addListener(document,-"keyup",mxUtils.bind(this,function(x){var A=x.keyCode;window.setTimeout(mxUtils.bind(this,function(){!v||224!=A&&17!=A&&91!=A&&93!=A||(v=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(x){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(k),d()}catch(A){this.handleError(A)}}));mxEvent.addListener(k,"cut",mxUtils.bind(this,function(x){if(g.isEnabled())try{mxClipboard.copy(g),+"hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize="none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=!0;k.innerHTML=" ";var u=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(x){var A=mxEvent.getSource(x);null==g.container||!g.isEnabled()||g.isMouseDown||+g.isEditing()||null!=this.dialog||"INPUT"==A.nodeName||"TEXTAREA"==A.nodeName||"true"==A.contentEditable||224!=x.keyCode&&(mxClient.IS_MAC||17!=x.keyCode)&&(!mxClient.IS_MAC||91!=x.keyCode&&93!=x.keyCode)||u||(k.style.left=g.container.scrollLeft+10+"px",k.style.top=g.container.scrollTop+10+"px",x=g.container.scrollLeft,A=g.container.scrollTop,g.container.appendChild(k),u=!0,k.focus(),document.execCommand("selectAll",!1,null),g.container.scrollLeft=x,g.container.scrollTop=A)}));mxEvent.addListener(document,+"keyup",mxUtils.bind(this,function(x){var A=x.keyCode;window.setTimeout(mxUtils.bind(this,function(){!u||224!=A&&17!=A&&91!=A&&93!=A||(u=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(x){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(k),d()}catch(A){this.handleError(A)}}));mxEvent.addListener(k,"cut",mxUtils.bind(this,function(x){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(k,!0),d()}catch(A){this.handleError(A)}}));mxEvent.addListener(k,"paste",mxUtils.bind(this,function(x){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent()))try{if(k.innerHTML=" ",k.focus(),null!=x.clipboardData&&(Graph.removePasteFormatting(k.firstChild),this.pasteCells(x,k,!0,!0)),!mxEvent.isConsumed(x)){var A=g.container.scrollLeft,J=g.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{g.container.scrollLeft=A,g.container.scrollTop=J,Graph.removePasteFormatting(k.firstChild),this.pasteCells(x,k,!1,!0)}catch(D){this.handleError(D)}}),0)}}catch(D){this.handleError(D)}}),!0);var t=this.isSelectionAllowed;this.isSelectionAllowed=function(x){return mxEvent.getSource(x)==k?!0:t.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,g){mxSettings.setUi(d);(g=this.doSetCurrentTheme(d)||g)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(d){return""==d||"dark"==d||"default"==d||"kennedy"==d||null==d};EditorUi.prototype.doSetCurrentTheme=-function(d,g,k){function v(J){return"simple"==J||"sketch"==J}var t=Editor.currentTheme,x="simple"==t&&this.isDefaultTheme(d)||this.isDefaultTheme(t)&&"simple"==d;if((x||k)&&!this.themeSwitching){var A=this.saveScrollState();this.editor.graph.stopEditing(!1);this.container.style.opacity=0;Editor.currentTheme=d;this.themeSwitching=!0;window.setTimeout(mxUtils.bind(this,function(){v(t)&&this.isDefaultTheme(d)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="",this.tabContainer.style.display=-"",this.hsplit.style.display="block",this.menubarHeight=App.prototype.menubarHeight):this.isDefaultTheme(t)&&v(d)&&(this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.menubarHeight=0,"simple"!=d?(this.tabContainer.style.display="none",this.hsplit.style.display="none",this.hsplitPosition=0):this.tabContainer.style.display="");this.switchTheme(d);this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));-this.editor.graph.refresh();this.restoreScrollState(A);this.container.style.opacity="";delete this.themeSwitching;isLocalStorage&&v(d)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:!0);null!=g&&g()}),0)}return x};EditorUi.prototype.saveScrollState=function(){var d=this.editor.graph.view.translate,g=this.diagramContainer.scrollLeft,k=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(g-=this.embedViewport.x,k-=this.embedViewport.y):+function(d,g,k){function u(J){return"simple"==J||"sketch"==J}var t=Editor.currentTheme,x="simple"==t&&this.isDefaultTheme(d)||this.isDefaultTheme(t)&&"simple"==d;if((x||k)&&!this.themeSwitching){var A=this.saveScrollState();this.editor.graph.stopEditing(!1);this.container.style.opacity=0;Editor.currentTheme=d;this.themeSwitching=!0;window.setTimeout(mxUtils.bind(this,function(){u(t)&&this.isDefaultTheme(d)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="",this.tabContainer.style.display=+"",this.hsplit.style.display="block",this.menubarHeight=App.prototype.menubarHeight):this.isDefaultTheme(t)&&u(d)&&(this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.menubarHeight=0,"simple"!=d?(this.tabContainer.style.display="none",this.hsplit.style.display="none",this.hsplitPosition=0):this.tabContainer.style.display="");this.switchTheme(d);this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));+this.editor.graph.refresh();this.restoreScrollState(A);this.container.style.opacity="";delete this.themeSwitching;isLocalStorage&&u(d)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:!0);null!=g&&g()}),0)}return x};EditorUi.prototype.saveScrollState=function(){var d=this.editor.graph.view.translate,g=this.diagramContainer.scrollLeft,k=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(g-=this.embedViewport.x,k-=this.embedViewport.y):(g+=this.embedViewport.x,k+=this.embedViewport.y));return{x:g,y:k,tx:d.x,ty:d.y}};EditorUi.prototype.restoreScrollState=function(d){var g=this.editor.graph.view.scale,k=this.editor.graph.view.translate;this.diagramContainer.scrollLeft=d.x+(k.x-d.tx)*g;this.diagramContainer.scrollTop=d.y+(k.y-d.ty)*g};EditorUi.prototype.installStatusMinimizer=function(d){d=null!=d?d:this.statusContainer.parentNode;var g=!1;mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&-""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||g||(this.statusContainer.style.display="none")}));var k=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var v=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;g=null!=v&&null!=v.getAttribute("class");if(!g&&null!=v){v=-v.getAttribute("title");var t=this.getCurrentFile();t=null!=t?t.savingStatusKey:DrawioFile.prototype.savingStatusKey;v==mxResources.get(t)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(t))+'..."src="'+Editor.tailSpin+'"></div>',g=!0)}this.statusContainer.style.display="none";v=32>=d.clientWidth;d.style.visibility=v&&""==this.editor.getStatus()?"hidden":"";if(v||g)this.statusContainer.style.display="inline-flex",g=!0}else"simple"==Editor.currentTheme?+""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||g||(this.statusContainer.style.display="none")}));var k=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var u=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;g=null!=u&&null!=u.getAttribute("class");if(!g&&null!=u){u=+u.getAttribute("title");var t=this.getCurrentFile();t=null!=t?t.savingStatusKey:DrawioFile.prototype.savingStatusKey;u==mxResources.get(t)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(t))+'..."src="'+Editor.tailSpin+'"></div>',g=!0)}this.statusContainer.style.display="none";u=32>=d.clientWidth;d.style.visibility=u&&""==this.editor.getStatus()?"hidden":"";if(u||g)this.statusContainer.style.display="inline-flex",g=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",k);k()};EditorUi.prototype.switchTheme=function(d){this.isDefaultTheme(d)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(d);this.switchCssForTheme(d);this.createWrapperForTheme(d);this.createMainMenuForTheme(d);this.createFooterMenuForTheme(d);this.createPickerMenuForTheme(d);this.createMenubarForTheme(d);this.sidebarContainer.style.display="";if("sketch"==d){this.createFormatWindow();this.formatContainer.style.left="0px";this.formatContainer.style.top="0px";this.formatContainer.style.width="";this.formatContainer.style.zIndex="";this.formatContainer.style.border="none";var g=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);this.createShapesWindow();this.sidebarContainer.className="";this.sidebarContainer.style.position=@@ -13360,32 +13360,32 @@ EditorUi.prototype.createWrapperForTheme=function(d){null!=this.sketchWrapperEltfunction(d){};EditorUi.prototype.createPickerMenuForTheme=function(d){};EditorUi.prototype.getNetworkStatus=function(){var d=null;if(this.isOffline(!0))d=mxResources.get("offline");else{var g=this.getCurrentFile();null!=g&&(g.invalidChecksum?d=mxResources.get("error")+": "+mxResources.get("checksum"):null==g.sync||g.sync.enabled&&g.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==g.sync||g.sync.isConnected()?g.isRealtimeEnabled()&&g.isRealtimeSupported()&&1<g.getRealtimeState()&&(d=g.getRealtimeError(),d=mxResources.get("realtimeCollaboration")+": "+(null!=d&&null!=d.message?d.message:mxResources.get("error"))):d=mxResources.get("notConnected"):d=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return d};EditorUi.prototype.createMenubarForTheme=function(d){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity="",this.menubar.container.appendChild(this.statusContainer));null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);d=this.menubar.langIcon;null!=d&&(d.style.position="absolute",d.style.height="18px",d.style.width="18px",d.style.flexShrink="",d.style.opacity="",this.menubarContainer.parentNode.insertBefore(d,this.menubarContainer));null!=this.buttonContainer&&(this.buttonContainer.style.display="",this.buttonContainer.style.padding="",this.menubar.container.appendChild(this.buttonContainer))};-EditorUi.prototype.createMenu=function(d,g,k,v){k=null!=k?k:"geToolbarButton";var t=this.menus.get(d);v=this.menubar.addMenu(mxResources.get(d),t.funct,null,v);v.className=k;v.style.display="inline-block";v.style.cursor="pointer";v.style.height="24px";v.setAttribute("title",mxResources.get(d));this.menus.menuCreated(t,v,k);null!=g&&(v.style.backgroundImage="url("+g+")",v.style.backgroundPosition="center center",v.style.backgroundRepeat="no-repeat",v.style.backgroundSize="100% 100%",v.style.width=-"24px",v.innerText="");return v};EditorUi.prototype.createToolbarButton=function(d,g,k,v){v=null!=v?v:24;var t=document.createElement("a");t.className="geToolbarButton geAdaptiveAsset";t.setAttribute("title",g);t.style.backgroundImage="url("+d+")";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";t.style.backgroundSize="100% 100%";t.style.display="inline-block";t.style.cursor="pointer";t.style.marginLeft="6px";t.style.width=v+"px";t.style.height=v+"px";t.style.flexShrink=-"0";t.style.flexGrow="0";null!=k&&(mxEvent.addListener(t,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()})),mxEvent.addListener(t,"click",function(x){"disabled"!=t.getAttribute("disabled")&&k(x);mxEvent.consume(x)}));return t};EditorUi.prototype.createMenuItem=function(d,g,k){var v=this.actions.get(d),t=null!=v?v.funct:null,x=this.createToolbarButton(g,mxResources.get(d)+(null!=v&&null!=v.shortcut?" ("+v.shortcut+")":""),t);null==v||k||(d=function(){v.isEnabled()?-(x.removeAttribute("disabled"),x.style.cursor="pointer"):(x.setAttribute("disabled","disabled"),x.style.cursor="default");x.style.opacity=v.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",d),v.addListener("stateChanged",d),d());return x};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight--10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,60,240,g,mxUtils.bind(this,function(t){t.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var k=this.formatWindow.window.toggleMinimized,v=240;this.formatWindow.window.toggleMinimized=function(){k.apply(this,arguments);this.minimized?(v=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",-this.div.style.left=parseInt(this.div.style.left)+v-140+"px"):(this.div.style.width=v+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-v+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(t){mxEvent.getSource(t)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?-(d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,(1200>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||708>d)&&this.formatWindow.window.toggleMinimized()):this.formatWindow.window.setVisible(!1)}};var u=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(d){var g=this.formatWindow;null!=g?g.window.setVisible(null!=d?d:!this.isFormatPanelVisible()):u.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=-function(d){if(this.isShapesPanelVisible()!=d){var g=EditorUi.prototype.hsplitPosition;0==g&&(g=this.defaultSidebarWidth);var k=this.hsplitPosition,v=mxUtils.bind(this,function(){this.hsplitPosition=t;this.refresh();this.diagramContainer.scrollLeft-=k-this.hsplitPosition}),t=d?g:0;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==t?"translateX(0)":"translateX(-100%)");0!=t&&v();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",-0==t?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform 0.3s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==t&&v()}),+EditorUi.prototype.createMenu=function(d,g,k,u){k=null!=k?k:"geToolbarButton";var t=this.menus.get(d);u=this.menubar.addMenu(mxResources.get(d),t.funct,null,u);u.className=k;u.style.display="inline-block";u.style.cursor="pointer";u.style.height="24px";u.setAttribute("title",mxResources.get(d));this.menus.menuCreated(t,u,k);null!=g&&(u.style.backgroundImage="url("+g+")",u.style.backgroundPosition="center center",u.style.backgroundRepeat="no-repeat",u.style.backgroundSize="100% 100%",u.style.width=+"24px",u.innerText="");return u};EditorUi.prototype.createToolbarButton=function(d,g,k,u){u=null!=u?u:24;var t=document.createElement("a");t.className="geToolbarButton geAdaptiveAsset";t.setAttribute("title",g);t.style.backgroundImage="url("+d+")";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";t.style.backgroundSize="100% 100%";t.style.display="inline-block";t.style.cursor="pointer";t.style.marginLeft="6px";t.style.width=u+"px";t.style.height=u+"px";t.style.flexShrink=+"0";t.style.flexGrow="0";null!=k&&(mxEvent.addListener(t,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()})),mxEvent.addListener(t,"click",function(x){"disabled"!=t.getAttribute("disabled")&&k(x);mxEvent.consume(x)}));return t};EditorUi.prototype.createMenuItem=function(d,g,k){var u=this.actions.get(d),t=null!=u?u.funct:null,x=this.createToolbarButton(g,mxResources.get(d)+(null!=u&&null!=u.shortcut?" ("+u.shortcut+")":""),t);null==u||k||(d=function(){u.isEnabled()?+(x.removeAttribute("disabled"),x.style.cursor="pointer"):(x.setAttribute("disabled","disabled"),x.style.cursor="default");x.style.opacity=u.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",d),u.addListener("stateChanged",d),d());return x};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-+10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,60,240,g,mxUtils.bind(this,function(t){t.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var k=this.formatWindow.window.toggleMinimized,u=240;this.formatWindow.window.toggleMinimized=function(){k.apply(this,arguments);this.minimized?(u=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",+this.div.style.left=parseInt(this.div.style.left)+u-140+"px"):(this.div.style.width=u+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-u+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(t){mxEvent.getSource(t)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?+(d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,(1200>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||708>d)&&this.formatWindow.window.toggleMinimized()):this.formatWindow.window.setVisible(!1)}};var v=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(d){var g=this.formatWindow;null!=g?g.window.setVisible(null!=d?d:!this.isFormatPanelVisible()):v.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=+function(d){if(this.isShapesPanelVisible()!=d){var g=EditorUi.prototype.hsplitPosition;0==g&&(g=this.defaultSidebarWidth);var k=this.hsplitPosition,u=mxUtils.bind(this,function(){this.hsplitPosition=t;this.refresh();this.diagramContainer.scrollLeft-=k-this.hsplitPosition}),t=d?g:0;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==t?"translateX(0)":"translateX(-100%)");0!=t&&u();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",+0==t?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform 0.3s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==t&&u()}),300)}),10)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var F=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var d=this.formatWindow;return null!=d?d.window.isVisible():F.apply(this,arguments)};var H=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(d){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){d=null!=d?d:!0;if("1"!=urlParams.embedInline){var g=this.container.clientWidth;this.container==-document.body&&(g=document.body.clientWidth||document.documentElement.clientWidth);var k=this.getDiagramContainerOffset();var v=k.x;var t=k.y;"simple"==Editor.currentTheme&&(t+=this.sketchMainMenuElt.offsetHeight);this.diagramContainer.style.top=t+"px";this.diagramContainer.style.bottom="0";"simple"==Editor.currentTheme?(this.hsplit.style.top=this.sketchMainMenuElt.offsetHeight+"px",this.sidebarContainer.style.top=this.hsplit.style.top,this.formatContainer.style.top=this.hsplit.style.top,g=Math.max(0,-Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.formatWidth,Math.min(this.hsplitPosition,g-this.splitSize-40))),this.sidebarContainer.style.width=g+"px",this.diagramContainer.style.left=g+v+"px",this.tabContainer.style.left=g+"px",this.tabContainer.style.right=this.formatWidth+1+"px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",this.hsplit.style.left=g+"px",this.diagramContainer.style.right=this.formatWidth+"px",-this.formatContainer.style.width=this.formatWidth+"px",this.hsplit.style.bottom=this.tabContainer.offsetHeight+"px",this.diagramContainer.style.bottom=this.hsplit.style.bottom,this.checkTabScrollerOverflow()):(this.diagramContainer.style.left=k.x+"px",this.diagramContainer.style.right="0")}d&&this.editor.graph.sizeDidChange()}else H.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(d){var g=mxUtils.bind(this,function(v){v=this.createMenu(v,null,"geTitle");v.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";-d.appendChild(v);return v});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))g=document.createElement("div"),g.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;",g.className="geTitle",mxUtils.write(g,mxResources.get("newLibrary")),d.appendChild(g),mxEvent.addListener(g,+document.body&&(g=document.body.clientWidth||document.documentElement.clientWidth);var k=this.getDiagramContainerOffset();var u=k.x;var t=k.y;"simple"==Editor.currentTheme&&(t+=this.sketchMainMenuElt.offsetHeight);this.diagramContainer.style.top=t+"px";this.diagramContainer.style.bottom="0";"simple"==Editor.currentTheme?(this.hsplit.style.top=this.sketchMainMenuElt.offsetHeight+"px",this.sidebarContainer.style.top=this.hsplit.style.top,this.formatContainer.style.top=this.hsplit.style.top,g=Math.max(0,+Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.formatWidth,Math.min(this.hsplitPosition,g-this.splitSize-40))),this.sidebarContainer.style.width=g+"px",this.diagramContainer.style.left=g+u+"px",this.tabContainer.style.left=g+"px",this.tabContainer.style.right=this.formatWidth+1+"px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",this.hsplit.style.left=g+"px",this.diagramContainer.style.right=this.formatWidth+"px",+this.formatContainer.style.width=this.formatWidth+"px",this.hsplit.style.bottom=this.tabContainer.offsetHeight+"px",this.diagramContainer.style.bottom=this.hsplit.style.bottom,this.checkTabScrollerOverflow()):(this.diagramContainer.style.left=k.x+"px",this.diagramContainer.style.right="0")}d&&this.editor.graph.sizeDidChange()}else H.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(d){var g=mxUtils.bind(this,function(u){u=this.createMenu(u,null,"geTitle");u.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";+d.appendChild(u);return u});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))g=document.createElement("div"),g.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;",g.className="geTitle",mxUtils.write(g,mxResources.get("newLibrary")),d.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("newLibrary").funct),g=g.cloneNode(!1),g.style.left="50%",g.style.borderLeftStyle="solid",mxUtils.write(g,mxResources.get("openLibrary")),d.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("openLibrary").funct);else{var k=g("newLibrary");k.style.fontSize="11px";k.style.left="0";k=g("openLibraryFrom");k.style.borderLeftStyle="solid";k.style.fontSize="11px";k.style.left="50%"}d.appendChild(this.sidebarContainer);d.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=-function(){if(null==this.sidebarWindow){var d=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),g="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),k="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),k&&"1"!=urlParams.embedInline?66:10,k&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-g)/2):56,d-6,g-6,mxUtils.bind(this,function(v){this.createShapesPanel(v)}));+function(){if(null==this.sidebarWindow){var d=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),g="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),k="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),k&&"1"!=urlParams.embedInline?66:10,k&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-g)/2):56,d-6,g-6,mxUtils.bind(this,function(u){this.createShapesPanel(u)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setAndPersistDarkMode=function(d){var g=d;"auto"==d&&(g=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(g);mxSettings.settings.darkMode=d;mxSettings.save();d=mxSettings.getUi();null==urlParams.ui&&"dark"==d&&this.setCurrentTheme("kennedy",!0)};EditorUi.prototype.setAndPersistLanguage=function(d){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE)};EditorUi.prototype.setAndPersistHighContrast=function(d){this.setHighContrast(d);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=d,mxSettings.save())};EditorUi.prototype.isHighContrast=function(){var d=document.getElementById("high-contrast-stylesheet");return null!=d&&window.matchMedia?(d=d.getAttribute("media"),"all"==d||"not all"!=d&&window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(d){var g=document.getElementById("high-contrast-stylesheet");-if(null!=g&&window.matchMedia){var k=window.matchMedia("(forced-colors: active)").matches,v=g.getAttribute("media");(v="all"==v||"not all"!=v&&k)&&!d?g.setAttribute("media",k?"not all":"(forced-colors: active)"):!v&&d&&g.setAttribute("media",k?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(d){var g=this.getDiagramContainerOffset();mxSettings.setRulerOn(d);mxSettings.save();d||null==this.ruler?d&&+if(null!=g&&window.matchMedia){var k=window.matchMedia("(forced-colors: active)").matches,u=g.getAttribute("media");(u="all"==u||"not all"!=u&&k)&&!d?g.setAttribute("media",k?"not all":"(forced-colors: active)"):!u&&d&&g.setAttribute("media",k?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(d){var g=this.getDiagramContainerOffset();mxSettings.setRulerOn(d);mxSettings.save();d||null==this.ruler?d&&null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.refresh();this.fireEvent(new mxEventObject("rulerVisibleChanged"));d=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=d.x-g.x;this.diagramContainer.scrollTop+=d.x-g.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=window.matchMedia};EditorUi.prototype.isAutoDarkMode=function(d){return!d&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=function(d){Editor.darkMode=d;d=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container;mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff";null!=d&&(Editor.isDarkMode()?(d.classList.add("geDarkMode"),d.style.colorScheme="dark"):(d.classList.remove("geDarkMode"),d.style.colorScheme="light"));null!=this.ruler&&this.ruler.updateStyle();this.fireEvent(new mxEventObject("darkModeChanged"))};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,g){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),Editor.isSettingsEnabled()&&g&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=-function(d){Editor.inlineFullscreen!=d&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:d,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,k=this.sketchPickerMenuElt,v=this.editor.graph;if(Editor.inlineFullscreen)g.style.left="10px",g.style.top="10px",k.style.left=+function(d){Editor.inlineFullscreen!=d&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:d,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,k=this.sketchPickerMenuElt,u=this.editor.graph;if(Editor.inlineFullscreen)g.style.left="10px",g.style.top="10px",k.style.left="10px",k.style.top="60px",d.style.top="10px",d.style.right="12px",d.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width=-"",this.diagramContainer.style.height="");else{var t=this.diagramContainer.getAttribute("data-bounds");if(null!=t){this.diagramContainer.removeAttribute("data-bounds");v.getGraphBounds();var x=t.split(" ");v=mxUtils.getDocumentSize();this.diagramContainer.style.top=x[0];this.diagramContainer.style.left=x[1];t=parseInt(x[2]);x=parseInt(x[3]);t=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,t):t,v.width-80);x=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,x):x,v.height-+"",this.diagramContainer.style.height="");else{var t=this.diagramContainer.getAttribute("data-bounds");if(null!=t){this.diagramContainer.removeAttribute("data-bounds");u.getGraphBounds();var x=t.split(" ");u=mxUtils.getDocumentSize();this.diagramContainer.style.top=x[0];this.diagramContainer.style.left=x[1];t=parseInt(x[2]);x=parseInt(x[3]);t=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,t):t,u.width-80);x=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,x):x,u.height-80);this.diagramContainer.style.width=t+"px";this.diagramContainer.style.height=x+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}g.style.left=this.diagramContainer.offsetLeft+"px";g.style.top=this.diagramContainer.offsetTop-g.offsetHeight-4+"px";k.style.display="";k.style.left=this.diagramContainer.offsetLeft-k.offsetWidth-4+"px";k.style.top=this.diagramContainer.offsetTop+"px";d.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-d.offsetWidth+"px";d.style.top=g.style.top;d.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;g.style.visibility="";d.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(d){Editor.sketchMode!=d&&(Editor.sketchMode=d,this.updateDefaultStyles())};@@ -13394,203 +13394,204 @@ EditorUi.prototype.updateDefaultStyles=function(){var d=this.editor.graph;d.defa"1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.jettySize="auto",d.defaultEdgeStyle.orthogonalLoop="1",d.defaultEdgeStyle.endArrow="open",d.defaultEdgeStyle.endSize="14",d.defaultEdgeStyle.startSize="14",d.defaultEdgeStyle.sourcePerimeterSpacing="8",d.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==Editor.config||null==Editor.config.defaultFonts){if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline||Editor.sketchMode)d.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,d.defaultVertexStyle.fontSource=Editor.sketchFontSource,d.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,d.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(d.defaultVertexStyle.sketch="1",d.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultVertexStyle.hachureGap="4",d.defaultEdgeStyle.sketch="1",d.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(d){var g=Graph.prototype.getLinkTitle.apply(this,-arguments);if(Graph.isPageLink(d)){var k=d.indexOf(",");0<k&&(g=this.getPageById(d.substring(k+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(g=this.getCustomLinkTitle(d));return g};EditorUi.prototype.getCustomLinkTitle=function(d){var g=mxResources.get("action");if("data:action/json,"==d.substring(0,17))try{var k=JSON.parse(d.substring(17));null!=k&&null!=k.title&&(g=k.title)}catch(v){}return g};EditorUi.prototype.handleCustomLink=function(d,g){if(Graph.isPageLink(d))if(g=+arguments);if(Graph.isPageLink(d)){var k=d.indexOf(",");0<k&&(g=this.getPageById(d.substring(k+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(g=this.getCustomLinkTitle(d));return g};EditorUi.prototype.getCustomLinkTitle=function(d){var g=mxResources.get("action");if("data:action/json,"==d.substring(0,17))try{var k=JSON.parse(d.substring(17));null!=k&&null!=k.title&&(g=k.title)}catch(u){}return g};EditorUi.prototype.handleCustomLink=function(d,g){if(Graph.isPageLink(d))if(g=d.indexOf(","),d=this.getPageById(d.substring(g+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(d,g)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var d=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(g){g.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(g){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(g,k){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));d.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(g,k){mxSettings.setCreateTarget(d.connectionHandler.isCreateTarget());mxSettings.save()}));d.pageFormat=null!=d.defaultPageFormat?d.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(g,k){mxSettings.setPageFormat(d.pageFormat);mxSettings.save()}));d.view.defaultDarkGridColor=mxSettings.getGridColor(!0);d.view.defaultGridColor=mxSettings.getGridColor(!1);d.view.gridColor="light-dark("+d.view.defaultGridColor+", "+d.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(g,k){mxSettings.setGridColor(d.view.defaultGridColor,!1);mxSettings.setGridColor(d.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(g,k){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(g,k){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,g,k){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,-function(v,t){try{this.spinner.stop();var x=this.createImageDataUri(v,g,"png"),A=parseInt(t.getAttribute("width")),J=parseInt(t.getAttribute("height"));this.writeImageToClipboard(x,A,J,mxUtils.bind(this,function(D){this.handleError(D)}))}catch(D){this.handleError(D)}}),null,null,null,mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?-d:null)}catch(v){this.handleError(v)}};EditorUi.prototype.copyCells=function(d,g){var k=this.editor.graph;if(k.isSelectionEmpty())d.innerText="";else{var v=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),t=mxUtils.getXml(k.encodeCells(v));mxUtils.setTextContent(d,encodeURIComponent(t));g?(k.removeCells(v,!1),k.lastPasteXml=null):(k.lastPasteXml=t,k.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var g=-this.editor.graph;g.isSelectionEmpty()||(d=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(d)),navigator.clipboard.writeText(g))}return d};EditorUi.prototype.pasteXml=function(d,g,k,v,t){t=null!=t?t:!0;var x=this.editor.graph,A=null;x.lastPasteXml==d?x.pasteCounter++:(x.lastPasteXml=d,x.pasteCounter=0);var J=x.pasteCounter*x.gridSize;if(k||this.isCompatibleString(d))A=this.importXml(d,J,J),x.setSelectionCells(A);else if(g&&1==-x.getSelectionCount()){t=x.getStartEditingCell(x.getSelectionCell(),v);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==x.getCurrentCellStyle(t)[mxConstants.STYLE_SHAPE])x.setCellStyles(mxConstants.STYLE_IMAGE,d,[t]);else{x.model.beginUpdate();try{x.labelChanged(t,d),Graph.isLink(d)&&x.setLinkForCell(t,d)}finally{x.model.endUpdate()}}x.setSelectionCell(t)}else A=x.getInsertPoint(),x.isMouseInsertPoint()&&(J=0,x.lastPasteXml==d&&0<x.pasteCounter&&x.pasteCounter--),A=this.insertTextAt(d,A.x+J,-A.y+J,t),x.setSelectionCells(A);x.isSelectionEmpty()||(x.scrollCellToVisible(x.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(x.view.getState(x.getSelectionCell())));return A};EditorUi.prototype.pasteCells=function(d,g,k,v){if(!mxEvent.isConsumed(d)){var t=g,x=!1;if(k&&null!=d.clipboardData&&d.clipboardData.getData){var A=d.clipboardData.getData("text/plain"),J=!1;if(null!=A&&0<A.length&&"%3CmxGraphModel%3E"==A.substring(0,18))try{var D=decodeURIComponent(A);this.isCompatibleString(D)&&+function(u,t){try{this.spinner.stop();var x=this.createImageDataUri(u,g,"png"),A=parseInt(t.getAttribute("width")),J=parseInt(t.getAttribute("height"));this.writeImageToClipboard(x,A,J,mxUtils.bind(this,function(D){this.handleError(D)}))}catch(D){this.handleError(D)}}),null,null,null,mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?+d:null)}catch(u){this.handleError(u)}};EditorUi.prototype.copyCells=function(d,g){var k=this.editor.graph;if(k.isSelectionEmpty())d.innerText="";else{var u=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),t=mxUtils.getXml(k.encodeCells(u));mxUtils.setTextContent(d,encodeURIComponent(t));g?(k.removeCells(u,!1),k.lastPasteXml=null):(k.lastPasteXml=t,k.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var g=+this.editor.graph;g.isSelectionEmpty()||(d=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(d)),navigator.clipboard.writeText(g))}return d};EditorUi.prototype.pasteXml=function(d,g,k,u,t){t=null!=t?t:!0;var x=this.editor.graph,A=null;x.lastPasteXml==d?x.pasteCounter++:(x.lastPasteXml=d,x.pasteCounter=0);var J=x.pasteCounter*x.gridSize;if(k||this.isCompatibleString(d))A=this.importXml(d,J,J),x.setSelectionCells(A);else if(g&&1==+x.getSelectionCount()){t=x.getStartEditingCell(x.getSelectionCell(),u);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==x.getCurrentCellStyle(t)[mxConstants.STYLE_SHAPE])x.setCellStyles(mxConstants.STYLE_IMAGE,d,[t]);else{x.model.beginUpdate();try{x.labelChanged(t,d),Graph.isLink(d)&&x.setLinkForCell(t,d)}finally{x.model.endUpdate()}}x.setSelectionCell(t)}else A=x.getInsertPoint(),x.isMouseInsertPoint()&&(J=0,x.lastPasteXml==d&&0<x.pasteCounter&&x.pasteCounter--),A=this.insertTextAt(d,A.x+J,+A.y+J,t),x.setSelectionCells(A);x.isSelectionEmpty()||(x.scrollCellToVisible(x.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(x.view.getState(x.getSelectionCell())));return A};EditorUi.prototype.pasteCells=function(d,g,k,u){if(!mxEvent.isConsumed(d)){var t=g,x=!1;if(k&&null!=d.clipboardData&&d.clipboardData.getData){var A=d.clipboardData.getData("text/plain"),J=!1;if(null!=A&&0<A.length&&"%3CmxGraphModel%3E"==A.substring(0,18))try{var D=decodeURIComponent(A);this.isCompatibleString(D)&&(J=!0,A=D)}catch(q){}J=J?null:d.clipboardData.getData("text/html");null!=J&&0<J.length?(t=this.parseHtmlData(J),x="text/plain"!=t.getAttribute("data-type")):null!=A&&0<A.length&&(t=document.createElement("div"),mxUtils.setTextContent(t,J))}A=t.getElementsByTagName("span");if(null!=A&&0<A.length&&"application/vnd.lucid.chart.objects"===A[0].getAttribute("data-lucid-type"))k=A[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(q){var y=this.editor.graph;-y.lastPasteXml==q?y.pasteCounter++:(y.lastPasteXml=q,y.pasteCounter=0);var B=y.pasteCounter*y.gridSize;y.setSelectionCells(this.importXml(q,B,B));y.scrollCellToVisible(y.getSelectionCell())}),mxUtils.bind(this,function(q){this.handleError(q)})),mxEvent.consume(d));else{var G=!1,R="";R=x?null!=t.textContent&&"<mxfile"==t.textContent.substring(0,7)&&"</mxfile>"==t.textContent.substring(t.textContent.length-9)||"<mxGraphModel"==t.textContent.substring(0,13)&&"</mxGraphModel>"==t.textContent.substring(t.textContent.length--15)?t.textContent.replace(/\u00a0/g," "):t.innerHTML:mxUtils.trim(null==t.innerText?mxUtils.getTextContent(t):t.innerText);try{var V=R.lastIndexOf("%3E");0<=V&&V<R.length-3&&(R=R.substring(0,V+3))}catch(q){}try{A=t.getElementsByTagName("span"),(D=null!=A&&0<A.length?mxUtils.trim(decodeURIComponent(A[0].textContent)):decodeURIComponent(R))&&(this.isCompatibleString(D)||0==D.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(G=!0,R=D)}catch(q){}try{if(null!=R&&0<R.length){if(0==R.substring(0,-20).replace(/\s/g,"").indexOf('{"isProtected":')){var Q=mxUtils.bind(this,function(){try{R=(new MiroImporter).importMiroJson(JSON.parse(R)),this.pasteXml(R,v,G,d)}catch(q){console.log("Miro import error:",q)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",Q):Q()}else this.pasteXml(R,v,G,d,x);try{mxEvent.consume(d)}catch(q){}}else if(!k){var P=this.editor.graph;P.lastPasteXml=null;P.pasteCounter=0}}catch(q){this.handleError(q)}}}g.innerHTML=" "};EditorUi.prototype.showPrintDialog=-function(d,g){var k=320;this.editor.graph.isEnabled()&&(k+=40);null!=this.pages&&1<this.pages.length&&(k+=40,this.editor.graph.isEnabled()||(k+=10));null==g||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(k+=20);this.showDialog((new PrintDialog(this,d,g)).container,320,k,!0,!0)};EditorUi.prototype.print=function(d,g){var k=this.editor,v=k.graph,t=this.getPageIndex(this.currentPage),x=null!=t?t+1:1,A=mxUtils.bind(this,function(B,C,M,T){var m=B.useCssTransforms,z=B.currentTranslate,I=B.currentScale,-L=B.view.translate,N=B.view.scale;B.useCssTransforms&&(B.useCssTransforms=!1,B.currentTranslate=new mxPoint(0,0),B.currentScale=1,B.view.translate=new mxPoint(0,0),B.view.scale=1);var O=B.getGraphBounds(),S=0,U=0,W=mxRectangle.fromRectangle(B.pageFormat),X=g.fit||g.crop||!B.pageVisible,Z=g.scale;W.width=Math.ceil(W.width*B.pageScale);W.height=Math.ceil(W.height*B.pageScale);var Y=1;if(g.fit){Y=g.sheetsAcross;var ba=g.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*Z));-Y=Math.min(W.height*ba/(O.height/B.view.scale),W.width*Y/(O.width/B.view.scale))}else Y=isNaN(Z)?1:Z;Y*=1;!X&&B.pageVisible?(Z=B.getPageLayout(),S-=Z.x*W.width,U-=Z.y*W.height):X=!0;g.crop&&(g.selection&&(O=v.getBoundingBox(v.getSelectionCells())),W.width=(O.width+1)*Y/B.view.scale,W.height=(O.height+1)*Y/B.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);T=null!=T?"page/id,"+T:null;if(null==C){C=PrintDialog.createPrintPreview(B,Y,null,0,S,U,X);C.title=this.getBaseFilename(!0);-C.pageSelector=!1;C.mathEnabled=!1;S=g.border;isNaN(S)||(C.pageMargin=S);g.selection&&(C.isCellVisible=function(aa){return B.isCellSelected(aa)});var ea=C.writeHead;C.writeHead=function(aa){ea.apply(this,arguments);mxClient.IS_GC&&(aa.writeln('<style type="text/css">'),aa.writeln("@media print {"),aa.writeln(".MathJax svg { shape-rendering: crispEdges; }"),aa.writeln("}"),aa.writeln("</style>"));null!=k.fontCss&&(aa.writeln('<style type="text/css">'),aa.writeln(mxUtils.htmlEntities(k.fontCss,!1,!1,-!1)),aa.writeln("</style>"));for(var da=B.getCustomFonts(),ia=0;ia<da.length;ia++){var pa=da[ia].name,oa=da[ia].url;Graph.isCssFontUrl(oa)?aa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(oa))+'" charset="UTF-8" type="text/css">'):(aa.writeln('<style type="text/css">'),aa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(pa)+'";\nsrc: url("'+mxUtils.htmlEntities(oa)+'");\n}'),aa.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ca=C.drawBackgroundImage;-C.drawBackgroundImage=function(aa){ca.apply(this,arguments);null!=aa.node&&(EditorUi.embedSvgImages(aa.node),v.disableSvgLinks(aa.node,function(da){da.setAttribute("href","javascript:void(0)")}))}}var fa=C.addGraphFragment;C.addGraphFragment=function(aa,da,ia,pa,oa,ha){fa.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:oa.classList.add("geDisableMathJax")};g.grid&&(C.gridSize=B.gridSize,C.gridSteps=B.view.gridSteps,C.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:-B.view.gridColor);C.open(null,null,M,!0,T,W,g.selection?B.getSelectionCells():null)}else{O=B.background;if(null==O||""==O||O==mxConstants.NONE)O="#ffffff";C.backgroundColor=O;C.autoOrigin=X;g.grid&&(C.gridSize=B.gridSize,C.gridSteps=B.view.gridSteps,C.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:B.view.gridColor);C.appendGraph(B,Y,S,U,M,!0,T,W,g.selection?B.getSelectionCells():null);M=B.getCustomFonts();if(null!=C.wnd)for(W=0;W<M.length;W++)S=M[W].name,U=M[W].url,Graph.isCssFontUrl(U)?-C.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(U)+'" charset="UTF-8" type="text/css">'):(C.wnd.document.writeln('<style type="text/css">'),C.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(S)+'";\nsrc: url("'+mxUtils.htmlEntities(U)+'");\n}'),C.wnd.document.writeln("</style>"))}m&&(B.useCssTransforms=m,B.currentTranslate=z,B.currentScale=I,B.view.translate=L,B.view.scale=N);return C}),J=g.pagesFrom,D=g.pagesTo,G=!g.allPages;t=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,-g);else{G&&(G=g.selection||J==x&&D==x);if(!G&&null!=this.pages&&this.pages.length){G=0;x=this.pages.length-1;g.allPages||(G=parseInt(J)-1,x=parseInt(D)-1);for(var R=G;R<=x;R++){var V=this.pages[R];J=V==this.currentPage?v:null;if(null==J){J=this.createTemporaryGraph(v.stylesheet);J.shapeForegroundColor=v.shapeForegroundColor;J.shapeBackgroundColor=v.shapeBackgroundColor;D=!0;G=!1;var Q=null,P=null;null==V.viewState&&null==V.root&&this.updatePageRoot(V);null!=V.viewState&&(D=V.viewState.pageVisible,-G=V.viewState.mathEnabled,Q=V.viewState.background,P=V.viewState.backgroundImage,J.pageFormat=V.viewState.pageFormat,J.gridSize=V.viewState.gridSize);null!=P&&null!=P.originalSrc&&(P=this.createImageForPageLink(P.originalSrc,V));J.background=Q;J.backgroundImage=null!=P?new mxImage(P.src,P.width,P.height,P.x,P.y):null;J.pageVisible=D;J.mathEnabled=G;var q=J.getGraphBounds;J.getGraphBounds=function(){var B=q.apply(this,arguments),C=this.backgroundImage;if(null!=C&&null!=C.width&&null!=C.height){var M=-this.view.translate,T=this.view.scale;B=mxRectangle.fromRectangle(B);B.add(new mxRectangle((M.x+C.x)*T,(M.y+C.y)*T,C.width*T,C.height*T))}return B};var y=J.getGlobalVariable;J.getGlobalVariable=function(B){return"page"==B?V.getName():"pagenumber"==B?R+1:"pagecount"==B?null!=this.pages?this.pages.length:1:y.apply(this,arguments)};document.body.appendChild(J.container);this.updatePageRoot(V);J.model.setRoot(V.root)}t=A(J,t,R!=x,V.getId());J!=v&&J.container.parentNode.removeChild(J.container)}}else t=-A(v);null==t||null==t.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(t.mathEnabled&&(A=t.wnd.document,d||(t.wnd.IMMEDIATE_PRINT=!0),A.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),t.closeDocument(),Graph.rewritePageLinks(t.wnd.document,!0),t.mathEnabled||d||PrintDialog.printPreview(t));return t}};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var g=null,k=0;k<d.length;k++)mxEvent.addListener(d[k],"dragleave",function(v){null!=-g&&(g.parentNode.removeChild(g),g=null);v.stopPropagation();v.preventDefault()}),mxEvent.addListener(d[k],"dragover",mxUtils.bind(this,function(v){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(g=this.highlightElement());v.stopPropagation();v.preventDefault()})),mxEvent.addListener(d[k],"drop",mxUtils.bind(this,function(v){null!=g&&(g.parentNode.removeChild(g),g=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<-v.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(v.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(v)&&!mxEvent.isShiftDown(v)):this.openFiles(v.dataTransfer.files,!0);else{var t=this.extractGraphModelFromEvent(v);if(null==t){var x=null!=v.dataTransfer?v.dataTransfer:v.clipboardData;null!=x&&(10==document.documentMode||11==document.documentMode?t=x.getData("Text"):(t=null,t=0<=mxUtils.indexOf(x.types,"text/uri-list")?v.dataTransfer.getData("text/uri-list"):+y.lastPasteXml==q?y.pasteCounter++:(y.lastPasteXml=q,y.pasteCounter=0);var B=y.pasteCounter*y.gridSize;y.setSelectionCells(this.importXml(q,B,B));y.scrollCellToVisible(y.getSelectionCell())}),mxUtils.bind(this,function(q){this.handleError(q)})),mxEvent.consume(d));else{var G=!1,S="";S=x?null!=t.textContent&&"<mxfile"==t.textContent.substring(0,7)&&"</mxfile>"==t.textContent.substring(t.textContent.length-9)||"<mxGraphModel"==t.textContent.substring(0,13)&&"</mxGraphModel>"==t.textContent.substring(t.textContent.length-+15)?t.textContent.replace(/\u00a0/g," "):t.innerHTML:mxUtils.trim(null==t.innerText?mxUtils.getTextContent(t):t.innerText);try{var U=S.lastIndexOf("%3E");0<=U&&U<S.length-3&&(S=S.substring(0,U+3))}catch(q){}try{A=t.getElementsByTagName("span"),(D=null!=A&&0<A.length?mxUtils.trim(decodeURIComponent(A[0].textContent)):decodeURIComponent(S))&&(this.isCompatibleString(D)||0==D.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(G=!0,S=D)}catch(q){}try{if(null!=S&&0<S.length){if(0==S.substring(0,+20).replace(/\s/g,"").indexOf('{"isProtected":')){var P=mxUtils.bind(this,function(){try{S=(new MiroImporter).importMiroJson(JSON.parse(S)),this.pasteXml(S,u,G,d)}catch(q){console.log("Miro import error:",q)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",P):P()}else this.pasteXml(S,u,G,d,x);try{mxEvent.consume(d)}catch(q){}}else if(!k){var O=this.editor.graph;O.lastPasteXml=null;O.pasteCounter=0}}catch(q){this.handleError(q)}}}g.innerHTML=" "};EditorUi.prototype.showPrintDialog=+function(d,g,k){var u=320;this.editor.graph.isEnabled()&&(u+=40);null!=this.pages&&1<this.pages.length&&(u+=40,this.editor.graph.isEnabled()||(u+=10));null==g||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(u+=20);this.showDialog((new PrintDialog(this,d,g,k)).container,320,u,!0,!0)};EditorUi.prototype.print=function(d,g){var k=this.editor,u=k.graph,t=this.getPageIndex(this.currentPage),x=null!=t?t+1:1,A=mxUtils.bind(this,function(B,C,M,T){var m=B.useCssTransforms,z=B.currentTranslate,I=+B.currentScale,L=B.view.translate,N=B.view.scale;B.useCssTransforms&&(B.useCssTransforms=!1,B.currentTranslate=new mxPoint(0,0),B.currentScale=1,B.view.translate=new mxPoint(0,0),B.view.scale=1);var Q=B.getGraphBounds(),R=0,V=0,W=mxRectangle.fromRectangle(B.pageFormat),X=g.fit||g.crop||!B.pageVisible,Z=g.scale;W.width=Math.ceil(W.width*B.pageScale);W.height=Math.ceil(W.height*B.pageScale);var Y=1;if(g.fit){Y=g.sheetsAcross;var ba=g.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*+Z));Y=Math.min(W.height*ba/(Q.height/B.view.scale),W.width*Y/(Q.width/B.view.scale))}else Y=isNaN(Z)?1:Z;Y*=1;!X&&B.pageVisible?(Z=B.getPageLayout(),R-=Z.x*W.width,V-=Z.y*W.height):X=!0;g.crop&&(g.selection&&(Q=u.getBoundingBox(u.getSelectionCells())),W.width=(Q.width+1)*Y/B.view.scale,W.height=(Q.height+1)*Y/B.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);T=null!=T?"page/id,"+T:null;if(null==C){C=PrintDialog.createPrintPreview(B,Y,null,0,R,V,X);C.title=this.getBaseFilename(!0);+C.pageSelector=!1;C.mathEnabled=!1;R=g.border;isNaN(R)||(C.pageMargin=R);g.selection&&(C.isCellVisible=function(aa){return B.isCellSelected(aa)});var da=C.writeHead;C.writeHead=function(aa){da.apply(this,arguments);mxClient.IS_GC&&(aa.writeln('<style type="text/css">'),aa.writeln("@media print {"),aa.writeln(".MathJax svg { shape-rendering: crispEdges; }"),aa.writeln("}"),aa.writeln("</style>"));null!=k.fontCss&&(aa.writeln('<style type="text/css">'),aa.writeln(mxUtils.htmlEntities(k.fontCss,!1,!1,+!1)),aa.writeln("</style>"));for(var fa=B.getCustomFonts(),ia=0;ia<fa.length;ia++){var na=fa[ia].name,pa=fa[ia].url;Graph.isCssFontUrl(pa)?aa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(pa))+'" charset="UTF-8" type="text/css">'):(aa.writeln('<style type="text/css">'),aa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(na)+'";\nsrc: url("'+mxUtils.htmlEntities(pa)+'");\n}'),aa.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ca=C.drawBackgroundImage;+C.drawBackgroundImage=function(aa){ca.apply(this,arguments);null!=aa.node&&(EditorUi.embedSvgImages(aa.node),u.disableSvgLinks(aa.node,function(fa){fa.setAttribute("href","javascript:void(0)")}))}}var ea=C.addGraphFragment;C.addGraphFragment=function(aa,fa,ia,na,pa,ha){ea.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:pa.classList.add("geDisableMathJax")};g.grid&&(C.gridSize=B.gridSize,C.gridSteps=B.view.gridSteps,C.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:+B.view.gridColor);C.open(null,null,M,!0,T,W,g.selection?B.getSelectionCells():null)}else{Q=B.background;if(null==Q||""==Q||Q==mxConstants.NONE)Q="#ffffff";C.backgroundColor=Q;C.autoOrigin=X;g.grid&&(C.gridSize=B.gridSize,C.gridSteps=B.view.gridSteps,C.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:B.view.gridColor);C.appendGraph(B,Y,R,V,M,!0,T,W,g.selection?B.getSelectionCells():null);M=B.getCustomFonts();if(null!=C.wnd)for(W=0;W<M.length;W++)R=M[W].name,V=M[W].url,Graph.isCssFontUrl(V)?+C.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(V)+'" charset="UTF-8" type="text/css">'):(C.wnd.document.writeln('<style type="text/css">'),C.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(R)+'";\nsrc: url("'+mxUtils.htmlEntities(V)+'");\n}'),C.wnd.document.writeln("</style>"))}m&&(B.useCssTransforms=m,B.currentTranslate=z,B.currentScale=I,B.view.translate=L,B.view.scale=N);return C}),J=g.pagesFrom,D=g.pagesTo,G=!g.allPages;t=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,+g);else{G&&(G=g.selection||J==x&&D==x);if(!G&&null!=this.pages&&this.pages.length){G=0;x=this.pages.length-1;g.allPages||(G=parseInt(J)-1,x=parseInt(D)-1);for(var S=G;S<=x;S++){var U=this.pages[S];J=U==this.currentPage?u:null;if(null==J){J=this.createTemporaryGraph(u.stylesheet);J.shapeForegroundColor=u.shapeForegroundColor;J.shapeBackgroundColor=u.shapeBackgroundColor;D=!0;G=!1;var P=null,O=null;null==U.viewState&&null==U.root&&this.updatePageRoot(U);null!=U.viewState&&(D=U.viewState.pageVisible,+G=U.viewState.mathEnabled,P=U.viewState.background,O=U.viewState.backgroundImage,J.pageFormat=U.viewState.pageFormat,J.gridSize=U.viewState.gridSize);null!=O&&null!=O.originalSrc&&(O=this.createImageForPageLink(O.originalSrc,U));J.background=P;J.backgroundImage=null!=O?new mxImage(O.src,O.width,O.height,O.x,O.y):null;J.pageVisible=D;J.mathEnabled=G;var q=J.getGraphBounds;J.getGraphBounds=function(){var B=q.apply(this,arguments),C=this.backgroundImage;if(null!=C&&null!=C.width&&null!=C.height){var M=+this.view.translate,T=this.view.scale;B=mxRectangle.fromRectangle(B);B.add(new mxRectangle((M.x+C.x)*T,(M.y+C.y)*T,C.width*T,C.height*T))}return B};var y=J.getGlobalVariable;J.getGlobalVariable=function(B){return"page"==B?U.getName():"pagenumber"==B?S+1:"pagecount"==B?null!=this.pages?this.pages.length:1:y.apply(this,arguments)};document.body.appendChild(J.container);this.updatePageRoot(U);J.model.setRoot(U.root)}t=A(J,t,S!=x,U.getId());J!=u&&J.container.parentNode.removeChild(J.container)}}else t=+A(u);null==t||null==t.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(t.mathEnabled&&(A=t.wnd.document,d||(t.wnd.IMMEDIATE_PRINT=!0),A.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),t.closeDocument(),Graph.rewritePageLinks(t.wnd.document,!0),t.mathEnabled||d||PrintDialog.printPreview(t));return t}};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var g=null,k=0;k<d.length;k++)mxEvent.addListener(d[k],"dragleave",function(u){null!=+g&&(g.parentNode.removeChild(g),g=null);u.stopPropagation();u.preventDefault()}),mxEvent.addListener(d[k],"dragover",mxUtils.bind(this,function(u){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(g=this.highlightElement());u.stopPropagation();u.preventDefault()})),mxEvent.addListener(d[k],"drop",mxUtils.bind(this,function(u){null!=g&&(g.parentNode.removeChild(g),g=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<+u.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(u.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(u)&&!mxEvent.isShiftDown(u)):this.openFiles(u.dataTransfer.files,!0);else{var t=this.extractGraphModelFromEvent(u);if(null==t){var x=null!=u.dataTransfer?u.dataTransfer:u.clipboardData;null!=x&&(10==document.documentMode||11==document.documentMode?t=x.getData("Text"):(t=null,t=0<=mxUtils.indexOf(x.types,"text/uri-list")?u.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(x.types,"text/html")?x.getData("text/html"):null,null!=t&&0<t.length?(x=document.createElement("div"),x.innerHTML=Graph.sanitizeHtml(t),x=x.getElementsByTagName("img"),0<x.length&&(t=x[0].getAttribute("src"))):0<=mxUtils.indexOf(x.types,"text/plain")&&(t=x.getData("text/plain"))),null!=t&&(Editor.isPngDataUrl(t)?(t=Editor.extractGraphModelFromPng(t),null!=t&&0<t.length&&this.openLocalFile(t,null,!0)):this.isRemoteFileFormat(t)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(t))).send(mxUtils.bind(this,function(A){200<=A.getStatus()&&299>=A.getStatus()?this.openLocalFile(A.getText(),null,!0):this.showError(mxResources.get("error"),413==A.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(t)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(t):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+-"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(t)))))}else this.openLocalFile(t,null,!0)}v.stopPropagation();v.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var g=0,k=0;if(null==d){var v=document.body;var t=document.documentElement;var x=(v.clientWidth||t.clientWidth)-3;v=Math.max(v.clientHeight||0,t.clientHeight)-3}else g=d.offsetTop,k=d.offsetLeft,x=d.clientWidth,v=d.clientHeight;t=document.createElement("div");t.style.zIndex=mxPopupMenu.prototype.zIndex+-2;t.style.border="3px dotted rgb(254, 137, 12)";t.style.pointerEvents="none";t.style.position="absolute";t.style.top=g+"px";t.style.left=k+"px";t.style.width=Math.max(0,x-3)+"px";t.style.height=Math.max(0,v-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(t):document.body.appendChild(t);return t};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var g=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=g){var k=new mxCodec(g.ownerDocument),-v=new mxGraphModel;k.decode(g,v);g=v.getChildAt(v.getRoot(),0);for(k=0;k<v.getChildCount(g);k++)d.push(v.getChildAt(g,k))}return d};EditorUi.prototype.openFileHandle=function(d,g,k,v,t,x){if(null!=g&&0<g.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(g)||/(\.pdf)$/i.test(g))g=g.substring(0,g.length-4),/(\.drawio)$/i.test(g)||(g+=".drawio");var A=mxUtils.bind(this,function(D){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==D.substring(0,10)){null==-this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,v);try{this.loadLibrary(new LocalLibrary(this,D,g)),this.showSidebar()}catch(G){this.handleError(G,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(D,g,v)});if(EditorUi.isVisioFilename(g))this.importVisio(k,mxUtils.bind(this,function(D){this.spinner.stop();A(D)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(D){this.spinner.stop();A(D)}));else if(Graph.fileSupport&&+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(t)))))}else this.openLocalFile(t,null,!0)}u.stopPropagation();u.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var g=0,k=0;if(null==d){var u=document.body;var t=document.documentElement;var x=(u.clientWidth||t.clientWidth)-3;u=Math.max(u.clientHeight||0,t.clientHeight)-3}else g=d.offsetTop,k=d.offsetLeft,x=d.clientWidth,u=d.clientHeight;t=document.createElement("div");t.style.zIndex=mxPopupMenu.prototype.zIndex++2;t.style.border="3px dotted rgb(254, 137, 12)";t.style.pointerEvents="none";t.style.position="absolute";t.style.top=g+"px";t.style.left=k+"px";t.style.width=Math.max(0,x-3)+"px";t.style.height=Math.max(0,u-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(t):document.body.appendChild(t);return t};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var g=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=g){var k=new mxCodec(g.ownerDocument),+u=new mxGraphModel;k.decode(g,u);g=u.getChildAt(u.getRoot(),0);for(k=0;k<u.getChildCount(g);k++)d.push(u.getChildAt(g,k))}return d};EditorUi.prototype.openFileHandle=function(d,g,k,u,t,x){if(null!=g&&0<g.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(g)||/(\.pdf)$/i.test(g))g=g.substring(0,g.length-4),/(\.drawio)$/i.test(g)||(g+=".drawio");var A=mxUtils.bind(this,function(D){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==D.substring(0,10)){null==+this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,u);try{this.loadLibrary(new LocalLibrary(this,D,g)),this.showSidebar()}catch(G){this.handleError(G,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(D,g,u)});if(EditorUi.isVisioFilename(g))this.importVisio(k,mxUtils.bind(this,function(D){this.spinner.stop();A(D)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(D){this.spinner.stop();A(D)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,g))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(D){4==D.readyState&&(this.spinner.stop(),200<=D.status&&299>=D.status?A(D.responseText):this.handleError({message:mxResources.get(413==D.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(g)&&(g=g.substring(0,-g.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(D){this.spinner.stop();this.openLocalFile(D,g,v)}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,v);try{this.loadLibrary(new LocalLibrary(this,d,k.name)),this.showSidebar()}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==-d.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(D){this.spinner.stop();A(D)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,g,v)}));else{if("image/png"==k.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==k.type){var J=Editor.extractGraphModelFromPdf(d);null!=J&&(t=null,v=!0,d=J)}this.spinner.stop();this.openLocalFile(d,g,v,t,null!=t?k:null,x)}}};EditorUi.prototype.openFiles=function(d,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=-0;k<d.length;k++)mxUtils.bind(this,function(v){var t=new FileReader;t.onload=mxUtils.bind(this,function(x){try{this.openFileHandle(x.target.result,v.name,v,g)}catch(A){this.handleError(A)}});t.onerror=mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x);window.openFile=null});"image"!==v.type.substring(0,5)&&"application/pdf"!==v.type||"image/svg"===v.type.substring(0,9)?t.readAsText(v):t.readAsDataURL(v)})(d[k])};EditorUi.prototype.openLocalFile=function(d,g,k,v,t,x){var A=this.getCurrentFile(),-J=mxUtils.bind(this,function(){window.openFile=null;if(null==g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var D=mxUtils.parseXml(d);null!=D&&(this.editor.setGraphXml(D.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,g||this.defaultFilename,k,v,t,x))});if(null!=d&&0<d.length)null==A||!A.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=v)?J():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=v)&&null!=A&&A.isModified()?this.confirm(mxResources.get("allChangesLost"),+g.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(D){this.spinner.stop();this.openLocalFile(D,g,u)}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,u);try{this.loadLibrary(new LocalLibrary(this,d,k.name)),this.showSidebar()}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==+d.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(D){this.spinner.stop();A(D)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,g,u)}));else{if("image/png"==k.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==k.type){var J=Editor.extractGraphModelFromPdf(d);null!=J&&(t=null,u=!0,d=J)}this.spinner.stop();this.openLocalFile(d,g,u,t,null!=t?k:null,x)}}};EditorUi.prototype.openFiles=function(d,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=+0;k<d.length;k++)mxUtils.bind(this,function(u){var t=new FileReader;t.onload=mxUtils.bind(this,function(x){try{this.openFileHandle(x.target.result,u.name,u,g)}catch(A){this.handleError(A)}});t.onerror=mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x);window.openFile=null});"image"!==u.type.substring(0,5)&&"application/pdf"!==u.type||"image/svg"===u.type.substring(0,9)?t.readAsText(u):t.readAsDataURL(u)})(d[k])};EditorUi.prototype.openLocalFile=function(d,g,k,u,t,x){var A=this.getCurrentFile(),+J=mxUtils.bind(this,function(){window.openFile=null;if(null==g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var D=mxUtils.parseXml(d);null!=D&&(this.editor.setGraphXml(D.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,g||this.defaultFilename,k,u,t,x))});if(null!=d&&0<d.length)null==A||!A.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=u)?J():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=u)&&null!=A&&A.isModified()?this.confirm(mxResources.get("allChangesLost"),null,J,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,g),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=A&&A.isModified()?this.confirm(mxResources.get("allChangesLost"),null,J,mxResources.get("cancel"),mxResources.get("discardChanges")):J()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var g=-0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),this.addBasenamesForCell(this.pages[g].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);g=[];for(var k in d)g.push(k);return g};EditorUi.prototype.addBasenamesForCell=function(d,g){function k(A){if(null!=A){var J=A.lastIndexOf(".");0<J&&(A=A.substring(J+1,A.length));null==g[A]&&(g[A]=!0)}}var v=this.editor.graph,t=v.getCellStyle(d);k(mxStencilRegistry.getBasenameForStencil(t[mxConstants.STYLE_SHAPE]));v.model.isEdge(d)&&-(k(mxMarker.getPackageForType(t[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(t[mxConstants.STYLE_ENDARROW])));t=v.model.getChildCount(d);for(var x=0;x<t;x++)this.addBasenamesForCell(v.model.getChildAt(d,x),g)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme?+0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),this.addBasenamesForCell(this.pages[g].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);g=[];for(var k in d)g.push(k);return g};EditorUi.prototype.addBasenamesForCell=function(d,g){function k(A){if(null!=A){var J=A.lastIndexOf(".");0<J&&(A=A.substring(J+1,A.length));null==g[A]&&(g[A]=!0)}}var u=this.editor.graph,t=u.getCellStyle(d);k(mxStencilRegistry.getBasenameForStencil(t[mxConstants.STYLE_SHAPE]));u.model.isEdge(d)&&+(k(mxMarker.getPackageForType(t[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(t[mxConstants.STYLE_ENDARROW])));t=u.model.getChildCount(d);for(var x=0;x<t;x++)this.addBasenamesForCell(u.model.getChildAt(d,x),g)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme?"":"none";this.editor.graph.setEnabled(d);null!=this.tabContainer&&(this.tabContainer.style.visibility=d&&0<parseInt(this.tabContainer.style.height)?"":"hidden");null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");d||this.hideWindows()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=-!1;this.installMessageHandler(mxUtils.bind(this,function(g,k,v,t){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(t)try{var x=this.editor.graph;x.setGridEnabled(!1);x.pageVisible=!1;var A=x.model.cells,J;for(J in A){var D=A[J];null!=D&&null!=D.style&&(D.style+=";sketch=1;"+(-1==D.style.indexOf("fontFamily=")||-1<D.style.indexOf("fontFamily=Helvetica;")?-"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=v?v:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=+!1;this.installMessageHandler(mxUtils.bind(this,function(g,k,u,t){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(t)try{var x=this.editor.graph;x.setGridEnabled(!1);x.pageVisible=!1;var A=x.model.cells,J;for(J in A){var D=A[J];null!=D&&null!=D.style&&(D.style+=";sketch=1;"+(-1==D.style.indexOf("fontFamily=")||-1<D.style.indexOf("fontFamily=Helvetica;")?+"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=u?u:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,g){null!=d?this.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(mxUtils.bind(this,function(k){this.spinner.stop();g(k)})):g(null)};EditorUi.prototype.createLoadMessage=function(d){var g=this.editor.graph;return{event:d,pageVisible:g.pageVisible,-translate:g.view.translate,bounds:g.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:g.view.scale,page:g.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){try{var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var v=g.background;if(null==v||v==mxConstants.NONE)v=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,-null,null,!1),g,null,!0,mxUtils.bind(this,function(t){k.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(t)}),"*")}),null,null,!0,v,1,this.embedExportBorder,null,this.embedExportTheme)}else d||k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=-!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(t){d||this.handleError(t)}};EditorUi.prototype.installMessageHandler=function(d){var g=null,k=!1,v=!1,t=null,x=mxUtils.bind(this,function(D,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,x);mxEvent.addListener(window,"message",mxUtils.bind(this,-function(D){if(D.source==(window.opener||window.parent)){var G=D.data,R=null,V=mxUtils.bind(this,function(aa){if(null!=aa&&"function"===typeof aa.charAt&&"<"!=aa.charAt(0))try{Editor.isPngDataUrl(aa)?aa=Editor.extractGraphModelFromPng(aa):"data:image/svg+xml;base64,"==aa.substring(0,26)?aa=atob(aa.substring(26)):"data:image/svg+xml;utf8,"==aa.substring(0,24)&&(aa=aa.substring(24)),null!=aa&&(""==aa.trim()?aa=null:"%"==aa.charAt(0)?aa=decodeURIComponent(aa):"<"!=aa.charAt(0)&&(aa=Graph.decompress(aa)))}catch(da){}return aa});-if("json"==urlParams.proto){var Q=!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[D],"data",[G])}catch(aa){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):mxUtils.htmlEntities(G.message),null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));-return}if("prompt"==G.action){this.spinner.stop();var P=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(aa){null!=aa?A.postMessage(JSON.stringify({event:"prompt",value:aa,message:G}),"*"):A.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title,null,null,null,null,function(){A.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")});this.showDialog(P.container,300,80,!0,!1);-P.init();return}if("draft"==G.action){var q=V(G.xml);this.spinner.stop();P=new DraftDialog(this,mxResources.get("draftFound",[G.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();A.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();A.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),"*")}):null);this.showDialog(P.container,640,480,!0,!1,mxUtils.bind(this,function(aa){aa&&this.actions.get("exit").funct()}));try{P.init()}catch(aa){A.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var y=1==G.enableRecent,B=1==G.enableSearch,C=1==G.enableCustomTemp;P=new NewDialog(this,!1,G.templatesOnly?-!1:null!=G.callback,mxUtils.bind(this,function(aa,da,ia,pa){aa=aa||this.emptyDiagramXml;null!=G.callback?A.postMessage(JSON.stringify({event:"template",xml:aa,blank:aa==this.emptyDiagramXml,name:da,tempUrl:ia,libs:pa,builtIn:!0,message:G}),"*"):(d(aa,D,aa!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,y?mxUtils.bind(this,function(aa){this.remoteInvoke("getRecentDiagrams",[null],null,aa,function(){aa(null,"Network Error!")})}):-null,B?mxUtils.bind(this,function(aa,da){this.remoteInvoke("searchDiagrams",[aa,null],null,da,function(){da(null,"Network Error!")})}):null,mxUtils.bind(this,function(aa,da,ia){A.postMessage(JSON.stringify({event:"template",docUrl:aa,info:da,name:ia}),"*")}),null,null,C?mxUtils.bind(this,function(aa){this.remoteInvoke("getCustomTemplates",null,null,aa,function(){aa({},0)})}):null,1==G.withoutType);this.showDialog(P.container,620,460,!0,!1,mxUtils.bind(this,function(aa){null!=this.sidebar&&this.sidebar.hideTooltip();-aa&&this.actions.get("exit").funct()}));P.init();return}if("textContent"==G.action){var M=this.getDiagramTextContent();A.postMessage(JSON.stringify({event:"textContent",data:M,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 T=null!=G.messageKey?mxResources.get(G.messageKey):-G.message;null==G.show||G.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==G.action){P=null;try{var m=this.diagramContainer.getAttribute("data-scrollState");null!=m&&(this.diagramContainer.removeAttribute("data-scrollState"),P=JSON.parse(m))}catch(aa){}Editor.inlineFullscreen=-G.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=P&&this.restoreScrollState(P);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var z=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,L=mxUtils.bind(this,function(aa,da){if(G.withSvg)G.withSvg=-!1,this.getEmbeddedSvg(z,this.editor.graph,null,!0,function(pa){L(aa,pa)},null,null,G.embedImages,this.editor.graph.background,G.scale,G.border,G.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var ia=this.createLoadMessage("export");ia.format=G.format;ia.message=G;ia.data=aa;ia.svg=da;ia.xml=z;A.postMessage(JSON.stringify(ia),"*")}}),N=mxUtils.bind(this,function(aa){null==aa&&(aa=Editor.blankImage);"xmlpng"==G.format&&(aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(z)));-I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);L(aa)}),O=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var S=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=O){var aa=I.getGlobalVariable;I=this.createTemporaryGraph(I.getStylesheet());for(var da,ia=0;ia<this.pages.length;ia++)if(this.pages[ia].getId()==O){da=this.updatePageRoot(this.pages[ia]);break}null==da&&(da=this.currentPage);-I.getGlobalVariable=function(xa){return"page"==xa?da.getName():"pagenumber"==xa?1:aa.apply(this,arguments)};document.body.appendChild(I.container);I.model.setRoot(da.root)}if(null!=G.layerIds){var pa=I.model,oa=pa.getChildCells(pa.getRoot()),ha={};for(ia=0;ia<G.layerIds.length;ia++)ha[G.layerIds[ia]]=!0;for(ia=0;ia<oa.length;ia++)pa.setVisible(oa[ia],ha[oa[ia].id]||!1)}ia=null;G.keepTheme&&(ia=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(xa){N(xa.toDataURL("image/png"))}),-G.width,null,G.background,mxUtils.bind(this,function(){N(null)}),null,null,G.scale,G.transparent,G.shadow,null,I,G.border,null,G.grid,ia)});null!=G.xml&&0<G.xml.length&&(k=!0,this.setFileData(z),k=!1);S()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=O?"&pageId="+O:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(z))).send(mxUtils.bind(this,-function(aa){200<=aa.getStatus()&&299>=aa.getStatus()?L("data:image/png;base64,"+aa.getText()):N(null)}),mxUtils.bind(this,function(){N(null)}))}}else if(S=mxUtils.bind(this,function(){var aa=this.createLoadMessage("export");aa.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var da=this.getXmlFileData();aa.xml=mxUtils.getXml(da);aa.data=this.getFileData(null,null,!0,null,null,null,da);aa.format=G.format}else if("html"==G.format)da=this.editor.getGraphXml(),-aa.data=this.getHtml(da,this.editor.graph),aa.xml=mxUtils.getXml(da),aa.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;da=null!=G.background?G.background:this.editor.graph.background;da==mxConstants.NONE&&(da=null);aa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);aa.format="svg";var ia=mxUtils.bind(this,function(oa){this.editor.graph.setEnabled(!0);this.spinner.stop();aa.data=Editor.createSvgDataUri(oa);A.postMessage(JSON.stringify(aa),"*")}),pa="auto";G.keepTheme&&-(pa=Editor.isDarkMode()?"dark":"light");null!=G.theme&&(pa=G.theme);if("xmlsvg"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){pa=null;if(this.isAutoDarkMode()||Editor.isDarkMode())pa="auto";null!=G.theme&&(pa=G.theme);this.getEmbeddedSvg(aa.xml,this.editor.graph,null,!0,ia,null,null,G.embedImages,da,G.scale,G.border,G.shadow,pa)}}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),da=this.editor.graph.getSvg(da,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,pa),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(da),this.embedFonts(da,mxUtils.bind(this,function(oa){G.embedImages||null==G.embedImages?this.editor.convertImages(oa,mxUtils.bind(this,function(ha){ia(mxUtils.getXml(ha))})):ia(mxUtils.getXml(oa))}));return}A.postMessage(JSON.stringify(aa),-"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var U=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){U.apply(this,arguments);S()}}k=!0;this.setFileData(G.xml);k=!1;this.editor.graph.mathEnabled||S()}else S();return}if("load"==G.action){Q=G.toSketch;v=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);if("1"==urlParams.saveAndExit||+translate:g.view.translate,bounds:g.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:g.view.scale,page:g.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){try{var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var u=g.background;if(null==u||u==mxConstants.NONE)u=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,+null,null,!1),g,null,!0,mxUtils.bind(this,function(t){k.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(t)}),"*")}),null,null,!0,u,1,this.embedExportBorder,null,this.embedExportTheme)}else d||k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=+!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(t){d||this.handleError(t)}};EditorUi.prototype.installMessageHandler=function(d){var g=null,k=!1,u=!1,t=null,x=mxUtils.bind(this,function(D,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,x);mxEvent.addListener(window,"message",mxUtils.bind(this,+function(D){if(D.source==(window.opener||window.parent)){var G=D.data,S=null,U=mxUtils.bind(this,function(aa){if(null!=aa&&"function"===typeof aa.charAt&&"<"!=aa.charAt(0))try{Editor.isPngDataUrl(aa)?aa=Editor.extractGraphModelFromPng(aa):"data:image/svg+xml;base64,"==aa.substring(0,26)?aa=atob(aa.substring(26)):"data:image/svg+xml;utf8,"==aa.substring(0,24)&&(aa=aa.substring(24)),null!=aa&&(""==aa.trim()?aa=null:"%"==aa.charAt(0)?aa=decodeURIComponent(aa):"<"!=aa.charAt(0)&&(aa=Graph.decompress(aa)))}catch(fa){}return aa});+if("json"==urlParams.proto){var P=!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[D],"data",[G])}catch(aa){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):mxUtils.htmlEntities(G.message),null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));+return}if("prompt"==G.action){this.spinner.stop();var O=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(aa){null!=aa?A.postMessage(JSON.stringify({event:"prompt",value:aa,message:G}),"*"):A.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title,null,null,null,null,function(){A.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")});this.showDialog(O.container,300,80,!0,!1);+O.init();return}if("draft"==G.action){var q=U(G.xml);this.spinner.stop();O=new DraftDialog(this,mxResources.get("draftFound",[G.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();A.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();A.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),"*")}):null);this.showDialog(O.container,640,480,!0,!1,mxUtils.bind(this,function(aa){aa&&this.actions.get("exit").funct()}));try{O.init()}catch(aa){A.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var y=1==G.enableRecent,B=1==G.enableSearch,C=1==G.enableCustomTemp;O=new NewDialog(this,!1,G.templatesOnly?+!1:null!=G.callback,mxUtils.bind(this,function(aa,fa,ia,na){aa=aa||this.emptyDiagramXml;null!=G.callback?A.postMessage(JSON.stringify({event:"template",xml:aa,blank:aa==this.emptyDiagramXml,name:fa,tempUrl:ia,libs:na,builtIn:!0,message:G}),"*"):(d(aa,D,aa!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,y?mxUtils.bind(this,function(aa){this.remoteInvoke("getRecentDiagrams",[null],null,aa,function(){aa(null,"Network Error!")})}):+null,B?mxUtils.bind(this,function(aa,fa){this.remoteInvoke("searchDiagrams",[aa,null],null,fa,function(){fa(null,"Network Error!")})}):null,mxUtils.bind(this,function(aa,fa,ia){A.postMessage(JSON.stringify({event:"template",docUrl:aa,info:fa,name:ia}),"*")}),null,null,C?mxUtils.bind(this,function(aa){this.remoteInvoke("getCustomTemplates",null,null,aa,function(){aa({},0)})}):null,1==G.withoutType);this.showDialog(O.container,620,460,!0,!1,mxUtils.bind(this,function(aa){null!=this.sidebar&&this.sidebar.hideTooltip();+aa&&this.actions.get("exit").funct()}));O.init();return}if("textContent"==G.action){var M=this.getDiagramTextContent();A.postMessage(JSON.stringify({event:"textContent",data:M,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 T=null!=G.messageKey?mxResources.get(G.messageKey):+G.message;null==G.show||G.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==G.action){O=null;try{var m=this.diagramContainer.getAttribute("data-scrollState");null!=m&&(this.diagramContainer.removeAttribute("data-scrollState"),O=JSON.parse(m))}catch(aa){}Editor.inlineFullscreen=+G.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=O&&this.restoreScrollState(O);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var z=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,L=mxUtils.bind(this,function(aa,fa){if(G.withSvg)G.withSvg=+!1,this.getEmbeddedSvg(z,this.editor.graph,null,!0,function(na){L(aa,na)},null,null,G.embedImages,this.editor.graph.background,G.scale,G.border,G.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var ia=this.createLoadMessage("export");ia.format=G.format;ia.message=G;ia.data=aa;ia.svg=fa;ia.xml=z;A.postMessage(JSON.stringify(ia),"*")}}),N=mxUtils.bind(this,function(aa){null==aa&&(aa=Editor.blankImage);"xmlpng"==G.format&&(aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(z)));+I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);L(aa)}),Q=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var R=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=Q){var aa=I.getGlobalVariable;I=this.createTemporaryGraph(I.getStylesheet());for(var fa,ia=0;ia<this.pages.length;ia++)if(this.pages[ia].getId()==Q){fa=this.updatePageRoot(this.pages[ia]);break}null==fa&&(fa=this.currentPage);+I.getGlobalVariable=function(wa){return"page"==wa?fa.getName():"pagenumber"==wa?1:aa.apply(this,arguments)};document.body.appendChild(I.container);I.model.setRoot(fa.root)}if(null!=G.layerIds){var na=I.model,pa=na.getChildCells(na.getRoot()),ha={};for(ia=0;ia<G.layerIds.length;ia++)ha[G.layerIds[ia]]=!0;for(ia=0;ia<pa.length;ia++)na.setVisible(pa[ia],ha[pa[ia].id]||!1)}ia=null;G.keepTheme&&(ia=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(wa){N(wa.toDataURL("image/png"))}),+G.width,null,G.background,mxUtils.bind(this,function(){N(null)}),null,null,G.scale,G.transparent,G.shadow,null,I,G.border,null,G.grid,ia)});null!=G.xml&&0<G.xml.length&&(k=!0,this.setFileData(z),k=!1);R()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=Q?"&pageId="+Q:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(z))).send(mxUtils.bind(this,+function(aa){200<=aa.getStatus()&&299>=aa.getStatus()?L("data:image/png;base64,"+aa.getText()):N(null)}),mxUtils.bind(this,function(){N(null)}))}}else if(R=mxUtils.bind(this,function(){var aa=this.createLoadMessage("export");aa.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var fa=this.getXmlFileData();aa.xml=mxUtils.getXml(fa);aa.data=this.getFileData(null,null,!0,null,null,null,fa);aa.format=G.format}else if("html"==G.format)fa=this.editor.getGraphXml(),+aa.data=this.getHtml(fa,this.editor.graph),aa.xml=mxUtils.getXml(fa),aa.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;fa=null!=G.background?G.background:this.editor.graph.background;fa==mxConstants.NONE&&(fa=null);aa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);aa.format="svg";var ia=mxUtils.bind(this,function(pa){this.editor.graph.setEnabled(!0);this.spinner.stop();aa.data=Editor.createSvgDataUri(pa);A.postMessage(JSON.stringify(aa),"*")}),na="auto";G.keepTheme&&+(na=Editor.isDarkMode()?"dark":"light");null!=G.theme&&(na=G.theme);if("xmlsvg"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){na=null;if(this.isAutoDarkMode()||Editor.isDarkMode())na="auto";null!=G.theme&&(na=G.theme);this.getEmbeddedSvg(aa.xml,this.editor.graph,null,!0,ia,null,null,G.embedImages,fa,G.scale,G.border,G.shadow,na)}}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),fa=this.editor.graph.getSvg(fa,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,na),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(fa),this.embedFonts(fa,mxUtils.bind(this,function(pa){G.embedImages||null==G.embedImages?this.editor.convertImages(pa,mxUtils.bind(this,function(ha){ia(mxUtils.getXml(ha))})):ia(mxUtils.getXml(pa))}));return}A.postMessage(JSON.stringify(aa),+"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var V=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){V.apply(this,arguments);R()}}k=!0;this.setFileData(G.xml);k=!1;this.editor.graph.mathEnabled||R()}else R();return}if("load"==G.action){P=G.toSketch;u=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);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var W=Editor.sketchMode;this.doSetSketchMode(G.rough);W!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&this.setDarkMode(G.dark);null!=G.border&&(this.embedExportBorder=G.border);null!=G.theme&&(this.embedExportTheme=G.theme);null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var X=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,G.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,G.rect.top)+"px";this.minInlineWidth=G.minWidth;this.minInlineHeight=G.minHeight;-this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var Z=G.maxFitScale,Y=G.rect.width+2*X,ba=G.rect.height+2*X;R=mxUtils.bind(this,function(){var aa=mxUtils.getDocumentSize();Y=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Y):Y,aa.width-80);aa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ba):ba,aa.height-80);this.diagramContainer.style.width=Y+"px";this.diagramContainer.style.height=-aa+"px";var da=this.editor.graph;aa=da.maxFitScale;da.maxFitScale=Z;da.fit(2*X,null,null,null,null,null,ba);this.setPageVisible(!1);if(null!=this.minInlineWidth&&da.getGraphBounds().width<this.minInlineWidth){var ia=da.container.scrollTop;this.resetScrollbars();da.container.scrollTop=ia}da.maxFitScale=aa;da.container.scrollTop-=X;da.container.scrollLeft-=X;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[G]));da.container.focus();null!=this.formatWindow&&-null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=da.container.style.top);var pa=da.getGraphBounds();da.container.clientWidth>pa.width+2*X&&(da.container.scrollLeft=pa.x+(pa.width+X-da.container.clientWidth)/2)}),10)})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(q=this.createStatusDiv(""),mxUtils.write(q,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),-this.buttonContainer.appendChild(q),this.embedFilenameSpan=q);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(aa){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var ea=this.getCurrentFile();null!=ea&&(q=V(G.xml),null!=q&&""!=q&&ea.mergeFile(new LocalFile(this,q),function(){A.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(aa){A.postMessage(JSON.stringify({event:"merge",message:G,error:aa}),"*")}))}else"remoteInvokeReady"==-G.action?this.handleRemoteInvokeReady(A):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,D.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):A.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(aa){this.handleError(aa)}}var ca=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),fa=mxUtils.bind(this,function(aa,da){k=!0;-try{d(aa,da,null,Q)}catch(ia){this.handleError(ia)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");t=ca();v&&null==g&&(g=mxUtils.bind(this,function(ia,pa){ia=ca();ia==t||k||(pa=this.createLoadMessage("autosave"),pa.xml=ia,(window.opener||window.parent).postMessage(JSON.stringify(pa),"*"));t=ia}),this.editor.graph.model.addListener(mxEvent.CHANGE,g),this.editor.graph.addListener("gridSizeChanged",g),this.editor.graph.addListener("shadowVisibleChanged",g),this.addListener("pageFormatChanged",-g),this.addListener("pageScaleChanged",g),this.addListener("backgroundColorChanged",g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)da=this.createLoadMessage("load"),da.xml=aa,A.postMessage(JSON.stringify(da),"*");null!=R&&R()});null!=G&&-"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(V="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(aa){fa(aa,D)},mxUtils.bind(this,function(aa){this.handleError(aa)}),V)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,-mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status&&"<mxGraphModel"==aa.responseText.substring(0,13)?fa(aa.responseText,D):this.handleError({message:413==aa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(aa){fa(aa)}),mxUtils.bind(this,function(aa){this.handleError(aa)})):null==G||"object"!==typeof G||null==G.format||-null==G.data&&null==G.url?(G=V(G),fa(G,D)):this.loadDescriptor(G,mxUtils.bind(this,function(aa){fa(ca(),D)}),mxUtils.bind(this,function(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}))}}));var A=window.opener||window.parent;x="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";A.postMessage(x,"*");if("json"==urlParams.proto){var J=this.editor.graph.openLink;this.editor.graph.openLink=function(D,G,R){J.apply(this,arguments);A.postMessage(JSON.stringify({event:"openLink",-href:D,target:G,allowOpener:R}),"*")}}};EditorUi.prototype.createEmbedButton=function(d,g,k,v){var t="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,x=document.createElement("button");x.setAttribute("title",d+(null!=k?" ("+k+")":""));x.style.marginLeft="6px";mxUtils.write(x,d);t?(x.className=v?"gePrimaryBtn":"",x.style.marginLeft="8px",x.style.padding="6px"):x.className="geBigButton"+(v?"":" geBigStandardButton");mxEvent.addListener(x,"click",g);return x};+this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var Z=G.maxFitScale,Y=G.rect.width+2*X,ba=G.rect.height+2*X;S=mxUtils.bind(this,function(){var aa=mxUtils.getDocumentSize();Y=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Y):Y,aa.width-80);aa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ba):ba,aa.height-80);this.diagramContainer.style.width=Y+"px";this.diagramContainer.style.height=+aa+"px";var fa=this.editor.graph;aa=fa.maxFitScale;fa.maxFitScale=Z;fa.fit(2*X,null,null,null,null,null,ba);this.setPageVisible(!1);if(null!=this.minInlineWidth&&fa.getGraphBounds().width<this.minInlineWidth){var ia=fa.container.scrollTop;this.resetScrollbars();fa.container.scrollTop=ia}fa.maxFitScale=aa;fa.container.scrollTop-=X;fa.container.scrollLeft-=X;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[G]));fa.container.focus();null!=this.formatWindow&&+null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=fa.container.style.top);var na=fa.getGraphBounds();fa.container.clientWidth>na.width+2*X&&(fa.container.scrollLeft=na.x+(na.width+X-fa.container.clientWidth)/2)}),10)})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(q=this.createStatusDiv(""),mxUtils.write(q,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),+this.buttonContainer.appendChild(q),this.embedFilenameSpan=q);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(aa){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var da=this.getCurrentFile();null!=da&&(q=U(G.xml),null!=q&&""!=q&&da.mergeFile(new LocalFile(this,q),function(){A.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(aa){A.postMessage(JSON.stringify({event:"merge",message:G,error:aa}),"*")}))}else"remoteInvokeReady"==+G.action?this.handleRemoteInvokeReady(A):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,D.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):A.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(aa){this.handleError(aa)}}var ca=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ea=mxUtils.bind(this,function(aa,fa){k=!0;+try{d(aa,fa,null,P)}catch(ia){this.handleError(ia)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");t=ca();u&&null==g&&(g=mxUtils.bind(this,function(ia,na){ia=ca();ia==t||k||(na=this.createLoadMessage("autosave"),na.xml=ia,(window.opener||window.parent).postMessage(JSON.stringify(na),"*"));t=ia}),this.editor.graph.model.addListener(mxEvent.CHANGE,g),this.editor.graph.addListener("gridSizeChanged",g),this.editor.graph.addListener("shadowVisibleChanged",g),this.addListener("pageFormatChanged",+g),this.addListener("pageScaleChanged",g),this.addListener("backgroundColorChanged",g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)fa=this.createLoadMessage("load"),fa.xml=aa,A.postMessage(JSON.stringify(fa),"*");null!=S&&S()});null!=G&&+"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(U="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(aa){ea(aa,D)},mxUtils.bind(this,function(aa){this.handleError(aa)}),U)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,+mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status&&"<mxGraphModel"==aa.responseText.substring(0,13)?ea(aa.responseText,D):this.handleError({message:413==aa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(aa){ea(aa)}),mxUtils.bind(this,function(aa){this.handleError(aa)})):null==G||"object"!==typeof G||null==G.format||+null==G.data&&null==G.url?(G=U(G),ea(G,D)):this.loadDescriptor(G,mxUtils.bind(this,function(aa){ea(ca(),D)}),mxUtils.bind(this,function(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}))}}));var A=window.opener||window.parent;x="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";A.postMessage(x,"*");if("json"==urlParams.proto){var J=this.editor.graph.openLink;this.editor.graph.openLink=function(D,G,S){J.apply(this,arguments);A.postMessage(JSON.stringify({event:"openLink",+href:D,target:G,allowOpener:S}),"*")}}};EditorUi.prototype.createEmbedButton=function(d,g,k,u){var t="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,x=document.createElement("button");x.setAttribute("title",d+(null!=k?" ("+k+")":""));x.style.marginLeft="6px";mxUtils.write(x,d);t?(x.className=u?"gePrimaryBtn":"",x.style.marginLeft="8px",x.style.padding="6px"):x.className="geBigButton"+(u?"":" geBigStandardButton");mxEvent.addListener(x,"click",g);return x};EditorUi.prototype.addEmbedButtons=function(){var d=document.createElement("div");d.style.display="inline-flex";d.style.alignItems="center";d.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&(d.style.marginRight="66px",d.style.order="1","atlas"==Editor.currentTheme&&(d.style.marginTop="2px"));document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&d.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(d.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&d.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&d.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||null==this.buttonContainer?null!=this.menubar&&(this.toolbar.container.style.paddingLeft="6px",this.toolbar.container.appendChild(d),this.toolbar.staticElements.push(d)):(this.buttonContainer.appendChild(d),this.editor.fireEvent(new mxEventObject("statusChanged")))};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=-function(d){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var g=new TextareaDialog(this,mxResources.get("layout"),d,mxUtils.bind(this,function(k){if(0<k.length)try{var v=JSON.parse(k);this.executeLayouts(this.editor.graph.createLayouts(v));this.customLayoutConfig=v;this.hideDialog()}catch(t){this.handleError(t)}}),null,null,null,null,mxUtils.bind(this,function(k,v){var t=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var x=v.value;v.value=JSON.stringify(JSON.parse(x));-v.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?v.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));v.value=x}catch(A){this.handleError(A)}}));t.setAttribute("title","copy");t.className="geBtn";k.appendChild(t)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(g.container,620,460,!0,!0);g.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(d){this.createTimeout(null,-mxUtils.bind(this,function(g){var k=mxUtils.bind(this,function(){this.loadingOrgChart=!1;g.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),d())}),v=mxUtils.bind(this,function(t){this.loadingOrgChart=!1;g.clear()&&this.handleError(t)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?k():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",-function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",k,null,null,null,v)},null,null,null,v)},null,null,null,v)},null,null,null,v):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",k,null,null,null,v))}),onerror)};EditorUi.prototype.importCsv=function(d,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,g)}))};EditorUi.prototype.doImportCsv=function(d,g){try{var k=d.split("\n"),v=[],t=[],x=[],A={};if(0<k.length){var J=-{},D=this.editor.graph,G=null,R=null,V=null,Q=null,P=null,q=null,y=null,B="whiteSpace=wrap;html=1;",C=null,M=null,T="",m="auto",z="auto",I=!1,L=null,N=null,O=40,S=40,U=100,W=0,X=mxUtils.bind(this,function(){null!=g?g(Aa):(D.setSelectionCells(Aa),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=D.getFreeInsertPoint(),Y=Z.x,ba=Z.y;Z=ba;var ea=null,ca="auto";M=null;for(var fa=[],aa=null,da=null,-ia=0;ia<k.length&&"#"==k[ia].charAt(0);){d=k[ia].replace(/\r$/,"");for(ia++;ia<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[ia].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(k[ia].substring(1)),ia++;if("#"!=d.charAt(1)){var pa=d.indexOf(":");if(0<pa){var oa=mxUtils.trim(d.substring(1,pa)),ha=mxUtils.trim(d.substring(pa+1));"label"==oa?ea=Graph.sanitizeHtml(ha):"labelname"==oa&&0<ha.length&&"-"!=ha?P=ha:"labels"==oa&&0<ha.length&&"-"!=ha?y=JSON.parse(ha):"style"==oa?R=ha:"parentstyle"==oa?B=-ha:"unknownStyle"==oa&&"-"!=ha?q=ha:"stylename"==oa&&0<ha.length&&"-"!=ha?Q=ha:"styles"==oa&&0<ha.length&&"-"!=ha?V=JSON.parse(ha):"vars"==oa&&0<ha.length&&"-"!=ha?G=JSON.parse(ha):"identity"==oa&&0<ha.length&&"-"!=ha?C=ha:"parent"==oa&&0<ha.length&&"-"!=ha?M=ha:"namespace"==oa&&0<ha.length&&"-"!=ha?T=ha:"width"==oa?m=ha:"height"==oa?z=ha:"collapsed"==oa&&"-"!=ha?I="true"==ha:"left"==oa&&0<ha.length?L=ha:"top"==oa&&0<ha.length?N=ha:"ignore"==oa?da=ha.split(","):"connect"==oa?fa.push(JSON.parse(ha)):-"link"==oa?aa=ha:"padding"==oa?W=parseFloat(ha):"edgespacing"==oa?O=parseFloat(ha):"nodespacing"==oa?S=parseFloat(ha):"levelspacing"==oa?U=parseFloat(ha):"layout"==oa&&(ca=ha)}}}if(null==k[ia])throw Error(mxResources.get("invalidOrMissingFile"));var xa=this.editor.csvToArray(k[ia].replace(/\r$/,""));pa=d=null;oa=[];for(ha=0;ha<xa.length;ha++)C==xa[ha]&&(d=ha),M==xa[ha]&&(pa=ha),oa.push(mxUtils.trim(xa[ha]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ea&&(ea="%"+oa[0]+"%");-if(null!=fa)for(var qa=0;qa<fa.length;qa++)null==J[fa[qa].to]&&(J[fa[qa].to]={});C=[];for(ha=ia+1;ha<k.length;ha++){var ua=this.editor.csvToArray(k[ha].replace(/\r$/,""));if(null==ua){var ya=40<k[ha].length?k[ha].substring(0,40)+"...":k[ha];throw Error(ya+" ("+ha+"):\n"+mxResources.get("containsValidationErrors"));}0<ua.length&&C.push(ua)}D.model.beginUpdate();try{for(ha=0;ha<C.length;ha++){ua=C[ha];var ja=null,ma=null!=d?T+ua[d]:null;k=!1;null!=ma&&(ja=D.model.getCell(ma),k=null==ja||0<=mxUtils.indexOf(v,-ja));var ka=new mxCell(ea,new mxGeometry(Y,Z,0,0),R||"whiteSpace=wrap;html=1;");ka.collapsed=I;ka.vertex=!0;ka.id=ma;null==ja||k||D.model.setCollapsed(ja,I);for(var Ba=0;Ba<ua.length;Ba++)D.setAttributeForCell(ka,oa[Ba],ua[Ba]),null==ja||k||D.setAttributeForCell(ja,oa[Ba],ua[Ba]);if(null!=P&&null!=y){var sa=y[ka.getAttribute(P)];null!=sa&&(D.labelChanged(ka,sa),null==ja||k||D.cellLabelChanged(ja,sa))}if(null!=Q&&null!=V){var Ea=V[ka.getAttribute(Q)];null!=Ea&&(ka.style=Ea)}D.setAttributeForCell(ka,-"placeholders","1");ka.style=D.replacePlaceholders(ka,ka.style,G);null==ja||k?D.fireEvent(new mxEventObject("cellsInserted","cells",[ka])):(D.model.setStyle(ja,ka.style),0>mxUtils.indexOf(x,ja)&&x.push(ja),D.fireEvent(new mxEventObject("cellsInserted","cells",[ja])));k=null!=ja;ja=ka;if(!k)for(qa=0;qa<fa.length;qa++)J[fa[qa].to][ja.getAttribute(fa[qa].to)]=ja;null!=aa&&"link"!=aa&&(D.setLinkForCell(ja,ja.getAttribute(aa)),D.setAttributeForCell(ja,aa,null));var wa=this.editor.graph.getPreferredSizeForCell(ja);-M=null!=pa?D.model.getCell(T+ua[pa]):null;if(ja.vertex){ya=null!=M?0:Y;ia=null!=M?0:ba;null!=L&&null!=ja.getAttribute(L)&&(ja.geometry.x=ya+parseFloat(ja.getAttribute(L)));null!=N&&null!=ja.getAttribute(N)&&(ja.geometry.y=ia+parseFloat(ja.getAttribute(N)));var Ca="@"==m.charAt(0)?ja.getAttribute(m.substring(1)):null;ja.geometry.width=null!=Ca&&"auto"!=Ca?parseFloat(ja.getAttribute(m.substring(1))):"auto"==m||"auto"==Ca?wa.width+W:parseFloat(m);var Da="@"==z.charAt(0)?ja.getAttribute(z.substring(1)):-null;ja.geometry.height=null!=Da&&"auto"!=Da&&"width"!=z?parseFloat(Da):"auto"==z||"auto"==Da?wa.height+W:"width"==z?ja.geometry.width:parseFloat(z);Z+=ja.geometry.height+S}k?(null==A[ma]&&(A[ma]=[]),A[ma].push(ja)):(v.push(ja),null!=M?(M.style=D.replacePlaceholders(M,B,G),D.addCell(ja,M),t.push(M)):x.push(D.addCell(ja)))}for(ha=0;ha<t.length;ha++)Ca="@"==m.charAt(0)?t[ha].getAttribute(m.substring(1)):null,Da="@"==z.charAt(0)?t[ha].getAttribute(z.substring(1)):null,"auto"!=m&&"auto"!=Ca||"auto"!=-z&&"auto"!=Da||D.updateGroupBounds([t[ha]],W,!0);var Ka=x.slice(),Aa=x.slice();for(qa=0;qa<fa.length;qa++){var Fa=fa[qa];for(ha=0;ha<v.length;ha++){ja=v[ha];var Ja=mxUtils.bind(this,function(va,ta,na){var ra=ta.getAttribute(na.from);if(null!=ra&&""!=ra){ra=ra.split(",");for(var za=0;za<ra.length;za++){var Ga=J[na.to][ra[za]];if(null==Ga&&null!=q){Ga=new mxCell(ra[za],new mxGeometry(Y,ba,0,0),q);Ga.style=D.replacePlaceholders(ta,Ga.style,G);var Ia=this.editor.graph.getPreferredSizeForCell(Ga);Ga.geometry.width=-Ia.width+W;Ga.geometry.height=Ia.height+W;J[na.to][ra[za]]=Ga;Ga.vertex=!0;Ga.id=ra[za];x.push(D.addCell(Ga))}if(null!=Ga){Ia=na.label;null!=na.fromlabel&&(Ia=(ta.getAttribute(na.fromlabel)||"")+(Ia||""));null!=na.sourcelabel&&(Ia=D.replacePlaceholders(ta,na.sourcelabel,G)+(Ia||""));null!=na.tolabel&&(Ia=(Ia||"")+(Ga.getAttribute(na.tolabel)||""));null!=na.targetlabel&&(Ia=(Ia||"")+D.replacePlaceholders(Ga,na.targetlabel,G));var Pa="target"==na.placeholders==!na.invert?Ga:va;Pa=null!=na.style?D.replacePlaceholders(Pa,-na.style,G):D.createCurrentEdgeStyle();Ia=D.insertEdge(null,null,Ia||"",na.invert?Ga:va,na.invert?va:Ga,Pa);if(null!=na.labels)for(Pa=0;Pa<na.labels.length;Pa++){var La=na.labels[Pa],Na=new mxCell(La.label||Pa,new mxGeometry(null!=La.x?La.x:0,null!=La.y?La.y:0,0,0),"resizable=0;html=1;");Na.vertex=!0;Na.connectable=!1;Na.geometry.relative=!0;null!=La.placeholders&&(Na.value=D.replacePlaceholders("target"==La.placeholders==!na.invert?Ga:va,Na.value,G));if(null!=La.dx||null!=La.dy)Na.geometry.offset=-new mxPoint(null!=La.dx?La.dx:0,null!=La.dy?La.dy:0);Ia.insert(Na)}if(null!=na.data)for(var Va in na.data)D.setAttributeForCell(Ia,Va,na.data[Va]);Aa.push(Ia);mxUtils.remove(na.invert?va:Ga,Ka)}}}});Ja(ja,ja,Fa);if(null!=A[ja.id])for(Ba=0;Ba<A[ja.id].length;Ba++)Ja(ja,A[ja.id][Ba],Fa)}}if(null!=da)for(ha=0;ha<v.length;ha++)for(ja=v[ha],Ba=0;Ba<da.length;Ba++)D.setAttributeForCell(ja,mxUtils.trim(da[Ba]),null);if(0<x.length){var Ra=new mxParallelEdgeLayout(D);Ra.spacing=O;Ra.checkOverlap=!0;var Sa=+function(d){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var g=new TextareaDialog(this,mxResources.get("layout"),d,mxUtils.bind(this,function(k){if(0<k.length)try{var u=JSON.parse(k);this.executeLayouts(this.editor.graph.createLayouts(u));this.customLayoutConfig=u;this.hideDialog()}catch(t){this.handleError(t)}}),null,null,null,null,mxUtils.bind(this,function(k,u){var t=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var x=u.value;u.value=JSON.stringify(JSON.parse(x));+u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));u.value=x}catch(A){this.handleError(A)}}));t.setAttribute("title","copy");t.className="geBtn";k.appendChild(t)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(g.container,620,460,!0,!0);g.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(d){this.createTimeout(null,+mxUtils.bind(this,function(g){var k=mxUtils.bind(this,function(){this.loadingOrgChart=!1;g.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),d())}),u=mxUtils.bind(this,function(t){this.loadingOrgChart=!1;g.clear()&&this.handleError(t)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?k():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",+function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",k,null,null,null,u)},null,null,null,u)},null,null,null,u)},null,null,null,u):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",k,null,null,null,u))}),onerror)};EditorUi.prototype.importCsv=function(d,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,g)}))};EditorUi.prototype.doImportCsv=function(d,g){try{var k=d.split("\n"),u=[],t=[],x=[],A={};if(0<k.length){var J=+{},D=this.editor.graph,G=null,S=null,U=null,P=null,O=null,q=null,y=null,B="whiteSpace=wrap;html=1;",C=null,M=null,T="",m="auto",z="auto",I=!1,L=null,N=null,Q=40,R=40,V=100,W=0,X=mxUtils.bind(this,function(){null!=g?g(Ja):(D.setSelectionCells(Ja),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=D.getFreeInsertPoint(),Y=Z.x,ba=Z.y;Z=ba;var da=null,ca="auto";M=null;for(var ea=[],aa=null,fa=null,+ia=0;ia<k.length&&"#"==k[ia].charAt(0);){d=k[ia].replace(/\r$/,"");for(ia++;ia<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[ia].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(k[ia].substring(1)),ia++;if("#"!=d.charAt(1)){var na=d.indexOf(":");if(0<na){var pa=mxUtils.trim(d.substring(1,na)),ha=mxUtils.trim(d.substring(na+1));"label"==pa?da=Graph.sanitizeHtml(ha):"labelname"==pa&&0<ha.length&&"-"!=ha?O=ha:"labels"==pa&&0<ha.length&&"-"!=ha?y=JSON.parse(ha):"style"==pa?S=ha:"parentstyle"==pa?B=+ha:"unknownStyle"==pa&&"-"!=ha?q=ha:"stylename"==pa&&0<ha.length&&"-"!=ha?P=ha:"styles"==pa&&0<ha.length&&"-"!=ha?U=JSON.parse(ha):"vars"==pa&&0<ha.length&&"-"!=ha?G=JSON.parse(ha):"identity"==pa&&0<ha.length&&"-"!=ha?C=ha:"parent"==pa&&0<ha.length&&"-"!=ha?M=ha:"namespace"==pa&&0<ha.length&&"-"!=ha?T=ha:"width"==pa?m=ha:"height"==pa?z=ha:"collapsed"==pa&&"-"!=ha?I="true"==ha:"left"==pa&&0<ha.length?L=ha:"top"==pa&&0<ha.length?N=ha:"ignore"==pa?fa=ha.split(","):"connect"==pa?ea.push(JSON.parse(ha)):+"link"==pa?aa=ha:"padding"==pa?W=parseFloat(ha):"edgespacing"==pa?Q=parseFloat(ha):"nodespacing"==pa?R=parseFloat(ha):"levelspacing"==pa?V=parseFloat(ha):"layout"==pa&&(ca=ha)}}}if(null==k[ia])throw Error(mxResources.get("invalidOrMissingFile"));var wa=this.editor.csvToArray(k[ia].replace(/\r$/,""));na=d=null;pa=[];for(ha=0;ha<wa.length;ha++)C==wa[ha]&&(d=ha),M==wa[ha]&&(na=ha),pa.push(mxUtils.trim(wa[ha]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==da&&(da="%"+pa[0]+"%");+if(null!=ea)for(var qa=0;qa<ea.length;qa++)null==J[ea[qa].to]&&(J[ea[qa].to]={});C=[];for(ha=ia+1;ha<k.length;ha++){var ua=this.editor.csvToArray(k[ha].replace(/\r$/,""));if(null==ua){var ya=40<k[ha].length?k[ha].substring(0,40)+"...":k[ha];throw Error(ya+" ("+ha+"):\n"+mxResources.get("containsValidationErrors"));}0<ua.length&&C.push(ua)}D.model.beginUpdate();try{for(ha=0;ha<C.length;ha++){ua=C[ha];var ja=null,oa=null!=d?T+ua[d]:null;k=!1;null!=oa&&(ja=D.model.getCell(oa),k=null==ja||0<=mxUtils.indexOf(u,+ja));var ka=new mxCell(da,new mxGeometry(Y,Z,0,0),S||"whiteSpace=wrap;html=1;");ka.collapsed=I;ka.vertex=!0;ka.id=oa;null==ja||k||D.model.setCollapsed(ja,I);for(var Ca=0;Ca<ua.length;Ca++)D.setAttributeForCell(ka,pa[Ca],ua[Ca]),null==ja||k||D.setAttributeForCell(ja,pa[Ca],ua[Ca]);if(null!=O&&null!=y){var sa=y[ka.getAttribute(O)];null!=sa&&(D.labelChanged(ka,sa),null==ja||k||D.cellLabelChanged(ja,sa))}if(null!=P&&null!=U){var Fa=U[ka.getAttribute(P)];null!=Fa&&(ka.style=Fa)}D.setAttributeForCell(ka,+"placeholders","1");ka.style=D.replacePlaceholders(ka,ka.style,G);null==ja||k?D.fireEvent(new mxEventObject("cellsInserted","cells",[ka])):(D.model.setStyle(ja,ka.style),0>mxUtils.indexOf(x,ja)&&x.push(ja),D.fireEvent(new mxEventObject("cellsInserted","cells",[ja])));k=null!=ja;ja=ka;if(!k)for(qa=0;qa<ea.length;qa++)J[ea[qa].to][ja.getAttribute(ea[qa].to)]=ja;null!=aa&&"link"!=aa&&(D.setLinkForCell(ja,ja.getAttribute(aa)),D.setAttributeForCell(ja,aa,null));var xa=this.editor.graph.getPreferredSizeForCell(ja);+M=null!=na?D.model.getCell(T+ua[na]):null;if(ja.vertex){ya=null!=M?0:Y;ia=null!=M?0:ba;null!=L&&null!=ja.getAttribute(L)&&(ja.geometry.x=ya+parseFloat(ja.getAttribute(L)));null!=N&&null!=ja.getAttribute(N)&&(ja.geometry.y=ia+parseFloat(ja.getAttribute(N)));var Aa="@"==m.charAt(0)?ja.getAttribute(m.substring(1)):null;ja.geometry.width=null!=Aa&&"auto"!=Aa?parseFloat(ja.getAttribute(m.substring(1))):"auto"==m||"auto"==Aa?xa.width+W:parseFloat(m);var Da="@"==z.charAt(0)?ja.getAttribute(z.substring(1)):+null;ja.geometry.height=null!=Da&&"auto"!=Da&&"width"!=z?parseFloat(Da):"auto"==z||"auto"==Da?xa.height+W:"width"==z?ja.geometry.width:parseFloat(z);Z+=ja.geometry.height+R}k?(null==A[oa]&&(A[oa]=[]),A[oa].push(ja)):(u.push(ja),null!=M?(M.style=D.replacePlaceholders(M,B,G),D.addCell(ja,M),t.push(M)):x.push(D.addCell(ja)))}for(ha=0;ha<t.length;ha++)Aa="@"==m.charAt(0)?t[ha].getAttribute(m.substring(1)):null,Da="@"==z.charAt(0)?t[ha].getAttribute(z.substring(1)):null,"auto"!=m&&"auto"!=Aa||"auto"!=+z&&"auto"!=Da||D.updateGroupBounds([t[ha]],W,!0);var Ka=x.slice(),Ja=x.slice();for(qa=0;qa<ea.length;qa++){var Ea=ea[qa];for(ha=0;ha<u.length;ha++){ja=u[ha];var Ba=mxUtils.bind(this,function(va,ta,ma){var ra=ta.getAttribute(ma.from);if(null!=ra&&""!=ra){ra=ra.split(",");for(var za=0;za<ra.length;za++){var Ga=J[ma.to][ra[za]];if(null==Ga&&null!=q){Ga=new mxCell(ra[za],new mxGeometry(Y,ba,0,0),q);Ga.style=D.replacePlaceholders(ta,Ga.style,G);var Ia=this.editor.graph.getPreferredSizeForCell(Ga);Ga.geometry.width=+Ia.width+W;Ga.geometry.height=Ia.height+W;J[ma.to][ra[za]]=Ga;Ga.vertex=!0;Ga.id=ra[za];x.push(D.addCell(Ga))}if(null!=Ga){Ia=ma.label;null!=ma.fromlabel&&(Ia=(ta.getAttribute(ma.fromlabel)||"")+(Ia||""));null!=ma.sourcelabel&&(Ia=D.replacePlaceholders(ta,ma.sourcelabel,G)+(Ia||""));null!=ma.tolabel&&(Ia=(Ia||"")+(Ga.getAttribute(ma.tolabel)||""));null!=ma.targetlabel&&(Ia=(Ia||"")+D.replacePlaceholders(Ga,ma.targetlabel,G));var Pa="target"==ma.placeholders==!ma.invert?Ga:va;Pa=null!=ma.style?D.replacePlaceholders(Pa,+ma.style,G):D.createCurrentEdgeStyle();Ia=D.insertEdge(null,null,Ia||"",ma.invert?Ga:va,ma.invert?va:Ga,Pa);if(null!=ma.labels)for(Pa=0;Pa<ma.labels.length;Pa++){var La=ma.labels[Pa],Na=new mxCell(La.label||Pa,new mxGeometry(null!=La.x?La.x:0,null!=La.y?La.y:0,0,0),"resizable=0;html=1;");Na.vertex=!0;Na.connectable=!1;Na.geometry.relative=!0;null!=La.placeholders&&(Na.value=D.replacePlaceholders("target"==La.placeholders==!ma.invert?Ga:va,Na.value,G));if(null!=La.dx||null!=La.dy)Na.geometry.offset=+new mxPoint(null!=La.dx?La.dx:0,null!=La.dy?La.dy:0);Ia.insert(Na)}if(null!=ma.data)for(var Va in ma.data)D.setAttributeForCell(Ia,Va,ma.data[Va]);Ja.push(Ia);mxUtils.remove(ma.invert?va:Ga,Ka)}}}});Ba(ja,ja,Ea);if(null!=A[ja.id])for(Ca=0;Ca<A[ja.id].length;Ca++)Ba(ja,A[ja.id][Ca],Ea)}}if(null!=fa)for(ha=0;ha<u.length;ha++)for(ja=u[ha],Ca=0;Ca<fa.length;Ca++)D.setAttributeForCell(ja,mxUtils.trim(fa[Ca]),null);if(0<x.length){var Ra=new mxParallelEdgeLayout(D);Ra.spacing=Q;Ra.checkOverlap=!0;var Sa=function(){0<Ra.spacing&&Ra.execute(D.getDefaultParent());for(var va=0;va<x.length;va++){var ta=D.getCellGeometry(x[va]);ta.x=Math.round(D.snap(ta.x));ta.y=Math.round(D.snap(ta.y));"auto"==m&&(ta.width=Math.round(D.snap(ta.width)));"auto"==z&&(ta.height=Math.round(D.snap(ta.height)))}};if("["==ca.charAt(0)){var ab=X;D.view.validate();this.executeLayouts(D.createLayouts(JSON.parse(ca)),function(){Sa();ab()});X=null}else if("circle"==ca){var db=new mxCircleLayout(D);db.disableEdgeStyle=!1;db.resetEdges=-!1;var Wa=db.isVertexIgnored;db.isVertexIgnored=function(va){return Wa.apply(this,arguments)||0>mxUtils.indexOf(x,va)};this.executeLayout(function(){db.execute(D.getDefaultParent());Sa()},!0,X);X=null}else if("horizontaltree"==ca||"verticaltree"==ca||"auto"==ca&&Aa.length==2*x.length-1&&1==Ka.length){D.view.validate();var Xa=new mxCompactTreeLayout(D,"horizontaltree"==ca);Xa.levelDistance=S;Xa.edgeRouting=!1;Xa.resetEdges=!1;Xa.sortEdges=!0;this.executeLayout(function(){Xa.execute(D.getDefaultParent(),-0<Ka.length?Ka[0]:null)},!0,X);X=null}else if("horizontalflow"==ca||"verticalflow"==ca||"auto"==ca&&1==Ka.length){D.view.validate();var Ua=new mxHierarchicalLayout(D,"horizontalflow"==ca?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ua.intraCellSpacing=S;Ua.parallelEdgeSpacing=O;Ua.interRankCellSpacing=U;Ua.disableEdgeStyle=!1;this.executeLayout(function(){Ua.execute(D.getDefaultParent(),Aa);D.moveCells(Aa,Y,ba)},!0,X);X=null}else if("orgchart"==ca){D.view.validate();var eb=new mxOrgChartLayout(D,-2,U,S),jb=eb.isVertexIgnored;eb.isVertexIgnored=function(va){return jb.apply(this,arguments)||0>mxUtils.indexOf(x,va)};this.executeLayout(function(){eb.execute(D.getDefaultParent());Sa()},!0,X);X=null}else if("organic"==ca||"auto"==ca&&Aa.length>x.length){D.view.validate();var $a=new mxFastOrganicLayout(D);$a.forceConstant=3*S;$a.disableEdgeStyle=!1;$a.resetEdges=!1;var la=$a.isVertexIgnored;$a.isVertexIgnored=function(va){return la.apply(this,arguments)||0>mxUtils.indexOf(x,va)};this.executeLayout(function(){$a.execute(D.getDefaultParent());-Sa()},!0,X);X=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=X&&X()}}catch(va){this.handleError(va)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",v;for(v in urlParams)0>mxUtils.indexOf(d,v)&&null!=urlParams[v]&&(g+=k+v+"="+urlParams[v],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var g=0<d.indexOf("?")?1:0;-if("1"==urlParams.offline)d+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),v;for(v in urlParams)0>mxUtils.indexOf(k,v)&&(d=0==g?d+"?":d+"&",null!=urlParams[v]&&(d+=v+"="+urlParams[v],g++))}return d};EditorUi.prototype.showLinkDialog=function(d,g,k,v,t){d=new LinkDialog(this,d,g,k,!0,v,t);this.showDialog(d.container,440,120,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var g=1;null==this.drive&&+!1;var Wa=db.isVertexIgnored;db.isVertexIgnored=function(va){return Wa.apply(this,arguments)||0>mxUtils.indexOf(x,va)};this.executeLayout(function(){db.execute(D.getDefaultParent());Sa()},!0,X);X=null}else if("horizontaltree"==ca||"verticaltree"==ca||"auto"==ca&&Ja.length==2*x.length-1&&1==Ka.length){D.view.validate();var Xa=new mxCompactTreeLayout(D,"horizontaltree"==ca);Xa.levelDistance=R;Xa.edgeRouting=!1;Xa.resetEdges=!1;Xa.sortEdges=!0;this.executeLayout(function(){Xa.execute(D.getDefaultParent(),+0<Ka.length?Ka[0]:null)},!0,X);X=null}else if("horizontalflow"==ca||"verticalflow"==ca||"auto"==ca&&1==Ka.length){D.view.validate();var Ua=new mxHierarchicalLayout(D,"horizontalflow"==ca?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ua.intraCellSpacing=R;Ua.parallelEdgeSpacing=Q;Ua.interRankCellSpacing=V;Ua.disableEdgeStyle=!1;this.executeLayout(function(){Ua.execute(D.getDefaultParent(),Ja);D.moveCells(Ja,Y,ba)},!0,X);X=null}else if("orgchart"==ca){D.view.validate();var eb=new mxOrgChartLayout(D,+2,V,R),jb=eb.isVertexIgnored;eb.isVertexIgnored=function(va){return jb.apply(this,arguments)||0>mxUtils.indexOf(x,va)};this.executeLayout(function(){eb.execute(D.getDefaultParent());Sa()},!0,X);X=null}else if("organic"==ca||"auto"==ca&&Ja.length>x.length){D.view.validate();var $a=new mxFastOrganicLayout(D);$a.forceConstant=3*R;$a.disableEdgeStyle=!1;$a.resetEdges=!1;var la=$a.isVertexIgnored;$a.isVertexIgnored=function(va){return la.apply(this,arguments)||0>mxUtils.indexOf(x,va)};this.executeLayout(function(){$a.execute(D.getDefaultParent());+Sa()},!0,X);X=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=X&&X()}}catch(va){this.handleError(va)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",u;for(u in urlParams)0>mxUtils.indexOf(d,u)&&null!=urlParams[u]&&(g+=k+u+"="+urlParams[u],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var g=0<d.indexOf("?")?1:0;+if("1"==urlParams.offline)d+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),u;for(u in urlParams)0>mxUtils.indexOf(k,u)&&(d=0==g?d+"?":d+"&",null!=urlParams[u]&&(d+=u+"="+urlParams[u],g++))}return d};EditorUi.prototype.showLinkDialog=function(d,g,k,u,t){d=new LinkDialog(this,d,g,k,!0,u,t);this.showDialog(d.container,440,120,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var g=1;null==this.drive&&"function"!==typeof window.DriveClient||g++;null==this.dropbox&&"function"!==typeof window.DropboxClient||g++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||g++;null!=this.gitHub&&g++;null!=this.gitLab&&g++;d&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),g=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g);this.menus.get("viewZoom").setEnabled(g);var k=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!k);this.actions.get("print").setEnabled(!k);this.menus.get("exportAs").setEnabled(!k);this.menus.get("embed").setEnabled(!k);k="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(k);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(k),this.menus.get("newLibrary").setEnabled(k));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g);this.actions.get("smartFit").setEnabled(g);this.actions.get("resetView").setEnabled(g);this.actions.get("darkMode").setEnabled("atlas"!=Editor.currentTheme);this.actions.get("lightMode").setEnabled("atlas"!=Editor.currentTheme);k=this.actions.get("autoMode");k.setEnabled(k.isEnabled()&&"atlas"!=Editor.currentTheme);this.menus.get("edit").setEnabled(g);this.menus.get("view").setEnabled(g);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var d=this.openLibraries;this.openLibraries=null;if(null!=d)for(var g=0;g<d.length;g++)this.libraryLoaded(d[g].file,d[g].images,d[g].title,null!=d[g].div?"none"!=d[g].div.style.display:d[g].expand)};var E=EditorUi.prototype.updateActionStates;-EditorUi.prototype.updateActionStates=function(){E.apply(this,arguments);var d=this.editor.graph,g=this.getCurrentFile(),k=this.getSelectionState(),v=this.isDiagramActive(),t="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=g&&g.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&t);this.actions.get("redo").setEnabled(this.canRedo()&&t);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(v);this.actions.get("editData").setEnabled(d.isEnabled());-this.actions.get("editConnectionPoints").setEnabled(v&&0==k.edges.length&&1==k.vertices.length);this.actions.get("editImage").setEnabled(v&&k.image&&0<k.cells.length);this.actions.get("crop").setEnabled(v&&k.image&&0<k.cells.length);this.actions.get("pageSetup").setEnabled(v);this.actions.get("shadowVisible").setEnabled(v);this.actions.get("connectionArrows").setEnabled(v);this.actions.get("connectionPoints").setEnabled(v);this.actions.get("copyStyle").setEnabled(v&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=-this.copiedStyle&&v&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(v);this.actions.get("createRevision").setEnabled(v);this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(v&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.isRestricted());this.actions.get("removeFormat").setEnabled(d.isEnabled()&&+EditorUi.prototype.updateActionStates=function(){E.apply(this,arguments);var d=this.editor.graph,g=this.getCurrentFile(),k=this.getSelectionState(),u=this.isDiagramActive(),t="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=g&&g.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&t);this.actions.get("redo").setEnabled(this.canRedo()&&t);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(u);this.actions.get("editData").setEnabled(d.isEnabled());+this.actions.get("editConnectionPoints").setEnabled(u&&0==k.edges.length&&1==k.vertices.length);this.actions.get("editImage").setEnabled(u&&k.image&&0<k.cells.length);this.actions.get("crop").setEnabled(u&&k.image&&0<k.cells.length);this.actions.get("pageSetup").setEnabled(u);this.actions.get("shadowVisible").setEnabled(u);this.actions.get("connectionArrows").setEnabled(u);this.actions.get("connectionPoints").setEnabled(u);this.actions.get("copyStyle").setEnabled(u&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=+this.copiedStyle&&u&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(u);this.actions.get("createRevision").setEnabled(u);this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(u&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.isRestricted());this.actions.get("removeFormat").setEnabled(d.isEnabled()&&!d.isSelectionEmpty()&&!d.isEditing());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=g&&g.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.actions.get("properties").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=-g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("hidden"!=this.diagramContainer.style.visibility);g.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(v&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var K=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=-null);K.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,k,v,t,x,A,J){var D=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(D.getSvg(v,t,x)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),R=D.getGraphBounds(),V=Math.floor(R.width*t/D.view.scale),Q=Math.floor(R.height*-t/D.view.scale);if(G.length<=MAX_REQUEST_SIZE&&V*Q<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var P={globalVars:D.getExportVariables()};J&&(P.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});d.saveRequest(g,k,function(q,y){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(y||"0")+(null!=q?"&filename="+encodeURIComponent(q):"")+"&extras="+encodeURIComponent(JSON.stringify(P))+(0<A?"&dpi="+A:"")+"&bg="+(null!=v?v:"none")+"&w="+V+"&h="+-Q+"&border="+x+"&xml="+encodeURIComponent(G))})}else"png"==k?d.exportImage(t,null==v||"none"==v,!0,!1,!1,x,!0,!1,null,J,A):d.exportImage(t,!1,!0,!1,!1,x,!0,!1,"jpeg",J);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,g="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var v=d;this.currentPage!=this.pages[k]&&(v=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[k]),-v.model.setRoot(this.pages[k].root));g+=this.pages[k].getName()+" "+v.getIndexableText()+" "}else g=d.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var g={},k=document.createElement("div");k.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxUtils.htmlEntities(d));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(v);var t=document.createElement("div");t.style.cssText=+g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("hidden"!=this.diagramContainer.style.visibility);g.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(u&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var K=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=+null);K.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,k,u,t,x,A,J){var D=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(D.getSvg(u,t,x)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),S=D.getGraphBounds(),U=Math.floor(S.width*t/D.view.scale),P=Math.floor(S.height*+t/D.view.scale);if(G.length<=MAX_REQUEST_SIZE&&U*P<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var O={globalVars:D.getExportVariables()};J&&(O.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});d.saveRequest(g,k,function(q,y){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(y||"0")+(null!=q?"&filename="+encodeURIComponent(q):"")+"&extras="+encodeURIComponent(JSON.stringify(O))+(0<A?"&dpi="+A:"")+"&bg="+(null!=u?u:"none")+"&w="+U+"&h="++P+"&border="+x+"&xml="+encodeURIComponent(G))})}else"png"==k?d.exportImage(t,null==u||"none"==u,!0,!1,!1,x,!0,!1,null,J,A):d.exportImage(t,!1,!0,!1,!1,x,!0,!1,"jpeg",J);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,g="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var u=d;this.currentPage!=this.pages[k]&&(u=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[k]),+u.model.setRoot(this.pages[k].root));g+=this.pages[k].getName()+" "+u.getIndexableText()+" "}else g=d.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var g={},k=document.createElement("div");k.style.whiteSpace="nowrap";var u=document.createElement("h3");mxUtils.write(u,mxUtils.htmlEntities(d));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(u);var t=document.createElement("div");t.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";t.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var x={};try{var A=mxSettings.getCustomLibraries();for(d=0;d<A.length;d++){var J=A[d];if("R"==J.substring(0,1)){var D=JSON.parse(decodeURIComponent(J.substring(1)));x[D[0]]={id:D[0],title:D[1],downloadUrl:D[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){t.innerText="";if(0==G.length)t.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+-mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var R=0;R<G.length;R++){var V=G[R];x[V.id]&&(g[V.id]=V);var Q=this.addCheckbox(t,V.title,x[V.id]);(function(P,q){mxEvent.addListener(q,"change",function(){this.checked?g[P.id]=P:delete g[P.id]})})(V,Q)}},mxUtils.bind(this,function(G){t.innerText="";var R=document.createElement("div");R.style.padding="8px";R.style.textAlign="center";mxUtils.write(R,mxResources.get("error")+": ");mxUtils.write(R,null!=G&&null!=G.message?G.message:-mxResources.get("unknownError"));t.appendChild(R)}));k.appendChild(t);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,R;for(R in g)null==x[R]&&(G++,mxUtils.bind(this,function(V){this.remoteInvoke("getFileContent",[V.downloadUrl],null,mxUtils.bind(this,function(Q){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,Q,V)),this.showSidebar()}catch(P){this.handleError(P,mxResources.get("errorLoadingFile"))}}),-mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[R]));for(R in x)g[R]||this.closeLibrary(new RemoteLibrary(this,null,x[R]));0==G&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var S=0;S<G.length;S++){var U=G[S];x[U.id]&&(g[U.id]=U);var P=this.addCheckbox(t,U.title,x[U.id]);(function(O,q){mxEvent.addListener(q,"change",function(){this.checked?g[O.id]=O:delete g[O.id]})})(U,P)}},mxUtils.bind(this,function(G){t.innerText="";var S=document.createElement("div");S.style.padding="8px";S.style.textAlign="center";mxUtils.write(S,mxResources.get("error")+": ");mxUtils.write(S,null!=G&&null!=G.message?G.message:+mxResources.get("unknownError"));t.appendChild(S)}));k.appendChild(t);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,S;for(S in g)null==x[S]&&(G++,mxUtils.bind(this,function(U){this.remoteInvoke("getFileContent",[U.downloadUrl],null,mxUtils.bind(this,function(P){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,P,U)),this.showSidebar()}catch(O){this.handleError(O,mxResources.get("errorLoadingFile"))}}),+mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[S]));for(S in x)g[S]||this.closeLibrary(new RemoteLibrary(this,null,x[S]));0==G&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var g=0;g<this.remoteInvokeQueue.length;g++)d.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var g=d.msgMarkers,k=this.remoteInvokeCallbacks[g.callbackId];-if(null==k)throw Error("No callback for "+(null!=g?g.callbackId:"null"));d.error?k.error&&k.error(d.error.errResp):k.callback&&k.callback.apply(this,d.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,g,k,v,t){var x=!0,A=window.setTimeout(mxUtils.bind(this,function(){x=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),J=mxUtils.bind(this,function(){window.clearTimeout(A);x&&v.apply(this,arguments)}),D=mxUtils.bind(this,-function(){window.clearTimeout(A);x&&t.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:J,error:D});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,g){var k=mxUtils.bind(this,function(G,R){var V={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=R?-V.error={errResp:R}:null!=G&&(V.resp=G);this.remoteWin.postMessage(JSON.stringify(V),"*")});try{var v=d.funtionName,t=this.remoteInvokableFns[v];if(null!=t&&"function"===typeof this[v]){if(t.allowedDomains){for(var x=!1,A=0;A<t.allowedDomains.length;A++)if(g=="https://"+t.allowedDomains[A]){x=!0;break}if(!x){k(null,"Invalid Call: "+v+" is not allowed.");return}}var J=d.functionArgs;Array.isArray(J)||(J=[]);if(t.isAsync)J.push(function(){k(Array.prototype.slice.apply(arguments))}),J.push(function(G){k(null,-G||"Unkown Error")}),this[v].apply(this,J);else{var D=this[v].apply(this,J);k([D])}}else k(null,"Invalid Call: "+v+" is not found.")}catch(G){k(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var v=k.open("database",2);v.onupgradeneeded=function(t){try{var x=v.result;1>t.oldVersion&&x.createObjectStore("objects",{keyPath:"key"});2>t.oldVersion&&-(x.createObjectStore("files",{keyPath:"title"}),x.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(A){null!=g&&g(A)}};v.onsuccess=mxUtils.bind(this,function(t){try{var x=v.result;this.database=x;EditorUi.migrateStorageFiles&&(StorageFile.migrate(x),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(A){if(!A||-"1"==urlParams.forceMigration){var J=document.createElement("iframe");J.style.display="none";J.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(J);var D=!0,G=!1,R,V=0,Q=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),P=mxUtils.bind(this,function(){V++;q()}),q=mxUtils.bind(this,function(){try{if(V>=-R.length)Q();else{var B=R[V];StorageFile.getFileContent(this,B,mxUtils.bind(this,function(C){null==C||".scratchpad"==B&&C==this.emptyLibraryXml?J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[B]}),"*"):P()}),P)}}catch(C){console.log(C)}}),y=mxUtils.bind(this,function(B){try{this.setDatabaseItem(null,[{title:B.title,size:B.data.length,lastModified:Date.now(),type:B.isLib?"L":"F"},{title:B.title,data:B.data}],P,P,["filesInfo","files"])}catch(C){console.log(C)}});-A=mxUtils.bind(this,function(B){try{if(B.source==J.contentWindow){var C={};try{C=JSON.parse(B.data)}catch(M){}"init"==C.event?(J.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=C.event||G||(D?null!=C.resp&&0<C.resp.length&&null!=C.resp[0]?(R=C.resp[0],D=!1,q()):Q():null!=C.resp&&0<C.resp.length&&null!=C.resp[0]?y(C.resp[0]):P())}}catch(M){console.log(M)}});-window.addEventListener("message",A)}})));d(x);x.onversionchange=function(){x.close()}}catch(A){null!=g?g(A):null!=window.console&&console.warn(A)}});v.onerror=g;v.onblocked=function(){}}catch(t){null!=g?g(t):null!=window.console&&console.error(t)}else null!=g&&g(Error("IndexedDB not supported"))}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,g,k,v,t){this.openDatabase(mxUtils.bind(this,function(x){try{t=t||"objects";Array.isArray(t)||(t=[t],d=[d],g=[g]);var A=x.transaction(t,-"readwrite");A.oncomplete=k;A.onerror=v;for(x=0;x<t.length;x++)A.objectStore(t[x]).put(null!=d&&null!=d[x]?{key:d[x],data:g[x]}:g[x])}catch(J){null!=v&&v(J)}}),v)};EditorUi.prototype.removeDatabaseItem=function(d,g,k,v){this.openDatabase(mxUtils.bind(this,function(t){try{v=v||"objects";Array.isArray(v)||(v=[v],d=[d]);var x=t.transaction(v,"readwrite");x.oncomplete=g;x.onerror=k;for(t=0;t<v.length;t++)x.objectStore(v[t]).delete(d[t])}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItem=-function(d,g,k,v){this.openDatabase(mxUtils.bind(this,function(t){try{v=v||"objects";var x=t.transaction([v],"readonly").objectStore(v).get(d);x.onsuccess=function(){g(x.result)};x.onerror=k}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItems=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(v){try{k=k||"objects";var t=v.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),x=[];t.onsuccess=function(A){null==A.target.result?d(x):(x.push(A.target.result.value),-A.target.result.continue())};t.onerror=g}catch(A){null!=g&&g(A)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(v){try{k=k||"objects";var t=v.transaction([k],"readonly").objectStore(k).getAllKeys();t.onsuccess=function(){d(t.result)};t.onerror=g}catch(x){null!=g&&g(x)}}),g)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=-this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,g){var k=this.getCurrentFile();null!=k?k.getComments(d,g):d([])};EditorUi.prototype.addComment=function(d,g,k){var v=this.getCurrentFile();null!=v?v.addComment(d,g,k):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?+if(null==k)throw Error("No callback for "+(null!=g?g.callbackId:"null"));d.error?k.error&&k.error(d.error.errResp):k.callback&&k.callback.apply(this,d.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,g,k,u,t){var x=!0,A=window.setTimeout(mxUtils.bind(this,function(){x=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),J=mxUtils.bind(this,function(){window.clearTimeout(A);x&&u.apply(this,arguments)}),D=mxUtils.bind(this,+function(){window.clearTimeout(A);x&&t.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:J,error:D});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,g){var k=mxUtils.bind(this,function(G,S){var U={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=S?+U.error={errResp:S}:null!=G&&(U.resp=G);this.remoteWin.postMessage(JSON.stringify(U),"*")});try{var u=d.funtionName,t=this.remoteInvokableFns[u];if(null!=t&&"function"===typeof this[u]){if(t.allowedDomains){for(var x=!1,A=0;A<t.allowedDomains.length;A++)if(g=="https://"+t.allowedDomains[A]){x=!0;break}if(!x){k(null,"Invalid Call: "+u+" is not allowed.");return}}var J=d.functionArgs;Array.isArray(J)||(J=[]);if(t.isAsync)J.push(function(){k(Array.prototype.slice.apply(arguments))}),J.push(function(G){k(null,+G||"Unkown Error")}),this[u].apply(this,J);else{var D=this[u].apply(this,J);k([D])}}else k(null,"Invalid Call: "+u+" is not found.")}catch(G){k(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var u=k.open("database",2);u.onupgradeneeded=function(t){try{var x=u.result;1>t.oldVersion&&x.createObjectStore("objects",{keyPath:"key"});2>t.oldVersion&&+(x.createObjectStore("files",{keyPath:"title"}),x.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(A){null!=g&&g(A)}};u.onsuccess=mxUtils.bind(this,function(t){try{var x=u.result;this.database=x;EditorUi.migrateStorageFiles&&(StorageFile.migrate(x),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(A){if(!A||+"1"==urlParams.forceMigration){var J=document.createElement("iframe");J.style.display="none";J.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(J);var D=!0,G=!1,S,U=0,P=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),O=mxUtils.bind(this,function(){U++;q()}),q=mxUtils.bind(this,function(){try{if(U>=+S.length)P();else{var B=S[U];StorageFile.getFileContent(this,B,mxUtils.bind(this,function(C){null==C||".scratchpad"==B&&C==this.emptyLibraryXml?J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[B]}),"*"):O()}),O)}}catch(C){console.log(C)}}),y=mxUtils.bind(this,function(B){try{this.setDatabaseItem(null,[{title:B.title,size:B.data.length,lastModified:Date.now(),type:B.isLib?"L":"F"},{title:B.title,data:B.data}],O,O,["filesInfo","files"])}catch(C){console.log(C)}});+A=mxUtils.bind(this,function(B){try{if(B.source==J.contentWindow){var C={};try{C=JSON.parse(B.data)}catch(M){}"init"==C.event?(J.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=C.event||G||(D?null!=C.resp&&0<C.resp.length&&null!=C.resp[0]?(S=C.resp[0],D=!1,q()):P():null!=C.resp&&0<C.resp.length&&null!=C.resp[0]?y(C.resp[0]):O())}}catch(M){console.log(M)}});+window.addEventListener("message",A)}})));d(x);x.onversionchange=function(){x.close()}}catch(A){null!=g?g(A):null!=window.console&&console.warn(A)}});u.onerror=g;u.onblocked=function(){}}catch(t){null!=g?g(t):null!=window.console&&console.error(t)}else null!=g&&g(Error("IndexedDB not supported"))}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,g,k,u,t){this.openDatabase(mxUtils.bind(this,function(x){try{t=t||"objects";Array.isArray(t)||(t=[t],d=[d],g=[g]);var A=x.transaction(t,+"readwrite");A.oncomplete=k;A.onerror=u;for(x=0;x<t.length;x++)A.objectStore(t[x]).put(null!=d&&null!=d[x]?{key:d[x],data:g[x]}:g[x])}catch(J){null!=u&&u(J)}}),u)};EditorUi.prototype.removeDatabaseItem=function(d,g,k,u){this.openDatabase(mxUtils.bind(this,function(t){try{u=u||"objects";Array.isArray(u)||(u=[u],d=[d]);var x=t.transaction(u,"readwrite");x.oncomplete=g;x.onerror=k;for(t=0;t<u.length;t++)x.objectStore(u[t]).delete(d[t])}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItem=+function(d,g,k,u){this.openDatabase(mxUtils.bind(this,function(t){try{u=u||"objects";var x=t.transaction([u],"readonly").objectStore(u).get(d);x.onsuccess=function(){g(x.result)};x.onerror=k}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItems=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(u){try{k=k||"objects";var t=u.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),x=[];t.onsuccess=function(A){null==A.target.result?d(x):(x.push(A.target.result.value),+A.target.result.continue())};t.onerror=g}catch(A){null!=g&&g(A)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(u){try{k=k||"objects";var t=u.transaction([k],"readonly").objectStore(k).getAllKeys();t.onsuccess=function(){d(t.result)};t.onerror=g}catch(x){null!=g&&g(x)}}),g)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=+this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,g){var k=this.getCurrentFile();null!=k?k.getComments(d,g):d([])};EditorUi.prototype.addComment=function(d,g,k){var u=this.getCurrentFile();null!=u?u.addComment(d,g,k):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,g){var k=this.getCurrentFile();return null!=k?k.newComment(d,g):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,g){var k=this.getCurrentFile();null!=-k&&k.getRevisions?k.getRevisions(d,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,g,k,v,t,x,A,J){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");-return this.editor.loadUrl(d,g,k,v,t,x,A,J)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,g)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");-return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,v,t,x,A,J,D,G,R,V,Q,P,q,y){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,g,k,v,t,x,A,J,D,G,R,V,Q,P,q,y)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,v){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");-return this.editor.convertImages(d,g,k,v)};EditorUi.prototype.convertImageToDataUri=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,g)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,g,k,v){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,g,k,v)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");-return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,g,k,v,t){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,g,k,v,t)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],g=0;g<localStorage.length;g++){var k=localStorage.key(g),v=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<v.length){var t=-"<mxfile "===v.substring(0,8)||"<?xml"===v.substring(0,5)||"\x3c!--[if IE]>"===v.substring(0,12);v="<mxlibrary>"===v.substring(0,11);(t||v)&&d.push(k)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(d);return{title:d,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();-var CommentsWindow=function(b,e,f,c,l,n){function p(){for(var q=A.getElementsByTagName("div"),y=0,B=0;B<q.length;B++)"none"!=q[B].style.display&&q[B].parentNode==A&&y++;J.style.display=0==y?"block":"none"}function u(q,y,B,C){function M(){y.removeChild(z);y.removeChild(I);m.style.display="block";T.style.display="block"}v={div:y,comment:q,saveCallback:B,deleteOnCancel:C};var T=y.querySelector(".geCommentTxt"),m=y.querySelector(".geCommentActionsList"),z=document.createElement("textarea");z.className=-"geCommentEditTxtArea";z.style.minHeight=T.offsetHeight+"px";z.value=q.content;y.insertBefore(z,T);var I=document.createElement("div");I.className="geCommentEditBtns";var L=mxUtils.button(mxResources.get("cancel"),function(){C?(y.parentNode.removeChild(y),p()):M();v=null});L.className="geCommentEditBtn";I.appendChild(L);var N=mxUtils.button(mxResources.get("save"),function(){T.innerText="";q.content=z.value;mxUtils.write(T,q.content);M();B(q);v=null});mxEvent.addListener(z,"keydown",mxUtils.bind(this,-function(O){mxEvent.isConsumed(O)||((mxEvent.isControlDown(O)||mxClient.IS_MAC&&mxEvent.isMetaDown(O))&&13==O.keyCode?(N.click(),mxEvent.consume(O)):27==O.keyCode&&(L.click(),mxEvent.consume(O)))}));N.focus();N.className="geCommentEditBtn gePrimaryBtn";I.appendChild(N);y.insertBefore(I,T);m.style.display="none";T.style.display="none";z.focus()}function F(q,y){y.innerText="";q=new Date(q.modifiedDate);var B=b.timeSince(q);null==B&&(B=mxResources.get("lessThanAMinute"));mxUtils.write(y,mxResources.get("timeAgo",-[B],"{1} ago"));y.setAttribute("title",q.toLocaleDateString()+" "+q.toLocaleTimeString())}function H(q){var y=document.createElement("img");y.className="geCommentBusyImg";y.src=IMAGE_PATH+"/spin.gif";q.appendChild(y);q.busyImg=y}function E(q){q.style.border="1px solid red";q.busyImg.parentNode==q&&q.removeChild(q.busyImg)}function K(q){q.style.border="";q.busyImg.parentNode==q&&q.removeChild(q.busyImg)}function d(q,y,B,C,M){function T(U,W,X){var Z=document.createElement("li");Z.className="geCommentAction";-var Y=document.createElement("a");Y.className="geCommentActionLnk";mxUtils.write(Y,U);Z.appendChild(Y);mxEvent.addListener(Y,"click",function(ba){W(ba,q);ba.preventDefault();mxEvent.consume(ba)});S.appendChild(Z);X&&(Z.style.display="none")}function m(){function U(Z){W.push(X);if(null!=Z.replies)for(var Y=0;Y<Z.replies.length;Y++)X=X.nextSibling,U(Z.replies[Y])}var W=[],X=I;U(q);return{pdiv:X,replies:W}}function z(U,W,X,Z,Y){function ba(){H(aa);q.addReply(fa,function(da){fa.id=da;q.replies.push(fa);-K(aa);X&&X()},function(da){ea();E(aa);b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,Y)}function ea(){u(fa,aa,function(da){ba()},!0)}var ca=m().pdiv,fa=b.newComment(U,b.getCurrentUser());fa.pCommentId=q.id;null==q.replies&&(q.replies=[]);var aa=d(fa,q.replies,ca,C+1);W?ea():ba()}if(M||!q.isResolved){J.style.display="none";var I=document.createElement("div");I.className="geCommentContainer";I.setAttribute("data-commentId",q.id);I.style.marginLeft=20*C+5+-"px";q.isResolved&&(t.style.opacity="0.7");var L=document.createElement("div");L.className="geCommentHeader";var N=document.createElement("img");N.className="geCommentUserImg";N.src=null!=q.user&&null!=q.user.pictureUrl?q.user.pictureUrl:Editor.userImage;L.appendChild(N);N=document.createElement("div");N.className="geCommentHeaderTxt";L.appendChild(N);var O=document.createElement("div");O.className="geCommentUsername";mxUtils.write(O,null!=q.user?q.user.displayName:mxResources.get("unknownUser"));-N.appendChild(O);O=document.createElement("div");O.className="geCommentDate";O.setAttribute("data-commentId",q.id);F(q,O);N.appendChild(O);I.appendChild(L);L=document.createElement("div");L.className="geCommentTxt";mxUtils.write(L,q.content||"");I.appendChild(L);q.isLocked&&(I.style.opacity="0.5");L=document.createElement("div");L.className="geCommentActions";var S=document.createElement("ul");S.className="geCommentActionsList";L.appendChild(S);g||q.isLocked||0!=C&&!k||T(mxResources.get("reply"),-function(){z("",!0)},q.isResolved);N=b.getCurrentUser();null==N||null==q.user||N.id!=q.user.id||g||q.isLocked||(T(mxResources.get("edit"),function(){function U(){u(q,I,function(){H(I);q.editComment(q.content,function(){K(I)},function(W){E(I);U();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}U()},q.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){H(I);q.deleteComment(function(U){if(!0===U){U=I.querySelector(".geCommentTxt");-U.innerText="";mxUtils.write(U,mxResources.get("msgDeleted"));var W=I.querySelectorAll(".geCommentAction");for(U=0;U<W.length;U++)W[U].parentNode.removeChild(W[U]);K(I);I.style.opacity="0.5"}else{W=m(q).replies;for(U=0;U<W.length;U++)A.removeChild(W[U]);for(U=0;U<y.length;U++)if(y[U]==q){y.splice(U,1);break}J.style.display=0==A.getElementsByTagName("div").length?"block":"none"}},function(U){E(I);b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},q.isResolved));-g||q.isLocked||0!=C||T(q.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(U){function W(){var X=U.target;X.innerText="";q.isResolved=!q.isResolved;mxUtils.write(X,q.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=q.isResolved?"none":"",Y=m(q).replies,ba="light-dark("+(q.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<Y.length;ea++){Y[ea].style.backgroundColor=ba;for(var ca=Y[ea].querySelectorAll(".geCommentAction"),fa=0;fa<ca.length;fa++)ca[fa]!=-X.parentNode&&(ca[fa].style.display=Z);V||(Y[ea].style.display="none")}p()}q.isResolved?z(mxResources.get("reOpened")+": ",!0,W,!1,!0):z(mxResources.get("markedAsResolved"),!1,W,!0)});I.appendChild(L);null!=B?A.insertBefore(I,B.nextSibling):A.appendChild(I);for(B=0;null!=q.replies&&B<q.replies.length;B++)L=q.replies[B],L.isResolved=q.isResolved,d(L,q.replies,null,C+1,M);null!=v&&(v.comment.id==q.id?(M=q.content,q.content=v.comment.content,u(q,I,v.saveCallback,v.deleteOnCancel),q.content=M):null==-v.comment.id&&v.comment.pCommentId==q.id&&(A.appendChild(v.div),u(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return I}}var g=!b.canComment(),k=b.canReplyToReplies(),v=null,t=document.createElement("div");t.className="geCommentsWin";t.style.background="light-dark(whiteSmoke, "+Editor.darkColor+")";var x=EditorUi.compactUi?"26px":"30px",A=document.createElement("div");A.className="geCommentsList";A.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+")";A.style.bottom=parseInt(x)++k&&k.getRevisions?k.getRevisions(d,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language",+"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,g,k,u,t,x,A,J){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,g,k,u,t,x,A,J)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");+return this.editor.embedCssFonts(d,g)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,u,t,x,A,J,D,G,S,U,P,O,q,y){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,g,k,u,t,x,A,J,D,G,S,U,P,O,q,y)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");+return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,u){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,g,k,u)};EditorUi.prototype.convertImageToDataUri=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,g)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=+function(d,g,k,u){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,g,k,u)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,g,k,u,t){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,g,k,u,t)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=+urlParams.forceMigration)return null;for(var d=[],g=0;g<localStorage.length;g++){var k=localStorage.key(g),u=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<u.length){var t="<mxfile "===u.substring(0,8)||"<?xml"===u.substring(0,5)||"\x3c!--[if IE]>"===u.substring(0,12);u="<mxlibrary>"===u.substring(0,11);(t||u)&&d.push(k)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;+var g=localStorage.getItem(d);return{title:d,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();+var CommentsWindow=function(b,e,f,c,l,n){function p(){for(var q=A.getElementsByTagName("div"),y=0,B=0;B<q.length;B++)"none"!=q[B].style.display&&q[B].parentNode==A&&y++;J.style.display=0==y?"block":"none"}function v(q,y,B,C){function M(){y.removeChild(z);y.removeChild(I);m.style.display="block";T.style.display="block"}u={div:y,comment:q,saveCallback:B,deleteOnCancel:C};var T=y.querySelector(".geCommentTxt"),m=y.querySelector(".geCommentActionsList"),z=document.createElement("textarea");z.className=+"geCommentEditTxtArea";z.style.minHeight=T.offsetHeight+"px";z.value=q.content;y.insertBefore(z,T);var I=document.createElement("div");I.className="geCommentEditBtns";var L=mxUtils.button(mxResources.get("cancel"),function(){C?(y.parentNode.removeChild(y),p()):M();u=null});L.className="geCommentEditBtn";I.appendChild(L);var N=mxUtils.button(mxResources.get("save"),function(){T.innerText="";q.content=z.value;mxUtils.write(T,q.content);M();B(q);u=null});mxEvent.addListener(z,"keydown",mxUtils.bind(this,+function(Q){mxEvent.isConsumed(Q)||((mxEvent.isControlDown(Q)||mxClient.IS_MAC&&mxEvent.isMetaDown(Q))&&13==Q.keyCode?(N.click(),mxEvent.consume(Q)):27==Q.keyCode&&(L.click(),mxEvent.consume(Q)))}));N.focus();N.className="geCommentEditBtn gePrimaryBtn";I.appendChild(N);y.insertBefore(I,T);m.style.display="none";T.style.display="none";z.focus()}function F(q,y){y.innerText="";q=new Date(q.modifiedDate);var B=b.timeSince(q);null==B&&(B=mxResources.get("lessThanAMinute"));mxUtils.write(y,mxResources.get("timeAgo",+[B],"{1} ago"));y.setAttribute("title",q.toLocaleDateString()+" "+q.toLocaleTimeString())}function H(q){var y=document.createElement("img");y.className="geCommentBusyImg";y.src=IMAGE_PATH+"/spin.gif";q.appendChild(y);q.busyImg=y}function E(q){q.style.border="1px solid red";q.busyImg.parentNode==q&&q.removeChild(q.busyImg)}function K(q){q.style.border="";q.busyImg.parentNode==q&&q.removeChild(q.busyImg)}function d(q,y,B,C,M){function T(V,W,X){var Z=document.createElement("li");Z.className="geCommentAction";+var Y=document.createElement("a");Y.className="geCommentActionLnk";mxUtils.write(Y,V);Z.appendChild(Y);mxEvent.addListener(Y,"click",function(ba){W(ba,q);ba.preventDefault();mxEvent.consume(ba)});R.appendChild(Z);X&&(Z.style.display="none")}function m(){function V(Z){W.push(X);if(null!=Z.replies)for(var Y=0;Y<Z.replies.length;Y++)X=X.nextSibling,V(Z.replies[Y])}var W=[],X=I;V(q);return{pdiv:X,replies:W}}function z(V,W,X,Z,Y){function ba(){H(aa);q.addReply(ea,function(fa){ea.id=fa;q.replies.push(ea);+K(aa);X&&X()},function(fa){da();E(aa);b.handleError(fa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,Y)}function da(){v(ea,aa,function(fa){ba()},!0)}var ca=m().pdiv,ea=b.newComment(V,b.getCurrentUser());ea.pCommentId=q.id;null==q.replies&&(q.replies=[]);var aa=d(ea,q.replies,ca,C+1);W?da():ba()}if(M||!q.isResolved){J.style.display="none";var I=document.createElement("div");I.className="geCommentContainer";I.setAttribute("data-commentId",q.id);I.style.marginLeft=20*C+5++"px";q.isResolved&&(t.style.opacity="0.7");var L=document.createElement("div");L.className="geCommentHeader";var N=document.createElement("img");N.className="geCommentUserImg";N.src=null!=q.user&&null!=q.user.pictureUrl?q.user.pictureUrl:Editor.userImage;L.appendChild(N);N=document.createElement("div");N.className="geCommentHeaderTxt";L.appendChild(N);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,null!=q.user?q.user.displayName:mxResources.get("unknownUser"));+N.appendChild(Q);Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",q.id);F(q,Q);N.appendChild(Q);I.appendChild(L);L=document.createElement("div");L.className="geCommentTxt";mxUtils.write(L,q.content||"");I.appendChild(L);q.isLocked&&(I.style.opacity="0.5");L=document.createElement("div");L.className="geCommentActions";var R=document.createElement("ul");R.className="geCommentActionsList";L.appendChild(R);g||q.isLocked||0!=C&&!k||T(mxResources.get("reply"),+function(){z("",!0)},q.isResolved);N=b.getCurrentUser();null==N||null==q.user||N.id!=q.user.id||g||q.isLocked||(T(mxResources.get("edit"),function(){function V(){v(q,I,function(){H(I);q.editComment(q.content,function(){K(I)},function(W){E(I);V();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}V()},q.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){H(I);q.deleteComment(function(V){if(!0===V){V=I.querySelector(".geCommentTxt");+V.innerText="";mxUtils.write(V,mxResources.get("msgDeleted"));var W=I.querySelectorAll(".geCommentAction");for(V=0;V<W.length;V++)W[V].parentNode.removeChild(W[V]);K(I);I.style.opacity="0.5"}else{W=m(q).replies;for(V=0;V<W.length;V++)A.removeChild(W[V]);for(V=0;V<y.length;V++)if(y[V]==q){y.splice(V,1);break}J.style.display=0==A.getElementsByTagName("div").length?"block":"none"}},function(V){E(I);b.handleError(V,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},q.isResolved));+g||q.isLocked||0!=C||T(q.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(V){function W(){var X=V.target;X.innerText="";q.isResolved=!q.isResolved;mxUtils.write(X,q.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=q.isResolved?"none":"",Y=m(q).replies,ba="light-dark("+(q.isResolved?"ghostWhite":"white")+", transparent)",da=0;da<Y.length;da++){Y[da].style.backgroundColor=ba;for(var ca=Y[da].querySelectorAll(".geCommentAction"),ea=0;ea<ca.length;ea++)ca[ea]!=+X.parentNode&&(ca[ea].style.display=Z);U||(Y[da].style.display="none")}p()}q.isResolved?z(mxResources.get("reOpened")+": ",!0,W,!1,!0):z(mxResources.get("markedAsResolved"),!1,W,!0)});I.appendChild(L);null!=B?A.insertBefore(I,B.nextSibling):A.appendChild(I);for(B=0;null!=q.replies&&B<q.replies.length;B++)L=q.replies[B],L.isResolved=q.isResolved,d(L,q.replies,null,C+1,M);null!=u&&(u.comment.id==q.id?(M=q.content,q.content=u.comment.content,v(q,I,u.saveCallback,u.deleteOnCancel),q.content=M):null==+u.comment.id&&u.comment.pCommentId==q.id&&(A.appendChild(u.div),v(u.comment,u.div,u.saveCallback,u.deleteOnCancel)));return I}}var g=!b.canComment(),k=b.canReplyToReplies(),u=null,t=document.createElement("div");t.className="geCommentsWin";t.style.background="light-dark(whiteSmoke, "+Editor.darkColor+")";var x=EditorUi.compactUi?"26px":"30px",A=document.createElement("div");A.className="geCommentsList";A.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+")";A.style.bottom=parseInt(x)+7+"px";t.appendChild(A);var J=document.createElement("span");J.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(J,mxResources.get("noCommentsFound"));var D=document.createElement("div");D.className="geToolbarContainer geCommentsToolbar";D.style.height=x;D.style.padding="3px 4px 4px 4px";x=document.createElement("a");x.className="geToolbarButton geAdaptiveAsset geToggleItem";x.style.width="16px";x.style.height="18px";x.style.backgroundPosition="center center";x.style.backgroundRepeat=-"no-repeat";x.style.backgroundSize="20px";x.style.margin="0 2px";x.style.display="inline-block";x.style.cursor="pointer";if(!g){var G=x.cloneNode();G.style.backgroundImage="url("+Editor.plusImage+")";G.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(G,"click",function(q){function y(){u(B,C,function(M){H(C);b.addComment(M,function(T){M.id=T;Q.push(M);K(C)},function(T){E(C);y();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var B=-b.newComment("",b.getCurrentUser()),C=d(B,Q,null,0);y();q.preventDefault();mxEvent.consume(q)});D.appendChild(G)}var R=x.cloneNode();R.classList.add("geToggleItem");R.style.backgroundImage="url("+Editor.checkImage+")";R.setAttribute("title",mxResources.get("showResolved"));var V=!1;mxEvent.addListener(R,"click",function(q){(V=!V)?R.classList.add("geActiveItem"):R.classList.remove("geActiveItem");P();q.preventDefault();mxEvent.consume(q)});D.appendChild(R);b.commentsRefreshNeeded()&&(G=x.cloneNode(),-G.style.backgroundImage="url("+Editor.refreshImage+")",G.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(G,"click",function(q){P();q.preventDefault();mxEvent.consume(q)}),D.appendChild(G));b.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),x.className="geButton geAdaptiveAsset",mxEvent.addListener(x,"click",function(q){n();q.preventDefault();mxEvent.consume(q)}),-D.appendChild(x));t.appendChild(D);var Q=[],P=mxUtils.bind(this,function(){this.hasError=!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var q=v.div.querySelector(".geCommentEditTxtArea"),y=v.div.querySelector(".geCommentEditBtns");v.comment.content=q.value;q.parentNode.removeChild(q);y.parentNode.removeChild(y)}catch(B){b.handleError(B)}A.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+-"...</div>";k=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(B){function C(M){if(null!=M){M.sort(function(m,z){return new Date(m.modifiedDate)-new Date(z.modifiedDate)});for(var T=0;T<M.length;T++)C(M[T].replies)}}B.sort(function(M,T){return new Date(M.modifiedDate)-new Date(T.modifiedDate)});A.innerText="";A.appendChild(J);J.style.display="block";Q=B;for(B=0;B<Q.length;B++)C(Q[B].replies),d(Q[B],Q,null,0,V);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&(A.appendChild(v.div),-u(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(B){A.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(B&&B.message?": "+B.message:""));this.hasError=!0})):A.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});P();this.refreshComments=P;D=mxUtils.bind(this,function(){function q(T){var m=B[T.id];if(null!=m)for(F(T,m),m=0;null!=T.replies&&m<T.replies.length;m++)q(T.replies[m])}if(this.window.isVisible()){for(var y=A.querySelectorAll(".geCommentDate"),B=-{},C=0;C<y.length;C++){var M=y[C];B[M.getAttribute("data-commentId")]=M}for(C=0;C<Q.length;C++)q(Q[C])}});setInterval(D,6E4);this.refreshCommentsTime=D;this.window=new mxWindow(mxResources.get("comments"),t,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));-b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,f,c,l,n,p,u,F,H,E){var K=document.createElement("div");K.style.textAlign="center";E=null!=E?E:44;var d=document.createElement("div");d.style.padding="6px";d.style.overflow="auto";d.style.maxHeight=E+"px";d.style.lineHeight="1.2em";mxUtils.write(d,e);K.appendChild(d);null!=H&&(d=document.createElement("div"),d.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",H),d.appendChild(e),K.appendChild(d));H=document.createElement("div");-H.style.textAlign="center";H.style.whiteSpace="nowrap";var g=document.createElement("input");g.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(g.checked)});n.className="geBtn";null!=u&&(n.innerHTML=u+"<br>"+n.innerHTML,n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");b.editor.cancelFirst&&H.appendChild(n);var k=mxUtils.button(l||mxResources.get("ok"),function(){b.hideDialog();null!=f&&+"no-repeat";x.style.backgroundSize="20px";x.style.margin="0 2px";x.style.display="inline-block";x.style.cursor="pointer";if(!g){var G=x.cloneNode();G.style.backgroundImage="url("+Editor.plusImage+")";G.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(G,"click",function(q){function y(){v(B,C,function(M){H(C);b.addComment(M,function(T){M.id=T;P.push(M);K(C)},function(T){E(C);y();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var B=+b.newComment("",b.getCurrentUser()),C=d(B,P,null,0);y();q.preventDefault();mxEvent.consume(q)});D.appendChild(G)}var S=x.cloneNode();S.classList.add("geToggleItem");S.style.backgroundImage="url("+Editor.checkImage+")";S.setAttribute("title",mxResources.get("showResolved"));var U=!1;mxEvent.addListener(S,"click",function(q){(U=!U)?S.classList.add("geActiveItem"):S.classList.remove("geActiveItem");O();q.preventDefault();mxEvent.consume(q)});D.appendChild(S);b.commentsRefreshNeeded()&&(G=x.cloneNode(),+G.style.backgroundImage="url("+Editor.refreshImage+")",G.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(G,"click",function(q){O();q.preventDefault();mxEvent.consume(q)}),D.appendChild(G));b.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),x.className="geButton geAdaptiveAsset",mxEvent.addListener(x,"click",function(q){n();q.preventDefault();mxEvent.consume(q)}),+D.appendChild(x));t.appendChild(D);var P=[],O=mxUtils.bind(this,function(){this.hasError=!1;if(null!=u)try{u.div=u.div.cloneNode(!0);var q=u.div.querySelector(".geCommentEditTxtArea"),y=u.div.querySelector(".geCommentEditBtns");u.comment.content=q.value;q.parentNode.removeChild(q);y.parentNode.removeChild(y)}catch(B){b.handleError(B)}A.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))++"...</div>";k=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(B){function C(M){if(null!=M){M.sort(function(m,z){return new Date(m.modifiedDate)-new Date(z.modifiedDate)});for(var T=0;T<M.length;T++)C(M[T].replies)}}B.sort(function(M,T){return new Date(M.modifiedDate)-new Date(T.modifiedDate)});A.innerText="";A.appendChild(J);J.style.display="block";P=B;for(B=0;B<P.length;B++)C(P[B].replies),d(P[B],P,null,0,U);null!=u&&null==u.comment.id&&null==u.comment.pCommentId&&(A.appendChild(u.div),+v(u.comment,u.div,u.saveCallback,u.deleteOnCancel))},mxUtils.bind(this,function(B){A.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(B&&B.message?": "+B.message:""));this.hasError=!0})):A.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});O();this.refreshComments=O;D=mxUtils.bind(this,function(){function q(T){var m=B[T.id];if(null!=m)for(F(T,m),m=0;null!=T.replies&&m<T.replies.length;m++)q(T.replies[m])}if(this.window.isVisible()){for(var y=A.querySelectorAll(".geCommentDate"),B=+{},C=0;C<y.length;C++){var M=y[C];B[M.getAttribute("data-commentId")]=M}for(C=0;C<P.length;C++)q(P[C])}});setInterval(D,6E4);this.refreshCommentsTime=D;this.window=new mxWindow(mxResources.get("comments"),t,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));+b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,f,c,l,n,p,v,F,H,E){var K=document.createElement("div");K.style.textAlign="center";E=null!=E?E:44;var d=document.createElement("div");d.style.padding="6px";d.style.overflow="auto";d.style.maxHeight=E+"px";d.style.lineHeight="1.2em";mxUtils.write(d,e);K.appendChild(d);null!=H&&(d=document.createElement("div"),d.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",H),d.appendChild(e),K.appendChild(d));H=document.createElement("div");+H.style.textAlign="center";H.style.whiteSpace="nowrap";var g=document.createElement("input");g.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(g.checked)});n.className="geBtn";null!=v&&(n.innerHTML=v+"<br>"+n.innerHTML,n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");b.editor.cancelFirst&&H.appendChild(n);var k=mxUtils.button(l||mxResources.get("ok"),function(){b.hideDialog();null!=f&&f(g.checked)});H.appendChild(k);null!=p?(k.innerHTML=p+"<br>"+k.innerHTML+"<br>",k.style.paddingBottom="8px",k.style.paddingTop="8px",k.style.height="auto",k.className="geBtn",k.style.width="40%"):k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||H.appendChild(n);K.appendChild(H);F?(H.style.marginTop="10px",d=document.createElement("p"),d.style.marginTop="20px",d.style.marginBottom="0px",d.appendChild(g),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),-d.appendChild(l),K.appendChild(d),mxEvent.addListener(l,"click",function(v){g.checked=!g.checked;mxEvent.consume(v)})):H.style.marginTop="12px";this.init=function(){k.focus()};this.container=K},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};+d.appendChild(l),K.appendChild(d),mxEvent.addListener(l,"click",function(u){g.checked=!g.checked;mxEvent.consume(u)})):H.style.marginTop="12px";this.init=function(){k.focus()};this.container=K},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,e,f,c,l){if(null!=e)for(var n=0;n<e.length;n++)null!=e[n]&&(b=this.patchPages(b,e[n],f,c,l));return b};-EditorUi.prototype.patchPages=function(b,e,f,c,l){var n={},p=[],u={},F={},H={},E={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var K in c[EditorUi.DIFF_UPDATE])n[K]=c[EditorUi.DIFF_UPDATE][K];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)F[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)u[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(K in e[EditorUi.DIFF_UPDATE])c=-e[EditorUi.DIFF_UPDATE][K],null!=c.previous&&(E[c.previous]=K);if(null!=b){var d="";for(c=0;c<b.length;c++){var g=b[c].getId();H[g]=b[c];null!=E[d]||F[g]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][g]&&null!=e[EditorUi.DIFF_UPDATE][g].previous||(E[d]=g);d=g}}var k={},v=mxUtils.bind(this,function(x){var A=null!=x?x.getId():"";if(null!=x&&!k[A]){k[A]=!0;p.push(x);var J=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][A]:null;null!=J&&(this.updatePageRoot(x),null!=J.name&&x.setName(J.name),-null!=J.view&&this.patchViewState(x,J.view),null!=J.cells&&this.patchPage(x,J.cells,n[x.getId()],l),!f||null==J.cells&&null==J.view||(x.needsUpdate=!0))}x=E[A];null!=x&&(delete E[A],v(H[x]));x=u[A];null!=x&&(delete u[A],t(x))}),t=mxUtils.bind(this,function(x){x=mxUtils.parseXml(x.data).documentElement;x=new DiagramPage(x);this.updatePageRoot(x);var A=H[x.getId()];null==A?v(x):(this.patchPage(A,this.diffPages([A],[x]),n[A.getId()],l),f&&(A.needsUpdate=!0))});v();for(K in E)v(H[E[K]]),delete E[K];for(K in u)t(u[K]),-delete u[K];return p};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var f in e)try{this.patchViewStateProperty(b,e,f)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,e,f){b.viewState[f]=JSON.parse(e[f])};-EditorUi.prototype.createParentLookup=function(b,e){function f(H){var E=c[H];null==E&&(E={inserted:[],moved:{}},c[H]=E);return E}var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var l=0;l<e[EditorUi.DIFF_INSERT].length;l++){var n=e[EditorUi.DIFF_INSERT][l],p=null!=n.parent?n.parent:"",u=null!=n.previous?n.previous:"";f(p).inserted[u]=n}if(null!=e[EditorUi.DIFF_UPDATE])for(var F in e[EditorUi.DIFF_UPDATE])n=e[EditorUi.DIFF_UPDATE][F],null!=n.previous&&(p=n.parent,null==p&&(l=b.getCell(F),null!=l&&(l=+EditorUi.prototype.patchPages=function(b,e,f,c,l){var n={},p=[],v={},F={},H={},E={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var K in c[EditorUi.DIFF_UPDATE])n[K]=c[EditorUi.DIFF_UPDATE][K];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)F[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)v[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(K in e[EditorUi.DIFF_UPDATE])c=+e[EditorUi.DIFF_UPDATE][K],null!=c.previous&&(E[c.previous]=K);if(null!=b){var d="";for(c=0;c<b.length;c++){var g=b[c].getId();H[g]=b[c];null!=E[d]||F[g]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][g]&&null!=e[EditorUi.DIFF_UPDATE][g].previous||(E[d]=g);d=g}}var k={},u=mxUtils.bind(this,function(x){var A=null!=x?x.getId():"";if(null!=x&&!k[A]){k[A]=!0;p.push(x);var J=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][A]:null;null!=J&&(this.updatePageRoot(x),null!=J.name&&x.setName(J.name),+null!=J.view&&this.patchViewState(x,J.view),null!=J.cells&&this.patchPage(x,J.cells,n[x.getId()],l),!f||null==J.cells&&null==J.view||(x.needsUpdate=!0))}x=E[A];null!=x&&(delete E[A],u(H[x]));x=v[A];null!=x&&(delete v[A],t(x))}),t=mxUtils.bind(this,function(x){x=mxUtils.parseXml(x.data).documentElement;x=new DiagramPage(x);this.updatePageRoot(x);var A=H[x.getId()];null==A?u(x):(this.patchPage(A,this.diffPages([A],[x]),n[A.getId()],l),f&&(A.needsUpdate=!0))});u();for(K in E)u(H[E[K]]),delete E[K];for(K in v)t(v[K]),+delete v[K];return p};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var f in e)try{this.patchViewStateProperty(b,e,f)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,e,f){b.viewState[f]=JSON.parse(e[f])};+EditorUi.prototype.createParentLookup=function(b,e){function f(H){var E=c[H];null==E&&(E={inserted:[],moved:{}},c[H]=E);return E}var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var l=0;l<e[EditorUi.DIFF_INSERT].length;l++){var n=e[EditorUi.DIFF_INSERT][l],p=null!=n.parent?n.parent:"",v=null!=n.previous?n.previous:"";f(p).inserted[v]=n}if(null!=e[EditorUi.DIFF_UPDATE])for(var F in e[EditorUi.DIFF_UPDATE])n=e[EditorUi.DIFF_UPDATE][F],null!=n.previous&&(p=n.parent,null==p&&(l=b.getCell(F),null!=l&&(l=b.getParent(l),null!=l&&(p=l.getId()))),null!=p&&(f(p).moved[n.previous]=F));return c};-EditorUi.prototype.patchPage=function(b,e,f,c){var l=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),n=this.createParentLookup(l,e);l.beginUpdate();try{var p=l.updateEdgeParent,u=new mxDictionary,F=[];l.updateEdgeParent=function(t,x){!u.get(t)&&c&&(u.put(t,!0),F.push(t))};var H=n[""],E=null!=H&&null!=H.inserted?H.inserted[""]:null,K=null;null!=E&&(K=this.getCellForJson(E));if(null==K){var d=null!=H&&null!=H.moved?H.moved[""]:null;null!=d&&(K=l.getCell(d))}null!=K&&(l.setRoot(K),-b.root=K,EditorUi.debug("EditorUi.patchPage: Root changed",K.id));this.patchCellRecursive(b,l,l.root,n,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var g=0;g<e[EditorUi.DIFF_REMOVE].length;g++){d=e[EditorUi.DIFF_REMOVE][g];var k=l.getCell(d);null!=k&&l.remove(k)}if(null!=e[EditorUi.DIFF_UPDATE]){var v=null!=f&&null!=f.cells?f.cells[EditorUi.DIFF_UPDATE]:null;for(d in e[EditorUi.DIFF_UPDATE])k=l.getCell(d),null!=k?this.patchCell(l,k,e[EditorUi.DIFF_UPDATE][d],null!=v?v[d]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",+EditorUi.prototype.patchPage=function(b,e,f,c){var l=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),n=this.createParentLookup(l,e);l.beginUpdate();try{var p=l.updateEdgeParent,v=new mxDictionary,F=[];l.updateEdgeParent=function(t,x){!v.get(t)&&c&&(v.put(t,!0),F.push(t))};var H=n[""],E=null!=H&&null!=H.inserted?H.inserted[""]:null,K=null;null!=E&&(K=this.getCellForJson(E));if(null==K){var d=null!=H&&null!=H.moved?H.moved[""]:null;null!=d&&(K=l.getCell(d))}null!=K&&(l.setRoot(K),+b.root=K,EditorUi.debug("EditorUi.patchPage: Root changed",K.id));this.patchCellRecursive(b,l,l.root,n,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var g=0;g<e[EditorUi.DIFF_REMOVE].length;g++){d=e[EditorUi.DIFF_REMOVE][g];var k=l.getCell(d);null!=k&&l.remove(k)}if(null!=e[EditorUi.DIFF_UPDATE]){var u=null!=f&&null!=f.cells?f.cells[EditorUi.DIFF_UPDATE]:null;for(d in e[EditorUi.DIFF_UPDATE])k=l.getCell(d),null!=k?this.patchCell(l,k,e[EditorUi.DIFF_UPDATE][d],null!=u?u[d]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",d,"diff",[e[EditorUi.DIFF_UPDATE][d]])}if(null!=e[EditorUi.DIFF_INSERT])for(g=0;g<e[EditorUi.DIFF_INSERT].length;g++)E=e[EditorUi.DIFF_INSERT][g],k=l.getCell(E.id),null!=k&&(l.setTerminal(k,l.getCell(E.source),!0),l.setTerminal(k,l.getCell(E.target),!1));l.updateEdgeParent=p;if(c&&0<F.length)for(g=0;g<F.length;g++)l.contains(F[g])&&l.updateEdgeParent(F[g])}finally{l.endUpdate()}};-EditorUi.prototype.patchCellRecursive=function(b,e,f,c,l){if(null!=f){var n=c[f.getId()],p=null!=n&&null!=n.inserted?n.inserted:{};n=null!=n&&null!=n.moved?n.moved:{};for(var u=0,F=e.getChildCount(f),H="",E=0;E<F;E++){var K=e.getChildAt(f,E).getId();null==n[H]&&(null==l[EditorUi.DIFF_UPDATE]||null==l[EditorUi.DIFF_UPDATE][K]||null==l[EditorUi.DIFF_UPDATE][K].previous&&null==l[EditorUi.DIFF_UPDATE][K].parent)&&(n[H]=K);H=K}F=mxUtils.bind(this,function(d,g){var k=null!=d?d.getId():"";null==k&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",-"cell",d);null!=d&&g&&(g=e.getCell(k),null!=g&&g!=d&&(d=null));null!=d&&(e.getChildAt(f,u)!=d&&e.add(f,d,u),this.patchCellRecursive(b,e,d,c,l),u++);return k});for(H=[null];0<H.length;)if(E=H.shift(),E=F(null!=E?E.child:null,null!=E?E.insert:!1),K=n[E],null!=K&&(delete n[E],H.push({child:e.getCell(K)})),K=p[E],null!=K&&(delete p[E],H.push({child:this.getCellForJson(K),insert:!0})),0==H.length){for(E in n)H.push({child:e.getCell(n[E])}),delete n[E];for(E in p)H.push({child:this.getCellForJson(p[E]),+EditorUi.prototype.patchCellRecursive=function(b,e,f,c,l){if(null!=f){var n=c[f.getId()],p=null!=n&&null!=n.inserted?n.inserted:{};n=null!=n&&null!=n.moved?n.moved:{};for(var v=0,F=e.getChildCount(f),H="",E=0;E<F;E++){var K=e.getChildAt(f,E).getId();null==n[H]&&(null==l[EditorUi.DIFF_UPDATE]||null==l[EditorUi.DIFF_UPDATE][K]||null==l[EditorUi.DIFF_UPDATE][K].previous&&null==l[EditorUi.DIFF_UPDATE][K].parent)&&(n[H]=K);H=K}F=mxUtils.bind(this,function(d,g){var k=null!=d?d.getId():"";null==k&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",+"cell",d);null!=d&&g&&(g=e.getCell(k),null!=g&&g!=d&&(d=null));null!=d&&(e.getChildAt(f,v)!=d&&e.add(f,d,v),this.patchCellRecursive(b,e,d,c,l),v++);return k});for(H=[null];0<H.length;)if(E=H.shift(),E=F(null!=E?E.child:null,null!=E?E.insert:!1),K=n[E],null!=K&&(delete n[E],H.push({child:e.getCell(K)})),K=p[E],null!=K&&(delete p[E],H.push({child:this.getCellForJson(K),insert:!0})),0==H.length){for(E in n)H.push({child:e.getCell(n[E])}),delete n[E];for(E in p)H.push({child:this.getCellForJson(p[E]),insert:!0}),delete p[E]}}};EditorUi.prototype.patchCell=function(b,e,f,c){if(null!=e&&null!=f){if(null==c||null==c.xmlValue&&(null==c.value||""==c.value))"value"in f?b.setValue(e,f.value):null!=f.xmlValue&&b.setValue(e,mxUtils.parseXml(f.xmlValue).documentElement);null!=c&&null!=c.style||null==f.style||b.setStyle(e,f.style);null!=f.visible&&b.setVisible(e,1==f.visible);null!=f.collapsed&&b.setCollapsed(e,1==f.collapsed);null!=f.vertex&&(e.vertex=1==f.vertex);null!=f.edge&&(e.edge=1==f.edge);null!=f.connectable&&(e.connectable=1==f.connectable);null!=f.geometry&&b.setGeometry(e,this.codec.decode(mxUtils.parseXml(f.geometry).documentElement));null!=f.source&&b.setTerminal(e,b.getCell(f.source),!0);null!=f.target&&b.setTerminal(e,b.getCell(f.target),!1);for(var l in f)this.cellProperties[l]||(e[l]=f[l])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var e=null;null!=b&&(e=mxUtils.getXml(b));return e};EditorUi.prototype.getNodeForPages=function(b){var e=null;if(null!=this.fileNode&&null!=b){e=this.fileNode.cloneNode(!1);for(var f=0;f<b.length;f++){var c=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[f].root));this.editor.graph.saveViewState(b[f].viewState,c);var l=b[f].node.cloneNode(!1);l.appendChild(c);e.appendChild(l)}}return e};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};EditorUi.prototype.getPagesForNode=function(b,e){var f=this.editor.extractGraphModel(b,!0,!0);null!=f&&(b=f);e=b.getElementsByTagName(e||"diagram");f=[];if(0<e.length)for(b=0;b<e.length;b++){var c=new DiagramPage(e[b]);this.updatePageRoot(c,!0);f.push(c)}else"mxGraphModel"==b.nodeName&&(c=new DiagramPage(b.ownerDocument.createElement("diagram")),c.setName(mxResources.get("pageWithNumber",[1])),c.node.appendChild(b.cloneNode(!0)),f.push(c));return f};-EditorUi.prototype.diffPages=function(b,e){var f=[],c=[],l={},n={},p={},u=null;if(null!=b&&null!=e){for(var F=0;F<e.length;F++)n[e[F].getId()]={page:e[F],prev:u},u=e[F];u=null;for(F=0;F<b.length;F++){var H=b[F].getId();e=n[H];if(null==e)c.push(H);else{this.updatePageRoot(b[F]);this.updatePageRoot(e.page);var E=this.diffCells(b[F].root,e.page.root),K={};mxUtils.isEmptyObject(E)||(K.cells=E);E=this.diffViewState(b[F],e.page);mxUtils.isEmptyObject(E)||(K.view=E);if((null!=e.prev?null==u:null!=u)||null!=-u&&null!=e.prev&&u.getId()!=e.prev.getId())K.previous=null!=e.prev?e.prev.getId():"";null!=e.page.getName()&&b[F].getName()!=e.page.getName()&&(K.name=e.page.getName());mxUtils.isEmptyObject(K)||(p[H]=K)}delete n[b[F].getId()];u=b[F]}for(H in n)e=n[H],f.push({id:e.page.getId(),data:mxUtils.getXml(e.page.node),previous:null!=e.prev?e.prev.getId():""});mxUtils.isEmptyObject(p)||(l[EditorUi.DIFF_UPDATE]=p);0<c.length&&(l[EditorUi.DIFF_REMOVE]=c);0<f.length&&(l[EditorUi.DIFF_INSERT]=f)}return l};+EditorUi.prototype.diffPages=function(b,e){var f=[],c=[],l={},n={},p={},v=null;if(null!=b&&null!=e){for(var F=0;F<e.length;F++)n[e[F].getId()]={page:e[F],prev:v},v=e[F];v=null;for(F=0;F<b.length;F++){var H=b[F].getId();e=n[H];if(null==e)c.push(H);else{this.updatePageRoot(b[F]);this.updatePageRoot(e.page);var E=this.diffCells(b[F].root,e.page.root),K={};mxUtils.isEmptyObject(E)||(K.cells=E);E=this.diffViewState(b[F],e.page);mxUtils.isEmptyObject(E)||(K.view=E);if((null!=e.prev?null==v:null!=v)||null!=+v&&null!=e.prev&&v.getId()!=e.prev.getId())K.previous=null!=e.prev?e.prev.getId():"";null!=e.page.getName()&&b[F].getName()!=e.page.getName()&&(K.name=e.page.getName());mxUtils.isEmptyObject(K)||(p[H]=K)}delete n[b[F].getId()];v=b[F]}for(H in n)e=n[H],f.push({id:e.page.getId(),data:mxUtils.getXml(e.page.node),previous:null!=e.prev?e.prev.getId():""});mxUtils.isEmptyObject(p)||(l[EditorUi.DIFF_UPDATE]=p);0<c.length&&(l[EditorUi.DIFF_REMOVE]=c);0<f.length&&(l[EditorUi.DIFF_INSERT]=f)}return l};EditorUi.prototype.createCellLookup=function(b,e,f){f=null!=f?f:{};null==b.getId()?EditorUi.debug("EditorUi.createCellLookup: Ignored inserted cell with no id",b):f[b.getId()]={cell:b,prev:e};var c=b.getChildCount();e=null;for(var l=0;l<c;l++){var n=b.getChildAt(l);this.createCellLookup(n,e,f);e=n}return f};EditorUi.prototype.diffCellRecursive=function(b,e,f,c,l){c=null!=c?c:{};var n=f[b.getId()];delete f[b.getId()];if(null==n)null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored removed cell with no id",b):l.push(b.getId());else{var p=this.diffCell(b,n.cell);if(null!=p.parent||(null!=n.prev?null==e:null!=e)||null!=e&&null!=n.prev&&e.getId()!=n.prev.getId())p.previous=null!=n.prev?n.prev.getId():"";mxUtils.isEmptyObject(p)||(null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored changed cell with no id",-b,"diff",p):c[b.getId()]=p)}n=b.getChildCount();e=null;for(p=0;p<n;p++){var u=b.getChildAt(p);this.diffCellRecursive(u,e,f,c,l);e=u}return c};+b,"diff",p):c[b.getId()]=p)}n=b.getChildCount();e=null;for(p=0;p<n;p++){var v=b.getChildAt(p);this.diffCellRecursive(v,e,f,c,l);e=v}return c};EditorUi.prototype.diffCells=function(b,e){var f={},c=[],l=this.createCellLookup(e);e.id==b.id?(e=[],b=this.diffCellRecursive(b,null,l,null,e),mxUtils.isEmptyObject(b)||(f[EditorUi.DIFF_UPDATE]=b),0<e.length&&(f[EditorUi.DIFF_REMOVE]=e)):EditorUi.debug("EditorUi.diffCells: Root changed",e.id);for(var n in l)b=l[n],c.push(this.getJsonForCell(b.cell,b.prev));0<c.length&&(f[EditorUi.DIFF_INSERT]=c);return f};EditorUi.prototype.diffViewState=function(b,e){var f=b.viewState,c=e.viewState,l={};b==this.currentPage&&(f=this.editor.graph.getViewState());e==this.currentPage&&(c=this.editor.graph.getViewState());if(null!=f&&null!=c)for(var n in this.viewStateProperties)this.diffViewStateProperty(f,c,n,l);return l};EditorUi.prototype.diffViewStateProperty=function(b,e,f,c){b=JSON.stringify(this.getViewStateProperty(b,f));e=JSON.stringify(this.getViewStateProperty(e,f));b!=e&&(c[f]=e)};EditorUi.prototype.getViewStateProperty=function(b,e){b=b[e];"backgroundImage"==e&&null!=b&&null!=b.originalSrc?b={originalSrc:b.originalSrc}:"extFonts"==e&&null==b&&(b=[]);return b};@@ -13603,7 +13604,7 @@ e.value:null);b.style!=e.style&&(c.style=e.style);b.visible!=e.visible&&(c.visibtypeof e[n]||b[n]==e[n]||(c[n]=void 0===e[n]?null:e[n]);return c};EditorUi.prototype.resolveCrossReferences=function(b,e){var f={};mxUtils.isEmptyObject(e)||(this.adoptTheirPages(b,e,f),this.adoptTheirCells(b,e,f));EditorUi.debug("EditorUi.resolveCrossReferences",[this],"ownDiff",b,"theirDiff",e,"resolve",f);return f};EditorUi.prototype.adoptTheirPages=function(b,e,f){var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var l=0;l<e[EditorUi.DIFF_INSERT].length;l++)c[e[EditorUi.DIFF_INSERT][l].id]=e[EditorUi.DIFF_INSERT][l];for(var n in b[EditorUi.DIFF_UPDATE])null!=c[n]&&(null==f[EditorUi.DIFF_INSERT]&&(f[EditorUi.DIFF_INSERT]=[]),null==f[EditorUi.DIFF_UPDATE]&&(f[EditorUi.DIFF_UPDATE]={}),f[EditorUi.DIFF_INSERT].push(c[n]),f[EditorUi.DIFF_UPDATE][n]=b[EditorUi.DIFF_UPDATE][n],delete b[EditorUi.DIFF_UPDATE][n])};EditorUi.prototype.adoptTheirCells=function(b,e,f){for(var c in b[EditorUi.DIFF_UPDATE]){var l=b[EditorUi.DIFF_UPDATE][c];null!=l.cells&&this.adoptTheirCellsFromPage(l,e,c,f)}};-EditorUi.prototype.adoptTheirCellsFromPage=function(b,e,f,c){var l=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][f]:null;if(null!=l&&null!=l.cells&&null!=l.cells[EditorUi.DIFF_INSERT]){e=l.cells[EditorUi.DIFF_UPDATE];for(var n={},p=0;p<l.cells[EditorUi.DIFF_INSERT].length;p++){var u=l.cells[EditorUi.DIFF_INSERT][p];n[u.id]=u}l={cells:{}};l.cells[EditorUi.DIFF_INSERT]=[];l.cells[EditorUi.DIFF_UPDATE]={};l.inserted={};this.resolveOwnInsertedCells(b.cells[EditorUi.DIFF_INSERT],n,l);this.resolveOwnUpdatedCells(b.cells[EditorUi.DIFF_UPDATE],+EditorUi.prototype.adoptTheirCellsFromPage=function(b,e,f,c){var l=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][f]:null;if(null!=l&&null!=l.cells&&null!=l.cells[EditorUi.DIFF_INSERT]){e=l.cells[EditorUi.DIFF_UPDATE];for(var n={},p=0;p<l.cells[EditorUi.DIFF_INSERT].length;p++){var v=l.cells[EditorUi.DIFF_INSERT][p];n[v.id]=v}l={cells:{}};l.cells[EditorUi.DIFF_INSERT]=[];l.cells[EditorUi.DIFF_UPDATE]={};l.inserted={};this.resolveOwnInsertedCells(b.cells[EditorUi.DIFF_INSERT],n,l);this.resolveOwnUpdatedCells(b.cells[EditorUi.DIFF_UPDATE],n,e,l);null==c[EditorUi.DIFF_UPDATE]&&(c[EditorUi.DIFF_UPDATE]={});delete l.inserted;c[EditorUi.DIFF_UPDATE][f]=l}};EditorUi.prototype.resolveOwnInsertedCells=function(b,e,f){if(null!=b)for(var c=0;c<b.length;c++){var l=b[c];null!=l&&(this.adoptParentCell(l.id,null,e,f),this.adoptTerminalCell(l.id,l,e,!0,f),this.adoptTerminalCell(l.id,l,e,!1,f))}};EditorUi.prototype.resolveOwnUpdatedCells=function(b,e,f,c){if(null!=b)for(var l in b){var n=e[l];null!=n?(c.inserted[l]||(c.cells[EditorUi.DIFF_INSERT].push(n),c.inserted[l]=!0),c.cells[EditorUi.DIFF_UPDATE][l]=b[l]):null!=f&&(n=f[l],null!=n&&(this.adoptParentCell(l,n,e,c),this.adoptTerminalCell(l,n,e,!0,c,l),this.adoptTerminalCell(l,n,e,!1,c,l)))}};EditorUi.prototype.adoptParentCell=function(b,e,f,c){var l=f[b],n=null!=e?e.parent:null!=l?l.parent:null;null!=n&&this.adoptParentCell(n,null,f,c);null!=l?c.inserted[b]||(c.cells[EditorUi.DIFF_INSERT].push(l),c.inserted[b]=!0):null!=e&&(null==c.cells[EditorUi.DIFF_UPDATE][b]&&(c.cells[EditorUi.DIFF_UPDATE][b]={}),c.cells[EditorUi.DIFF_UPDATE][b]=e)};@@ -13661,7 +13662,7 @@ DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatchee=c}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};DrawioFileSync.prototype.scheduleCleanup=function(b){var e=Math.min(15,Math.floor(this.file.getSize()/5E6));e=0==b?0:this.cleanupDelay+1E3*e;var f=this.cleanupThread;if(1!=b||null!=this.cleanupThread)window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanup(null,mxUtils.bind(this,function(c){this.file.handleFileError(c)}))}),e);EditorUi.debug("DrawioFileSync.scheduleCleanup",[this],"lazy",b,"delay",e,"prev",f,"thread",this.cleanupThread)};DrawioFileSync.prototype.cleanup=function(b,e,f){var c=this.cleanupThread;window.clearTimeout(this.cleanupThread);this.cleanupThread=null;if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var l=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.cleanup",[this],"thread",c,"patches",l,"checkFile",f,"checksum",this.ui.getHashValueForPages(this.ui.pages));-this.file.ignorePatches(l)||this.file.patch(l);f?this.file.getLatestVersion(mxUtils.bind(this,function(n){try{if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()){var p=n.getShadowPages();l=[this.ui.diffPages(this.ui.pages,p),this.ui.diffPages(p,this.file.ownPages)];this.file.ignorePatches(l)||this.file.patch(l);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",n,"patches",l)}null!=b&&b()}catch(u){null!=e&&e(u)}}),e):(document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||+this.file.ignorePatches(l)||this.file.patch(l);f?this.file.getLatestVersion(mxUtils.bind(this,function(n){try{if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()){var p=n.getShadowPages();l=[this.ui.diffPages(this.ui.pages,p),this.ui.diffPages(p,this.file.ownPages)];this.file.ignorePatches(l)||this.file.patch(l);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",n,"patches",l)}null!=b&&b()}catch(v){null!=e&&e(v)}}),e):(document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||this.testChecksum(),null!=b&&b())}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",f,"modified",this.file.isModified()))};DrawioFileSync.prototype.testChecksum=function(){var b=this.ui.getHashValueForPages(this.ui.pages),e=this.file.getCurrentRevisionId();this.file.getLatestVersion(mxUtils.bind(this,function(f){if(!document.hidden){var c=this.ui.getHashValueForPages(f.getShadowPages()),l=f.getDescriptorChecksum(f.getDescriptor()),n=f.getCurrentRevisionId();EditorUi.debug("DrawioFileSync.testChecksum","local",[this.file],"modified",this.file.isModified(),"inConflictState",this.file.inConflictState,"autosaveThread",this.file.autosaveThread,"savingFile",this.file.savingFile,"localFileWasChanged",this.localFileWasChanged,"remoteFileChanged",this.remoteFileChanged,"cleanup",this.cleanupThread,"checksum",b);EditorUi.debug("DrawioFileSync.testChecksum","remote",[f],"rev",n==e,"desc",l==c,"checksum",c);c!=b?(EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums do not match"),this.ui.alert("Checksums do not match")):EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums match")}}),mxUtils.bind(this,function(f){EditorUi.debug("DrawioFileSync.testChecksum",@@ -13671,9 +13672,9 @@ DrawioFileSync.prototype.patchRealtime=function(b,e,f,c){var l=null;if(this.file"all",l,"local",n,"applied",p,"immediate",c)}return l};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),e=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,e,!0);this.snapshot=b;var f=this.ui.resolveCrossReferences(e,this.ui.diffPages(this.file.ownPages,this.ui.pages));this.file.ownPages=this.ui.patchPages(this.file.ownPages,f,!0);this.isRealtimeActive()&&this.doSendLocalChanges([f,e])}this.localFileWasChanged=!1}catch(c){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),b,c)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};-DrawioFileSync.prototype.merge=function(b,e,f,c,l,n,p){try{this.file.stats.merged++;this.lastModified=new Date;var u=this.file.getDescriptorRevisionId(f);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var F=this.ui.clonePages(this.file.getShadowPages()),H=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(F,this.ui.pages):null,E=this.file.isRealtime()?this.ui.diffPages(F,this.file.ownPages):null;F=this.ui.applyPatches(F,b);var K=null==e?null:this.ui.getHashValueForPages(F);-EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",H,"pending",E,"checksum",e,"current",K,"valid",e==K,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",u,"etag",this.file.getDescriptorEtag(f),"immediate",p);if(null!=e&&e!=K){this.reload(mxUtils.bind(this,function(){null!=c&&c()}),mxUtils.bind(this,function(){null!=l&&l()}),n,null,p);return}this.file.setShadowPages(F);null==this.patchRealtime(b,null,E,p)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?-H:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),f);null!=c&&c(!0)}catch(k){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=l&&l(k);try{var d=this.file.getCurrentUser(),g=null!=d?d.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),g,k)}catch(v){}}};+DrawioFileSync.prototype.merge=function(b,e,f,c,l,n,p){try{this.file.stats.merged++;this.lastModified=new Date;var v=this.file.getDescriptorRevisionId(f);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var F=this.ui.clonePages(this.file.getShadowPages()),H=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(F,this.ui.pages):null,E=this.file.isRealtime()?this.ui.diffPages(F,this.file.ownPages):null;F=this.ui.applyPatches(F,b);var K=null==e?null:this.ui.getHashValueForPages(F);+EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",H,"pending",E,"checksum",e,"current",K,"valid",e==K,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",v,"etag",this.file.getDescriptorEtag(f),"immediate",p);if(null!=e&&e!=K){this.reload(mxUtils.bind(this,function(){null!=c&&c()}),mxUtils.bind(this,function(){null!=l&&l()}),n,null,p);return}this.file.setShadowPages(F);null==this.patchRealtime(b,null,E,p)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?+H:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),f);null!=c&&c(!0)}catch(k){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=l&&l(k);try{var d=this.file.getCurrentUser(),g=null!=d?d.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),g,k)}catch(u){}}};DrawioFileSync.prototype.fileChanged=function(b,e,f,c,l){var n=window.setTimeout(mxUtils.bind(this,function(){null!=f&&f()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",c,"immediate",l,"remoteFileChanged",this.remoteFileChanged,"valid",this.isValidState()),this.isValidState()?(this.remoteFileChanged=!1,this.file.loadPatchDescriptor(mxUtils.bind(this,function(p){null!=f&&f()||(this.isValidState()?this.catchup(p,b,e,f,l):null!=e&&e())}),e)):null!=e&&e())}),c?this.cacheReadyDelay:0);return this.notifyThread=n};DrawioFileSync.prototype.fastForward=function(b){this.file.patchDescriptor(this.file.getDescriptor(),b);this.file.setShadowPages(this.ui.clonePages(this.ui.pages));this.file.theirPages=this.ui.clonePages(this.ui.pages);var e=this.file.ownPages;this.file.ownPages=this.ui.clonePages(this.ui.pages);for(var f=0;f<this.file.ownPages.length;f++)null!=e[f]&&this.ui.getHashValueForPages([this.file.ownPages[f]])!=this.ui.getHashValueForPages([e[f]])&&(this.file.ownPages[f].needsUpdate=!0);e=this.cleanupThread;window.clearTimeout(this.cleanupThread);@@ -13681,19 +13682,19 @@ this.cleanupThread=null;"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.fastDrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};DrawioFileSync.prototype.catchup=function(b,e,f,c,l){if(null!=b&&(null==c||!c())){var n=this.file.getCurrentRevisionId(),p=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",n,"to",p,"immediate",l,"valid",this.isValidState());if(n==p)this.file.patchDescriptor(this.file.getDescriptor(),b),"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.catchup",[this],"up to date","cleanup",this.cleanupThread,"checksum",this.ui.getHashValueForPages(this.ui.pages)),-document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=e&&e(!0);else if(this.isValidState()){var u=this.file.getDescriptorChecksum(b),F=this.file.getDescriptorSecret(b);if(null!=u&&u==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=e&&e(!0);else if(Editor.enableRealtimeCache&&null!=F&&"1"!=urlParams.lockdown){var H=0,E=!1,K=mxUtils.bind(this,function(){if(null==c||!c())if(n!=this.file.getCurrentRevisionId())null!=e&&+document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=e&&e(!0);else if(this.isValidState()){var v=this.file.getDescriptorChecksum(b),F=this.file.getDescriptorSecret(b);if(null!=v&&v==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=e&&e(!0);else if(Editor.enableRealtimeCache&&null!=F&&"1"!=urlParams.lockdown){var H=0,E=!1,K=mxUtils.bind(this,function(){if(null==c||!c())if(n!=this.file.getCurrentRevisionId())null!=e&&e(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;this.reload(e,f,c,null,l)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(n)+"&to="+encodeURIComponent(p)+(null!=F?"&secret="+encodeURIComponent(F):""),mxUtils.bind(this,function(k){this.file.stats.bytesReceived+=k.getText().length;window.clearTimeout(g);if(d&&(null==c||!c()))if(n!=this.file.getCurrentRevisionId())null!=-e&&e(!0);else if(this.isValidState()){var v=null,t=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[k],"status",k.getStatus(),"cacheReadyRetryCount",H,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=k.getStatus()&&299>=k.getStatus()&&0<k.getText().length)try{var x=JSON.parse(k.getText());if(null!=x&&0<x.length)for(var A=0;A<x.length;A++){var J=this.stringToObject(x[A]);if(J.v>DrawioFileSync.PROTOCOL){E=!0;t=[];break}else if(J.v===DrawioFileSync.PROTOCOL&&null!=J.d)v=J.d.checksum,-t.push(J.d.patch);else{E=!0;t=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[x],"status",E?"failed":"ok","temp",t,"checksum",v)}catch(D){t=[],null!=window.console&&"1"==urlParams.test&&console.log(D)}try{0<t.length?(this.file.stats.cacheHits++,this.merge(t,v,b,e,f,c,l)):H<=this.maxCacheReadyRetries-1&&!E&&401!=k.getStatus()&&503!=k.getStatus()&&410!=k.getStatus()?(H++,this.file.stats.cacheMiss++,window.setTimeout(K,(H+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,+e&&e(!0);else if(this.isValidState()){var u=null,t=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[k],"status",k.getStatus(),"cacheReadyRetryCount",H,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=k.getStatus()&&299>=k.getStatus()&&0<k.getText().length)try{var x=JSON.parse(k.getText());if(null!=x&&0<x.length)for(var A=0;A<x.length;A++){var J=this.stringToObject(x[A]);if(J.v>DrawioFileSync.PROTOCOL){E=!0;t=[];break}else if(J.v===DrawioFileSync.PROTOCOL&&null!=J.d)u=J.d.checksum,+t.push(J.d.patch);else{E=!0;t=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[x],"status",E?"failed":"ok","temp",t,"checksum",u)}catch(D){t=[],null!=window.console&&"1"==urlParams.test&&console.log(D)}try{0<t.length?(this.file.stats.cacheHits++,this.merge(t,u,b,e,f,c,l)):H<=this.maxCacheReadyRetries-1&&!E&&401!=k.getStatus()&&503!=k.getStatus()&&410!=k.getStatus()?(H++,this.file.stats.cacheMiss++,window.setTimeout(K,(H+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(e,f,c,null,l))}catch(D){null!=f&&f(D)}}else null!=f&&f()}),f)}else null!=f&&f()});window.setTimeout(K,this.cacheReadyDelay)}else this.reload(e,f,c,null,l)}else null!=f&&f()}};DrawioFileSync.prototype.reload=function(b,e,f,c,l){EditorUi.debug("DrawioFileSync.reload",[this],"immediate",l);this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(n){null!=e&&e(n)}),f,c,l)};DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var e=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),f=this.file.getCurrentRevisionId(),c=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(f)+"&msg="+encodeURIComponent(e)+"&data="+encodeURIComponent(c));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",f)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};DrawioFileSync.prototype.createToken=function(b,e,f){var c=!0,l=window.setTimeout(mxUtils.bind(this,function(){c=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(n){window.clearTimeout(l);c&&(200<=n.getStatus()&&299>=n.getStatus()?e(n.getText()):f({code:n.getStatus(),message:"Token Error "+n.getStatus()}))}),f)};DrawioFileSync.prototype.fileSaving=function(){this.file.isOptimisticSync()&&this.notify(this.createMessage({m:Date.now(),type:"optimistic"}));EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])};-DrawioFileSync.prototype.fileSaved=function(b,e,f,c,l,n){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var p=this.file.getDescriptorSecret(this.file.getDescriptor()),u=this.createMessage({m:this.lastModified.getTime()}),F=this.file.getDescriptorRevisionId(e),H=this.file.getCurrentRevisionId();if(null!=p&&null!=l&&+DrawioFileSync.prototype.fileSaved=function(b,e,f,c,l,n){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var p=this.file.getDescriptorSecret(this.file.getDescriptor()),v=this.createMessage({m:this.lastModified.getTime()}),F=this.file.getDescriptorRevisionId(e),H=this.file.getCurrentRevisionId();if(null!=p&&null!=l&&"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var E=this.ui.diffPages(this.file.getShadowPages(),b);e=this.file.getDescriptorSecret(e);n=null!=n?n:this.ui.getHashValueForPages(b);var K=this.objectToString(this.createMessage({patch:E,checksum:n}));this.file.stats.bytesSent+=K.length;this.file.stats.msgSent++;var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+-"&from="+encodeURIComponent(F)+"&to="+encodeURIComponent(H)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(u)))+(null!=p?"&secret="+encodeURIComponent(p):"")+(null!=e?"&last-secret="+encodeURIComponent(e):"")+(K.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(K):"")+(null!=l?"&token="+encodeURIComponent(l):""),mxUtils.bind(this,function(k){window.clearTimeout(g);d&&(200<=k.getStatus()&&299>=k.getStatus()?(Editor.p2pSyncNotify&&this.notify(u),null!=f&&f()):c({message:mxResources.get("realtimeCollaboration")+-(0!=k.getStatus()?": "+k.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",F,"to",H,"etag",this.file.getCurrentEtag(),"diff",E,K.length,"bytes","msg",u,"checksum",n)}else this.notify(u),null!=f&&f(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",F,"to",H,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};+"&from="+encodeURIComponent(F)+"&to="+encodeURIComponent(H)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(v)))+(null!=p?"&secret="+encodeURIComponent(p):"")+(null!=e?"&last-secret="+encodeURIComponent(e):"")+(K.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(K):"")+(null!=l?"&token="+encodeURIComponent(l):""),mxUtils.bind(this,function(k){window.clearTimeout(g);d&&(200<=k.getStatus()&&299>=k.getStatus()?(Editor.p2pSyncNotify&&this.notify(v),null!=f&&f()):c({message:mxResources.get("realtimeCollaboration")++(0!=k.getStatus()?": "+k.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",F,"to",H,"etag",this.file.getCurrentEtag(),"diff",E,K.length,"bytes","msg",v,"checksum",n)}else this.notify(v),null!=f&&f(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",F,"to",H,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};DrawioFileSync.prototype.fileConflict=function(b,e,f){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,e,f):this.fileChanged(e,f)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};DrawioFileSync.prototype.stop=function(){null!=this.pusher?(null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null),EditorUi.debug("DrawioFileSync.stop",[this])):null!=this.polling&&(this.polling.stop(),@@ -13705,13 +13706,13 @@ Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-smxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(b,e,f,c,l){};mxAsyncCanvas.prototype.setAlpha=function(b){this.state.alpha=b};mxAsyncCanvas.prototype.setFontColor=function(b){this.state.fontColor=b};mxAsyncCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxAsyncCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxAsyncCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};mxAsyncCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxAsyncCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxAsyncCanvas.prototype.rect=function(b,e,f,c){};mxAsyncCanvas.prototype.roundrect=function(b,e,f,c,l,n){};mxAsyncCanvas.prototype.ellipse=function(b,e,f,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};-mxAsyncCanvas.prototype.image=function(b,e,f,c,l,n,p,u){l=this.rewriteImageSource(l);b=this.htmlCanvas.images[l];null==b&&(b=new Image,b.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),b.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[l]=b,b.src=l)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};-mxAsyncCanvas.prototype.text=function(b,e,f,c,l,n,p,u,F,H,E,K){if(null!=l&&0!=l.length&&(b=this.state.scale,"html"==F&&"function"===typeof html2canvas)){this.incWaitCounter();var d=this.canvasIndex++;html2canvas(l,{onrendered:mxUtils.bind(this,function(g){this.htmlCanvas.subCanvas[d]=g;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;+mxAsyncCanvas.prototype.image=function(b,e,f,c,l,n,p,v){l=this.rewriteImageSource(l);b=this.htmlCanvas.images[l];null==b&&(b=new Image,b.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),b.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[l]=b,b.src=l)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};+mxAsyncCanvas.prototype.text=function(b,e,f,c,l,n,p,v,F,H,E,K){if(null!=l&&0!=l.length&&(b=this.state.scale,"html"==F&&"function"===typeof html2canvas)){this.incWaitCounter();var d=this.canvasIndex++;html2canvas(l,{onrendered:mxUtils.bind(this,function(g){this.htmlCanvas.subCanvas[d]=g;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(b){b=b.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,f,c,l){return f+f+c+c+l+l});return(b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b))?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(b){this.state.scale*=b;this.state.strokeWidth*=b;this.ctx.scale(b,b)};mxJsCanvas.prototype.translate=function(b,e){this.state.dx+=b;this.state.dy+=e;this.ctx.translate(b,e)};mxJsCanvas.prototype.rotate=function(b,e,f,c,l){c-=this.state.dx;l-=this.state.dy;this.ctx.translate(c,l);(e||f)&&this.ctx.scale(e?-1:1,f?-1:1);this.ctx.rotate(b*this.M_RAD_PER_DEG);this.ctx.translate(-c,-l)};mxJsCanvas.prototype.setAlpha=function(b){this.state.alpha=b;this.ctx.globalAlpha=b};mxJsCanvas.prototype.setFillColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fillColor=b;this.state.gradientColor=null;this.ctx.fillStyle=b};-mxJsCanvas.prototype.setGradient=function(b,e,f,c,l,n,p,u,F){f=this.ctx.createLinearGradient(0,c,0,c+n);c=this.state;c.fillColor=b;c.fillAlpha=null!=u?u:1;c.gradientColor=e;c.gradientAlpha=null!=F?F:1;c.gradientDirection=p;b=this.hexToRgb(b);e=this.hexToRgb(e);null!=b&&f.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=e&&f.addColorStop(1,"rgba("+e.r+","+e.g+","+e.b+","+c.gradientAlpha+")");this.ctx.fillStyle=f};+mxJsCanvas.prototype.setGradient=function(b,e,f,c,l,n,p,v,F){f=this.ctx.createLinearGradient(0,c,0,c+n);c=this.state;c.fillColor=b;c.fillAlpha=null!=v?v:1;c.gradientColor=e;c.gradientAlpha=null!=F?F:1;c.gradientDirection=p;b=this.hexToRgb(b);e=this.hexToRgb(e);null!=b&&f.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=e&&f.addColorStop(1,"rgba("+e.r+","+e.g+","+e.b+","+c.gradientAlpha+")");this.ctx.fillStyle=f};mxJsCanvas.prototype.setStrokeColor=function(b){null!=b&&(b==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=b,this.state.strokeColor=b))};mxJsCanvas.prototype.setStrokeWidth=function(b){this.ctx.lineWidth=b};mxJsCanvas.prototype.setDashed=function(b){if(this.state.dashed=b){b=this.state.dashPattern.split(" ");for(var e=0;e<b.length;e++)b[e]=parseInt(b[e],10);this.setLineDash(b)}else this.setLineDash([0])};mxJsCanvas.prototype.setLineDash=function(b){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(b)}catch(e){}};mxJsCanvas.prototype.setDashPattern=function(b){this.state.dashPattern=b;if(this.state.dashed){b=b.split(" ");for(var e=0;e<b.length;e++)b[e]=parseInt(b[e],10);this.ctx.setLineDash(b)}};mxJsCanvas.prototype.setLineCap=function(b){this.ctx.lineCap=b};mxJsCanvas.prototype.setLineJoin=function(b){this.ctx.lineJoin=b};mxJsCanvas.prototype.setMiterLimit=function(b){this.ctx.lineJoin=b};mxJsCanvas.prototype.setFontColor=function(b){this.ctx.fillStyle=b};mxJsCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxJsCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxJsCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};@@ -13721,9 +13722,9 @@ mxJsCanvas.prototype.setShadowOffset=function(b,e){this.state.shadowDx=b;this.stmxJsCanvas.prototype.arcTo=function(b,e,f,c,l,n,p){b=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,b,e,f,c,l,n,p);if(null!=b)for(e=0;e<b.length;e+=6)this.curveTo(b[e],b[e+1],b[e+2],b[e+3],b[e+4],b[e+5])};mxJsCanvas.prototype.curveTo=function(b,e,f,c,l,n){this.ctx.bezierCurveTo(b,e,f,c,l,n);this.lastMoveX=l;this.lastMoveY=n};mxJsCanvas.prototype.rect=function(b,e,f,c){this.begin();this.moveTo(b,e);this.lineTo(b+f,e);this.lineTo(b+f,e+c);this.lineTo(b,e+c);this.close()};mxJsCanvas.prototype.roundrect=function(b,e,f,c,l,n){this.begin();this.moveTo(b+l,e);this.lineTo(b+f-l,e);this.quadTo(b+f,e,b+f,e+n);this.lineTo(b+f,e+c-n);this.quadTo(b+f,e+c,b+f-l,e+c);this.lineTo(b+l,e+c);this.quadTo(b,e+c,b,e+c-n);this.lineTo(b,e+n);this.quadTo(b,e,b+l,e)};mxJsCanvas.prototype.ellipse=function(b,e,f,c){this.ctx.save();this.ctx.translate(b+f/2,e+c/2);this.ctx.scale(f/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};mxJsCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};-mxJsCanvas.prototype.image=function(b,e,f,c,l,n,p,u){l=this.rewriteImageSource(l);l=this.images[l];if(null!=l&&0<l.height&&0<l.width){var F=this.ctx;F.save();if(n){n=l.width;var H=l.height,E=Math.min(f/n,c/H);b+=(f-n*E)/2;e+=(c-H*E)/2;f=n*E;c=H*E}p&&(F.translate(2*b+f,0),F.scale(-1,1));u&&(F.translate(0,2*e+c),F.scale(1,-1));F.drawImage(l,b,e,f,c);F.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};+mxJsCanvas.prototype.image=function(b,e,f,c,l,n,p,v){l=this.rewriteImageSource(l);l=this.images[l];if(null!=l&&0<l.height&&0<l.width){var F=this.ctx;F.save();if(n){n=l.width;var H=l.height,E=Math.min(f/n,c/H);b+=(f-n*E)/2;e+=(c-H*E)/2;f=n*E;c=H*E}p&&(F.translate(2*b+f,0),F.scale(-1,1));v&&(F.translate(0,2*e+c),F.scale(1,-1));F.drawImage(l,b,e,f,c);F.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var b=this.ctx.shadowColor,e=this.ctx.shadowOffsetX,f=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=b;this.ctx.shadowOffsetX=e;this.ctx.shadowOffsetY=f}else this.ctx.fill(),this.ctx.stroke()};-mxJsCanvas.prototype.text=function(b,e,f,c,l,n,p,u,F,H,E,K){if(null!=l&&0!=l.length){f=this.state.scale;0!=K&&(this.ctx.translate(Math.round(b),Math.round(e)),this.ctx.rotate(K*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-e)));if("html"==F){l=this.subCanvas[this.canvasIndex++];F=l.height;K=l.width;switch(p){case mxConstants.ALIGN_MIDDLE:e-=F/2/f;break;case mxConstants.ALIGN_BOTTOM:e-=F/f}switch(n){case mxConstants.ALIGN_CENTER:b-=K/2/f;break;case mxConstants.ALIGN_RIGHT:b-=K/f}this.ctx.save();+mxJsCanvas.prototype.text=function(b,e,f,c,l,n,p,v,F,H,E,K){if(null!=l&&0!=l.length){f=this.state.scale;0!=K&&(this.ctx.translate(Math.round(b),Math.round(e)),this.ctx.rotate(K*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-e)));if("html"==F){l=this.subCanvas[this.canvasIndex++];F=l.height;K=l.width;switch(p){case mxConstants.ALIGN_MIDDLE:e-=F/2/f;break;case mxConstants.ALIGN_BOTTOM:e-=F/f}switch(n){case mxConstants.ALIGN_CENTER:b-=K/2/f;break;case mxConstants.ALIGN_RIGHT:b-=K/f}this.ctx.save();if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(l.width/f),Math.round(l.height/f))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(l.width/f),Math.round(l.height/f)));this.ctx.scale(1/f,1/f);this.ctx.drawImage(l,Math.round(b*f),Math.round(e*f))}else{this.ctx.save();this.updateFont();K=document.createElement("div");K.innerHTML=l;K.style.position="absolute";K.style.top="-9999px";K.style.left="-9999px";K.style.fontFamily=this.state.fontFamily;K.style.fontWeight="bold";K.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(K);F=[K.offsetWidth,K.offsetHeight];document.body.removeChild(K);l=l.split("\n");K=F[1];this.ctx.textBaseline="top";F=e;switch(p){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline="middle";e-=(l.length-1)*K/2;F=e-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",e-=K*(l.length-1),F=e-this.state.fontSize}p=[];K=[];for(f=0;f<l.length;f++)K[f]=b,p[f]=this.ctx.measureText(l[f]).width,null!=n&&n!=mxConstants.ALIGN_LEFT&&(K[f]-=p[f],n==mxConstants.ALIGN_CENTER&&(K[f]+=p[f]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=K[0];n=p[0];for(f=1;f<l.length;f++)b=Math.min(b,K[f]),n=Math.max(n,p[f]);this.ctx.save();@@ -13736,8 +13737,8 @@ DriveFile.prototype.isConflict=function(b){return null!=b&&null!=b.error&&412==bDriveFile.prototype.getFolderUrl=function(){return null!=this.desc.labels&&this.desc.labels.trashed?"https://drive.google.com/drive/trash":null!=this.desc.parents&&0<this.desc.parents.length?"https://drive.google.com/drive/folders/"+this.desc.parents[0].id:null};DriveFile.prototype.getPublicUrl=function(b){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsAllDrives=true"},mxUtils.bind(this,function(e){if(null!=e&&null!=e.items)for(var f=0;f<e.items.length;f++)if("anyoneWithLink"===e.items[f].id||"anyone"===e.items[f].id){b(this.desc.webContentLink);return}b(null)}),mxUtils.bind(this,function(){b(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(b,e,f,c,l){DrawioFile.prototype.save.apply(this,[b,mxUtils.bind(this,function(){this.saveFile(null,b,e,f,c,l)}),f,c,l])};-DriveFile.prototype.saveFile=function(b,e,f,c,l,n){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(p,u){var F=mxUtils.bind(this,function(H,E){try{var K=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,E,mxUtils.bind(this,function(d,g,k,v){try{this.savingFile=!1,0!=d?(this.setModified(this.getShadowModified()),e&&(this.lastAutosaveRevision=(new Date).getTime()),-this.autosaveDelay=Math.round(Math.min(1E4,Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=d,this.fileSaved(g,K,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f(d)}),c,u,k,v)):null!=c&&c(d)}catch(t){if(this.savingFile=!1,null!=c)c(t);else throw t;}}),mxUtils.bind(this,function(d,g){try{this.savingFile=!1,this.isConflict(d)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(g,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,+DriveFile.prototype.saveFile=function(b,e,f,c,l,n){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(p,v){var F=mxUtils.bind(this,function(H,E){try{var K=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,E,mxUtils.bind(this,function(d,g,k,u){try{this.savingFile=!1,0!=d?(this.setModified(this.getShadowModified()),e&&(this.lastAutosaveRevision=(new Date).getTime()),+this.autosaveDelay=Math.round(Math.min(1E4,Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=d,this.fileSaved(g,K,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f(d)}),c,v,k,u)):null!=c&&c(d)}catch(t){if(this.savingFile=!1,null!=c)c(t);else throw t;}}),mxUtils.bind(this,function(d,g){try{this.savingFile=!1,this.isConflict(d)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(g,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();this.setShadowModified(!1);F(H,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(d)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}}),l,l,H,null,p)}catch(d){if(this.savingFile=!1,null!=c)c(d);else throw d;}});F(n,e)}))):null!=f&&f()}catch(p){if(null!=c)c(p);else throw p;}};DriveFile.prototype.copyFile=function(b,e){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,b,e)}catch(f){e(f)}}),e,!0)};DriveFile.prototype.makeCopy=function(b,e,f){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,f),mxUtils.bind(this,function(c){this.desc=c;this.ui.spinner.stop();this.setModified(!1);this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=e&&e()}))};DriveFile.prototype.saveAs=function(b,e,f){this.ui.drive.copyFile(this.getId(),b,e,f)};@@ -13746,13 +13747,13 @@ DriveFile.prototype.move=function(b,e,f){this.ui.drive.moveFile(this.getId(),b,mDriveFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&this.desc.editable};DriveFile.prototype.isSyncSupported=function(){return!0};DriveFile.prototype.isRealtimeSupported=function(){return!0};DriveFile.prototype.isRealtimeOptional=function(){return null!=this.sync&&this.sync.isConnected()};DriveFile.prototype.setRealtimeEnabled=function(b,e,f){null!=this.sync?this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/properties?alt=json&supportsAllDrives=true",method:"POST",contentType:"application/json; charset=UTF-8",params:{key:"collaboration",value:b?"enabled":"0"!=urlParams["fast-sync"]?"disabled":""}},mxUtils.bind(this,function(){this.loadDescriptor(mxUtils.bind(this,function(c){null!=c?(this.sync.descriptorChanged(this.getCurrentEtag()),this.sync.updateDescriptor(c),e()):f()}),f)}),f):f()};DriveFile.prototype.isRealtimeEnabled=function(){var b=this.ui.drive.getCustomProperty(this.desc,"collaboration");return DrawioFile.prototype.isRealtimeEnabled.apply(this,arguments)&&"disabled"!=b||Editor.enableRealtime&&"enabled"==b};DriveFile.prototype.isRevisionHistorySupported=function(){return!0};-DriveFile.prototype.getRevisions=function(b,e){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/revisions"},mxUtils.bind(this,function(f){for(var c=0;c<f.items.length;c++)mxUtils.bind(this,function(l){l.title=l.originalFilename;l.getXml=mxUtils.bind(this,function(n,p){this.ui.drive.getXmlFile(l,mxUtils.bind(this,function(u){n(u.getData())}),p)});l.getUrl=mxUtils.bind(this,function(n){return this.ui.getUrl(window.location.pathname+"?rev="+l.id+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=+DriveFile.prototype.getRevisions=function(b,e){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/revisions"},mxUtils.bind(this,function(f){for(var c=0;c<f.items.length;c++)mxUtils.bind(this,function(l){l.title=l.originalFilename;l.getXml=mxUtils.bind(this,function(n,p){this.ui.drive.getXmlFile(l,mxUtils.bind(this,function(v){n(v.getData())}),p)});l.getUrl=mxUtils.bind(this,function(n){return this.ui.getUrl(window.location.pathname+"?rev="+l.id+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=n?"&page="+n:""))+window.location.hash})})(f.items[c]);b(f.items)}),e)};DriveFile.prototype.getLatestVersion=function(b,e){this.ui.drive.getFile(this.getId(),b,e,!0)};DriveFile.prototype.getChannelId=function(){var b=this.ui.drive.getCustomProperty(this.desc,"channel");null!=b&&(b="G-"+this.getId()+"."+b);return b};DriveFile.prototype.getChannelKey=function(){return this.ui.drive.getCustomProperty(this.desc,"key")};DriveFile.prototype.getLastModifiedDate=function(){return new Date(this.desc.modifiedDate)};DriveFile.prototype.getDescriptor=function(){return this.desc};DriveFile.prototype.setDescriptor=function(b){this.desc=b};DriveFile.prototype.getDescriptorChecksum=function(b){var e=this.ui.drive.getCustomProperty(b,"checksum");b=this.getDescriptorSecret(b);var f=null;null!=e&&null!=b&&(tokens=e.split(":"),2==tokens.length&&tokens[0]==b&&(f=tokens[1]));return f};DriveFile.prototype.getDescriptorSecret=function(b){return this.ui.drive.getCustomProperty(b,"secret")};DriveFile.prototype.setDescriptorRevisionId=function(b,e){b.headRevisionId=e};DriveFile.prototype.getDescriptorRevisionId=function(b){return b.headRevisionId};DriveFile.prototype.getDescriptorEtag=function(b){return b.etag};DriveFile.prototype.setDescriptorEtag=function(b,e){b.etag=e};DriveFile.prototype.loadPatchDescriptor=function(b,e){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"?supportsAllDrives=true&fields="+this.ui.drive.catchupFields},mxUtils.bind(this,function(f){b(f)}),e)};DriveFile.prototype.patchDescriptor=function(b,e){b.headRevisionId=e.headRevisionId;b.modifiedDate=e.modifiedDate;DrawioFile.prototype.patchDescriptor.apply(this,arguments)};DriveFile.prototype.loadDescriptor=function(b,e){this.ui.drive.loadDescriptor(this.getId(),b,e)};DriveFile.prototype.commentsSupported=function(){return!0};-DriveFile.prototype.getComments=function(b,e){function f(l,n,p){if(n.deleted)return null;p=new DriveComment(l,n.commentId||n.replyId,n.content,n.modifiedDate,n.createdDate,"resolved"==n.status,n.author.isAuthenticatedUser?c:new DrawioUser(n.author.permissionId,n.author.emailAddress,n.author.displayName,n.author.picture.url),p);for(var u=0;null!=n.replies&&u<n.replies.length;u++)p.addReplyDirect(f(l,n.replies[u],n.commentId));return p}var c=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+-this.getId()+"/comments"},mxUtils.bind(this,function(l){for(var n=[],p=0;p<l.items.length;p++){var u=f(this,l.items[p]);null!=u&&n.push(u)}b(n)}),e)};DriveFile.prototype.addComment=function(b,e,f){b={content:b.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:b},mxUtils.bind(this,function(c){e(c.commentId)}),f)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};+DriveFile.prototype.getComments=function(b,e){function f(l,n,p){if(n.deleted)return null;p=new DriveComment(l,n.commentId||n.replyId,n.content,n.modifiedDate,n.createdDate,"resolved"==n.status,n.author.isAuthenticatedUser?c:new DrawioUser(n.author.permissionId,n.author.emailAddress,n.author.displayName,n.author.picture.url),p);for(var v=0;null!=n.replies&&v<n.replies.length;v++)p.addReplyDirect(f(l,n.replies[v],n.commentId));return p}var c=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"++this.getId()+"/comments"},mxUtils.bind(this,function(l){for(var n=[],p=0;p<l.items.length;p++){var v=f(this,l.items[p]);null!=v&&n.push(v)}b(n)}),e)};DriveFile.prototype.addComment=function(b,e,f){b={content:b.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:b},mxUtils.bind(this,function(c){e(c.commentId)}),f)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};DriveFile.prototype.newComment=function(b,e){return new DriveComment(this,null,b,Date.now(),Date.now(),!1,e)};DriveLibrary=function(b,e,f){DriveFile.call(this,b,e,f)};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(b,e,f){this.ui.drive.saveFile(this,b,mxUtils.bind(this,function(c){this.desc=c;null!=e&&e(c)}),f)};DriveLibrary.prototype.open=function(){};(function(){var b=null,e={};window.DriveClient=function(f,c){null==c&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(c=!0);mxEventSource.call(this);DrawioClient.call(this,f,"gDriveAuthInfo");this.isExtAuth=c;this.ui=f;this.xmlMimeType="application/vnd.jgraph.mxfile";this.mimeType="application/vnd.jgraph.mxfile.realtime";this.ui.editor.chromeless&&!this.ui.editor.editable&&"1"!=urlParams.rt&&"1"!=urlParams.extAuth&&(this.cookieName="gDriveViewerAuthInfo",this.token=this.getPersistentToken());this.appId=window.DRAWIO_GOOGLE_APP_ID||"671128082532";this.clientId=window.DRAWIO_GOOGLE_CLIENT_ID||"671128082532-jhphbq6d0e1gnsus9mn7vf8a6fjn10mp.apps.googleusercontent.com";this.mimeTypes=this.xmlMimeType+",application/mxe,application/mxr,application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy";f=JSON.parse(this.token);null!=f&&null!=f.current&&(this.userId=f.current.userId,this.authCalled=!1)};mxUtils.extend(DriveClient,mxEventSource);mxUtils.extend(DriveClient,DrawioClient);DriveClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"google";DriveClient.prototype.GDriveBaseUrl="https://www.googleapis.com/drive/v2";DriveClient.prototype.scopes=["https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive.install","https://www.googleapis.com/auth/userinfo.profile"];DriveClient.prototype.allFields="kind,id,parents,headRevisionId,etag,title,mimeType,modifiedDate,editable,copyable,canComment,labels,properties,downloadUrl,webContentLink,userPermission,fileSize";@@ -13760,90 +13761,90 @@ DriveClient.prototype.catchupFields="etag,headRevisionId,modifiedDate,properties"-").replace(/\//g,"_");DriveClient.prototype.placeholderMimeType="image/png";DriveClient.prototype.libraryMimeType="application/vnd.jgraph.mxlibrary";DriveClient.prototype.newAppHostname="app.diagrams.net";DriveClient.prototype.extension=".drawio";DriveClient.prototype.tokenRefreshInterval=0;DriveClient.prototype.lastTokenRefresh=0;DriveClient.prototype.maxRetries=5;DriveClient.prototype.staleEtagMaxRetries=4;DriveClient.prototype.coolOff=1E3;DriveClient.prototype.mimeTypeCheckCoolOff=6E4;DriveClient.prototype.user=null;DriveClient.prototype.sameWinAuthMode=!1;DriveClient.prototype.sameWinRedirectUrl=null;DriveClient.prototype.setUser=function(f){this.user=f;null==this.user?(this.userId=null,null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null)):this.userId=f.id;this.fireEvent(new mxEventObject("userChanged"))};DriveClient.prototype.setUserId=function(f){this.userId=f;null!=this.user&&this.user.id!=this.userId&&(this.user=null)};DriveClient.prototype.getUser=function(){return this.user};DriveClient.prototype.getUsersList=function(){var f=[],c=JSON.parse(this.getPersistentToken(!0)),l=null;if(null!=c){null!=c.current&&(l=c.current.userId,f.push(c[l].user),f[0].isCurrent=!0);for(var n in c)"current"!=n&&n!=l&&f.push(c[n].user)}return f};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();-this.setUser(null);b=null};DriveClient.prototype.execute=function(f){var c=mxUtils.bind(this,function(l){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(n,p){this.authorize(!1,mxUtils.bind(this,function(){null!=p&&p();f()}),mxUtils.bind(this,function(u){var F=null!=u.message?u.message:mxResources.get("cannotLogin");null!=u&&null!=u.error&&403==u.error.code&&null!=u.error.data&&0<u.error.data.length&&"domainPolicy"==u.error.data[0].reason&&(F=u.error.message);this.logout();this.ui.showError(mxResources.get("error"),-F,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),n)}))});this.authorize(!0,f,c)};DriveClient.prototype.executeRequest=function(f,c,l){try{var n=!0,p=null,u=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var F=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=f;null!=p&&window.clearTimeout(p);p=window.setTimeout(mxUtils.bind(this,-function(){n=!1;null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:F})}),this.ui.timeout);var H=null,E=!1;"string"===typeof f.params?H=f.params:null!=f.params&&(H=JSON.stringify(f.params),E=!0);var K=f.fullUrl||this.GDriveBaseUrl+f.url;E&&(K+=(0<K.indexOf("?")?"&":"?")+"alt=json");var d=new mxXmlRequest(K,H,f.method||"GET");d.setRequestHeaders=mxUtils.bind(this,function(g,k){if(null!=f.headers)for(var v in f.headers)g.setRequestHeader(v,f.headers[v]);else null!=f.contentType?-g.setRequestHeader("Content-Type",f.contentType):E&&g.setRequestHeader("Content-Type","application/json");g.setRequestHeader("Authorization","Bearer "+b)});d.send(mxUtils.bind(this,function(g){try{if(window.clearTimeout(p),n){try{var k=JSON.parse(g.getText())}catch(x){k=null}if(200<=g.getStatus()&&299>=g.getStatus())null!=c&&c(k);else{var v=null!=k&&null!=k.error?null!=k.error.data?k.error.data:k.error.errors:null,t=null!=v&&0<v.length?v[0].reason:null;null==l||null==k||null==k.error||-1!=k.error.code&&-(403!=k.error.code||"domainPolicy"!=t&&"The requested mime type change is forbidden."!=k.error.message)?null!=k&&null!=k.error&&(401==k.error.code||403==k.error.code&&"rateLimitExceeded"!=t)?403==k.error.code&&this.retryAuth||401==k.error.code&&this.retryAuth&&"authError"==t?(null!=l&&l(k),this.retryAuth=!1):(this.retryAuth=!0,this.execute(F)):null!=k&&null!=k.error&&412!=k.error.code&&404!=k.error.code&&400!=k.error.code&&this.currentRequest==f&&u<this.maxRetries?(u++,this.requestThread=window.setTimeout(F,-Math.round(Math.pow(2,u)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=l&&l(k):l(k)}}}catch(x){if(null!=l)l(x);else throw x;}}))}catch(g){if(null!=l)l(g);else throw g;}});null!=b&&this.authCalled?F():this.execute(F)}catch(H){if(null!=l)l(H);else throw H;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};-DriveClient.prototype.authorize=function(f,c,l,n,p){this.isExtAuth&&!f?window.parent.driveAuth(mxUtils.bind(this,function(u){this.updateAuthInfo(u,!0,!0,c,l)}),l):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(u){200<=u.getStatus()&&299>=u.getStatus()?this.authorizeStep2(u.getText(),f,c,l,n,p):null!=l&&l(u)}),l)};DriveClient.prototype.updateAuthInfo=function(f,c,l,n,p){b=f.access_token;delete f.access_token;f.expires=Date.now()+1E3*parseInt(f.expires_in);-f.remember=c;this.resetTokenRefresh(f);this.authCalled=!0;if(l||null==this.user){var u=JSON.stringify(f);this.updateUser(mxUtils.bind(this,function(){var F=JSON.parse(u);this.setPersistentToken(F,!c);null!=n&&n()}),p)}else null!=n&&(this.setPersistentToken(f,!c),n())};DriveClient.prototype.authorizeStep2=function(f,c,l,n,p,u){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var F=+this.setUser(null);b=null};DriveClient.prototype.execute=function(f){var c=mxUtils.bind(this,function(l){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(n,p){this.authorize(!1,mxUtils.bind(this,function(){null!=p&&p();f()}),mxUtils.bind(this,function(v){var F=null!=v.message?v.message:mxResources.get("cannotLogin");null!=v&&null!=v.error&&403==v.error.code&&null!=v.error.data&&0<v.error.data.length&&"domainPolicy"==v.error.data[0].reason&&(F=v.error.message);this.logout();this.ui.showError(mxResources.get("error"),+F,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),n)}))});this.authorize(!0,f,c)};DriveClient.prototype.executeRequest=function(f,c,l){try{var n=!0,p=null,v=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var F=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=f;null!=p&&window.clearTimeout(p);p=window.setTimeout(mxUtils.bind(this,+function(){n=!1;null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:F})}),this.ui.timeout);var H=null,E=!1;"string"===typeof f.params?H=f.params:null!=f.params&&(H=JSON.stringify(f.params),E=!0);var K=f.fullUrl||this.GDriveBaseUrl+f.url;E&&(K+=(0<K.indexOf("?")?"&":"?")+"alt=json");var d=new mxXmlRequest(K,H,f.method||"GET");d.setRequestHeaders=mxUtils.bind(this,function(g,k){if(null!=f.headers)for(var u in f.headers)g.setRequestHeader(u,f.headers[u]);else null!=f.contentType?+g.setRequestHeader("Content-Type",f.contentType):E&&g.setRequestHeader("Content-Type","application/json");g.setRequestHeader("Authorization","Bearer "+b)});d.send(mxUtils.bind(this,function(g){try{if(window.clearTimeout(p),n){try{var k=JSON.parse(g.getText())}catch(x){k=null}if(200<=g.getStatus()&&299>=g.getStatus())null!=c&&c(k);else{var u=null!=k&&null!=k.error?null!=k.error.data?k.error.data:k.error.errors:null,t=null!=u&&0<u.length?u[0].reason:null;null==l||null==k||null==k.error||-1!=k.error.code&&+(403!=k.error.code||"domainPolicy"!=t&&"The requested mime type change is forbidden."!=k.error.message)?null!=k&&null!=k.error&&(401==k.error.code||403==k.error.code&&"rateLimitExceeded"!=t)?403==k.error.code&&this.retryAuth||401==k.error.code&&this.retryAuth&&"authError"==t?(null!=l&&l(k),this.retryAuth=!1):(this.retryAuth=!0,this.execute(F)):null!=k&&null!=k.error&&412!=k.error.code&&404!=k.error.code&&400!=k.error.code&&this.currentRequest==f&&v<this.maxRetries?(v++,this.requestThread=window.setTimeout(F,+Math.round(Math.pow(2,v)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=l&&l(k):l(k)}}}catch(x){if(null!=l)l(x);else throw x;}}))}catch(g){if(null!=l)l(g);else throw g;}});null!=b&&this.authCalled?F():this.execute(F)}catch(H){if(null!=l)l(H);else throw H;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};+DriveClient.prototype.authorize=function(f,c,l,n,p){this.isExtAuth&&!f?window.parent.driveAuth(mxUtils.bind(this,function(v){this.updateAuthInfo(v,!0,!0,c,l)}),l):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(v){200<=v.getStatus()&&299>=v.getStatus()?this.authorizeStep2(v.getText(),f,c,l,n,p):null!=l&&l(v)}),l)};DriveClient.prototype.updateAuthInfo=function(f,c,l,n,p){b=f.access_token;delete f.access_token;f.expires=Date.now()+1E3*parseInt(f.expires_in);+f.remember=c;this.resetTokenRefresh(f);this.authCalled=!0;if(l||null==this.user){var v=JSON.stringify(f);this.updateUser(mxUtils.bind(this,function(){var F=JSON.parse(v);this.setPersistentToken(F,!c);null!=n&&n()}),p)}else null!=n&&(this.setPersistentToken(f,!c),n())};DriveClient.prototype.authorizeStep2=function(f,c,l,n,p,v){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var F=JSON.parse(this.getPersistentToken(!0));F&&null!=F.current&&(this.userId=F.current.userId)}if(c&&null==this.userId)null!=n&&n();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(E){try{if(200<=E.getStatus()&&299>=E.getStatus()){var K=JSON.parse(E.getText());this.updateAuthInfo(K,!0,!1,l,n)}else 0!=E.getStatus()&&this.logout(),null!=n&&n(E)}catch(d){if(null!=window.console&&console.log("DriveClient.authorizeStep2",d),null!=n)n(d);else throw d;}}),n);else{var H="https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(p?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f+(this.sameWinRedirectUrl?-"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(H),u=null):null==u?u=this.createAuthWin(H):u.location=H;null!=u?(window.onGoogleDriveCallback=mxUtils.bind(this,function(E,K){window.onGoogleDriveCallback=null;try{null==E?null!=n&&n({message:mxResources.get("accessDenied")}):this.updateAuthInfo(E,p,!0,l,n)}catch(d){null!=n&&n(d)}finally{null!=K&&K.close()}}),u.focus()):null!=n&&n({message:mxResources.get("allowPopups")})}}catch(E){if(null!=n)n(E);else throw E;+"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(H),v=null):null==v?v=this.createAuthWin(H):v.location=H;null!=v?(window.onGoogleDriveCallback=mxUtils.bind(this,function(E,K){window.onGoogleDriveCallback=null;try{null==E?null!=n&&n({message:mxResources.get("accessDenied")}):this.updateAuthInfo(E,p,!0,l,n)}catch(d){null!=n&&n(d)}finally{null!=K&&K.close()}}),v.focus()):null!=n&&n({message:mxResources.get("allowPopups")})}}catch(E){if(null!=n)n(E);else throw E;}};DriveClient.prototype.resetTokenRefresh=function(f){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);null!=f&&null==f.error&&0<f.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(f.expires_in),this.lastTokenRefresh=Date.now(),this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authorize(!0,mxUtils.bind(this,function(){}),mxUtils.bind(this,function(){}))}),900*f.expires_in))};DriveClient.prototype.checkToken=function(f){var c=-0<this.lastTokenRefresh;Date.now()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){f();c&&this.fireEvent(new mxEventObject("disconnected"))})):f()};DriveClient.prototype.updateUser=function(f,c){try{var l={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(n){try{var p=JSON.parse(n);this.executeRequest({url:"/about"},mxUtils.bind(this,function(u){var F=-mxResources.get("notAvailable"),H=F,E=null;null!=u&&null!=u.user&&(F=u.user.emailAddress,H=u.user.displayName,E=null!=u.user.picture?u.user.picture.url:null);this.setUser(new DrawioUser(p.id,F,H,E,p.locale));this.userId=p.id;null!=f&&f()}),c)}catch(u){null!=c&&c(u)}}),c,null,null,null,null,l)}catch(n){if(null!=c)c(n);else throw n;}};DriveClient.prototype.copyFile=function(f,c,l,n){null!=f&&null!=c&&this.executeRequest({url:"/files/"+f+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",+0<this.lastTokenRefresh;Date.now()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){f();c&&this.fireEvent(new mxEventObject("disconnected"))})):f()};DriveClient.prototype.updateUser=function(f,c){try{var l={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(n){try{var p=JSON.parse(n);this.executeRequest({url:"/about"},mxUtils.bind(this,function(v){var F=+mxResources.get("notAvailable"),H=F,E=null;null!=v&&null!=v.user&&(F=v.user.emailAddress,H=v.user.displayName,E=null!=v.user.picture?v.user.picture.url:null);this.setUser(new DrawioUser(p.id,F,H,E,p.locale));this.userId=p.id;null!=f&&f()}),c)}catch(v){null!=c&&c(v)}}),c,null,null,null,null,l)}catch(n){if(null!=c)c(n);else throw n;}};DriveClient.prototype.copyFile=function(f,c,l,n){null!=f&&null!=c&&this.executeRequest({url:"/files/"+f+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},l,n)};DriveClient.prototype.renameFile=function(f,c,l,n){null!=f&&null!=c&&this.executeRequest(this.createDriveRequest(f,{title:c}),l,n)};DriveClient.prototype.moveFile=function(f,c,l,n){null!=f&&null!=c&&this.executeRequest(this.createDriveRequest(f,{parents:[{kind:"drive#fileLink",id:c}]}),l,n)};DriveClient.prototype.createDriveRequest=function(f,c){return{url:"/files/"+f+"?uploadType=multipart&supportsAllDrives=true",method:"PUT",contentType:"application/json; charset=UTF-8",params:c}};DriveClient.prototype.getLibrary=function(f,c,l){return this.getFile(f,c,l,!0,!0)};DriveClient.prototype.loadDescriptor=function(f,c,l,n){this.executeRequest({url:"/files/"+f+"?supportsAllDrives=true&fields="+(null!=n?n:this.allFields)},c,l)};DriveClient.prototype.listFiles=function(f,c,l,n,p){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType+"') "+(f?" and (title contains '"+f+"')":"")+(c?" and (modifiedDate > '"+c.toISOString()+"')":"")+(l?" and ('me' in owners)":""))+"&orderBy=modifiedDate desc,title"},n,p)};DriveClient.prototype.getCustomProperty=function(f,c){f=f.properties;var l=null;if(null!=f)for(var n=0;n<f.length;n++)if(f[n].key==c){l=f[n].value;break}return l};DriveClient.prototype.getFile=function(f,c,l,n,p){n=null!=n?n:!1;p=null!=p?p:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+f+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},-mxUtils.bind(this,function(u){u.title=u.originalFilename;u.headRevisionId=u.id;u.id=f;this.getXmlFile(u,c,l)}),l):this.loadDescriptor(f,mxUtils.bind(this,function(u){try{if(null!=this.user){var F=/\.png$/i.test(u.title);/\.v(dx|sdx?)$/i.test(u.title)||/\.gliffy$/i.test(u.title)||!this.ui.useCanvasForExport&&F?this.ui.convertFile(u.downloadUrl,u.title,u.mimeType,this.extension,c,l,null,{Authorization:"Bearer "+b}):n||p||u.mimeType==this.libraryMimeType||u.mimeType==this.xmlMimeType?this.getXmlFile(u,-c,l,!0,p):this.getXmlFile(u,c,l)}else l({message:mxResources.get("loggedOut")})}catch(H){if(null!=l)l(H);else throw H;}}),l)};DriveClient.prototype.isGoogleRealtimeMimeType=function(f){return null!=f&&"application/vnd.jgraph.mxfile."==f.substring(0,30)};DriveClient.prototype.getXmlFile=function(f,c,l,n,p){try{var u={Authorization:"Bearer "+b},F=f.downloadUrl;if(null==F)null!=l&&l({message:mxResources.get("exportOptionsDisabledDetails")});else{var H=0,E=mxUtils.bind(this,function(){this.ui.editor.loadUrl(F,-mxUtils.bind(this,function(K){try{if(null==K)l({message:mxResources.get("invalidOrMissingFile")});else if(f.mimeType==this.libraryMimeType||p)f.mimeType!=this.libraryMimeType||p?c(new DriveLibrary(this.ui,K,f)):l({message:mxResources.get("notADiagramFile")});else{var d=!1;if(/\.png$/i.test(f.title)){var g=K.lastIndexOf(",");if(0<g){var k=this.ui.extractGraphModelFromPng(K);if(null!=k&&0<k.length)K=k;else try{k=K.substring(g+1);var v=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(k):-atob(k),t=this.ui.editor.extractGraphModel(mxUtils.parseXml(v).documentElement,!0);null==t||0<t.getElementsByTagName("parsererror").length?d=!0:K=v}catch(x){d=!0}}}else/\.pdf$/i.test(f.title)?(k=Editor.extractGraphModelFromPdf(K),null!=k&&0<k.length&&(d=!0,K=k)):"data:image/png;base64,PG14ZmlsZS"==K.substring(0,32)&&(v=K.substring(22),K=window.atob&&!mxClient.IS_SF?atob(v):Base64.decode(v));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(K,F)?this.ui.parseFileData(K,mxUtils.bind(this,+mxUtils.bind(this,function(v){v.title=v.originalFilename;v.headRevisionId=v.id;v.id=f;this.getXmlFile(v,c,l)}),l):this.loadDescriptor(f,mxUtils.bind(this,function(v){try{if(null!=this.user){var F=/\.png$/i.test(v.title);/\.v(dx|sdx?)$/i.test(v.title)||/\.gliffy$/i.test(v.title)||!this.ui.useCanvasForExport&&F?this.ui.convertFile(v.downloadUrl,v.title,v.mimeType,this.extension,c,l,null,{Authorization:"Bearer "+b}):n||p||v.mimeType==this.libraryMimeType||v.mimeType==this.xmlMimeType?this.getXmlFile(v,+c,l,!0,p):this.getXmlFile(v,c,l)}else l({message:mxResources.get("loggedOut")})}catch(H){if(null!=l)l(H);else throw H;}}),l)};DriveClient.prototype.isGoogleRealtimeMimeType=function(f){return null!=f&&"application/vnd.jgraph.mxfile."==f.substring(0,30)};DriveClient.prototype.getXmlFile=function(f,c,l,n,p){try{var v={Authorization:"Bearer "+b},F=f.downloadUrl;if(null==F)null!=l&&l({message:mxResources.get("exportOptionsDisabledDetails")});else{var H=0,E=mxUtils.bind(this,function(){this.ui.editor.loadUrl(F,+mxUtils.bind(this,function(K){try{if(null==K)l({message:mxResources.get("invalidOrMissingFile")});else if(f.mimeType==this.libraryMimeType||p)f.mimeType!=this.libraryMimeType||p?c(new DriveLibrary(this.ui,K,f)):l({message:mxResources.get("notADiagramFile")});else{var d=!1;if(/\.png$/i.test(f.title)){var g=K.lastIndexOf(",");if(0<g){var k=this.ui.extractGraphModelFromPng(K);if(null!=k&&0<k.length)K=k;else try{k=K.substring(g+1);var u=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(k):+atob(k),t=this.ui.editor.extractGraphModel(mxUtils.parseXml(u).documentElement,!0);null==t||0<t.getElementsByTagName("parsererror").length?d=!0:K=u}catch(x){d=!0}}}else/\.pdf$/i.test(f.title)?(k=Editor.extractGraphModelFromPdf(K),null!=k&&0<k.length&&(d=!0,K=k)):"data:image/png;base64,PG14ZmlsZS"==K.substring(0,32)&&(u=K.substring(22),K=window.atob&&!mxClient.IS_SF?atob(u):Base64.decode(u));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(K,F)?this.ui.parseFileData(K,mxUtils.bind(this,function(x){try{4==x.readyState&&(200<=x.status&&299>=x.status?c(new LocalFile(this.ui,x.responseText,f.title+this.extension,!0)):null!=l&&l({message:mxResources.get("errorLoadingFile")}))}catch(A){if(null!=l)l(A);else throw A;}}),f.title):c(d?new LocalFile(this.ui,K,f.title,!0):new DriveFile(this.ui,K,f))}}catch(x){if(null!=l)l(x);else throw x;}}),mxUtils.bind(this,function(K,d){if(H<this.maxRetries&&null!=d&&403==d.getStatus())H++,window.setTimeout(E,2*H*this.coolOff*(1+.1*(Math.random()-.5)));-else if(null!=l)l(K);else throw K;}),null!=f.mimeType&&"image/"==f.mimeType.substring(0,6)&&"image/svg"!=f.mimeType.substring(0,9)||/\.png$/i.test(f.title)||/\.jpe?g$/i.test(f.title)||/\.pdf$/i.test(f.title),null,null,null,u)});E()}}catch(K){if(null!=l)l(K);else throw K;}};DriveClient.prototype.saveFile=function(f,c,l,n,p,u,F,H,E){try{var K=0;f.saveLevel=1;var d=mxUtils.bind(this,function(V){if(null!=n)n(V);else throw V;}),g=mxUtils.bind(this,function(V){d(V);try{EditorUi.logError(V.message,null,-null,null,V)}catch(Q){}});if(f.isEditable()&&null!=f.desc){var k=Date.now(),v=f.desc.etag,t=f.desc.modifiedDate,x=f.desc.headRevisionId,A=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());u=null!=u?u:!1;var J=null,D=!1,G={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(G.mimeType))G.mimeType=this.xmlMimeType,J=f.desc,D=c=!0;else if("application/octet-stream"==G.mimeType||"1"==urlParams["override-mime"]&&G.mimeType!=this.xmlMimeType)G.mimeType=this.xmlMimeType;-var R=mxUtils.bind(this,function(V,Q,P){try{f.saveLevel=3;var q=f.getData(),y=null,B=null;f.constructor==DriveFile&&(null==H&&(H=[]),null==f.getChannelId()&&H.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&H.push({key:"key",value:Editor.guid(32)}),E=null!=E?E:Editor.guid(32),H.push({key:"secret",value:E}),B=this.ui.getPagesForXml(q),y=this.ui.getHashValueForPages(B),H.push({key:"checksum",value:E+":"+y}));P||(null!=V||u||(V=this.placeholderThumbnail,Q=this.placeholderMimeType),-null!=V&&null!=Q&&(G.thumbnail={image:V,mimeType:Q}));var C=mxUtils.bind(this,function(m){try{if(f.saveDelay=Date.now()-k,f.saveLevel=null,l(m,q,B,y),null!=J){this.executeRequest({url:"/files/"+J.id+"/revisions/"+J.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(z){z.pinned=!0;this.executeRequest({url:"/files/"+J.id+"/revisions/"+J.headRevisionId,method:"PUT",params:z})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+-J.id+"."+J.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(z){}}}catch(z){g(z)}}),M=mxUtils.bind(this,function(m,z){f.saveLevel=4;try{null!=H&&(G.properties=H);var I=F||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:f.getCurrentEtag(),L=mxUtils.bind(this,function(S){f.saveLevel=5;try{var U=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&-f.desc.mimeType!=this.libraryMimeType,W=!0,X=null;try{X=window.setTimeout(mxUtils.bind(this,function(){W=!1;d({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Z){}this.executeRequest(this.createUploadRequest(f.getId(),G,m,c||S||U,z,S?null:I,D),mxUtils.bind(this,function(Z){window.clearTimeout(X);if(W){var Y=null!=Z?(new Date(Z.modifiedDate)).getTime()-(new Date(t)).getTime():0;if(0>=Y||v==Z.etag||c&&x==Z.headRevisionId){var ba=[];null==Z?ba.push("Empty response"):(0>=Y&&ba.push("Invalid modified time"),-v==Z.etag&&ba.push("Stale etag"),c&&x==Z.headRevisionId&&ba.push("Stale revision"),I=Z.etag);0==ba.length&&ba.push(mxResources.get("unknownError"));Y=ba.join(", ");if(K<this.staleEtagMaxRetries)K++,ba=Math.round(Math.pow(2,K)*this.coolOff*(1+.1*(Math.random()-.5))),window.setTimeout(L,ba),"1"==urlParams.test&&EditorUi.debug("DriveClient: Invalid response","retry",K,"delay",ba,"rev",null!=Z?Z.headRevisionId:"null","errors",Y);else{f.saveLevel=12;d({message:mxResources.get("error")+": "+Y},Z);try{EditorUi.logError("Saving to Google Drive failed",-null,"id-"+f.desc.id+"-from-"+x+"."+t+"-"+this.ui.hashValue(v)+"-to-"+Z.headRevisionId+"."+Z.modifiedDate+"-"+this.ui.hashValue(Z.etag)+(0<Y.length?"-errors-"+Y:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")+"-retries-"+K+"-delay-"+(Date.now()-k))}catch(ea){}}}else C(Z)}}),mxUtils.bind(this,function(Z){window.clearTimeout(X);if(W){f.saveLevel=6;try{f.isConflict(Z)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="++else if(null!=l)l(K);else throw K;}),null!=f.mimeType&&"image/"==f.mimeType.substring(0,6)&&"image/svg"!=f.mimeType.substring(0,9)||/\.png$/i.test(f.title)||/\.jpe?g$/i.test(f.title)||/\.pdf$/i.test(f.title),null,null,null,v)});E()}}catch(K){if(null!=l)l(K);else throw K;}};DriveClient.prototype.saveFile=function(f,c,l,n,p,v,F,H,E){try{var K=0;f.saveLevel=1;var d=mxUtils.bind(this,function(U){if(null!=n)n(U);else throw U;}),g=mxUtils.bind(this,function(U){d(U);try{EditorUi.logError(U.message,null,+null,null,U)}catch(P){}});if(f.isEditable()&&null!=f.desc){var k=Date.now(),u=f.desc.etag,t=f.desc.modifiedDate,x=f.desc.headRevisionId,A=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());v=null!=v?v:!1;var J=null,D=!1,G={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(G.mimeType))G.mimeType=this.xmlMimeType,J=f.desc,D=c=!0;else if("application/octet-stream"==G.mimeType||"1"==urlParams["override-mime"]&&G.mimeType!=this.xmlMimeType)G.mimeType=this.xmlMimeType;+var S=mxUtils.bind(this,function(U,P,O){try{f.saveLevel=3;var q=f.getData(),y=null,B=null;f.constructor==DriveFile&&(null==H&&(H=[]),null==f.getChannelId()&&H.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&H.push({key:"key",value:Editor.guid(32)}),E=null!=E?E:Editor.guid(32),H.push({key:"secret",value:E}),B=this.ui.getPagesForXml(q),y=this.ui.getHashValueForPages(B),H.push({key:"checksum",value:E+":"+y}));O||(null!=U||v||(U=this.placeholderThumbnail,P=this.placeholderMimeType),+null!=U&&null!=P&&(G.thumbnail={image:U,mimeType:P}));var C=mxUtils.bind(this,function(m){try{if(f.saveDelay=Date.now()-k,f.saveLevel=null,l(m,q,B,y),null!=J){this.executeRequest({url:"/files/"+J.id+"/revisions/"+J.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(z){z.pinned=!0;this.executeRequest({url:"/files/"+J.id+"/revisions/"+J.headRevisionId,method:"PUT",params:z})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"++J.id+"."+J.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(z){}}}catch(z){g(z)}}),M=mxUtils.bind(this,function(m,z){f.saveLevel=4;try{null!=H&&(G.properties=H);var I=F||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:f.getCurrentEtag(),L=mxUtils.bind(this,function(R){f.saveLevel=5;try{var V=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&+f.desc.mimeType!=this.libraryMimeType,W=!0,X=null;try{X=window.setTimeout(mxUtils.bind(this,function(){W=!1;d({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Z){}this.executeRequest(this.createUploadRequest(f.getId(),G,m,c||R||V,z,R?null:I,D),mxUtils.bind(this,function(Z){window.clearTimeout(X);if(W){var Y=null!=Z?(new Date(Z.modifiedDate)).getTime()-(new Date(t)).getTime():0;if(0>=Y||u==Z.etag||c&&x==Z.headRevisionId){var ba=[];null==Z?ba.push("Empty response"):(0>=Y&&ba.push("Invalid modified time"),+u==Z.etag&&ba.push("Stale etag"),c&&x==Z.headRevisionId&&ba.push("Stale revision"),I=Z.etag);0==ba.length&&ba.push(mxResources.get("unknownError"));Y=ba.join(", ");if(K<this.staleEtagMaxRetries)K++,ba=Math.round(Math.pow(2,K)*this.coolOff*(1+.1*(Math.random()-.5))),window.setTimeout(L,ba),"1"==urlParams.test&&EditorUi.debug("DriveClient: Invalid response","retry",K,"delay",ba,"rev",null!=Z?Z.headRevisionId:"null","errors",Y);else{f.saveLevel=12;d({message:mxResources.get("error")+": "+Y},Z);try{EditorUi.logError("Saving to Google Drive failed",+null,"id-"+f.desc.id+"-from-"+x+"."+t+"-"+this.ui.hashValue(u)+"-to-"+Z.headRevisionId+"."+Z.modifiedDate+"-"+this.ui.hashValue(Z.etag)+(0<Y.length?"-errors-"+Y:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")+"-retries-"+K+"-delay-"+(Date.now()-k))}catch(da){}}}else C(Z)}}),mxUtils.bind(this,function(Z){window.clearTimeout(X);if(W){f.saveLevel=6;try{f.isConflict(Z)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(Y){f.saveLevel=7;try{if(null!=Y&&Y.etag==I)if(K<this.staleEtagMaxRetries){K++;var ba=Math.round(2*K*this.coolOff*(1+.1*(Math.random()-.5)));window.setTimeout(N,ba);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",K,"delay",ba)}else{N(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?-"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(ea){}}else"1"==urlParams.test&&Y.headRevisionId==x&&EditorUi.debug("DriveClient: Remote Etag Changed","local",I,"remote",Y.etag,"rev",f.desc.headRevisionId,"response",[Y],"file",[f]),d(Z,Y)}catch(ea){g(ea)}}),mxUtils.bind(this,function(){d(Z)})):-d(Z)}catch(Y){g(Y)}}}))}catch(Z){g(Z)}}),N=mxUtils.bind(this,function(S){f.saveLevel=9;if(S||null==I)L(S);else{var U=!0,W=null;try{W=window.setTimeout(mxUtils.bind(this,function(){U=!1;d({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(X){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(X){window.clearTimeout(W);if(U){f.saveLevel=10;try{null!=X&&X.headRevisionId==x?("1"==urlParams.test&&I!=X.etag&&EditorUi.debug("DriveClient: Preflight Etag Update",-"from",I,"to",X.etag,"rev",f.desc.headRevisionId,"response",[X],"file",[f]),I=X.etag,L(S)):d({error:{code:412}},X)}catch(Z){g(Z)}}}),mxUtils.bind(this,function(X){window.clearTimeout(W);U&&(f.saveLevel=11,d(X))}))}});if(A&&null==V){f.saveLevel=8;var O=new Image;O.onload=mxUtils.bind(this,function(){try{var S=this.thumbnailWidth/O.width,U=document.createElement("canvas");U.width=this.thumbnailWidth;U.height=Math.floor(O.height*S);U.getContext("2d").drawImage(O,0,0,U.width,U.height);var W=U.toDataURL();-W=W.substring(W.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");G.thumbnail={image:W,mimeType:"image/png"};N(!1)}catch(X){try{N(!1)}catch(Z){g(Z)}}});O.src="data:image/png;base64,"+m}else N(!1)}catch(S){g(S)}});if(A){var T=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(m){M(m,!0)}),d,this.ui.getCurrentFile()!=f?q:null,T.scale,T.border)}else M(q,!1)}catch(m){g(m)}});try{f.saveLevel=2,(u||A||f.constructor==DriveLibrary||!this.enableThumbnails||-"0"==urlParams.thumb||null!=G.mimeType&&"application/vnd.jgraph.mxfile"!=G.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(V){try{var Q=null;try{null!=V&&(Q=V.toDataURL("image/png")),null!=Q&&(Q=Q.length>this.maxThumbnailSize?null:Q.substring(Q.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(P){Q=null}R(Q,"image/png")}catch(P){g(P)}}),20))&&R(null,null,f.constructor!=DriveLibrary)}catch(V){g(V)}}else this.ui.editor.graph.reset(),d({message:mxResources.get("readOnly")})}catch(V){g(V)}};-DriveClient.prototype.insertFile=function(f,c,l,n,p,u,F){u=null!=u?u:this.xmlMimeType;f={mimeType:u,title:f};null!=l&&(f.parents=[{kind:"drive#fileLink",id:l}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,F),mxUtils.bind(this,function(H){u==this.libraryMimeType?n(new DriveLibrary(this.ui,c,H)):0==H?null!=p&&p({message:mxResources.get("errorSavingFile")}):n(new DriveFile(this.ui,c,H))}),p)};DriveClient.prototype.createUploadRequest=function(f,c,l,n,p,u,F){p=null!=p?p:!1;var H={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};-null!=u&&(H["If-Match"]=u);f={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=f?"/"+f:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=f?"PUT":"POST",headers:H,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=l?p?l:!window.btoa||+"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(da){}}else"1"==urlParams.test&&Y.headRevisionId==x&&EditorUi.debug("DriveClient: Remote Etag Changed","local",I,"remote",Y.etag,"rev",f.desc.headRevisionId,"response",[Y],"file",[f]),d(Z,Y)}catch(da){g(da)}}),mxUtils.bind(this,function(){d(Z)})):+d(Z)}catch(Y){g(Y)}}}))}catch(Z){g(Z)}}),N=mxUtils.bind(this,function(R){f.saveLevel=9;if(R||null==I)L(R);else{var V=!0,W=null;try{W=window.setTimeout(mxUtils.bind(this,function(){V=!1;d({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(X){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(X){window.clearTimeout(W);if(V){f.saveLevel=10;try{null!=X&&X.headRevisionId==x?("1"==urlParams.test&&I!=X.etag&&EditorUi.debug("DriveClient: Preflight Etag Update",+"from",I,"to",X.etag,"rev",f.desc.headRevisionId,"response",[X],"file",[f]),I=X.etag,L(R)):d({error:{code:412}},X)}catch(Z){g(Z)}}}),mxUtils.bind(this,function(X){window.clearTimeout(W);V&&(f.saveLevel=11,d(X))}))}});if(A&&null==U){f.saveLevel=8;var Q=new Image;Q.onload=mxUtils.bind(this,function(){try{var R=this.thumbnailWidth/Q.width,V=document.createElement("canvas");V.width=this.thumbnailWidth;V.height=Math.floor(Q.height*R);V.getContext("2d").drawImage(Q,0,0,V.width,V.height);var W=V.toDataURL();+W=W.substring(W.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");G.thumbnail={image:W,mimeType:"image/png"};N(!1)}catch(X){try{N(!1)}catch(Z){g(Z)}}});Q.src="data:image/png;base64,"+m}else N(!1)}catch(R){g(R)}});if(A){var T=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(m){M(m,!0)}),d,this.ui.getCurrentFile()!=f?q:null,T.scale,T.border)}else M(q,!1)}catch(m){g(m)}});try{f.saveLevel=2,(v||A||f.constructor==DriveLibrary||!this.enableThumbnails||+"0"==urlParams.thumb||null!=G.mimeType&&"application/vnd.jgraph.mxfile"!=G.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(U){try{var P=null;try{null!=U&&(P=U.toDataURL("image/png")),null!=P&&(P=P.length>this.maxThumbnailSize?null:P.substring(P.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(O){P=null}S(P,"image/png")}catch(O){g(O)}}),20))&&S(null,null,f.constructor!=DriveLibrary)}catch(U){g(U)}}else this.ui.editor.graph.reset(),d({message:mxResources.get("readOnly")})}catch(U){g(U)}};+DriveClient.prototype.insertFile=function(f,c,l,n,p,v,F){v=null!=v?v:this.xmlMimeType;f={mimeType:v,title:f};null!=l&&(f.parents=[{kind:"drive#fileLink",id:l}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,F),mxUtils.bind(this,function(H){v==this.libraryMimeType?n(new DriveLibrary(this.ui,c,H)):0==H?null!=p&&p({message:mxResources.get("errorSavingFile")}):n(new DriveFile(this.ui,c,H))}),p)};DriveClient.prototype.createUploadRequest=function(f,c,l,n,p,v,F){p=null!=p?p:!1;var H={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};+null!=v&&(H["If-Match"]=v);f={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=f?"/"+f:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=f?"PUT":"POST",headers:H,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=l?p?l:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(l):Graph.base64EncodeUnicode(l):"")+"\r\n---------314159265358979323846--"};n||(f.fullUrl+="&newRevision=false");F&&(f.fullUrl+="&pinned=true");return f};DriveClient.prototype.createLinkPicker=function(){var f=e.linkPicker;if(null==f||e.linkPickerToken!=b){e.linkPickerToken=b;f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),l=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0);f=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(e.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(f).addView(c).addView(l).addView(google.picker.ViewId.RECENTLY_PICKED)}return f};DriveClient.prototype.pickFile=function(f,c,l){this.filePickerCallback=null!=f?f:mxUtils.bind(this,function(n){this.ui.loadFile("G"+n)});this.filePicked=mxUtils.bind(this,function(n){n.action==google.picker.Action.PICKED&&this.filePickerCallback(n.docs[0].id,n.docs[0])});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var n=c?"genericPicker":"filePicker",p=mxUtils.bind(this,function(d){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(d).className&&(mxEvent.removeListener(document,"click",p),this[n].setVisible(!1),l&&l())});if(null==e[n]||e[n+"Token"]!=-b){e[n+"Token"]=b;var u=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),F=(new google.picker.DocsView).setIncludeFolders(!0),H=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),E=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(u.setMimeTypes("*/*"),F.setMimeTypes("*/*"),H.setMimeTypes("*/*")):(u.setMimeTypes(this.mimeTypes),F.setMimeTypes(this.mimeTypes),H.setMimeTypes(this.mimeTypes));e[n]=(new google.picker.PickerBuilder).setOAuthToken(e[n+-"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(u).addView(F).addView(H).addView(google.picker.ViewId.RECENTLY_PICKED).addView(E);if(urlParams.gPickerSize){var K=urlParams.gPickerSize.split(",");e[n]=e[n].setSize(K[0],K[1])}urlParams.topBaseUrl&&(e[n]=e[n].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e[n]=e[n].setCallback(mxUtils.bind(this,function(d){if(d.action==google.picker.Action.PICKED||d.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,+b){e[n+"Token"]=b;var v=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),F=(new google.picker.DocsView).setIncludeFolders(!0),H=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),E=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(v.setMimeTypes("*/*"),F.setMimeTypes("*/*"),H.setMimeTypes("*/*")):(v.setMimeTypes(this.mimeTypes),F.setMimeTypes(this.mimeTypes),H.setMimeTypes(this.mimeTypes));e[n]=(new google.picker.PickerBuilder).setOAuthToken(e[n++"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(v).addView(F).addView(H).addView(google.picker.ViewId.RECENTLY_PICKED).addView(E);if(urlParams.gPickerSize){var K=urlParams.gPickerSize.split(",");e[n]=e[n].setSize(K[0],K[1])}urlParams.topBaseUrl&&(e[n]=e[n].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e[n]=e[n].setCallback(mxUtils.bind(this,function(d){if(d.action==google.picker.Action.PICKED||d.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,"click",p),l&&d.action==google.picker.Action.CANCEL&&l();d.action==google.picker.Action.PICKED&&this.filePicked(d)})).build()}mxEvent.addListener(document,"click",p);e[n].setVisible(!0)}catch(d){this.ui.spinner.stop(),this.ui.handleError(d)}}))};DriveClient.prototype.pickFolder=function(f,c){this.folderPickerCallback=f;var l=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var n=-mxUtils.bind(this,function(E){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(E).className&&(mxEvent.removeListener(document,"click",n),e.folderPicker.setVisible(!1))});if(null==e.folderPicker||e.folderPickerToken!=b){e.folderPickerToken=b;var p=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),u=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),-F=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");e.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(e.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(p).addView(u).addView(F).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));+mxUtils.bind(this,function(E){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(E).className&&(mxEvent.removeListener(document,"click",n),e.folderPicker.setVisible(!1))});if(null==e.folderPicker||e.folderPickerToken!=b){e.folderPickerToken=b;var p=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),v=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),+F=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");e.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(e.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(p).addView(v).addView(F).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));if(urlParams.gPickerSize){var H=urlParams.gPickerSize.split(",");e.folderPicker=e.folderPicker.setSize(H[0],H[1])}urlParams.topBaseUrl&&(e.folderPicker=e.folderPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e.folderPicker=e.folderPicker.setCallback(mxUtils.bind(this,function(E){E.action!=google.picker.Action.PICKED&&E.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",n);this.folderPickerCallback(E)})).build()}mxEvent.addListener(document,"click",n);e.folderPicker.setVisible(!0)}catch(E){this.ui.spinner.stop(),this.ui.handleError(E)}}))}catch(n){this.ui.handleError(n)}});c?l():this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop(),this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxUtils.bind(this,function(){l()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)}catch(n){this.ui.handleError(n)}}))};DriveClient.prototype.pickLibrary=function(f){this.filePickerCallback=f;this.filePicked=mxUtils.bind(this,function(c){c.action==google.picker.Action.PICKED?this.filePickerCallback(c.docs[0].id):c.action==google.picker.Action.CANCEL&&null==this.ui.getCurrentFile()&&this.ui.showSplash()});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(H){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(H).className&&(mxEvent.removeListener(document,"click",c),e.libraryPicker.setVisible(!1))});if(null==e.libraryPicker||e.libraryPickerToken!=b){e.libraryPickerToken=b;var l=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),n=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),-p=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),u=(new google.picker.DocsUploadView).setIncludeFolders(!0);e.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(e.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(l).addView(n).addView(p).addView(google.picker.ViewId.RECENTLY_PICKED).addView(u);if(urlParams.gPickerSize){var F=+p=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),v=(new google.picker.DocsUploadView).setIncludeFolders(!0);e.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(e.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(l).addView(n).addView(p).addView(google.picker.ViewId.RECENTLY_PICKED).addView(v);if(urlParams.gPickerSize){var F=urlParams.gPickerSize.split(",");e.libraryPicker=e.libraryPicker.setSize(F[0],F[1])}urlParams.topBaseUrl&&(e.libraryPicker=e.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e.libraryPicker=e.libraryPicker.setCallback(mxUtils.bind(this,function(H){H.action!=google.picker.Action.PICKED&&H.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);H.action==google.picker.Action.PICKED&&this.filePicked(H)})).build()}mxEvent.addListener(document,"click",c);e.libraryPicker.setVisible(!0)}catch(H){this.ui.spinner.stop(),this.ui.handleError(H)}}))};DriveClient.prototype.showPermissions=function(f,c){var l=mxUtils.bind(this,function(){var n=new ConfirmDialog(this.ui,mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){var p=null!=c?c.getFolderUrl():"https://drive.google.com/open?id="+f;this.ui.editor.graph.openLink(p)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(n.container,400,150,!0,!0);n.init()});this.sharingFailed?l():this.checkToken(mxUtils.bind(this,-function(){try{var n=new gapi.drive.share.ShareClient(this.appId);n.setOAuthToken(b);n.setItemIds([f]);n.showSettingsDialog();"MutationObserver"in window&&(null!=this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(p){for(var u=!1,F=0;F<p.length;F++)for(var H=0;H<p[F].addedNodes.length;H++){var E=p[F].addedNodes[H];"BUTTON"==E.nodeName&&"ok"==E.getAttribute("name")&&null!=E.parentNode&&null!=E.parentNode.parentNode&&-"dialog"==E.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,E.click(),l(),u=!0):"DIV"==E.nodeName&&"shr-q-shr-r-shr-xb"==E.className&&(u=!0)}u&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(p){this.ui.handleError(p)}}))};DriveClient.prototype.clearPersistentToken=function(){var f=JSON.parse(this.getPersistentToken(!0))||{};delete f.current;delete f[this.userId];for(var c in f){f.current={userId:c,+function(){try{var n=new gapi.drive.share.ShareClient(this.appId);n.setOAuthToken(b);n.setItemIds([f]);n.showSettingsDialog();"MutationObserver"in window&&(null!=this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(p){for(var v=!1,F=0;F<p.length;F++)for(var H=0;H<p[F].addedNodes.length;H++){var E=p[F].addedNodes[H];"BUTTON"==E.nodeName&&"ok"==E.getAttribute("name")&&null!=E.parentNode&&null!=E.parentNode.parentNode&&+"dialog"==E.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,E.click(),l(),v=!0):"DIV"==E.nodeName&&"shr-q-shr-r-shr-xb"==E.className&&(v=!0)}v&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(p){this.ui.handleError(p)}}))};DriveClient.prototype.clearPersistentToken=function(){var f=JSON.parse(this.getPersistentToken(!0))||{};delete f.current;delete f[this.userId];for(var c in f){f.current={userId:c,expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(f))};DriveClient.prototype.setPersistentToken=function(f,c){var l=JSON.parse(this.getPersistentToken(!0))||{};f.userId=this.userId;l.current=f;l[this.userId]={user:this.user};DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(l),c)}})();DropboxFile=function(b,e,f){DrawioFile.call(this,b,e);this.stat=f};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};DropboxFile.prototype.isRenamable=function(){return!0};DropboxFile.prototype.getSize=function(){return this.stat.size};DropboxFile.prototype.isRevisionHistorySupported=function(){return!0};DropboxFile.prototype.getFileUrl=function(){return"https://www.dropbox.com/home/Apps"+this.ui.dropbox.appPath+this.stat.path_display};DropboxFile.prototype.getFolderUrl=function(){var b=this.getFileUrl();return b.substring(0,b.lastIndexOf("/"))};-DropboxFile.prototype.getRevisions=function(b,e){var f=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});f.then(mxUtils.bind(this,function(c){try{for(var l=[],n=c.entries.length-1;0<=n;n--)mxUtils.bind(this,function(p){l.push({modifiedDate:p.client_modified,fileSize:p.size,getXml:mxUtils.bind(this,function(u,F){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:p.rev},u,F)}),getUrl:mxUtils.bind(this,function(u){return this.ui.getUrl(window.location.pathname+"?rev="+-p.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=u?"&page="+u:""))+window.location.hash})})})(c.entries[n]);b(l)}catch(p){e(p)}}));f["catch"](function(c){e(c)})};DropboxFile.prototype.getLatestVersion=function(b,e){this.ui.dropbox.getFile(this.getId(),b,e)};DropboxFile.prototype.updateDescriptor=function(b){this.stat=b.stat};DropboxFile.prototype.save=function(b,e,f,c,l){this.doSave(this.getTitle(),b,e,f,c,l)};DropboxFile.prototype.saveAs=function(b,e,f){this.doSave(b,!1,e,f)};+DropboxFile.prototype.getRevisions=function(b,e){var f=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});f.then(mxUtils.bind(this,function(c){try{for(var l=[],n=c.entries.length-1;0<=n;n--)mxUtils.bind(this,function(p){l.push({modifiedDate:p.client_modified,fileSize:p.size,getXml:mxUtils.bind(this,function(v,F){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:p.rev},v,F)}),getUrl:mxUtils.bind(this,function(v){return this.ui.getUrl(window.location.pathname+"?rev="++p.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=v?"&page="+v:""))+window.location.hash})})})(c.entries[n]);b(l)}catch(p){e(p)}}));f["catch"](function(c){e(c)})};DropboxFile.prototype.getLatestVersion=function(b,e){this.ui.dropbox.getFile(this.getId(),b,e)};DropboxFile.prototype.updateDescriptor=function(b){this.stat=b.stat};DropboxFile.prototype.save=function(b,e,f,c,l){this.doSave(this.getTitle(),b,e,f,c,l)};DropboxFile.prototype.saveAs=function(b,e,f){this.doSave(b,!1,e,f)};DropboxFile.prototype.doSave=function(b,e,f,c,l,n){var p=this.stat.name;this.stat.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=p;this.saveFile(b,e,f,c,l,n)}),c,l,n])};-DropboxFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(e=mxUtils.bind(this,function(l){if(l)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var n=mxUtils.bind(this,function(u){var F=this.stat.path_display.lastIndexOf("/");F=1<F?this.stat.path_display.substring(1,F+1):null;this.ui.dropbox.saveFile(b,u,mxUtils.bind(this,function(H){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=H;this.contentChanged();-null!=f&&f()}),mxUtils.bind(this,function(H){this.savingFile=!1;null!=c&&c(H)}),F)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var p=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(u){n(this.ui.base64ToBlob(u,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,p.scale,p.border)}else n(this.getData())}catch(u){if(this.savingFile=!1,null!=c)c(u);else throw u;}else null!=c&&c()}),this.getTitle()==b?e(!0):this.ui.dropbox.checkExists(b,+DropboxFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(e=mxUtils.bind(this,function(l){if(l)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var n=mxUtils.bind(this,function(v){var F=this.stat.path_display.lastIndexOf("/");F=1<F?this.stat.path_display.substring(1,F+1):null;this.ui.dropbox.saveFile(b,v,mxUtils.bind(this,function(H){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=H;this.contentChanged();+null!=f&&f()}),mxUtils.bind(this,function(H){this.savingFile=!1;null!=c&&c(H)}),F)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var p=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(v){n(this.ui.base64ToBlob(v,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,p.scale,p.border)}else n(this.getData())}catch(v){if(this.savingFile=!1,null!=c)c(v);else throw v;}else null!=c&&c()}),this.getTitle()==b?e(!0):this.ui.dropbox.checkExists(b,e)):null!=f&&f()};DropboxFile.prototype.rename=function(b,e,f){this.ui.dropbox.renameFile(this,b,mxUtils.bind(this,function(c){this.hasSameExtension(b,this.getTitle())?(this.stat=c,this.descriptorChanged(),null!=e&&e()):(this.stat=c,this.descriptorChanged(),this.save(!0,e,f))}),f)};DropboxLibrary=function(b,e,f){DropboxFile.call(this,b,e,f)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};DropboxLibrary.prototype.open=function(){};(function(){var b=null;window.DropboxClient=function(e){DrawioClient.call(this,e,"dbauth");this.client=new Dropbox({clientId:this.clientId})};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio-diagrams/";DropboxClient.prototype.extension=".drawio";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;DropboxClient.prototype.clientId=window.DRAWIO_DROPBOX_ID;DropboxClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"dropbox";DropboxClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();this.setUser(null);b=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};DropboxClient.prototype.updateUser=function(e,f,c){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),p=this.client.usersGetCurrentAccount();-p.then(mxUtils.bind(this,function(u){window.clearTimeout(n);l&&(this.setUser(new DrawioUser(u.account_id,u.email,u.name.display_name)),e())}));p["catch"](mxUtils.bind(this,function(u){window.clearTimeout(n);l&&(null==u||401!==u.status||c?f({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)))}))};DropboxClient.prototype.authenticate=function(e,f){(new mxXmlRequest(this.redirectUri++p.then(mxUtils.bind(this,function(v){window.clearTimeout(n);l&&(this.setUser(new DrawioUser(v.account_id,v.email,v.name.display_name)),e())}));p["catch"](mxUtils.bind(this,function(v){window.clearTimeout(n);l&&(null==v||401!==v.status||c?f({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)))}))};DropboxClient.prototype.authenticate=function(e,f){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};DropboxClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onDropboxCallback){var l=mxUtils.bind(this,function(){var n=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(p){if(200<=-p.getStatus()&&299>=p.getStatus())try{b=JSON.parse(p.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),f()}catch(u){c({message:mxResources.get("authFailed"),retry:l})}else this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==p.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(p,u){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+-(p?"&token_access_type=offline":"")+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(F,H){if(n){window.onDropboxCallback=null;n=!1;try{null==F?c({message:mxResources.get("accessDenied"),retry:l}):(null!=u&&u(),b=F.access_token,this.client.setAccessToken(b),this.setUser(null),p&&this.setPersistentToken("remembered"),f())}catch(E){c(E)}finally{null!=-H&&H.close()}}else null!=H&&H.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){n&&(window.onDropboxCallback=null,n=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(e,f,c){var l=mxUtils.bind(this,function(p){var u=!0,F=window.setTimeout(mxUtils.bind(this,function(){u=!1;c({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout),H=e();H.then(mxUtils.bind(this,-function(E){window.clearTimeout(F);u&&null!=f&&f(E)}));H["catch"](mxUtils.bind(this,function(E){window.clearTimeout(F);u&&(null==E||500!=E.status&&400!=E.status&&401!=E.status?c({message:mxResources.get("error")+" "+E.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,p?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){n(!0)},c)})}):this.authenticate(function(){l(!0)},c)))}))}),n=mxUtils.bind(this,function(p){null==this.user?-this.updateUser(function(){n(!0)},c,p):l(p)});null==b?this.authenticate(function(){n(!0)},c):n(!1)};DropboxClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};DropboxClient.prototype.getFile=function(e,f,c,l){l=null!=l?l:!1;var n=/\.png$/i.test(e);if(/^https:\/\//i.test(e)||/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&n){var p=mxUtils.bind(this,function(){var u=e.split("/");this.ui.convertFile(e,0<u.length?u[u.length-1]:e,null,this.extension,-f,c)});null!=b?p():this.authenticate(p,c)}else p={path:"/"+e},null!=urlParams.rev&&(p.rev=urlParams.rev),this.readFile(p,mxUtils.bind(this,function(u,F){var H=null;if(0<(n?u.lastIndexOf(","):-1)){var E=this.ui.extractGraphModelFromPng(u);null!=E&&0<E.length?u=E:H=new LocalFile(this,u,e,!0)}f(null!=H?H:l?new DropboxLibrary(this.ui,u,F):new DropboxFile(this.ui,u,F))}),c,n)};DropboxClient.prototype.readFile=function(e,f,c,l){var n=mxUtils.bind(this,function(u){var F=!0,H=window.setTimeout(mxUtils.bind(this,+p.getStatus()&&299>=p.getStatus())try{b=JSON.parse(p.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),f()}catch(v){c({message:mxResources.get("authFailed"),retry:l})}else this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==p.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(p,v){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId++(p?"&token_access_type=offline":"")+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(F,H){if(n){window.onDropboxCallback=null;n=!1;try{null==F?c({message:mxResources.get("accessDenied"),retry:l}):(null!=v&&v(),b=F.access_token,this.client.setAccessToken(b),this.setUser(null),p&&this.setPersistentToken("remembered"),f())}catch(E){c(E)}finally{null!=+H&&H.close()}}else null!=H&&H.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){n&&(window.onDropboxCallback=null,n=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(e,f,c){var l=mxUtils.bind(this,function(p){var v=!0,F=window.setTimeout(mxUtils.bind(this,function(){v=!1;c({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout),H=e();H.then(mxUtils.bind(this,+function(E){window.clearTimeout(F);v&&null!=f&&f(E)}));H["catch"](mxUtils.bind(this,function(E){window.clearTimeout(F);v&&(null==E||500!=E.status&&400!=E.status&&401!=E.status?c({message:mxResources.get("error")+" "+E.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,p?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){n(!0)},c)})}):this.authenticate(function(){l(!0)},c)))}))}),n=mxUtils.bind(this,function(p){null==this.user?+this.updateUser(function(){n(!0)},c,p):l(p)});null==b?this.authenticate(function(){n(!0)},c):n(!1)};DropboxClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};DropboxClient.prototype.getFile=function(e,f,c,l){l=null!=l?l:!1;var n=/\.png$/i.test(e);if(/^https:\/\//i.test(e)||/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&n){var p=mxUtils.bind(this,function(){var v=e.split("/");this.ui.convertFile(e,0<v.length?v[v.length-1]:e,null,this.extension,+f,c)});null!=b?p():this.authenticate(p,c)}else p={path:"/"+e},null!=urlParams.rev&&(p.rev=urlParams.rev),this.readFile(p,mxUtils.bind(this,function(v,F){var H=null;if(0<(n?v.lastIndexOf(","):-1)){var E=this.ui.extractGraphModelFromPng(v);null!=E&&0<E.length?v=E:H=new LocalFile(this,v,e,!0)}f(null!=H?H:l?new DropboxLibrary(this.ui,v,F):new DropboxFile(this.ui,v,F))}),c,n)};DropboxClient.prototype.readFile=function(e,f,c,l){var n=mxUtils.bind(this,function(v){var F=!0,H=window.setTimeout(mxUtils.bind(this,function(){F=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),E=this.client.filesGetMetadata({path:"/"+e.path.substring(1),include_deleted:!1});E.then(mxUtils.bind(this,function(K){}));E["catch"](function(K){window.clearTimeout(H);F&&null!=K&&409==K.status&&(F=!1,c({message:mxResources.get("fileNotFound")}))});E=this.client.filesDownload(e);E.then(mxUtils.bind(this,function(K){window.clearTimeout(H);if(F){F=!1;try{var d=new FileReader;d.onload=mxUtils.bind(this,function(g){f(d.result,K)});l?d.readAsDataURL(K.fileBlob):-d.readAsText(K.fileBlob)}catch(g){c(g)}}}));E["catch"](mxUtils.bind(this,function(K){window.clearTimeout(H);F&&(F=!1,null==K||500!=K.status&&400!=K.status&&401!=K.status?c({message:mxResources.get("error")+" "+K.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,u?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){p(!0)},c)})}):this.authenticate(function(){n(!0)},c)))}))}),p=mxUtils.bind(this,function(u){null==this.user?this.updateUser(function(){p(!0)},-c,u):n(u)});null==b?this.authenticate(function(){p(!0)},c):p(!1)};DropboxClient.prototype.checkExists=function(e,f,c){var l=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+e.toLowerCase(),include_deleted:!1})});this.executePromise(l,mxUtils.bind(this,function(n){c?f(!1,!0,n):this.ui.confirm(mxResources.get("replaceIt",[e]),function(){f(!0,!0,n)},function(){f(!1,!0,n)})}),function(n){f(!0,!1)})};DropboxClient.prototype.renameFile=function(e,f,c,l){if(/[\\\/:\?\*"\|]/.test(f))l({message:mxResources.get("dropboxCharsNotAllowed")});-else{if(null!=e&&null!=f){var n=e.stat.path_display.substring(1),p=n.lastIndexOf("/");0<p&&(f=n.substring(0,p+1)+f)}null!=e&&null!=f&&e.stat.path_lower.substring(1)!==f.toLowerCase()?this.checkExists(f,mxUtils.bind(this,function(u,F,H){u?(u=mxUtils.bind(this,function(E){E=mxUtils.bind(this,function(){return this.client.filesMove({from_path:e.stat.path_display,to_path:"/"+f,autorename:!1})});this.executePromise(E,c,l)}),F&&H.path_lower.substring(1)!==f.toLowerCase()?(F=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+-f.toLowerCase()})}),this.executePromise(F,u,l)):u()):l()})):l({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(e,f,c,l){this.insertFile(e,f,c,l,!0)};DropboxClient.prototype.insertFile=function(e,f,c,l,n){n=null!=n?n:!1;this.checkExists(e,mxUtils.bind(this,function(p){p?this.saveFile(e,f,mxUtils.bind(this,function(u){n?c(new DropboxLibrary(this.ui,f,u)):c(new DropboxFile(this.ui,f,u))}),l):l()}))};DropboxClient.prototype.saveFile=function(e,f,c,l,n){if(/[\\\/:\?\*"\|]/.test(e))l({message:mxResources.get("dropboxCharsNotAllowed")});+d.readAsText(K.fileBlob)}catch(g){c(g)}}}));E["catch"](mxUtils.bind(this,function(K){window.clearTimeout(H);F&&(F=!1,null==K||500!=K.status&&400!=K.status&&401!=K.status?c({message:mxResources.get("error")+" "+K.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,v?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){p(!0)},c)})}):this.authenticate(function(){n(!0)},c)))}))}),p=mxUtils.bind(this,function(v){null==this.user?this.updateUser(function(){p(!0)},+c,v):n(v)});null==b?this.authenticate(function(){p(!0)},c):p(!1)};DropboxClient.prototype.checkExists=function(e,f,c){var l=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+e.toLowerCase(),include_deleted:!1})});this.executePromise(l,mxUtils.bind(this,function(n){c?f(!1,!0,n):this.ui.confirm(mxResources.get("replaceIt",[e]),function(){f(!0,!0,n)},function(){f(!1,!0,n)})}),function(n){f(!0,!1)})};DropboxClient.prototype.renameFile=function(e,f,c,l){if(/[\\\/:\?\*"\|]/.test(f))l({message:mxResources.get("dropboxCharsNotAllowed")});+else{if(null!=e&&null!=f){var n=e.stat.path_display.substring(1),p=n.lastIndexOf("/");0<p&&(f=n.substring(0,p+1)+f)}null!=e&&null!=f&&e.stat.path_lower.substring(1)!==f.toLowerCase()?this.checkExists(f,mxUtils.bind(this,function(v,F,H){v?(v=mxUtils.bind(this,function(E){E=mxUtils.bind(this,function(){return this.client.filesMove({from_path:e.stat.path_display,to_path:"/"+f,autorename:!1})});this.executePromise(E,c,l)}),F&&H.path_lower.substring(1)!==f.toLowerCase()?(F=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"++f.toLowerCase()})}),this.executePromise(F,v,l)):v()):l()})):l({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(e,f,c,l){this.insertFile(e,f,c,l,!0)};DropboxClient.prototype.insertFile=function(e,f,c,l,n){n=null!=n?n:!1;this.checkExists(e,mxUtils.bind(this,function(p){p?this.saveFile(e,f,mxUtils.bind(this,function(v){n?c(new DropboxLibrary(this.ui,f,v)):c(new DropboxFile(this.ui,f,v))}),l):l()}))};DropboxClient.prototype.saveFile=function(e,f,c,l,n){if(/[\\\/:\?\*"\|]/.test(e))l({message:mxResources.get("dropboxCharsNotAllowed")});else if(15E7<=f.length)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 150 MB)"});else{n=null!=n?n:"";var p=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+n+e,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([f],{type:"text/plain"})})});this.executePromise(p,c,l)}};DropboxClient.prototype.pickLibrary=function(e){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(f){if(this.ui.spinner.spin(document.body,-mxResources.get("loading"))){var c=mxUtils.bind(this,function(p){this.ui.spinner.stop();this.ui.handleError(p)}),l=null!=f[0].link?f[0].link.indexOf(this.appPath):-1;if(0<l){var n=decodeURIComponent(f[0].link.substring(l+this.appPath.length-1));this.readFile({path:n},mxUtils.bind(this,function(p,u){if(null!=u&&u.id==f[0].id)try{this.ui.spinner.stop(),e(n.substring(1),new DropboxLibrary(this.ui,p,u))}catch(F){this.ui.handleError(F)}else this.createLibrary(f[0],e,c)}),c)}else this.createLibrary(f[0],+mxResources.get("loading"))){var c=mxUtils.bind(this,function(p){this.ui.spinner.stop();this.ui.handleError(p)}),l=null!=f[0].link?f[0].link.indexOf(this.appPath):-1;if(0<l){var n=decodeURIComponent(f[0].link.substring(l+this.appPath.length-1));this.readFile({path:n},mxUtils.bind(this,function(p,v){if(null!=v&&v.id==f[0].id)try{this.ui.spinner.stop(),e(n.substring(1),new DropboxLibrary(this.ui,p,v))}catch(F){this.ui.handleError(F)}else this.createLibrary(f[0],e,c)}),c)}else this.createLibrary(f[0],e,c)}})})};DropboxClient.prototype.createLibrary=function(e,f,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[e.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(e.link,mxUtils.bind(this,function(l){this.insertFile(e.name,l,mxUtils.bind(this,function(n){try{this.ui.spinner.stop(),f(n.getHash().substring(1),n)}catch(p){c(p)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};DropboxClient.prototype.pickFile=function(e,f){null!=Dropbox.choose?(e=null!=e?e:mxUtils.bind(this,function(c,l){this.ui.loadFile(null!=c?"D"+encodeURIComponent(c):l.getHash(),null,l)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(f)this.ui.spinner.stop(),e(c[0].link);else{var l=mxUtils.bind(this,function(H){this.ui.spinner.stop();this.ui.handleError(H)}),n=mxUtils.bind(this,function(H,E){this.ui.spinner.stop();e(H,-E)}),p=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&p)n(c[0].link);else{var u=null!=c[0].link?c[0].link.indexOf(this.appPath):-1;if(0<u){var F=decodeURIComponent(c[0].link.substring(u+this.appPath.length-1));this.readFile({path:F},mxUtils.bind(this,function(H,E){if(null!=E&&E.id==c[0].id){var K=p?H.lastIndexOf(","):-1;this.ui.spinner.stop();var d=null;0<K&&(K=this.ui.extractGraphModelFromPng(H),null!=K&&0<K.length?H=K:d=new LocalFile(this,+E)}),p=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&p)n(c[0].link);else{var v=null!=c[0].link?c[0].link.indexOf(this.appPath):-1;if(0<v){var F=decodeURIComponent(c[0].link.substring(v+this.appPath.length-1));this.readFile({path:F},mxUtils.bind(this,function(H,E){if(null!=E&&E.id==c[0].id){var K=p?H.lastIndexOf(","):-1;this.ui.spinner.stop();var d=null;0<K&&(K=this.ui.extractGraphModelFromPng(H),null!=K&&0<K.length?H=K:d=new LocalFile(this,H,F,!0));e(F.substring(1),null!=d?d:new DropboxFile(this.ui,H,E))}else this.createFile(c[0],n,l)}),l,p)}else this.createFile(c[0],n,l)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(e,f,c){var l=/(\.png)$/i.test(e.name);this.ui.editor.loadUrl(e.link,mxUtils.bind(this,function(n){null!=n&&0<n.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[e.name]),mxUtils.bind(this,-function(){var p=l?n.lastIndexOf(","):-1;0<p&&(p=this.ui.extractGraphModelFromPng(n.substring(p+1)),null!=p&&0<p.length&&(n=p));this.insertFile(e.name,n,mxUtils.bind(this,function(u){f(e.name,u)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,l)}})();OneDriveFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.autosaveDelay=500;OneDriveFile.prototype.isRealtimeSupported=function(){return!0};+function(){var p=l?n.lastIndexOf(","):-1;0<p&&(p=this.ui.extractGraphModelFromPng(n.substring(p+1)),null!=p&&0<p.length&&(n=p));this.insertFile(e.name,n,mxUtils.bind(this,function(v){f(e.name,v)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,l)}})();OneDriveFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.autosaveDelay=500;OneDriveFile.prototype.isRealtimeSupported=function(){return!0};OneDriveFile.prototype.getFileUrl=function(){var b=this.meta.webUrl;b=b.substring(0,b.lastIndexOf("/"));if(null!=this.meta.parentReference)try{if("personal"==this.meta.parentReference.driveType)b="https://onedrive.live.com/?cid="+encodeURIComponent(this.meta.parentReference.driveId)+"&id="+encodeURIComponent(this.meta.id);else if("documentLibrary"==this.meta.parentReference.driveType){var e=this.meta.parentReference.path;e=e.substring(e.indexOf("/root:")+6);var f=this.meta.webUrl;b=f.substring(0,f.length-e.length-encodeURIComponent(this.meta.name).length-1);f=f.substring(f.indexOf("/",8));b=b+"/Forms/AllItems.aspx?id="+f+"&parent="+f.substring(0,f.lastIndexOf("/"))}else if("business"==this.meta.parentReference.driveType){b=this.meta["@microsoft.graph.downloadUrl"];var c=b.indexOf("/_layouts/15/download.aspx?");e=f=this.meta.webUrl;f=f.substring(8);f=f.substring(f.indexOf("/"));e=e.substring(0,e.lastIndexOf("/"));e=e.substring(e.indexOf("/",8));b=b.substring(0,c)+"/_layouts/15/onedrive.aspx?id="+f+"&parent="+e}}catch(l){}return b};OneDriveFile.prototype.getFolderUrl=function(){var b=this.meta.webUrl,e=encodeURIComponent(this.meta.name);b.substring(b.length-e.length,b.length)==e&&(b=b.substring(0,b.length-e.length));return b};OneDriveFile.prototype.share=function(){this.ui.openLink(this.getFileUrl())};OneDriveFile.prototype.getId=function(){return this.getIdOf(this.meta)};OneDriveFile.prototype.getParentId=function(){return this.getIdOf(this.meta,!0)};@@ -13853,46 +13854,46 @@ OneDriveFile.prototype.getCurrentUser=function(){return null!=this.ui.oneDrive?tOneDriveFile.prototype.setDescriptor=function(b){this.meta=b};OneDriveFile.prototype.getDescriptorEtag=function(b){return b.eTag};OneDriveFile.prototype.setDescriptorEtag=function(b,e){b.eTag=e};OneDriveFile.prototype.loadPatchDescriptor=function(b,e){var f=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(f+"?select=etag,file",mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?b(JSON.parse(c.getText())):e(this.ui.oneDrive.parseRequestText(c))}),e)};OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(b,e,f,c,l){this.doSave(this.getTitle(),b,e,f,c,l)};OneDriveFile.prototype.saveAs=function(b,e,f){this.doSave(b,!1,e,f)};OneDriveFile.prototype.doSave=function(b,e,f,c,l,n){var p=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=p;this.saveFile(b,e,f,c,l,n)}),c,l,n])};-OneDriveFile.prototype.saveFile=function(b,e,f,c,l,n){if(!this.isEditable())null!=f&&f();else if(!this.savingFile)if(this.getTitle()==b){var p=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var u=n||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),F=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(H,E){this.setModified(this.getShadowModified());+OneDriveFile.prototype.saveFile=function(b,e,f,c,l,n){if(!this.isEditable())null!=f&&f();else if(!this.savingFile)if(this.getTitle()==b){var p=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var v=n||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),F=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(H,E){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=H;this.fileSaved(E,F,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f()}),c)}),mxUtils.bind(this,function(H,E){try{this.savingFile=!1,this.isConflict(E)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();p()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&-c(H)}catch(K){if(this.savingFile=!1,null!=c)c(K);else throw K;}}),u)}catch(H){if(this.savingFile=!1,null!=c)c(H);else throw H;}});p()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(u){this.setModified(this.getShadowModified());this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(u)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};+c(H)}catch(K){if(this.savingFile=!1,null!=c)c(K);else throw K;}}),v)}catch(H){if(this.savingFile=!1,null!=c)c(H);else throw H;}});p()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(v){this.setModified(this.getShadowModified());this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(v)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};OneDriveFile.prototype.rename=function(b,e,f){var c=this.getCurrentRevisionId();this.ui.oneDrive.renameFile(this,b,mxUtils.bind(this,function(l){this.hasSameExtension(b,this.getTitle())?(this.meta=l,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(l)):(this.meta=l,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,f))}),f)};OneDriveFile.prototype.move=function(b,e,f){this.ui.oneDrive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.meta=c;this.descriptorChanged();null!=e&&e(c)}),f)};OneDriveLibrary=function(b,e,f){OneDriveFile.call(this,b,e,f)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(b,e,f){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(c){this.desc=c;null!=e&&e(c)}),f)};OneDriveLibrary.prototype.open=function(){};(function(){var b=null;window.OneDriveClient=function(e,f,c,l){null==f&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(f=!0);null==c&&(c=null!=window.Editor?Editor.oneDriveInlinePicker:!0);null==l&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(l=!0);DrawioClient.call(this,e,f?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=f;this.inlinePicker=c;this.noLogout=l;e=JSON.parse(this.token);null!=e&&(this.endpointHint=null!=e.endpointHint?e.endpointHint.replace("/Documents","/_layouts/15/onedrive.aspx"):e.endpointHint)};mxUtils.extend(OneDriveClient,DrawioClient);OneDriveClient.prototype.clientId=window.DRAWIO_MSGRAPH_CLIENT_ID||("test.draw.io"==window.location.hostname?"95e4b4ed-ed5c-4a05-935b-b411b4562ef2":"24b129a6-117b-4394-bdc8-3b9955e5cdef");OneDriveClient.prototype.clientId="app.diagrams.net"==window.location.hostname?"b5ff67d6-3155-4fca-965a-59a3655c4476":OneDriveClient.prototype.clientId;OneDriveClient.prototype.clientId="viewer.diagrams.net"==window.location.hostname?"417a451a-a343-4788-b6c1-901e63182565":OneDriveClient.prototype.clientId;OneDriveClient.prototype.scopes="user.read files.readwrite.all sites.read.all";OneDriveClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"microsoft";OneDriveClient.prototype.pickerRedirectUri=window.DRAWIO_SERVER_URL+"onedrive3.html";OneDriveClient.prototype.defEndpointHint="api.onedrive.com";OneDriveClient.prototype.endpointHint=OneDriveClient.prototype.defEndpointHint;OneDriveClient.prototype.rootId={id:"root",name:"root",parentReference:{driveId:"me"}};OneDriveClient.prototype.extension=".drawio";OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";OneDriveClient.prototype.authUrl="https://login.microsoftonline.com/"+(window.DRAWIO_MSGRAPH_TENANT_ID||"common");OneDriveClient.prototype.emptyFn=function(){};OneDriveClient.prototype.invalidFilenameRegExs=[/[~"#%\*:<>\?\/\\{\|}]/,/^\.lock$/i,/^CON$/i,/^PRN$/i,/^AUX$/i,/^NUL$/i,/^COM\d$/i,/^LPT\d$/i,/^desktop\.ini$/i,/_vti_/i];OneDriveClient.prototype.isValidFilename=function(e){if(null==e||""===e)return!1;for(var f=0;f<this.invalidFilenameRegExs.length;f++)if(this.invalidFilenameRegExs[f].test(e))return!1;return!0};OneDriveClient.prototype.get=function(e,f,c){e=new mxXmlRequest(e,null,"GET");e.setRequestHeaders=mxUtils.bind(this,function(l,n){l.setRequestHeader("Authorization","Bearer "+b)});e.send(f,c);return e};OneDriveClient.prototype.updateUser=function(e,f,c){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout);-this.get(this.baseUrl+"/me",mxUtils.bind(this,function(p){window.clearTimeout(n);if(l)if(200>p.getStatus()||300<=p.getStatus())c?f({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f));else try{var u=JSON.parse(p.getText());this.setUser(new DrawioUser(u.id,u.mail,u.displayName));e()}catch(F){f(F)}}),mxUtils.bind(this,function(p){window.clearTimeout(n);l&&f(p)}))};OneDriveClient.prototype.resetTokenRefresh=function(e){null!=+this.get(this.baseUrl+"/me",mxUtils.bind(this,function(p){window.clearTimeout(n);if(l)if(200>p.getStatus()||300<=p.getStatus())c?f({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f));else try{var v=JSON.parse(p.getText());this.setUser(new DrawioUser(v.id,v.mail,v.displayName));e()}catch(F){f(F)}}),mxUtils.bind(this,function(p){window.clearTimeout(n);l&&f(p)}))};OneDriveClient.prototype.resetTokenRefresh=function(e){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<e&&(this.tokenRefreshInterval=1E3*e,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*e))};OneDriveClient.prototype.authenticate=function(e,f,c){this.isExtAuth?(window.oneDriveAuth?window.oneDriveAuth:window.parent.oneDriveAuth)(mxUtils.bind(this,function(l){this.updateAuthInfo(l,!0,null==this.endpointHint,e,f)}),f,null!=window.urlParams&&"1"==urlParams.odAuthCancellable):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(l){200<=l.getStatus()&&299>=l.getStatus()?this.authenticateStep2(l.getText(),e,f,c):null!=f&&f(l)}),f)};OneDriveClient.prototype.updateAuthInfo=function(e,f,c,l,n){c&&this.setUser(null);b=e.access_token;delete e.access_token;e.expiresOn=Date.now()+1E3*e.expires_in;this.tokenExpiresOn=e.expiresOn;e.remember=f;this.setPersistentToken(JSON.stringify(e),!f);-this.resetTokenRefresh(e.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){l()}),n):l()};OneDriveClient.prototype.authenticateStep2=function(e,f,c,l){if(null==window.onOneDriveCallback){var n=mxUtils.bind(this,function(){var p=!0,u=JSON.parse(this.getPersistentToken(!0));null!=u?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(F){if(200<=F.getStatus()&&-299>=F.getStatus())try{this.updateAuthInfo(JSON.parse(F.getText()),u.remember,!1,f,c)}catch(H){c({message:mxResources.get("authFailed"),retry:n})}else this.clearPersistentToken(),this.setUser(null),b=null,401!=F.getStatus()&&400!=F.getStatus()||l?c({message:mxResources.get("accessDenied"),retry:n}):n()}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(F,H){var E=this.authUrl+"/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)++this.resetTokenRefresh(e.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){l()}),n):l()};OneDriveClient.prototype.authenticateStep2=function(e,f,c,l){if(null==window.onOneDriveCallback){var n=mxUtils.bind(this,function(){var p=!0,v=JSON.parse(this.getPersistentToken(!0));null!=v?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(F){if(200<=F.getStatus()&&+299>=F.getStatus())try{this.updateAuthInfo(JSON.parse(F.getText()),v.remember,!1,f,c)}catch(H){c({message:mxResources.get("authFailed"),retry:n})}else this.clearPersistentToken(),this.setUser(null),b=null,401!=F.getStatus()&&400!=F.getStatus()||l?c({message:mxResources.get("accessDenied"),retry:n}):n()}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(F,H){var E=this.authUrl+"/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes+(F?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e);E=window.open(E,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=E&&(window.onOneDriveCallback=mxUtils.bind(this,function(K,d){if(p){window.onOneDriveCallback=null;p=!1;try{null==K?c({message:mxResources.get("accessDenied"),retry:n}):(null!=H&&H(),this.updateAuthInfo(K,F,!0,f,c))}catch(g){c(g)}finally{null!=d&&d.close()}}else null!=d&&d.close()}),E.focus())}),mxUtils.bind(this,function(){p&&(window.onOneDriveCallback=null,p=!1,c({message:mxResources.get("accessDenied"),retry:n}))}))});n()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(e,f){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=c.getStatus()&&299>=c.getStatus()){var l=JSON.parse(c.getText());0<l.webUrl.indexOf(".sharepoint.com")?this.endpointHint=l.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var n=JSON.parse(this.getPersistentToken(!0));null!=n&&(n.endpointHint=this.endpointHint,this.setPersistentToken(JSON.stringify(n),!n.remember));e();return}}catch(p){}f({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),f)};OneDriveClient.prototype.executeRequest=-function(e,f,c){var l=mxUtils.bind(this,function(n){var p=!0,u=window.setTimeout(mxUtils.bind(this,function(){p=!1;c({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout);this.get(e,mxUtils.bind(this,function(F){window.clearTimeout(u);p&&(200<=F.getStatus()&&299>=F.getStatus()||404==F.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),f(F)):n||401!==F.getStatus()&&400!==F.getStatus()?c(this.parseRequestText(F)):this.authenticate(function(){l(!0)},c,n))}),mxUtils.bind(this,-function(F){window.clearTimeout(u);p&&c(F)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){l(!0)},c):l(!1)};OneDriveClient.prototype.checkToken=function(e,f){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(e,null!=f?f:this.emptyFn):e()};OneDriveClient.prototype.getItemRef=function(e){var f=e.split("/");return 1<f.length?{driveId:f[0],id:f[1]}:{id:e}};OneDriveClient.prototype.getItemURL=function(e,f){var c=e.split("/");return 1<+function(e,f,c){var l=mxUtils.bind(this,function(n){var p=!0,v=window.setTimeout(mxUtils.bind(this,function(){p=!1;c({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout);this.get(e,mxUtils.bind(this,function(F){window.clearTimeout(v);p&&(200<=F.getStatus()&&299>=F.getStatus()||404==F.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),f(F)):n||401!==F.getStatus()&&400!==F.getStatus()?c(this.parseRequestText(F)):this.authenticate(function(){l(!0)},c,n))}),mxUtils.bind(this,+function(F){window.clearTimeout(v);p&&c(F)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){l(!0)},c):l(!1)};OneDriveClient.prototype.checkToken=function(e,f){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(e,null!=f?f:this.emptyFn):e()};OneDriveClient.prototype.getItemRef=function(e){var f=e.split("/");return 1<f.length?{driveId:f[0],id:f[1]}:{id:e}};OneDriveClient.prototype.getItemURL=function(e,f){var c=e.split("/");return 1<c.length?(e=c[1],(f?"":this.baseUrl)+"/drives/"+c[0]+("root"==e?"/root":"/items/"+e)):(f?"":this.baseUrl)+"/me/drive/items/"+e};OneDriveClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(e){var f=e.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');0<f&&(e=e.substring(0,f));return e};OneDriveClient.prototype.getFile=function(e,f,c,l,n){n=null!=n?n:!1;this.executeRequest(this.getItemURL(e),-mxUtils.bind(this,function(p){if(200<=p.getStatus()&&299>=p.getStatus()){var u=JSON.parse(p.getText()),F=/\.png$/i.test(u.name);if(/\.v(dx|sdx?)$/i.test(u.name)||/\.gliffy$/i.test(u.name)||/\.pdf$/i.test(u.name)||!this.ui.useCanvasForExport&&F)this.ui.convertFile(u["@microsoft.graph.downloadUrl"],u.name,null!=u.file?u.file.mimeType:null,this.extension,f,c);else{var H=!0,E=window.setTimeout(mxUtils.bind(this,function(){H=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(u["@microsoft.graph.downloadUrl"],-mxUtils.bind(this,function(K){try{if(window.clearTimeout(E),H){/\.html$/i.test(u.name)&&(K=this.removeExtraHtmlContent(K));var d=null;if(0<(F?K.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(K);null!=g&&0<g.length?K=g:d=new LocalFile(this.ui,K,u.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==K.substring(0,32)){var k=K.substring(22);K=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(K,u["@microsoft.graph.downloadUrl"])?-this.ui.parseFileData(K,mxUtils.bind(this,function(v){try{4==v.readyState&&(200<=v.status&&299>=v.status?f(new LocalFile(this.ui,v.responseText,u.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(t){if(null!=c)c(t);else throw t;}}),u.name):null!=d?f(d):n?f(new OneDriveLibrary(this.ui,K,u)):f(new OneDriveFile(this.ui,K,u))}}catch(v){if(null!=c)c(v);else throw v;}}),mxUtils.bind(this,function(K){window.clearTimeout(E);H&&c(this.parseRequestText(K))}),F||null!=-u.file&&null!=u.file.mimeType&&("image/"==u.file.mimeType.substring(0,6)&&"image/svg"!=u.file.mimeType.substring(0,9)||"application/pdf"==u.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(p))}),function(p){null!=c&&(null!=p&&null!=p.error&&"ObjectHandle is Invalid"===p.error.message&&(p.error.message=mxResources.get("fileNotFoundOrDenied")),c(p))})};OneDriveClient.prototype.renameFile=+mxUtils.bind(this,function(p){if(200<=p.getStatus()&&299>=p.getStatus()){var v=JSON.parse(p.getText()),F=/\.png$/i.test(v.name);if(/\.v(dx|sdx?)$/i.test(v.name)||/\.gliffy$/i.test(v.name)||/\.pdf$/i.test(v.name)||!this.ui.useCanvasForExport&&F)this.ui.convertFile(v["@microsoft.graph.downloadUrl"],v.name,null!=v.file?v.file.mimeType:null,this.extension,f,c);else{var H=!0,E=window.setTimeout(mxUtils.bind(this,function(){H=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(v["@microsoft.graph.downloadUrl"],+mxUtils.bind(this,function(K){try{if(window.clearTimeout(E),H){/\.html$/i.test(v.name)&&(K=this.removeExtraHtmlContent(K));var d=null;if(0<(F?K.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(K);null!=g&&0<g.length?K=g:d=new LocalFile(this.ui,K,v.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==K.substring(0,32)){var k=K.substring(22);K=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(K,v["@microsoft.graph.downloadUrl"])?+this.ui.parseFileData(K,mxUtils.bind(this,function(u){try{4==u.readyState&&(200<=u.status&&299>=u.status?f(new LocalFile(this.ui,u.responseText,v.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(t){if(null!=c)c(t);else throw t;}}),v.name):null!=d?f(d):n?f(new OneDriveLibrary(this.ui,K,v)):f(new OneDriveFile(this.ui,K,v))}}catch(u){if(null!=c)c(u);else throw u;}}),mxUtils.bind(this,function(K){window.clearTimeout(E);H&&c(this.parseRequestText(K))}),F||null!=+v.file&&null!=v.file.mimeType&&("image/"==v.file.mimeType.substring(0,6)&&"image/svg"!=v.file.mimeType.substring(0,9)||"application/pdf"==v.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(p))}),function(p){null!=c&&(null!=p&&null!=p.error&&"ObjectHandle is Invalid"===p.error.message&&(p.error.message=mxResources.get("fileNotFoundOrDenied")),c(p))})};OneDriveClient.prototype.renameFile=function(e,f,c,l){null!=e&&null!=f&&(this.isValidFilename(f)?this.checkExists(e.getParentId(),f,!1,mxUtils.bind(this,function(n){n?this.writeFile(this.getItemURL(e.getId()),JSON.stringify({name:f}),"PATCH","application/json",c,l):l()})):l({message:this.invalidFilenameRegExs[0].test(f)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(e,f,c,l){f=this.getItemRef(f);var n=this.getItemRef(e);f.driveId!=n.driveId?l({message:mxResources.get("cannotMoveOneDrive",-null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(e),JSON.stringify({parentReference:f}),"PATCH","application/json",c,l)};OneDriveClient.prototype.insertLibrary=function(e,f,c,l,n){this.insertFile(e,f,c,l,!0,n)};OneDriveClient.prototype.insertFile=function(e,f,c,l,n,p){this.isValidFilename(e)?(n=null!=n?n:!1,this.checkExists(p,e,!0,mxUtils.bind(this,function(u){if(u){u="/me/drive/root";null!=p&&(u=this.getItemURL(p,!0));var F=mxUtils.bind(this,function(H){n?-c(new OneDriveLibrary(this.ui,f,H)):c(new OneDriveFile(this.ui,f,H))});u=this.baseUrl+u+"/children/"+encodeURIComponent(e)+"/content";4E6<=f.length?this.writeFile(u,"","PUT",null,mxUtils.bind(this,function(H){this.writeLargeFile(this.getItemURL(H.id),f,F,l)}),l):this.writeFile(u,f,"PUT",null,F,l)}else l()}))):l({message:this.invalidFilenameRegExs[0].test(e)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(e,f,+null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(e),JSON.stringify({parentReference:f}),"PATCH","application/json",c,l)};OneDriveClient.prototype.insertLibrary=function(e,f,c,l,n){this.insertFile(e,f,c,l,!0,n)};OneDriveClient.prototype.insertFile=function(e,f,c,l,n,p){this.isValidFilename(e)?(n=null!=n?n:!1,this.checkExists(p,e,!0,mxUtils.bind(this,function(v){if(v){v="/me/drive/root";null!=p&&(v=this.getItemURL(p,!0));var F=mxUtils.bind(this,function(H){n?+c(new OneDriveLibrary(this.ui,f,H)):c(new OneDriveFile(this.ui,f,H))});v=this.baseUrl+v+"/children/"+encodeURIComponent(e)+"/content";4E6<=f.length?this.writeFile(v,"","PUT",null,mxUtils.bind(this,function(H){this.writeLargeFile(this.getItemURL(H.id),f,F,l)}),l):this.writeFile(v,f,"PUT",null,F,l)}else l()}))):l({message:this.invalidFilenameRegExs[0].test(e)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(e,f,c,l){var n="/me/drive/root";null!=e&&(n=this.getItemURL(e,!0));this.executeRequest(this.baseUrl+n+"/children/"+encodeURIComponent(f),mxUtils.bind(this,function(p){404==p.getStatus()?l(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[f]),function(){l(!0)},function(){l(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){l(!1)}))}),function(p){l(!1)},!0)};OneDriveClient.prototype.saveFile=function(e,-f,c,l){try{var n=e.getData(),p=mxUtils.bind(this,function(F){var H=mxUtils.bind(this,function(K){f(K,n)}),E=this.getItemURL(e.getId());4E6<=F.length?this.writeLargeFile(E,F,H,c,l):this.writeFile(E+"/content/",F,"PUT",null,H,c,l)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e.meta.name)){var u=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(F){p(this.ui.base64ToBlob(F,"image/png"))}),c,this.ui.getCurrentFile()!=e?n:null,u.scale,u.border)}else p(n)}catch(F){c(F)}};-OneDriveClient.prototype.writeLargeFile=function(e,f,c,l,n){try{if(null!=f){var p=(new TextEncoder).encode(f).length,u=mxUtils.bind(this,function(H,E,K,d){try{d=d||0;var g=!0,k=null;k=window.setTimeout(mxUtils.bind(this,function(){g=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var v=f.substr(E,4194304),t=(new TextEncoder).encode(v).length,x=new mxXmlRequest(H,v,"PUT");x.setRequestHeaders=mxUtils.bind(this,function(A,J){A.setRequestHeader("Content-Range","bytes "+K+"-"+(K+t-1)+"/"+p)});x.send(mxUtils.bind(this,-function(A){window.clearTimeout(k);if(g){var J=A.getStatus();200<=J&&299>=J?(J=E+v.length,J==f.length?c(JSON.parse(A.getText())):u(H,J,K+t,d)):500<=J&&599>=J&&2>d?(d++,u(H,E,K,d)):l(this.parseRequestText(A),A)}}),mxUtils.bind(this,function(A){window.clearTimeout(k);g&&l(this.parseRequestText(A))}))}catch(A){l(A)}}),F=mxUtils.bind(this,function(H){try{var E=!0,K=null;try{K=window.setTimeout(mxUtils.bind(this,function(){E=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(g){}var d=new mxXmlRequest(e+-"/createUploadSession","{}","POST");d.setRequestHeaders=mxUtils.bind(this,function(g,k){g.setRequestHeader("Content-Type","application/json");g.setRequestHeader("Authorization","Bearer "+b);null!=n&&g.setRequestHeader("If-Match",n)});d.send(mxUtils.bind(this,function(g){window.clearTimeout(K);E&&(200<=g.getStatus()&&299>=g.getStatus()?(g=JSON.parse(g.getText()),u(g.uploadUrl,0,0)):H||401!==g.getStatus()?l(this.parseRequestText(g),g):this.authenticate(function(){F(!0)},l,H))}),mxUtils.bind(this,function(g){window.clearTimeout(K);-E&&l(this.parseRequestText(g))}))}catch(g){l(g)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){F(!0)},l):F(!1)}else l({message:mxResources.get("unknownError")})}catch(H){l(H)}};OneDriveClient.prototype.writeFile=function(e,f,c,l,n,p,u){try{if(null!=e&&null!=f){var F=mxUtils.bind(this,function(H){try{var E=!0,K=null;try{K=window.setTimeout(mxUtils.bind(this,function(){E=!1;p({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(g){}var d=new mxXmlRequest(e,f,c);d.setRequestHeaders=-mxUtils.bind(this,function(g,k){g.setRequestHeader("Content-Type",l||" ");g.setRequestHeader("Authorization","Bearer "+b);null!=u&&g.setRequestHeader("If-Match",u)});d.send(mxUtils.bind(this,function(g){window.clearTimeout(K);E&&(200<=g.getStatus()&&299>=g.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),n(JSON.parse(g.getText()))):H||401!==g.getStatus()?p(this.parseRequestText(g),g):this.authenticate(function(){F(!0)},p,H))}),mxUtils.bind(this,function(g){window.clearTimeout(K);+f,c,l){try{var n=e.getData(),p=mxUtils.bind(this,function(F){var H=mxUtils.bind(this,function(K){f(K,n)}),E=this.getItemURL(e.getId());4E6<=F.length?this.writeLargeFile(E,F,H,c,l):this.writeFile(E+"/content/",F,"PUT",null,H,c,l)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e.meta.name)){var v=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(F){p(this.ui.base64ToBlob(F,"image/png"))}),c,this.ui.getCurrentFile()!=e?n:null,v.scale,v.border)}else p(n)}catch(F){c(F)}};+OneDriveClient.prototype.writeLargeFile=function(e,f,c,l,n){try{if(null!=f){var p=(new TextEncoder).encode(f).length,v=mxUtils.bind(this,function(H,E,K,d){try{d=d||0;var g=!0,k=null;k=window.setTimeout(mxUtils.bind(this,function(){g=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var u=f.substr(E,4194304),t=(new TextEncoder).encode(u).length,x=new mxXmlRequest(H,u,"PUT");x.setRequestHeaders=mxUtils.bind(this,function(A,J){A.setRequestHeader("Content-Range","bytes "+K+"-"+(K+t-1)+"/"+p)});x.send(mxUtils.bind(this,+function(A){window.clearTimeout(k);if(g){var J=A.getStatus();200<=J&&299>=J?(J=E+u.length,J==f.length?c(JSON.parse(A.getText())):v(H,J,K+t,d)):500<=J&&599>=J&&2>d?(d++,v(H,E,K,d)):l(this.parseRequestText(A),A)}}),mxUtils.bind(this,function(A){window.clearTimeout(k);g&&l(this.parseRequestText(A))}))}catch(A){l(A)}}),F=mxUtils.bind(this,function(H){try{var E=!0,K=null;try{K=window.setTimeout(mxUtils.bind(this,function(){E=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(g){}var d=new mxXmlRequest(e++"/createUploadSession","{}","POST");d.setRequestHeaders=mxUtils.bind(this,function(g,k){g.setRequestHeader("Content-Type","application/json");g.setRequestHeader("Authorization","Bearer "+b);null!=n&&g.setRequestHeader("If-Match",n)});d.send(mxUtils.bind(this,function(g){window.clearTimeout(K);E&&(200<=g.getStatus()&&299>=g.getStatus()?(g=JSON.parse(g.getText()),v(g.uploadUrl,0,0)):H||401!==g.getStatus()?l(this.parseRequestText(g),g):this.authenticate(function(){F(!0)},l,H))}),mxUtils.bind(this,function(g){window.clearTimeout(K);+E&&l(this.parseRequestText(g))}))}catch(g){l(g)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){F(!0)},l):F(!1)}else l({message:mxResources.get("unknownError")})}catch(H){l(H)}};OneDriveClient.prototype.writeFile=function(e,f,c,l,n,p,v){try{if(null!=e&&null!=f){var F=mxUtils.bind(this,function(H){try{var E=!0,K=null;try{K=window.setTimeout(mxUtils.bind(this,function(){E=!1;p({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(g){}var d=new mxXmlRequest(e,f,c);d.setRequestHeaders=+mxUtils.bind(this,function(g,k){g.setRequestHeader("Content-Type",l||" ");g.setRequestHeader("Authorization","Bearer "+b);null!=v&&g.setRequestHeader("If-Match",v)});d.send(mxUtils.bind(this,function(g){window.clearTimeout(K);E&&(200<=g.getStatus()&&299>=g.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),n(JSON.parse(g.getText()))):H||401!==g.getStatus()?p(this.parseRequestText(g),g):this.authenticate(function(){F(!0)},p,H))}),mxUtils.bind(this,function(g){window.clearTimeout(K);E&&p(this.parseRequestText(g))}))}catch(g){p(g)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){F(!0)},p):F(!1)}else p({message:mxResources.get("unknownError")})}catch(H){p(H)}};OneDriveClient.prototype.parseRequestText=function(e){var f={message:mxResources.get("unknownError")};try{f=JSON.parse(e.getText()),f.status=e.getStatus(),f.error&&(f.error.status=f.status,f.error.code=f.status)}catch(c){}return f};OneDriveClient.prototype.pickLibrary=function(e){this.pickFile(function(f){e(f)})};-OneDriveClient.prototype.createInlinePicker=function(e,f,c){return mxUtils.bind(this,function(){var l=null,n=document.createElement("div");n.style.position="relative";var p=new CustomDialog(this.ui,n,mxUtils.bind(this,function(){var u=l.getSelectedItem();if(null!=u)if(f&&"object"==typeof u.folder)e({value:[u]});else{if(!u.folder&&this.ui.spinner.spin(document.body,mxResources.get("loading"))){var F=OneDriveFile.prototype.getIdOf(u);this.executeRequest(this.getItemURL(F),mxUtils.bind(this,function(H){this.ui.spinner.stop();+OneDriveClient.prototype.createInlinePicker=function(e,f,c){return mxUtils.bind(this,function(){var l=null,n=document.createElement("div");n.style.position="relative";var p=new CustomDialog(this.ui,n,mxUtils.bind(this,function(){var v=l.getSelectedItem();if(null!=v)if(f&&"object"==typeof v.folder)e({value:[v]});else{if(!v.folder&&this.ui.spinner.spin(document.body,mxResources.get("loading"))){var F=OneDriveFile.prototype.getIdOf(v);this.executeRequest(this.getItemURL(F),mxUtils.bind(this,function(H){this.ui.spinner.stop();200<=H.getStatus()&&299>=H.getStatus()?(H=JSON.parse(H.getText()),e(F,{value:[H]})):this.ui.handleError({code:H.getStatus()})}),mxUtils.bind(this,function(H){this.ui.spinner.stop();this.ui.handleError(H)}))}}else return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(f?"select":"open"),null,null,null,null,!0);this.ui.showDialog(p.container,550,500,!0,!0);n.style.width=p.container.parentNode.style.width;n.style.height=parseInt(p.container.parentNode.style.height)-60+"px";-l=new mxODPicker(n,null,mxUtils.bind(this,function(u,F,H,E){this.executeRequest(E?u:this.baseUrl+u,function(K){F(JSON.parse(K.getText()))},H)}),mxUtils.bind(this,function(u,F,H,E){this.executeRequest(this.baseUrl+"/drives/"+F+"/items/"+u,function(K){H(JSON.parse(K.getText()))},E)}),null,null,function(u){f?e({value:[u]}):e(OneDriveFile.prototype.getIdOf(u))},mxUtils.bind(this,function(u){this.ui.showError(mxResources.get("error"),u)}),f,null,null,null,null,c)})};OneDriveClient.prototype.pickFolder=+l=new mxODPicker(n,null,mxUtils.bind(this,function(v,F,H,E){this.executeRequest(E?v:this.baseUrl+v,function(K){F(JSON.parse(K.getText()))},H)}),mxUtils.bind(this,function(v,F,H,E){this.executeRequest(this.baseUrl+"/drives/"+F+"/items/"+v,function(K){H(JSON.parse(K.getText()))},E)}),null,null,function(v){f?e({value:[v]}):e(OneDriveFile.prototype.getIdOf(v))},mxUtils.bind(this,function(v){this.ui.showError(mxResources.get("error"),v)}),f,null,null,null,null,c)})};OneDriveClient.prototype.pickFolder=function(e,f){var c=mxUtils.bind(this,function(n){this.ui.showError(mxResources.get("error"),n&&n.message?n.message:n)}),l=mxUtils.bind(this,function(n){var p=this.inlinePicker?this.createInlinePicker(e,!0):mxUtils.bind(this,function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,-function(u){e(u);mxClient.IS_IE11&&(b=u.accessToken)}),cancel:mxUtils.bind(this,function(){}),error:c})});n?p():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){e({value:[this.rootId]})}),p,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){l(this.inlinePicker&&f)}),c):l(f)};OneDriveClient.prototype.pickFile=+function(v){e(v);mxClient.IS_IE11&&(b=v.accessToken)}),cancel:mxUtils.bind(this,function(){}),error:c})});n?p():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){e({value:[this.rootId]})}),p,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){l(this.inlinePicker&&f)}),c):l(f)};OneDriveClient.prototype.pickFile=function(e,f){e=null!=e?e:mxUtils.bind(this,function(n){this.ui.loadFile("W"+encodeURIComponent(n))});var c=mxUtils.bind(this,function(n){this.ui.showError(mxResources.get("error"),n&&n.message?n.message:n)}),l=this.inlinePicker?this.createInlinePicker(e,null,f):mxUtils.bind(this,function(){OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference,webUrl",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(n){null!=n&&null!=n.value&&0<n.value.length&&(mxClient.IS_IE11&&(b=n.accessToken),e(OneDriveFile.prototype.getIdOf(n.value[0]),n))}),cancel:mxUtils.bind(this,function(){}),error:c});null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){this.inlinePicker?l():this.ui.showDialog((new BtnDialog(this.ui,this,mxResources.get("open"),mxUtils.bind(this,function(){this.ui.hideDialog();l()}))).container,300,140,!0,!0)}),c):l()};OneDriveClient.prototype.logout=function(){if(isLocalStorage){var e=localStorage.getItem("odpickerv7cache");null!=e&&'{"odsdkLoginHint":{'==e.substring(0,19)&&localStorage.removeItem("odpickerv7cache")}window.open(this.authUrl+"/oauth2/v2.0/logout","logout","width=525,height=525,status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes");this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+@@ -13902,127 +13903,127 @@ GitHubFile.prototype.getFolderUrl=function(){return"https://github.com/"+encodeUGitHubFile.prototype.getPublicUrl=function(b){if(null!=this.meta.download_url)try{""!=(new URL(this.meta.download_url)).search?b(null):mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(e){b(200<=e.getStatus()&&299>=e.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){b(null)}))}catch(e){b(null)}else b(null)};GitHubFile.prototype.isConflict=function(b){return null!=b&&409==b.status};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(b,e){this.peer.getFile(this.getId(),b,e)};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(b){this.meta=b};GitHubFile.prototype.getDescriptorEtag=function(b){return b.sha};GitHubFile.prototype.setDescriptorEtag=function(b,e){b.sha=e};GitHubFile.prototype.save=function(b,e,f,c,l,n){this.doSave(this.getTitle(),e,f,c,l,n)};GitHubFile.prototype.saveAs=function(b,e,f){this.doSave(b,e,f)};GitHubFile.prototype.doSave=function(b,e,f,c,l,n){var p=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=p;this.saveFile(b,!1,e,f,c,l,n)}),f,c,l])};-GitHubFile.prototype.saveFile=function(b,e,f,c,l,n,p){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var u=mxUtils.bind(this,function(F){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var H=this.getCurrentEtag(),E=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(K){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,K);this.fileSaved(E,H,mxUtils.bind(this,function(){this.contentChanged();+GitHubFile.prototype.saveFile=function(b,e,f,c,l,n,p){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var v=mxUtils.bind(this,function(F){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var H=this.getCurrentEtag(),E=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(K){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,K);this.fileSaved(E,H,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f()}),c)}),mxUtils.bind(this,function(K){this.savingFile=!1;this.isConflict(K)?(this.inConflictState=!0,null!=c&&(K.commitMessage=F,c(K))):null!=c&&c(K)}),n,F)}catch(K){if(this.savingFile=!1,null!=c)c(K);else throw K;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(K){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(d){this.setModified(this.getShadowModified());this.savingFile=!1;-null!=f&&f();this.ui.fileLoaded(d)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,K,F)}))});null!=p?u(p):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(F){u(F)}),c)}else null!=f&&f()};GitHubLibrary=function(b,e,f){GitHubFile.call(this,b,e,f)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(e,f){DrawioClient.call(this,e,f||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"github2";GitHubClient.prototype.maxFileSize=-5E7;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(e){b=e};GitHubClient.prototype.updateUser=function(e,f,c){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),p=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),u=this.authToken+" "+b;p.setRequestHeaders=function(F,H){F.setRequestHeader("Authorization",u)};p.send(mxUtils.bind(this,function(){window.clearTimeout(n);l&&(401===+null!=f&&f();this.ui.fileLoaded(d)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,K,F)}))});null!=p?v(p):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(F){v(F)}),c)}else null!=f&&f()};GitHubLibrary=function(b,e,f){GitHubFile.call(this,b,e,f)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(e,f){DrawioClient.call(this,e,f||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"github2";GitHubClient.prototype.maxFileSize=+5E7;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(e){b=e};GitHubClient.prototype.updateUser=function(e,f,c){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),p=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),v=this.authToken+" "+b;p.setRequestHeaders=function(F,H){F.setRequestHeader("Authorization",v)};p.send(mxUtils.bind(this,function(){window.clearTimeout(n);l&&(401===p.getStatus()?c?f({code:p.getStatus(),message:this.getErrorMessage(p,mxResources.get("accessDenied"))}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)):200>p.getStatus()||300<=p.getStatus()?f({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(p.getText()))),e()))}),f)};GitHubClient.prototype.createUser=function(e){return new DrawioUser(e.id,e.email,e.name)};GitHubClient.prototype.authenticate=function(e,f){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};GitHubClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onGitHubCallback){var l=mxUtils.bind(this,function(){var n=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(p){if(200<=-p.getStatus()&&299>=p.getStatus())try{b=JSON.parse(p.getText()).access_token,this.setUser(null),f()}catch(u){c({message:mxResources.get("authFailed"),retry:l})}else this.clearPersistentToken(),this.setUser(null),b=null,401==p.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(p,u){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+-window.location.host+"&token="+e),"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(F,H){n?(window.onGitHubCallback=null,n=!1,null==F?c({message:mxResources.get("accessDenied"),retry:l}):(null!=u&&u(),b=F.access_token,this.setUser(null),p&&this.setPersistentToken("remembered"),f(),null!=H&&H.close())):null!=H&&H.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){n&&(window.onGitHubCallback=null,n=!1,c({message:mxResources.get("accessDenied"),+p.getStatus()&&299>=p.getStatus())try{b=JSON.parse(p.getText()).access_token,this.setUser(null),f()}catch(v){c({message:mxResources.get("authFailed"),retry:l})}else this.clearPersistentToken(),this.setUser(null),b=null,401==p.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(p,v){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="++window.location.host+"&token="+e),"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(F,H){n?(window.onGitHubCallback=null,n=!1,null==F?c({message:mxResources.get("accessDenied"),retry:l}):(null!=v&&v(),b=F.access_token,this.setUser(null),p&&this.setPersistentToken("remembered"),f(),null!=H&&H.close())):null!=H&&H.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){n&&(window.onGitHubCallback=null,n=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(e,f){try{var c=JSON.parse(e.getText());null!=c&&null!=c.message&&(f=c.message)}catch(l){}return f};GitHubClient.prototype.showAuthorizeDialog=function(e,f){this.ui.showError(mxResources.get("accessDenied"),mxResources.get("authorizationRequired"),mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/blog/single-repository-diagrams")}),e,mxResources.get("authorize"),-mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),f,480,null,!1)};GitHubClient.prototype.executeRequest=function(e,f,c,l,n){var p=mxUtils.bind(this,function(F){var H=!0,E=window.setTimeout(mxUtils.bind(this,function(){H=!1;c({code:App.ERROR_TIMEOUT,retry:u})}),this.ui.timeout),K=this.authToken+" "+b;e.setRequestHeaders=function(d,g){d.setRequestHeader("Authorization",-K)};e.send(mxUtils.bind(this,function(){window.clearTimeout(E);var d=mxUtils.bind(this,function(){var v=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){v();u()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(H)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())F?c({code:e.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){u(!0)},-c)})}):this.authenticate(function(){p(!0)},c);else if(403===e.getStatus()){var g=!1;try{var k=JSON.parse(e.getText());null!=k&&"Resource not accessible by integration"==k.message?d():(null!=k&&null!=k.errors&&0<k.errors.length&&(g="too_large"==k.errors[0].code),c({message:mxResources.get(g?"drawingTooLarge":"forbidden")}))}catch(v){c({message:mxResources.get(g?"drawingTooLarge":"forbidden")})}}else 404===e.getStatus()?n?c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):-d():409===e.getStatus()?c({code:e.getStatus(),status:409}):c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(d){window.clearTimeout(E);H&&c(d)}))}),u=mxUtils.bind(this,function(F){null==this.user?this.updateUser(function(){u(!0)},c,F):p(F)});null==b?this.authenticate(function(){u(!0)},c):u(!1)};GitHubClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};GitHubClient.prototype.getSha=function(e,f,c,l,n,p,u){var F=-"&t="+(new Date).getTime();e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+c+"?ref="+l+F,null,"HEAD");this.executeRequest(e,mxUtils.bind(this,function(H){try{n(H.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(E){p(E)}}),p,null,u)};GitHubClient.prototype.getFile=function(e,f,c,l,n){l=null!=l?l:!1;var p=e.split("/"),u=p[0],F=p[1],H=p[2];e=p.slice(3,p.length).join("/");p=/\.png$/i.test(e);if(!n&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&-p))if(null!=b){n=this.baseUrl+"/repos/"+u+"/"+F+"/contents/"+e+"?ref="+H;var E={Authorization:"token "+b};p=e.split("/");this.ui.convertFile(n,0<p.length?p[p.length-1]:e,null,this.extension,f,c,null,E)}else c({message:mxResources.get("accessDenied")});else p="&t="+(new Date).getTime(),e=new mxXmlRequest(this.baseUrl+"/repos/"+u+"/"+F+"/contents/"+e+"?ref="+H+p,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(K){try{var d=JSON.parse(K.getText());if(""==d.content&&null!=d.git_url){var g=-new mxXmlRequest(d.git_url,null,"GET");this.executeRequest(g,mxUtils.bind(this,function(k){k=JSON.parse(k.getText());""!=k.content?(d.content=k.content,d.encoding=k.encoding,f(this.createGitHubFile(u,F,H,d,l))):c({message:mxResources.get("errorLoadingFile")})}),c)}else f(this.createGitHubFile(u,F,H,d,l))}catch(k){c(k)}}),c)};GitHubClient.prototype.createGitHubFile=function(e,f,c,l,n){e={org:e,repo:f,ref:c,name:l.name,path:l.path,sha:l.sha,html_url:l.html_url,download_url:l.download_url};f=l.content;-"base64"===l.encoding&&(/\.jpe?g$/i.test(l.name)?f="data:image/jpeg;base64,"+f:/\.gif$/i.test(l.name)?f="data:image/gif;base64,"+f:/\.png$/i.test(l.name)?(l=this.ui.extractGraphModelFromPng(f),f=null!=l&&0<l.length?l:"data:image/png;base64,"+f):f=Base64.decode(f));return n?new GitHubLibrary(this.ui,f,e):new GitHubFile(this.ui,f,e)};GitHubClient.prototype.insertLibrary=function(e,f,c,l,n){this.insertFile(e,f,c,l,!0,n,!1)};GitHubClient.prototype.insertFile=function(e,f,c,l,n,p,u){n=null!=n?n:!1;p=p.split("/");-var F=p[0],H=p[1],E=p[2],K=p.slice(3,p.length).join("/");0<K.length&&(K+="/");K+=e;this.checkExists(F+"/"+H+"/"+E+"/"+K,!0,mxUtils.bind(this,function(d,g){d?n?(u||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(k){this.writeFile(F,H,E,K,k,f,g,mxUtils.bind(this,function(v){try{var t=JSON.parse(v.getText());c(this.createGitHubFile(F,H,E,t.content,n))}catch(x){l(x)}}),l)}),l)):c(new GitHubFile(this.ui,f,{org:F,repo:H,ref:E,name:e,path:K,sha:g,isNew:!0})):l()}))};GitHubClient.prototype.showCommitDialog=-function(e,f,c,l){var n=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(p){n(function(){c(p)})}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){l()}));this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile=function(e,f,c,l,n,p,u,F,H){p.length>=this.maxFileSize?H({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(p.length)+-" / 1 MB)"}):(c={path:l,branch:decodeURIComponent(c),message:n,content:p},null!=u&&(c.sha=u),e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+l,JSON.stringify(c),"PUT"),this.executeRequest(e,mxUtils.bind(this,function(E){F(E)}),mxUtils.bind(this,function(E){404==E.code&&(E.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,E.code=null);H(E)})))};GitHubClient.prototype.checkExists=function(e,f,c){var l=e.split("/"),n=l[0],p=l[1],u=l[2];e=l.slice(3,l.length).join("/");-this.getSha(n,p,e,u,mxUtils.bind(this,function(F){if(f){var H=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){H();c(!0,F)},function(){H();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(F){c(!0)}),!0)};GitHubClient.prototype.saveFile=function(e,f,c,l,n){var p=e.meta.org,u=e.meta.repo,F=e.meta.ref,H=e.meta.path,E=mxUtils.bind(this,function(d,-g){this.writeFile(p,u,F,H,n,g,d,mxUtils.bind(this,function(k){delete e.meta.isNew;f(JSON.parse(k.getText()).content.sha)}),mxUtils.bind(this,function(k){c(k)}))}),K=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(H)){var d=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){E(e.meta.sha,g)}),c,this.ui.getCurrentFile()!=e?e.getData():null,d.scale,d.border)}else E(e.meta.sha,Base64.encode(e.getData()))});l?this.getSha(p,u,-H,F,mxUtils.bind(this,function(d){e.meta.sha=d;K()}),c):K()};GitHubClient.prototype.pickLibrary=function(e){this.pickFile(e)};GitHubClient.prototype.pickFolder=function(e){this.showGitHubDialog(!1,e,!0)};GitHubClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("H"+encodeURIComponent(f))});this.showGitHubDialog(!0,e)};GitHubClient.prototype.showGitHubDialog=function(e,f,c){var l=null,n=null,p=null,u=null,F=document.createElement("div");F.style.whiteSpace=+mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),f,480,null,!1)};GitHubClient.prototype.executeRequest=function(e,f,c,l,n){var p=mxUtils.bind(this,function(F){var H=!0,E=window.setTimeout(mxUtils.bind(this,function(){H=!1;c({code:App.ERROR_TIMEOUT,retry:v})}),this.ui.timeout),K=this.authToken+" "+b;e.setRequestHeaders=function(d,g){d.setRequestHeader("Authorization",+K)};e.send(mxUtils.bind(this,function(){window.clearTimeout(E);var d=mxUtils.bind(this,function(){var u=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){u();v()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(H)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())F?c({code:e.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){v(!0)},+c)})}):this.authenticate(function(){p(!0)},c);else if(403===e.getStatus()){var g=!1;try{var k=JSON.parse(e.getText());null!=k&&"Resource not accessible by integration"==k.message?d():(null!=k&&null!=k.errors&&0<k.errors.length&&(g="too_large"==k.errors[0].code),c({message:mxResources.get(g?"drawingTooLarge":"forbidden")}))}catch(u){c({message:mxResources.get(g?"drawingTooLarge":"forbidden")})}}else 404===e.getStatus()?n?c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):+d():409===e.getStatus()?c({code:e.getStatus(),status:409}):c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(d){window.clearTimeout(E);H&&c(d)}))}),v=mxUtils.bind(this,function(F){null==this.user?this.updateUser(function(){v(!0)},c,F):p(F)});null==b?this.authenticate(function(){v(!0)},c):v(!1)};GitHubClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};GitHubClient.prototype.getSha=function(e,f,c,l,n,p,v){var F=+"&t="+(new Date).getTime();e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+c+"?ref="+l+F,null,"HEAD");this.executeRequest(e,mxUtils.bind(this,function(H){try{n(H.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(E){p(E)}}),p,null,v)};GitHubClient.prototype.getFile=function(e,f,c,l,n){l=null!=l?l:!1;var p=e.split("/"),v=p[0],F=p[1],H=p[2];e=p.slice(3,p.length).join("/");p=/\.png$/i.test(e);if(!n&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&+p))if(null!=b){n=this.baseUrl+"/repos/"+v+"/"+F+"/contents/"+e+"?ref="+H;var E={Authorization:"token "+b};p=e.split("/");this.ui.convertFile(n,0<p.length?p[p.length-1]:e,null,this.extension,f,c,null,E)}else c({message:mxResources.get("accessDenied")});else p="&t="+(new Date).getTime(),e=new mxXmlRequest(this.baseUrl+"/repos/"+v+"/"+F+"/contents/"+e+"?ref="+H+p,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(K){try{var d=JSON.parse(K.getText());if(""==d.content&&null!=d.git_url){var g=+new mxXmlRequest(d.git_url,null,"GET");this.executeRequest(g,mxUtils.bind(this,function(k){k=JSON.parse(k.getText());""!=k.content?(d.content=k.content,d.encoding=k.encoding,f(this.createGitHubFile(v,F,H,d,l))):c({message:mxResources.get("errorLoadingFile")})}),c)}else f(this.createGitHubFile(v,F,H,d,l))}catch(k){c(k)}}),c)};GitHubClient.prototype.createGitHubFile=function(e,f,c,l,n){e={org:e,repo:f,ref:c,name:l.name,path:l.path,sha:l.sha,html_url:l.html_url,download_url:l.download_url};f=l.content;+"base64"===l.encoding&&(/\.jpe?g$/i.test(l.name)?f="data:image/jpeg;base64,"+f:/\.gif$/i.test(l.name)?f="data:image/gif;base64,"+f:/\.png$/i.test(l.name)?(l=this.ui.extractGraphModelFromPng(f),f=null!=l&&0<l.length?l:"data:image/png;base64,"+f):f=Base64.decode(f));return n?new GitHubLibrary(this.ui,f,e):new GitHubFile(this.ui,f,e)};GitHubClient.prototype.insertLibrary=function(e,f,c,l,n){this.insertFile(e,f,c,l,!0,n,!1)};GitHubClient.prototype.insertFile=function(e,f,c,l,n,p,v){n=null!=n?n:!1;p=p.split("/");+var F=p[0],H=p[1],E=p[2],K=p.slice(3,p.length).join("/");0<K.length&&(K+="/");K+=e;this.checkExists(F+"/"+H+"/"+E+"/"+K,!0,mxUtils.bind(this,function(d,g){d?n?(v||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(k){this.writeFile(F,H,E,K,k,f,g,mxUtils.bind(this,function(u){try{var t=JSON.parse(u.getText());c(this.createGitHubFile(F,H,E,t.content,n))}catch(x){l(x)}}),l)}),l)):c(new GitHubFile(this.ui,f,{org:F,repo:H,ref:E,name:e,path:K,sha:g,isNew:!0})):l()}))};GitHubClient.prototype.showCommitDialog=+function(e,f,c,l){var n=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(p){n(function(){c(p)})}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){l()}));this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile=function(e,f,c,l,n,p,v,F,H){p.length>=this.maxFileSize?H({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(p.length)++" / 1 MB)"}):(c={path:l,branch:decodeURIComponent(c),message:n,content:p},null!=v&&(c.sha=v),e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+l,JSON.stringify(c),"PUT"),this.executeRequest(e,mxUtils.bind(this,function(E){F(E)}),mxUtils.bind(this,function(E){404==E.code&&(E.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,E.code=null);H(E)})))};GitHubClient.prototype.checkExists=function(e,f,c){var l=e.split("/"),n=l[0],p=l[1],v=l[2];e=l.slice(3,l.length).join("/");+this.getSha(n,p,e,v,mxUtils.bind(this,function(F){if(f){var H=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){H();c(!0,F)},function(){H();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(F){c(!0)}),!0)};GitHubClient.prototype.saveFile=function(e,f,c,l,n){var p=e.meta.org,v=e.meta.repo,F=e.meta.ref,H=e.meta.path,E=mxUtils.bind(this,function(d,+g){this.writeFile(p,v,F,H,n,g,d,mxUtils.bind(this,function(k){delete e.meta.isNew;f(JSON.parse(k.getText()).content.sha)}),mxUtils.bind(this,function(k){c(k)}))}),K=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(H)){var d=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){E(e.meta.sha,g)}),c,this.ui.getCurrentFile()!=e?e.getData():null,d.scale,d.border)}else E(e.meta.sha,Base64.encode(e.getData()))});l?this.getSha(p,v,+H,F,mxUtils.bind(this,function(d){e.meta.sha=d;K()}),c):K()};GitHubClient.prototype.pickLibrary=function(e){this.pickFile(e)};GitHubClient.prototype.pickFolder=function(e){this.showGitHubDialog(!1,e,!0)};GitHubClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("H"+encodeURIComponent(f))});this.showGitHubDialog(!0,e)};GitHubClient.prototype.showGitHubDialog=function(e,f,c){var l=null,n=null,p=null,v=null,F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.overflow="hidden";F.style.height="320px";var H=document.createElement("h3");mxUtils.write(H,mxResources.get(e?"selectFile":"selectFolder"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";F.appendChild(H);H=this.ui.createToolbarButton(Editor.refreshImage,mxResources.get("refresh"),mxUtils.bind(this,function(){D()}));H.style.position="absolute";H.style.right="40px";H.style.top="26px";F.appendChild(H);var E=document.createElement("div");E.style.whiteSpace=-"nowrap";E.style.border="1px solid lightgray";E.style.boxSizing="border-box";E.style.padding="4px";E.style.overflow="auto";E.style.lineHeight="1.2em";E.style.height="290px";F.appendChild(E);var K=document.createElement("div");K.style.textOverflow="ellipsis";K.style.boxSizing="border-box";K.style.overflow="hidden";K.style.padding="4px";K.style.width="100%";var d=new CustomDialog(this.ui,F,mxUtils.bind(this,function(){f(l+"/"+n+"/"+encodeURIComponent(p)+"/"+u)}),null,null,"https://www.drawio.com/blog/single-repository-diagrams",-null,null,null,null,[[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]],"16px");this.ui.showDialog(d.container,420,370,!0,!0);e&&d.okButton.parentNode.removeChild(d.okButton);var g=mxUtils.bind(this,function(G,R,V,Q){var P=document.createElement("a");P.setAttribute("title",G);P.style.cursor="pointer";mxUtils.write(P,G);mxEvent.addListener(P,"click",-R);Q&&(P.style.textDecoration="underline");null!=V&&(G=K.cloneNode(),G.style.padding=V,G.appendChild(P),P=G);return P}),k=mxUtils.bind(this,function(G){var R=document.createElement("div");R.style.marginBottom="8px";R.appendChild(g(l+"/"+n,mxUtils.bind(this,function(){u=null;D()}),null,!0));G||(mxUtils.write(R," / "),R.appendChild(g(decodeURIComponent(p),mxUtils.bind(this,function(){u=null;J()}),null,!0)));if(null!=u&&0<u.length){var V=u.split("/");for(G=0;G<V.length;G++)(function(Q){mxUtils.write(R,-" / ");R.appendChild(g(V[Q],mxUtils.bind(this,function(){u=V.slice(0,Q+1).join("/");A()}),null,!0))})(G)}E.appendChild(R)}),v=mxUtils.bind(this,function(G){this.ui.handleError(G,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(u=p=n=l=null,D()):this.ui.hideDialog()}),null,{})}),t=null,x=null,A=mxUtils.bind(this,function(G){null==G&&(E.innerText="",G=1);var R=new mxXmlRequest(this.baseUrl+"/repos/"+l+"/"+n+"/contents/"+u+"?ref="+encodeURIComponent(p)+"&per_page=100&page="+-G,null,"GET");this.ui.spinner.spin(E,mxResources.get("loading"));d.okButton.removeAttribute("disabled");null!=x&&(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var V=mxUtils.bind(this,function(){A(G+1)});mxEvent.addListener(t,"click",V);this.executeRequest(R,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,-function(){this.ui.spinner.stop();1==G&&(k(),E.appendChild(g("../ [Up]",mxUtils.bind(this,function(){if(""==u)u=null,D();else{var C=u.split("/");u=C.slice(0,C.length-1).join("/");A()}}),"4px")));var P=JSON.parse(Q.getText());if(null==P||0==P.length)c||(mxUtils.br(E),mxUtils.write(E,mxResources.get("noFiles")));else{var q=!0,y=0,B=mxUtils.bind(this,function(C){for(var M=0;M<P.length;M++)mxUtils.bind(this,function(T,m){if(C==("dir"==T.type)){m=K.cloneNode();m.style.backgroundColor=q?Editor.isDarkMode()?-"#000000":"#eeeeee":"";q=!q;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("dir"==T.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;m.appendChild(z);m.appendChild(g(T.name+("dir"==T.type?"/":""),mxUtils.bind(this,function(){"dir"==T.type?(u=T.path,A()):e&&"file"==T.type&&(this.ui.hideDialog(),f(l+"/"+n+"/"+encodeURIComponent(p)+"/"+T.path))})));E.appendChild(m);y++}})(P[M],M)});B(!0);e&&B(!1)}}))}),v,!0)}),-J=mxUtils.bind(this,function(G,R){null==G&&(E.innerText="",G=1);var V=new mxXmlRequest(this.baseUrl+"/repos/"+l+"/"+n+"/branches?per_page=100&page="+G,null,"GET");d.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(E,mxResources.get("loading"));null!=x&&(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var Q=-mxUtils.bind(this,function(){J(G+1)});mxEvent.addListener(t,"click",Q);this.executeRequest(V,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==G&&(k(!0),E.appendChild(g("../ [Up]",mxUtils.bind(this,function(){u=null;D()}),"4px")));var q=JSON.parse(P.getText());if(null==q||0==q.length)mxUtils.br(E),mxUtils.write(E,mxResources.get("repositoryNotFound"));else if(1==q.length&&R)p=q[0].name,u="",A();else{for(var y=0;y<q.length;y++)mxUtils.bind(this,-function(B,C){var M=K.cloneNode();M.style.backgroundColor=0==C%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";M.appendChild(g(B.name,mxUtils.bind(this,function(){p=B.name;u="";A()})));E.appendChild(M)})(q[y],y);100==q.length&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&Q()},mxEvent.addListener(E,"scroll",x))}}))}),v)}),D=mxUtils.bind(this,function(G){null==G&&(E.innerText="",G=1);var R=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+G,null,"GET");d.okButton.setAttribute("disabled",-"disabled");this.ui.spinner.spin(E,mxResources.get("loading"));null!=x&&mxEvent.removeListener(E,"scroll",x);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var V=mxUtils.bind(this,function(){D(G+1)});mxEvent.addListener(t,"click",V);this.executeRequest(R,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();var P=JSON.parse(Q.getText());-if(null==P||0==P.length)mxUtils.br(E),mxUtils.write(E,mxResources.get("repositoryNotFound"));else{1==G&&(E.appendChild(g(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var y=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(B){if(null!=B){var C=B.split("/");if(1<C.length){B=C[0];var M=C[1];3>C.length?(l=B,n=M,u=p=null,J()):this.ui.spinner.spin(E,mxResources.get("loading"))&&(C=encodeURIComponent(C.slice(2,C.length).join("/")),this.getFile(B+-"/"+M+"/"+C,mxUtils.bind(this,function(T){this.ui.spinner.stop();l=T.meta.org;n=T.meta.repo;p=decodeURIComponent(T.meta.ref);u="";A()}),mxUtils.bind(this,function(T){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(y.container,300,80,!0,!1);y.init()}))),mxUtils.br(E),mxUtils.br(E));for(var q=0;q<P.length;q++)mxUtils.bind(this,-function(y,B){var C=K.cloneNode();C.style.backgroundColor=0==B%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";C.appendChild(g(y.full_name,mxUtils.bind(this,function(){l=y.owner.login;n=y.name;u="";J(null,!0)})));E.appendChild(C)})(P[q],q)}100==P.length&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&V()},mxEvent.addListener(E,"scroll",x))}))}),v)});D()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};+"nowrap";E.style.border="1px solid lightgray";E.style.boxSizing="border-box";E.style.padding="4px";E.style.overflow="auto";E.style.lineHeight="1.2em";E.style.height="290px";F.appendChild(E);var K=document.createElement("div");K.style.textOverflow="ellipsis";K.style.boxSizing="border-box";K.style.overflow="hidden";K.style.padding="4px";K.style.width="100%";var d=new CustomDialog(this.ui,F,mxUtils.bind(this,function(){f(l+"/"+n+"/"+encodeURIComponent(p)+"/"+v)}),null,null,"https://www.drawio.com/blog/single-repository-diagrams",+null,null,null,null,[[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]],"16px");this.ui.showDialog(d.container,420,370,!0,!0);e&&d.okButton.parentNode.removeChild(d.okButton);var g=mxUtils.bind(this,function(G,S,U,P){var O=document.createElement("a");O.setAttribute("title",G);O.style.cursor="pointer";mxUtils.write(O,G);mxEvent.addListener(O,"click",+S);P&&(O.style.textDecoration="underline");null!=U&&(G=K.cloneNode(),G.style.padding=U,G.appendChild(O),O=G);return O}),k=mxUtils.bind(this,function(G){var S=document.createElement("div");S.style.marginBottom="8px";S.appendChild(g(l+"/"+n,mxUtils.bind(this,function(){v=null;D()}),null,!0));G||(mxUtils.write(S," / "),S.appendChild(g(decodeURIComponent(p),mxUtils.bind(this,function(){v=null;J()}),null,!0)));if(null!=v&&0<v.length){var U=v.split("/");for(G=0;G<U.length;G++)(function(P){mxUtils.write(S,+" / ");S.appendChild(g(U[P],mxUtils.bind(this,function(){v=U.slice(0,P+1).join("/");A()}),null,!0))})(G)}E.appendChild(S)}),u=mxUtils.bind(this,function(G){this.ui.handleError(G,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(v=p=n=l=null,D()):this.ui.hideDialog()}),null,{})}),t=null,x=null,A=mxUtils.bind(this,function(G){null==G&&(E.innerText="",G=1);var S=new mxXmlRequest(this.baseUrl+"/repos/"+l+"/"+n+"/contents/"+v+"?ref="+encodeURIComponent(p)+"&per_page=100&page="++G,null,"GET");this.ui.spinner.spin(E,mxResources.get("loading"));d.okButton.removeAttribute("disabled");null!=x&&(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var U=mxUtils.bind(this,function(){A(G+1)});mxEvent.addListener(t,"click",U);this.executeRequest(S,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,+function(){this.ui.spinner.stop();1==G&&(k(),E.appendChild(g("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,D();else{var C=v.split("/");v=C.slice(0,C.length-1).join("/");A()}}),"4px")));var O=JSON.parse(P.getText());if(null==O||0==O.length)c||(mxUtils.br(E),mxUtils.write(E,mxResources.get("noFiles")));else{var q=!0,y=0,B=mxUtils.bind(this,function(C){for(var M=0;M<O.length;M++)mxUtils.bind(this,function(T,m){if(C==("dir"==T.type)){m=K.cloneNode();m.style.backgroundColor=q?Editor.isDarkMode()?+"#000000":"#eeeeee":"";q=!q;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("dir"==T.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;m.appendChild(z);m.appendChild(g(T.name+("dir"==T.type?"/":""),mxUtils.bind(this,function(){"dir"==T.type?(v=T.path,A()):e&&"file"==T.type&&(this.ui.hideDialog(),f(l+"/"+n+"/"+encodeURIComponent(p)+"/"+T.path))})));E.appendChild(m);y++}})(O[M],M)});B(!0);e&&B(!1)}}))}),u,!0)}),+J=mxUtils.bind(this,function(G,S){null==G&&(E.innerText="",G=1);var U=new mxXmlRequest(this.baseUrl+"/repos/"+l+"/"+n+"/branches?per_page=100&page="+G,null,"GET");d.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(E,mxResources.get("loading"));null!=x&&(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var P=+mxUtils.bind(this,function(){J(G+1)});mxEvent.addListener(t,"click",P);this.executeRequest(U,mxUtils.bind(this,function(O){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==G&&(k(!0),E.appendChild(g("../ [Up]",mxUtils.bind(this,function(){v=null;D()}),"4px")));var q=JSON.parse(O.getText());if(null==q||0==q.length)mxUtils.br(E),mxUtils.write(E,mxResources.get("repositoryNotFound"));else if(1==q.length&&S)p=q[0].name,v="",A();else{for(var y=0;y<q.length;y++)mxUtils.bind(this,+function(B,C){var M=K.cloneNode();M.style.backgroundColor=0==C%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";M.appendChild(g(B.name,mxUtils.bind(this,function(){p=B.name;v="";A()})));E.appendChild(M)})(q[y],y);100==q.length&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&P()},mxEvent.addListener(E,"scroll",x))}}))}),u)}),D=mxUtils.bind(this,function(G){null==G&&(E.innerText="",G=1);var S=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+G,null,"GET");d.okButton.setAttribute("disabled",+"disabled");this.ui.spinner.spin(E,mxResources.get("loading"));null!=x&&mxEvent.removeListener(E,"scroll",x);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var U=mxUtils.bind(this,function(){D(G+1)});mxEvent.addListener(t,"click",U);this.executeRequest(S,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();var O=JSON.parse(P.getText());+if(null==O||0==O.length)mxUtils.br(E),mxUtils.write(E,mxResources.get("repositoryNotFound"));else{1==G&&(E.appendChild(g(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var y=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(B){if(null!=B){var C=B.split("/");if(1<C.length){B=C[0];var M=C[1];3>C.length?(l=B,n=M,v=p=null,J()):this.ui.spinner.spin(E,mxResources.get("loading"))&&(C=encodeURIComponent(C.slice(2,C.length).join("/")),this.getFile(B++"/"+M+"/"+C,mxUtils.bind(this,function(T){this.ui.spinner.stop();l=T.meta.org;n=T.meta.repo;p=decodeURIComponent(T.meta.ref);v="";A()}),mxUtils.bind(this,function(T){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(y.container,300,80,!0,!1);y.init()}))),mxUtils.br(E),mxUtils.br(E));for(var q=0;q<O.length;q++)mxUtils.bind(this,+function(y,B){var C=K.cloneNode();C.style.backgroundColor=0==B%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";C.appendChild(g(y.full_name,mxUtils.bind(this,function(){l=y.owner.login;n=y.name;v="";J(null,!0)})));E.appendChild(C)})(O[q],q)}100==O.length&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&U()},mxEvent.addListener(E,"scroll",x))}))}),u)});D()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};TrelloFile.prototype.save=function(b,e,f){this.doSave(this.getTitle(),e,f)};TrelloFile.prototype.saveAs=function(b,e,f){this.doSave(b,e,f)};TrelloFile.prototype.doSave=function(b,e,f){var c=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(b,!1,e,f)}),f])};TrelloFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(l){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=l;this.contentChanged();null!=f&&f();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,function(l){this.savingFile=!1;null!=c&&c(l)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(l){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(n){this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(n);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,l)}))):null!=f&&f()};TrelloLibrary=function(b,e,f){TrelloFile.call(this,b,e,f)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e89d109082298ce91f6576f82f458551";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";TrelloClient.prototype.authenticate=function(b,e,f){f&&this.logout();f=mxUtils.bind(this,function(c,l){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){localStorage.setItem("drawio_trello_token",localStorage.trello_token);null!=l&&l();b()},error:function(){null!=l&&l();null!=e&&e(mxResources.get("loggedOut"))}})});this.isAuthorized()?f(!0):this.ui.showAuthDialog(this,!0,f)};TrelloClient.prototype.getLibrary=function(b,e,f){this.getFile(b,e,f,!1,!0)};-TrelloClient.prototype.getFile=function(b,e,f,c,l){l=null!=l?l:!1;var n=mxUtils.bind(this,function(){var p=b.split(this.SEPARATOR),u=!0,F=window.setTimeout(mxUtils.bind(this,function(){u=!1;f({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout);Trello.cards.get(p[0]+"/attachments/"+p[1],mxUtils.bind(this,function(H){window.clearTimeout(F);if(u){var E=/\.png$/i.test(H.name),K={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(H.name)||-/\.gliffy$/i.test(H.name)||!this.ui.useCanvasForExport&&E?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(H.url),H.name,H.mimeType,this.extension,e,f,null,K):(u=!0,F=window.setTimeout(mxUtils.bind(this,function(){u=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(H.url),mxUtils.bind(this,function(d){window.clearTimeout(F);if(u){H.compoundId=b;if(0<(E?d.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(d);null!=g&&0<g.length&&-(d=g)}l?e(new TrelloLibrary(this.ui,d,H)):e(new TrelloFile(this.ui,d,H))}}),mxUtils.bind(this,function(d,g){window.clearTimeout(F);u&&(401==g.status?this.authenticate(n,f,!0):f())}),E||null!=H.mimeType&&"image/"==H.mimeType.substring(0,6),null,null,null,K))}}),mxUtils.bind(this,function(H){window.clearTimeout(F);u&&(null!=H&&401==H.status?this.authenticate(n,f,!0):f())}))});this.authenticate(n,f)};TrelloClient.prototype.insertLibrary=function(b,e,f,c,l){this.insertFile(b,e,f,c,!0,l)};-TrelloClient.prototype.insertFile=function(b,e,f,c,l,n){l=null!=l?l:!1;var p=mxUtils.bind(this,function(){var u=mxUtils.bind(this,function(F){this.writeFile(b,F,n,mxUtils.bind(this,function(H){l?f(new TrelloLibrary(this.ui,e,H)):f(new TrelloFile(this.ui,e,H))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(F){u(this.ui.base64ToBlob(F,"image/png"))}),c,e):u(e)});this.authenticate(p,c)};-TrelloClient.prototype.saveFile=function(b,e,f){var c=b.meta.compoundId.split(this.SEPARATOR),l=mxUtils.bind(this,function(p){this.writeFile(b.meta.name,p,c[0],function(u){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){e(u)}),mxUtils.bind(this,function(F){null!=F&&401==F.status?this.authenticate(n,f,!0):f()}))},f)}),n=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(p){l(this.ui.base64ToBlob(p,+TrelloClient.prototype.getFile=function(b,e,f,c,l){l=null!=l?l:!1;var n=mxUtils.bind(this,function(){var p=b.split(this.SEPARATOR),v=!0,F=window.setTimeout(mxUtils.bind(this,function(){v=!1;f({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout);Trello.cards.get(p[0]+"/attachments/"+p[1],mxUtils.bind(this,function(H){window.clearTimeout(F);if(v){var E=/\.png$/i.test(H.name),K={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(H.name)||+/\.gliffy$/i.test(H.name)||!this.ui.useCanvasForExport&&E?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(H.url),H.name,H.mimeType,this.extension,e,f,null,K):(v=!0,F=window.setTimeout(mxUtils.bind(this,function(){v=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(H.url),mxUtils.bind(this,function(d){window.clearTimeout(F);if(v){H.compoundId=b;if(0<(E?d.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(d);null!=g&&0<g.length&&+(d=g)}l?e(new TrelloLibrary(this.ui,d,H)):e(new TrelloFile(this.ui,d,H))}}),mxUtils.bind(this,function(d,g){window.clearTimeout(F);v&&(401==g.status?this.authenticate(n,f,!0):f())}),E||null!=H.mimeType&&"image/"==H.mimeType.substring(0,6),null,null,null,K))}}),mxUtils.bind(this,function(H){window.clearTimeout(F);v&&(null!=H&&401==H.status?this.authenticate(n,f,!0):f())}))});this.authenticate(n,f)};TrelloClient.prototype.insertLibrary=function(b,e,f,c,l){this.insertFile(b,e,f,c,!0,l)};+TrelloClient.prototype.insertFile=function(b,e,f,c,l,n){l=null!=l?l:!1;var p=mxUtils.bind(this,function(){var v=mxUtils.bind(this,function(F){this.writeFile(b,F,n,mxUtils.bind(this,function(H){l?f(new TrelloLibrary(this.ui,e,H)):f(new TrelloFile(this.ui,e,H))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(F){v(this.ui.base64ToBlob(F,"image/png"))}),c,e):v(e)});this.authenticate(p,c)};+TrelloClient.prototype.saveFile=function(b,e,f){var c=b.meta.compoundId.split(this.SEPARATOR),l=mxUtils.bind(this,function(p){this.writeFile(b.meta.name,p,c[0],function(v){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){e(v)}),mxUtils.bind(this,function(F){null!=F&&401==F.status?this.authenticate(n,f,!0):f()}))},f)}),n=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(p){l(this.ui.base64ToBlob(p,"image/png"))}),f,this.ui.getCurrentFile()!=b?b.getData():null):l(b.getData())});this.authenticate(n,f)};-TrelloClient.prototype.writeFile=function(b,e,f,c,l){if(null!=b&&null!=e)if(e.length>=this.maxFileSize)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 10 MB)"});else{var n=mxUtils.bind(this,function(){var p=!0,u=window.setTimeout(mxUtils.bind(this,function(){p=!1;l({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout),F=new FormData;F.append("key",Trello.key());F.append("token",Trello.token());F.append("file","string"===typeof e?new Blob([e]):e,b);F.append("name",-b);var H=new XMLHttpRequest;H.responseType="json";H.onreadystatechange=mxUtils.bind(this,function(){if(4===H.readyState&&(window.clearTimeout(u),p))if(200==H.status){var E=H.response;E.compoundId=f+this.SEPARATOR+E.id;c(E)}else 401==H.status?this.authenticate(n,l,!0):l()});H.open("POST",this.baseUrl+"cards/"+f+"/attachments");H.send(F)});this.authenticate(n,l)}else l({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};+TrelloClient.prototype.writeFile=function(b,e,f,c,l){if(null!=b&&null!=e)if(e.length>=this.maxFileSize)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 10 MB)"});else{var n=mxUtils.bind(this,function(){var p=!0,v=window.setTimeout(mxUtils.bind(this,function(){p=!1;l({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout),F=new FormData;F.append("key",Trello.key());F.append("token",Trello.token());F.append("file","string"===typeof e?new Blob([e]):e,b);F.append("name",+b);var H=new XMLHttpRequest;H.responseType="json";H.onreadystatechange=mxUtils.bind(this,function(){if(4===H.readyState&&(window.clearTimeout(v),p))if(200==H.status){var E=H.response;E.compoundId=f+this.SEPARATOR+E.id;c(E)}else 401==H.status?this.authenticate(n,l,!0):l()});H.open("POST",this.baseUrl+"cards/"+f+"/attachments");H.send(F)});this.authenticate(n,l)}else l({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};TrelloClient.prototype.pickFolder=function(b){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,b)}),mxUtils.bind(this,function(e){this.ui.showError(mxResources.get("error"),e)}))};TrelloClient.prototype.pickFile=function(b,e){b=null!=b?b:mxUtils.bind(this,function(f){this.ui.loadFile("T"+encodeURIComponent(f))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,b)}),mxUtils.bind(this,function(f){this.ui.showError(mxResources.get("error"),f,mxResources.get("ok"))}))};-TrelloClient.prototype.showTrelloDialog=function(b,e){var f=null,c="@me",l=0,n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.height="224px";var p=document.createElement("h3");mxUtils.write(p,b?mxResources.get("selectFile"):mxResources.get("selectCard"));p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";n.appendChild(p);var u=document.createElement("div");u.style.whiteSpace="nowrap";u.style.overflow="auto";u.style.height=-"194px";n.appendChild(u);n=new CustomDialog(this.ui,n);this.ui.showDialog(n.container,340,290,!0,!0);n.okButton.parentNode.removeChild(n.okButton);var F=mxUtils.bind(this,function(k,v,t){l++;var x=document.createElement("div");x.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==l%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var A=document.createElement("a");A.style.cursor="pointer";if(null!=t){var J=document.createElement("img");-J.src=t.url;J.width=t.width;J.height=t.height;J.style="border: 1px solid black;margin:5px;vertical-align:middle";A.appendChild(J)}mxUtils.write(A,k);mxEvent.addListener(A,"click",v);x.appendChild(A);return x}),H=mxUtils.bind(this,function(k){this.ui.handleError(k,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),E=mxUtils.bind(this,function(){l=0;u.innerText="";this.ui.spinner.spin(u,mxResources.get("loading"));var k=mxUtils.bind(this,function(){Trello.cards.get(f+-"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(v){this.ui.spinner.stop();u.appendChild(F("../ [Up]",mxUtils.bind(this,function(){g()})));mxUtils.br(u);null==v||0==v.length?mxUtils.write(u,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var t=0;t<v.length;t++)mxUtils.bind(this,function(x){u.appendChild(F(x.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(f+this.SEPARATOR+x.id)}),null!=x.previews?x.previews[0]:null))})(v[t])})()}),mxUtils.bind(this,function(v){401==-v.status?this.authenticate(k,H,!0):null!=H&&H(v)}))});k()}),K=null,d=null,g=mxUtils.bind(this,function(k){null==k&&(l=0,u.innerText="",k=1);this.ui.spinner.spin(u,mxResources.get("loading"));null!=K&&null!=K.parentNode&&K.parentNode.removeChild(K);K=document.createElement("a");K.style.display="block";K.style.cursor="pointer";mxUtils.write(K,mxResources.get("more")+"...");var v=mxUtils.bind(this,function(){mxEvent.removeListener(u,"scroll",d);g(k+1)});mxEvent.addListener(K,"click",v);var t=mxUtils.bind(this,-function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:k-1},mxUtils.bind(this,function(x){this.ui.spinner.stop();x=null!=x?x.cards:null;if(null==x||0==x.length)mxUtils.write(u,mxResources.get("noFiles"));else{1==k&&(u.appendChild(F(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var J=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(D){null!=D&&(c=D,g())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");-this.ui.showDialog(J.container,300,80,!0,!1);J.init()}))),mxUtils.br(u));for(var A=0;A<x.length;A++)mxUtils.bind(this,function(J){u.appendChild(F(J.name,mxUtils.bind(this,function(){b?(f=J.id,E()):(this.ui.hideDialog(),e(J.id))})))})(x[A]);100==x.length&&(u.appendChild(K),d=function(){u.scrollTop>=u.scrollHeight-u.offsetHeight&&v()},mxEvent.addListener(u,"scroll",d))}}),mxUtils.bind(this,function(x){401==x.status?this.authenticate(t,H,!0):null!=H&&H({message:x.responseText})}))});t()});g()};+TrelloClient.prototype.showTrelloDialog=function(b,e){var f=null,c="@me",l=0,n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.height="224px";var p=document.createElement("h3");mxUtils.write(p,b?mxResources.get("selectFile"):mxResources.get("selectCard"));p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";n.appendChild(p);var v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.overflow="auto";v.style.height=+"194px";n.appendChild(v);n=new CustomDialog(this.ui,n);this.ui.showDialog(n.container,340,290,!0,!0);n.okButton.parentNode.removeChild(n.okButton);var F=mxUtils.bind(this,function(k,u,t){l++;var x=document.createElement("div");x.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==l%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var A=document.createElement("a");A.style.cursor="pointer";if(null!=t){var J=document.createElement("img");+J.src=t.url;J.width=t.width;J.height=t.height;J.style="border: 1px solid black;margin:5px;vertical-align:middle";A.appendChild(J)}mxUtils.write(A,k);mxEvent.addListener(A,"click",u);x.appendChild(A);return x}),H=mxUtils.bind(this,function(k){this.ui.handleError(k,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),E=mxUtils.bind(this,function(){l=0;v.innerText="";this.ui.spinner.spin(v,mxResources.get("loading"));var k=mxUtils.bind(this,function(){Trello.cards.get(f++"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(u){this.ui.spinner.stop();v.appendChild(F("../ [Up]",mxUtils.bind(this,function(){g()})));mxUtils.br(v);null==u||0==u.length?mxUtils.write(v,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var t=0;t<u.length;t++)mxUtils.bind(this,function(x){v.appendChild(F(x.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(f+this.SEPARATOR+x.id)}),null!=x.previews?x.previews[0]:null))})(u[t])})()}),mxUtils.bind(this,function(u){401==+u.status?this.authenticate(k,H,!0):null!=H&&H(u)}))});k()}),K=null,d=null,g=mxUtils.bind(this,function(k){null==k&&(l=0,v.innerText="",k=1);this.ui.spinner.spin(v,mxResources.get("loading"));null!=K&&null!=K.parentNode&&K.parentNode.removeChild(K);K=document.createElement("a");K.style.display="block";K.style.cursor="pointer";mxUtils.write(K,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){mxEvent.removeListener(v,"scroll",d);g(k+1)});mxEvent.addListener(K,"click",u);var t=mxUtils.bind(this,+function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:k-1},mxUtils.bind(this,function(x){this.ui.spinner.stop();x=null!=x?x.cards:null;if(null==x||0==x.length)mxUtils.write(v,mxResources.get("noFiles"));else{1==k&&(v.appendChild(F(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var J=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(D){null!=D&&(c=D,g())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");+this.ui.showDialog(J.container,300,80,!0,!1);J.init()}))),mxUtils.br(v));for(var A=0;A<x.length;A++)mxUtils.bind(this,function(J){v.appendChild(F(J.name,mxUtils.bind(this,function(){b?(f=J.id,E()):(this.ui.hideDialog(),e(J.id))})))})(x[A]);100==x.length&&(v.appendChild(K),d=function(){v.scrollTop>=v.scrollHeight-v.offsetHeight&&u()},mxEvent.addListener(v,"scroll",d))}}),mxUtils.bind(this,function(x){401==x.status?this.authenticate(t,H,!0):null!=H&&H({message:x.responseText})}))});t()});g()};TrelloClient.prototype.isAuthorized=function(){try{var b=localStorage.trello_token;null==b&&(b=localStorage.drawio_trello_token,null!=b&&localStorage.setItem("trello_token",b));return null!=b}catch(e){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("drawio_trello_token");Trello.deauthorize()};GitLabFile=function(b,e,f){GitHubFile.call(this,b,e,f);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.getFileUrl=function(){return this.meta.html_url};GitLabFile.prototype.getFolderUrl=function(){var b=this.getFileUrl();return b.substring(0,b.lastIndexOf("/"))};GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink(DRAWIO_GITLAB_URL+"/"+this.meta.org+"/"+encodeURIComponent(this.meta.repo)+"/-/project_members")};GitLabFile.prototype.getId=function(){return this.meta.org+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};GitLabFile.prototype.isConflict=function(b){return null!=b&&400==b.status};GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(b){return b.last_commit_id};GitLabFile.prototype.setDescriptorEtag=function(b,e){b.last_commit_id=e};GitLabLibrary=function(b,e,f){GitLabFile.call(this,b,e,f)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitLabLibrary.prototype.open=function(){};(function(){var b=null;window.GitLabClient=function(e){GitHubClient.call(this,e,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.maxFileSize=1E7;GitLabClient.prototype.authToken="Bearer";GitLabClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"gitlab";GitLabClient.prototype.authenticate=function(e,f){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};GitLabClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onGitLabCallback){var l=mxUtils.bind(this,function(){var n=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+-e),null,"GET")).send(mxUtils.bind(this,function(p){if(200<=p.getStatus()&&299>=p.getStatus())try{b=JSON.parse(p.getText()).access_token,this.setToken(b),this.setUser(null),f()}catch(u){c({message:mxResources.get("authFailed"),retry:l})}else this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==p.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(p,u){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+-this.clientId+"&scope="+this.scope+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(F,H){n?(window.onGitLabCallback=null,n=!1,null==F?c({message:mxResources.get("accessDenied"),retry:l}):(null!=u&&u(),b=F.access_token,this.setToken(b),this.setUser(null),p&&this.setPersistentToken("remembered"),f(),null!=H&&H.close())):-null!=H&&H.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){n&&(window.onGitLabCallback=null,n=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(e,f,c,l){var n=mxUtils.bind(this,function(u){var F=!0,H=window.setTimeout(mxUtils.bind(this,function(){F=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),E=this.authToken+-" "+b;e.setRequestHeaders=function(K,d){K.setRequestHeader("Authorization",E);K.setRequestHeader("PRIVATE_TOKEN",E);K.setRequestHeader("Content-Type","application/json")};e.send(mxUtils.bind(this,function(){window.clearTimeout(H);if(F)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())u?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){p(!0)},c)})}):this.authenticate(function(){n(!0)},c);else if(403===-e.getStatus()){var K=!1;try{var d=JSON.parse(e.getText());null!=d&&null!=d.errors&&0<d.errors.length&&(K="too_large"==d.errors[0].code)}catch(g){}c({message:mxResources.get(K?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(K){window.clearTimeout(H);F&&c(K)}))}),p=mxUtils.bind(this,function(u){null==-this.user?this.updateUser(function(){p(!0)},c,u):n(u)});null==b?this.authenticate(function(){p(!0)},c):p(!1)};GitLabClient.prototype.getRefIndex=function(e,f,c,l,n,p){if(null!=n)c(e,n);else{var u=e.length-2,F=mxUtils.bind(this,function(){if(2>u)l({message:mxResources.get("fileNotFound")});else{var H=Math.max(u-1,0),E=e.slice(0,H).join("/");H=e[H];var K=e[u],d=e.slice(u+1,e.length).join("/");E=this.baseUrl+"/projects/"+encodeURIComponent(E+"/"+H)+"/repository/"+(f?p?"branches?per_page=1&page=1&ref="+-K:"tree?path="+d+"&ref="+K:"files/"+encodeURIComponent(d)+"?ref="+K);var g=new mxXmlRequest(E,null,"HEAD");this.executeRequest(g,mxUtils.bind(this,function(){200==g.getStatus()?c(e,u):l({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==g.getStatus()?(u--,F()):l({message:mxResources.get("fileNotFound")})}))}});F()}};GitLabClient.prototype.getFile=function(e,f,c,l,n,p){l=null!=l?l:!1;this.getRefIndex(e.split("/"),!1,mxUtils.bind(this,function(u,F){var H=Math.max(F-1,0),-E=u.slice(0,H).join("/"),K=u[H],d=u[F];e=u.slice(F+1,u.length).join("/");u=/\.png$/i.test(e);if(!n&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&u))if(null!=b){H="&t="+(new Date).getTime();var g=this.baseUrl+"/projects/"+encodeURIComponent(E+"/"+K)+"/repository/files/"+encodeURIComponent(e)+"?ref="+d;u=e.split("/");this.ui.convertFile(g+H,0<u.length?u[u.length-1]:e,null,this.extension,f,c,mxUtils.bind(this,function(k,v,t){k=new mxXmlRequest(k,null,-"GET");this.executeRequest(k,mxUtils.bind(this,function(x){try{v(this.getFileContent(JSON.parse(x.getText())))}catch(A){t(A)}}),t)}))}else c({message:mxResources.get("accessDenied")});else H="&t="+(new Date).getTime(),g=this.baseUrl+"/projects/"+encodeURIComponent(E+"/"+K)+"/repository/files/"+encodeURIComponent(e)+"?ref="+d,u=new mxXmlRequest(g+H,null,"GET"),this.executeRequest(u,mxUtils.bind(this,function(k){try{f(this.createGitLabFile(E,K,d,JSON.parse(k.getText()),l,F))}catch(v){c(v)}}),c)}),c,-p)};GitLabClient.prototype.getFileContent=function(e){var f=e.file_name,c=e.content;"base64"===e.encoding&&(/\.jpe?g$/i.test(f)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(f)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(f)?c="data:application/pdf;base64,"+c:/\.png$/i.test(f)?(e=this.ui.extractGraphModelFromPng(c),c=null!=e&&0<e.length?e:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(e,f,c,l,n,p){var u=DRAWIO_GITLAB_URL+"/";e={org:e,repo:f,-ref:c,name:l.file_name,path:l.file_path,html_url:u+e+"/"+f+"/blob/"+c+"/"+l.file_path,download_url:u+e+"/"+f+"/raw/"+c+"/"+l.file_path+"?inline=false",last_commit_id:l.last_commit_id,refPos:p};l=this.getFileContent(l);return n?new GitLabLibrary(this.ui,l,e):new GitLabFile(this.ui,l,e)};GitLabClient.prototype.insertFile=function(e,f,c,l,n,p,u){n=null!=n?n:!1;p=p.split("/");this.getRefIndex(p,!0,mxUtils.bind(this,function(F,H){var E=Math.max(H-1,0),K=F.slice(0,E).join("/"),d=F[E],g=F[H];path=F.slice(H+-1,F.length).join("/");0<path.length&&(path+="/");path+=e;this.checkExists(K+"/"+d+"/"+g+"/"+path,!0,mxUtils.bind(this,function(k,v){k?n?(u||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(t){this.writeFile(K,d,g,path,t,f,v,mxUtils.bind(this,function(x){try{var A=JSON.parse(x.getText());c(this.createGitLabFile(K,d,g,null!=A.content?A.content:A,n,H))}catch(J){l(J)}}),l)}),l)):(k=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:K,repo:d,ref:g,name:e,path:path,html_url:k+-K+"/"+d+"/blob/"+g+"/"+path,download_url:k+K+"/"+d+"/raw/"+g+"/"+path+"?inline=false",refPos:H,last_commit_id:v,isNew:!0}))):l()}))}),l,null,4>=p.length)};GitLabClient.prototype.checkExists=function(e,f,c){this.getFile(e,mxUtils.bind(this,function(l){if(f){var n=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){n();c(!0,l.getCurrentEtag())},function(){n();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),-mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(l){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(e,f,c,l,n,p,u,F,H){if(p.length>=this.maxFileSize)H({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(p.length)+" / 10 MB)"});else{var E="POST";c={path:encodeURIComponent(l),branch:decodeURIComponent(c),commit_message:n,content:p,encoding:"base64"};null!=u&&(c.last_commit_id=u,E="PUT");e=this.baseUrl+"/projects/"+encodeURIComponent(e+"/"+f)+"/repository/files/"+-encodeURIComponent(l);E=new mxXmlRequest(e,JSON.stringify(c),E);this.executeRequest(E,mxUtils.bind(this,function(K){F(K)}),H)}};GitLabClient.prototype.saveFile=function(e,f,c,l,n){var p=e.meta.org,u=e.meta.repo,F=e.meta.ref,H=e.meta.path,E=mxUtils.bind(this,function(d,g){this.writeFile(p,u,F,H,n,g,d,mxUtils.bind(this,function(k){delete e.meta.isNew;this.getFile(p+"/"+u+"/"+F+"/"+H,mxUtils.bind(this,function(v){v.getData()==e.getData()?f(v.getCurrentEtag()):f({content:e.getCurrentEtag()})}),c,null,-null,e.meta.refPos)}),c)}),K=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(H)){var d=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){E(e.meta.last_commit_id,g)}),c,this.ui.getCurrentFile()!=e?e.getData():null,d.scale,d.border)}else E(e.meta.last_commit_id,Base64.encode(e.getData()))});l?this.getFile(p+"/"+u+"/"+F+"/"+H,mxUtils.bind(this,function(d){e.meta.last_commit_id=d.meta.last_commit_id;K()}),c):K()};GitLabClient.prototype.pickFolder=-function(e){this.showGitLabDialog(!1,e,!0)};GitLabClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("A"+encodeURIComponent(f))});this.showGitLabDialog(!0,e)};GitLabClient.prototype.showGitLabDialog=function(e,f,c){var l=null,n=null,p=null,u=null,F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.overflow="hidden";F.style.height="304px";var H=document.createElement("h3");mxUtils.write(H,mxResources.get(e?"selectFile":"selectFolder"));+e),null,"GET")).send(mxUtils.bind(this,function(p){if(200<=p.getStatus()&&299>=p.getStatus())try{b=JSON.parse(p.getText()).access_token,this.setToken(b),this.setUser(null),f()}catch(v){c({message:mxResources.get("authFailed"),retry:l})}else this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==p.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(p,v){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="++this.clientId+"&scope="+this.scope+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(F,H){n?(window.onGitLabCallback=null,n=!1,null==F?c({message:mxResources.get("accessDenied"),retry:l}):(null!=v&&v(),b=F.access_token,this.setToken(b),this.setUser(null),p&&this.setPersistentToken("remembered"),f(),null!=H&&H.close())):+null!=H&&H.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){n&&(window.onGitLabCallback=null,n=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(e,f,c,l){var n=mxUtils.bind(this,function(v){var F=!0,H=window.setTimeout(mxUtils.bind(this,function(){F=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),E=this.authToken++" "+b;e.setRequestHeaders=function(K,d){K.setRequestHeader("Authorization",E);K.setRequestHeader("PRIVATE_TOKEN",E);K.setRequestHeader("Content-Type","application/json")};e.send(mxUtils.bind(this,function(){window.clearTimeout(H);if(F)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())v?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){p(!0)},c)})}):this.authenticate(function(){n(!0)},c);else if(403===+e.getStatus()){var K=!1;try{var d=JSON.parse(e.getText());null!=d&&null!=d.errors&&0<d.errors.length&&(K="too_large"==d.errors[0].code)}catch(g){}c({message:mxResources.get(K?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(K){window.clearTimeout(H);F&&c(K)}))}),p=mxUtils.bind(this,function(v){null==+this.user?this.updateUser(function(){p(!0)},c,v):n(v)});null==b?this.authenticate(function(){p(!0)},c):p(!1)};GitLabClient.prototype.getRefIndex=function(e,f,c,l,n,p){if(null!=n)c(e,n);else{var v=e.length-2,F=mxUtils.bind(this,function(){if(2>v)l({message:mxResources.get("fileNotFound")});else{var H=Math.max(v-1,0),E=e.slice(0,H).join("/");H=e[H];var K=e[v],d=e.slice(v+1,e.length).join("/");E=this.baseUrl+"/projects/"+encodeURIComponent(E+"/"+H)+"/repository/"+(f?p?"branches?per_page=1&page=1&ref="++K:"tree?path="+d+"&ref="+K:"files/"+encodeURIComponent(d)+"?ref="+K);var g=new mxXmlRequest(E,null,"HEAD");this.executeRequest(g,mxUtils.bind(this,function(){200==g.getStatus()?c(e,v):l({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==g.getStatus()?(v--,F()):l({message:mxResources.get("fileNotFound")})}))}});F()}};GitLabClient.prototype.getFile=function(e,f,c,l,n,p){l=null!=l?l:!1;this.getRefIndex(e.split("/"),!1,mxUtils.bind(this,function(v,F){var H=Math.max(F-1,0),+E=v.slice(0,H).join("/"),K=v[H],d=v[F];e=v.slice(F+1,v.length).join("/");v=/\.png$/i.test(e);if(!n&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&v))if(null!=b){H="&t="+(new Date).getTime();var g=this.baseUrl+"/projects/"+encodeURIComponent(E+"/"+K)+"/repository/files/"+encodeURIComponent(e)+"?ref="+d;v=e.split("/");this.ui.convertFile(g+H,0<v.length?v[v.length-1]:e,null,this.extension,f,c,mxUtils.bind(this,function(k,u,t){k=new mxXmlRequest(k,null,+"GET");this.executeRequest(k,mxUtils.bind(this,function(x){try{u(this.getFileContent(JSON.parse(x.getText())))}catch(A){t(A)}}),t)}))}else c({message:mxResources.get("accessDenied")});else H="&t="+(new Date).getTime(),g=this.baseUrl+"/projects/"+encodeURIComponent(E+"/"+K)+"/repository/files/"+encodeURIComponent(e)+"?ref="+d,v=new mxXmlRequest(g+H,null,"GET"),this.executeRequest(v,mxUtils.bind(this,function(k){try{f(this.createGitLabFile(E,K,d,JSON.parse(k.getText()),l,F))}catch(u){c(u)}}),c)}),c,+p)};GitLabClient.prototype.getFileContent=function(e){var f=e.file_name,c=e.content;"base64"===e.encoding&&(/\.jpe?g$/i.test(f)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(f)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(f)?c="data:application/pdf;base64,"+c:/\.png$/i.test(f)?(e=this.ui.extractGraphModelFromPng(c),c=null!=e&&0<e.length?e:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(e,f,c,l,n,p){var v=DRAWIO_GITLAB_URL+"/";e={org:e,repo:f,+ref:c,name:l.file_name,path:l.file_path,html_url:v+e+"/"+f+"/blob/"+c+"/"+l.file_path,download_url:v+e+"/"+f+"/raw/"+c+"/"+l.file_path+"?inline=false",last_commit_id:l.last_commit_id,refPos:p};l=this.getFileContent(l);return n?new GitLabLibrary(this.ui,l,e):new GitLabFile(this.ui,l,e)};GitLabClient.prototype.insertFile=function(e,f,c,l,n,p,v){n=null!=n?n:!1;p=p.split("/");this.getRefIndex(p,!0,mxUtils.bind(this,function(F,H){var E=Math.max(H-1,0),K=F.slice(0,E).join("/"),d=F[E],g=F[H];path=F.slice(H++1,F.length).join("/");0<path.length&&(path+="/");path+=e;this.checkExists(K+"/"+d+"/"+g+"/"+path,!0,mxUtils.bind(this,function(k,u){k?n?(v||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(t){this.writeFile(K,d,g,path,t,f,u,mxUtils.bind(this,function(x){try{var A=JSON.parse(x.getText());c(this.createGitLabFile(K,d,g,null!=A.content?A.content:A,n,H))}catch(J){l(J)}}),l)}),l)):(k=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:K,repo:d,ref:g,name:e,path:path,html_url:k++K+"/"+d+"/blob/"+g+"/"+path,download_url:k+K+"/"+d+"/raw/"+g+"/"+path+"?inline=false",refPos:H,last_commit_id:u,isNew:!0}))):l()}))}),l,null,4>=p.length)};GitLabClient.prototype.checkExists=function(e,f,c){this.getFile(e,mxUtils.bind(this,function(l){if(f){var n=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){n();c(!0,l.getCurrentEtag())},function(){n();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),+mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(l){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(e,f,c,l,n,p,v,F,H){if(p.length>=this.maxFileSize)H({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(p.length)+" / 10 MB)"});else{var E="POST";c={path:encodeURIComponent(l),branch:decodeURIComponent(c),commit_message:n,content:p,encoding:"base64"};null!=v&&(c.last_commit_id=v,E="PUT");e=this.baseUrl+"/projects/"+encodeURIComponent(e+"/"+f)+"/repository/files/"++encodeURIComponent(l);E=new mxXmlRequest(e,JSON.stringify(c),E);this.executeRequest(E,mxUtils.bind(this,function(K){F(K)}),H)}};GitLabClient.prototype.saveFile=function(e,f,c,l,n){var p=e.meta.org,v=e.meta.repo,F=e.meta.ref,H=e.meta.path,E=mxUtils.bind(this,function(d,g){this.writeFile(p,v,F,H,n,g,d,mxUtils.bind(this,function(k){delete e.meta.isNew;this.getFile(p+"/"+v+"/"+F+"/"+H,mxUtils.bind(this,function(u){u.getData()==e.getData()?f(u.getCurrentEtag()):f({content:e.getCurrentEtag()})}),c,null,+null,e.meta.refPos)}),c)}),K=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(H)){var d=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){E(e.meta.last_commit_id,g)}),c,this.ui.getCurrentFile()!=e?e.getData():null,d.scale,d.border)}else E(e.meta.last_commit_id,Base64.encode(e.getData()))});l?this.getFile(p+"/"+v+"/"+F+"/"+H,mxUtils.bind(this,function(d){e.meta.last_commit_id=d.meta.last_commit_id;K()}),c):K()};GitLabClient.prototype.pickFolder=+function(e){this.showGitLabDialog(!1,e,!0)};GitLabClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("A"+encodeURIComponent(f))});this.showGitLabDialog(!0,e)};GitLabClient.prototype.showGitLabDialog=function(e,f,c){var l=null,n=null,p=null,v=null,F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.overflow="hidden";F.style.height="304px";var H=document.createElement("h3");mxUtils.write(H,mxResources.get(e?"selectFile":"selectFolder"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";F.appendChild(H);var E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.border="1px solid lightgray";E.style.boxSizing="border-box";E.style.padding="4px";E.style.overflow="auto";E.style.lineHeight="1.2em";E.style.height="274px";F.appendChild(E);var K=document.createElement("div");K.style.textOverflow="ellipsis";K.style.boxSizing="border-box";K.style.overflow="hidden";K.style.padding="4px";K.style.width=-"100%";var d=new CustomDialog(this.ui,F,mxUtils.bind(this,function(){f(l+"/"+n+"/"+encodeURIComponent(p)+"/"+u)}));this.ui.showDialog(d.container,420,370,!0,!0);e&&d.okButton.parentNode.removeChild(d.okButton);var g=mxUtils.bind(this,function(G,R,V,Q){var P=document.createElement("a");P.setAttribute("title",G);P.style.cursor="pointer";mxUtils.write(P,G);mxEvent.addListener(P,"click",R);Q&&(P.style.textDecoration="underline");null!=V&&(G=K.cloneNode(),G.style.padding=V,G.appendChild(P),P=G);return P}),-k=mxUtils.bind(this,function(G){var R=document.createElement("div");R.style.marginBottom="8px";R.appendChild(g(l+"/"+n,mxUtils.bind(this,function(){u=null;D()}),null,!0));G||(mxUtils.write(R," / "),R.appendChild(g(decodeURIComponent(p),mxUtils.bind(this,function(){u=null;J()}),null,!0)));if(null!=u&&0<u.length){var V=u.split("/");for(G=0;G<V.length;G++)(function(Q){mxUtils.write(R," / ");R.appendChild(g(V[Q],mxUtils.bind(this,function(){u=V.slice(0,Q+1).join("/");A()}),null,!0))})(G)}E.appendChild(R)}),-v=mxUtils.bind(this,function(G){this.ui.handleError(G,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(u=p=n=l=null,D()):this.ui.hideDialog()}))}),t=null,x=null,A=mxUtils.bind(this,function(G){null==G&&(E.innerText="",G=1);var R=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/tree?path="+u+"&ref="+p+"&per_page=100&page="+G,null,"GET");this.ui.spinner.spin(E,mxResources.get("loading"));d.okButton.removeAttribute("disabled");null!=x&&-(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var V=mxUtils.bind(this,function(){A(G+1)});mxEvent.addListener(t,"click",V);this.executeRequest(R,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==G&&(k(!p),E.appendChild(g("../ [Up]",mxUtils.bind(this,function(){if(""==-u||null==u)u=null,D();else{var C=u.split("/");u=C.slice(0,C.length-1).join("/");A()}}),"4px")));var P=JSON.parse(Q.getText());if(null==P||0==P.length)c||(mxUtils.br(E),mxUtils.write(E,mxResources.get("noFiles")));else{var q=!0,y=0,B=mxUtils.bind(this,function(C){for(var M=0;M<P.length;M++)mxUtils.bind(this,function(T){if(C==("tree"==T.type)){var m=K.cloneNode();m.style.backgroundColor=q?Editor.isDarkMode()?"#000000":"#eeeeee":"";q=!q;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("tree"==-T.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;m.appendChild(z);m.appendChild(g(T.name+("tree"==T.type?"/":""),mxUtils.bind(this,function(){"tree"==T.type?(u=T.path,A()):e&&"blob"==T.type&&(this.ui.hideDialog(),f(l+"/"+n+"/"+p+"/"+T.path))})));E.appendChild(m);y++}})(P[M])});B(!0);e&&B(!1);100==y&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&V()},mxEvent.addListener(E,"scroll",x))}}))}),-v,!0)}),J=mxUtils.bind(this,function(G,R){null==G&&(E.innerText="",G=1);var V=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/branches?per_page=100&page="+G,null,"GET");d.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(E,mxResources.get("loading"));null!=x&&(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,-mxResources.get("more")+"...");var Q=mxUtils.bind(this,function(){J(G+1)});mxEvent.addListener(t,"click",Q);this.executeRequest(V,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==G&&(k(!0),E.appendChild(g("../ [Up]",mxUtils.bind(this,function(){u=null;D()}),"4px")));var q=JSON.parse(P.getText());if(null==q||0==q.length)mxUtils.br(E),mxUtils.write(E,mxResources.get("repositoryNotFound"));else if(1==q.length&&R)p=q[0].name,u="",A();else{for(var y=-0;y<q.length;y++)mxUtils.bind(this,function(B,C){var M=K.cloneNode();M.style.backgroundColor=0==C%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";M.appendChild(g(B.name,mxUtils.bind(this,function(){p=encodeURIComponent(B.name);u="";A()})));E.appendChild(M)})(q[y],y);100==q.length&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&Q()},mxEvent.addListener(E,"scroll",x))}}))}),v)});d.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(E,mxResources.get("loading"));-var D=mxUtils.bind(this,function(G){var R=this.ui.spinner,V=0;this.ui.spinner.stop();var Q=function(){R.spin(E,mxResources.get("loading"));V+=1},P=function(){--V;0===V&&R.stop()};null==G&&(E.innerText="",G=1);null!=x&&(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var q=mxUtils.bind(this,function(){0===V&&D(G+1)});mxEvent.addListener(t,-"click",q);var y=mxUtils.bind(this,function(C){Q();var M=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(M,mxUtils.bind(this,function(T){this.ui.tryAndHandle(mxUtils.bind(this,function(){C(JSON.parse(T.getText()));P()}))}),v)}),B=mxUtils.bind(this,function(C,M){Q();var T=new mxXmlRequest(this.baseUrl+"/groups/"+C.id+"/projects?per_page=100",null,"GET");this.executeRequest(T,mxUtils.bind(this,function(m){this.ui.tryAndHandle(mxUtils.bind(this,function(){M(C,JSON.parse(m.getText()));-P()}))}),v)});y(mxUtils.bind(this,function(C){if(null==this.user)mxUtils.write(E,mxResources.get("loggedOut"));else{Q();var M=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+G,null,"GET");this.executeRequest(M,mxUtils.bind(this,function(T){T=JSON.parse(T.getText());if(null!=T&&0!=T.length||null!=C&&0!=C.length){1==G&&(E.appendChild(g(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===V){var I=new FilenameDialog(this.ui,"group/project",mxResources.get("ok"),-mxUtils.bind(this,function(L){null!=L&&(L=L.split("/"),1<L.length?(l=L.slice(0,L.length-1).join("/"),n=L[L.length-1],u="",J(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(I.container,300,80,!0,!1);I.init()}}))),mxUtils.br(E),mxUtils.br(E));for(var m=!0,z=0;z<T.length;z++)mxUtils.bind(this,function(I){var L=K.cloneNode();L.style.backgroundColor=m?Editor.isDarkMode()?"#000000":"#eeeeee":"";m=!m;L.appendChild(g(I.name_with_namespace,-mxUtils.bind(this,function(){0===V&&(l=I.owner.username,n=I.path,u="",J(null,!0))})));E.appendChild(L)})(T[z]);for(z=0;z<C.length;z++)Q(),B(C[z],mxUtils.bind(this,function(I,L){P();for(var N=0;N<L.length;N++){var O=K.cloneNode();O.style.backgroundColor=m?Editor.isDarkMode()?"#000000":"#eeeeee":"";m=!m;mxUtils.bind(this,function(S){O.appendChild(g(S.name_with_namespace,mxUtils.bind(this,function(){0===V&&(l=I.full_path,n=S.path,u="",J(null,!0))})));E.appendChild(O)})(L[N])}}));P()}else P(),mxUtils.br(E),-mxUtils.write(E,mxResources.get("repositoryNotFound"));100==T.length&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&q()},mxEvent.addListener(E,"scroll",x))}),v)}}))});b?this.user?D():this.updateUser(function(){D()},v,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){D()},v,!0)}),v)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));-this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,e,f,c,l,n,p){this.file=b;this.id=e;this.content=f;this.modifiedDate=c;this.createdDate=l;this.isResolved=n;this.user=p;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,f,c,l){e()};DrawioComment.prototype.editComment=function(b,e,f){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,f,c,l,n,p,u){DrawioComment.call(this,b,e,f,c,l,n,p);this.pCommentId=u};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,f,c,l){b={content:b.content};c?b.verb="resolve":l&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(n){e(n.replyId)}),f)};+"100%";var d=new CustomDialog(this.ui,F,mxUtils.bind(this,function(){f(l+"/"+n+"/"+encodeURIComponent(p)+"/"+v)}));this.ui.showDialog(d.container,420,370,!0,!0);e&&d.okButton.parentNode.removeChild(d.okButton);var g=mxUtils.bind(this,function(G,S,U,P){var O=document.createElement("a");O.setAttribute("title",G);O.style.cursor="pointer";mxUtils.write(O,G);mxEvent.addListener(O,"click",S);P&&(O.style.textDecoration="underline");null!=U&&(G=K.cloneNode(),G.style.padding=U,G.appendChild(O),O=G);return O}),+k=mxUtils.bind(this,function(G){var S=document.createElement("div");S.style.marginBottom="8px";S.appendChild(g(l+"/"+n,mxUtils.bind(this,function(){v=null;D()}),null,!0));G||(mxUtils.write(S," / "),S.appendChild(g(decodeURIComponent(p),mxUtils.bind(this,function(){v=null;J()}),null,!0)));if(null!=v&&0<v.length){var U=v.split("/");for(G=0;G<U.length;G++)(function(P){mxUtils.write(S," / ");S.appendChild(g(U[P],mxUtils.bind(this,function(){v=U.slice(0,P+1).join("/");A()}),null,!0))})(G)}E.appendChild(S)}),+u=mxUtils.bind(this,function(G){this.ui.handleError(G,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(v=p=n=l=null,D()):this.ui.hideDialog()}))}),t=null,x=null,A=mxUtils.bind(this,function(G){null==G&&(E.innerText="",G=1);var S=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/tree?path="+v+"&ref="+p+"&per_page=100&page="+G,null,"GET");this.ui.spinner.spin(E,mxResources.get("loading"));d.okButton.removeAttribute("disabled");null!=x&&+(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var U=mxUtils.bind(this,function(){A(G+1)});mxEvent.addListener(t,"click",U);this.executeRequest(S,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==G&&(k(!p),E.appendChild(g("../ [Up]",mxUtils.bind(this,function(){if(""==+v||null==v)v=null,D();else{var C=v.split("/");v=C.slice(0,C.length-1).join("/");A()}}),"4px")));var O=JSON.parse(P.getText());if(null==O||0==O.length)c||(mxUtils.br(E),mxUtils.write(E,mxResources.get("noFiles")));else{var q=!0,y=0,B=mxUtils.bind(this,function(C){for(var M=0;M<O.length;M++)mxUtils.bind(this,function(T){if(C==("tree"==T.type)){var m=K.cloneNode();m.style.backgroundColor=q?Editor.isDarkMode()?"#000000":"#eeeeee":"";q=!q;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("tree"==+T.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;m.appendChild(z);m.appendChild(g(T.name+("tree"==T.type?"/":""),mxUtils.bind(this,function(){"tree"==T.type?(v=T.path,A()):e&&"blob"==T.type&&(this.ui.hideDialog(),f(l+"/"+n+"/"+p+"/"+T.path))})));E.appendChild(m);y++}})(O[M])});B(!0);e&&B(!1);100==y&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&U()},mxEvent.addListener(E,"scroll",x))}}))}),+u,!0)}),J=mxUtils.bind(this,function(G,S){null==G&&(E.innerText="",G=1);var U=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/branches?per_page=100&page="+G,null,"GET");d.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(E,mxResources.get("loading"));null!=x&&(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,+mxResources.get("more")+"...");var P=mxUtils.bind(this,function(){J(G+1)});mxEvent.addListener(t,"click",P);this.executeRequest(U,mxUtils.bind(this,function(O){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==G&&(k(!0),E.appendChild(g("../ [Up]",mxUtils.bind(this,function(){v=null;D()}),"4px")));var q=JSON.parse(O.getText());if(null==q||0==q.length)mxUtils.br(E),mxUtils.write(E,mxResources.get("repositoryNotFound"));else if(1==q.length&&S)p=q[0].name,v="",A();else{for(var y=+0;y<q.length;y++)mxUtils.bind(this,function(B,C){var M=K.cloneNode();M.style.backgroundColor=0==C%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";M.appendChild(g(B.name,mxUtils.bind(this,function(){p=encodeURIComponent(B.name);v="";A()})));E.appendChild(M)})(q[y],y);100==q.length&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&P()},mxEvent.addListener(E,"scroll",x))}}))}),u)});d.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(E,mxResources.get("loading"));+var D=mxUtils.bind(this,function(G){var S=this.ui.spinner,U=0;this.ui.spinner.stop();var P=function(){S.spin(E,mxResources.get("loading"));U+=1},O=function(){--U;0===U&&S.stop()};null==G&&(E.innerText="",G=1);null!=x&&(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var q=mxUtils.bind(this,function(){0===U&&D(G+1)});mxEvent.addListener(t,+"click",q);var y=mxUtils.bind(this,function(C){P();var M=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(M,mxUtils.bind(this,function(T){this.ui.tryAndHandle(mxUtils.bind(this,function(){C(JSON.parse(T.getText()));O()}))}),u)}),B=mxUtils.bind(this,function(C,M){P();var T=new mxXmlRequest(this.baseUrl+"/groups/"+C.id+"/projects?per_page=100",null,"GET");this.executeRequest(T,mxUtils.bind(this,function(m){this.ui.tryAndHandle(mxUtils.bind(this,function(){M(C,JSON.parse(m.getText()));+O()}))}),u)});y(mxUtils.bind(this,function(C){if(null==this.user)mxUtils.write(E,mxResources.get("loggedOut"));else{P();var M=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+G,null,"GET");this.executeRequest(M,mxUtils.bind(this,function(T){T=JSON.parse(T.getText());if(null!=T&&0!=T.length||null!=C&&0!=C.length){1==G&&(E.appendChild(g(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===U){var I=new FilenameDialog(this.ui,"group/project",mxResources.get("ok"),+mxUtils.bind(this,function(L){null!=L&&(L=L.split("/"),1<L.length?(l=L.slice(0,L.length-1).join("/"),n=L[L.length-1],v="",J(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(I.container,300,80,!0,!1);I.init()}}))),mxUtils.br(E),mxUtils.br(E));for(var m=!0,z=0;z<T.length;z++)mxUtils.bind(this,function(I){var L=K.cloneNode();L.style.backgroundColor=m?Editor.isDarkMode()?"#000000":"#eeeeee":"";m=!m;L.appendChild(g(I.name_with_namespace,+mxUtils.bind(this,function(){0===U&&(l=I.owner.username,n=I.path,v="",J(null,!0))})));E.appendChild(L)})(T[z]);for(z=0;z<C.length;z++)P(),B(C[z],mxUtils.bind(this,function(I,L){O();for(var N=0;N<L.length;N++){var Q=K.cloneNode();Q.style.backgroundColor=m?Editor.isDarkMode()?"#000000":"#eeeeee":"";m=!m;mxUtils.bind(this,function(R){Q.appendChild(g(R.name_with_namespace,mxUtils.bind(this,function(){0===U&&(l=I.full_path,n=R.path,v="",J(null,!0))})));E.appendChild(Q)})(L[N])}}));O()}else O(),mxUtils.br(E),+mxUtils.write(E,mxResources.get("repositoryNotFound"));100==T.length&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&q()},mxEvent.addListener(E,"scroll",x))}),u)}}))});b?this.user?D():this.updateUser(function(){D()},u,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){D()},u,!0)}),u)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));+this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,e,f,c,l,n,p){this.file=b;this.id=e;this.content=f;this.modifiedDate=c;this.createdDate=l;this.isResolved=n;this.user=p;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,f,c,l){e()};DrawioComment.prototype.editComment=function(b,e,f){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,f,c,l,n,p,v){DrawioComment.call(this,b,e,f,c,l,n,p);this.pCommentId=v};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,f,c,l){b={content:b.content};c?b.verb="resolve":l&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(n){e(n.replyId)}),f)};DriveComment.prototype.editComment=function(b,e,f){this.content=b;b={content:b};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:b,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:b,method:"PATCH"},e,f)};-DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,l,n,p,u,F,H,E,K,d,g){function k(U,W){W=W||document;return W.querySelector(U)}function v(U,W,X){if(null==U["@microsoft.graph.downloadUrl"])if(null==U.parentReference)X();else{c(U.id,U.parentReference.driveId,function(ba){v(ba,W,X)},X);return}var Z=new XMLHttpRequest;Z.open("GET",U["@microsoft.graph.downloadUrl"]);var Y=U.file?"image/png"==U.file.mimeType:!1;Z.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ba=Z.responseText;-Y?(ba="data:image/png;base64,"+Editor.base64Encode(ba),ba=Editor.extractGraphModelFromPng(ba)):/\.pdf$/.test(U.name)&&(ba="data:application/pdf;base64,"+Editor.base64Encode(ba),ba=Editor.extractGraphModelFromPdf(ba));var ea=mxUtils.parseXml(ba),ca="mxlibrary"==ea.documentElement.nodeName?ea.documentElement:Editor.extractGraphModel(ea.documentElement);if(null!=ca){W(ca.ownerDocument);return}}catch(fa){}X()}};(Y||/\.pdf$/.test(U.name))&&Z.overrideMimeType&&Z.overrideMimeType("text/plain; charset=x-user-defined");-Z.send()}function t(){K&&null!=y?q.exportToCanvas(function(U){U=EditorUi.prototype.createImageDataUri(U,null,"png");p(B,U);n(B)},400,null,null,function(U){console.log(U)},600,null,null,null,null,null,y):(p(B,void 0),n(B))}function x(U){function W(X){N.style.background="transparent";N.innerText="";var Z=document.createElement("div");Z.className="odPreviewStatus";mxUtils.write(Z,X);N.appendChild(Z);P.stop()}if(null!=N)if(N.style.background="transparent",N.innerText="",null==U||U.folder||/\.drawiolib$/.test(U.name))W(mxResources.get("noPreview"));-else try{null!=U.remoteItem&&(U=U.remoteItem),z=U,P.spin(N),v(U,function(X){P.stop();if(z==U)if("mxlibrary"==X.documentElement.nodeName)W(mxResources.get("noPreview"));else{var Z=X.getElementsByTagName("diagram");y=AspectDialog.prototype.createViewer(N,0==Z.length?X.documentElement:Z[0],null,"transparent")}},function(){B=null;W(mxResources.get("notADiagramFile"))})}catch(X){B=null,W(mxResources.get("notADiagramFile"))}}function A(){var U=k(".odFilesBreadcrumb");if(null!=U){U.innerText="";for(var W=-0;W<T.length-1;W++){var X=document.createElement("span");X.className="odBCFolder";X.innerHTML=mxUtils.htmlEntities(T[W].name||mxResources.get("home"));U.appendChild(X);(function(Y,ba){X.addEventListener("click",function(){e(null);T=T.slice(0,ba);D(Y.driveId,Y.folderId,Y.siteId,Y.name)})})(T[W],W);var Z=document.createElement("span");Z.innerHTML=" > ";U.appendChild(Z)}null!=T[T.length-1]&&(W=document.createElement("span"),W.innerHTML=mxUtils.htmlEntities(1==T.length?mxResources.get(F?"selectFolder":-"officeSelDiag"):T[T.length-1].name||mxResources.get("home")),U.appendChild(W))}}function J(){if(null!=B&&!M)if("sharepoint"==C)D("site",null,B.id,B.displayName);else if("site"==C)D("subsite",null,B.id,B.name);else{var U=B.folder;B=B.remoteItem?B.remoteItem:B;var W=(B.parentReference?B.parentReference.driveId:null)||C,X=B.id;U?D(W,X,null,B.name):t()}}function D(U,W,X,Z,Y){function ba(qa){P.stop();var ua=document.createElement("table");ua.className="odFileListGrid";for(var ya=null,ja=0,ma=0;null!=-qa&&ma<qa.length;ma++){var ka=qa[ma];if(1!=fa||!ka.webUrl||0<ka.webUrl.indexOf("sharepoint.com/sites/")||0>ka.webUrl.indexOf("sharepoint.com/")){var Ba=ka.displayName||ka.name,sa=mxUtils.htmlEntities(ka.description||Ba);fa&&(ka.folder=2==fa?{isRoot:!0}:!0);var Ea=null!=ka.folder;if(!F||Ea){var wa=document.createElement("tr");wa.className=ja++%2?"odOddRow":"odEvenRow";var Ca=document.createElement("td");Ca.style.width="36px";var Da=document.createElement("img");Da.src="/images/"+(Ea?"folder.png":"file.png");-Da.className="odFileImg";Ca.appendChild(Da);wa.appendChild(Ca);Ca=document.createElement("td");Ea=document.createElement("div");Ea.className="odFileTitle";Ea.innerHTML=mxUtils.htmlEntities(Ba);Ea.setAttribute("title",sa);Ca.appendChild(Ea);wa.appendChild(Ca);ua.appendChild(wa);null==ya&&(ya=wa,ya.className+=" odRowSelected",B=ka,C=U,g||e(B));(function(Ka,Aa){wa.addEventListener("dblclick",J);wa.addEventListener("click",function(){ya!=Aa&&(ya.className=ya.className.replace("odRowSelected",""),ya=Aa,-ya.className+=" odRowSelected",B=Ka,C=U,g||e(B))})})(ka,wa)}}}0==ja?(qa=document.createElement("div"),qa.className="odEmptyFolder",qa.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),da.appendChild(qa)):da.appendChild(ua);A();M=!1}function ea(qa){f(qa?qa:ha,function(ua){if(ca){var ya=ua.value||[];if(g||fa)Array.prototype.push.apply(xa,ya);else{for(var ja=0;ja<ya.length;ja++){var ma=ya[ja],ka=ma.file?ma.file.mimeType:null;(ma.folder||"text/html"==ka||"text/xml"==-ka||"application/xml"==ka||"image/png"==ka||/\.svg$/.test(ma.name)||/\.html$/.test(ma.name)||/\.xml$/.test(ma.name)||/\.png$/.test(ma.name)||/\.drawio$/.test(ma.name)||/\.drawiolib$/.test(ma.name)||/\.pdf$/.test(ma.name))&&xa.push(ma)}xa.sort(function(Ba,sa){var Ea=Ba.name.toLowerCase(),wa=sa.name.toLowerCase();return Ba.folder&&!sa.folder?-1:!Ba.folder&&sa.folder?1:Ea<wa?-1:Ea>wa?1:0})}ua["@odata.nextLink"]&&1E3>xa.length?ea(ua["@odata.nextLink"]):(clearTimeout(aa),ba(xa))}},function(ua){if(ca){clearTimeout(aa);-var ya=null;try{ya=JSON.parse(ua.responseText).error.message}catch(ja){}u(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=ya?" ("+ya+")":""));M=!1;P.stop()}},null!=qa)}if(!M){k(".odCatsList").style.display="block";k(".odFilesSec").style.display="block";null!=N&&(N.innerText="",N.style.top="50%");var ca=M=!0,fa=0;m=arguments;var aa=setTimeout(function(){M=ca=!1;P.stop();u(mxResources.get("timeout"))},2E4),da=k(".odFilesList");da.innerText="";P.spin(da);switch(U){case "recent":T=-[{name:mxResources.get("recent",null,"Recent"),driveId:U}];var ia=l()||{},pa=[],oa;for(oa in ia)pa.push(ia[oa]);clearTimeout(aa);ba(pa);return;case "shared":var ha="/me/drive/sharedWithMe";T=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:U}];break;case "sharepoint":ha="/sites?search=";T=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:U}];fa=1;break;case "site":T.push({name:Z,driveId:U,folderId:W,siteId:X});ha="/sites/"+X+"/drives";fa=2;break;case "subsite":T.push({name:Z,-driveId:U,folderId:W,siteId:X});ha="/drives/"+X+(W?"/items/"+W:"/root")+"/children";break;case "search":U=C;T=[{driveId:U,name:mxResources.get("back",null,"Back")}];Y=encodeURIComponent(Y.replace(/'/g,"\\'"));ha=U?"/drives/"+U+"/root/search(q='"+Y+"')":"/me/drive/root/search(q='"+Y+"')";break;default:null==W?T=[{driveId:U}]:T.push({name:Z,driveId:U,folderId:W}),ha=(U?"/drives/"+U:"/me/drive")+(W?"/items/"+W:"/root")+"/children"}fa||(ha+=(0<ha.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");-var xa=[];ea()}}function G(U){O.className=O.className.replace("odCatSelected","");O=U;O.className+=" odCatSelected"}function R(U){M||(S=null,D("search",null,null,null,U))}var V="";null==e&&(e=x,V='<div style="text-align: center;" class="odPreview"></div>');null==l&&(l=function(){var U=null;try{U=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(W){}return U});null==n&&(n=function(U){if(null!=U){var W=l()||{};delete U["@microsoft.graph.downloadUrl"];W[U.id]=U;localStorage.setItem("mxODPickerRecentList",-JSON.stringify(W))}});V='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+'</div><div id="odRecent" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("recent"))+'</div><div id="odShared" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("shared"))+'</div><div id="odSharepoint" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("sharepoint"))+'</div></div><div class="odFilesSec"><div class="searchBar" style="display:none"><input type="search" id="odSearchBox" placeholder="'+-mxUtils.htmlEntities(mxResources.get("search"))+'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img class="geAdaptiveAsset" src="/images/update32.png" width="16" height="16" title="'+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+V+(H?'<div id="odBackBtn" class="odLinkBtn">< '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(E?'<button id="odSubmitBtn" class="odSubmitBtn">'+-mxUtils.htmlEntities(mxResources.get(F?"select":"open"))+"</button>":"");var Q=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();Q=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+-(Q?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(Q?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}";-var P=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),q=new Editor,y=null,B=null,C=null,M=!1,T=[],m=null,z=null;this.getSelectedItem=function(){null!=B&&n(B);return B};if(null==k("#mxODPickerCss")){var I=document.head||document.getElementsByTagName("head")[0],L=document.createElement("style");I.appendChild(L);L.type="text/css";L.id="mxODPickerCss";L.appendChild(document.createTextNode(Q))}b.innerHTML=-V;var N=k(".odPreview"),O=k("#odFiles");b=function(U,W){W=W||document;return W.querySelectorAll(U)}(".odCatListTitle");for(V=0;V<b.length;V++)b[V].addEventListener("click",function(){B=z=null;if(!M)switch(G(this),this.id){case "odFiles":D();break;case "odRecent":D("recent");break;case "odShared":D("shared");break;case "odSharepoint":D("sharepoint")}});var S=null;k("#odSearchBox").addEventListener("keyup",function(U){var W=this;null!=S&&clearTimeout(S);13==U.keyCode?R(W.value):S=setTimeout(function(){R(W.value)},-500)});k("#refreshOD").addEventListener("click",function(){if(null!=m){e(null);var U=T.slice();D.apply(this,m);T=U}});H&&k("#odBackBtn").addEventListener("click",H);E&&k("#odSubmitBtn").addEventListener("click",t);null!=d?(H=d.pop(),"sharepoint"==d[0].driveId&&G(k("#odSharepoint")),T=d,D(H.driveId,H.folderId,H.siteId,H.name)):D()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&c.isModified()&&(c.getHash(),c.savingFile&&null!=c.savingFileTime&&(Date.now(),c.savingFileTime.getTime()),null!=c.ageStart&&(Date.now(),c.ageStart.getTime()),c.isAutosave(),null!=c.opened&&(Date.now(),c.opened.getTime()),null!=c.lastSaved&&(Date.now(),c.lastSaved.getTime()),+DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,l,n,p,v,F,H,E,K,d,g){function k(V,W){W=W||document;return W.querySelector(V)}function u(V,W,X){if(null==V["@microsoft.graph.downloadUrl"])if(null==V.parentReference)X();else{c(V.id,V.parentReference.driveId,function(ba){u(ba,W,X)},X);return}var Z=new XMLHttpRequest;Z.open("GET",V["@microsoft.graph.downloadUrl"]);var Y=V.file?"image/png"==V.file.mimeType:!1;Z.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ba=Z.responseText;+Y?(ba="data:image/png;base64,"+Editor.base64Encode(ba),ba=Editor.extractGraphModelFromPng(ba)):/\.pdf$/.test(V.name)&&(ba="data:application/pdf;base64,"+Editor.base64Encode(ba),ba=Editor.extractGraphModelFromPdf(ba));var da=mxUtils.parseXml(ba),ca="mxlibrary"==da.documentElement.nodeName?da.documentElement:Editor.extractGraphModel(da.documentElement);if(null!=ca){W(ca.ownerDocument);return}}catch(ea){}X()}};(Y||/\.pdf$/.test(V.name))&&Z.overrideMimeType&&Z.overrideMimeType("text/plain; charset=x-user-defined");+Z.send()}function t(){K&&null!=y?q.exportToCanvas(function(V){V=EditorUi.prototype.createImageDataUri(V,null,"png");p(B,V);n(B)},400,null,null,function(V){console.log(V)},600,null,null,null,null,null,y):(p(B,void 0),n(B))}function x(V){function W(X){N.style.background="transparent";N.innerText="";var Z=document.createElement("div");Z.className="odPreviewStatus";mxUtils.write(Z,X);N.appendChild(Z);O.stop()}if(null!=N)if(N.style.background="transparent",N.innerText="",null==V||V.folder||/\.drawiolib$/.test(V.name))W(mxResources.get("noPreview"));+else try{null!=V.remoteItem&&(V=V.remoteItem),z=V,O.spin(N),u(V,function(X){O.stop();if(z==V)if("mxlibrary"==X.documentElement.nodeName)W(mxResources.get("noPreview"));else{var Z=X.getElementsByTagName("diagram");y=AspectDialog.prototype.createViewer(N,0==Z.length?X.documentElement:Z[0],null,"transparent")}},function(){B=null;W(mxResources.get("notADiagramFile"))})}catch(X){B=null,W(mxResources.get("notADiagramFile"))}}function A(){var V=k(".odFilesBreadcrumb");if(null!=V){V.innerText="";for(var W=+0;W<T.length-1;W++){var X=document.createElement("span");X.className="odBCFolder";X.innerHTML=mxUtils.htmlEntities(T[W].name||mxResources.get("home"));V.appendChild(X);(function(Y,ba){X.addEventListener("click",function(){e(null);T=T.slice(0,ba);D(Y.driveId,Y.folderId,Y.siteId,Y.name)})})(T[W],W);var Z=document.createElement("span");Z.innerHTML=" > ";V.appendChild(Z)}null!=T[T.length-1]&&(W=document.createElement("span"),W.innerHTML=mxUtils.htmlEntities(1==T.length?mxResources.get(F?"selectFolder":+"officeSelDiag"):T[T.length-1].name||mxResources.get("home")),V.appendChild(W))}}function J(){if(null!=B&&!M)if("sharepoint"==C)D("site",null,B.id,B.displayName);else if("site"==C)D("subsite",null,B.id,B.name);else{var V=B.folder;B=B.remoteItem?B.remoteItem:B;var W=(B.parentReference?B.parentReference.driveId:null)||C,X=B.id;V?D(W,X,null,B.name):t()}}function D(V,W,X,Z,Y){function ba(qa){O.stop();var ua=document.createElement("table");ua.className="odFileListGrid";for(var ya=null,ja=0,oa=0;null!=+qa&&oa<qa.length;oa++){var ka=qa[oa];if(1!=ea||!ka.webUrl||0<ka.webUrl.indexOf("sharepoint.com/sites/")||0>ka.webUrl.indexOf("sharepoint.com/")){var Ca=ka.displayName||ka.name,sa=mxUtils.htmlEntities(ka.description||Ca);ea&&(ka.folder=2==ea?{isRoot:!0}:!0);var Fa=null!=ka.folder;if(!F||Fa){var xa=document.createElement("tr");xa.className=ja++%2?"odOddRow":"odEvenRow";var Aa=document.createElement("td");Aa.style.width="36px";var Da=document.createElement("img");Da.src="/images/"+(Fa?"folder.png":"file.png");+Da.className="odFileImg";Aa.appendChild(Da);xa.appendChild(Aa);Aa=document.createElement("td");Fa=document.createElement("div");Fa.className="odFileTitle";Fa.innerHTML=mxUtils.htmlEntities(Ca);Fa.setAttribute("title",sa);Aa.appendChild(Fa);xa.appendChild(Aa);ua.appendChild(xa);null==ya&&(ya=xa,ya.className+=" odRowSelected",B=ka,C=V,g||e(B));(function(Ka,Ja){xa.addEventListener("dblclick",J);xa.addEventListener("click",function(){ya!=Ja&&(ya.className=ya.className.replace("odRowSelected",""),ya=Ja,+ya.className+=" odRowSelected",B=Ka,C=V,g||e(B))})})(ka,xa)}}}0==ja?(qa=document.createElement("div"),qa.className="odEmptyFolder",qa.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),fa.appendChild(qa)):fa.appendChild(ua);A();M=!1}function da(qa){f(qa?qa:ha,function(ua){if(ca){var ya=ua.value||[];if(g||ea)Array.prototype.push.apply(wa,ya);else{for(var ja=0;ja<ya.length;ja++){var oa=ya[ja],ka=oa.file?oa.file.mimeType:null;(oa.folder||"text/html"==ka||"text/xml"==+ka||"application/xml"==ka||"image/png"==ka||/\.svg$/.test(oa.name)||/\.html$/.test(oa.name)||/\.xml$/.test(oa.name)||/\.png$/.test(oa.name)||/\.drawio$/.test(oa.name)||/\.drawiolib$/.test(oa.name)||/\.pdf$/.test(oa.name))&&wa.push(oa)}wa.sort(function(Ca,sa){var Fa=Ca.name.toLowerCase(),xa=sa.name.toLowerCase();return Ca.folder&&!sa.folder?-1:!Ca.folder&&sa.folder?1:Fa<xa?-1:Fa>xa?1:0})}ua["@odata.nextLink"]&&1E3>wa.length?da(ua["@odata.nextLink"]):(clearTimeout(aa),ba(wa))}},function(ua){if(ca){clearTimeout(aa);+var ya=null;try{ya=JSON.parse(ua.responseText).error.message}catch(ja){}v(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=ya?" ("+ya+")":""));M=!1;O.stop()}},null!=qa)}if(!M){k(".odCatsList").style.display="block";k(".odFilesSec").style.display="block";null!=N&&(N.innerText="",N.style.top="50%");var ca=M=!0,ea=0;m=arguments;var aa=setTimeout(function(){M=ca=!1;O.stop();v(mxResources.get("timeout"))},2E4),fa=k(".odFilesList");fa.innerText="";O.spin(fa);switch(V){case "recent":T=+[{name:mxResources.get("recent",null,"Recent"),driveId:V}];var ia=l()||{},na=[],pa;for(pa in ia)na.push(ia[pa]);clearTimeout(aa);ba(na);return;case "shared":var ha="/me/drive/sharedWithMe";T=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:V}];break;case "sharepoint":ha="/sites?search=";T=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:V}];ea=1;break;case "site":T.push({name:Z,driveId:V,folderId:W,siteId:X});ha="/sites/"+X+"/drives";ea=2;break;case "subsite":T.push({name:Z,+driveId:V,folderId:W,siteId:X});ha="/drives/"+X+(W?"/items/"+W:"/root")+"/children";break;case "search":V=C;T=[{driveId:V,name:mxResources.get("back",null,"Back")}];Y=encodeURIComponent(Y.replace(/'/g,"\\'"));ha=V?"/drives/"+V+"/root/search(q='"+Y+"')":"/me/drive/root/search(q='"+Y+"')";break;default:null==W?T=[{driveId:V}]:T.push({name:Z,driveId:V,folderId:W}),ha=(V?"/drives/"+V:"/me/drive")+(W?"/items/"+W:"/root")+"/children"}ea||(ha+=(0<ha.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");+var wa=[];da()}}function G(V){Q.className=Q.className.replace("odCatSelected","");Q=V;Q.className+=" odCatSelected"}function S(V){M||(R=null,D("search",null,null,null,V))}var U="";null==e&&(e=x,U='<div style="text-align: center;" class="odPreview"></div>');null==l&&(l=function(){var V=null;try{V=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(W){}return V});null==n&&(n=function(V){if(null!=V){var W=l()||{};delete V["@microsoft.graph.downloadUrl"];W[V.id]=V;localStorage.setItem("mxODPickerRecentList",+JSON.stringify(W))}});U='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+'</div><div id="odRecent" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("recent"))+'</div><div id="odShared" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("shared"))+'</div><div id="odSharepoint" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("sharepoint"))+'</div></div><div class="odFilesSec"><div class="searchBar" style="display:none"><input type="search" id="odSearchBox" placeholder="'++mxUtils.htmlEntities(mxResources.get("search"))+'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img class="geAdaptiveAsset" src="/images/update32.png" width="16" height="16" title="'+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+U+(H?'<div id="odBackBtn" class="odLinkBtn">< '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(E?'<button id="odSubmitBtn" class="odSubmitBtn">'++mxUtils.htmlEntities(mxResources.get(F?"select":"open"))+"</button>":"");var P=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();P=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"++(P?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(P?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}";+var O=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),q=new Editor,y=null,B=null,C=null,M=!1,T=[],m=null,z=null;this.getSelectedItem=function(){null!=B&&n(B);return B};if(null==k("#mxODPickerCss")){var I=document.head||document.getElementsByTagName("head")[0],L=document.createElement("style");I.appendChild(L);L.type="text/css";L.id="mxODPickerCss";L.appendChild(document.createTextNode(P))}b.innerHTML=+U;var N=k(".odPreview"),Q=k("#odFiles");b=function(V,W){W=W||document;return W.querySelectorAll(V)}(".odCatListTitle");for(U=0;U<b.length;U++)b[U].addEventListener("click",function(){B=z=null;if(!M)switch(G(this),this.id){case "odFiles":D();break;case "odRecent":D("recent");break;case "odShared":D("shared");break;case "odSharepoint":D("sharepoint")}});var R=null;k("#odSearchBox").addEventListener("keyup",function(V){var W=this;null!=R&&clearTimeout(R);13==V.keyCode?S(W.value):R=setTimeout(function(){S(W.value)},+500)});k("#refreshOD").addEventListener("click",function(){if(null!=m){e(null);var V=T.slice();D.apply(this,m);T=V}});H&&k("#odBackBtn").addEventListener("click",H);E&&k("#odSubmitBtn").addEventListener("click",t);null!=d?(H=d.pop(),"sharepoint"==d[0].driveId&&G(k("#odSharepoint")),T=d,D(H.driveId,H.folderId,H.siteId,H.name)):D()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&c.isModified()&&(c.getHash(),c.savingFile&&null!=c.savingFileTime&&(Date.now(),c.savingFileTime.getTime()),null!=c.ageStart&&(Date.now(),c.ageStart.getTime()),c.isAutosave(),null!=c.opened&&(Date.now(),c.opened.getTime()),null!=c.lastSaved&&(Date.now(),c.lastSaved.getTime()),null!=c.lastChanged&&(Date.now(),c.lastChanged.getTime()),Date.now(),App.startTime.getTime(),c.constructor==DriveFile&&null!=c.desc&&null!=this.drive&&c.getSize())}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+c.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":-(new Image).src=mxGraph.prototype.warningImage.src;window.geOpenWindow=mxUtils.bind(this,function(c,l,n){if("1"==urlParams.openInSameWin||navigator.standalone)null!=n&&n();else{var p=null;try{p=window.open(c)}catch(u){}null==p||void 0===p?this.showDialog((new PopupDialog(this,c,l,n)).container,320,160,!0,!0):null!=l&&l()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(c){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(c)});this.editor.chromeless&&+(new Image).src=mxGraph.prototype.warningImage.src;window.geOpenWindow=mxUtils.bind(this,function(c,l,n){if("1"==urlParams.openInSameWin||navigator.standalone)null!=n&&n();else{var p=null;try{p=window.open(c)}catch(v){}null==p||void 0===p?this.showDialog((new PopupDialog(this,c,l,n)).container,320,160,!0,!0):null!=l&&l()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(c){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(c)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(c){null!=window.console&&console.log("Plugin Error:",c,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(c){try{c(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=0,this.initializeEmbedMode())}),5E3)}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_GITLAB="gitlab";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.MODE_EMBED="embed";App.MODE_ATLAS="atlas";App.DROPBOX_APPKEY=window.DRAWIO_DROPBOX_ID;App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":"js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="js/jquery/jquery-3.6.0.min.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/7.0.3/pusher.min.js";App.SIMPLE_PEER_URL="js/simplepeer/simplepeer9.10.0.min.js";App.GOOGLE_APIS="drive-share";App.startTime=new Date;@@ -14036,24 +14037,24 @@ window.location.hash&&"#G"==window.location.hash.substring(0,2)?mxscript("https:null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();App.clearServiceWorker=function(b,e){navigator.serviceWorker.getRegistrations().then(function(f){if(null!=f&&0<f.length){for(var c=0;c<f.length;c++)f[c].unregister();null!=b&&b()}})["catch"](function(){null!=e&&e()})};App.isSameDomain=function(b){var e=document.createElement("a");e.href=b;return e.protocol===window.location.protocol||e.host===window.location.host};App.isBuiltInPlugin=function(b){for(var e in App.pluginRegistry)if(App.pluginRegistry[e]==b)return!0;return!1};App.main=function(b,e){try{var f=function(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var g=parseInt(mxSettings.settings.autosaveDelay);!isNaN(g)&&0<g?(DrawioFile.prototype.autosaveDelay=g,EditorUi.debug("Setting autosaveDelay",g)):EditorUi.debug("Invalid autosaveDelay",g)}null!=mxSettings.settings.defaultEdgeLength&&(g=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(g)&&0<g?(Graph.prototype.defaultEdgeLength=g,EditorUi.debug("Using defaultEdgeLength",g)):-EditorUi.debug("Invalid defaultEdgeLength",g))}}catch(v){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(v.stack)):console.error(v)}try{if(null!=Menus.prototype.defaultFonts)for(g=0;g<Menus.prototype.defaultFonts.length;g++){var k=Menus.prototype.defaultFonts[g];"string"!==typeof k&&null!=k.fontFamily&&null!=k.fontUrl&&Graph.addFont(k.fontFamily,k.fontUrl)}mxResources.loadDefaultBundle=!1;c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,-mxLanguage))}catch(v){document.body.innerHTML="",k=document.createElement("pre"),mxUtils.write(k,v.stack),document.body.appendChild(k)}},c=function(g){mxUtils.getAll("1"!=urlParams.dev?[g]:[g,STYLE_PATH+"/default.xml"],function(k){function v(){try{""!=Editor.currentTheme&&"kennedy"!=Editor.currentTheme&&"dark"!=Editor.currentTheme&&0>mxUtils.indexOf(Editor.themes,Editor.currentTheme)&&(Editor.currentTheme="kennedy");"1"==urlParams.transparent&&(document.body.style.background="transparent");var D=+EditorUi.debug("Invalid defaultEdgeLength",g))}}catch(u){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(u.stack)):console.error(u)}try{if(null!=Menus.prototype.defaultFonts)for(g=0;g<Menus.prototype.defaultFonts.length;g++){var k=Menus.prototype.defaultFonts[g];"string"!==typeof k&&null!=k.fontFamily&&null!=k.fontUrl&&Graph.addFont(k.fontFamily,k.fontUrl)}mxResources.loadDefaultBundle=!1;c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,+mxLanguage))}catch(u){document.body.innerHTML="",k=document.createElement("pre"),mxUtils.write(k,u.stack),document.body.appendChild(k)}},c=function(g){mxUtils.getAll("1"!=urlParams.dev?[g]:[g,STYLE_PATH+"/default.xml"],function(k){function u(){try{""!=Editor.currentTheme&&"kennedy"!=Editor.currentTheme&&"dark"!=Editor.currentTheme&&0>mxUtils.indexOf(Editor.themes,Editor.currentTheme)&&(Editor.currentTheme="kennedy");"1"==urlParams.transparent&&(document.body.style.background="transparent");var D=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));null!=window.mxscript&&("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)}):"undefined"===typeof window.Dropbox&&(window.DropboxClient=null),"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null),"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null));null!=b&&b(D);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",["v"+EditorUi.VERSION,D,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}catch(G){EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(G.stack)):(EditorUi.logError(G.message,null,null,null,G),window.setTimeout(function(){alert(G.message)},1))}}mxResources.parse(k[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var t=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=t){EditorUi.debug("Setting configuration",JSON.stringify(t));if(null!=t.merge){var x=localStorage.getItem(Editor.configurationKey);if(null!=x)try{var A=JSON.parse(x),J;for(J in t.merge)A[J]=t.merge[J];t=A}catch(D){window.location.hash="",alert(D)}else t=t.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(t)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(D){window.location.hash=-"",alert(D)}1<k.length&&(Graph.prototype.defaultThemes["default-style2"]=k[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=k[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?v():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],v,function(D){document.body.innerHTML="";var G=document.createElement("pre");mxUtils.write(G,D.stack);document.body.appendChild(G)}))},function(k){k=document.getElementById("geStatus");+"",alert(D)}1<k.length&&(Graph.prototype.defaultThemes["default-style2"]=k[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=k[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?u():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],u,function(D){document.body.innerHTML="";var G=document.createElement("pre");mxUtils.write(G,D.stack);document.body.appendChild(G)}))},function(k){k=document.getElementById("geStatus");null!=k&&(k.innerHTML="Error loading page. <a>Please try refreshing.</a>",k.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})};if(!App.isMainCalled)if(mxIsElectron&&"undefined"===typeof electron)alert("Runtime Environment not found."),document.body.innerHTML='<div style="margin-top:10%;text-align:center;"><img src="mxgraph/images/warning.png" align="top" style="padding-right:6px;"/>Runtime Environment not found.</div>';-else if(mxUtils.lightDarkColorSupported||mxUtils.get("styles/grapheditor.css",mxUtils.bind(this,function(g){if(200<=g.getStatus()&&299>=g.getStatus()){var k=document.createElement("style");k.type="text/css";k.appendChild(document.createTextNode(g.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1")));document.head.appendChild(k)}})),App.isMainCalled=!0,window.onerror=function(g,k,v,t,x){EditorUi.logError("Global: "+(null!=g?g:""),k,v,t,x,null,!0);null==-window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",g,"\nURL:",k,"\nLine:",v,"\nColumn:",t,"\nError:",x)):console.error("Message:",g,"\nURL:",k,"\nLine:",v,"\nColumn:",t,"\nError:",x);window.setTimeout(function(){alert("Error: "+(null!=g?g:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var l=document.getElementById("geInfo");+else if(mxUtils.lightDarkColorSupported||mxUtils.get("styles/grapheditor.css",mxUtils.bind(this,function(g){if(200<=g.getStatus()&&299>=g.getStatus()){var k=document.createElement("style");k.type="text/css";k.appendChild(document.createTextNode(g.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1")));document.head.appendChild(k)}})),App.isMainCalled=!0,window.onerror=function(g,k,u,t,x){EditorUi.logError("Global: "+(null!=g?g:""),k,u,t,x,null,!0);null==+window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",g,"\nURL:",k,"\nLine:",u,"\nColumn:",t,"\nError:",x)):console.error("Message:",g,"\nURL:",k,"\nLine:",u,"\nColumn:",t,"\nError:",x);window.setTimeout(function(){alert("Error: "+(null!=g?g:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var l=document.getElementById("geInfo");null!=l&&l.parentNode.removeChild(l)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){var n=document.getElementById("geBootstrap");if(null!=n){var p=mxUtils.getTextContent(n);"ff68e9badc5b6bcb8f482e0c64b103a7"!=CryptoJS.MD5(p).toString()&&-(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(p).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}var u=document.getElementById("geMain");null!=u&&(p=mxUtils.getTextContent(u),"69c25556b6237c57cdb7d017147af34b"!=CryptoJS.MD5(p).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(p).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||+(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(p).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}var v=document.getElementById("geMain");null!=v&&(p=mxUtils.getTextContent(v),"69c25556b6237c57cdb7d017147af34b"!=CryptoJS.MD5(p).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(p).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(g){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var F=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var H=JSON.parse(localStorage.getItem(mxSettings.key));null!=H&&(F=H.plugins)}catch(g){}H=urlParams.p;App.initPluginCallback();null!=H&&App.loadPlugins(H.split(";"));if(null!=F&&0<F.length&&"0"!=urlParams.plugins)for(l=0;l<F.length;l++)try{("/"==F[l].charAt(0)&&(F[l]=PLUGINS_BASE_PATH+F[l]),App.isSameDomain(F[l]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(F[l])?null==App.pluginsLoaded[F[l]]&&(App.pluginsLoaded[F[l]]=!0,App.embedModePluginsCount++,mxscript(F[l])):null!=window.console&&console.log("Unknown plugin:",F[l]):null!=window.console&&console.log("Blocked plugin:",F[l])}catch(g){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var E=window.opener||window.parent,K=function(g){if(g.source==E)try{var k=JSON.parse(g.data);null!=k&&"configure"==k.action&&(mxEvent.removeListener(window,"message",-K),Editor.configure(k.config),mxSettings.load(),null!=k.config.darkColor&&document.body.style.setProperty("--dark-color",k.config.darkColor),k.colorSchemeMeta&&mxmeta("color-scheme","dark light"),f())}catch(v){null!=window.console&&console.log("Error in configure message: "+v,g.data)}};mxEvent.addListener(window,"message",K);E.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),+K),Editor.configure(k.config),mxSettings.load(),null!=k.config.darkColor&&document.body.style.setProperty("--dark-color",k.config.darkColor),k.colorSchemeMeta&&mxmeta("color-scheme","dark light"),f())}catch(u){null!=window.console&&console.log("Error in configure message: "+u,g.data)}};mxEvent.addListener(window,"message",K);E.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(g){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(g.stack)):console.error(g)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed){var d=localStorage.getItem(Editor.configurationKey);if(null!=d)try{d=JSON.parse(d),null!=d&&(EditorUi.debug("Using local configuration",d),Editor.configure(d),mxSettings.load())}catch(g){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(g.stack)):console.error(g)}}}f()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(g){document.body.innerHTML="",F=document.createElement("pre"),mxUtils.write(F,g.stack),document.body.appendChild(F)}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;@@ -14086,21 +14087,21 @@ f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.setAttribute(b.appendChild(f);var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.setAttribute("title","2 star");c.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");c.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");b.appendChild(c);var l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.setAttribute("title","3 star");l.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");l.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");b.appendChild(l);var n=document.createElement("img");n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.setAttribute("title","4 star");n.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");n.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");-b.appendChild(n);this.bannerShowing=!0;var p=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(e,"click",mxUtils.bind(this,function(u){mxEvent.consume(u);p()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(u){mxEvent.consume(u);p()}));mxEvent.addListener(c,"click",mxUtils.bind(this,-function(u){mxEvent.consume(u);p()}));mxEvent.addListener(l,"click",mxUtils.bind(this,function(u){mxEvent.consume(u);p()}));mxEvent.addListener(n,"click",mxUtils.bind(this,function(u){mxEvent.consume(u);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");p()}));e=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){p()}),1E3)});window.setTimeout(mxUtils.bind(this,+b.appendChild(n);this.bannerShowing=!0;var p=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(e,"click",mxUtils.bind(this,function(v){mxEvent.consume(v);p()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(v){mxEvent.consume(v);p()}));mxEvent.addListener(c,"click",mxUtils.bind(this,+function(v){mxEvent.consume(v);p()}));mxEvent.addListener(l,"click",mxUtils.bind(this,function(v){mxEvent.consume(v);p()}));mxEvent.addListener(n,"click",mxUtils.bind(this,function(v){mxEvent.consume(v);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");p()}));e=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){p()}),1E3)});window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(e,6E4)}};App.prototype.checkLicense=function(){var b=this.drive.getUser(),e=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=e&&null!=b.id){var f=e.lastIndexOf("@"),c=0<=f?e.substring(f+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(c)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(l){try{if(200<=l.getStatus()&&299>=l.getStatus()){var n=l.getText();if(0<n.length){var p=JSON.parse(n);null!=p&&this.handleLicense(p,-c)}}}catch(u){}}))}};App.prototype.handleLicense=function(b,e){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};+c)}}}catch(v){}}))}};App.prototype.handleLicense=function(b,e){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};App.prototype.addRecent=function(b,e,f){if(isLocalStorage&&null!=localStorage){e=null!=e?e:"";var c=this.getRecent(e);if(null==c)c=[];else for(var l=0;l<c.length;l++)c[l].mode==b.mode&&c[l].id==b.id&&c.splice(l,1);null!=c&&(f=null!=f?f:10,c.unshift(b),c=c.slice(0,f),localStorage.setItem(".recent"+e,JSON.stringify(c)))}};App.prototype.getRecent=function(b){if(isLocalStorage&&null!=localStorage){try{var e=localStorage.getItem(".recent"+(null!=b?b:""));if(null!=e)return JSON.parse(e)}catch(f){}return null}};App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent"+(null!=b?b:""))}catch(e){}};App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return this.logIfModified(b),mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};App.prototype.updateDocumentTitle=function(){var b=this.editor.appName,e=this.getCurrentFile();null==e||!this.editor.graph.isLightboxView()&&"simple"!=Editor.currentTheme||null==this.pages||null==this.currentPage?this.isOfflineApp()&&(b+=" app"):b=this.getShortPageName(this.currentPage);null!=e&&(b=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b)};-App.prototype.getThumbnail=function(b,e,f){f=null!=f?f:0;var c=!1;try{var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;e(null)}),this.timeout),p=mxUtils.bind(this,function(Q){window.clearTimeout(n);l&&e(Q)});null==this.thumbImageCache&&(this.thumbImageCache={});var u=this.editor.graph,F=u.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var H=u.getGlobalVariable;u=this.createTemporaryGraph(u.getStylesheet());u.setBackgroundImage=this.editor.graph.setBackgroundImage;-var E=this.pages[0];this.currentPage==E?u.setBackgroundImage(F):null!=E.viewState&&null!=E.viewState&&(F=E.viewState.backgroundImage,u.setBackgroundImage(F));u.getGlobalVariable=function(Q){return"page"==Q?E.getName():"pagenumber"==Q?1:H.apply(this,arguments)};u.getGlobalVariable=H;document.body.appendChild(u.container);u.model.setRoot(E.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(Q){try{u!=this.editor.graph&&null!=u.container.parentNode&&-u.container.parentNode.removeChild(u.container)}catch(P){Q=null}p(Q)}),b,this.thumbImageCache,"#ffffff",function(){p()},null,null,null,null,null,null,u,f,null,null,null,"diagram",null),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var K=document.createElement("canvas"),d=u.getGraphBounds(),g=u.view.translate,k=u.view.scale;null!=F&&(d=mxRectangle.fromRectangle(d),d.add(new mxRectangle((g.x+F.x)*k,(g.y+F.y)*k,F.width*k,F.height*k)));var v=b/d.width;v=Math.min(1,Math.min(3*b/(4*d.height),-v));var t=Math.floor(d.x),x=Math.floor(d.y);K.setAttribute("width",Math.ceil(v*(d.width+4)));K.setAttribute("height",Math.ceil(v*(d.height+4)));var A=K.getContext("2d");A.scale(v,v);A.translate(-t,-x);var J=u.background;if(null==J||""==J||J==mxConstants.NONE)J="#ffffff";A.save();A.fillStyle=J;A.fillRect(t,x,Math.ceil(d.width+4),Math.ceil(d.height+4));A.restore();if(null!=F){var D=new Image;D.src=F.src;A.drawImage(D,F.x*v,F.y*v,F.width*v,F.height*v)}var G=new mxJsCanvas(K),R=new mxAsyncCanvas(this.thumbImageCache);-G.images=this.thumbImageCache.images;var V=new mxImageExport;V.drawShape=function(Q,P){Q.shape instanceof mxShape&&Q.shape.checkBounds()&&(P.save(),P.translate(.5,.5),Q.shape.paint(P),P.translate(-.5,-.5),P.restore())};V.drawText=function(Q,P){};V.drawState(u.getView().getState(u.model.root),R);R.finish(mxUtils.bind(this,function(){try{V.drawState(u.getView().getState(u.model.root),G),u!=this.editor.graph&&null!=u.container.parentNode&&u.container.parentNode.removeChild(u.container)}catch(Q){K=null}p(K)}));-c=!0}}catch(Q){c=!1,null!=u&&u!=this.editor.graph&&null!=u.container.parentNode&&u.container.parentNode.removeChild(u.container)}c||window.clearTimeout(n);return c};+App.prototype.getThumbnail=function(b,e,f){f=null!=f?f:0;var c=!1;try{var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;e(null)}),this.timeout),p=mxUtils.bind(this,function(P){window.clearTimeout(n);l&&e(P)});null==this.thumbImageCache&&(this.thumbImageCache={});var v=this.editor.graph,F=v.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var H=v.getGlobalVariable;v=this.createTemporaryGraph(v.getStylesheet());v.setBackgroundImage=this.editor.graph.setBackgroundImage;+var E=this.pages[0];this.currentPage==E?v.setBackgroundImage(F):null!=E.viewState&&null!=E.viewState&&(F=E.viewState.backgroundImage,v.setBackgroundImage(F));v.getGlobalVariable=function(P){return"page"==P?E.getName():"pagenumber"==P?1:H.apply(this,arguments)};v.getGlobalVariable=H;document.body.appendChild(v.container);v.model.setRoot(E.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(P){try{v!=this.editor.graph&&null!=v.container.parentNode&&+v.container.parentNode.removeChild(v.container)}catch(O){P=null}p(P)}),b,this.thumbImageCache,"#ffffff",function(){p()},null,null,null,null,null,null,v,f,null,null,null,"diagram",null),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var K=document.createElement("canvas"),d=v.getGraphBounds(),g=v.view.translate,k=v.view.scale;null!=F&&(d=mxRectangle.fromRectangle(d),d.add(new mxRectangle((g.x+F.x)*k,(g.y+F.y)*k,F.width*k,F.height*k)));var u=b/d.width;u=Math.min(1,Math.min(3*b/(4*d.height),+u));var t=Math.floor(d.x),x=Math.floor(d.y);K.setAttribute("width",Math.ceil(u*(d.width+4)));K.setAttribute("height",Math.ceil(u*(d.height+4)));var A=K.getContext("2d");A.scale(u,u);A.translate(-t,-x);var J=v.background;if(null==J||""==J||J==mxConstants.NONE)J="#ffffff";A.save();A.fillStyle=J;A.fillRect(t,x,Math.ceil(d.width+4),Math.ceil(d.height+4));A.restore();if(null!=F){var D=new Image;D.src=F.src;A.drawImage(D,F.x*u,F.y*u,F.width*u,F.height*u)}var G=new mxJsCanvas(K),S=new mxAsyncCanvas(this.thumbImageCache);+G.images=this.thumbImageCache.images;var U=new mxImageExport;U.drawShape=function(P,O){P.shape instanceof mxShape&&P.shape.checkBounds()&&(O.save(),O.translate(.5,.5),P.shape.paint(O),O.translate(-.5,-.5),O.restore())};U.drawText=function(P,O){};U.drawState(v.getView().getState(v.model.root),S);S.finish(mxUtils.bind(this,function(){try{U.drawState(v.getView().getState(v.model.root),G),v!=this.editor.graph&&null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}catch(P){K=null}p(K)}));+c=!0}}catch(P){c=!1,null!=v&&v!=this.editor.graph&&null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}c||window.clearTimeout(n);return c};(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(e,f){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var c=this.getCurrentFile();e=null!=c?c.getMode():e;e==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):e==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=e==App.MODE_DEVICE?"pointer":"default")}if(f)try{if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var l=new Date;l.setYear(l.getFullYear()+1);document.cookie="MODE="+e+"; expires="+l.toUTCString()}}catch(n){}}})();App.prototype.appIconClicked=function(b){var e=this.getCurrentFile(),f=null!=e?e.getMode():null;e=null!=e?mxEvent.isAltDown(b)?e.getFolderUrl():e.getFileUrl():null;null!=e?this.openLink(e):f==App.MODE_GOOGLE?this.openLink("https://drive.google.com/?authuser=0"):f==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):f==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):f==App.MODE_GITHUB?this.openLink("https://github.com/"):f==App.MODE_GITLAB?this.openLink(DRAWIO_GITLAB_URL):f==App.MODE_TRELLO?@@ -14114,22 +14115,22 @@ App.prototype.showRefreshDialog=function(b,e){this.showingRefreshDialog||(this.sApp.prototype.showAlert=function(b){if(null!=b&&0<b.length){var e=document.createElement("div");e.className="geAlert";e.style.zIndex=2E9;e.style.left="50%";e.style.top="-100%";e.style.maxWidth="80%";e.style.width="max-content";e.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");e.appendChild(b);mxEvent.addListener(b,"click",function(f){null!=e.parentNode&&(e.parentNode.removeChild(e),mxEvent.consume(f))});document.body.appendChild(e);window.setTimeout(function(){e.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(e.style,"transition","all 2s ease");e.style.opacity="0";window.setTimeout(function(){null!=e.parentNode&&e.parentNode.removeChild(e)},2E3)},15E3)}};-App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(p,u,F,H,E){"ResizeObserver loop limit exceeded"!=p&&(EditorUi.logError("Uncaught: "+(null!=p?p:""),u,F,H,E,null,!0),b.handleError({message:p},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(p){var u=this.getCurrentFile();EditorUi.debug("storage event",[p],-[u]);null!=u&&".draft-alive-check"==p.key&&null!=p.newValue&&null!=u.draftId&&(this.draftAliveCheck=p.newValue,u.saveDraft())}))}catch(p){}var e=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(p){try{var u=this.getDiagramId();if(u!=e){e=u;var F=this.getCurrentFile();null!=F&&F.getHash()==u||this.loadFile(u,!0)}else{var H=this.getHashObject();if(null!=H&&null!=H.pageId&&null!=this.currentPage&&H.pageId!=this.currentPage.getId()){var E=this.getPageById(H.pageId);+App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(p,v,F,H,E){"ResizeObserver loop limit exceeded"!=p&&(EditorUi.logError("Uncaught: "+(null!=p?p:""),v,F,H,E,null,!0),b.handleError({message:p},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(p){var v=this.getCurrentFile();EditorUi.debug("storage event",[p],+[v]);null!=v&&".draft-alive-check"==p.key&&null!=p.newValue&&null!=v.draftId&&(this.draftAliveCheck=p.newValue,v.saveDraft())}))}catch(p){}var e=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(p){try{var v=this.getDiagramId();if(v!=e){e=v;var F=this.getCurrentFile();null!=F&&F.getHash()==v||this.loadFile(v,!0)}else{var H=this.getHashObject();if(null!=H&&null!=H.pageId&&null!=this.currentPage&&H.pageId!=this.currentPage.getId()){var E=this.getPageById(H.pageId);null!=E&&this.selectPage(E)}}}catch(K){null!=document.body&&this.handleError(K,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var d=this.getCurrentFile();window.location.hash=null!=d?d.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(p){this.handleError(p,mxResources.get("errorLoadingFile"))}))}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var f=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var p=mxUtils.bind(this,function(H){Editor.isPngDataUrl(H)&&(H=Editor.extractGraphModelFromPng(H));var E=urlParams.title;E=null!=E?decodeURIComponent(E):this.defaultFilename;H=new LocalFile(this,-H,E,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(H.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(H);this.editor.chromeless||(H.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),u=window.opener||window.parent;if(u!=window){var F=urlParams.create;null!=F?p(u[decodeURIComponent(F)]):(F=urlParams.data,null!=F?p(decodeURIComponent(F)):this.installMessageHandler(mxUtils.bind(this,function(H,-E){E.source==u&&p(H)})))}}else if(null==this.dialog)if("1"==urlParams.demo)F=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=F;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),this.actions.get("insertTemplate").funct();else{F=!1;try{F=null!=window.opener&&null!=window.opener.openFile}catch(H){}F?this.spinner.spin(document.body,mxResources.get("loading")):(F=this.getDiagramId(),+H,E,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(H.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(H);this.editor.chromeless||(H.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),v=window.opener||window.parent;if(v!=window){var F=urlParams.create;null!=F?p(v[decodeURIComponent(F)]):(F=urlParams.data,null!=F?p(decodeURIComponent(F)):this.installMessageHandler(mxUtils.bind(this,function(H,+E){E.source==v&&p(H)})))}}else if(null==this.dialog)if("1"==urlParams.demo)F=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=F;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),this.actions.get("insertTemplate").funct();else{F=!1;try{F=null!=window.opener&&null!=window.opener.openFile}catch(H){}F?this.spinner.spin(document.body,mxResources.get("loading")):(F=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=F&&0!=F.length||this.editor.isChromelessView()?null!=F&&0<F.length?this.loadFile(F,null,null,mxUtils.bind(this,function(){var H=decodeURIComponent(urlParams.viewbox||"");if(""!=H)try{var E=JSON.parse(H);this.editor.graph.fitWindow(E,E.border)}catch(K){console.error(K)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),c=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var l=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),n=mxUtils.bind(this,function(p){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,-p,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var u=urlParams.title;u=null!=u?decodeURIComponent(u):this.defaultFilename;p=this.getServiceCount(!0);isLocalStorage&&p++;var F=4>=p?2:6<p?4:3;u=new CreateDialog(this,u,mxUtils.bind(this,function(H,E){if(null==E){this.hideDialog();var K=Editor.useLocalStorage;this.createFile(0<H.length?H:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=K}else this.pickFolder(E,mxUtils.bind(this,function(d){this.createFile(H,-this.getFileData(!0),null,E,null,!0,d)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,F,null,null,null,this.editor.fileExtensions);this.showDialog(u.container,420,p>F?390:280,!0,!1,mxUtils.bind(this,function(H){H&&null==this.getCurrentFile()&&this.showSplash()}));u.init()}});if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))if("{"==c.charAt(0))this.spinner.stop(),c=JSON.parse(c),window.isMermaidEnabled&&"mermaid"==c.type?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(p){p!=-this.emptyDiagramXml&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["create"])),this.createFile(null!=p.filename?p.filename:this.defaultFilename,p,null,null,null,!0,null,!0),this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct())})),this.generateMermaidImage(c.data,null,function(){},mxUtils.bind(this,function(p){for(var u=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),F=0;F<u.length;F++)u[F].parentNode.removeChild(u[F]);mxMermaidToDrawio.resetListeners();+p,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var v=urlParams.title;v=null!=v?decodeURIComponent(v):this.defaultFilename;p=this.getServiceCount(!0);isLocalStorage&&p++;var F=4>=p?2:6<p?4:3;v=new CreateDialog(this,v,mxUtils.bind(this,function(H,E){if(null==E){this.hideDialog();var K=Editor.useLocalStorage;this.createFile(0<H.length?H:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=K}else this.pickFolder(E,mxUtils.bind(this,function(d){this.createFile(H,+this.getFileData(!0),null,E,null,!0,d)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,F,null,null,null,this.editor.fileExtensions);this.showDialog(v.container,420,p>F?390:280,!0,!1,mxUtils.bind(this,function(H){H&&null==this.getCurrentFile()&&this.showSplash()}));v.init()}});if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))if("{"==c.charAt(0))this.spinner.stop(),c=JSON.parse(c),window.isMermaidEnabled&&"mermaid"==c.type?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(p){p!=+this.emptyDiagramXml&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["create"])),this.createFile(null!=p.filename?p.filename:this.defaultFilename,p,null,null,null,!0,null,!0),this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct())})),this.generateMermaidImage(c.data,null,function(){},mxUtils.bind(this,function(p){for(var v=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),F=0;F<v.length;F++)v[F].parentNode.removeChild(v[F]);mxMermaidToDrawio.resetListeners();this.handleError(p)}))):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"));else try{null!=window.opener&&null!=window.opener[c]?n(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(p){n(p)},mxUtils.bind(this,function(p){this.handleError(p,mxResources.get("errorLoadingFile"),l)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),f())}}catch(p){this.handleError(p)}};App.prototype.loadDraft=function(b,e){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var f=this.getCurrentFile();null!=f&&(f.fileChanged(),null!=e&&e())}),0)}),null,null,!0)};-App.prototype.filterDrafts=function(b,e,f){function c(){f(l)}var l=[];try{this.getDatabaseItems(mxUtils.bind(this,function(n){EditorUi.debug("App.filterDrafts",[this],"items",n);for(var p=0;p<n.length;p++)try{var u=n[p].key;if(null!=u&&".draft_"==u.substring(0,7)){var F=JSON.parse(n[p].data);null!=F&&"draft"==F.type&&F.aliveCheck!=e&&(null==b&&null==F.fileObject||null!=F.fileObject&&F.fileObject.path==b)&&(F.key=u,l.push(F))}}catch(H){}c()}),c)}catch(n){c()}};+App.prototype.filterDrafts=function(b,e,f){function c(){f(l)}var l=[];try{this.getDatabaseItems(mxUtils.bind(this,function(n){EditorUi.debug("App.filterDrafts",[this],"items",n);for(var p=0;p<n.length;p++)try{var v=n[p].key;if(null!=v&&".draft_"==v.substring(0,7)){var F=JSON.parse(n[p].data);null!=F&&"draft"==F.type&&F.aliveCheck!=e&&(null==b&&null==F.fileObject||null!=F.fileObject&&F.fileObject.path==b)&&(F.key=v,l.push(F))}}catch(H){}c()}),c)}catch(n){c()}};App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(e){if(1==e.length)this.loadDraft(e[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(e[0].key)}));else if(1<e.length){var f=new Date(e[0].modified);f=new DraftDialog(this,1<e.length?mxResources.get("selectDraft"):mxResources.get("draftFound",[f.toLocaleDateString()+" "+f.toLocaleTimeString()]),1<e.length?null:e[0].data,mxUtils.bind(this,function(c){this.hideDialog();c=""!=c?c:0;this.loadDraft(e[c].data,mxUtils.bind(this,function(){this.removeDatabaseItem(e[c].key)}))}),mxUtils.bind(this,function(c,l){this.removeDatabaseItem(e[""!=c?c:0].key);null!=l&&l()}),null,null,null,1<e.length?e:null);this.showDialog(f.container,640,480,!0,!1,mxUtils.bind(this,function(c){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}));f.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(e){}};@@ -14138,64 +14139,64 @@ mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplashApp.prototype.addLanguageMenu=function(b,e,f){var c=null;null!=this.menus.get("language")&&(c=document.createElement("div"),c.setAttribute("title",mxResources.get("language")),c.className="geIcon geAdaptiveAsset",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="right center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="19px 19px",c.style.width="19px",c.style.height="19px",mxUtils.setOpacity(c,40),c.style.position="absolute",c.style.cursor="pointer",c.style.bottom="20px",c.style.right=null!=f?f:"22px",e&&(c.style.direction="rtl",c.style.textAlign="right",c.style.right=null!=f?f:"24px",e=document.createElement("span"),e.style.display="inline-block",e.style.fontSize="12px",e.style.margin="2px 24px 0 0",e.style.userSelect="none",mxUtils.write(e,mxResources.get("language")),c.appendChild(e),e.className="geAdaptiveAsset"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(l){this.editor.graph.popupMenuHandler.hideMenu();var n=new mxPopupMenu(this.menus.get("language").funct);n.div.className+=" geMenubarMenu";n.smartSeparators=!0;n.showDisabled=!0;n.autoExpand=!0;n.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(n,arguments);n.destroy()});var p=mxUtils.getOffset(c);n.popup(p.x,p.y+c.offsetHeight,null,l);this.setCurrentMenu(n)})),b.appendChild(c));return c};-App.prototype.loadFileSystemEntry=function(b,e,f){f=null!=f?f:mxUtils.bind(this,function(c){this.handleError(c)});try{b.getFile().then(mxUtils.bind(this,function(c){var l=new FileReader;l.onload=mxUtils.bind(this,function(n){var p=mxUtils.bind(this,function(u){try{if(null!=e){var F=n.target.result;"image/png"==c.type&&(F=this.extractGraphModelFromPng(F));e(new LocalFile(this,F,c.name,null,b,c,u))}else this.openFileHandle(n.target.result,c.name,c,!1,b,u)}catch(H){f(H)}});b.queryPermission?b.queryPermission({mode:"readwrite"}).then(mxUtils.bind(this,-function(u){p("denied"!==u)})):b.createWritable().then(mxUtils.bind(this,function(){p(!0)}),mxUtils.bind(this,function(u){p(!1)}))});l.onerror=f;"image"!==c.type.substring(0,5)&&"application/pdf"!==c.type||"image/svg"===c.type.substring(0,9)?l.readAsText(c):l.readAsDataURL(c)}),f)}catch(c){f(c)}};+App.prototype.loadFileSystemEntry=function(b,e,f){f=null!=f?f:mxUtils.bind(this,function(c){this.handleError(c)});try{b.getFile().then(mxUtils.bind(this,function(c){var l=new FileReader;l.onload=mxUtils.bind(this,function(n){var p=mxUtils.bind(this,function(v){try{if(null!=e){var F=n.target.result;"image/png"==c.type&&(F=this.extractGraphModelFromPng(F));e(new LocalFile(this,F,c.name,null,b,c,v))}else this.openFileHandle(n.target.result,c.name,c,!1,b,v)}catch(H){f(H)}});b.queryPermission?b.queryPermission({mode:"readwrite"}).then(mxUtils.bind(this,+function(v){p("denied"!==v)})):b.createWritable().then(mxUtils.bind(this,function(){p(!0)}),mxUtils.bind(this,function(v){p(!1)}))});l.onerror=f;"image"!==c.type.substring(0,5)&&"application/pdf"!==c.type||"image/svg"===c.type.substring(0,9)?l.readAsText(c):l.readAsDataURL(c)}),f)}catch(c){f(c)}};App.prototype.createFileSystemOptions=function(b){var e=[],f=null;if(null!=b){var c=b.lastIndexOf(".");0<c&&(f=b.substring(c+1))}for(c=0;c<this.editor.diagramFileTypes.length;c++){var l={description:mxResources.get(this.editor.diagramFileTypes[c].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[c].extension+")":""),accept:{}};l.accept[this.editor.diagramFileTypes[c].mimeType]=["."+this.editor.diagramFileTypes[c].extension];this.editor.diagramFileTypes[c].extension==f?e.splice(0,0,l):this.editor.diagramFileTypes[c].extension==f?e.splice(0,0,l):e.push(l)}return{types:e,suggestedName:b}};App.prototype.showSaveFilePicker=function(b,e,f){e=null!=e?e:mxUtils.bind(this,function(c){"AbortError"!=c.name&&this.handleError(c)});f=null!=f?f:this.createFileSystemOptions();window.showSaveFilePicker(f).then(mxUtils.bind(this,function(c){null!=c&&c.getFile().then(mxUtils.bind(this,function(l){b(c,l)}),e)}),e)};App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var e=this.getServiceForName(b);if(null!=e)e.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(p){null!=p&&0<p.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(p[0])}),mxUtils.bind(this,function(p){"AbortError"!=p.name&&this.handleError(p)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var f=document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){null!=f.files&&(this.openFiles(f.files),f.type="",f.type="file",f.value="")}));f.style.display="none";document.body.appendChild(f);this.openFileInputElt=f}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=-null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(p,u){StorageFile.listFiles(this,"F",p,u)});window.openBrowserFile=mxUtils.bind(this,function(p,u,F){StorageFile.getFileContent(this,p,u,F)});window.deleteBrowserFile=mxUtils.bind(this,function(p,u,F){StorageFile.deleteFile(this,p,u,F)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,-function(p,u){var F=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=u.substring(u.length-4)||(u=u.substring(0,u.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,p,u):new LocalFile(this,p,u))}),H=this.getCurrentFile();null!=H&&H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()}));var l=this.dialog,n=l.close;this.dialog.close=mxUtils.bind(this,function(p){Editor.useLocalStorage=+null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(p,v){StorageFile.listFiles(this,"F",p,v)});window.openBrowserFile=mxUtils.bind(this,function(p,v,F){StorageFile.getFileContent(this,p,v,F)});window.deleteBrowserFile=mxUtils.bind(this,function(p,v,F){StorageFile.deleteFile(this,p,v,F)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,+function(p,v){var F=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=v.substring(v.length-4)||(v=v.substring(0,v.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,p,v):new LocalFile(this,p,v))}),H=this.getCurrentFile();null!=H&&H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()}));var l=this.dialog,n=l.close;this.dialog.close=mxUtils.bind(this,function(p){Editor.useLocalStorage=c;n.apply(l,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(p){this.handleError(p)}};App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;var e=mxUtils.bind(this,function(n){try{this.loadLibrary(n);this.showSidebar();try{this.sidebar.palettes[n.getHash()][0].scrollIntoView({behavior:"smooth"})}catch(p){}}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}});if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var f=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?-this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=f&&f.pickLibrary(mxUtils.bind(this,function(n,p){null!=p?e(p):this.spinner.spin(document.body,mxResources.get("loading"))&&f.getLibrary(n,mxUtils.bind(this,function(u){this.spinner.stop();e(u)}),mxUtils.bind(this,function(u){this.handleError(u,null!=u?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var c=document.createElement("input");-c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){if(null!=c.files){for(var n=0;n<c.files.length;n++)mxUtils.bind(this,function(p){var u=new FileReader;u.onload=mxUtils.bind(this,function(F){e(new LocalLibrary(this,F.target.result,p.name))});u.readAsText(p)})(c.files[n]);c.type="";c.type="file";c.value=""}}));c.style.display="none";document.body.appendChild(c);this.libFileInputElt=c}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=-mxUtils.bind(this,function(n,p){StorageFile.listFiles(this,"L",n,p)});window.openBrowserFile=mxUtils.bind(this,function(n,p,u){StorageFile.getFileContent(this,n,p,u)});window.deleteBrowserFile=mxUtils.bind(this,function(n,p,u){StorageFile.deleteFile(this,n,p,u)});var l=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(n){this.hideDialog(n)}));window.openFile.setConsumer(mxUtils.bind(this,function(n,p){e(b==App.MODE_BROWSER?new StorageLibrary(this,+this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=f&&f.pickLibrary(mxUtils.bind(this,function(n,p){null!=p?e(p):this.spinner.spin(document.body,mxResources.get("loading"))&&f.getLibrary(n,mxUtils.bind(this,function(v){this.spinner.stop();e(v)}),mxUtils.bind(this,function(v){this.handleError(v,null!=v?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var c=document.createElement("input");+c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){if(null!=c.files){for(var n=0;n<c.files.length;n++)mxUtils.bind(this,function(p){var v=new FileReader;v.onload=mxUtils.bind(this,function(F){e(new LocalLibrary(this,F.target.result,p.name))});v.readAsText(p)})(c.files[n]);c.type="";c.type="file";c.value=""}}));c.style.display="none";document.body.appendChild(c);this.libFileInputElt=c}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=+mxUtils.bind(this,function(n,p){StorageFile.listFiles(this,"L",n,p)});window.openBrowserFile=mxUtils.bind(this,function(n,p,v){StorageFile.getFileContent(this,n,p,v)});window.deleteBrowserFile=mxUtils.bind(this,function(n,p,v){StorageFile.deleteFile(this,n,p,v)});var l=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(n){this.hideDialog(n)}));window.openFile.setConsumer(mxUtils.bind(this,function(n,p){e(b==App.MODE_BROWSER?new StorageLibrary(this,n,p):new LocalLibrary(this,n,p))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=l;window.openFile=null})}};-App.prototype.saveLibrary=function(b,e,f,c,l,n,p){try{c=null!=c?c:this.mode;l=null!=l?l:!1;n=null!=n?n:!1;var u=this.createLibraryDataFromImages(e),F=mxUtils.bind(this,function(K){this.spinner.stop();null!=p&&p();this.handleError(K,null!=K?mxResources.get("errorSavingFile"):null)});null==f&&c==App.MODE_DEVICE&&(f=new LocalLibrary(this,u,b));if(null==f)this.pickFolder(c,mxUtils.bind(this,function(K){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?-this.drive.insertFile(b,u,K,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),F,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,u,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),F,K):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,-u,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),F,K):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,u,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),F,K):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,u,mxUtils.bind(this,function(d){this.spinner.stop();-this.hideDialog(!0);this.libraryLoaded(d,e)}),F,K):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,u,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),F,K):c==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,u,b),mxUtils.bind(this,function(d){this.hideDialog(!0);this.libraryLoaded(d,e)}),F):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));-else if(l||this.spinner.spin(document.body,mxResources.get("saving"))){f.setData(u);var H=mxUtils.bind(this,function(){f.save(!0,mxUtils.bind(this,function(K){this.spinner.stop();this.hideDialog(!0);n||this.libraryLoaded(f,e);null!=p&&p()}),F)});if(b!=f.getTitle()){var E=f.getHash();f.rename(b,mxUtils.bind(this,function(K){f.constructor!=LocalLibrary&&E!=f.getHash()&&(mxSettings.removeCustomLibrary(E),mxSettings.addCustomLibrary(f.getHash()));this.removeLibrarySidebar(E);H()}),F)}else H()}}catch(K){this.handleError(K)}};+App.prototype.saveLibrary=function(b,e,f,c,l,n,p){try{c=null!=c?c:this.mode;l=null!=l?l:!1;n=null!=n?n:!1;var v=this.createLibraryDataFromImages(e),F=mxUtils.bind(this,function(K){this.spinner.stop();null!=p&&p();this.handleError(K,null!=K?mxResources.get("errorSavingFile"):null)});null==f&&c==App.MODE_DEVICE&&(f=new LocalLibrary(this,v,b));if(null==f)this.pickFolder(c,mxUtils.bind(this,function(K){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?+this.drive.insertFile(b,v,K,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),F,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,v,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),F,K):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,+v,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),F,K):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,v,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),F,K):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,v,mxUtils.bind(this,function(d){this.spinner.stop();+this.hideDialog(!0);this.libraryLoaded(d,e)}),F,K):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,v,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),F,K):c==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,v,b),mxUtils.bind(this,function(d){this.hideDialog(!0);this.libraryLoaded(d,e)}),F):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));+else if(l||this.spinner.spin(document.body,mxResources.get("saving"))){f.setData(v);var H=mxUtils.bind(this,function(){f.save(!0,mxUtils.bind(this,function(K){this.spinner.stop();this.hideDialog(!0);n||this.libraryLoaded(f,e);null!=p&&p()}),F)});if(b!=f.getTitle()){var E=f.getHash();f.rename(b,mxUtils.bind(this,function(K){f.constructor!=LocalLibrary&&E!=f.getHash()&&(mxSettings.removeCustomLibrary(E),mxSettings.addCustomLibrary(f.getHash()));this.removeLibrarySidebar(E);H()}),F)}else H()}}catch(K){this.handleError(K)}};App.prototype.saveFile=function(b,e){var f=this.getCurrentFile(),c=this.mode;if(null!=f){var l=mxUtils.bind(this,function(){EditorUi.enableDrafts&&f.removeDraft();this.getCurrentFile()==f||f.isModified()||(f.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=e&&e()});if(b||null==f.getTitle()||null!=f.invalidFileHandle||null==this.mode)if(null!=f&&f.constructor==LocalFile&&null!=f.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,-function(u,F){f.invalidFileHandle=null;f.fileHandle=u;f.title=F.name;f.desc=F;f.editable=null;this.save(F.name,l)}),null,this.createFileSystemOptions(f.getTitle()));else{b=null!=f.getTitle()?f.getTitle():this.defaultFilename;var n=mxUtils.bind(this,function(u,F,H,E){if(null!=u&&0<u.length)if(/(\.pdf)$/i.test(u))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){H.value=u.split(".").slice(0,+function(v,F){f.invalidFileHandle=null;f.fileHandle=v;f.title=F.name;f.desc=F;f.editable=null;this.save(F.name,l)}),null,this.createFileSystemOptions(f.getTitle()));else{b=null!=f.getTitle()?f.getTitle():this.defaultFilename;var n=mxUtils.bind(this,function(v,F,H,E){if(null!=v&&0<v.length)if(/(\.pdf)$/i.test(v))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){H.value=v.split(".").slice(0,-1).join(".");H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==c&&F==App.MODE_DEVICE)null!=f&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(d,g){f.fileHandle=d;f.mode=App.MODE_DEVICE;f.title=g.name;f.desc=g;this.setMode(App.MODE_DEVICE);this.save(g.name,l)}),mxUtils.bind(this,function(d){"AbortError"!=d.name&&this.handleError(d)}),-this.createFileSystemOptions(u)):(this.setMode(App.MODE_DEVICE),this.save(u,l));else if("download"==F)(new LocalFile(this,null,u)).save();else if("_blank"==F)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(c!=F){var K=mxUtils.bind(this,function(d){var g=this.editor.graph,k=g.getSelectionCells(),v=g.getViewState(),t=this.currentPage;this.createFile(u,this.getFileData(/(\.xml)$/i.test(u)||-0>u.indexOf(".")||/(\.drawio)$/i.test(u),/(\.svg)$/i.test(u),/(\.html)$/i.test(u)),null,F,l,null==this.mode,d,null,null,mxUtils.bind(this,function(){this.restoreViewState(t,v,k)}))});null!=E?K(E):this.pickFolder(F,K)}else null!=F&&this.save(u,l)}),p=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(u,F,H){n(u.value,F,u,H);this.hideDialog()}),p?null:["_blank"]);this.showDialog(b.container,420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(f.getTitle(),+this.createFileSystemOptions(v)):(this.setMode(App.MODE_DEVICE),this.save(v,l));else if("download"==F)(new LocalFile(this,null,v)).save();else if("_blank"==F)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(c!=F){var K=mxUtils.bind(this,function(d){var g=this.editor.graph,k=g.getSelectionCells(),u=g.getViewState(),t=this.currentPage;this.createFile(v,this.getFileData(/(\.xml)$/i.test(v)||+0>v.indexOf(".")||/(\.drawio)$/i.test(v),/(\.svg)$/i.test(v),/(\.html)$/i.test(v)),null,F,l,null==this.mode,d,null,null,mxUtils.bind(this,function(){this.restoreViewState(t,u,k)}))});null!=E?K(E):this.pickFolder(F,K)}else null!=F&&this.save(v,l)}),p=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(v,F,H){n(v.value,F,v,H);this.hideDialog()}),p?null:["_blank"]);this.showDialog(b.container,420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(f.getTitle(),l)}};-App.prototype.loadTemplate=function(b,e,f,c,l){var n=!1,p=b,u=null!=c?c:b;c=/\.png$/i.test(u)||/\.pdf$/i.test(u);var F=EditorUi.isVisioFilename(u);this.editor.isCorsEnabledForUrl(p)||(n=c||F,p="t="+(new Date).getTime(),p=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+p+(n?"&base64=1":""));this.editor.loadUrl(p,mxUtils.bind(this,function(H){try{var E=n?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(H):atob(H):H;if(F||this.isVisioData(E))F||(u=l?this.isRemoteVisioData(E)?"raw.vss":"raw.vssx":this.isRemoteVisioData(E)?-"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(H.substring(H.indexOf(",")+1)),function(K){e(K)},f,u);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(E,u))this.isExternalDataComms()?this.parseFileData(E,mxUtils.bind(this,function(K){4==K.readyState&&200<=K.status&&299>=K.status&&"<mxGraphModel"==K.responseText.substring(0,13)&&e(K.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,f);else if(this.isLucidChartData(E))this.convertLucidChart(E,-mxUtils.bind(this,function(K){e(K)}),mxUtils.bind(this,function(K){f(K)}));else{if(/(\.png)($|\?)/i.test(u)||Editor.isPngData(E))E=Editor.extractGraphModelFromPng(H);e(E)}}catch(K){f(K)}}),f,/(\.png)($|\?)/i.test(u)||F,null,null,n)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};+App.prototype.loadTemplate=function(b,e,f,c,l){var n=!1,p=b,v=null!=c?c:b;c=/\.png$/i.test(v)||/\.pdf$/i.test(v);var F=EditorUi.isVisioFilename(v);this.editor.isCorsEnabledForUrl(p)||(n=c||F,p="t="+(new Date).getTime(),p=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+p+(n?"&base64=1":""));this.editor.loadUrl(p,mxUtils.bind(this,function(H){try{var E=n?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(H):atob(H):H;if(F||this.isVisioData(E))F||(v=l?this.isRemoteVisioData(E)?"raw.vss":"raw.vssx":this.isRemoteVisioData(E)?+"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(H.substring(H.indexOf(",")+1)),function(K){e(K)},f,v);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(E,v))this.isExternalDataComms()?this.parseFileData(E,mxUtils.bind(this,function(K){4==K.readyState&&200<=K.status&&299>=K.status&&"<mxGraphModel"==K.responseText.substring(0,13)&&e(K.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,f);else if(this.isLucidChartData(E))this.convertLucidChart(E,+mxUtils.bind(this,function(K){e(K)}),mxUtils.bind(this,function(K){f(K)}));else{if(/(\.png)($|\?)/i.test(v)||Editor.isPngData(E))E=Editor.extractGraphModelFromPng(H);e(E)}}catch(K){f(K)}}),f,/(\.png)($|\?)/i.test(v)||F,null,null,n)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};App.prototype.isModeEnabled=function(b){return b==App.MODE_GOOGLE?"function"===typeof window.DriveClient&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode):b==App.MODE_GITHUB?null!=this.gitHub:b==App.MODE_GITLAB?null!=this.gitLab:b==App.MODE_DROPBOX?"function"===typeof window.DropboxClient&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):b==App.MODE_ONEDRIVE?"function"===typeof window.OneDriveClient&&("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode):b==App.MODE_TRELLO?"function"===typeof window.TrelloClient&&"1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):!1};App.prototype.isModeReady=function(b){return null!=this.getServiceForName(b)&&(b!=App.MODE_DROPBOX||"undefined"!==typeof Dropbox.choose)};App.prototype.uncompressPages=function(b){if(null!=b)try{var e=mxUtils.parseXml(b);if("mxfile"==e.documentElement.nodeName){for(var f=e.documentElement.getElementsByTagName("diagram"),c=0;c<f.length;c++){var l=Editor.parseDiagramNode(f[c],!0);null!=l&&(mxUtils.setTextContent(f[c],""),f[c].appendChild(l))}b=mxUtils.getPrettyXml(e.documentElement)}}catch(n){}return b};-App.prototype.createFile=function(b,e,f,c,l,n,p,u,F,H){c=u?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;null==e||Editor.defaultCompressed||(e=this.uncompressPages(e));var E=mxUtils.bind(this,function(){this.spinner.stop()}),K=mxUtils.bind(this,function(g){E();null==g&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=g&&this.handleError(g)});try{var d=mxUtils.bind(this,function(g){E();this.fileCreated(g,+App.prototype.createFile=function(b,e,f,c,l,n,p,v,F,H){c=v?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;null==e||Editor.defaultCompressed||(e=this.uncompressPages(e));var E=mxUtils.bind(this,function(){this.spinner.stop()}),K=mxUtils.bind(this,function(g){E();null==g&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=g&&this.handleError(g)});try{var d=mxUtils.bind(this,function(g){E();this.fileCreated(g,f,n,l,F,H)});c==App.MODE_GOOGLE&&null!=this.drive?(null==p&&null!=this.stateArg&&null!=this.stateArg.folderId&&(p=this.stateArg.folderId),this.drive.insertFile(b,e,p,d,K)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,e,d,K,!1,p):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,e,d,K,!1,p):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,e,d,K,!1,p):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,e,d,K):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?-this.oneDrive.insertFile(b,e,d,K,!1,p):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,e,d,K):!u&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(E(),this.showSaveFilePicker(mxUtils.bind(this,function(g,k){var v=new LocalFile(this,e,k.name,null,g,k);v.saveFile(k.name,!1,mxUtils.bind(this,function(){this.fileCreated(v,f,n,l,F,H)}),K,!0)}),mxUtils.bind(this,function(g){"AbortError"!=g.name&&K(g)}),this.createFileSystemOptions(b))):(E(),this.fileCreated(new LocalFile(this,e,b,null==c),f,n,l,F,H))}catch(g){E(),+this.oneDrive.insertFile(b,e,d,K,!1,p):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,e,d,K):!v&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(E(),this.showSaveFilePicker(mxUtils.bind(this,function(g,k){var u=new LocalFile(this,e,k.name,null,g,k);u.saveFile(k.name,!1,mxUtils.bind(this,function(){this.fileCreated(u,f,n,l,F,H)}),K,!0)}),mxUtils.bind(this,function(g){"AbortError"!=g.name&&K(g)}),this.createFileSystemOptions(b))):(E(),this.fileCreated(new LocalFile(this,e,b,null==c),f,n,l,F,H))}catch(g){E(),this.handleError(g)}}};-App.prototype.fileCreated=function(b,e,f,c,l,n){var p=window.location.pathname;null!=e&&0<e.length&&(p+="?libs="+e);null!=l&&0<l.length&&(p+="?clibs="+l);p=this.getUrl(p);b.getMode()!=App.MODE_DEVICE&&(p+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var u=b.getData();u=0<u.length?this.editor.extractGraphModel(mxUtils.parseXml(u).documentElement,!0):null;var F=window.location.protocol+"//"+window.location.hostname+p,H=u,E=null;null!=u&&/\.svg$/i.test(b.getTitle())&&(E=-this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(E.container),H=this.decodeNodeIntoGraph(H,E));b.setData(this.createFileData(u,E,b,F));null!=E&&E.container.parentNode.removeChild(E.container);var K=mxUtils.bind(this,function(){this.spinner.stop()}),d=mxUtils.bind(this,function(){K();var g=this.getCurrentFile();null==f&&null!=g&&(f=!g.isModified()&&null==g.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,n);f&&b.addAllSavedStatus();-null!=e&&this.sidebar.showEntries(e);if(null!=l){for(var t=[],x=l.split(";"),A=0;A<x.length;A++)t.push(decodeURIComponent(x[A]));this.loadLibraries(t)}null!=c&&c()}),v=mxUtils.bind(this,function(){f||null==g||!g.isModified()?k():this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==f||f?v():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),-null==b.getMode())),window.geOpenWindow(p,null,v))});b.constructor==LocalFile?d():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){d()}),mxUtils.bind(this,function(g){K();null!=g&&"AbortError"==g.name||this.handleError(g)}))}};+App.prototype.fileCreated=function(b,e,f,c,l,n){var p=window.location.pathname;null!=e&&0<e.length&&(p+="?libs="+e);null!=l&&0<l.length&&(p+="?clibs="+l);p=this.getUrl(p);b.getMode()!=App.MODE_DEVICE&&(p+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var v=b.getData();v=0<v.length?this.editor.extractGraphModel(mxUtils.parseXml(v).documentElement,!0):null;var F=window.location.protocol+"//"+window.location.hostname+p,H=v,E=null;null!=v&&/\.svg$/i.test(b.getTitle())&&(E=+this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(E.container),H=this.decodeNodeIntoGraph(H,E));b.setData(this.createFileData(v,E,b,F));null!=E&&E.container.parentNode.removeChild(E.container);var K=mxUtils.bind(this,function(){this.spinner.stop()}),d=mxUtils.bind(this,function(){K();var g=this.getCurrentFile();null==f&&null!=g&&(f=!g.isModified()&&null==g.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,n);f&&b.addAllSavedStatus();+null!=e&&this.sidebar.showEntries(e);if(null!=l){for(var t=[],x=l.split(";"),A=0;A<x.length;A++)t.push(decodeURIComponent(x[A]));this.loadLibraries(t)}null!=c&&c()}),u=mxUtils.bind(this,function(){f||null==g||!g.isModified()?k():this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==f||f?u():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),+null==b.getMode())),window.geOpenWindow(p,null,u))});b.constructor==LocalFile?d():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){d()}),mxUtils.bind(this,function(g){K();null!=g&&"AbortError"==g.name||this.handleError(g)}))}};App.prototype.loadFile=function(b,e,f,c,l){if("1"==urlParams.openInSameWin||navigator.standalone)e=!0;this.hideDialog();var n=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var F=mxUtils.bind(this,function(g){this.handleError(g,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var k=this.getCurrentFile();window.location.hash=null!=k?k.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(g){null!=g?(this.fileLoaded(new StorageFile(this,g,b)),null!=c&&c()):F({message:mxResources.get("fileNotFound")})}),F)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var g=this.getCurrentFile();window.location.hash=null!=g?g.getHash():""}));else if(null!=f)this.spinner.stop(),this.fileLoaded(f),null!=c&&c();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var H=decodeURIComponent(b.substring(1));"<"!=H.charAt(0)&&(H=Graph.decompress(H));H=new LocalFile(this,H,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);H.getHash=function(){return b};this.fileLoaded(H);null!=c&&c()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(g,k){this.spinner.stop();this.fileLoaded(new EmbedFile(this,g,k));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var E=decodeURIComponent(b.substring(1)),K=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=E.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var g=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var k=E.substring(31,E.lastIndexOf("&ex"));this.loadFile("G"+k,e,null,mxUtils.bind(this,function(){var v=this.getCurrentFile();null!=v&&this.editor.chromeless&&-!this.editor.editable&&(v.getHash=function(){return"G"+k},window.location.hash="#"+v.getHash());null!=c&&c()}));return!0}return!1});!g()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",g);return!0});this.loadTemplate(E,mxUtils.bind(this,function(g){this.spinner.stop();if(null!=g&&0<g.length){var k=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var v=E,t=E.lastIndexOf("."),x=v.lastIndexOf("/");t>x&&0<x&&(v=v.substring(x+1,t),t=E.substring(t),-this.useCanvasForExport||".png"!=t||(t=".drawio"),".svg"===t||".xml"===t||".html"===t||".png"===t||".drawio"===t)&&(k=v+t)}g=new LocalFile(this,g,null!=urlParams.title?decodeURIComponent(urlParams.title):k,!0);g.getHash=function(){return b};this.fileLoaded(g,!0)?null!=c&&c():K()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else K()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,-function(){K()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var d=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var g=this.getServiceForName(d);if(null==g)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var v=this.getCurrentFile();-window.location.hash=null!=v?v.getHash():""}));else{var k=b.charAt(0);b=decodeURIComponent(b.substring(1));g.getFile(b,mxUtils.bind(this,function(v){this.spinner.stop();this.fileLoaded(v);var t=this.getCurrentFile();if(null==t)window.location.hash="",this.showSplash();else if(this.editor.chromeless&&!this.editor.editable){t.getHash=function(){return k+b};v="#"+t.getHash();try{var x=this.getHashObject();null==x||mxUtils.isEmptyObject(x)||(v=v+"#"+encodeURIComponent(JSON.stringify(x)))}catch(A){}window.location.replace(v)}else v==-t&&null==v.getMode()&&(x=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+x+'" class="geStatusAlert">'+x+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(v){null!=window.console&&null!=v&&console.log("error in loadFile:",b,v);var t=mxUtils.bind(this,function(){var x=this.getCurrentFile();null==x?(window.location.hash="",this.showSplash()):window.location.hash="#"+x.getHash()});null==v||"AbortError"!=v.name?this.handleError(v,null!=v?mxResources.get("errorLoadingFile"):null,-t,null,null,"#"+k+b):t()}))}})()}}),p=this.getCurrentFile(),u=mxUtils.bind(this,function(){l||null==p||!p.isModified()?n():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=p&&(window.location.hash=p.getHash())}),n,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?u():null==p||e?u():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,u)).container,320,160,!0,!0)};+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var E=decodeURIComponent(b.substring(1)),K=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=E.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var g=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var k=E.substring(31,E.lastIndexOf("&ex"));this.loadFile("G"+k,e,null,mxUtils.bind(this,function(){var u=this.getCurrentFile();null!=u&&this.editor.chromeless&&+!this.editor.editable&&(u.getHash=function(){return"G"+k},window.location.hash="#"+u.getHash());null!=c&&c()}));return!0}return!1});!g()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",g);return!0});this.loadTemplate(E,mxUtils.bind(this,function(g){this.spinner.stop();if(null!=g&&0<g.length){var k=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var u=E,t=E.lastIndexOf("."),x=u.lastIndexOf("/");t>x&&0<x&&(u=u.substring(x+1,t),t=E.substring(t),+this.useCanvasForExport||".png"!=t||(t=".drawio"),".svg"===t||".xml"===t||".html"===t||".png"===t||".drawio"===t)&&(k=u+t)}g=new LocalFile(this,g,null!=urlParams.title?decodeURIComponent(urlParams.title):k,!0);g.getHash=function(){return b};this.fileLoaded(g,!0)?null!=c&&c():K()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else K()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,+function(){K()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var d=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var g=this.getServiceForName(d);if(null==g)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var u=this.getCurrentFile();+window.location.hash=null!=u?u.getHash():""}));else{var k=b.charAt(0);b=decodeURIComponent(b.substring(1));g.getFile(b,mxUtils.bind(this,function(u){this.spinner.stop();this.fileLoaded(u);var t=this.getCurrentFile();if(null==t)window.location.hash="",this.showSplash();else if(this.editor.chromeless&&!this.editor.editable){t.getHash=function(){return k+b};u="#"+t.getHash();try{var x=this.getHashObject();null==x||mxUtils.isEmptyObject(x)||(u=u+"#"+encodeURIComponent(JSON.stringify(x)))}catch(A){}window.location.replace(u)}else u==+t&&null==u.getMode()&&(x=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+x+'" class="geStatusAlert">'+x+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(u){null!=window.console&&null!=u&&console.log("error in loadFile:",b,u);var t=mxUtils.bind(this,function(){var x=this.getCurrentFile();null==x?(window.location.hash="",this.showSplash()):window.location.hash="#"+x.getHash()});null==u||"AbortError"!=u.name?this.handleError(u,null!=u?mxResources.get("errorLoadingFile"):null,+t,null,null,"#"+k+b):t()}))}})()}}),p=this.getCurrentFile(),v=mxUtils.bind(this,function(){l||null==p||!p.isModified()?n():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=p&&(window.location.hash=p.getHash())}),n,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?v():null==p||e?v():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,v)).container,320,160,!0,!0)};App.prototype.getLibraryStorageHint=function(b){var e=b.getTitle();b.constructor!=LocalLibrary&&(e+="\n"+b.getHash());b.constructor==DriveLibrary?e+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?e+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?e+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?e+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?e+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?e+=" ("+mxResources.get("browser")+")":b.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e};App.prototype.restoreLibraries=function(){function b(f){for(var c=0;c<f.length;c++)""!=f[c]&&0>mxUtils.indexOf(e,f[c])&&e.push(f[c])}var e=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(e)};-App.prototype.loadLibraries=function(b,e){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var f=mxUtils.bind(this,function(H,E){E||mxSettings.removeCustomLibrary(H);delete this.loadedLibraries[H]}),c=0,l=[],n=0<b.length&&"L.scratchpad"==b[0]?1:0,p=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var H=b.length-1;0<=H;H--)null!=l[H]&&this.loadLibrary(l[H],H<=n);null!=e&&e()}});if(null!=b)for(var u=0;u<b.length;u++){var F=encodeURIComponent(decodeURIComponent(b[u]));+App.prototype.loadLibraries=function(b,e){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var f=mxUtils.bind(this,function(H,E){E||mxSettings.removeCustomLibrary(H);delete this.loadedLibraries[H]}),c=0,l=[],n=0<b.length&&"L.scratchpad"==b[0]?1:0,p=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var H=b.length-1;0<=H;H--)null!=l[H]&&this.loadLibrary(l[H],H<=n);null!=e&&e()}});if(null!=b)for(var v=0;v<b.length;v++){var F=encodeURIComponent(decodeURIComponent(b[v]));mxUtils.bind(this,function(H,E){if(null!=H&&0<H.length&&null==this.loadedLibraries[H]&&null==this.sidebar.palettes[H]){this.loadedLibraries[H]=!0;c++;var K=mxUtils.bind(this,function(x){l[E]=x;c--;p()}),d=mxUtils.bind(this,function(x){f(H,x);c--;p()}),g=H.substring(0,1);if("L"==g)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var x=decodeURIComponent(H.substring(1));StorageFile.getFileContent(this,x,mxUtils.bind(this,function(A){".scratchpad"==x&&null==-A&&(A=this.emptyLibraryXml);null!=A?K(new StorageLibrary(this,A,x)):d()}),d)}catch(A){d()}}),0);else if("U"==g){var k=decodeURIComponent(H.substring(1));this.isOffline()?d(!0):this.loadTemplate(k,mxUtils.bind(this,function(x){null!=x&&0<x.length?K(new UrlLibrary(this,x,k)):d()}),function(){d()},null,!0)}else if("R"==g){g=decodeURIComponent(H.substring(1));try{g=JSON.parse(g);var v={id:g[0],title:g[1],downloadUrl:g[2]};this.remoteInvoke("getFileContent",[v.downloadUrl],null,mxUtils.bind(this,function(x){try{K(new RemoteLibrary(this,-x,v))}catch(A){d()}}),function(){d()})}catch(x){d()}}else if("S"==g&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(H.substring(1)),function(x){K(x)},d)}catch(x){d()}else{var t=null;"G"==g?null!=this.drive&&null!=this.drive.user&&(t=this.drive):"H"==g?null!=this.gitHub&&null!=this.gitHub.getUser()&&(t=this.gitHub):"T"==g?null!=this.trello&&this.trello.isAuthorized()&&(t=this.trello):"D"==g?null!=this.dropbox&&null!=this.dropbox.getUser()&&(t=this.dropbox):"W"==g&&null!=this.oneDrive&&-null!=this.oneDrive.getUser()&&(t=this.oneDrive);null!=t?t.getLibrary(decodeURIComponent(H.substring(1)),mxUtils.bind(this,function(x){try{K(x)}catch(A){d()}}),function(x){d()}):d(!0)}}})(F,u)}p()}};+A&&(A=this.emptyLibraryXml);null!=A?K(new StorageLibrary(this,A,x)):d()}),d)}catch(A){d()}}),0);else if("U"==g){var k=decodeURIComponent(H.substring(1));this.isOffline()?d(!0):this.loadTemplate(k,mxUtils.bind(this,function(x){null!=x&&0<x.length?K(new UrlLibrary(this,x,k)):d()}),function(){d()},null,!0)}else if("R"==g){g=decodeURIComponent(H.substring(1));try{g=JSON.parse(g);var u={id:g[0],title:g[1],downloadUrl:g[2]};this.remoteInvoke("getFileContent",[u.downloadUrl],null,mxUtils.bind(this,function(x){try{K(new RemoteLibrary(this,+x,u))}catch(A){d()}}),function(){d()})}catch(x){d()}}else if("S"==g&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(H.substring(1)),function(x){K(x)},d)}catch(x){d()}else{var t=null;"G"==g?null!=this.drive&&null!=this.drive.user&&(t=this.drive):"H"==g?null!=this.gitHub&&null!=this.gitHub.getUser()&&(t=this.gitHub):"T"==g?null!=this.trello&&this.trello.isAuthorized()&&(t=this.trello):"D"==g?null!=this.dropbox&&null!=this.dropbox.getUser()&&(t=this.dropbox):"W"==g&&null!=this.oneDrive&&+null!=this.oneDrive.getUser()&&(t=this.oneDrive);null!=t?t.getLibrary(decodeURIComponent(H.substring(1)),mxUtils.bind(this,function(x){try{K(x)}catch(A){d()}}),function(x){d()}):d(!0)}}})(F,v)}p()}};App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&(this.buttonContainer.style.paddingRight="1"==urlParams.atlas?"32px":"8px");this.commentsSupported()&&"simple"!=Editor.currentTheme&&"atlas"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton geAdaptiveAsset",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;width:24px;height:24px;background-size:24px 24px;background-position:center center;cursor:pointer;background-repeat:no-repeat;background-image:url("+Editor.commentImage+");",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),null!=this.userElement&&this.userElement.parentNode==this.buttonContainer?this.buttonContainer.insertBefore(this.commentButton,this.userElement):null!=this.shareButton&&this.shareButton.parentNode==this.buttonContainer?this.buttonContainer.insertBefore(this.commentButton,this.shareButton):this.buttonContainer.appendChild(this.commentButton)):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=null);if("draw.io"!=this.getServiceName()||"1"==urlParams.embed||this.isStandaloneApp())null!=urlParams.notif&&@@ -14204,20 +14205,20 @@ this.fetchAndShowNotification(urlParams.notif),!this.isStandaloneApp()||"simple"null!=this.shareButton&&(this.shareButton.style.display="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme?"none":"inline-flex","simple"==Editor.currentTheme||"sketch"==Editor.currentTheme))this.shareButton.parentNode.style.display=0==this.shareButton.parentNode.clientWidth?"none":""}else null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null);"1"!=urlParams.extAuth&&"atlas"!=Editor.currentTheme&&this.fetchAndShowNotification("online",this.mode)}null!=this.commentButton&&(this.commentButton.style.marginRight="",this.commentButton.style.top="","simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&"1"!=urlParams.embed?this.commentButton.style.top="-6px":"1"==urlParams.embed&&(this.commentButton.style.marginRight="4px"));null!=this.notificationBtn&&("simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"atlas"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&"1"!=urlParams.embed?(this.notificationBtn.style.marginRight="4px",this.notificationBtn.style.marginTop="-12px"):(this.notificationBtn.style.marginRight="",this.notificationBtn.style.marginTop=""))}};-App.prototype.fetchAndShowNotification=function(b,e){if(!this.fetchingNotif){b=b||"online";var f=null,c=mxUtils.bind(this,function(l){l=l.filter(function(F){return!F.targets||-1<F.targets.indexOf(b)||null!=e&&-1<F.targets.indexOf(e)});for(var n=b+"NotifReadTS",p=isLocalStorage?parseInt(localStorage.getItem(n)):!0,u=0;u<l.length;u++)l[u].isNew=!p||l[u].timestamp>p;this.showNotification(l,n)});try{isLocalStorage&&(f=JSON.parse(localStorage.getItem(".notifCache")))}catch(l){}null==f||f.ts+864E5<Date.now()?-(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(l){if(200<=l.getStatus()&&299>=l.getStatus())try{var n=JSON.parse(l.getText());n.sort(function(p,u){return u.timestamp-p.timestamp});isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:n}));this.fetchingNotif=!1;c(n)}catch(p){}}))):c(f.notifs)}};+App.prototype.fetchAndShowNotification=function(b,e){if(!this.fetchingNotif){b=b||"online";var f=null,c=mxUtils.bind(this,function(l){l=l.filter(function(F){return!F.targets||-1<F.targets.indexOf(b)||null!=e&&-1<F.targets.indexOf(e)});for(var n=b+"NotifReadTS",p=isLocalStorage?parseInt(localStorage.getItem(n)):!0,v=0;v<l.length;v++)l[v].isNew=!p||l[v].timestamp>p;this.showNotification(l,n)});try{isLocalStorage&&(f=JSON.parse(localStorage.getItem(".notifCache")))}catch(l){}null==f||f.ts+864E5<Date.now()?+(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(l){if(200<=l.getStatus()&&299>=l.getStatus())try{var n=JSON.parse(l.getText());n.sort(function(p,v){return v.timestamp-p.timestamp});isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:n}));this.fetchingNotif=!1;c(n)}catch(p){}}))):c(f.notifs)}};App.prototype.showNotification=function(b,e){function f(H){var E=document.querySelector(".geNotification-count");null!=E&&(E.innerHTML=H,E.style.display=0==H?"none":"",E=document.querySelector(".geNotification-bell"),E.style.animation=0==H?"none":"",E.className="geNotification-bell"+(0==H?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==H?"none":"")}var c=b.length;if("min"==Editor.currentTheme||"simple"==Editor.currentTheme)for(var l=c=0;l<b.length;l++)b[l].isNew&&c++;if(0==c)null!=this.notificationBtn&&(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var n=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var H=this.notificationWin.querySelectorAll(".circle.active"),E=0;E<H.length;E++)H[E].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(e,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";c=document.createElement("span");c.className="geNotification-count";this.notificationBtn.appendChild(c);this.notifCount=c;c=document.createElement("div");c.className="geNotification-bell";l=document.createElement("span");l.className="geBell-top";c.appendChild(l);l=document.createElement("span");l.className="geBell-middle";c.appendChild(l);l=document.createElement("span");l.className="geBell-bottom";c.appendChild(l);l=document.createElement("span");l.className="geBell-rad";c.appendChild(l);this.notificationBtn.appendChild(c);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);l=document.createElement("div");l.className="header";c=document.createElement("span");c.className="title";c.textContent=mxResources.get("notifications");l.appendChild(c);c=document.createElement("span");c.className="closeBtn";c.textContent="x";l.appendChild(c);this.notificationWin.appendChild(l);l=document.createElement("div");l.className="notifications clearfix";var p=document.createElement("div");p.setAttribute("id","geNotifList");p.style.position="relative";l.appendChild(p);this.notificationWin.appendChild(l);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=-0;var H=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=H.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=H.right-this.notificationWin.clientWidth+"px";f(0)}else n()}));mxEvent.addListener(c,"click",n)}else this.notificationBtn.style.display="";var u=0,F=document.getElementById("geNotifList");if(null!=F){F.innerHTML='<div class="line"></div>';for(l=0;l<b.length;l++)(function(H,E){E.isNew&&u++;var K=document.createElement("div");K.className="notification";-H=H.timeSince(new Date(E.timestamp));null==H&&(H=mxResources.get("lessThanAMinute"));K.innerHTML='<div class="circle'+(E.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[H],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(E.content)+"</p>";E.link&&mxEvent.addListener(K,"click",function(){window.open(E.link,"notifWin")});F.appendChild(K)})(this,b[l]);f(u)}}};-App.prototype.save=function(b,e){var f=this.getCurrentFile(),c=!0,l=mxUtils.bind(this,function(){c&&(c=!1,f.handleFileSuccess(!0),null!=e&&e())}),n=mxUtils.bind(this,function(p){if(c){c=!1;Editor.addRetryToError(p,mxUtils.bind(this,function(){this.save(b,e)}));if(null!=p&&null!=p.retry){var u=p.retry;p.retry=function(){c=!0;try{f.isModified()?u():l()}catch(F){n(F)}}}f.handleFileError(p,null==p||"AbortError"!=p.name)}});if(null!=f&&this.spinner.spin(document.body,mxResources.get("saving"),n,3*this.timeout))try{this.editor.setStatus(""),+0;var H=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=H.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=H.right-this.notificationWin.clientWidth+"px";f(0)}else n()}));mxEvent.addListener(c,"click",n)}else this.notificationBtn.style.display="";var v=0,F=document.getElementById("geNotifList");if(null!=F){F.innerHTML='<div class="line"></div>';for(l=0;l<b.length;l++)(function(H,E){E.isNew&&v++;var K=document.createElement("div");K.className="notification";+H=H.timeSince(new Date(E.timestamp));null==H&&(H=mxResources.get("lessThanAMinute"));K.innerHTML='<div class="circle'+(E.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[H],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(E.content)+"</p>";E.link&&mxEvent.addListener(K,"click",function(){window.open(E.link,"notifWin")});F.appendChild(K)})(this,b[l]);f(v)}}};+App.prototype.save=function(b,e){var f=this.getCurrentFile(),c=!0,l=mxUtils.bind(this,function(){c&&(c=!1,f.handleFileSuccess(!0),null!=e&&e())}),n=mxUtils.bind(this,function(p){if(c){c=!1;Editor.addRetryToError(p,mxUtils.bind(this,function(){this.save(b,e)}));if(null!=p&&null!=p.retry){var v=p.retry;p.retry=function(){c=!0;try{f.isModified()?v():l()}catch(F){n(F)}}}f.handleFileError(p,null==p||"AbortError"!=p.name)}});if(null!=f&&this.spinner.spin(document.body,mxResources.get("saving"),n,3*this.timeout))try{this.editor.setStatus(""),this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),b==f.getTitle()?f.save(!0,l,n):f.saveAs(b,l,n)}catch(p){n(p)}};App.prototype.getExtensionForService=function(b){b=this.getServiceForName(b);return null!=b?b.extension:".drawio"};App.prototype.getServiceForName=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:null};App.prototype.getTitleForService=function(b){return b==App.MODE_GOOGLE?mxResources.get("googleDrive"):b==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):EditorUi.prototype.getTitleForService.apply(this,arguments)};-App.prototype.pickFolder=function(b,e,f,c,l,n){f=null!=f?f:!0;var p=this.spinner.pause();f&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(u){p();if(u.action==google.picker.Action.PICKED){var F=null;null!=u.docs&&0<u.docs.length&&"folder"==u.docs[0].type&&(F=u.docs[0].id);e(n?u:F)}}),l):f&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(u){p();if(null!=u&&null!=u.value&&0<u.value.length){var F=OneDriveFile.prototype.getIdOf(u.value[0]);-e(n?u:F)}}),c):f&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(u){p();e(u)})):f&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(u){p();e(u)})):f&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(u){p();e(u)})):EditorUi.prototype.pickFolder.apply(this,arguments)};+App.prototype.pickFolder=function(b,e,f,c,l,n){f=null!=f?f:!0;var p=this.spinner.pause();f&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(v){p();if(v.action==google.picker.Action.PICKED){var F=null;null!=v.docs&&0<v.docs.length&&"folder"==v.docs[0].type&&(F=v.docs[0].id);e(n?v:F)}}),l):f&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(v){p();if(null!=v&&null!=v.value&&0<v.value.length){var F=OneDriveFile.prototype.getIdOf(v.value[0]);+e(n?v:F)}}),c):f&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(v){p();e(v)})):f&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(v){p();e(v)})):f&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(v){p();e(v)})):EditorUi.prototype.pickFolder.apply(this,arguments)};App.prototype.exportFile=function(b,e,f,c,l,n){l==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(e,c?this.base64ToBlob(b,f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)})):l==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(e,b,n,mxUtils.bind(this,function(p){this.spinner.stop()}),mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}),f,c):l==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(e,c?this.base64ToBlob(b,f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}),!1,n):l==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(e,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}),!0,n,c):l==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(e,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}),!0,n,c):l==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(e,c?this.base64ToBlob(b,@@ -14226,11 +14227,11 @@ function(){localStorage.setItem(e,b)}),null==localStorage.getItem(e)?f():this.coApp.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerText="";var e=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,e);this.fname.setAttribute("title",e+" - "+mxResources.get("rename"))}e=this.editor.graph;var f=b.isEditable();e.isEnabled()&&!f&&e.reset();e.setEnabled(f);null==urlParams.rev&&(this.updateDocumentTitle(),e=b.getHash(),0<e.length?(e!=this.getDiagramId()&&(window.location.hash=e),this.updateHashObject()):0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};App.prototype.showAuthDialog=function(b,e,f,c){var l=this.spinner.pause();this.showDialog((new AuthDialog(this,b,e,mxUtils.bind(this,function(n){try{null!=f&&f(n,mxUtils.bind(this,function(){this.hideDialog();l()}))}catch(p){this.editor.setStatus(mxUtils.htmlEntities(p.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(n){null!=c&&c(n);n&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};-App.prototype.convertFile=function(b,e,f,c,l,n,p,u){var F=e;/\.svg$/i.test(F)||(F=F.substring(0,e.lastIndexOf("."))+c);var H=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(H=!0);if(/\.v(dx|sdx?)$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var E=new XMLHttpRequest;E.open("GET",b,!0);H||(E.responseType="blob");if(u)for(var K in u)E.setRequestHeader(K,u[K]);E.onload=mxUtils.bind(this,function(){if(200<=+App.prototype.convertFile=function(b,e,f,c,l,n,p,v){var F=e;/\.svg$/i.test(F)||(F=F.substring(0,e.lastIndexOf("."))+c);var H=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(H=!0);if(/\.v(dx|sdx?)$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var E=new XMLHttpRequest;E.open("GET",b,!0);H||(E.responseType="blob");if(v)for(var K in v)E.setRequestHeader(K,v[K]);E.onload=mxUtils.bind(this,function(){if(200<=E.status&&299>=E.status){var g=null;H?(g=JSON.parse(E.responseText),g=this.base64ToBlob(g.content,"application/octet-stream")):g=new Blob([E.response],{type:"application/octet-stream"});this.importVisio(g,mxUtils.bind(this,function(k){l(new LocalFile(this,k,F,!0))}),n,e)}else null!=n&&n({message:mxResources.get("errorLoadingFile")})});E.onerror=n;E.send()}else{var d=mxUtils.bind(this,function(g){try{if(/\.pdf$/i.test(e)){var k=Editor.extractGraphModelFromPdf(g);null!=k&&0<k.length&&l(new LocalFile(this,-k,F,!0))}else/\.png$/i.test(e)?(k=this.extractGraphModelFromPng(g),null!=k?l(new LocalFile(this,k,F,!0)):l(new LocalFile(this,g,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,b)?this.parseFileData(g,mxUtils.bind(this,function(v){4==v.readyState&&(200<=v.status&&299>=v.status?l(new LocalFile(this,v.responseText,F,!0)):null!=n&&n({message:mxResources.get("errorLoadingFile")}))}),e):l(new LocalFile(this,g,F,!0))}catch(v){null!=n&&n(v)}});f=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||+k,F,!0))}else/\.png$/i.test(e)?(k=this.extractGraphModelFromPng(g),null!=k?l(new LocalFile(this,k,F,!0)):l(new LocalFile(this,g,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,b)?this.parseFileData(g,mxUtils.bind(this,function(u){4==u.readyState&&(200<=u.status&&299>=u.status?l(new LocalFile(this,u.responseText,F,!0)):null!=n&&n({message:mxResources.get("errorLoadingFile")}))}),e):l(new LocalFile(this,g,F,!0))}catch(u){null!=n&&n(u)}});f=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||/\.pdf$/i.test(e)||null!=f&&"image/"==f.substring(0,6);H?mxUtils.get(b,mxUtils.bind(this,function(g){if(200<=g.getStatus()&&299>=g.getStatus()){if(null!=l){g=JSON.parse(g.getText());var k=g.content;"base64"===g.encoding&&(k=/\.png$/i.test(e)?"data:image/png;base64,"+k:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+k:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(k):atob(k));d(k)}}else null!=n&&n({code:App.ERROR_UNKNOWN})}),function(){null!=n&&n({code:App.ERROR_UNKNOWN})},!1,this.timeout,-function(){null!=n&&n({code:App.ERROR_TIMEOUT,retry:fn})},u):null!=p?p(b,d,n,f):this.editor.loadUrl(b,d,n,f,null,null,null,u)}};+function(){null!=n&&n({code:App.ERROR_TIMEOUT,retry:fn})},v):null!=p?p(b,d,n,f):this.editor.loadUrl(b,d,n,f,null,null,null,v)}};App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.backgroundColor="light-dark(#f08705, transparent)";this.appIcon.style.margin="8px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundSize="100% 100%";this.appIcon.style.backgroundRepeat="no-repeat";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(c){this.appIconClicked(c)}));mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&(c=c.getMode(),c==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):c==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):c==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):c==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",@@ -14257,21 +14258,21 @@ App.prototype.updateUserElementIcon=function(){var b=this.userElement;if(null!=bf.setAttribute("border","0");f.style.position="absolute";f.style.left="16px";f.style.width="12px";f.style.height="12px";f.className="geAdaptiveAsset";var l=e.getRealtimeError();e=e.getRealtimeState();c+=" (";1==e?(f.src=Editor.syncImage,c+=mxResources.get("online")):(f.src=Editor.syncProblemImage,c=null!=l&&null!=l.message?c+l.message:c+mxResources.get("disconnected"));c+=")";"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme?(b.appendChild(f),"min"==Editor.currentTheme&&(b.style.marginRight="4px")):f.style.top="2px"}b.setAttribute("title",c)}}};App.prototype.hideUserPanel=function(){null!=this.userPanel&&null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)};App.prototype.toggleUserPanel=function(){if(null==this.userPanel){var b=document.createElement("div");b.className="geDialog";b.style.position="absolute";b.style.zIndex=5;b.style.padding="0px";b.style.cursor="default";b.style.minWidth="300px";this.userPanel=b;mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(p){mxEvent.isConsumed(p)||this.hideUserPanel()}))}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var e=!1;this.userPanel.innerText=-"";b=document.createElement("img");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("close"));b.className="geDialogClose";b.style.top="8px";b.style.right="8px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideUserPanel()}));this.userPanel.appendChild(b);if(null!=this.drive){var f=this.drive.getUsersList();if(0<f.length){var c=mxUtils.bind(this,function(p,u){var F=this.getCurrentFile();null!=F&&F.constructor==DriveFile?(this.spinner.spin(document.body,-u),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();p()}),2E3)):p()});b=mxUtils.bind(this,function(p){var u=document.createElement("tr"),F=document.createElement("td");F.setAttribute("valig","middle");F.style.height="59px";F.style.width="66px";var H=document.createElement("img");H.setAttribute("width","50");H.setAttribute("height","50");H.setAttribute("border","0");H.setAttribute("src",null!=p.pictureUrl?p.pictureUrl:this.defaultUserPicture);H.style.borderRadius=-"50%";H.style.margin="4px 8px 0 8px";F.appendChild(H);u.appendChild(F);F=document.createElement("td");F.setAttribute("valign","middle");F.style.whiteSpace="nowrap";F.style.paddingTop="4px";F.style.maxWidth="0";F.style.overflow="hidden";F.style.textOverflow="ellipsis";mxUtils.write(F,p.displayName+(p.isCurrent&&1<f.length?" ("+mxResources.get("default")+")":""));null!=p.email&&(mxUtils.br(F),H=document.createElement("small"),H.style.color="gray",mxUtils.write(H,p.email),F.appendChild(H));H=document.createElement("div");-H.style.marginTop="4px";var E=document.createElement("i");mxUtils.write(E,mxResources.get("googleDrive"));H.appendChild(E);F.appendChild(H);u.appendChild(F);p.isCurrent?u.setAttribute("title","User ID: "+p.id):(u.setAttribute("title",mxResources.get("login")+" (User ID: "+p.id+")"),u.style.cursor="pointer",u.style.opacity="0.3",mxEvent.addListener(u,"mouseenter",mxUtils.bind(this,function(){u.style.opacity="1"})),mxEvent.addListener(u,"mouseleave",mxUtils.bind(this,function(){u.style.opacity="0.3"})),-mxEvent.addListener(u,"click",mxUtils.bind(this,function(K){this.hideUserPanel();c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(p);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(d){this.handleError(d)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(K)})));return u});e=!0;var l=document.createElement("table");l.style.borderSpacing="0";l.style.fontSize="10pt";l.style.width=+"";b=document.createElement("img");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("close"));b.className="geDialogClose";b.style.top="8px";b.style.right="8px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideUserPanel()}));this.userPanel.appendChild(b);if(null!=this.drive){var f=this.drive.getUsersList();if(0<f.length){var c=mxUtils.bind(this,function(p,v){var F=this.getCurrentFile();null!=F&&F.constructor==DriveFile?(this.spinner.spin(document.body,+v),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();p()}),2E3)):p()});b=mxUtils.bind(this,function(p){var v=document.createElement("tr"),F=document.createElement("td");F.setAttribute("valig","middle");F.style.height="59px";F.style.width="66px";var H=document.createElement("img");H.setAttribute("width","50");H.setAttribute("height","50");H.setAttribute("border","0");H.setAttribute("src",null!=p.pictureUrl?p.pictureUrl:this.defaultUserPicture);H.style.borderRadius=+"50%";H.style.margin="4px 8px 0 8px";F.appendChild(H);v.appendChild(F);F=document.createElement("td");F.setAttribute("valign","middle");F.style.whiteSpace="nowrap";F.style.paddingTop="4px";F.style.maxWidth="0";F.style.overflow="hidden";F.style.textOverflow="ellipsis";mxUtils.write(F,p.displayName+(p.isCurrent&&1<f.length?" ("+mxResources.get("default")+")":""));null!=p.email&&(mxUtils.br(F),H=document.createElement("small"),H.style.color="gray",mxUtils.write(H,p.email),F.appendChild(H));H=document.createElement("div");+H.style.marginTop="4px";var E=document.createElement("i");mxUtils.write(E,mxResources.get("googleDrive"));H.appendChild(E);F.appendChild(H);v.appendChild(F);p.isCurrent?v.setAttribute("title","User ID: "+p.id):(v.setAttribute("title",mxResources.get("login")+" (User ID: "+p.id+")"),v.style.cursor="pointer",v.style.opacity="0.3",mxEvent.addListener(v,"mouseenter",mxUtils.bind(this,function(){v.style.opacity="1"})),mxEvent.addListener(v,"mouseleave",mxUtils.bind(this,function(){v.style.opacity="0.3"})),+mxEvent.addListener(v,"click",mxUtils.bind(this,function(K){this.hideUserPanel();c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(p);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(d){this.handleError(d)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(K)})));return v});e=!0;var l=document.createElement("table");l.style.borderSpacing="0";l.style.fontSize="10pt";l.style.width="100%";l.style.padding="10px";for(var n=0;n<f.length;n++)l.appendChild(b(f[n]));this.userPanel.appendChild(l);b=document.createElement("div");b.style.textAlign="left";b.style.padding="10px";b.style.whiteSpace="nowrap";b.style.borderTopStyle="solid";b.style.borderTopWidth="1px";l=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);-this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));l.className="geBtn";l.style.float="right";b.appendChild(l);l=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var p=this.drive.createAuthWin();p.blur();window.focus();c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(u){this.handleError(u)}),!0,p)}),mxResources.get("closingFile")+-"...")}));l.className="geBtn";l.style.margin="0px";b.appendChild(l);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(p,u,F,H){if(null!=p){e&&this.userPanel.appendChild(document.createElement("hr"));e=!0;var E=document.createElement("table");E.style.borderSpacing="0";E.style.fontSize="10pt";E.style.width="100%";E.style.padding="10px";var K=document.createElement("tbody"),d=document.createElement("tr"),g=document.createElement("td");g.setAttribute("valig","top");g.style.width="40px";if(null!=-u){var k=document.createElement("img");k.setAttribute("width","40");k.setAttribute("height","40");k.setAttribute("border","0");k.setAttribute("src",u);k.style.marginRight="6px";g.appendChild(k)}d.appendChild(g);g=document.createElement("td");g.setAttribute("valign","middle");g.style.whiteSpace="nowrap";g.style.maxWidth="0";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,p.displayName);null!=p.email&&(mxUtils.br(g),u=document.createElement("small"),u.style.color="gray",mxUtils.write(u,-p.email),g.appendChild(u));null!=H&&(p=document.createElement("div"),p.style.marginTop="4px",u=document.createElement("i"),mxUtils.write(u,H),p.appendChild(u),g.appendChild(p));d.appendChild(g);K.appendChild(d);E.appendChild(K);this.userPanel.appendChild(E);p=document.createElement("div");p.style.textAlign="center";p.style.padding="10px";p.style.whiteSpace="nowrap";null!=F&&(F=mxUtils.button(mxResources.get("signOut"),F),F.className="geBtn",p.appendChild(F));this.userPanel.appendChild(p)}});null!=-this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var p=this.getCurrentFile();if(null!=p&&p.constructor==DropboxFile){var u=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",-this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var p=this.getCurrentFile();if(null!=p&&p.constructor==OneDriveFile){var u=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var p=-this.getCurrentFile();if(null!=p&&p.constructor==GitHubFile){var u=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&b(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var p=this.getCurrentFile();if(null!=p&&p.constructor==GitLabFile){var u=-mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&b(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var p=this.getCurrentFile();if(null!=p&&p.constructor==TrelloFile){var u=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=-""});p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}else this.trello.logout()}),mxResources.get("trello"));"min"==uiTheme&&(l=this.getCurrentFile(),null!=l&&l.isRealtimeEnabled()&&l.isRealtimeSupported()&&(b=document.createElement("div"),b.style.padding="10px",b.style.whiteSpace="nowrap",b.style.borderTop="1px solid rgb(224, 224, 224)",b.style.marginTop="4px",b.style.textAlign="center",b.style.padding="10px",b.style.fontSize=+this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));l.className="geBtn";l.style.float="right";b.appendChild(l);l=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var p=this.drive.createAuthWin();p.blur();window.focus();c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(v){this.handleError(v)}),!0,p)}),mxResources.get("closingFile")++"...")}));l.className="geBtn";l.style.margin="0px";b.appendChild(l);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(p,v,F,H){if(null!=p){e&&this.userPanel.appendChild(document.createElement("hr"));e=!0;var E=document.createElement("table");E.style.borderSpacing="0";E.style.fontSize="10pt";E.style.width="100%";E.style.padding="10px";var K=document.createElement("tbody"),d=document.createElement("tr"),g=document.createElement("td");g.setAttribute("valig","top");g.style.width="40px";if(null!=+v){var k=document.createElement("img");k.setAttribute("width","40");k.setAttribute("height","40");k.setAttribute("border","0");k.setAttribute("src",v);k.style.marginRight="6px";g.appendChild(k)}d.appendChild(g);g=document.createElement("td");g.setAttribute("valign","middle");g.style.whiteSpace="nowrap";g.style.maxWidth="0";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,p.displayName);null!=p.email&&(mxUtils.br(g),v=document.createElement("small"),v.style.color="gray",mxUtils.write(v,+p.email),g.appendChild(v));null!=H&&(p=document.createElement("div"),p.style.marginTop="4px",v=document.createElement("i"),mxUtils.write(v,H),p.appendChild(v),g.appendChild(p));d.appendChild(g);K.appendChild(d);E.appendChild(K);this.userPanel.appendChild(E);p=document.createElement("div");p.style.textAlign="center";p.style.padding="10px";p.style.whiteSpace="nowrap";null!=F&&(F=mxUtils.button(mxResources.get("signOut"),F),F.className="geBtn",p.appendChild(F));this.userPanel.appendChild(p)}});null!=+this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var p=this.getCurrentFile();if(null!=p&&p.constructor==DropboxFile){var v=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",+this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var p=this.getCurrentFile();if(null!=p&&p.constructor==OneDriveFile){var v=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var p=+this.getCurrentFile();if(null!=p&&p.constructor==GitHubFile){var v=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&b(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var p=this.getCurrentFile();if(null!=p&&p.constructor==GitLabFile){var v=+mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&b(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var p=this.getCurrentFile();if(null!=p&&p.constructor==TrelloFile){var v=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=+""});p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()}else this.trello.logout()}),mxResources.get("trello"));"min"==uiTheme&&(l=this.getCurrentFile(),null!=l&&l.isRealtimeEnabled()&&l.isRealtimeSupported()&&(b=document.createElement("div"),b.style.padding="10px",b.style.whiteSpace="nowrap",b.style.borderTop="1px solid rgb(224, 224, 224)",b.style.marginTop="4px",b.style.textAlign="center",b.style.padding="10px",b.style.fontSize="9pt",n=l.getRealtimeError(),1!=l.getRealtimeState()&&(mxUtils.write(b,mxResources.get("realtimeCollaboration")+": "+(null!=n&&null!=n.message?n.message:mxResources.get("disconnected"))),this.userPanel.appendChild(b))));document.body.appendChild(this.userPanel)}};App.prototype.createUserElement=function(){var b=document.createElement("a");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(e){e.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(e){this.toggleUserPanel();this.userPanel.style.top=b.clientTop+b.clientHeight+6+"px";this.userPanel.style.right="36px";this.userPanel.style.left="";mxEvent.consume(e)}));return b};App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;@@ -14279,7 +14280,7 @@ Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);nuc.style.marginLeft="4px";c.style.cursor="help";c.style.color="blue";var l=document.createElement("img");l.setAttribute("src",Editor.helpImage);l.setAttribute("valign","bottom");l.setAttribute("border","0");l.className="geAdaptiveAsset";mxUtils.setOpacity(l,60);l.style.height="16px";l.style.width="16px";c.appendChild(l);mxEvent.addGestureListeners(c,mxUtils.bind(this,function(n){this.editorUi.hideCurrentMenu();this.editorUi.openLink(f);mxEvent.consume(n)}));return c};Menus.prototype.addLinkToItem=function(f,c){null!=f&&(c=this.createHelpLink(c),c.style.display="inline",c.style.marginLeft="8px",f.firstChild.nextSibling.appendChild(c))};Menus.prototype.removeCustomFont=function(f,c){for(var l=0;l<this.customFonts.length;l++)if(this.customFonts[l].name==f&&this.customFonts[l].url==c){this.customFonts.splice(l,1);this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));break}};Menus.prototype.containsFont=function(f,c){for(var l=0;l<this.customFonts.length;l++)if(this.customFonts[l].name==f&&this.customFonts[l].url==c)return!0;for(l=0;l<this.defaultFonts.length;l++){var n=this.defaultFonts[l];if("string"!==typeof n&&n.fontFamily==f&&n.fontUrl==c||"string"===typeof n&&n==f&&null==c)return!0}return!1};Menus.prototype.addCustomFont=function(f,c){null==f||this.containsFont(f,c)||(this.customFonts.push({name:f,url:c}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var e=Menus.prototype.init;Menus.prototype.init=function(){function f(q,-y,B){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(C,M,T,m,z,I,L,N,O,S,U,W,X){var Z=parseInt(C);!isNaN(Z)&&0<Z&&(c.exportImage(Z/100,M&&"png"==q,T,m,z&&"png"==q,L,!N,O,q,U,null,W,X),null!=B&&B(C,M,T,m,z,I,L,N,O,S,U,W,X))}),!0,y,q,!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(C,M,T,m,+y,B){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(C,M,T,m,z,I,L,N,Q,R,V,W,X){var Z=parseInt(C);!isNaN(Z)&&0<Z&&(c.exportImage(Z/100,M&&"png"==q,T,m,z&&"png"==q,L,!N,Q,q,V,null,W,X),null!=B&&B(C,M,T,m,z,I,L,N,Q,R,V,W,X))}),!0,y,q,!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(C,M,T,m,z){c.downloadFile(M&&"png"==q?"xmlpng":q,null,null,C,null,null,T,m,z)}),!1,!0)}e.apply(this,arguments);var c=this.editorUi,l=c.editor.graph,n=mxUtils.bind(l,l.isEnabled);mxClient.IS_SVG||c.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(q){return"file"!=q}));c.actions.addAction("new...",function(){var q=c.isOffline(),y=new NewDialog(c,q,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(y.container,q?350:620,q?70:460,!0,!0,function(B){c.sidebar.hideTooltip();B&&null==c.getCurrentFile()&&c.showSplash()});y.init()});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())){var q=new NewDialog(c,null,!1,function(y){c.hideDialog();if(null!=y){var B=c.editor.graph.getFreeInsertPoint();l.setSelectionCells(c.importXml(y,Math.max(B.x,20),Math.max(B.y,20),!0,null,null,!0));l.scrollCellToVisible(l.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(q.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});q.init()}})).isEnabled=n;var p=c.actions.addAction("shareCursor",function(){c.setShareCursorPosition(!c.isShareCursorPosition())});p.setToggleAction(!0);p.setSelectedCallback(function(){return c.isShareCursorPosition()});p=c.actions.addAction("showRemoteCursors",function(){c.setShowRemoteCursors(!c.isShowRemoteCursors())});p.setToggleAction(!0);@@ -14292,94 +14293,93 @@ p.setToggleAction(!0);p.setSelectedCallback(function(){return c.isAutoDarkMode(!p=c.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(q){c.setSketchMode(!Editor.sketchMode)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return Editor.sketchMode});c.actions.addAction("properties...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){q=new FilePropertiesDialog(c,q);c.showDialog(q.container,340,200,!0,!0);q.init()})}).isEnabled=n;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(l.isEnabled()){if(null==c.freehandWindow){var q=!mxClient.IS_IE&&!mxClient.IS_IE11;c.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,q?126:90,q)}l.freehand.isDrawing()?l.freehand.stopDrawing():l.freehand.startDrawing();c.freehandWindow.window.setVisible(l.freehand.isDrawing())}},null,null,"X")).isEnabled=function(){return n()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var q=document.createElement("div");q.style.whiteSpace="nowrap";var y=null==c.pages||1>=c.pages.length,B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatXml"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(B);var C=c.addCheckbox(q,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),M=c.addCheckbox(q,mxResources.get("compressed"),Editor.defaultCompressed),T=c.addCheckbox(q,mxResources.get("allPages"),!y,y);T.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?T.setAttribute("disabled",-"disabled"):T.removeAttribute("disabled")});q=new CustomDialog(c,q,mxUtils.bind(this,function(){c.downloadFile("xml",!M.checked,null,!C.checked,y||!T.checked)}),null,mxResources.get("export"));c.showDialog(q.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(q,y,B,C,M,T,m,z,I,L,N,O){m=[];C&&I&&m.push("tags=%7B%7D");q=new EmbedDialog(c,-c.createLink(q,y,!0,C,M,T,null,!0,m,null,B,null,O));c.showDialog(q.container,450,240,!0,!0);q.init()},null,!0)}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showHtmlDialog(mxResources.get("export"),null,q,function(y,B,C,M,T,m,z,I,L,N,O,S){c.createHtml(y,B,C,M,T,m,z,I,L,N,O,mxUtils.bind(this,function(U,W){var X=c.getBaseFilename(z);U='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+-mxUtils.htmlEntities(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+U+"\n"+W+"\n</body>\n</html>";c.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+".html","html",U,"text/html")}),S)})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport?c.showPrintDialog(mxResources.get("formatPdf"),mxUtils.bind(this,function(q,y){q=null!=c.pages?c.pages.length:1;var B=null==c.pages||1>=c.pages.length,-C=c.getPageIndex(c.currentPage);C=null!=C?C+1:1;c.downloadFile("pdf",null,null,!y.selection,B||!y.allPages&&y.pagesFrom==C&&y.pagesTo==C,!y.crop,y.transparent,y.scale,null,y.grid,y.includeCopy,y.allPages||y.pagesFrom==C&&y.pagesTo==C?null:{from:Math.max(0,Math.min(q-1,y.pagesFrom-1)),to:Math.max(0,Math.min(q-1,y.pagesTo-1))},y.border,y.fit,y.sheetsAcross,y.sheetsDown)})):c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,320,null!=c.pages&&1<c.pages.length&&(c.editor.editable||-"1"!=urlParams["hide-pages"])?350:280,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function q(){null!=y&&y.removeDraft();c.fileLoaded(null)}var y=c.getCurrentFile();null!=y&&y.isModified()?c.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){l.getSelectionCells();if(1==l.getSelectionCount()){var q=l.getSelectionCell(),-y=l.view.getState(q);null!=y&&null!=y.shape&&null!=y.shape.stencil&&(q=new EditShapeDialog(c,q,mxResources.get("editShape")+":",630,400),c.showDialog(q.container,640,480,!0,!1),q.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(q,y){c.spinner.stop();q=new RevisionDialog(c,q,y);c.showDialog(q.container,640,480,!0,!0);q.init()}),mxUtils.bind(this,function(q){c.handleError(null!=-q?q:mxResources.get("notAvailable"))})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");p=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(p.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var q=c.getCurrentFile();null!=-q&&(window.drawdata=c.getFileData(),q=null!=q.getTitle()?q.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(q),null,!0))});"undefined"!==typeof MathJax&&(p=c.actions.addAction("mathematicalTypesetting",function(){var q=new ChangePageSetup(c);q.ignoreColor=!0;q.ignoreImage=!0;q.mathEnabled=!c.isMathEnabled();l.model.execute(q)}),p.setToggleAction(!0),p.setSelectedCallback(function(){return c.isMathEnabled()}),-p.isEnabled=n);p=c.actions.put("defaultAdaptiveColors",new Action(mxResources.get("default")+" ("+mxResources.get(Graph.getDefaultAdaptiveColorsKey())+")",function(){var q=new ChangePageSetup(c);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="default";l.model.execute(q)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return null==l.adaptiveColors});p=c.actions.put("automaticAdaptiveColors",new Action(mxResources.get("automatic"),function(){var q=new ChangePageSetup(c);q.ignoreColor=-!0;q.ignoreImage=!0;q.adaptiveColors="auto";l.model.execute(q)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return"auto"==l.adaptiveColors});p=c.actions.put("simpleAdaptiveColors",new Action(mxResources.get("simple"),function(){var q=new ChangePageSetup(c);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="simple";l.model.execute(q)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return"simple"==l.adaptiveColors});p=c.actions.put("noAdaptiveColors",new Action(mxResources.get("none"),-function(){var q=new ChangePageSetup(c);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="none";l.model.execute(q)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return"none"==l.adaptiveColors});this.put("adaptiveColors",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors","noAdaptiveColors"],y)})));isLocalStorage&&(p=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());-mxSettings.save()}),p.setToggleAction(!0),p.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var u=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});u.setToggleAction(!0);u.setSelectedCallback(function(){return u.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var q=l.getSelectionCells(),y=[],B=0;B<q.length;B++)l.getModel().isVertex(q[B])&&y.push(q[B]);0<y.length&&(q=new EditGeometryDialog(c,y),c.showDialog(q.container,-200,270,!0,!0),q.init())},null,null,Editor.ctrlKey+"+Shift+M");c.actions.addAction("copyStyle",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var q=l.getSelectionCell(),y=l.getCellStyle(q,!1);c.copiedStyle={};var B=[],C=[],M;for(M in y)B.push(y[M]),C.push(M);l.copyCellStyles([q],C,B,c.copiedStyle,c.copiedStyle,null,null,null,!0)}},null,null,"Alt+C");c.actions.addAction("pasteStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&null!=c.copiedStyle&&l.pasteCellStyles(l.includeDescendants(l.getSelectionCells()),-c.copiedStyle,c.copiedStyle,!0)},null,null,"Alt+V");c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(q,y,B,C,M,T,m,z,I,L,N,O,S,U){q=parseInt(q);c.lastExportSvgEditable=M;!isNaN(q)&&0<q&&c.exportSvg(q/100,y,B,C,M,T,m,!z,I,L,O,S,U)}),!0,c.lastExportSvgEditable,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+-"...",function(){f("png",c.lastExportPngEditable,function(q,y,B,C,M){c.lastExportPngEditable=M})}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){f("jpeg")}));c.actions.put("exportWebp",new Action(mxResources.get("formatWebp")+"...",function(){f("webp")}));p=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var q=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),y=mxUtils.getXml(0==q.length?c.editor.getGraphXml():l.encodeCells(q));-c.copyImage(q,y)}),null,null,"Ctrl+Alt+X");p.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;p=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){l.setShadowVisible(!l.shadowVisible)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return l.shadowVisible});c.actions.put("about",new Action("v"+EditorUi.VERSION,function(q,y){}));c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):-c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",-function(){var q=new FeedbackDialog(c);c.showDialog(q.container,610,360,!0,!1);q.init()});c.actions.addAction("quickStart...",function(){"ac.draw.io"===window.location.hostname?c.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});p=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,-function(){c.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));null==Editor.gptApiKey||null==Editor.gptModel||-null==Editor.gptUrl||c.isOffline()||EditorUi.isElectronApp||(p=c.actions.addAction("chatWindowTitle",mxUtils.bind(this,function(){null==this.chatWindow?(this.chatWindow=new ChatWindow(c,220,document.body.offsetHeight-380,250,320),this.chatWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("chat"))})),this.chatWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("chat"))}),this.chatWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("chat"))):-this.chatWindow.window.setVisible(!this.chatWindow.window.isVisible())})),p.setToggleAction(!0),p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.chatWindow&&this.chatWindow.window.isVisible()})));p=c.actions.addAction("findReplace",mxUtils.bind(this,function(q,y){var B=(q=l.isEnabled()&&(null==y||!mxEvent.isShiftDown(y)))?"findReplace":"find";y=B+"Window";if(null==this[y]){var C="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,M=q?C?330:-300:240;this[y]=new FindWindow(c,document.body.offsetWidth-(M+20),100,M,q?C?304:288:170,q);this[y].window.addListener("show",function(){c.fireEvent(new mxEventObject(B))});this[y].window.addListener("hide",function(){c.fireEvent(new mxEventObject(B))});this[y].window.setVisible(!0)}else this[y].window.setVisible(!this[y].window.isVisible())}),null,null,Editor.ctrlKey+"+F");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){var q=l.isEnabled()?"findReplaceWindow":"findWindow";-return null!=this[q]&&this[q].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var q=null==c.pages||1>=c.pages.length;if(q)c.exportVisio();else{var y=document.createElement("div");y.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatVsdx"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(B);var C=c.addCheckbox(y,mxResources.get("allPages"),-!q,q);C.style.marginBottom="16px";q=new CustomDialog(c,y,mxUtils.bind(this,function(){c.exportVisio(!C.checked)}),null,mxResources.get("export"));c.showDialog(q.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginRight="8px";q.checked=mxSettings.getShowStartScreen();q.defaultChecked=q.checked;if(Editor.isSettingsEnabled()&&("sketch"==-Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var y=document.createElement("span");y.style.display="flex";y.style.alignItems="center";y.style["float"]="right";y.style.cursor="pointer";y.style.userSelect="none";y.style.marginTop="-3px";y.appendChild(q);mxUtils.write(y,mxResources.get("showStartScreen"));mxEvent.addListener(y,"click",function(C){mxEvent.getSource(C)!=q&&(q.checked=!q.checked)});header=y}y=[[mxResources.get("reset"),function(){c.confirm(mxResources.get("areYouSure"),-function(){try{localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(C){c.handleError(C)}})}]];if(!c.isOfflineApp()&&isLocalStorage&&c.mode!=App.MODE_ATLAS){var B=c.actions.get("plugins");null==B||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||y.push([mxResources.get("plugins"),B.funct])}EditorUi.isElectronApp||y.push([mxResources.get("link"),function(C,M){if(0<M.value.length)try{var T=-JSON.parse(M.value),m=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(T)),z=new EmbedDialog(c,m);c.showDialog(z.container,450,240,!0);z.init()}catch(I){c.handleError(I)}else c.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=c.getServiceName()&&"1"!=urlParams.embed&&y.push([mxResources.get("preferences"),function(){c.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),-function(){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(C){c.handleError(C)}})}]])}]);c.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,y,q.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=q.parentNode&&(mxSettings.setShowStartScreen(q.checked),mxSettings.save())})});-if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(q,y){var B=mxLanguage;null==urlParams.lang&&isLocalStorage&&(B=mxSettings.settings.language);var C=mxUtils.bind(this,function(T){var m=""==T?mxResources.get("automatic"):mxLanguageMap[T],z=null;""!=m&&(z=q.addItem(m,null,mxUtils.bind(this,function(){c.setAndPersistLanguage(T);c.alert(mxResources.get("restartForChangeRequired"))}),y),(T==B||""==T&&null==B)&&q.addCheckmark(z,Editor.checkmarkImage));return z});-C("");q.addSeparator(y);for(var M in mxLanguageMap)C(M)})));var F=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(q){var y=F.apply(this,arguments);if(("1"!=urlParams.embed||"1"==urlParams.atlas)&&null!=y&&Editor.enableSimpleTheme&&"atlassian"!=c.getServiceName()){var B=this.get("dynamicAppearance");if(null!=B){var C=y.addMenu("",B.funct);C.setAttribute("title",mxResources.get("appearance"));C.className="geToolbarButton geAdaptiveAsset";C.style.backgroundPosition="center center";-C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="100% 100%";C.style.display="inline-block";C.style.cursor="pointer";C.style.zIndex="1";C.style.position="absolute";C.style.height="18px";C.style.width="18px";"atlas"==Editor.currentTheme?(C.style.filter="invert(100%)",C.style.right="11px",C.style.top="10px"):(C.style.right="10px",C.style.top="5px");document.body.appendChild(C);y.langIcon=C;B=mxUtils.bind(this,function(){var M=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;-C.style.display="atlas"==Editor.currentTheme||"min"==Editor.currentTheme||"sketch"==Editor.currentTheme?"none":"";C.style.backgroundImage="simple"==Editor.currentTheme?750>M?"url("+Editor.thinDoubleArrowRightImage+")":"url("+(Editor.isDarkMode()?Editor.thinDarkImage:Editor.thinLightImage)+")":"url("+(Editor.isDarkMode()?Editor.darkModeImage:Editor.lightModeImage)+")"});this.editorUi.addListener("currentThemeChanged",B);this.editorUi.addListener("darkModeChanged",B);mxEvent.addListener(window,"resize",-B);B()}}return y}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){c.showCustomLayoutDialog(JSON.stringify(c.customLayoutConfig,null,2))});c.actions.put("adaptiveColors",new Action("adaptiveColors",function(q){null==c.adaptiveColorsWindow&&(c.adaptiveColorsWindow=new AdaptiveColorsWindow(c,document.body.offsetWidth-520,80,200,160));-c.adaptiveColorsWindow.window.setVisible(!0)}));p=this.get("viewZoom");var H=p.funct;p.funct=mxUtils.bind(this,function(q,y){H.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(q,["-","outline","fullscreen"],y)});p=this.get("layout");var E=p.funct;p.funct=function(q,y){E.apply(this,arguments);q.addItem(mxResources.get("orgChart"),null,function(){var B=null,C=20,M=20,T=function(){"undefined"!==typeof mxOrgChartLayout&&null!=B&&c.tryAndHandle(mxUtils.bind(this,-function(){var U=c.editor.graph,W=new mxOrgChartLayout(U,B,C,M),X=U.getDefaultParent();1<U.model.getChildCount(U.getSelectionCell())&&(X=U.getSelectionCell());W.execute(X)}))},m=document.createElement("div"),z=document.createElement("div");z.style.marginTop="6px";z.style.display="inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("orgChartType")+": ");m.appendChild(z);var I=document.createElement("select");I.style.width="160px";I.style.boxSizing="border-box";z=[mxResources.get("linear"),-mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var L=0;L<z.length;L++){var N=document.createElement("option");mxUtils.write(N,z[L]);N.value=L;2==L&&N.setAttribute("selected","selected");I.appendChild(N)}mxEvent.addListener(I,"change",function(){B=I.value});m.appendChild(I);z=document.createElement("div");z.style.marginTop="6px";z.style.display=-"inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("parentChildSpacing")+": ");m.appendChild(z);var O=document.createElement("input");O.type="number";O.value=C;O.style.width="160px";O.style.boxSizing="border-box";m.appendChild(O);mxEvent.addListener(O,"change",function(){C=O.value});z=document.createElement("div");z.style.marginTop="6px";z.style.display="inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("siblingSpacing")+": ");m.appendChild(z);var S=document.createElement("input");-S.type="number";S.value=M;S.style.width="160px";S.style.boxSizing="border-box";m.appendChild(S);mxEvent.addListener(S,"change",function(){M=S.value});z=mxUtils.button(mxResources.get("custom")+"...",function(){var U=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(I.value),parentChildSpacing:parseInt(O.value),siblingSpacing:parseInt(S.value)}}];c.hideDialog();c.showCustomLayoutDialog(JSON.stringify(U,null,2))});z.className="geBtn";m=new CustomDialog(c,m,function(){null==B&&(B=2);c.loadOrgChartLayouts(T)},-null,null,null,z);c.showDialog(m.container,355,140,!0,!0)},y,null,n());q.addSeparator(y);q.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){c.tryAndHandle(mxUtils.bind(this,function(){var B=new mxParallelEdgeLayout(l);B.checkOverlap=!0;c.prompt(mxResources.get("spacing"),B.spacing,mxUtils.bind(this,function(C){c.tryAndHandle(mxUtils.bind(this,function(){B.spacing=C;c.executeLayout(function(){B.execute(l.getDefaultParent(),l.isSelectionEmpty()?null:l.getSelectionCells())},!1)}))}))}))}),-y);q.addSeparator(y);c.menus.addMenuItem(q,"runLayout",y,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(q,y){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(q,["keyboardShortcuts","-","about"],y);else{var B=q.addItem("Search:",null,null,y,null,null,!1);B.style.cursor="default";var C=document.createElement("input");C.setAttribute("type","text");C.setAttribute("size","25");C.style.borderWidth="1px";C.style.marginLeft="8px";mxEvent.addListener(C,-"keydown",mxUtils.bind(this,function(M){var T=mxUtils.trim(C.value);13==M.keyCode&&0<T.length?(this.editorUi.openLink("https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(T)),C.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:T}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==M.keyCode&&(C.value="")}));B.firstChild.nextSibling.appendChild(C);mxEvent.addGestureListeners(C,-function(M){document.activeElement!=C&&C.focus();mxEvent.consume(M)},function(M){mxEvent.consume(M)},function(M){mxEvent.consume(M)});window.setTimeout(function(){C.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.drawio.com")}),c.actions.addAction("check4Updates",function(){c.checkForUpdates()}),c.actions.put("desktopZoomIn",new Action(mxResources.get("zoomIn"),function(){c.desktopZoomIn()})),c.actions.put("desktopZoomOut",new Action(mxResources.get("zoomOut"),-function(){c.desktopZoomOut()})),c.actions.put("desktopResetZoom",new Action(mxResources.get("actualSize"),function(){c.desktopResetZoom()})),this.addMenuItems(q,"- keyboardShortcuts quickStart website support -".split(" "),y),"1"!=urlParams.disableUpdate&&this.addMenuItems(q,["check4Updates","-"],y),this.addMenuItems(q,"desktopResetZoom desktopZoomIn desktopZoomOut - openDevTools - about".split(" "),y)):this.addMenuItems(q,"- keyboardShortcuts quickStart support - about".split(" "),y)}"1"==urlParams.test&&-(q.addSeparator(y),this.addSubmenu("testDevelop",q,y))})));c.actions.addAction("languageCode...",function(){var q=new FilenameDialog(c,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(y){null!=y&&(Graph.diagramLanguage=0<y.length?y:null,Graph.translateDiagram=!0,l.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");c.showDialog(q.container,340,80,!0,!0);q.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,function(q,-y){this.addMenuItems(q,["languageCode","-"],y);y=q.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;l.refresh()},y);Graph.translateDiagram||q.addCheckmark(y,Editor.checkmarkImage)})));if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testChecksum=Checksum");-mxResources.parse("testCheckPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");mxResources.parse("testPerformance=Performance");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!l.isSelectionEmpty()){var q=l.cloneCells(l.getSelectionCells()),y=l.getBoundingBoxFromGeometry(q,-!0);q=l.moveCells(q,-y.x,-y.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+y.width+", "+y.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(l.encodeCells(q)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function q(m){return null==m||null==m.boundingBox||!isNaN(m.boundingBox.x)&&!isNaN(m.boundingBox.y)&&!isNaN(m.boundingBox.width)&&!isNaN(m.boundingBox.height)}var y=l.getGraphBounds(),B=l.view.translate,C=l.view.scale;l.insertVertex(l.getDefaultParent(),-null,"",y.x/C-B.x,y.y/C-B.y,y.width/C,y.height/C,"fillColor=none;strokeColor=red;");var M=0,T=0;l.view.states.visit(function(m,z){m=!0;q(z.shape)||(console.log("invalid shape",z.cell.id,z.shape),m=!1);q(z.text)||(console.log("invalid text",z.cell.id,z.text),m=!1);m||M++;T++});console.log("states checked",T,"invalid",M)}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var q=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";q=new TextareaDialog(c,-"Paste Data:",q,function(y){if(0<y.length)try{var B=function(z){function I(ba){if(null==Y[ba]){if(Y[ba]=!0,null!=O[ba]){for(;0<O[ba].length;){var ea=O[ba].pop();I(ea)}delete O[ba]}}else mxLog.debug(L+": Visited: "+ba)}var L=z.parentNode.id,N=z.childNodes;z={};for(var O={},S=null,U={},W=0;W<N.length;W++){var X=N[W];if(null!=X.id&&0<X.id.length)if(null==z[X.id]){z[X.id]=X.id;var Z=X.getAttribute("parent");null==Z?null!=S?mxLog.debug(L+": Multiple roots: "+X.id):S=X.id:(null==O[Z]&&(O[Z]=[]),O[Z].push(X.id))}else U[X.id]=-X.id}N=Object.keys(U);0<N.length?(N=L+": "+N.length+" Duplicates: "+N.join(", "),mxLog.debug(N+" (see console)")):mxLog.debug(L+": Checked");var Y={};null==S?mxLog.debug(L+": No root"):(I(S),Object.keys(Y).length!=Object.keys(z).length&&(mxLog.debug(L+": Invalid tree: (see console)"),console.log(L+": Invalid tree",O)))};"<"!=y.charAt(0)&&(y=Graph.decompress(y),mxLog.debug("See console for uncompressed XML"),console.log("xml",y));var C=mxUtils.parseXml(y),M=c.getPagesForNode(C.documentElement,"mxGraphModel");-if(null!=M&&0<M.length)try{var T=c.getHashValueForPages(M);mxLog.debug("Checksum: ",T)}catch(z){mxLog.debug("Error: ",z.message)}else mxLog.debug("No pages found for checksum");var m=C.getElementsByTagName("root");for(y=0;y<m.length;y++)B(m[y]);mxLog.show()}catch(z){c.handleError(z),null!=window.console&&console.error(z)}});c.showDialog(q.container,620,460,!0,!0);q.init()}));var K=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var q=new TextareaDialog(c,"Diff/Sync:",-"",function(y){var B=c.getCurrentFile();if(0<y.length&&null!=B)try{var C=JSON.parse(y);B.patch([C],null,!0,!0);c.hideDialog()}catch(M){c.handleError(M)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(y,B){K=c.getPagesForXml(c.getFileData(!0));q.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(K)}],["Diff",function(y,B){try{q.textarea.value=JSON.stringify(c.diffPages(K,c.pages),null,2)}catch(C){c.handleError(C)}}]]);null==K?-(K=c.getPagesForXml(c.getFileData(!0)),q.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(K)):q.textarea.value=JSON.stringify(c.diffPages(K,c.pages),null,2);c.showDialog(q.container,620,460,!0,!0);q.init()}else c.alert("No pages")}));c.actions.addAction("testChecksum",mxUtils.bind(this,function(){var q=c.getCurrentFile();null!=c.pages&&null!=q?c.spinner.spin(document.body,mxResources.get("loading"))&&q.getLatestVersion(function(y){c.spinner.stop();-var B=c.getHashValueForPages(c.pages),C=q.getCurrentRevisionId(),M=c.getHashValueForPages(y.getShadowPages()),T=y.getDescriptorChecksum(y.getDescriptor()),m=y.getCurrentRevisionId();console.log("Local File",[q],"modified",q.isModified(),"checksum",B);console.log("Remote File",[y],"rev",m==C,"desc",T==M,"checksum",M);c.alert("Checksums "+(M==B?"match":"no not match"))},function(y){console.log("Error getLatestVersion",y);c.handleError(y)}):console.log("Checksum: no file or pages")}));c.actions.addAction("testCheckPages",-mxUtils.bind(this,function(){var q=c.getCurrentFile();console.log("editorUi",c,"file",q);if(null!=q&&q.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(q.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(q.theirPages));console.log("diff ownPages/theirPages",c.diffPages(q.ownPages,q.theirPages));var y=q.getShadowPages();null!=y&&(console.log("Checksum shadowPages",c.getHashValueForPages(y)),console.log("diff shadowPages/ownPages",c.diffPages(y,q.ownPages)),console.log("diff ownPages/shadowPages",-c.diffPages(q.ownPages,y)),console.log("diff theirPages/shadowPages",c.diffPages(q.theirPages,y)));null!=q.sync&&null!=q.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(q.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(q.ownPages,q.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(q.theirPages,q.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(q.sync.snapshot,c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",-c.diffPages(q.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(q.theirPages,c.pages)))}null!=q&&console.log("Shadow pages",[c.getXmlForPages(q.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",c.getHashValueForPages(c.pages))}));c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",c);var q=c.getCurrentFile();null!=q&&q.isRealtime()&&null!=q.shadowPages&&(console.log("patching actualPages to shadowPages",q.patch([c.diffPages(q.shadowPages,-c.pages)])),q.ownPages=c.clonePages(c.pages),q.theirPages=c.clonePages(c.pages),q.shadowPages=c.clonePages(c.pages),null!=q.sync&&(q.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testOptimize",mxUtils.bind(this,function(){l.model.beginUpdate();try{var q=l.model.cells,y=0,B=[],C=[],M;for(M in q){var T=q[M],m=l.getCurrentCellStyle(T)[mxConstants.STYLE_IMAGE];null!=m&&"data:"==m.substring(0,5)&&(null==B[m]&&(B[m]=(B[m]||0)+1,y++),C.push(T))}l.setCellStyles(mxConstants.STYLE_IMAGE,null,-C);console.log("Removed",y,"image(s) from",C.length,"cell(s): ",[C,B])}finally{l.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,l.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var q=new mxImageExport,y=l.getGraphBounds(),B=l.view.scale,C=mxUtils.createXmlDocument(),M=C.createElement("output");C.appendChild(M);C=new mxXmlCanvas2D(M);C.translate(Math.floor((1-y.x)/B),Math.floor((1-y.y)/B));C.scale(1/B);var T=-0,m=C.save;C.save=function(){T++;m.apply(this,arguments)};var z=C.restore;C.restore=function(){T--;z.apply(this,arguments)};var I=q.drawShape;q.drawShape=function(L){mxLog.debug("entering shape",L,T);I.apply(this,arguments);mxLog.debug("leaving shape",L,T)};q.drawState(l.getView().getState(l.model.root),C);mxLog.show();mxLog.debug(mxUtils.getXml(M));mxLog.debug("stateCounter",T)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=-mxPopupMenu.prototype.zIndex-2});var d=null,g=null,k=null,v=null,t=null,x=null,A=null,J=null;c.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=d?(l.view.revalidate=d,d=null):(d=l.view.revalidate,l.view.revalidate=function(){var q=Date.now(),y=d.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=g?(c.selectPage=g,g=null):(g=c.selectPage,c.selectPage=function(){var q=Date.now(),y=g.apply(this,-arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=k?(c.diffPages=k,k=null):(k=c.diffPages,c.diffPages=function(){var q=Date.now(),y=k.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=v?(c.patchPages=v,v=null):(v=c.patchPages,c.patchPages=function(){var q=Date.now(),y=v.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",-[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=t?(c.clonePages=t,t=null):(t=c.clonePages,c.clonePages=function(){var q=Date.now(),y=t.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=A?(c.getHashValueForPages=A,A=null):(A=c.getHashValueForPages,c.getHashValueForPages=function(){var q=Date.now(),y=A.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],-"time",Date.now()-q+" ms","args",arguments);return y});null!=J?(c.resolveCrossReferences=J,J=null):(J=c.resolveCrossReferences,c.resolveCrossReferences=function(){var q=Date.now(),y=J.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=x?(c.getFileData=x,x=null):(x=c.getFileData,c.getFileData=function(){var q=Date.now(),y=x.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",-[this],"time",Date.now()-q+" ms","args",arguments);return y});EditorUi.debug("[Performance]",null!=d?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),y);var B=q.addItem(mxResources.get("testPerformance"),null,function(){c.actions.get("testPerformance").funct()},y);null!=d&&q.addCheckmark(B,-Editor.checkmarkImage);this.addMenuItems(q,["-","testShowConsole"],y)})))}c.actions.put("shapes",new Action(mxResources.get("moreShapes")+"...",function(q){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)}));c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(q){l.isEnabled()&&-(q=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),q.vertex=!0,q=new EditShapeDialog(c,q,mxResources.get("editShape")+":",630,400),c.showDialog(q.container,640,480,!0,!1),q.init())})).isEnabled=n;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",q,function(y,B,C,M,T,m,z,I,L,N,O,S){c.createHtml(y,B,C,M,T,m,z,I,-L,N,O,mxUtils.bind(this,function(U,W){var X=new EmbedDialog(c,"\x3c!-- "+c.editor.appName+" diagram --\x3e\n"+U+"\n"+W+"\n",null,null,function(){var Z=window.open(),Y=Z.document;if(null!=Y){"CSS1Compat"===document.compatMode&&Y.writeln("<!DOCTYPE html>");Y.writeln("<html>");Y.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Y.writeln("<body>");Y.writeln(U);var ba=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;ba&&Y.writeln(W);-Y.writeln("</body>");Y.writeln("</html>");Y.close();if(!ba){var ea=Z.document.createElement("div");ea.marginLeft="26px";ea.marginTop="26px";mxUtils.write(ea,mxResources.get("updatingDocument"));ba=Z.document.createElement("img");ba.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");ba.style.marginLeft="6px";ea.appendChild(ba);Z.document.body.insertBefore(ea,Z.document.body.firstChild);window.setTimeout(function(){var ca=document.createElement("script");-ca.type="text/javascript";ca.src=/<script.*?src="(.*?)"/.exec(W)[1];Y.body.appendChild(ca);ea.parentNode.removeChild(ea)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(X.container,450,240,!0,!0);X.init()}),S)})})}));c.actions.put("liveImage",new Action("Live image...",function(){var q=c.getCurrentFile();null!=q&&c.getPublicUrl(q,function(y){null!=y?(y=new EmbedDialog(c,'<img src="'+(q.constructor!=DriveFile?y:"https://drive.google.com/uc?id="+q.getId())+-'"/>'),c.showDialog(y.container,450,240,!0,!0),y.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(q,y,B,C,M,T){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(q,y,B,C,M,T,function(m){c.spinner.stop();m=new EmbedDialog(c,m);c.showDialog(m.container,450,240,!0,!0);m.init()},function(m){c.spinner.stop();c.handleError(m)})},mxResources.get("image"),-mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(q,y,B,C,M,T){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(q,y,B,C,M,T,function(m){c.spinner.stop();m=new EmbedDialog(c,m);c.showDialog(m.container,450,240,!0,!0);m.init()},function(m){c.spinner.stop();c.handleError(m)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")}));-c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){var y=l.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,y.height/l.view.scale))+2,null,null,null,q,c.getCurrentFile(),function(B,C,M,T,m,z,I,L,N,O,S,U){var W=[];N&&W.push("tags=%7B%7D");B=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+I+";height:"+L+';" src="'+c.createLink(B,C,!0,T,m,z,"public"==O?q:null,null,W,-null,M,S,U)+'"'+(S?' allowtransparency="true"':"")+"></iframe>");c.showDialog(B.container,450,240,!0,!0);B.init()},!0,!0)})}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.textAlign="center";q.style.width="100%";q.style.left="0px";var y=document.createElement("a");y.setAttribute("href","javascript:void(0);");y.setAttribute("target","_blank");y.style.cursor="pointer";mxUtils.write(y,-mxResources.get("getNotionChromeExtension"));q.appendChild(y);mxUtils.setPrefixedStyle(y.style,"transition","all 1s ease");mxUtils.setOpacity(y,0);window.setTimeout(function(){mxUtils.setOpacity(y,100)},300);mxEvent.addListener(y,"click",function(B){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(B)});c.getPublicUrl(c.getCurrentFile(),function(B){c.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",-q,B,c.getCurrentFile(),function(C,M,T,m,z,I,L,N,O,S,U,W){L=["border=0"];O&&L.push("tags=%7B%7D");C=new EmbedDialog(c,c.createLink(C,M,!0,m,z,I,"public"==S?B:null,null,L,null,T,null,W));c.showDialog(C.container,450,240,!0,!0);C.init()},null,!0)})}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showPublishLinkDialog(null,null,null,null,null,null,q,c.getCurrentFile(),function(y,B,C,M,T,m,z,I,L,N,O,S){z=[];M&&L&&z.push("tags=%7B%7D");-y=new EmbedDialog(c,c.createLink(y,B,!0,M,T,m,"public"==N?q:null,null,z,null,C,null,S));c.showDialog(y.container,450,240,!0,!0);y.init()},null,!0)})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});-c.actions.addAction("googleSites...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){q=new GoogleSitesDialog(c,q);c.showDialog(q.container,420,256,!0,!0);q.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)p=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),p.setToggleAction(!0),p.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});window.matchMedia&&-null!=document.getElementById("high-contrast-stylesheet")&&(p=c.actions.addAction("highContrast",function(){c.setAndPersistHighContrast(!c.isHighContrast())}),p.setToggleAction(!0),p.setSelectedCallback(function(){return c.isHighContrast()}));p=c.actions.addAction("search",function(){if(null!=c.sidebar){var q=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!q);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!q,mxSettings.save())}});p.label=mxResources.get("searchShapes");-p.setToggleAction(!0);p.setSelectedCallback(function(){return null!=c.sidebar&&c.sidebar.isEntryVisible("search")});c.actions.get("clearDefaultStyle").funct=function(q){l.isEnabled()&&(c.clearDefaultStyle(),Editor.sketchMode&&c.setSketchMode(!1))};"1"==urlParams.embed&&(c.actions.get("saveAs").setEnabled(!1),c.actions.get("save").funct=function(q){l.isEditing()&&l.stopEditing();var y="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==-urlParams.proto){var B=c.createLoadMessage("save");B.xml=y;!0!==q||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(B.exit=!0);y=JSON.stringify(B)}(window.opener||window.parent).postMessage(y,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));q=c.getCurrentFile();null==q||q.constructor==EmbedFile||q.constructor==LocalFile&&null==q.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?c.sendEmbeddedSvgExport():+"disabled"):T.removeAttribute("disabled")});q=new CustomDialog(c,q,mxUtils.bind(this,function(){c.downloadFile("xml",!M.checked,null,!C.checked,y||!T.checked)}),null,mxResources.get("export"));c.showDialog(q.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(q,y,B,C,M,T,m,z,I,L,N,Q){m=[];C&&I&&m.push("tags=%7B%7D");q=new EmbedDialog(c,+c.createLink(q,y,!0,C,M,T,null,!0,m,null,B,null,Q));c.showDialog(q.container,450,240,!0,!0);q.init()},null,!0)}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showHtmlDialog(mxResources.get("export"),null,q,function(y,B,C,M,T,m,z,I,L,N,Q,R){c.createHtml(y,B,C,M,T,m,z,I,L,N,Q,mxUtils.bind(this,function(V,W){var X=c.getBaseFilename(z);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'++mxUtils.htmlEntities(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+W+"\n</body>\n</html>";c.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+".html","html",V,"text/html")}),R)})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){c.showPrintDialog(mxResources.get("formatPdf"),EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport?mxUtils.bind(this,function(q,y){q=null!=c.pages?c.pages.length:1;var B=null==c.pages||1>=c.pages.length,+C=c.getPageIndex(c.currentPage);C=null!=C?C+1:1;c.downloadFile("pdf",null,null,!y.selection,B||!y.allPages&&y.pagesFrom==C&&y.pagesTo==C,!y.crop,y.transparent,y.scale,null,y.grid,y.includeCopy,y.allPages||y.pagesFrom==C&&y.pagesTo==C?null:{from:Math.max(0,Math.min(q-1,y.pagesFrom-1)),to:Math.max(0,Math.min(q-1,y.pagesTo-1))},y.border,y.fit,y.sheetsAcross,y.sheetsDown)}):null,mxResources.get("export"))}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function q(){null!=+y&&y.removeDraft();c.fileLoaded(null)}var y=c.getCurrentFile();null!=y&&y.isModified()?c.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){l.getSelectionCells();if(1==l.getSelectionCount()){var q=l.getSelectionCell(),y=l.view.getState(q);null!=y&&null!=y.shape&&null!=y.shape.stencil&&(q=new EditShapeDialog(c,q,mxResources.get("editShape")+":",630,400),c.showDialog(q.container,+640,480,!0,!1),q.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(q,y){c.spinner.stop();q=new RevisionDialog(c,q,y);c.showDialog(q.container,640,480,!0,!0);q.init()}),mxUtils.bind(this,function(q){c.handleError(null!=q?q:mxResources.get("notAvailable"))})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",+function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");p=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(p.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var q=c.getCurrentFile();null!=q&&(window.drawdata=c.getFileData(),q=null!=q.getTitle()?q.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"++(c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(q),null,!0))});"undefined"!==typeof MathJax&&(p=c.actions.addAction("mathematicalTypesetting",function(){var q=new ChangePageSetup(c);q.ignoreColor=!0;q.ignoreImage=!0;q.mathEnabled=!c.isMathEnabled();l.model.execute(q)}),p.setToggleAction(!0),p.setSelectedCallback(function(){return c.isMathEnabled()}),p.isEnabled=n);p=c.actions.put("defaultAdaptiveColors",new Action(mxResources.get("default")+" ("+mxResources.get(Graph.getDefaultAdaptiveColorsKey())++")",function(){var q=new ChangePageSetup(c);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="default";l.model.execute(q)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return null==l.adaptiveColors});p=c.actions.put("automaticAdaptiveColors",new Action(mxResources.get("automatic"),function(){var q=new ChangePageSetup(c);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="auto";l.model.execute(q)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return"auto"==l.adaptiveColors});+p=c.actions.put("simpleAdaptiveColors",new Action(mxResources.get("simple"),function(){var q=new ChangePageSetup(c);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="simple";l.model.execute(q)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return"simple"==l.adaptiveColors});p=c.actions.put("noAdaptiveColors",new Action(mxResources.get("none"),function(){var q=new ChangePageSetup(c);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="none";l.model.execute(q)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return"none"==+l.adaptiveColors});this.put("adaptiveColors",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors","noAdaptiveColors"],y)})));isLocalStorage&&(p=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),p.setToggleAction(!0),p.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var v=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});+v.setToggleAction(!0);v.setSelectedCallback(function(){return v.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var q=l.getSelectionCells(),y=[],B=0;B<q.length;B++)l.getModel().isVertex(q[B])&&y.push(q[B]);0<y.length&&(q=new EditGeometryDialog(c,y),c.showDialog(q.container,200,270,!0,!0),q.init())},null,null,Editor.ctrlKey+"+Shift+M");c.actions.addAction("copyStyle",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var q=l.getSelectionCell(),y=l.getCellStyle(q,+!1);c.copiedStyle={};var B=[],C=[],M;for(M in y)B.push(y[M]),C.push(M);l.copyCellStyles([q],C,B,c.copiedStyle,c.copiedStyle,null,null,null,!0)}},null,null,"Alt+C");c.actions.addAction("pasteStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&null!=c.copiedStyle&&l.pasteCellStyles(l.includeDescendants(l.getSelectionCells()),c.copiedStyle,c.copiedStyle,!0)},null,null,"Alt+V");c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),+!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(q,y,B,C,M,T,m,z,I,L,N,Q,R,V){q=parseInt(q);c.lastExportSvgEditable=M;!isNaN(q)&&0<q&&c.exportSvg(q/100,y,B,C,M,T,m,!z,I,L,Q,R,V)}),!0,c.lastExportSvgEditable,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){f("png",c.lastExportPngEditable,function(q,y,B,C,M){c.lastExportPngEditable=M})}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")++"...",function(){f("jpeg")}));c.actions.put("exportWebp",new Action(mxResources.get("formatWebp")+"...",function(){f("webp")}));p=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var q=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),y=mxUtils.getXml(0==q.length?c.editor.getGraphXml():l.encodeCells(q));c.copyImage(q,y)}),null,null,"Ctrl+Alt+X");p.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;p=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),+function(){l.setShadowVisible(!l.shadowVisible)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return l.shadowVisible});c.actions.put("about",new Action("v"+EditorUi.VERSION,function(q,y){}));c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},+mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",function(){var q=new FeedbackDialog(c);c.showDialog(q.container,610,360,!0,!1);q.init()});c.actions.addAction("quickStart...",function(){"ac.draw.io"===window.location.hostname?c.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):+c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});p=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):+this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));null==Editor.gptApiKey||null==Editor.gptModel||null==Editor.gptUrl||c.isOffline()||EditorUi.isElectronApp||(p=c.actions.addAction("chatWindowTitle",mxUtils.bind(this,function(){null==this.chatWindow?(this.chatWindow=new ChatWindow(c,220,document.body.offsetHeight-+380,250,320),this.chatWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("chat"))})),this.chatWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("chat"))}),this.chatWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("chat"))):this.chatWindow.window.setVisible(!this.chatWindow.window.isVisible())})),p.setToggleAction(!0),p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.chatWindow&&this.chatWindow.window.isVisible()})));+p=c.actions.addAction("findReplace",mxUtils.bind(this,function(q,y){var B=(q=l.isEnabled()&&(null==y||!mxEvent.isShiftDown(y)))?"findReplace":"find";y=B+"Window";if(null==this[y]){var C="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,M=q?C?330:300:240;this[y]=new FindWindow(c,document.body.offsetWidth-(M+20),100,M,q?C?304:288:170,q);this[y].window.addListener("show",function(){c.fireEvent(new mxEventObject(B))});this[y].window.addListener("hide",function(){c.fireEvent(new mxEventObject(B))});+this[y].window.setVisible(!0)}else this[y].window.setVisible(!this[y].window.isVisible())}),null,null,Editor.ctrlKey+"+F");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){var q=l.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[q]&&this[q].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var q=null==c.pages||1>=c.pages.length;if(q)c.exportVisio();else{var y=document.createElement("div");y.style.whiteSpace=+"nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatVsdx"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(B);var C=c.addCheckbox(y,mxResources.get("allPages"),!q,q);C.style.marginBottom="16px";q=new CustomDialog(c,y,mxUtils.bind(this,function(){c.exportVisio(!C.checked)}),null,mxResources.get("export"));c.showDialog(q.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",+function(){var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginRight="8px";q.checked=mxSettings.getShowStartScreen();q.defaultChecked=q.checked;if(Editor.isSettingsEnabled()&&("sketch"==Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var y=document.createElement("span");y.style.display="flex";y.style.alignItems="center";y.style["float"]="right";y.style.cursor="pointer";y.style.userSelect="none";y.style.marginTop="-3px";y.appendChild(q);+mxUtils.write(y,mxResources.get("showStartScreen"));mxEvent.addListener(y,"click",function(C){mxEvent.getSource(C)!=q&&(q.checked=!q.checked)});header=y}y=[[mxResources.get("reset"),function(){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(C){c.handleError(C)}})}]];if(!c.isOfflineApp()&&isLocalStorage&&c.mode!=App.MODE_ATLAS){var B=c.actions.get("plugins");null==B||"sketch"!=+Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||y.push([mxResources.get("plugins"),B.funct])}EditorUi.isElectronApp||y.push([mxResources.get("link"),function(C,M){if(0<M.value.length)try{var T=JSON.parse(M.value),m=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(T)),z=new EmbedDialog(c,m);c.showDialog(z.container,450,240,!0);z.init()}catch(I){c.handleError(I)}else c.handleError({message:mxResources.get("invalidInput")})}]);+"atlassian"!=c.getServiceName()&&"1"!=urlParams.embed&&y.push([mxResources.get("preferences"),function(){c.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),function(){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(C){c.handleError(C)}})}]])}]);c.showLocalStorageDialog(mxResources.get("configuration")++":",Editor.configurationKey,y,q.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=q.parentNode&&(mxSettings.setShowStartScreen(q.checked),mxSettings.save())})});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(q,y){var B=mxLanguage;null==urlParams.lang&&isLocalStorage&&(B=mxSettings.settings.language);var C=mxUtils.bind(this,function(T){var m=""==T?mxResources.get("automatic"):mxLanguageMap[T],z=null;""!=m&&(z=q.addItem(m,+null,mxUtils.bind(this,function(){c.setAndPersistLanguage(T);c.alert(mxResources.get("restartForChangeRequired"))}),y),(T==B||""==T&&null==B)&&q.addCheckmark(z,Editor.checkmarkImage));return z});C("");q.addSeparator(y);for(var M in mxLanguageMap)C(M)})));var F=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(q){var y=F.apply(this,arguments);if(("1"!=urlParams.embed||"1"==urlParams.atlas)&&null!=y&&Editor.enableSimpleTheme&&"atlassian"!=c.getServiceName()){var B=this.get("dynamicAppearance");+if(null!=B){var C=y.addMenu("",B.funct);C.setAttribute("title",mxResources.get("appearance"));C.className="geToolbarButton geAdaptiveAsset";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="100% 100%";C.style.display="inline-block";C.style.cursor="pointer";C.style.zIndex="1";C.style.position="absolute";C.style.height="18px";C.style.width="18px";"atlas"==Editor.currentTheme?(C.style.filter="invert(100%)",C.style.right="11px",C.style.top="10px"):+(C.style.right="10px",C.style.top="5px");document.body.appendChild(C);y.langIcon=C;B=mxUtils.bind(this,function(){var M=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;C.style.display="atlas"==Editor.currentTheme||"min"==Editor.currentTheme||"sketch"==Editor.currentTheme?"none":"";C.style.backgroundImage="simple"==Editor.currentTheme?750>M?"url("+Editor.thinDoubleArrowRightImage+")":"url("+(Editor.isDarkMode()?Editor.thinDarkImage:Editor.thinLightImage)+")":"url("++(Editor.isDarkMode()?Editor.darkModeImage:Editor.lightModeImage)+")"});this.editorUi.addListener("currentThemeChanged",B);this.editorUi.addListener("darkModeChanged",B);mxEvent.addListener(window,"resize",B);B()}}return y}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){c.showCustomLayoutDialog(JSON.stringify(c.customLayoutConfig,+null,2))});c.actions.put("adaptiveColors",new Action("adaptiveColors",function(q){null==c.adaptiveColorsWindow&&(c.adaptiveColorsWindow=new AdaptiveColorsWindow(c,document.body.offsetWidth-520,80,200,160));c.adaptiveColorsWindow.window.setVisible(!0)}));p=this.get("viewZoom");var H=p.funct;p.funct=mxUtils.bind(this,function(q,y){H.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(q,["-","outline","fullscreen"],y)});p=this.get("layout");var E=p.funct;+p.funct=function(q,y){E.apply(this,arguments);q.addItem(mxResources.get("orgChart"),null,function(){var B=null,C=20,M=20,T=function(){"undefined"!==typeof mxOrgChartLayout&&null!=B&&c.tryAndHandle(mxUtils.bind(this,function(){var V=c.editor.graph,W=new mxOrgChartLayout(V,B,C,M),X=V.getDefaultParent();1<V.model.getChildCount(V.getSelectionCell())&&(X=V.getSelectionCell());W.execute(X)}))},m=document.createElement("div"),z=document.createElement("div");z.style.marginTop="6px";z.style.display="inline-block";+z.style.width="180px";mxUtils.write(z,mxResources.get("orgChartType")+": ");m.appendChild(z);var I=document.createElement("select");I.style.width="160px";I.style.boxSizing="border-box";z=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var L=0;L<z.length;L++){var N=document.createElement("option");mxUtils.write(N,z[L]);+N.value=L;2==L&&N.setAttribute("selected","selected");I.appendChild(N)}mxEvent.addListener(I,"change",function(){B=I.value});m.appendChild(I);z=document.createElement("div");z.style.marginTop="6px";z.style.display="inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("parentChildSpacing")+": ");m.appendChild(z);var Q=document.createElement("input");Q.type="number";Q.value=C;Q.style.width="160px";Q.style.boxSizing="border-box";m.appendChild(Q);mxEvent.addListener(Q,"change",function(){C=+Q.value});z=document.createElement("div");z.style.marginTop="6px";z.style.display="inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("siblingSpacing")+": ");m.appendChild(z);var R=document.createElement("input");R.type="number";R.value=M;R.style.width="160px";R.style.boxSizing="border-box";m.appendChild(R);mxEvent.addListener(R,"change",function(){M=R.value});z=mxUtils.button(mxResources.get("custom")+"...",function(){var V=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(I.value),+parentChildSpacing:parseInt(Q.value),siblingSpacing:parseInt(R.value)}}];c.hideDialog();c.showCustomLayoutDialog(JSON.stringify(V,null,2))});z.className="geBtn";m=new CustomDialog(c,m,function(){null==B&&(B=2);c.loadOrgChartLayouts(T)},null,null,null,z);c.showDialog(m.container,355,140,!0,!0)},y,null,n());q.addSeparator(y);q.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){c.tryAndHandle(mxUtils.bind(this,function(){var B=new mxParallelEdgeLayout(l);B.checkOverlap=!0;c.prompt(mxResources.get("spacing"),+B.spacing,mxUtils.bind(this,function(C){c.tryAndHandle(mxUtils.bind(this,function(){B.spacing=C;c.executeLayout(function(){B.execute(l.getDefaultParent(),l.isSelectionEmpty()?null:l.getSelectionCells())},!1)}))}))}))}),y);q.addSeparator(y);c.menus.addMenuItem(q,"runLayout",y,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(q,y){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(q,["keyboardShortcuts","-","about"],y);else{var B=q.addItem("Search:",+null,null,y,null,null,!1);B.style.cursor="default";var C=document.createElement("input");C.setAttribute("type","text");C.setAttribute("size","25");C.style.borderWidth="1px";C.style.marginLeft="8px";mxEvent.addListener(C,"keydown",mxUtils.bind(this,function(M){var T=mxUtils.trim(C.value);13==M.keyCode&&0<T.length?(this.editorUi.openLink("https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(T)),C.value="",EditorUi.logEvent({category:"SEARCH-HELP",+action:"search",label:T}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==M.keyCode&&(C.value="")}));B.firstChild.nextSibling.appendChild(C);mxEvent.addGestureListeners(C,function(M){document.activeElement!=C&&C.focus();mxEvent.consume(M)},function(M){mxEvent.consume(M)},function(M){mxEvent.consume(M)});window.setTimeout(function(){C.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.drawio.com")}),c.actions.addAction("check4Updates",+function(){c.checkForUpdates()}),c.actions.put("desktopZoomIn",new Action(mxResources.get("zoomIn"),function(){c.desktopZoomIn()})),c.actions.put("desktopZoomOut",new Action(mxResources.get("zoomOut"),function(){c.desktopZoomOut()})),c.actions.put("desktopResetZoom",new Action(mxResources.get("actualSize"),function(){c.desktopResetZoom()})),this.addMenuItems(q,"- keyboardShortcuts quickStart website support -".split(" "),y),"1"!=urlParams.disableUpdate&&this.addMenuItems(q,["check4Updates","-"],y),+this.addMenuItems(q,"desktopResetZoom desktopZoomIn desktopZoomOut - openDevTools - about".split(" "),y)):this.addMenuItems(q,"- keyboardShortcuts quickStart support - about".split(" "),y)}"1"==urlParams.test&&(q.addSeparator(y),this.addSubmenu("testDevelop",q,y))})));c.actions.addAction("languageCode...",function(){var q=new FilenameDialog(c,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(y){null!=y&&(Graph.diagramLanguage=0<y.length?y:null,Graph.translateDiagram=!0,l.refresh())}),+mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");c.showDialog(q.container,340,80,!0,!0);q.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,["languageCode","-"],y);y=q.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;l.refresh()},y);Graph.translateDiagram||q.addCheckmark(y,Editor.checkmarkImage)})));if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");+mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testChecksum=Checksum");mxResources.parse("testCheckPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");mxResources.parse("testPerformance=Performance");+c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!l.isSelectionEmpty()){var q=l.cloneCells(l.getSelectionCells()),y=l.getBoundingBoxFromGeometry(q,!0);q=l.moveCells(q,-y.x,-y.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+y.width+", "+y.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(l.encodeCells(q)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function q(m){return null==m||null==m.boundingBox||!isNaN(m.boundingBox.x)&&+!isNaN(m.boundingBox.y)&&!isNaN(m.boundingBox.width)&&!isNaN(m.boundingBox.height)}var y=l.getGraphBounds(),B=l.view.translate,C=l.view.scale;l.insertVertex(l.getDefaultParent(),null,"",y.x/C-B.x,y.y/C-B.y,y.width/C,y.height/C,"fillColor=none;strokeColor=red;");var M=0,T=0;l.view.states.visit(function(m,z){m=!0;q(z.shape)||(console.log("invalid shape",z.cell.id,z.shape),m=!1);q(z.text)||(console.log("invalid text",z.cell.id,z.text),m=!1);m||M++;T++});console.log("states checked",T,"invalid",M)}));+c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var q=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";q=new TextareaDialog(c,"Paste Data:",q,function(y){if(0<y.length)try{var B=function(z){function I(ba){if(null==Y[ba]){if(Y[ba]=!0,null!=Q[ba]){for(;0<Q[ba].length;){var da=Q[ba].pop();I(da)}delete Q[ba]}}else mxLog.debug(L+": Visited: "+ba)}var L=z.parentNode.id,N=z.childNodes;z={};for(var Q={},R=null,V={},W=0;W<N.length;W++){var X=+N[W];if(null!=X.id&&0<X.id.length)if(null==z[X.id]){z[X.id]=X.id;var Z=X.getAttribute("parent");null==Z?null!=R?mxLog.debug(L+": Multiple roots: "+X.id):R=X.id:(null==Q[Z]&&(Q[Z]=[]),Q[Z].push(X.id))}else V[X.id]=X.id}N=Object.keys(V);0<N.length?(N=L+": "+N.length+" Duplicates: "+N.join(", "),mxLog.debug(N+" (see console)")):mxLog.debug(L+": Checked");var Y={};null==R?mxLog.debug(L+": No root"):(I(R),Object.keys(Y).length!=Object.keys(z).length&&(mxLog.debug(L+": Invalid tree: (see console)"),console.log(L++": Invalid tree",Q)))};"<"!=y.charAt(0)&&(y=Graph.decompress(y),mxLog.debug("See console for uncompressed XML"),console.log("xml",y));var C=mxUtils.parseXml(y),M=c.getPagesForNode(C.documentElement,"mxGraphModel");if(null!=M&&0<M.length)try{var T=c.getHashValueForPages(M);mxLog.debug("Checksum: ",T)}catch(z){mxLog.debug("Error: ",z.message)}else mxLog.debug("No pages found for checksum");var m=C.getElementsByTagName("root");for(y=0;y<m.length;y++)B(m[y]);mxLog.show()}catch(z){c.handleError(z),null!=+window.console&&console.error(z)}});c.showDialog(q.container,620,460,!0,!0);q.init()}));var K=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var q=new TextareaDialog(c,"Diff/Sync:","",function(y){var B=c.getCurrentFile();if(0<y.length&&null!=B)try{var C=JSON.parse(y);B.patch([C],null,!0,!0);c.hideDialog()}catch(M){c.handleError(M)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(y,B){K=c.getPagesForXml(c.getFileData(!0));q.textarea.value=+"Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(K)}],["Diff",function(y,B){try{q.textarea.value=JSON.stringify(c.diffPages(K,c.pages),null,2)}catch(C){c.handleError(C)}}]]);null==K?(K=c.getPagesForXml(c.getFileData(!0)),q.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(K)):q.textarea.value=JSON.stringify(c.diffPages(K,c.pages),null,2);c.showDialog(q.container,620,460,!0,!0);q.init()}else c.alert("No pages")}));+c.actions.addAction("testChecksum",mxUtils.bind(this,function(){var q=c.getCurrentFile();null!=c.pages&&null!=q?c.spinner.spin(document.body,mxResources.get("loading"))&&q.getLatestVersion(function(y){c.spinner.stop();var B=c.getHashValueForPages(c.pages),C=q.getCurrentRevisionId(),M=c.getHashValueForPages(y.getShadowPages()),T=y.getDescriptorChecksum(y.getDescriptor()),m=y.getCurrentRevisionId();console.log("Local File",[q],"modified",q.isModified(),"checksum",B);console.log("Remote File",[y],"rev",+m==C,"desc",T==M,"checksum",M);c.alert("Checksums "+(M==B?"match":"no not match"))},function(y){console.log("Error getLatestVersion",y);c.handleError(y)}):console.log("Checksum: no file or pages")}));c.actions.addAction("testCheckPages",mxUtils.bind(this,function(){var q=c.getCurrentFile();console.log("editorUi",c,"file",q);if(null!=q&&q.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(q.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(q.theirPages));console.log("diff ownPages/theirPages",+c.diffPages(q.ownPages,q.theirPages));var y=q.getShadowPages();null!=y&&(console.log("Checksum shadowPages",c.getHashValueForPages(y)),console.log("diff shadowPages/ownPages",c.diffPages(y,q.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(q.ownPages,y)),console.log("diff theirPages/shadowPages",c.diffPages(q.theirPages,y)));null!=q.sync&&null!=q.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(q.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(q.ownPages,+q.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(q.theirPages,q.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(q.sync.snapshot,c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",c.diffPages(q.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(q.theirPages,c.pages)))}null!=q&&console.log("Shadow pages",[c.getXmlForPages(q.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",c.getHashValueForPages(c.pages))}));+c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",c);var q=c.getCurrentFile();null!=q&&q.isRealtime()&&null!=q.shadowPages&&(console.log("patching actualPages to shadowPages",q.patch([c.diffPages(q.shadowPages,c.pages)])),q.ownPages=c.clonePages(c.pages),q.theirPages=c.clonePages(c.pages),q.shadowPages=c.clonePages(c.pages),null!=q.sync&&(q.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testOptimize",mxUtils.bind(this,function(){l.model.beginUpdate();+try{var q=l.model.cells,y=0,B=[],C=[],M;for(M in q){var T=q[M],m=l.getCurrentCellStyle(T)[mxConstants.STYLE_IMAGE];null!=m&&"data:"==m.substring(0,5)&&(null==B[m]&&(B[m]=(B[m]||0)+1,y++),C.push(T))}l.setCellStyles(mxConstants.STYLE_IMAGE,null,C);console.log("Removed",y,"image(s) from",C.length,"cell(s): ",[C,B])}finally{l.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,l.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var q=+new mxImageExport,y=l.getGraphBounds(),B=l.view.scale,C=mxUtils.createXmlDocument(),M=C.createElement("output");C.appendChild(M);C=new mxXmlCanvas2D(M);C.translate(Math.floor((1-y.x)/B),Math.floor((1-y.y)/B));C.scale(1/B);var T=0,m=C.save;C.save=function(){T++;m.apply(this,arguments)};var z=C.restore;C.restore=function(){T--;z.apply(this,arguments)};var I=q.drawShape;q.drawShape=function(L){mxLog.debug("entering shape",L,T);I.apply(this,arguments);mxLog.debug("leaving shape",L,T)};q.drawState(l.getView().getState(l.model.root),+C);mxLog.show();mxLog.debug(mxUtils.getXml(M));mxLog.debug("stateCounter",T)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});var d=null,g=null,k=null,u=null,t=null,x=null,A=null,J=null;c.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=d?(l.view.revalidate=d,d=null):(d=l.view.revalidate,l.view.revalidate=function(){var q=Date.now(),y=d.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",+[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=g?(c.selectPage=g,g=null):(g=c.selectPage,c.selectPage=function(){var q=Date.now(),y=g.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=k?(c.diffPages=k,k=null):(k=c.diffPages,c.diffPages=function(){var q=Date.now(),y=k.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-q+" ms","args",arguments);+return y});null!=u?(c.patchPages=u,u=null):(u=c.patchPages,c.patchPages=function(){var q=Date.now(),y=u.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=t?(c.clonePages=t,t=null):(t=c.clonePages,c.clonePages=function(){var q=Date.now(),y=t.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=A?(c.getHashValueForPages=A,+A=null):(A=c.getHashValueForPages,c.getHashValueForPages=function(){var q=Date.now(),y=A.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=J?(c.resolveCrossReferences=J,J=null):(J=c.resolveCrossReferences,c.resolveCrossReferences=function(){var q=Date.now(),y=J.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-q+" ms","args",arguments);return y});+null!=x?(c.getFileData=x,x=null):(x=c.getFileData,c.getFileData=function(){var q=Date.now(),y=x.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",[this],"time",Date.now()-q+" ms","args",arguments);return y});EditorUi.debug("[Performance]",null!=d?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),+y);var B=q.addItem(mxResources.get("testPerformance"),null,function(){c.actions.get("testPerformance").funct()},y);null!=d&&q.addCheckmark(B,Editor.checkmarkImage);this.addMenuItems(q,["-","testShowConsole"],y)})))}c.actions.put("shapes",new Action(mxResources.get("moreShapes")+"...",function(q){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?+mxClient.IS_IOS?300:280:260,!0,!0)}));c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(q){l.isEnabled()&&(q=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),q.vertex=!0,q=new EditShapeDialog(c,q,mxResources.get("editShape")+":",630,400),c.showDialog(q.container,640,480,!0,!1),q.init())})).isEnabled=n;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showHtmlDialog(mxResources.get("create"),+"https://www.drawio.com/doc/faq/embed-html-options",q,function(y,B,C,M,T,m,z,I,L,N,Q,R){c.createHtml(y,B,C,M,T,m,z,I,L,N,Q,mxUtils.bind(this,function(V,W){var X=new EmbedDialog(c,"\x3c!-- "+c.editor.appName+" diagram --\x3e\n"+V+"\n"+W+"\n",null,null,function(){var Z=window.open(),Y=Z.document;if(null!=Y){"CSS1Compat"===document.compatMode&&Y.writeln("<!DOCTYPE html>");Y.writeln("<html>");Y.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');+Y.writeln("<body>");Y.writeln(V);var ba=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;ba&&Y.writeln(W);Y.writeln("</body>");Y.writeln("</html>");Y.close();if(!ba){var da=Z.document.createElement("div");da.marginLeft="26px";da.marginTop="26px";mxUtils.write(da,mxResources.get("updatingDocument"));ba=Z.document.createElement("img");ba.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");ba.style.marginLeft="6px";da.appendChild(ba);Z.document.body.insertBefore(da,+Z.document.body.firstChild);window.setTimeout(function(){var ca=document.createElement("script");ca.type="text/javascript";ca.src=/<script.*?src="(.*?)"/.exec(W)[1];Y.body.appendChild(ca);da.parentNode.removeChild(da)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(X.container,450,240,!0,!0);X.init()}),R)})})}));c.actions.put("liveImage",new Action("Live image...",function(){var q=c.getCurrentFile();null!=q&&c.getPublicUrl(q,function(y){null!=y?(y=new EmbedDialog(c,+'<img src="'+(q.constructor!=DriveFile?y:"https://drive.google.com/uc?id="+q.getId())+'"/>'),c.showDialog(y.container,450,240,!0,!0),y.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(q,y,B,C,M,T){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(q,y,B,C,M,T,function(m){c.spinner.stop();m=new EmbedDialog(c,m);c.showDialog(m.container,450,+240,!0,!0);m.init()},function(m){c.spinner.stop();c.handleError(m)})},mxResources.get("image"),mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(q,y,B,C,M,T){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(q,y,B,C,M,T,function(m){c.spinner.stop();m=new EmbedDialog(c,m);c.showDialog(m.container,450,240,!0,!0);m.init()},function(m){c.spinner.stop();c.handleError(m)})},+mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")}));c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){var y=l.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,y.height/l.view.scale))+2,null,null,null,q,c.getCurrentFile(),function(B,C,M,T,m,z,I,L,N,Q,R,V){var W=[];N&&W.push("tags=%7B%7D");B=new EmbedDialog(c,'<iframe frameborder="0" style="width:'++I+";height:"+L+';" src="'+c.createLink(B,C,!0,T,m,z,"public"==Q?q:null,null,W,null,M,R,V)+'"'+(R?' allowtransparency="true"':"")+"></iframe>");c.showDialog(B.container,450,240,!0,!0);B.init()},!0,!0)})}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.textAlign="center";q.style.width="100%";q.style.left="0px";var y=document.createElement("a");y.setAttribute("href","javascript:void(0);");+y.setAttribute("target","_blank");y.style.cursor="pointer";mxUtils.write(y,mxResources.get("getNotionChromeExtension"));q.appendChild(y);mxUtils.setPrefixedStyle(y.style,"transition","all 1s ease");mxUtils.setOpacity(y,0);window.setTimeout(function(){mxUtils.setOpacity(y,100)},300);mxEvent.addListener(y,"click",function(B){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(B)});c.getPublicUrl(c.getCurrentFile(),function(B){c.showPublishLinkDialog(mxResources.get("notion"),+null,null,!0,"https://www.drawio.com/blog/drawio-notion",q,B,c.getCurrentFile(),function(C,M,T,m,z,I,L,N,Q,R,V,W){L=["border=0"];Q&&L.push("tags=%7B%7D");C=new EmbedDialog(c,c.createLink(C,M,!0,m,z,I,"public"==R?B:null,null,L,null,T,null,W));c.showDialog(C.container,450,240,!0,!0);C.init()},null,!0)})}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showPublishLinkDialog(null,null,null,null,null,null,q,c.getCurrentFile(),+function(y,B,C,M,T,m,z,I,L,N,Q,R){z=[];M&&L&&z.push("tags=%7B%7D");y=new EmbedDialog(c,c.createLink(y,B,!0,M,T,m,"public"==N?q:null,null,z,null,C,null,R));c.showDialog(y.container,450,240,!0,!0);y.init()},null,!0)})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",+function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){q=new GoogleSitesDialog(c,q);c.showDialog(q.container,420,256,!0,!0);q.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)p=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),p.setToggleAction(!0),p.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,+380,240,!0,!1)});window.matchMedia&&null!=document.getElementById("high-contrast-stylesheet")&&(p=c.actions.addAction("highContrast",function(){c.setAndPersistHighContrast(!c.isHighContrast())}),p.setToggleAction(!0),p.setSelectedCallback(function(){return c.isHighContrast()}));p=c.actions.addAction("search",function(){if(null!=c.sidebar){var q=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!q);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!q,mxSettings.save())}});p.label=+mxResources.get("searchShapes");p.setToggleAction(!0);p.setSelectedCallback(function(){return null!=c.sidebar&&c.sidebar.isEntryVisible("search")});c.actions.get("clearDefaultStyle").funct=function(q){l.isEnabled()&&(c.clearDefaultStyle(),Editor.sketchMode&&c.setSketchMode(!1))};"1"==urlParams.embed&&(c.actions.get("saveAs").setEnabled(!1),c.actions.get("save").funct=function(q){l.isEditing()&&l.stopEditing();var y="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());+if("json"==urlParams.proto){var B=c.createLoadMessage("save");B.xml=y;!0!==q||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(B.exit=!0);y=JSON.stringify(B)}(window.opener||window.parent).postMessage(y,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));q=c.getCurrentFile();null==q||q.constructor==EmbedFile||q.constructor==LocalFile&&null==q.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?c.sendEmbeddedSvgExport():c.actions.get("save").funct(!0)},null,null,Editor.ctrlKey+"+S").label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var q=function(){c.editor.modified=!1;var y="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(y,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(q,y){c.isExportToCanvas()?(this.addMenuItems(q,["exportPng"],y),c.jpgSupported&&this.addMenuItems(q,["exportJpg"],y),c.webpSupported&&this.addMenuItems(q,["exportWebp"],y)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPng","exportJpg"],y);this.addMenuItems(q,["exportSvg","-"],y);c.isOffline()||-c.printPdfExport?this.addMenuItems(q,["exportPdf"],y):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPdf"],y);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(q,["exportVsdx"],y);this.addMenuItems(q,["-","exportHtml","exportXml","exportUrl"],y);c.isOffline()||(q.addSeparator(y),this.addMenuItem(q,"export",y).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||-this.addMenuItems(q,["publishLink"],y);c.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(q.addSeparator(y),c.menus.addSubmenu("embed",q,y))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(q,y){function B(T){T.pickFile(function(m){c.spinner.spin(document.body,mxResources.get("loading"))&&T.getFile(m,function(z){var I="data:image/"==z.getData().substring(0,11)?M(z.getTitle()):"text/xml";/\.svg$/i.test(z.getTitle())&&-!c.editor.isDataSvg(z.getData())&&(z.setData(Editor.createSvgDataUri(z.getData())),I="image/svg+xml");C(z.getData(),I,z.getTitle())},function(z){c.handleError(z,null!=z?mxResources.get("errorLoadingFile"):null)},T==c.drive)},!0)}var C=mxUtils.bind(this,function(T,m,z){var I=l.view,L=l.getGraphBounds(),N=l.snap(Math.ceil(Math.max(0,L.x/I.scale-I.translate.x)+4*l.gridSize)),O=l.snap(Math.ceil(Math.max(0,(L.y+L.height)/I.scale-I.translate.y)+4*l.gridSize));"data:image/"==T.substring(0,11)?c.loadImage(T,-mxUtils.bind(this,function(S){var U=!0,W=mxUtils.bind(this,function(){c.resizeImage(S,T,mxUtils.bind(this,function(X,Z,Y){X=U?Math.min(1,Math.min(c.maxImageSize/Z,c.maxImageSize/Y)):1;c.importFile(T,m,N,O,Math.round(Z*X),Math.round(Y*X),z,function(ba){c.spinner.stop();l.setSelectionCells(ba);l.scrollCellToVisible(l.getSelectionCell())})}),U)});T.length>c.resampleThreshold?c.confirmImageResize(function(X){U=X;W()}):W()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):-c.importFile(T,m,N,O,0,0,z,function(S){c.spinner.stop();l.setSelectionCells(S);l.scrollCellToVisible(l.getSelectionCell())})}),M=mxUtils.bind(this,function(T){var m="text/xml";/\.png$/i.test(T)?m="image/png":/\.jpe?g$/i.test(T)?m="image/jpg":/\.gif$/i.test(T)?m="image/gif":/\.pdf$/i.test(T)&&(m="application/pdf");return m});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){B(c.drive)},y):c.isModeEnabled(App.MODE_GOOGLE)&&+c.printPdfExport?this.addMenuItems(q,["exportPdf"],y):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPdf"],y);!c.vsdxExportEnabled()||mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(q,["exportVsdx"],y);this.addMenuItems(q,["-","exportHtml","exportXml","exportUrl"],y);c.isOffline()||(q.addSeparator(y),this.addMenuItem(q,"export",y).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||+"min"!=Editor.currentTheme||this.addMenuItems(q,["publishLink"],y);c.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(q.addSeparator(y),c.menus.addSubmenu("embed",q,y))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(q,y){function B(T){T.pickFile(function(m){c.spinner.spin(document.body,mxResources.get("loading"))&&T.getFile(m,function(z){var I="data:image/"==z.getData().substring(0,11)?M(z.getTitle()):+"text/xml";/\.svg$/i.test(z.getTitle())&&!c.editor.isDataSvg(z.getData())&&(z.setData(Editor.createSvgDataUri(z.getData())),I="image/svg+xml");C(z.getData(),I,z.getTitle())},function(z){c.handleError(z,null!=z?mxResources.get("errorLoadingFile"):null)},T==c.drive)},!0)}var C=mxUtils.bind(this,function(T,m,z){var I=l.view,L=l.getGraphBounds(),N=l.snap(Math.ceil(Math.max(0,L.x/I.scale-I.translate.x)+4*l.gridSize)),Q=l.snap(Math.ceil(Math.max(0,(L.y+L.height)/I.scale-I.translate.y)+4*l.gridSize));"data:image/"==+T.substring(0,11)?c.loadImage(T,mxUtils.bind(this,function(R){var V=!0,W=mxUtils.bind(this,function(){c.resizeImage(R,T,mxUtils.bind(this,function(X,Z,Y){X=V?Math.min(1,Math.min(c.maxImageSize/Z,c.maxImageSize/Y)):1;c.importFile(T,m,N,Q,Math.round(Z*X),Math.round(Y*X),z,function(ba){c.spinner.stop();l.setSelectionCells(ba);l.scrollCellToVisible(l.getSelectionCell())})}),V)});T.length>c.resampleThreshold?c.confirmImageResize(function(X){V=X;W()}):W()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):+c.importFile(T,m,N,Q,0,0,z,function(R){c.spinner.stop();l.setSelectionCells(R);l.scrollCellToVisible(l.getSelectionCell())})}),M=mxUtils.bind(this,function(T){var m="text/xml";/\.png$/i.test(T)?m="image/png":/\.jpe?g$/i.test(T)?m="image/jpg":/\.gif$/i.test(T)?m="image/gif":/\.pdf$/i.test(T)&&(m="application/pdf");return m});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){B(c.drive)},y):c.isModeEnabled(App.MODE_GOOGLE)&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?q.addItem(mxResources.get("oneDrive")+"...",null,function(){B(c.oneDrive)},y):c.isModeEnabled(App.MODE_ONEDRIVE)&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);c.isModeReady(App.MODE_DROPBOX)?q.addItem(mxResources.get("dropbox")+"...",null,function(){B(c.dropbox)},y):c.isModeEnabled(App.MODE_DROPBOX)&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);q.addSeparator(y);c.isModeReady(App.MODE_GITHUB)&&q.addItem(mxResources.get("github")+"...",null,function(){B(c.gitHub)},y);c.isModeReady(App.MODE_GITLAB)&&q.addItem(mxResources.get("gitlab")+"...",null,function(){B(c.gitLab)},y);c.isModeReady(App.MODE_TRELLO)?q.addItem(mxResources.get("trello")+"...",null,function(){B(c.trello)},y):c.isModeEnabled(App.MODE_TRELLO)&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);q.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},y);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},y);c.isOffline()||(q.addSeparator(y),q.addItem(mxResources.get("url")+"...",null,function(){var T=new FilenameDialog(c,"",mxResources.get("import"),function(m){if(null!=m&&0<m.length&&@@ -14431,10 +14431,10 @@ mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(C,"https:/y);"1"!=urlParams.sketch&&this.addMenuItems(q,["-","fullscreen"],y)}})));this.put("editCell",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,"editLink editShape editImage crop - editData copyData pasteData - editConnectionPoints editGeometry - editTooltip editStyle - edit".split(" "),y)})));this.put("currentPage",new Menu(mxUtils.bind(this,function(q,y){var B=c.currentPage;null!=B&&(q.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){c.renamePage(B,B.getName())}),y),q.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){c.removePage(B)}),y),1<c.pages.length&&(c.menus.addSubmenu("movePage",q,y,mxResources.get("move")),q.addSeparator(y)),q.addSeparator(y),q.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){c.duplicatePage(B,mxResources.get("copyOf",[B.getName()]))}),y),1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||q.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){c.editor.editAsNew(c.getFileData(!0,null,null,null,!0,!0))}),y)))})));this.put("pages",new Menu(mxUtils.bind(this,function(q,y){var B=c.currentPage;c.editor.graph.isLightboxView()||(q.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{c.insertPage()}catch(M){c.handleError(M)}}),y,null,c.editor.graph.isEnabled()),q.addSeparator(y));if(null!=c.pages)for(var C=0;C<c.pages.length;C++)mxUtils.bind(this,function(M){var T=null;T=c.pages[M]!=B||c.editor.graph.isLightboxView()?-q.addItem(c.getShortPageName(c.pages[M]),null,mxUtils.bind(this,function(){c.selectPage(c.pages[M])}),y):c.menus.addSubmenu("currentPage",q,y,c.getShortPageName(B));var m=c.pages[M].getId();T.setAttribute("title",c.pages[M].getName()+" ("+(M+1)+"/"+c.pages.length+")"+(null!=m?" ["+m+"]":""));c.pages[M]==B&&q.addCheckmark(T,Editor.checkmarkImage)})(C)})));if(EditorUi.isElectronApp){var R="1"==urlParams.enableSpellCheck;p=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();R=!R;c.alert(mxResources.get("restartForChangeRequired"))});-p.setToggleAction(!0);p.setSelectedCallback(function(){return R});var V="1"==urlParams.enableStoreBkp;p=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();V=!V});p.setToggleAction(!0);p.setSelectedCallback(function(){return V});var Q="1"==urlParams.isGoogleFontsEnabled;p=c.actions.addAction("googleFonts",function(){c.toggleGoogleFonts();Q=!Q;c.alert(mxResources.get("restartForChangeRequired"))});p.setToggleAction(!0);p.setSelectedCallback(function(){return Q});c.actions.addAction("openDevTools",-function(){c.openDevTools()});c.actions.addAction("drafts...",function(){var q=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(y){y=parseInt(y);0<=y&&(EditorUi.draftSaveDelay=1E3*y,EditorUi.enableDrafts=0<y,mxSettings.setDraftSaveDelay(y),mxSettings.save())}),mxResources.get("draftSaveInt"));c.showDialog(q.container,320,80,!0,!0);q.init()})}var P=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(q,y){if("simple"==Editor.currentTheme||-"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||c.mode==App.MODE_ATLAS||"1"==urlParams.embedInline||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||c.menus.addSubmenu("appearance",q,y);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&c.menus.addSubmenu("theme",q,y);q.addSeparator(y);null==P||"1"==urlParams.embed&&null!=urlParams.lang||c.menus.addSubmenu("language",q,y);c.menus.addSubmenu("units",+q.addItem(c.getShortPageName(c.pages[M]),null,mxUtils.bind(this,function(){c.selectPage(c.pages[M])}),y):c.menus.addSubmenu("currentPage",q,y,c.getShortPageName(B));var m=c.pages[M].getId();T.setAttribute("title",c.pages[M].getName()+" ("+(M+1)+"/"+c.pages.length+")"+(null!=m?" ["+m+"]":""));c.pages[M]==B&&q.addCheckmark(T,Editor.checkmarkImage)})(C)})));if(EditorUi.isElectronApp){var S="1"==urlParams.enableSpellCheck;p=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();S=!S;c.alert(mxResources.get("restartForChangeRequired"))});+p.setToggleAction(!0);p.setSelectedCallback(function(){return S});var U="1"==urlParams.enableStoreBkp;p=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();U=!U});p.setToggleAction(!0);p.setSelectedCallback(function(){return U});var P="1"==urlParams.isGoogleFontsEnabled;p=c.actions.addAction("googleFonts",function(){c.toggleGoogleFonts();P=!P;c.alert(mxResources.get("restartForChangeRequired"))});p.setToggleAction(!0);p.setSelectedCallback(function(){return P});c.actions.addAction("openDevTools",+function(){c.openDevTools()});c.actions.addAction("drafts...",function(){var q=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(y){y=parseInt(y);0<=y&&(EditorUi.draftSaveDelay=1E3*y,EditorUi.enableDrafts=0<y,mxSettings.setDraftSaveDelay(y),mxSettings.save())}),mxResources.get("draftSaveInt"));c.showDialog(q.container,320,80,!0,!0);q.init()})}var O=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(q,y){if("simple"==Editor.currentTheme||+"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||c.mode==App.MODE_ATLAS||"1"==urlParams.embedInline||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||c.menus.addSubmenu("appearance",q,y);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&c.menus.addSubmenu("theme",q,y);q.addSeparator(y);null==O||"1"==urlParams.embed&&null!=urlParams.lang||c.menus.addSubmenu("language",q,y);c.menus.addSubmenu("units",q,y);c.menus.addMenuItems(q,"- copyConnect collapseExpand - tooltips animations -".split(" "),y);var B=c.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=B&&B.isRealtimeEnabled()&&B.isRealtimeSupported()&&this.addMenuItems(q,["showRemoteCursors"],y),c.menus.addMenuItems(q,["ruler","-"],y));EditorUi.isElectronApp&&c.menus.addMenuItems(q,"- googleFonts spellCheck autoBkp drafts -".split(" "),y);this.addSubmenu("diagramLanguage",q,y);q.addSeparator(y);c.mode!=App.MODE_ATLAS&&c.menus.addMenuItem(q,"configuration",y);q.addSeparator(y)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",q,y),"1"==urlParams.embed&&"1"!=urlParams.atlas||"atlas"==Editor.currentTheme||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||c.menus.addSubmenu("appearance",q,y),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",q,y),q.addSeparator(y),B=this.addSubmenu("adaptiveColors",q,y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(B,"https://github.com/jgraph/drawio/discussions/4713"),"undefined"!==typeof MathJax&&(B=this.addMenuItem(q,"mathematicalTypesetting",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.drawio.com/doc/faq/math-typesetting")),EditorUi.isElectronApp&&this.addMenuItems(q,["googleFonts","spellCheck","autoBkp","drafts","-"],y),this.addMenuItems(q,["copyConnect","collapseExpand","-"],y),"1"!=urlParams.embed&&(B=c.getCurrentFile(),null!=@@ -14456,14 +14456,14 @@ OneDriveFile||c.menus.addMenuItems(q,["share"],y));q.addSeparator(y);null!=B&&B.y):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==B||B.constructor==LocalFile&&null==B.fileHandle||(q.addSeparator(y),C=this.addMenuItem(q,"synchronize",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(C,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(q,["-","save","saveAs","-"],y),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==B||this.addMenuItems(q,["share","-"],y),null!=B&&B.isRenamable()&&this.addMenuItems(q,["rename"],y),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(q,["upload"],y):(this.addMenuItems(q,["makeCopy"],y),null!=B&&(B.constructor==OneDriveFile&&this.addMenuItems(q,["moveToFolder"],y),null!=B.getFolderUrl()&&c.menus.addMenuItems(q,["openFolder"],y)))),q.addSeparator(y),this.addSubmenu("importFrom",q,y),this.addSubmenu("exportAs",q,y),q.addSeparator(y),this.addSubmenu("embed",q,y),this.addSubmenu("publish",q,y),q.addSeparator(y),this.addSubmenu("newLibrary",q,y),this.addSubmenu("openLibraryFrom",q,y),c.isRevisionHistorySupported()&&this.addMenuItems(q,["-","revisionHistory"],y),null!=B&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(C=null!=B.getTitle()?B.getTitle():c.defaultFilename,(B.constructor==DriveFile&&null!=B.sync&&B.sync.isConnected()||!/(\.html)$/i.test(C))&&this.addMenuItems(q,["-","properties"])),this.addMenuItems(q,["-","pageSetup"],y),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["print"],y),-this.addMenuItems(q,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(q,y){function B(N){var O=encodeURIComponent(N.name)+(null==N.url?"":"@"+encodeURIComponent(N.url));if(!M[O]){for(var S=N.name,U=0;null!=I[S.toLowerCase()];)S=N.name+" ("+ ++U+")";null==z[O]&&(L.push({name:N.name,url:N.url,label:S,title:N.url}),I[S.toLowerCase()]=N,z[O]=N)}}for(var C=mxUtils.bind(this,function(N,O,S,U,W){var X=c.editor.graph,Z=this.styleChange(q,null!=U?U:N,[mxConstants.STYLE_FONTFAMILY,-"fontSource","FType"],[N,null!=O?encodeURIComponent(O):null,null],null,y,function(){X.setFont(N,O);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[N,null!=O?encodeURIComponent(O):null,null],"cells",[X.cellEditor.getEditingCell()]))},function(){X.updateLabelElements(X.getSelectionCells(),function(Y){Y.removeAttribute("face");Y.style.fontFamily=null;"PRE"==Y.nodeName&&X.replaceElement(Y,"div")})});S&&(S=document.createElement("img"),-S.className="geAdaptiveAsset",S.setAttribute("src",Editor.crossImage),S.setAttribute("title",mxResources.get("delete")),S.setAttribute("valign","absmiddle"),S.setAttribute("border","0"),S.style.position="relative",S.style.top="2px",S.style.width="14px",S.style.cursor="default",S.style.margin="0 3px",Z.firstChild.nextSibling.nextSibling.appendChild(S),mxEvent.addListener(S,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Y){this.removeCustomFont(N,O);this.editorUi.hideCurrentMenu();-mxEvent.consume(Y)})));Graph.addFont(N,O);Z.firstChild.nextSibling.style.fontFamily=N;W=null!=U?U:N;null!=O&&(W+=" ("+O+")");Z.setAttribute("title",W)}),M={},T=0;T<this.defaultFonts.length;T++){var m=this.defaultFonts[T];"string"===typeof m?C(m):null!=m.fontFamily&&null!=m.fontUrl&&(M[encodeURIComponent(m.fontFamily)+"@"+encodeURIComponent(m.fontUrl)]=!0,C(m.fontFamily,m.fontUrl))}q.addSeparator(y);var z={},I={},L=[];for(T=0;T<this.customFonts.length;T++)B(this.customFonts[T]);L.sort(function(N,O){return N.label<-O.label?-1:N.label>O.label?1:0});if(0<L.length){for(T=0;T<L.length;T++)C(L[T].name,L[T].url,!0,L[T].label);q.addSeparator(y)}q.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),y);q.addSeparator(y);q.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var N=this.editorUi.editor.graph,O=N.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],S="s",U=null;if(N.isEditing()){var W=-N.getSelectedEditingElement();if(null!=W){var X=mxUtils.getCurrentStyle(W);if(null!=X){O=mxUtils.getCssFontFamily(X.fontFamily);X=N.getView().getState(N.cellEditor.getEditingCell());U=null!=X?X.style.fontSource:null;for(null!=U&&(U=decodeURIComponent(U));null!=W&&W!=N.cellEditor.textarea;){if(W.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=W.getAttribute("data-font-src")){U=W.getAttribute("data-font-src");break}else if(W.getAttribute("face")==O){U=null;break}W=W.parentNode}null!=U&&(Graph.isGoogleFontUrl(U)?-(U=null,S="g"):S="w")}}}else X=N.getView().getState(N.getSelectionCell()),null!=X&&(O=X.style[mxConstants.STYLE_FONTFAMILY]||O,W=X.style.fontSource,null!=W&&(W=decodeURIComponent(W),Graph.isGoogleFontUrl(W)?S="g":(S="w",U=W)));null!=U&&U.substring(0,PROXY_URL.length)==PROXY_URL&&(U=decodeURIComponent(U.substr((PROXY_URL+"?url=").length)));var Z=null;document.activeElement==N.cellEditor.textarea&&(Z=N.cellEditor.saveSelection());O=new FontDialog(this.editorUi,O,U,S,mxUtils.bind(this,function(Y,ba,-ea){null!=Z&&(N.cellEditor.restoreSelection(Z),Z=null);if(null!=Y&&0<Y.length)if(this.addCustomFont(Y,ba),N.isEditing())N.setFont(Y,ba);else{N.getModel().beginUpdate();try{N.stopEditing(!1),N.setCellStyles(mxConstants.STYLE_FONTFAMILY,Y),N.setCellStyles("fontSource",null!=ba?encodeURIComponent(ba):null),N.setCellStyles("FType",null)}finally{N.getModel().endUpdate()}}}));this.editorUi.showDialog(O.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);O.init()}),+this.addMenuItems(q,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(q,y){function B(N){var Q=encodeURIComponent(N.name)+(null==N.url?"":"@"+encodeURIComponent(N.url));if(!M[Q]){for(var R=N.name,V=0;null!=I[R.toLowerCase()];)R=N.name+" ("+ ++V+")";null==z[Q]&&(L.push({name:N.name,url:N.url,label:R,title:N.url}),I[R.toLowerCase()]=N,z[Q]=N)}}for(var C=mxUtils.bind(this,function(N,Q,R,V,W){var X=c.editor.graph,Z=this.styleChange(q,null!=V?V:N,[mxConstants.STYLE_FONTFAMILY,+"fontSource","FType"],[N,null!=Q?encodeURIComponent(Q):null,null],null,y,function(){X.setFont(N,Q);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[N,null!=Q?encodeURIComponent(Q):null,null],"cells",[X.cellEditor.getEditingCell()]))},function(){X.updateLabelElements(X.getSelectionCells(),function(Y){Y.removeAttribute("face");Y.style.fontFamily=null;"PRE"==Y.nodeName&&X.replaceElement(Y,"div")})});R&&(R=document.createElement("img"),+R.className="geAdaptiveAsset",R.setAttribute("src",Editor.crossImage),R.setAttribute("title",mxResources.get("delete")),R.setAttribute("valign","absmiddle"),R.setAttribute("border","0"),R.style.position="relative",R.style.top="2px",R.style.width="14px",R.style.cursor="default",R.style.margin="0 3px",Z.firstChild.nextSibling.nextSibling.appendChild(R),mxEvent.addListener(R,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Y){this.removeCustomFont(N,Q);this.editorUi.hideCurrentMenu();+mxEvent.consume(Y)})));Graph.addFont(N,Q);Z.firstChild.nextSibling.style.fontFamily=N;W=null!=V?V:N;null!=Q&&(W+=" ("+Q+")");Z.setAttribute("title",W)}),M={},T=0;T<this.defaultFonts.length;T++){var m=this.defaultFonts[T];"string"===typeof m?C(m):null!=m.fontFamily&&null!=m.fontUrl&&(M[encodeURIComponent(m.fontFamily)+"@"+encodeURIComponent(m.fontUrl)]=!0,C(m.fontFamily,m.fontUrl))}q.addSeparator(y);var z={},I={},L=[];for(T=0;T<this.customFonts.length;T++)B(this.customFonts[T]);L.sort(function(N,Q){return N.label<+Q.label?-1:N.label>Q.label?1:0});if(0<L.length){for(T=0;T<L.length;T++)C(L[T].name,L[T].url,!0,L[T].label);q.addSeparator(y)}q.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),y);q.addSeparator(y);q.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var N=this.editorUi.editor.graph,Q=N.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],R="s",V=null;if(N.isEditing()){var W=+N.getSelectedEditingElement();if(null!=W){var X=mxUtils.getCurrentStyle(W);if(null!=X){Q=mxUtils.getCssFontFamily(X.fontFamily);X=N.getView().getState(N.cellEditor.getEditingCell());V=null!=X?X.style.fontSource:null;for(null!=V&&(V=decodeURIComponent(V));null!=W&&W!=N.cellEditor.textarea;){if(W.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=W.getAttribute("data-font-src")){V=W.getAttribute("data-font-src");break}else if(W.getAttribute("face")==Q){V=null;break}W=W.parentNode}null!=V&&(Graph.isGoogleFontUrl(V)?+(V=null,R="g"):R="w")}}}else X=N.getView().getState(N.getSelectionCell()),null!=X&&(Q=X.style[mxConstants.STYLE_FONTFAMILY]||Q,W=X.style.fontSource,null!=W&&(W=decodeURIComponent(W),Graph.isGoogleFontUrl(W)?R="g":(R="w",V=W)));null!=V&&V.substring(0,PROXY_URL.length)==PROXY_URL&&(V=decodeURIComponent(V.substr((PROXY_URL+"?url=").length)));var Z=null;document.activeElement==N.cellEditor.textarea&&(Z=N.cellEditor.saveSelection());Q=new FontDialog(this.editorUi,Q,V,R,mxUtils.bind(this,function(Y,ba,+da){null!=Z&&(N.cellEditor.restoreSelection(Z),Z=null);if(null!=Y&&0<Y.length)if(this.addCustomFont(Y,ba),N.isEditing())N.setFont(Y,ba);else{N.getModel().beginUpdate();try{N.stopEditing(!1),N.setCellStyles(mxConstants.STYLE_FONTFAMILY,Y),N.setCellStyles("fontSource",null!=ba?encodeURIComponent(ba):null),N.setCellStyles("FType",null)}finally{N.getModel().endUpdate()}}}));this.editorUi.showDialog(Q.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);Q.init()}),y,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,e,f){this.ui=b;this.page=e;this.previous=this.name=f}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(b,e,f){this.ui=b;this.oldIndex=e;this.newIndex=f}@@ -14476,18 +14476,18 @@ ReplaceDiagram.prototype.execute=function(){var b=this.ui.editor.graph,e=this.uiEditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var f=0;f<this.pages.length;f++)if(this.pages[f]==b){e=f;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var f=0;f<e.length;f++)if(e[f].getId()==b)return e[f];return null};EditorUi.prototype.createImageForPageLink=function(b,e,f,c){var l=b.indexOf(","),n=null;0<l&&(l=this.getPageById(b.substring(l+1)),null!=l&&l!=e&&(n=this.getImageForPage(l,e,f,c),n.originalSrc=b));null==n&&(n={originalSrc:b});return n};EditorUi.prototype.pageSelected=function(){var b=this.editor.graph,e=this.currentPage;null!=e&&(b.tooltipHandler.hide(),null==e.viewState||null==e.viewState.scrollTop||null==e.viewState.scrollLeft?(b.selectUnlockedLayer(),this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(b.container.scrollleft=0,b.container.scrollTop=0,this.chromelessResize())):b.setScrollbarPositions(e.viewState,b.view.translate.x,b.view.translate.y),this.updateTabContainer(),this.scrollToPage())};-EditorUi.prototype.getImageForPage=function(b,e,f,c){f=null!=f?f:this.editor.graph;var l=f.getGlobalVariable;f=this.createTemporaryGraph(f.getStylesheet());var n=this.getPageIndex(null!=e?e:this.currentPage);f.getGlobalVariable=function(u){return"pagenumber"==u?n+1:"page"==u&&null!=e?e.getName():l.apply(this,arguments)};document.body.appendChild(f.container);this.updatePageRoot(b);f.setAdaptiveColors(b.viewState.adaptiveColors);f.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=+EditorUi.prototype.getImageForPage=function(b,e,f,c){f=null!=f?f:this.editor.graph;var l=f.getGlobalVariable;f=this.createTemporaryGraph(f.getStylesheet());var n=this.getPageIndex(null!=e?e:this.currentPage);f.getGlobalVariable=function(v){return"pagenumber"==v?n+1:"page"==v&&null!=e?e.getName():l.apply(this,arguments)};document.body.appendChild(f.container);this.updatePageRoot(b);f.setAdaptiveColors(b.viewState.adaptiveColors);f.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";c=f.getSvg(null,null,null,null,null,null,null,null,null,null,c,null,null,null,!0,!0);var p=f.getGraphBounds();document.body.removeChild(f.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(c)),p.width,p.height,p.x,p.y)};EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var p=this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";this.tabContainer.style.visibility=0==parseInt(this.tabContainer.style.height)?"hidden":"";p!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,-function(p,u){p=u.getProperty("edit").changes;for(u=0;u<p.length;u++)if(p[u]instanceof RenamePage||p[u]instanceof ChangePage||p[u]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==p.length&&p[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var f=b.sizeDidChange,c=null,l=this;b.sizeDidChange=function(){var p=f.apply(this,arguments);null!=l.currentPage&&c!=l.currentPage&&(c=l.currentPage,l.pageSelected());return p};b.addListener(mxEvent.ROOT,mxUtils.bind(this,-function(){b.checkDefaultParent()}));var n=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",n);this.editor.addListener("pagesPatched",n);this.editor.addListener("pageRenamed",n);this.editor.addListener("pageMoved",n);this.editor.addListener("fileLoaded",n);this.editor.addListener("pageSelected",mxUtils.bind(this,function(p,u){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle();null!=-this.toolbar&&this.toolbar.updateZoom()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(p,u){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}))}};+function(p,v){p=v.getProperty("edit").changes;for(v=0;v<p.length;v++)if(p[v]instanceof RenamePage||p[v]instanceof ChangePage||p[v]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==p.length&&p[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var f=b.sizeDidChange,c=null,l=this;b.sizeDidChange=function(){var p=f.apply(this,arguments);null!=l.currentPage&&c!=l.currentPage&&(c=l.currentPage,l.pageSelected());return p};b.addListener(mxEvent.ROOT,mxUtils.bind(this,+function(){b.checkDefaultParent()}));var n=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",n);this.editor.addListener("pagesPatched",n);this.editor.addListener("pageRenamed",n);this.editor.addListener("pageMoved",n);this.editor.addListener("fileLoaded",n);this.editor.addListener("pageSelected",mxUtils.bind(this,function(p,v){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle();null!=+this.toolbar&&this.toolbar.updateZoom()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(p,v){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}))}};EditorUi.prototype.scrollToPage=function(b,e){var f=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),c=null!=b?b:this.currentPage;null!=f&&null!=this.tabScroller&&this.tabScroller.children.length>f&&null!=this.tabScroller.children[f]&&(c!=this.lastScrollPage||e)&&(this.tabScroller.children[f].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[f].className="geTab gePageTab geActivePage",this.lastScrollPage=c)};EditorUi.prototype.restoreViewState=function(b,e,f){b=null!=b?this.getPageById(b.getId()):null;var c=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(c.setViewState(e),this.editor.updateGraphComponents(),c.view.revalidate(),c.sizeDidChange()),c.container.scrollLeft=c.view.translate.x*c.view.scale+e.scrollLeft,c.container.scrollTop=c.view.translate.y*c.view.scale+e.scrollTop,c.restoreSelection(f))};-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),f=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),l=parseFloat(b.getAttribute("pageHeight")),n=b.getAttribute("background"),p=this.parseBackgroundImage(b.getAttribute("backgroundImage")),u=b.getAttribute("extFonts");if(u)try{u=u.split("|").map(function(F){F=F.split("^");return{name:F[0],url:F[1]}})}catch(F){console.log("ExtFonts format error: "+F.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),f=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),l=parseFloat(b.getAttribute("pageHeight")),n=b.getAttribute("background"),p=this.parseBackgroundImage(b.getAttribute("backgroundImage")),v=b.getAttribute("extFonts");if(v)try{v=v.split("|").map(function(F){F=F.split("^");return{name:F[0],url:F[1]}})}catch(F){console.log("ExtFonts format error: "+F.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=n&&0<n.length?n:null,backgroundImage:p,pageScale:isNaN(f)?mxGraph.prototype.pageScale:f,pageFormat:isNaN(c)||isNaN(l)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:-mxSettings.getPageFormat():new mxRectangle(0,0,c,l),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:u||[]}};+mxSettings.getPageFormat():new mxRectangle(0,0,c,l),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:v||[]}};Graph.prototype.saveViewState=function(b,e,f,c){f||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);f=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=f&&(e.setAttribute("pageWidth",f.width),e.setAttribute("pageHeight",f.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),c=this.getBackgroundImageObject(b.backgroundImage,c),null!=c&&e.setAttribute("backgroundImage",JSON.stringify(c)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?e.removeAttribute("adaptiveColors"):e.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(l){return l.name+"^"+l.url}).join("|"))};@@ -14508,7 +14508,7 @@ EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&nuEditorUi.prototype.insertPage=function(b,e,f){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId(),f),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};EditorUi.prototype.createPage=function(b,e,f){e=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e,f);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var f=this.pages[e].getName();null!=f&&0<f.length&&(b[f]=f)}e=this.pages.length;do f=mxResources.get("pageWithNumber",[++e]);while(null!=b[f]);return f};EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,f=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=f){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var c=this.currentPage;c==b&&1<this.pages.length?(f==this.pages.length-1?f--:f++,c=this.pages[f]):1>=this.pages.length&&(c=this.insertPage(),e.model.execute(new RenamePage(this,c,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,c))}finally{e.model.endUpdate()}}}catch(l){this.handleError(l)}return b};-EditorUi.prototype.duplicatePage=function(b,e){var f=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var l=b.node.cloneNode(!1);l.removeAttribute("id");var n={},p=c.createCellLookup([c.model.root]);f=new DiagramPage(l);f.root=c.cloneCell(c.model.root,null,n);var u=new mxGraphModel;u.prefix=Editor.guid()+"-";u.setRoot(f.root);c.updateCustomLinks(c.createCellMapping(n,p),[f.root]);f.viewState=b==this.currentPage?c.getViewState():b.viewState;this.initDiagramNode(f);+EditorUi.prototype.duplicatePage=function(b,e){var f=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var l=b.node.cloneNode(!1);l.removeAttribute("id");var n={},p=c.createCellLookup([c.model.root]);f=new DiagramPage(l);f.root=c.cloneCell(c.model.root,null,n);var v=new mxGraphModel;v.prefix=Editor.guid()+"-";v.setRoot(f.root);c.updateCustomLinks(c.createCellMapping(n,p),[f.root]);f.viewState=b==this.currentPage?c.getViewState():b.viewState;this.initDiagramNode(f);f.viewState.scale=1;delete f.viewState.scrollLeft;delete f.viewState.scrollTop;delete f.viewState.currentRoot;delete f.viewState.defaultParent;f.setName(e);f=this.insertPage(f,mxUtils.indexOf(this.pages,b)+1)}}catch(F){this.handleError(F)}return f};EditorUi.prototype.initDiagramNode=function(b,e){null==e&&(e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,e);EditorUi.removeChildNodes(b.node);b.node.appendChild(e)};EditorUi.prototype.clonePages=function(b){for(var e=[],f=[],c=0;c<b.length;c++)try{f.push(this.clonePage(b[c]))}catch(l){e.push(mxResources.get("pageWithNumber",[c+1])+": "+l.toString())}if(0<e.length){b=Error(e.join("\n"));try{0<f.length&&(b.fallbackFileData=this.getXmlForPages(f))}catch(l){}throw b;}return f};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),f=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(f,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);e.diagramModified=b.diagramModified;return e};@@ -14528,154 +14528,154 @@ EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.verticalDotsImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(mxUtils.bind(this,function(l,n){this.menus.get("pages").funct(l,n)}));e.div.className+=" geMenubarMenu";e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);e.destroy()});var f=mxEvent.getClientX(b),c=mxEvent.getClientY(b);e.popup(f,c,null,b);this.setCurrentMenu(e);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,e){var f=this.createTab(),c=b.getName()||mxResources.get("untitled"),l=b.getId();f.setAttribute("title",c+(null!=l?" ("+l+")":"")+" ["+e+"]");e=document.createElement("span");e.style.maxWidth="160px";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,c);f.appendChild(e);this.addTabListeners(b,f);return f};EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var f=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(F){this.renamePage(b);mxEvent.consume(F)}));var c=document.createElement("div");c.className="geTabMenuButton";c.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";c.style.backgroundPosition="center center";c.style.backgroundRepeat="no-repeat";c.style.backgroundSize="10px";e.appendChild(c);var l=!1,n=!1,p=mxUtils.bind(this,-function(F){l=null!=this.currentMenu;n=b==this.currentPage;this.scrollToPage(b);f.isMouseDown||n||this.selectPage(b)}),u=mxUtils.bind(this,function(F){if(f.isEnabled()&&!f.isMouseDown&&(n&&(mxEvent.isTouchEvent(F)||mxEvent.getSource(F)==c)||mxEvent.isPopupTrigger(F))&&(f.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(F)||!l)){var H=new mxPopupMenu(this.createPageMenu(b));H.div.className+=" geMenubarMenu";H.smartSeparators=!0;H.showDisabled=!0;H.autoExpand=!0;H.hideMenu=mxUtils.bind(this,-function(){mxPopupMenu.prototype.hideMenu.apply(H,arguments);this.resetCurrentMenu();H.destroy()});var E=mxEvent.getClientX(F),K=mxEvent.getClientY(F);H.popup(E,K,null,F);this.setCurrentMenu(H,e)}mxEvent.consume(F)});mxEvent.addGestureListeners(c,p,null,u);mxEvent.addGestureListeners(e,p,null,u)};+function(F){l=null!=this.currentMenu;n=b==this.currentPage;this.scrollToPage(b);f.isMouseDown||n||this.selectPage(b)}),v=mxUtils.bind(this,function(F){if(f.isEnabled()&&!f.isMouseDown&&(n&&(mxEvent.isTouchEvent(F)||mxEvent.getSource(F)==c)||mxEvent.isPopupTrigger(F))&&(f.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(F)||!l)){var H=new mxPopupMenu(this.createPageMenu(b));H.div.className+=" geMenubarMenu";H.smartSeparators=!0;H.showDisabled=!0;H.autoExpand=!0;H.hideMenu=mxUtils.bind(this,+function(){mxPopupMenu.prototype.hideMenu.apply(H,arguments);this.resetCurrentMenu();H.destroy()});var E=mxEvent.getClientX(F),K=mxEvent.getClientY(F);H.popup(E,K,null,F);this.setCurrentMenu(H,e)}mxEvent.consume(F)});mxEvent.addGestureListeners(c,p,null,v);mxEvent.addGestureListeners(e,p,null,v)};EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(f,c){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||f.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),c));f.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),c);f.addSeparator(c);this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",f,c,mxResources.get("move"));f.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),c);f.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,e)}),c)})};(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){e=c.oldIndex;c.oldIndex=c.newIndex;c.newIndex=e;return c};mxCodecRegistry.register(b)})();(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){e=c.previous;c.previous=c.name;c.name=e;return c};mxCodecRegistry.register(b)})();(function(){var b=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","page","previousPage"]);b.afterEncode=function(e,f,c){c.setAttribute("relatedPage",f.relatedPage.getId());null==f.index&&(c.setAttribute("name",f.relatedPage.getName()),null!=f.relatedPage.viewState&&c.setAttribute("viewState",JSON.stringify(f.relatedPage.viewState,function(l,n){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,l)?n:void 0})),null!=f.relatedPage.root&&e.encodeCell(f.relatedPage.root,c));return c};b.beforeDecode=function(e,f,c){c.ui=e.ui;c.relatedPage=c.ui.getPageById(f.getAttribute("relatedPage"));if(null==c.relatedPage){var l=f.ownerDocument.createElement("diagram");l.setAttribute("id",f.getAttribute("relatedPage"));l.setAttribute("name",f.getAttribute("name"));c.relatedPage=new DiagramPage(l);l=f.getAttribute("viewState");null!=l&&(c.relatedPage.viewState=JSON.parse(l),f.removeAttribute("viewState"));f=f.cloneNode(!0);l=f.firstChild;if(null!=l)for(c.relatedPage.root=e.decodeCell(l,!1),c=-l.nextSibling,l.parentNode.removeChild(l),l=c;null!=l;){c=l.nextSibling;if(l.nodeType==mxConstants.NODETYPE_ELEMENT){var n=l.getAttribute("id");null==e.lookup(n)&&e.decodeCell(l)}l.parentNode.removeChild(l);l=c}}return f};b.afterDecode=function(e,f,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,l,n,p,u){l=null!=l?l:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var F=n.slice(),H=0;H<n.length;H++)"1"==mxUtils.getValue(this.getCurrentCellStyle(n[H]),"treeFolding","0")&&this.foldTreeCell(c,n[H]);n=F;n=b.apply(this,arguments)}finally{this.model.endUpdate()}return n};Graph.prototype.foldTreeCell=function(c,l){this.model.beginUpdate();try{var n=-[];this.traverse(l,!0,mxUtils.bind(this,function(u,F){var H=null!=F&&this.isTreeEdge(F);H&&n.push(F);u==l||null!=F&&!H||n.push(u);return(null==F||H)&&(u==l||!this.model.isCollapsed(u))}));this.model.setCollapsed(l,c);for(var p=0;p<n.length;p++)this.model.setVisible(n[p],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,l,n,p,u,F){return this.model.filterCells(this.getEdges(c,l,n,p,u,F),mxUtils.bind(this,-function(H){return this.isTreeEdge(H)}))};Graph.prototype.getIncomingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(C){return v.isVertex(C)&&n(C)}function l(C){var M=!1;null!=C&&(M="1"==-k.getCurrentCellStyle(C).treeMoving);return M}function n(C){var M=!1;null!=C&&(C=v.getParent(C),M=k.view.getState(C),M="tree"==(null!=M?M.style:k.getCellStyle(C)).containerType);return M}function p(C){var M=!1;null!=C&&(C=v.getParent(C),M=k.view.getState(C),k.view.getState(C),M=null!=(null!=M?M.style:k.getCellStyle(C)).childLayout);return M}function u(C){C=k.view.getState(C);if(null!=C){var M=k.getIncomingTreeEdges(C.cell);if(0<M.length&&(M=k.view.getState(M[0]),null!=M&&(M=M.absolutePoints,null!=+l.nextSibling,l.parentNode.removeChild(l),l=c;null!=l;){c=l.nextSibling;if(l.nodeType==mxConstants.NODETYPE_ELEMENT){var n=l.getAttribute("id");null==e.lookup(n)&&e.decodeCell(l)}l.parentNode.removeChild(l);l=c}}return f};b.afterDecode=function(e,f,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,l,n,p,v){l=null!=l?l:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var F=n.slice(),H=0;H<n.length;H++)"1"==mxUtils.getValue(this.getCurrentCellStyle(n[H]),"treeFolding","0")&&this.foldTreeCell(c,n[H]);n=F;n=b.apply(this,arguments)}finally{this.model.endUpdate()}return n};Graph.prototype.foldTreeCell=function(c,l){this.model.beginUpdate();try{var n=+[];this.traverse(l,!0,mxUtils.bind(this,function(v,F){var H=null!=F&&this.isTreeEdge(F);H&&n.push(F);v==l||null!=F&&!H||n.push(v);return(null==F||H)&&(v==l||!this.model.isCollapsed(v))}));this.model.setCollapsed(l,c);for(var p=0;p<n.length;p++)this.model.setVisible(n[p],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,l,n,p,v,F){return this.model.filterCells(this.getEdges(c,l,n,p,v,F),mxUtils.bind(this,+function(H){return this.isTreeEdge(H)}))};Graph.prototype.getIncomingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(C){return u.isVertex(C)&&n(C)}function l(C){var M=!1;null!=C&&(M="1"==+k.getCurrentCellStyle(C).treeMoving);return M}function n(C){var M=!1;null!=C&&(C=u.getParent(C),M=k.view.getState(C),M="tree"==(null!=M?M.style:k.getCellStyle(C)).containerType);return M}function p(C){var M=!1;null!=C&&(C=u.getParent(C),M=k.view.getState(C),k.view.getState(C),M=null!=(null!=M?M.style:k.getCellStyle(C)).childLayout);return M}function v(C){C=k.view.getState(C);if(null!=C){var M=k.getIncomingTreeEdges(C.cell);if(0<M.length&&(M=k.view.getState(M[0]),null!=M&&(M=M.absolutePoints,null!=M&&0<M.length&&(M=M[M.length-1],null!=M)))){if(M.y==C.y&&Math.abs(M.x-C.getCenterX())<C.width/2)return mxConstants.DIRECTION_SOUTH;if(M.y==C.y+C.height&&Math.abs(M.x-C.getCenterX())<C.width/2)return mxConstants.DIRECTION_NORTH;if(M.x>C.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function F(C,M){M=null!=M?M:!0;k.model.beginUpdate();try{var T=k.model.getParent(C),m=k.getIncomingTreeEdges(C),z=k.cloneCells([m[0],C]);k.model.setTerminal(z[0],k.model.getTerminal(m[0],-!0),!0);var I=u(C),L=T.geometry;I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?z[1].geometry.x+=M?C.geometry.width+10:-z[1].geometry.width-10:z[1].geometry.y+=M?C.geometry.height+10:-z[1].geometry.height-10;k.view.currentRoot!=T&&(z[1].geometry.x-=L.x,z[1].geometry.y-=L.y);var N=k.view.getState(C),O=k.view.scale;if(null!=N){var S=mxRectangle.fromRectangle(N);I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?S.x+=(M?C.geometry.width+10:-z[1].geometry.width-10)*O:S.y+=(M?-C.geometry.height+10:-z[1].geometry.height-10)*O;var U=k.getOutgoingTreeEdges(k.model.getTerminal(m[0],!0));if(null!=U){for(var W=I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH,X=L=m=0;X<U.length;X++){var Z=k.model.getTerminal(U[X],!1);if(I==u(Z)){var Y=k.view.getState(Z);Z!=C&&null!=Y&&(W&&M!=Y.getCenterX()<N.getCenterX()||!W&&M!=Y.getCenterY()<N.getCenterY())&&mxUtils.intersects(S,Y)&&(m=10+Math.max(m,(Math.min(S.x+S.width,Y.x+Y.width)-Math.max(S.x,Y.x))/O),L=10+Math.max(L,(Math.min(S.y+-S.height,Y.y+Y.height)-Math.max(S.y,Y.y))/O))}}W?L=0:m=0;for(X=0;X<U.length;X++)if(Z=k.model.getTerminal(U[X],!1),I==u(Z)&&(Y=k.view.getState(Z),Z!=C&&null!=Y&&(W&&M!=Y.getCenterX()<N.getCenterX()||!W&&M!=Y.getCenterY()<N.getCenterY()))){var ba=[];k.traverse(Y.cell,!0,function(ea,ca){var fa=null!=ca&&k.isTreeEdge(ca);fa&&ba.push(ca);(null==ca||fa)&&ba.push(ea);return null==ca||fa});k.moveCells(ba,(M?1:-1)*m,(M?1:-1)*L)}}}return k.addCells(z,T)}finally{k.model.endUpdate()}}function H(C){k.model.beginUpdate();-try{var M=u(C),T=k.getIncomingTreeEdges(C),m=k.cloneCells([T[0],C]);k.model.setTerminal(T[0],m[1],!1);k.model.setTerminal(m[0],m[1],!0);k.model.setTerminal(m[0],C,!1);var z=k.model.getParent(C),I=z.geometry,L=[];k.view.currentRoot!=z&&(m[1].geometry.x-=I.x,m[1].geometry.y-=I.y);k.traverse(C,!0,function(S,U){var W=null!=U&&k.isTreeEdge(U);W&&L.push(U);(null==U||W)&&L.push(S);return null==U||W});var N=C.geometry.width+40,O=C.geometry.height+40;M==mxConstants.DIRECTION_SOUTH?N=0:M==mxConstants.DIRECTION_NORTH?-(N=0,O=-O):M==mxConstants.DIRECTION_WEST?(N=-N,O=0):M==mxConstants.DIRECTION_EAST&&(O=0);k.moveCells(L,N,O);return k.addCells(m,z)}finally{k.model.endUpdate()}}function E(C,M){k.model.beginUpdate();try{var T=k.model.getParent(C),m=k.getIncomingTreeEdges(C),z=u(C);0==m.length&&(m=[k.createEdge(T,null,"",null,null,k.createCurrentEdgeStyle())],z=M);var I=k.cloneCells([m[0],C]);k.model.setTerminal(I[0],C,!0);null==k.model.getTerminal(I[0],!1)&&(k.model.setTerminal(I[0],I[1],!1),k.applyNewEdgeStyle(I[1],-[I[0]],z));m=k.getOutgoingTreeEdges(C);var L=T.geometry;M=[];k.view.currentRoot==T&&(L=new mxRectangle);for(var N=0;N<m.length;N++){var O=k.model.getTerminal(m[N],!1);null!=O&&M.push(O)}var S=k.view.getBounds(M),U=k.view.translate,W=k.view.scale;z==mxConstants.DIRECTION_SOUTH?(I[1].geometry.x=null==S?C.geometry.x+(C.geometry.width-I[1].geometry.width)/2:(S.x+S.width)/W-U.x-L.x+10,I[1].geometry.y+=I[1].geometry.height-L.y+40):z==mxConstants.DIRECTION_NORTH?(I[1].geometry.x=null==S?C.geometry.x+(C.geometry.width--I[1].geometry.width)/2:(S.x+S.width)/W-U.x+-L.x+10,I[1].geometry.y-=I[1].geometry.height+L.y+40):(I[1].geometry.x=z==mxConstants.DIRECTION_WEST?I[1].geometry.x-(I[1].geometry.width+L.x+40):I[1].geometry.x+(I[1].geometry.width-L.x+40),I[1].geometry.y=null==S?C.geometry.y+(C.geometry.height-I[1].geometry.height)/2:(S.y+S.height)/W-U.y+-L.y+10);return k.addCells(I,T)}finally{k.model.endUpdate()}}function K(C,M,T){C=k.getOutgoingTreeEdges(C);T=k.view.getState(T);var m=[];if(null!=T&&null!=C){for(var z=-0;z<C.length;z++){var I=k.view.getState(k.model.getTerminal(C[z],!1));null!=I&&(!M&&Math.min(I.x+I.width,T.x+T.width)>=Math.max(I.x,T.x)||M&&Math.min(I.y+I.height,T.y+T.height)>=Math.max(I.y,T.y))&&m.push(I)}m.sort(function(L,N){return M?L.x+L.width-N.x-N.width:L.y+L.height-N.y-N.height})}return m}function d(C,M){var T=u(C),m=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==m&&T!=M?g.actions.get("selectParent").funct():T==-M?(M=k.getOutgoingTreeEdges(C),null!=M&&0<M.length&&k.setSelectionCell(k.model.getTerminal(M[0],!1))):(T=k.getIncomingTreeEdges(C),null!=T&&0<T.length&&(m=K(k.model.getTerminal(T[0],!0),m,C),C=k.view.getState(C),null!=C&&(C=mxUtils.indexOf(m,C),0<=C&&(C+=M==mxConstants.DIRECTION_NORTH||M==mxConstants.DIRECTION_WEST?-1:1,0<=C&&C<=m.length-1&&k.setSelectionCell(m[C].cell)))))}var g=this,k=g.editor.graph,v=k.getModel(),t=g.menus.createPopupMenu;g.menus.createPopupMenu=function(C,M,T){t.apply(this,arguments);+!0),!0);var I=v(C),L=T.geometry;I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?z[1].geometry.x+=M?C.geometry.width+10:-z[1].geometry.width-10:z[1].geometry.y+=M?C.geometry.height+10:-z[1].geometry.height-10;k.view.currentRoot!=T&&(z[1].geometry.x-=L.x,z[1].geometry.y-=L.y);var N=k.view.getState(C),Q=k.view.scale;if(null!=N){var R=mxRectangle.fromRectangle(N);I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?R.x+=(M?C.geometry.width+10:-z[1].geometry.width-10)*Q:R.y+=(M?+C.geometry.height+10:-z[1].geometry.height-10)*Q;var V=k.getOutgoingTreeEdges(k.model.getTerminal(m[0],!0));if(null!=V){for(var W=I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH,X=L=m=0;X<V.length;X++){var Z=k.model.getTerminal(V[X],!1);if(I==v(Z)){var Y=k.view.getState(Z);Z!=C&&null!=Y&&(W&&M!=Y.getCenterX()<N.getCenterX()||!W&&M!=Y.getCenterY()<N.getCenterY())&&mxUtils.intersects(R,Y)&&(m=10+Math.max(m,(Math.min(R.x+R.width,Y.x+Y.width)-Math.max(R.x,Y.x))/Q),L=10+Math.max(L,(Math.min(R.y++R.height,Y.y+Y.height)-Math.max(R.y,Y.y))/Q))}}W?L=0:m=0;for(X=0;X<V.length;X++)if(Z=k.model.getTerminal(V[X],!1),I==v(Z)&&(Y=k.view.getState(Z),Z!=C&&null!=Y&&(W&&M!=Y.getCenterX()<N.getCenterX()||!W&&M!=Y.getCenterY()<N.getCenterY()))){var ba=[];k.traverse(Y.cell,!0,function(da,ca){var ea=null!=ca&&k.isTreeEdge(ca);ea&&ba.push(ca);(null==ca||ea)&&ba.push(da);return null==ca||ea});k.moveCells(ba,(M?1:-1)*m,(M?1:-1)*L)}}}return k.addCells(z,T)}finally{k.model.endUpdate()}}function H(C){k.model.beginUpdate();+try{var M=v(C),T=k.getIncomingTreeEdges(C),m=k.cloneCells([T[0],C]);k.model.setTerminal(T[0],m[1],!1);k.model.setTerminal(m[0],m[1],!0);k.model.setTerminal(m[0],C,!1);var z=k.model.getParent(C),I=z.geometry,L=[];k.view.currentRoot!=z&&(m[1].geometry.x-=I.x,m[1].geometry.y-=I.y);k.traverse(C,!0,function(R,V){var W=null!=V&&k.isTreeEdge(V);W&&L.push(V);(null==V||W)&&L.push(R);return null==V||W});var N=C.geometry.width+40,Q=C.geometry.height+40;M==mxConstants.DIRECTION_SOUTH?N=0:M==mxConstants.DIRECTION_NORTH?+(N=0,Q=-Q):M==mxConstants.DIRECTION_WEST?(N=-N,Q=0):M==mxConstants.DIRECTION_EAST&&(Q=0);k.moveCells(L,N,Q);return k.addCells(m,z)}finally{k.model.endUpdate()}}function E(C,M){k.model.beginUpdate();try{var T=k.model.getParent(C),m=k.getIncomingTreeEdges(C),z=v(C);0==m.length&&(m=[k.createEdge(T,null,"",null,null,k.createCurrentEdgeStyle())],z=M);var I=k.cloneCells([m[0],C]);k.model.setTerminal(I[0],C,!0);null==k.model.getTerminal(I[0],!1)&&(k.model.setTerminal(I[0],I[1],!1),k.applyNewEdgeStyle(I[1],+[I[0]],z));m=k.getOutgoingTreeEdges(C);var L=T.geometry;M=[];k.view.currentRoot==T&&(L=new mxRectangle);for(var N=0;N<m.length;N++){var Q=k.model.getTerminal(m[N],!1);null!=Q&&M.push(Q)}var R=k.view.getBounds(M),V=k.view.translate,W=k.view.scale;z==mxConstants.DIRECTION_SOUTH?(I[1].geometry.x=null==R?C.geometry.x+(C.geometry.width-I[1].geometry.width)/2:(R.x+R.width)/W-V.x-L.x+10,I[1].geometry.y+=I[1].geometry.height-L.y+40):z==mxConstants.DIRECTION_NORTH?(I[1].geometry.x=null==R?C.geometry.x+(C.geometry.width-+I[1].geometry.width)/2:(R.x+R.width)/W-V.x+-L.x+10,I[1].geometry.y-=I[1].geometry.height+L.y+40):(I[1].geometry.x=z==mxConstants.DIRECTION_WEST?I[1].geometry.x-(I[1].geometry.width+L.x+40):I[1].geometry.x+(I[1].geometry.width-L.x+40),I[1].geometry.y=null==R?C.geometry.y+(C.geometry.height-I[1].geometry.height)/2:(R.y+R.height)/W-V.y+-L.y+10);return k.addCells(I,T)}finally{k.model.endUpdate()}}function K(C,M,T){C=k.getOutgoingTreeEdges(C);T=k.view.getState(T);var m=[];if(null!=T&&null!=C){for(var z=+0;z<C.length;z++){var I=k.view.getState(k.model.getTerminal(C[z],!1));null!=I&&(!M&&Math.min(I.x+I.width,T.x+T.width)>=Math.max(I.x,T.x)||M&&Math.min(I.y+I.height,T.y+T.height)>=Math.max(I.y,T.y))&&m.push(I)}m.sort(function(L,N){return M?L.x+L.width-N.x-N.width:L.y+L.height-N.y-N.height})}return m}function d(C,M){var T=v(C),m=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==m&&T!=M?g.actions.get("selectParent").funct():T==+M?(M=k.getOutgoingTreeEdges(C),null!=M&&0<M.length&&k.setSelectionCell(k.model.getTerminal(M[0],!1))):(T=k.getIncomingTreeEdges(C),null!=T&&0<T.length&&(m=K(k.model.getTerminal(T[0],!0),m,C),C=k.view.getState(C),null!=C&&(C=mxUtils.indexOf(m,C),0<=C&&(C+=M==mxConstants.DIRECTION_NORTH||M==mxConstants.DIRECTION_WEST?-1:1,0<=C&&C<=m.length-1&&k.setSelectionCell(m[C].cell)))))}var g=this,k=g.editor.graph,u=k.getModel(),t=g.menus.createPopupMenu;g.menus.createPopupMenu=function(C,M,T){t.apply(this,arguments);if(1==k.getSelectionCount()){M=k.getSelectionCell();var m=k.getOutgoingTreeEdges(M);C.addSeparator();0<m.length&&(c(k.getSelectionCell())&&this.addMenuItems(C,["selectChildren"],null,T),this.addMenuItems(C,["selectDescendants"],null,T));c(k.getSelectionCell())?(C.addSeparator(),0<k.getIncomingTreeEdges(M).length&&this.addMenuItems(C,["selectSiblings","selectParent"],null,T)):0<k.model.getEdgeCount(M)&&this.addMenuItems(C,["selectConnections"],null,T)}};g.actions.addAction("selectChildren",function(C){if(k.isEnabled()&&1==k.getSelectionCount()){var M=k.getSelectionCell();C=mxEvent.isControlDown(C)?null:k.getOutgoingTreeEdges(M);if(null!=C&&0<C.length){M=[];for(var T=0;T<C.length;T++)M.push(k.model.getTerminal(C[T],!1));k.setSelectionCells(M)}else k.setSelectionCells(k.model.getChildren(M))}},null,null,"Alt+Shift+C");g.actions.addAction("selectDescendants",function(C){var M=k.getSelectionCell();if(k.isEnabled()&&null!=M){var T=[];mxEvent.isControlDown(C)||k.traverse(M,!0,function(m,z){var I=null!=z&&k.isTreeEdge(z);I&&mxEvent.isControlDown(C)&&T.push(z);(null==z||I)&&T.push(m);return null==z||I});if(0==T.length||1==T.length&&T[0]==M)T=k.model.getDescendants(M);k.setSelectionCells(T)}},null,null,"Alt+Shift+X");g.actions.addAction("selectParent",function(C){var M=k.getSelectionCell();k.isEnabled()&&null!=M&&(C=mxEvent.isControlDown(C)?null:k.getIncomingTreeEdges(M),null!=C&&0<C.length?k.setSelectionCell(k.model.getTerminal(C[0],!0)):k.selectParentCell())},null,null,"Alt+Shift+P");g.actions.addAction("selectSiblings",function(C){if(k.isEnabled()&&1==k.getSelectionCount()){var M=k.getSelectionCell(),T=mxEvent.isControlDown(C)?null:k.getIncomingTreeEdges(M);C=[];if(null!=T&&0<T.length&&(T=k.getOutgoingTreeEdges(k.model.getTerminal(T[0],!0)),null!=T))for(var m=0;m<T.length;m++)C.push(k.model.getTerminal(T[m],!1));0==C.length&&(C=k.model.getChildren(k.model.getParent(M)));k.setSelectionCells(C)}},null,null,"Alt+Shift+S");var x=k.removeCells;k.removeCells=function(C,M){M=null!=M?M:!0;null==C&&(C=this.getDeletableCells(this.getSelectionCells()));-M&&(C=this.getDeletableCells(this.addAllEdges(C)));for(var T=[],m=0;m<C.length;m++){var z=C[m];v.isEdge(z)&&n(z)&&(T.push(z),z=v.getTerminal(z,!1));if(c(z)){var I=[];k.traverse(z,!0,function(L,N){var O=null!=N&&k.isTreeEdge(N);O&&I.push(N);(null==N||O)&&I.push(L);return null==N||O});0<I.length&&(T=T.concat(I),z=k.getIncomingTreeEdges(C[m]),C=C.concat(z))}else null!=z&&T.push(C[m])}C=T;return x.apply(this,arguments)};g.hoverIcons.getStateAt=function(C,M,T){return c(C.cell)?null:this.graph.view.getState(this.graph.getCellAt(M,-T))};var A=k.duplicateCells;k.duplicateCells=function(C,M){C=null!=C?C:this.getSelectionCells();for(var T=C.slice(0),m=0;m<T.length;m++){var z=k.view.getState(T[m]);if(null!=z&&c(z.cell)){var I=k.getIncomingTreeEdges(z.cell);for(z=0;z<I.length;z++)mxUtils.remove(I[z],C)}}this.model.beginUpdate();try{var L=A.call(this,C,M);if(L.length==C.length)for(m=0;m<C.length;m++)if(c(C[m])){var N=k.getIncomingTreeEdges(L[m]);I=k.getIncomingTreeEdges(C[m]);if(0==N.length&&0<I.length){var O=this.cloneCell(I[0]);-this.addEdge(O,k.getDefaultParent(),this.model.getTerminal(I[0],!0),L[m])}}}finally{this.model.endUpdate()}return L};var J=k.moveCells;k.moveCells=function(C,M,T,m,z,I,L){for(var N=null,O=[],S=0;S<C.length;S++)(l(C[S])||c(C[S]))&&!p(C[S])&&this.isCellCollapsed(C[S])?O=O.concat(this.getSubtree(C[S])):O.push(C[S]);C=mxUtils.removeDuplicates(O);this.model.beginUpdate();try{O=z;var U=this.getCurrentCellStyle(z);if(null!=C&&c(z)&&"1"==mxUtils.getValue(U,"treeFolding","0")){for(S=0;S<C.length;S++)if(c(C[S])||-k.model.isEdge(C[S])&&null==k.model.getTerminal(C[S],!0)){z=k.model.getParent(C[S]);break}if(null!=O&&z!=O&&null!=this.view.getState(C[0])){var W=k.getIncomingTreeEdges(C[0]);if(0<W.length){var X=k.view.getState(k.model.getTerminal(W[0],!0));if(null!=X){var Z=k.view.getState(O);null!=Z&&(M=(Z.getCenterX()-X.getCenterX())/k.view.scale,T=(Z.getCenterY()-X.getCenterY())/k.view.scale)}}}}N=J.apply(this,arguments);if(null!=N&&null!=C&&N.length==C.length)for(S=0;S<N.length;S++)if(this.model.isEdge(N[S]))c(O)&&-0>mxUtils.indexOf(N,this.model.getTerminal(N[S],!0))&&this.model.setTerminal(N[S],O,!0);else if(c(C[S])&&(W=k.getIncomingTreeEdges(C[S]),0<W.length))if(!m)c(O)&&0>mxUtils.indexOf(C,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],O,!0);else if(0==k.getIncomingTreeEdges(N[S]).length){U=O;if(null==U||U==k.model.getParent(C[S]))U=k.model.getTerminal(W[0],!0);m=this.cloneCell(W[0]);this.addEdge(m,k.getDefaultParent(),U,N[S])}}finally{this.model.endUpdate()}return N};if(null!=g.sidebar){var D=+M&&(C=this.getDeletableCells(this.addAllEdges(C)));for(var T=[],m=0;m<C.length;m++){var z=C[m];u.isEdge(z)&&n(z)&&(T.push(z),z=u.getTerminal(z,!1));if(c(z)){var I=[];k.traverse(z,!0,function(L,N){var Q=null!=N&&k.isTreeEdge(N);Q&&I.push(N);(null==N||Q)&&I.push(L);return null==N||Q});0<I.length&&(T=T.concat(I),z=k.getIncomingTreeEdges(C[m]),C=C.concat(z))}else null!=z&&T.push(C[m])}C=T;return x.apply(this,arguments)};g.hoverIcons.getStateAt=function(C,M,T){return c(C.cell)?null:this.graph.view.getState(this.graph.getCellAt(M,+T))};var A=k.duplicateCells;k.duplicateCells=function(C,M){C=null!=C?C:this.getSelectionCells();for(var T=C.slice(0),m=0;m<T.length;m++){var z=k.view.getState(T[m]);if(null!=z&&c(z.cell)){var I=k.getIncomingTreeEdges(z.cell);for(z=0;z<I.length;z++)mxUtils.remove(I[z],C)}}this.model.beginUpdate();try{var L=A.call(this,C,M);if(L.length==C.length)for(m=0;m<C.length;m++)if(c(C[m])){var N=k.getIncomingTreeEdges(L[m]);I=k.getIncomingTreeEdges(C[m]);if(0==N.length&&0<I.length){var Q=this.cloneCell(I[0]);+this.addEdge(Q,k.getDefaultParent(),this.model.getTerminal(I[0],!0),L[m])}}}finally{this.model.endUpdate()}return L};var J=k.moveCells;k.moveCells=function(C,M,T,m,z,I,L){for(var N=null,Q=[],R=0;R<C.length;R++)(l(C[R])||c(C[R]))&&!p(C[R])&&this.isCellCollapsed(C[R])?Q=Q.concat(this.getSubtree(C[R])):Q.push(C[R]);C=mxUtils.removeDuplicates(Q);this.model.beginUpdate();try{Q=z;var V=this.getCurrentCellStyle(z);if(null!=C&&c(z)&&"1"==mxUtils.getValue(V,"treeFolding","0")){for(R=0;R<C.length;R++)if(c(C[R])||+k.model.isEdge(C[R])&&null==k.model.getTerminal(C[R],!0)){z=k.model.getParent(C[R]);break}if(null!=Q&&z!=Q&&null!=this.view.getState(C[0])){var W=k.getIncomingTreeEdges(C[0]);if(0<W.length){var X=k.view.getState(k.model.getTerminal(W[0],!0));if(null!=X){var Z=k.view.getState(Q);null!=Z&&(M=(Z.getCenterX()-X.getCenterX())/k.view.scale,T=(Z.getCenterY()-X.getCenterY())/k.view.scale)}}}}N=J.apply(this,arguments);if(null!=N&&null!=C&&N.length==C.length)for(R=0;R<N.length;R++)if(this.model.isEdge(N[R]))c(Q)&&+0>mxUtils.indexOf(N,this.model.getTerminal(N[R],!0))&&this.model.setTerminal(N[R],Q,!0);else if(c(C[R])&&(W=k.getIncomingTreeEdges(C[R]),0<W.length))if(!m)c(Q)&&0>mxUtils.indexOf(C,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],Q,!0);else if(0==k.getIncomingTreeEdges(N[R]).length){V=Q;if(null==V||V==k.model.getParent(C[R]))V=k.model.getTerminal(W[0],!0);m=this.cloneCell(W[0]);this.addEdge(m,k.getDefaultParent(),V,N[R])}}finally{this.model.endUpdate()}return N};if(null!=g.sidebar){var D=g.sidebar.dropAndConnect;g.sidebar.dropAndConnect=function(C,M,T,m){var z=k.model,I=null;z.beginUpdate();try{if(I=D.apply(this,arguments),c(C))for(var L=0;L<I.length;L++)if(z.isEdge(I[L])&&null==z.getTerminal(I[L],!0)){z.setTerminal(I[L],C,!0);var N=k.getCellGeometry(I[L]);N.points=null;null!=N.getTerminalPoint(!0)&&N.setTerminalPoint(null,!0)}}finally{z.endUpdate()}return I}}var G={67:g.actions.get("selectChildren"),88:g.actions.get("selectDescendants"),80:g.actions.get("selectParent"),83:g.actions.get("selectSiblings")},-R={67:g.actions.get("copyStyle"),86:g.actions.get("pasteStyle")},V=g.onKeyDown;g.onKeyDown=function(C){try{var M=k.getSelectionCell();if(k.isEnabled()&&!k.isEditing()&&null!=M){var T=mxEvent.isAltDown(C)&&mxEvent.isShiftDown(C)?G[C.keyCode]:mxEvent.isAltDown(C)?R[C.keyCode]:null;null!=T?(T.funct(C),mxEvent.consume(C)):c(M)&&(T=null,0<k.getIncomingTreeEdges(M).length&&(9==C.which?T=mxEvent.isShiftDown(C)?H(M):E(M):13==C.which&&(T=F(M,!mxEvent.isShiftDown(C)))),null!=T&&0<T.length?(1==T.length&&k.model.isEdge(T[0])?+S={67:g.actions.get("copyStyle"),86:g.actions.get("pasteStyle")},U=g.onKeyDown;g.onKeyDown=function(C){try{var M=k.getSelectionCell();if(k.isEnabled()&&!k.isEditing()&&null!=M){var T=mxEvent.isAltDown(C)&&mxEvent.isShiftDown(C)?G[C.keyCode]:mxEvent.isAltDown(C)?S[C.keyCode]:null;null!=T?(T.funct(C),mxEvent.consume(C)):c(M)&&(T=null,0<k.getIncomingTreeEdges(M).length&&(9==C.which?T=mxEvent.isShiftDown(C)?H(M):E(M):13==C.which&&(T=F(M,!mxEvent.isShiftDown(C)))),null!=T&&0<T.length?(1==T.length&&k.model.isEdge(T[0])?k.setSelectionCell(k.model.getTerminal(T[0],!1)):k.setSelectionCell(T[T.length-1]),null!=g.hoverIcons&&g.hoverIcons.update(k.view.getState(M)),k.startEditingAtCell(M),mxEvent.consume(C)):37==C.keyCode?(d(M,mxConstants.DIRECTION_WEST),mxEvent.consume(C)):38==C.keyCode?(d(M,mxConstants.DIRECTION_NORTH),mxEvent.consume(C)):39==C.keyCode?(d(M,mxConstants.DIRECTION_EAST),mxEvent.consume(C)):40==C.keyCode&&(d(M,mxConstants.DIRECTION_SOUTH),mxEvent.consume(C)))}}catch(m){g.handleError(m)}mxEvent.isConsumed(C)||-V.apply(this,arguments)};var Q=k.connectVertex;k.connectVertex=function(C,M,T,m,z,I,L){var N=k.getIncomingTreeEdges(C);if(c(C)){var O=u(C),S=O==mxConstants.DIRECTION_EAST||O==mxConstants.DIRECTION_WEST,U=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST;return O==M||0==N.length?E(C,M):S==U?H(C):F(C,M!=mxConstants.DIRECTION_NORTH&&M!=mxConstants.DIRECTION_WEST)}return Q.apply(this,arguments)};k.getSubtree=function(C){var M=[C];!l(C)&&!c(C)||p(C)||k.traverse(C,!0,function(T,m){var z=null!=-m&&k.isTreeEdge(m);z&&0>mxUtils.indexOf(M,m)&&M.push(m);(null==m||z)&&0>mxUtils.indexOf(M,T)&&M.push(T);return null==m||z});return M};var P=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){P.apply(this,arguments);(l(this.state.cell)||c(this.state.cell))&&!p(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",+U.apply(this,arguments)};var P=k.connectVertex;k.connectVertex=function(C,M,T,m,z,I,L){var N=k.getIncomingTreeEdges(C);if(c(C)){var Q=v(C),R=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST,V=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST;return Q==M||0==N.length?E(C,M):R==V?H(C):F(C,M!=mxConstants.DIRECTION_NORTH&&M!=mxConstants.DIRECTION_WEST)}return P.apply(this,arguments)};k.getSubtree=function(C){var M=[C];!l(C)&&!c(C)||p(C)||k.traverse(C,!0,function(T,m){var z=null!=+m&&k.isTreeEdge(m);z&&0>mxUtils.indexOf(M,m)&&M.push(m);(null==m||z)&&0>mxUtils.indexOf(M,T)&&M.push(T);return null==m||z});return M};var O=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){O.apply(this,arguments);(l(this.state.cell)||c(this.state.cell))&&!p(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(C){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(C),mxEvent.getClientY(C),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(C);this.graph.isMouseDown=!0;g.hoverIcons.reset();mxEvent.consume(C)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var q=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){q.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 y=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(C){y.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=C?"":"none")};var B=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(C,M){B.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=-null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=f.apply(this,arguments),l=this.graph,n=this;return c.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var u=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');-u.vertex=!0;var F=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");H.geometry.relative=!0;H.edge=!0;u.insertEdge(H,!0);F.insertEdge(H,!1);p.insert(H);p.insert(u);p.insert(F);-return n.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var u=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-u.vertex=!0;var F=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');F.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");-H.geometry.relative=!0;H.edge=!0;u.insertEdge(H,!0);F.insertEdge(H,!1);var E=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-E.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),H.style);K.geometry.relative=!0;K.edge=!0;u.insertEdge(K,!0);E.insertEdge(K,!1);var d=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),H.style);g.geometry.relative=!0;g.edge=!0;u.insertEdge(g,!0);d.insertEdge(g,!1);var k=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-k.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),H.style);v.geometry.relative=!0;v.edge=!0;u.insertEdge(v,!0);k.insertEdge(v,!1);p.insert(H);p.insert(K);p.insert(g);p.insert(v);p.insert(u);p.insert(F);p.insert(E);p.insert(d);p.insert(k);return n.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');+null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=f.apply(this,arguments),l=this.graph,n=this;return c.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var v=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');+v.vertex=!0;var F=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");H.geometry.relative=!0;H.edge=!0;v.insertEdge(H,!0);F.insertEdge(H,!1);p.insert(H);p.insert(v);p.insert(F);+return n.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var v=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+v.vertex=!0;var F=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');F.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");+H.geometry.relative=!0;H.edge=!0;v.insertEdge(H,!0);F.insertEdge(H,!1);var E=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+E.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),H.style);K.geometry.relative=!0;K.edge=!0;v.insertEdge(K,!0);E.insertEdge(K,!1);var d=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),H.style);g.geometry.relative=!0;g.edge=!0;v.insertEdge(g,!0);d.insertEdge(g,!1);var k=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+k.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),H.style);u.geometry.relative=!0;u.edge=!0;v.insertEdge(u,!0);k.insertEdge(u,!1);p.insert(H);p.insert(K);p.insert(g);p.insert(u);p.insert(v);p.insert(F);p.insert(E);p.insert(d);p.insert(k);return n.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');p.vertex=!0;return n.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-p.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");u.geometry.setTerminalPoint(new mxPoint(-40,40),!0);u.geometry.relative=!0;u.edge=!0;p.insertEdge(u,!1);return n.createVertexTemplateFromCells([p,u],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),-'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');p.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");-u.geometry.setTerminalPoint(new mxPoint(-40,40),!0);u.geometry.relative=!0;u.edge=!0;p.insertEdge(u,!1);return n.createVertexTemplateFromCells([p,u],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var u=new mxCell("Organization",new mxGeometry(80,-40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');l.setAttributeForCell(u,"treeRoot","1");u.vertex=!0;var F=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");-H.geometry.relative=!0;H.edge=!0;u.insertEdge(H,!0);F.insertEdge(H,!1);var E=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');E.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");K.geometry.relative=-!0;K.edge=!0;u.insertEdge(K,!0);E.insertEdge(K,!1);p.insert(H);p.insert(K);p.insert(u);p.insert(F);p.insert(E);return n.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');l.setAttributeForCell(p,"treeRoot","1");p.vertex=!0;return n.createVertexTemplateFromCells([p],-p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");-u.geometry.setTerminalPoint(new mxPoint(0,0),!0);u.geometry.relative=!0;u.edge=!0;p.insertEdge(u,!1);return n.createVertexTemplateFromCells([p,u],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");-u.geometry.setTerminalPoint(new mxPoint(110,-40),!0);u.geometry.relative=!0;u.edge=!0;p.insertEdge(u,!1);var F=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");F.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),u.style);H.geometry.setTerminalPoint(new mxPoint(110,-40),!0);H.geometry.relative=!0;H.edge=!0;F.insertEdge(H,!1);return n.createVertexTemplateFromCells([u,H,p,F],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;-EditorUi.initMinimalTheme=function(){function b(d,g){if(EditorUi.windowed){var k=d.editor.graph;k.popupMenuHandler.hideMenu();null==d.formatWindow?(g=Math.max(10,d.diagramContainer.clientWidth-248),k=Math.min(566,k.container.clientHeight-10),d.formatWindow=new WrapperWindow(d,mxResources.get("format"),g,60,240,k,function(v){d.createFormat(v).init()}),d.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){d.formatWindow.window.fit()})),d.formatWindow.window.minimumSize=new mxRectangle(0,+p.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");v.geometry.setTerminalPoint(new mxPoint(-40,40),!0);v.geometry.relative=!0;v.edge=!0;p.insertEdge(v,!1);return n.createVertexTemplateFromCells([p,v],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),+'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');p.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");+v.geometry.setTerminalPoint(new mxPoint(-40,40),!0);v.geometry.relative=!0;v.edge=!0;p.insertEdge(v,!1);return n.createVertexTemplateFromCells([p,v],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var v=new mxCell("Organization",new mxGeometry(80,+40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');l.setAttributeForCell(v,"treeRoot","1");v.vertex=!0;var F=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");+H.geometry.relative=!0;H.edge=!0;v.insertEdge(H,!0);F.insertEdge(H,!1);var E=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');E.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");K.geometry.relative=+!0;K.edge=!0;v.insertEdge(K,!0);E.insertEdge(K,!1);p.insert(H);p.insert(K);p.insert(v);p.insert(F);p.insert(E);return n.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');l.setAttributeForCell(p,"treeRoot","1");p.vertex=!0;return n.createVertexTemplateFromCells([p],+p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");+v.geometry.setTerminalPoint(new mxPoint(0,0),!0);v.geometry.relative=!0;v.edge=!0;p.insertEdge(v,!1);return n.createVertexTemplateFromCells([p,v],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");+v.geometry.setTerminalPoint(new mxPoint(110,-40),!0);v.geometry.relative=!0;v.edge=!0;p.insertEdge(v,!1);var F=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");F.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),v.style);H.geometry.setTerminalPoint(new mxPoint(110,-40),!0);H.geometry.relative=!0;H.edge=!0;F.insertEdge(H,!1);return n.createVertexTemplateFromCells([v,H,p,F],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;+EditorUi.initMinimalTheme=function(){function b(d,g){if(EditorUi.windowed){var k=d.editor.graph;k.popupMenuHandler.hideMenu();null==d.formatWindow?(g=Math.max(10,d.diagramContainer.clientWidth-248),k=Math.min(566,k.container.clientHeight-10),d.formatWindow=new WrapperWindow(d,mxResources.get("format"),g,60,240,k,function(u){d.createFormat(u).init()}),d.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){d.formatWindow.window.fit()})),d.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):d.formatWindow.window.setVisible(null!=g?g:!d.formatWindow.window.isVisible())}else null==d.formatElt&&(d.formatElt=d.createSidebarContainer(),d.createFormat(d.formatElt).init(),d.formatElt.style.border="none",d.formatElt.style.width="240px",d.formatElt.style.borderLeftWidth="1px",d.formatElt.style.borderLeftStyle="solid",d.formatElt.style.right="0px"),k=d.diagramContainer.parentNode,null!=d.formatElt.parentNode?(d.formatElt.parentNode.removeChild(d.formatElt),k.style.right="0px"):(k.parentNode.appendChild(d.formatElt),-k.style.right=d.formatElt.style.width)}function e(d,g){function k(x,A){var J=d.menus.get(x);x=v.addMenu(A,mxUtils.bind(this,function(){J.funct.apply(this,arguments)}));x.setAttribute("title",A);x.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";x.className="geTitle";g.appendChild(x);return x}var v=new Menubar(d,g);if(Editor.enableCustomLibraries&&+k.style.right=d.formatElt.style.width)}function e(d,g){function k(x,A){var J=d.menus.get(x);x=u.addMenu(A,mxUtils.bind(this,function(){J.funct.apply(this,arguments)}));x.setAttribute("title",A);x.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";x.className="geTitle";g.appendChild(x);return x}var u=new Menubar(d,g);if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=d.actions.get("newLibrary")){var t=document.createElement("div");t.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";t.className="geTitle";mxUtils.write(t,mxResources.get("newLibrary"));g.appendChild(t);mxEvent.addListener(t,"click",this.actions.get("newLibrary").funct);t=t.cloneNode(!1);t.style.left="50%";t.style.borderLeftStyle="solid";mxUtils.write(t,mxResources.get("openLibrary"));g.appendChild(t);mxEvent.addListener(t,"click",this.actions.get("openLibrary").funct)}else t=k("newLibrary",mxResources.get("newLibrary")),t.style.display="block",t.style.fontSize="11px",t.style.left="0",t=k("openLibraryFrom",mxResources.get("openLibraryFrom")),t.style.borderLeftStyle="solid",t.style.display="block",t.style.fontSize="11px",t.style.left="50%";g.appendChild(d.sidebar.container);-g.style.overflow="hidden"}function f(d,g){if(EditorUi.windowed){var k=d.editor.graph;k.popupMenuHandler.hideMenu();null==d.sidebarWindow?(g=Math.min(k.container.clientWidth-10,218),k=Math.min(k.container.clientHeight-40,650),d.sidebarWindow=new WrapperWindow(d,mxResources.get("shapes"),10,56,g-6,k-6,function(v){e(d,v)}),d.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){d.sidebarWindow.window.fit()})),d.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),d.sidebarWindow.window.setVisible(!0),-isLocalStorage&&d.getLocalData("sidebar",function(v){d.sidebar.showEntries(v,null,!0)}),d.restoreLibraries()):d.sidebarWindow.window.setVisible(null!=g?g:!d.sidebarWindow.window.isVisible())}else null==d.sidebarElt&&(d.sidebarElt=d.createSidebarContainer(),e(d,d.sidebarElt),d.sidebarElt.style.border="none",d.sidebarElt.style.width="210px",d.sidebarElt.style.borderRight="1px solid gray"),k=d.diagramContainer.parentNode,null!=d.sidebarElt.parentNode?(d.sidebarElt.parentNode.removeChild(d.sidebarElt),+g.style.overflow="hidden"}function f(d,g){if(EditorUi.windowed){var k=d.editor.graph;k.popupMenuHandler.hideMenu();null==d.sidebarWindow?(g=Math.min(k.container.clientWidth-10,218),k=Math.min(k.container.clientHeight-40,650),d.sidebarWindow=new WrapperWindow(d,mxResources.get("shapes"),10,56,g-6,k-6,function(u){e(d,u)}),d.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){d.sidebarWindow.window.fit()})),d.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),d.sidebarWindow.window.setVisible(!0),+isLocalStorage&&d.getLocalData("sidebar",function(u){d.sidebar.showEntries(u,null,!0)}),d.restoreLibraries()):d.sidebarWindow.window.setVisible(null!=g?g:!d.sidebarWindow.window.isVisible())}else null==d.sidebarElt&&(d.sidebarElt=d.createSidebarContainer(),e(d,d.sidebarElt),d.sidebarElt.style.border="none",d.sidebarElt.style.width="210px",d.sidebarElt.style.borderRight="1px solid gray"),k=d.diagramContainer.parentNode,null!=d.sidebarElt.parentNode?(d.sidebarElt.parentNode.removeChild(d.sidebarElt),k.style.left="0px"):(k.parentNode.appendChild(d.sidebarElt),k.style.left=d.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var c=0;try{c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(d){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.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";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 l=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(d){l.apply(this,arguments);null!=this.tabContainer&&(this.tabContainer.style.right="62px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px")};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var p=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(d,g){null!=g.shortcut&&900>c&&!mxClient.IS_IOS?d.firstChild.nextSibling.setAttribute("title",g.shortcut):-p.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(d){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=d?d:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var u=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();u.apply(this,arguments)};var F=EditorUi.prototype.setGraphEnabled;+p.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(d){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=d?d:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var v=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();v.apply(this,arguments)};var F=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(d){F.apply(this,arguments);if(d){var g=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=g&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=g&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};-var H=Menus.prototype.init;Menus.prototype.init=function(){H.apply(this,arguments);var d=this.editorUi;EditorUi.enablePlantUml&&!d.isOffline()&&d.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var v=new ParseDialog(d,mxResources.get("plantUml")+"...","plantUml");d.showDialog(v.container,620,420,!0,!1);v.init()}));d.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var v=new ParseDialog(d,mxResources.get("mermaid")+"...","mermaid");d.showDialog(v.container,-620,420,!0,!1);v.init()}));var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),k=function(v,t,x,A){v.addItem(x,null,mxUtils.bind(this,function(){var J=new CreateGraphDialog(d,x,A);d.showDialog(J.container,620,420,!0,!1);J.init()}),t)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(v,t){for(var x=0;x<g.length;x++)"-"==g[x]?v.addSeparator(t):k(v,t,mxResources.get(g[x])+"...",g[x])})))};EditorUi.prototype.installFormatToolbar=function(d){var g=-this.editor.graph,k=document.createElement("div");k.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";g.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(v,t){0<g.getSelectionCount()?(d.appendChild(k),k.innerHTML="Selected: "+g.getSelectionCount()):null!=k.parentNode&&k.parentNode.removeChild(k)}))};var E=!1;EditorUi.prototype.initFormatWindow=+var H=Menus.prototype.init;Menus.prototype.init=function(){H.apply(this,arguments);var d=this.editorUi;EditorUi.enablePlantUml&&!d.isOffline()&&d.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var u=new ParseDialog(d,mxResources.get("plantUml")+"...","plantUml");d.showDialog(u.container,620,420,!0,!1);u.init()}));d.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var u=new ParseDialog(d,mxResources.get("mermaid")+"...","mermaid");d.showDialog(u.container,+620,420,!0,!1);u.init()}));var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),k=function(u,t,x,A){u.addItem(x,null,mxUtils.bind(this,function(){var J=new CreateGraphDialog(d,x,A);d.showDialog(J.container,620,420,!0,!1);J.init()}),t)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(u,t){for(var x=0;x<g.length;x++)"-"==g[x]?u.addSeparator(t):k(u,t,mxResources.get(g[x])+"...",g[x])})))};EditorUi.prototype.installFormatToolbar=function(d){var g=+this.editor.graph,k=document.createElement("div");k.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";g.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(u,t){0<g.getSelectionCount()?(d.appendChild(k),k.innerHTML="Selected: "+g.getSelectionCount()):null!=k.parentNode&&k.parentNode.removeChild(k)}))};var E=!1;EditorUi.prototype.initFormatWindow=function(){if(!E&&null!=this.formatWindow){E=!0;var d=this.formatWindow.window.toggleMinimized,g=240;this.formatWindow.window.toggleMinimized=function(){d.apply(this,arguments);this.minimized?(g=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+g-140+"px"):(this.div.style.width=g+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-g+140)+"px");this.fit()};-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(k){mxEvent.getSource(k)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var K=EditorUi.prototype.init;EditorUi.prototype.init=function(){function d(W,X,Z){var Y=A.menus.get(W),ba=R.addMenu(mxResources.get(W),mxUtils.bind(this,function(){ba.classList.contains("mxDisabled")||Y.funct.apply(this,arguments)}),G);ba.className="geMenuItem";ba.style.display="inline-block";ba.style.boxSizing=+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(k){mxEvent.getSource(k)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var K=EditorUi.prototype.init;EditorUi.prototype.init=function(){function d(W,X,Z){var Y=A.menus.get(W),ba=S.addMenu(mxResources.get(W),mxUtils.bind(this,function(){ba.classList.contains("mxDisabled")||Y.funct.apply(this,arguments)}),G);ba.className="geMenuItem";ba.style.display="inline-block";ba.style.boxSizing="border-box";ba.style.top="6px";ba.style.marginRight="6px";ba.style.height="30px";ba.style.paddingTop="6px";ba.style.paddingBottom="6px";ba.style.cursor="pointer";ba.setAttribute("title",mxResources.get(W));A.menus.menuCreated(Y,ba,"geMenuItem");null!=Z?(ba.style.backgroundImage="url("+Z+")",ba.style.backgroundPosition="center center",ba.style.backgroundRepeat="no-repeat",ba.style.backgroundSize="24px 24px",ba.style.width="34px",ba.innerText=""):X||(ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+-")",ba.style.backgroundPosition="right 6px center",ba.style.backgroundRepeat="no-repeat",ba.style.paddingRight="22px");return ba}function g(W,X,Z,Y,ba,ea){var ca=document.createElement("a");ca.className="geMenuItem";ca.style.display="inline-block";ca.style.boxSizing="border-box";ca.style.height="30px";ca.style.padding="6px";ca.style.position="relative";ca.style.verticalAlign="top";ca.style.top="0px";null!=A.statusContainer?D.insertBefore(ca,A.statusContainer):D.appendChild(ca);null!=ea?(ca.style.backgroundImage=-"url("+ea+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="24px 24px",ca.style.width="34px"):mxUtils.write(ca,W);mxEvent.addListener(ca,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fa){fa.preventDefault()}));mxEvent.addListener(ca,"click",function(fa){"disabled"!=ca.getAttribute("disabled")&&X(fa);mxEvent.consume(fa)});null==Z&&(ca.style.marginRight="4px");null!=Y&&ca.setAttribute("title",Y);null!=ba&&(W=function(){ba.isEnabled()?+")",ba.style.backgroundPosition="right 6px center",ba.style.backgroundRepeat="no-repeat",ba.style.paddingRight="22px");return ba}function g(W,X,Z,Y,ba,da){var ca=document.createElement("a");ca.className="geMenuItem";ca.style.display="inline-block";ca.style.boxSizing="border-box";ca.style.height="30px";ca.style.padding="6px";ca.style.position="relative";ca.style.verticalAlign="top";ca.style.top="0px";null!=A.statusContainer?D.insertBefore(ca,A.statusContainer):D.appendChild(ca);null!=da?(ca.style.backgroundImage=+"url("+da+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="24px 24px",ca.style.width="34px"):mxUtils.write(ca,W);mxEvent.addListener(ca,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(ea){ea.preventDefault()}));mxEvent.addListener(ca,"click",function(ea){"disabled"!=ca.getAttribute("disabled")&&X(ea);mxEvent.consume(ea)});null==Z&&(ca.style.marginRight="4px");null!=Y&&ca.setAttribute("title",Y);null!=ba&&(W=function(){ba.isEnabled()?(ca.removeAttribute("disabled"),ca.style.cursor="pointer"):(ca.setAttribute("disabled","disabled"),ca.style.cursor="default")},ba.addListener("stateChanged",W),J.addListener("enabledChanged",W),W());return ca}function k(W,X,Z){Z=document.createElement("div");Z.className="geMenuItem";Z.style.display="inline-block";Z.style.verticalAlign="top";Z.style.marginRight="6px";Z.style.padding="0 4px 0 4px";Z.style.height="30px";Z.style.position="relative";Z.style.top="0px";for(var Y=0;Y<W.length;Y++)null!=W[Y]&&-(W[Y].style.margin="0px",W[Y].style.boxShadow="none",Z.appendChild(W[Y]));null!=X&&mxUtils.setOpacity(Z,X);null!=A.statusContainer?D.insertBefore(Z,A.statusContainer):D.appendChild(Z);return Z}function v(){for(var W=D.firstChild;null!=W;){var X=W.nextSibling;"geMenuItem"!=W.className&&"geItem"!=W.className||W.parentNode.removeChild(W);W=X}G=D.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;W=1E3>c;var Z=null;W||(Z=d("diagram"));X=W?d("diagram",null,-Editor.menuImage):null;null!=X&&(Z=X);k([Z,g(mxResources.get("shapes"),A.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),A.actions.get("image"),W?Editor.shapesImage:null),g(mxResources.get("format"),A.actions.get("format").funct,null,mxResources.get("format")+" ("+A.actions.get("format").shortcut+")",A.actions.get("image"),W?Editor.formatImage:null)],W?60:null);X=d("insert",!0,W?P:null);k([X,g(mxResources.get("delete"),A.actions.get("delete").funct,null,mxResources.get("delete"),-A.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);J.isEnabled()||X.classList.add("mxDisabled");411<=c&&(k([L,N],60),520<=c&&k([O,640<=c?g("",M.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",M,Editor.zoomInImage):null,640<=c?g("",T.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",T,Editor.zoomOutImage):null],60))}K.apply(this,arguments);var t=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=t&&(t.classList.add("geSimple"),+(W[Y].style.margin="0px",W[Y].style.boxShadow="none",Z.appendChild(W[Y]));null!=X&&mxUtils.setOpacity(Z,X);null!=A.statusContainer?D.insertBefore(Z,A.statusContainer):D.appendChild(Z);return Z}function u(){for(var W=D.firstChild;null!=W;){var X=W.nextSibling;"geMenuItem"!=W.className&&"geItem"!=W.className||W.parentNode.removeChild(W);W=X}G=D.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;W=1E3>c;var Z=null;W||(Z=d("diagram"));X=W?d("diagram",null,+Editor.menuImage):null;null!=X&&(Z=X);k([Z,g(mxResources.get("shapes"),A.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),A.actions.get("image"),W?Editor.shapesImage:null),g(mxResources.get("format"),A.actions.get("format").funct,null,mxResources.get("format")+" ("+A.actions.get("format").shortcut+")",A.actions.get("image"),W?Editor.formatImage:null)],W?60:null);X=d("insert",!0,W?O:null);k([X,g(mxResources.get("delete"),A.actions.get("delete").funct,null,mxResources.get("delete"),+A.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);J.isEnabled()||X.classList.add("mxDisabled");411<=c&&(k([L,N],60),520<=c&&k([Q,640<=c?g("",M.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",M,Editor.zoomInImage):null,640<=c?g("",T.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",T,Editor.zoomOutImage):null],60))}K.apply(this,arguments);var t=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=t&&(t.classList.add("geSimple"),t.classList.add("geMinimal"));t=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);var x=document.createElement("div");x.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";x.style.bottom=t?"32px":"0px";this.sidebar=this.createSidebar(x);if(1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),-this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=c&&(b(this,!0),this.formatWindow.window.setVisible(!0));var A=this,J=A.editor.graph;A.toolbar=this.createToolbar(A.createDiv("geToolbar"));A.defaultLibraryName=mxResources.get("untitledLibrary");var D=document.createElement("div");D.className="geMenubarContainer";var G=null,R=new Menubar(A,D);A.statusContainer=A.createStatusContainer();A.statusContainer.style.position="relative";A.statusContainer.style.maxWidth="";A.statusContainer.style.cursor=-"default";var V=A.hideCurrentMenu;A.hideCurrentMenu=function(){V.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var Q=A.descriptorChanged;A.descriptorChanged=function(){Q.apply(this,arguments);var W=A.getCurrentFile();if(null!=W&&null!=W.getTitle()){var X=W.getMode();"google"==X?X="googleDrive":"github"==X?X="gitHub":"gitlab"==X?X="gitLab":"onedrive"==X&&(X="oneDrive");X=mxResources.get(X);D.setAttribute("title",W.getTitle()+(null!=X?" ("+X+")":""))}else D.removeAttribute("title")};+this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=c&&(b(this,!0),this.formatWindow.window.setVisible(!0));var A=this,J=A.editor.graph;A.toolbar=this.createToolbar(A.createDiv("geToolbar"));A.defaultLibraryName=mxResources.get("untitledLibrary");var D=document.createElement("div");D.className="geMenubarContainer";var G=null,S=new Menubar(A,D);A.statusContainer=A.createStatusContainer();A.statusContainer.style.position="relative";A.statusContainer.style.maxWidth="";A.statusContainer.style.cursor=+"default";var U=A.hideCurrentMenu;A.hideCurrentMenu=function(){U.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var P=A.descriptorChanged;A.descriptorChanged=function(){P.apply(this,arguments);var W=A.getCurrentFile();if(null!=W&&null!=W.getTitle()){var X=W.getMode();"google"==X?X="googleDrive":"github"==X?X="gitHub":"gitlab"==X?X="gitLab":"onedrive"==X&&(X="oneDrive");X=mxResources.get(X);D.setAttribute("title",W.getTitle()+(null!=X?" ("+X+")":""))}else D.removeAttribute("title")};A.setStatusText(A.editor.getStatus());D.appendChild(A.statusContainer);A.buttonContainer=document.createElement("div");A.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";D.appendChild(A.buttonContainer);A.menubarContainer=A.buttonContainer;A.tabContainer=document.createElement("div");A.tabContainer.className="geTabContainer geTabItem";A.tabContainer.style.cssText=-"position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";t=A.diagramContainer.parentNode;x=document.createElement("div");x.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";A.diagramContainer.style.top="47px";var P=Editor.addBoxImage;if(null!=A.hoverIcons){var q=A.hoverIcons.update;A.hoverIcons.update=function(){J.freehand.isDrawing()||q.apply(this,arguments)}}if(null!=J.freehand){var y=J.freehand.createStyle;J.freehand.createStyle=+"position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";t=A.diagramContainer.parentNode;x=document.createElement("div");x.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";A.diagramContainer.style.top="47px";var O=Editor.addBoxImage;if(null!=A.hoverIcons){var q=A.hoverIcons.update;A.hoverIcons.update=function(){J.freehand.isDrawing()||q.apply(this,arguments)}}if(null!=J.freehand){var y=J.freehand.createStyle;J.freehand.createStyle=function(W){return y.apply(this,arguments)+"sketch=0;"}}A.editor.addListener("statusChanged",mxUtils.bind(this,function(){A.setStatusText(A.editor.getStatus())}));A.setStatusText(A.editor.getStatus());var B=A.menus.get("viewZoom");if(null!=B){var C=function(W){if(mxEvent.isAltDown(W))A.hideCurrentMenu(),A.actions.get("customZoom").funct(),mxEvent.consume(W);else if("geMenuItem"==mxEvent.getSource(W).className||mxEvent.isShiftDown(W))A.hideCurrentMenu(),A.actions.get("smartFit").funct(),mxEvent.consume(W)},-M=A.actions.get("zoomIn"),T=A.actions.get("zoomOut"),m=A.actions.get("resetView"),z=A.actions.get("undo"),I=A.actions.get("redo"),L=g("",z.funct,null,mxResources.get("undo")+" ("+z.shortcut+")",z,Editor.undoImage),N=g("",I.funct,null,mxResources.get("redo")+" ("+I.shortcut+")",I,Editor.redoImage),O=g("",C,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",m,Editor.zoomFitImage);D.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";-this.tabContainer.style.right="70px";var S=R.addMenu("100%",B.funct);S.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");S.className="geTabItem";S.style.height=A.tabContainerHeight+"px";S.style.position="absolute";S.style.display="0"!=urlParams.pages?"flex":"none";S.style.alignItems="center";S.style.justifyContent="center";S.style.paddingRight="11px";S.style.whiteSpace="nowrap";S.style.overflow="hidden";S.style.fontSize="11px";S.style.width="51px";S.style.right="0px";S.style.bottom=-"0px";S.style.boxSizing="content-box";S.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";S.style.backgroundPosition="right 6px top 15px";S.style.backgroundRepeat="no-repeat";S.style.backgroundSize="10px";S.style.zIndex="1";x.appendChild(S);(function(W){mxEvent.addListener(W,"click",C);var X=mxUtils.bind(this,function(Z,Y,ba){W.innerText="";mxUtils.write(W,Math.round(100*A.editor.graph.view.scale*(null!=ba?ba:1))+"%")});A.editor.graph.view.addListener(mxEvent.EVENT_SCALE,X);A.editor.addListener("resetGraphView",-X);A.editor.addListener("pageSelected",X);A.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(Z,Y){X(Z,Y,Y.getProperty("factor"))}))})(S);var U=A.setGraphEnabled;A.setGraphEnabled=function(){U.apply(this,arguments);null!=this.tabContainer&&(S.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}x.appendChild(D);x.appendChild(A.diagramContainer);-t.appendChild(x);A.updateTabContainer();!EditorUi.windowed&&1E3<=c&&b(this,!0);x.appendChild(A.tabContainer);v();A.addListener("lockedChanged",v);mxEvent.addListener(window,"resize",function(){v();null!=A.sidebarWindow&&A.sidebarWindow.window.fit();null!=A.formatWindow&&A.formatWindow.window.fit();null!=A.actions.outlineWindow&&A.actions.outlineWindow.window.fit();null!=A.actions.layersWindow&&A.actions.layersWindow.window.fit();null!=A.menus.chatWindow&&A.menus.chatWindow.window.fit();null!=A.menus.tagsWindow&&-A.menus.tagsWindow.window.fit();null!=A.menus.findWindow&&A.menus.findWindow.window.fit();null!=A.menus.findReplaceWindow&&A.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,l,n,p){var u=l.y,F=l.x,H=!1,E=!1;if(null!=this.states&&null!=c&&null!=l){var K=this,d=new mxCellState,g=this.graph.getView().scale,k=Math.max(2,this.getGuideTolerance()/2);d.x=c.x+F;d.y=c.y+u;d.width=c.width;d.height=c.height;for(var v=[],t=[],x=0;x<this.states.length;x++){var A=this.states[x];A instanceof mxCellState&&(p||!this.graph.isCellSelected(A.cell))&&((d.x>=A.x&&d.x<=A.x+A.width||A.x>=d.x&&A.x<=d.x+d.width)&&(d.y>-A.y+A.height+4||d.y+d.height+4<A.y)?v.push(A):(d.y>=A.y&&d.y<=A.y+A.height||A.y>=d.y&&A.y<=d.y+d.height)&&(d.x>A.x+A.width+4||d.x+d.width+4<A.x)&&t.push(A))}var J=0,D=0,G=A=0,R=0,V=0,Q=0,P=0,q=5*g;if(1<v.length){v.push(d);v.sort(function(M,T){return M.y-T.y});var y=!1;x=d==v[0];g=d==v[v.length-1];if(!x&&!g)for(x=1;x<v.length-1;x++)if(d==v[x]){g=v[x-1];x=v[x+1];A=D=G=(x.y-g.y-g.height-d.height)/2;break}for(x=0;x<v.length-1;x++){g=v[x];var B=v[x+1],C=d==g||d==B;B=B.y-g.y-g.height;y|=d==g;if(0==D&&0==-J)D=B,J=1;else if(Math.abs(D-B)<=(C||1==x&&y?k:0))J+=1;else if(1<J&&y){v=v.slice(0,x+1);break}else if(3<=v.length-x&&!y)J=0,A=D=0!=G?G:0,v.splice(0,0==x?1:x),x=-1;else break;0!=A||C||(D=A=B)}3==v.length&&v[1]==d&&(A=0)}if(1<t.length){t.push(d);t.sort(function(M,T){return M.x-T.x});y=!1;x=d==t[0];g=d==t[t.length-1];if(!x&&!g)for(x=1;x<t.length-1;x++)if(d==t[x]){g=t[x-1];x=t[x+1];Q=V=P=(x.x-g.x-g.width-d.width)/2;break}for(x=0;x<t.length-1;x++){g=t[x];B=t[x+1];C=d==g||d==B;B=B.x-g.x-g.width;y|=d==g;-if(0==V&&0==R)V=B,R=1;else if(Math.abs(V-B)<=(C||1==x&&y?k:0))R+=1;else if(1<R&&y){t=t.slice(0,x+1);break}else if(3<=t.length-x&&!y)R=0,Q=V=0!=P?P:0,t.splice(0,0==x?1:x),x=-1;else break;0!=Q||C||(V=Q=B)}3==t.length&&t[1]==d&&(Q=0)}k=function(M,T,m,z){var I=[];if(z){z=q;var L=0}else z=0,L=q;I.push(new mxPoint(M.x-z,M.y-L));I.push(new mxPoint(M.x+z,M.y+L));I.push(M);I.push(T);I.push(new mxPoint(T.x-z,T.y-L));I.push(new mxPoint(T.x+z,T.y+L));if(null!=m)return m.points=I,m;M=new mxPolyline(I,mxConstants.GUIDE_COLOR,-mxConstants.GUIDE_STROKEWIDTH);M.dialect=mxConstants.DIALECT_SVG;M.pointerEvents=!1;M.init(K.graph.getView().getOverlayPane());return M};V=function(M,T){if(M&&null!=K.guidesArrHor)for(M=0;M<K.guidesArrHor.length;M++)K.guidesArrHor[M].node.style.visibility="hidden";if(T&&null!=K.guidesArrVer)for(M=0;M<K.guidesArrVer.length;M++)K.guidesArrVer[M].node.style.visibility="hidden"};if(1<R&&R==t.length-1){R=[];P=K.guidesArrHor;H=[];F=0;x=t[0]==d?1:0;y=t[x].y+t[x].height;if(0<Q)for(x=0;x<t.length-1;x++)g=-t[x],B=t[x+1],d==g?(F=B.x-g.width-Q,H.push(new mxPoint(F+g.width+q,y)),H.push(new mxPoint(B.x-q,y))):d==B?(H.push(new mxPoint(g.x+g.width+q,y)),F=g.x+g.width+Q,H.push(new mxPoint(F-q,y))):(H.push(new mxPoint(g.x+g.width+q,y)),H.push(new mxPoint(B.x-q,y)));else g=t[0],x=t[2],F=g.x+g.width+(x.x-g.x-g.width-d.width)/2,H.push(new mxPoint(g.x+g.width+q,y)),H.push(new mxPoint(F-q,y)),H.push(new mxPoint(F+d.width+q,y)),H.push(new mxPoint(x.x-q,y));for(x=0;x<H.length;x+=2)t=H[x],Q=H[x+1],t=k(t,Q,null!=P?-P[x/2]:null),t.node.style.visibility="visible",t.redraw(),R.push(t);for(x=H.length/2;null!=P&&x<P.length;x++)P[x].destroy();K.guidesArrHor=R;F-=c.x;H=!0}else V(!0);if(1<J&&J==v.length-1){R=[];P=K.guidesArrVer;E=[];u=0;x=v[0]==d?1:0;J=v[x].x+v[x].width;if(0<A)for(x=0;x<v.length-1;x++)g=v[x],B=v[x+1],d==g?(u=B.y-g.height-A,E.push(new mxPoint(J,u+g.height+q)),E.push(new mxPoint(J,B.y-q))):d==B?(E.push(new mxPoint(J,g.y+g.height+q)),u=g.y+g.height+A,E.push(new mxPoint(J,u-q))):(E.push(new mxPoint(J,g.y+-g.height+q)),E.push(new mxPoint(J,B.y-q)));else g=v[0],x=v[2],u=g.y+g.height+(x.y-g.y-g.height-d.height)/2,E.push(new mxPoint(J,g.y+g.height+q)),E.push(new mxPoint(J,u-q)),E.push(new mxPoint(J,u+d.height+q)),E.push(new mxPoint(J,x.y-q));for(x=0;x<E.length;x+=2)t=E[x],Q=E[x+1],t=k(t,Q,null!=P?P[x/2]:null,!0),t.node.style.visibility="visible",t.redraw(),R.push(t);for(x=E.length/2;null!=P&&x<P.length;x++)P[x].destroy();K.guidesArrVer=R;u-=c.y;E=!0}else V(!1,!0)}if(H||E)return d=new mxPoint(F,u),v=b.call(this,-c,d,n,p),H&&!E?d.y=v.y:E&&!H&&(d.x=v.x),v.y!=d.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),v.x!=d.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),d;V(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){e.call(this,c);var l=this.guidesArrVer,n=this.guidesArrHor;if(null!=l)for(var p=0;p<l.length;p++)l[p].node.style.visibility=c?"visible":"hidden";if(null!=-n)for(p=0;p<n.length;p++)n[p].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,l=this.guidesArrHor;if(null!=c){for(var n=0;n<c.length;n++)c[n].destroy();this.guidesArrVer=null}if(null!=l){for(n=0;n<l.length;n++)l[n].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function l(){var J=b.diagramContainer;K.style.top=J.offsetTop-F+"px";K.style.left=J.offsetLeft-F+"px";K.style.width=(f?0:J.offsetWidth)+F+"px";K.style.height=(f?J.offsetHeight:0)+F+"px"}function n(J,D,G){if(null!=p)return J;var R;return function(){var V=this,Q=arguments,P=G&&!R;clearTimeout(R);R=setTimeout(function(){R=null;G||J.apply(V,Q)},D);P&&J.apply(V,Q)}}var p=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,-u=window.cancelAnimationFrame||window.mozCancelAnimationFrame,F=this.RULER_THICKNESS,H=this;this.unit=e;var E=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},K=document.createElement("div");K.className="geRuler";K.style.position="fixed";this.updateStyle=mxUtils.bind(this,function(){E=+M=A.actions.get("zoomIn"),T=A.actions.get("zoomOut"),m=A.actions.get("resetView"),z=A.actions.get("undo"),I=A.actions.get("redo"),L=g("",z.funct,null,mxResources.get("undo")+" ("+z.shortcut+")",z,Editor.undoImage),N=g("",I.funct,null,mxResources.get("redo")+" ("+I.shortcut+")",I,Editor.redoImage),Q=g("",C,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",m,Editor.zoomFitImage);D.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";+this.tabContainer.style.right="70px";var R=S.addMenu("100%",B.funct);R.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");R.className="geTabItem";R.style.height=A.tabContainerHeight+"px";R.style.position="absolute";R.style.display="0"!=urlParams.pages?"flex":"none";R.style.alignItems="center";R.style.justifyContent="center";R.style.paddingRight="11px";R.style.whiteSpace="nowrap";R.style.overflow="hidden";R.style.fontSize="11px";R.style.width="51px";R.style.right="0px";R.style.bottom=+"0px";R.style.boxSizing="content-box";R.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";R.style.backgroundPosition="right 6px top 15px";R.style.backgroundRepeat="no-repeat";R.style.backgroundSize="10px";R.style.zIndex="1";x.appendChild(R);(function(W){mxEvent.addListener(W,"click",C);var X=mxUtils.bind(this,function(Z,Y,ba){W.innerText="";mxUtils.write(W,Math.round(100*A.editor.graph.view.scale*(null!=ba?ba:1))+"%")});A.editor.graph.view.addListener(mxEvent.EVENT_SCALE,X);A.editor.addListener("resetGraphView",+X);A.editor.addListener("pageSelected",X);A.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(Z,Y){X(Z,Y,Y.getProperty("factor"))}))})(R);var V=A.setGraphEnabled;A.setGraphEnabled=function(){V.apply(this,arguments);null!=this.tabContainer&&(R.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}x.appendChild(D);x.appendChild(A.diagramContainer);+t.appendChild(x);A.updateTabContainer();!EditorUi.windowed&&1E3<=c&&b(this,!0);x.appendChild(A.tabContainer);u();A.addListener("lockedChanged",u);mxEvent.addListener(window,"resize",function(){u();null!=A.sidebarWindow&&A.sidebarWindow.window.fit();null!=A.formatWindow&&A.formatWindow.window.fit();null!=A.actions.outlineWindow&&A.actions.outlineWindow.window.fit();null!=A.actions.layersWindow&&A.actions.layersWindow.window.fit();null!=A.menus.chatWindow&&A.menus.chatWindow.window.fit();null!=A.menus.tagsWindow&&+A.menus.tagsWindow.window.fit();null!=A.menus.findWindow&&A.menus.findWindow.window.fit();null!=A.menus.findReplaceWindow&&A.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,l,n,p){var v=l.y,F=l.x,H=!1,E=!1;if(null!=this.states&&null!=c&&null!=l){var K=this,d=new mxCellState,g=this.graph.getView().scale,k=Math.max(2,this.getGuideTolerance()/2);d.x=c.x+F;d.y=c.y+v;d.width=c.width;d.height=c.height;for(var u=[],t=[],x=0;x<this.states.length;x++){var A=this.states[x];A instanceof mxCellState&&(p||!this.graph.isCellSelected(A.cell))&&((d.x>=A.x&&d.x<=A.x+A.width||A.x>=d.x&&A.x<=d.x+d.width)&&(d.y>+A.y+A.height+4||d.y+d.height+4<A.y)?u.push(A):(d.y>=A.y&&d.y<=A.y+A.height||A.y>=d.y&&A.y<=d.y+d.height)&&(d.x>A.x+A.width+4||d.x+d.width+4<A.x)&&t.push(A))}var J=0,D=0,G=A=0,S=0,U=0,P=0,O=0,q=5*g;if(1<u.length){u.push(d);u.sort(function(M,T){return M.y-T.y});var y=!1;x=d==u[0];g=d==u[u.length-1];if(!x&&!g)for(x=1;x<u.length-1;x++)if(d==u[x]){g=u[x-1];x=u[x+1];A=D=G=(x.y-g.y-g.height-d.height)/2;break}for(x=0;x<u.length-1;x++){g=u[x];var B=u[x+1],C=d==g||d==B;B=B.y-g.y-g.height;y|=d==g;if(0==D&&0==+J)D=B,J=1;else if(Math.abs(D-B)<=(C||1==x&&y?k:0))J+=1;else if(1<J&&y){u=u.slice(0,x+1);break}else if(3<=u.length-x&&!y)J=0,A=D=0!=G?G:0,u.splice(0,0==x?1:x),x=-1;else break;0!=A||C||(D=A=B)}3==u.length&&u[1]==d&&(A=0)}if(1<t.length){t.push(d);t.sort(function(M,T){return M.x-T.x});y=!1;x=d==t[0];g=d==t[t.length-1];if(!x&&!g)for(x=1;x<t.length-1;x++)if(d==t[x]){g=t[x-1];x=t[x+1];P=U=O=(x.x-g.x-g.width-d.width)/2;break}for(x=0;x<t.length-1;x++){g=t[x];B=t[x+1];C=d==g||d==B;B=B.x-g.x-g.width;y|=d==g;+if(0==U&&0==S)U=B,S=1;else if(Math.abs(U-B)<=(C||1==x&&y?k:0))S+=1;else if(1<S&&y){t=t.slice(0,x+1);break}else if(3<=t.length-x&&!y)S=0,P=U=0!=O?O:0,t.splice(0,0==x?1:x),x=-1;else break;0!=P||C||(U=P=B)}3==t.length&&t[1]==d&&(P=0)}k=function(M,T,m,z){var I=[];if(z){z=q;var L=0}else z=0,L=q;I.push(new mxPoint(M.x-z,M.y-L));I.push(new mxPoint(M.x+z,M.y+L));I.push(M);I.push(T);I.push(new mxPoint(T.x-z,T.y-L));I.push(new mxPoint(T.x+z,T.y+L));if(null!=m)return m.points=I,m;M=new mxPolyline(I,mxConstants.GUIDE_COLOR,+mxConstants.GUIDE_STROKEWIDTH);M.dialect=mxConstants.DIALECT_SVG;M.pointerEvents=!1;M.init(K.graph.getView().getOverlayPane());return M};U=function(M,T){if(M&&null!=K.guidesArrHor)for(M=0;M<K.guidesArrHor.length;M++)K.guidesArrHor[M].node.style.visibility="hidden";if(T&&null!=K.guidesArrVer)for(M=0;M<K.guidesArrVer.length;M++)K.guidesArrVer[M].node.style.visibility="hidden"};if(1<S&&S==t.length-1){S=[];O=K.guidesArrHor;H=[];F=0;x=t[0]==d?1:0;y=t[x].y+t[x].height;if(0<P)for(x=0;x<t.length-1;x++)g=+t[x],B=t[x+1],d==g?(F=B.x-g.width-P,H.push(new mxPoint(F+g.width+q,y)),H.push(new mxPoint(B.x-q,y))):d==B?(H.push(new mxPoint(g.x+g.width+q,y)),F=g.x+g.width+P,H.push(new mxPoint(F-q,y))):(H.push(new mxPoint(g.x+g.width+q,y)),H.push(new mxPoint(B.x-q,y)));else g=t[0],x=t[2],F=g.x+g.width+(x.x-g.x-g.width-d.width)/2,H.push(new mxPoint(g.x+g.width+q,y)),H.push(new mxPoint(F-q,y)),H.push(new mxPoint(F+d.width+q,y)),H.push(new mxPoint(x.x-q,y));for(x=0;x<H.length;x+=2)t=H[x],P=H[x+1],t=k(t,P,null!=O?+O[x/2]:null),t.node.style.visibility="visible",t.redraw(),S.push(t);for(x=H.length/2;null!=O&&x<O.length;x++)O[x].destroy();K.guidesArrHor=S;F-=c.x;H=!0}else U(!0);if(1<J&&J==u.length-1){S=[];O=K.guidesArrVer;E=[];v=0;x=u[0]==d?1:0;J=u[x].x+u[x].width;if(0<A)for(x=0;x<u.length-1;x++)g=u[x],B=u[x+1],d==g?(v=B.y-g.height-A,E.push(new mxPoint(J,v+g.height+q)),E.push(new mxPoint(J,B.y-q))):d==B?(E.push(new mxPoint(J,g.y+g.height+q)),v=g.y+g.height+A,E.push(new mxPoint(J,v-q))):(E.push(new mxPoint(J,g.y++g.height+q)),E.push(new mxPoint(J,B.y-q)));else g=u[0],x=u[2],v=g.y+g.height+(x.y-g.y-g.height-d.height)/2,E.push(new mxPoint(J,g.y+g.height+q)),E.push(new mxPoint(J,v-q)),E.push(new mxPoint(J,v+d.height+q)),E.push(new mxPoint(J,x.y-q));for(x=0;x<E.length;x+=2)t=E[x],P=E[x+1],t=k(t,P,null!=O?O[x/2]:null,!0),t.node.style.visibility="visible",t.redraw(),S.push(t);for(x=E.length/2;null!=O&&x<O.length;x++)O[x].destroy();K.guidesArrVer=S;v-=c.y;E=!0}else U(!1,!0)}if(H||E)return d=new mxPoint(F,v),u=b.call(this,+c,d,n,p),H&&!E?d.y=u.y:E&&!H&&(d.x=u.x),u.y!=d.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),u.x!=d.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),d;U(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){e.call(this,c);var l=this.guidesArrVer,n=this.guidesArrHor;if(null!=l)for(var p=0;p<l.length;p++)l[p].node.style.visibility=c?"visible":"hidden";if(null!=+n)for(p=0;p<n.length;p++)n[p].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,l=this.guidesArrHor;if(null!=c){for(var n=0;n<c.length;n++)c[n].destroy();this.guidesArrVer=null}if(null!=l){for(n=0;n<l.length;n++)l[n].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function l(){var J=b.diagramContainer;K.style.top=J.offsetTop-F+"px";K.style.left=J.offsetLeft-F+"px";K.style.width=(f?0:J.offsetWidth)+F+"px";K.style.height=(f?J.offsetHeight:0)+F+"px"}function n(J,D,G){if(null!=p)return J;var S;return function(){var U=this,P=arguments,O=G&&!S;clearTimeout(S);S=setTimeout(function(){S=null;G||J.apply(U,P)},D);O&&J.apply(U,P)}}var p=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,+v=window.cancelAnimationFrame||window.mozCancelAnimationFrame,F=this.RULER_THICKNESS,H=this;this.unit=e;var E=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},K=document.createElement("div");K.className="geRuler";K.style.position="fixed";this.updateStyle=mxUtils.bind(this,function(){E=Editor.isDarkMode()?{outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};K.style[f?"borderRight":"borderBottom"]="0.5px solid "+E.strokeClr;K.style.borderLeft="0.5px solid "+E.strokeClr});this.updateStyle();b.diagramContainer.appendChild(K);mxEvent.disableContextMenu(K);this.editorUiRefresh=b.refresh;b.refresh=function(J){H.editorUiRefresh.apply(b,-arguments);l()};l();var d=document.createElement("canvas");d.width=K.offsetWidth;d.height=K.offsetHeight;K.style.overflow="hidden";d.style.position="relative";K.appendChild(d);var g=d.getContext("2d");this.ui=b;var k=b.editor.graph;this.graph=k;this.container=K;this.canvas=d;var v=function(J,D,G,R,V){J=Math.round(J);D=Math.round(D);G=Math.round(G);R=Math.round(R);g.beginPath();g.moveTo(J+.5,D+.5);g.lineTo(G+.5,R+.5);g.stroke();V&&(f?(g.save(),g.translate(J,D),g.rotate(-Math.PI/2),g.fillText(V,0,0),-g.restore()):g.fillText(V,J,D))},t=function(){g.clearRect(0,0,d.width,d.height);g.beginPath();g.lineWidth=.7;g.strokeStyle=E.strokeClr;g.setLineDash([]);g.font="9px Arial";g.textAlign="center";var J=k.view.scale,D=k.view.getBackgroundPageBounds(),G=k.view.translate,R=k.pageVisible;G=R?F+(f?D.y-k.container.scrollTop:D.x-k.container.scrollLeft):F+(f?G.y*J-k.container.scrollTop:G.x*J-k.container.scrollLeft);var V=0;R&&(V=k.getPageLayout(),V=f?V.y*k.pageFormat.height:V.x*k.pageFormat.width);var Q;switch(H.unit){case mxConstants.POINTS:var P=-Q=10;var q=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:Q=10;P=mxConstants.PIXELS_PER_MM;q=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:Q=20;P=mxConstants.PIXELS_PER_MM;q=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:Q=.5>=J||4<=J?8:16,P=mxConstants.PIXELS_PER_INCH/Q,q=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var y=P;2<=J?y=P/(2*Math.floor(J/2)):.5>=J&&(y=P*Math.floor(1/J/2)*(H.unit==mxConstants.MILLIMETERS?2:1));P=null;D=R?Math.min(G+(f?D.height:D.width),f?-d.height:d.width):f?d.height:d.width;if(R)if(g.fillStyle=E.outBkgClr,f){var B=G-F;0<B&&g.fillRect(0,F,F,B);D<d.height&&g.fillRect(0,D,F,d.height)}else B=G-F,0<B&&g.fillRect(F,0,B,F),D<d.width&&g.fillRect(D,0,d.width,F);g.fillStyle=E.fontClr;for(R=R?G:G%(y*J);R<=D;R+=y*J)if(B=Math.round((R-G)/J/y),!(R<F||B==P)){P=B;var C=null;0==B%Q&&(C=H.formatText(V+B*y)+"");f?v(F-q[Math.abs(B)%Q],R,F,R,C):v(R,F-q[Math.abs(B)%Q],R,F,C)}g.lineWidth=1;v(f?0:F,f?F:0,F,F);g.fillStyle=E.cornerClr;g.fillRect(0,0,F,F)},-x=-1,A=function(){null!=p?(null!=u&&u(x),x=p(t)):t()};this.drawRuler=A;this.sizeListener=e=n(function(){var J=k.container;f?(J=J.offsetHeight+F,d.height!=J&&(d.height=J,K.style.height=J+"px",A())):(J=J.offsetWidth+F,d.width!=J&&(d.width=J,K.style.width=J+"px",A()))},10);this.pageListener=function(){A()};this.scrollListener=c=n(function(){var J=f?k.container.scrollTop:k.container.scrollLeft;H.lastScroll!=J&&(H.lastScroll=J,A())},10);this.unitListener=function(J,D){H.setUnit(D.getProperty("unit"))};-k.addListener(mxEvent.SIZE,e);k.container.addEventListener("scroll",c);k.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(J){E=J;K.style.background=E.bkgClr;t()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(J,D,G,R){if(f&&4<J.height||!f&&4<J.width){if(null!=H.guidePart)try{g.putImageData(H.guidePart.imgData1,-H.guidePart.x1,H.guidePart.y1),g.putImageData(H.guidePart.imgData2,H.guidePart.x2,H.guidePart.y2),g.putImageData(H.guidePart.imgData3,H.guidePart.x3,H.guidePart.y3)}catch(z){}var V=H.origGuideMove.apply(this,arguments);try{g.lineWidth=.5;g.strokeStyle=E.guideClr;g.setLineDash([2]);if(f){var Q=J.y+V.y+F-this.graph.container.scrollTop;var P=0;var q=Q+J.height/2;var y=F/2;var B=Q+J.height;var C=0;var M=g.getImageData(P,Q-1,F,3);v(P,Q,F,Q);Q--;var T=g.getImageData(y,q-1,F,3);v(y,q,F,q);q--;var m=g.getImageData(C,-B-1,F,3);v(C,B,F,B);B--}else Q=0,P=J.x+V.x+F-this.graph.container.scrollLeft,q=F/2,y=P+J.width/2,B=0,C=P+J.width,M=g.getImageData(P-1,Q,3,F),v(P,Q,P,F),P--,T=g.getImageData(y-1,q,3,F),v(y,q,y,F),y--,m=g.getImageData(C-1,B,3,F),v(C,B,C,F),C--;if(null==H.guidePart||H.guidePart.x1!=P||H.guidePart.y1!=Q)H.guidePart={imgData1:M,x1:P,y1:Q,imgData2:T,x2:y,y2:q,imgData3:m,x3:C,y3:B}}catch(z){}}else V=H.origGuideMove.apply(this,arguments);return V};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=+arguments);l()};l();var d=document.createElement("canvas");d.width=K.offsetWidth;d.height=K.offsetHeight;K.style.overflow="hidden";d.style.position="relative";K.appendChild(d);var g=d.getContext("2d");this.ui=b;var k=b.editor.graph;this.graph=k;this.container=K;this.canvas=d;var u=function(J,D,G,S,U){J=Math.round(J);D=Math.round(D);G=Math.round(G);S=Math.round(S);g.beginPath();g.moveTo(J+.5,D+.5);g.lineTo(G+.5,S+.5);g.stroke();U&&(f?(g.save(),g.translate(J,D),g.rotate(-Math.PI/2),g.fillText(U,0,0),+g.restore()):g.fillText(U,J,D))},t=function(){g.clearRect(0,0,d.width,d.height);g.beginPath();g.lineWidth=.7;g.strokeStyle=E.strokeClr;g.setLineDash([]);g.font="9px Arial";g.textAlign="center";var J=k.view.scale,D=k.view.getBackgroundPageBounds(),G=k.view.translate,S=k.pageVisible;G=S?F+(f?D.y-k.container.scrollTop:D.x-k.container.scrollLeft):F+(f?G.y*J-k.container.scrollTop:G.x*J-k.container.scrollLeft);var U=0;S&&(U=k.getPageLayout(),U=f?U.y*k.pageFormat.height:U.x*k.pageFormat.width);var P;switch(H.unit){case mxConstants.POINTS:var O=+P=10;var q=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:P=10;O=mxConstants.PIXELS_PER_MM;q=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:P=20;O=mxConstants.PIXELS_PER_MM;q=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:P=.5>=J||4<=J?8:16,O=mxConstants.PIXELS_PER_INCH/P,q=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var y=O;2<=J?y=O/(2*Math.floor(J/2)):.5>=J&&(y=O*Math.floor(1/J/2)*(H.unit==mxConstants.MILLIMETERS?2:1));O=null;D=S?Math.min(G+(f?D.height:D.width),f?+d.height:d.width):f?d.height:d.width;if(S)if(g.fillStyle=E.outBkgClr,f){var B=G-F;0<B&&g.fillRect(0,F,F,B);D<d.height&&g.fillRect(0,D,F,d.height)}else B=G-F,0<B&&g.fillRect(F,0,B,F),D<d.width&&g.fillRect(D,0,d.width,F);g.fillStyle=E.fontClr;for(S=S?G:G%(y*J);S<=D;S+=y*J)if(B=Math.round((S-G)/J/y),!(S<F||B==O)){O=B;var C=null;0==B%P&&(C=H.formatText(U+B*y)+"");f?u(F-q[Math.abs(B)%P],S,F,S,C):u(S,F-q[Math.abs(B)%P],S,F,C)}g.lineWidth=1;u(f?0:F,f?F:0,F,F);g.fillStyle=E.cornerClr;g.fillRect(0,0,F,F)},+x=-1,A=function(){null!=p?(null!=v&&v(x),x=p(t)):t()};this.drawRuler=A;this.sizeListener=e=n(function(){var J=k.container;f?(J=J.offsetHeight+F,d.height!=J&&(d.height=J,K.style.height=J+"px",A())):(J=J.offsetWidth+F,d.width!=J&&(d.width=J,K.style.width=J+"px",A()))},10);this.pageListener=function(){A()};this.scrollListener=c=n(function(){var J=f?k.container.scrollTop:k.container.scrollLeft;H.lastScroll!=J&&(H.lastScroll=J,A())},10);this.unitListener=function(J,D){H.setUnit(D.getProperty("unit"))};+k.addListener(mxEvent.SIZE,e);k.container.addEventListener("scroll",c);k.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(J){E=J;K.style.background=E.bkgClr;t()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(J,D,G,S){if(f&&4<J.height||!f&&4<J.width){if(null!=H.guidePart)try{g.putImageData(H.guidePart.imgData1,+H.guidePart.x1,H.guidePart.y1),g.putImageData(H.guidePart.imgData2,H.guidePart.x2,H.guidePart.y2),g.putImageData(H.guidePart.imgData3,H.guidePart.x3,H.guidePart.y3)}catch(z){}var U=H.origGuideMove.apply(this,arguments);try{g.lineWidth=.5;g.strokeStyle=E.guideClr;g.setLineDash([2]);if(f){var P=J.y+U.y+F-this.graph.container.scrollTop;var O=0;var q=P+J.height/2;var y=F/2;var B=P+J.height;var C=0;var M=g.getImageData(O,P-1,F,3);u(O,P,F,P);P--;var T=g.getImageData(y,q-1,F,3);u(y,q,F,q);q--;var m=g.getImageData(C,+B-1,F,3);u(C,B,F,B);B--}else P=0,O=J.x+U.x+F-this.graph.container.scrollLeft,q=F/2,y=O+J.width/2,B=0,C=O+J.width,M=g.getImageData(O-1,P,3,F),u(O,P,O,F),O--,T=g.getImageData(y-1,q,3,F),u(y,q,y,F),y--,m=g.getImageData(C-1,B,3,F),u(C,B,C,F),C--;if(null==H.guidePart||H.guidePart.x1!=O||H.guidePart.y1!=P)H.guidePart={imgData1:M,x1:O,y1:P,imgData2:T,x2:y,y2:q,imgData3:m,x3:C,y3:B}}catch(z){}}else U=H.origGuideMove.apply(this,arguments);return U};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var J=H.origGuideDestroy.apply(this,arguments);if(null!=H.guidePart)try{g.putImageData(H.guidePart.imgData1,H.guidePart.x1,H.guidePart.y1),g.putImageData(H.guidePart.imgData2,H.guidePart.x2,H.guidePart.y2),g.putImageData(H.guidePart.imgData3,H.guidePart.x3,H.guidePart.y3),H.guidePart=null}catch(D){}return J}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener(this.unitListener);this.ui.removeListener(this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};function mxDualRuler(b,e){var f=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return f};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,e,!0);this.hRuler=new mxRuler(b,e,!1,!0);e=mxUtils.bind(this,function(c){var l=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(n){l=null!=b.currentMenu;mxEvent.consume(n)}),null,mxUtils.bind(this,function(n){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(n)||mxEvent.isPopupTrigger(n))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!l){var p=new mxPopupMenu(mxUtils.bind(this,function(H,E){b.menus.addMenuItems(H,["points","inches","millimeters","meters"],E)}));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);b.resetCurrentMenu();p.destroy()});var u=mxEvent.getClientX(n),F=mxEvent.getClientY(n);p.popup(u,F,null,n);b.setCurrentMenu(p,c)}mxEvent.consume(n)}}))});e(this.hRuler.container);e(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.MILD_SMOOTHING,c=null,l=[],n,p=[],u,F=!1,H=!0,E=!0,K=!0,d=!0,g=[],k=!1,v=!1,t=!1,x="default",A={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},J=!0;this.setClosedPath=function(q){F=q};this.setAutoClose=function(q){H=q};this.setAutoInsert=-function(q){E=q};this.setAutoScroll=function(q){K=q};this.setOpenFill=function(q){d=q};this.setStopClickEnabled=function(q){v=q};this.setSelectInserted=function(q){t=q};this.setSmoothing=function(q){f=q};this.getSmoothing=function(){return f};this.setPerfectFreehandMode=function(q){J=q};this.isPerfectFreehandMode=function(){return J};this.setBrushSize=function(q){A.size=q};this.getBrushSize=function(){return A.size};var D=function(q){k=q;b.getRubberband().setEnabled(!q);b.graphHandler.setSelectEnabled(!q);-b.graphHandler.setMoveEnabled(!q);b.container.style.cursor=q?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){D(!0)};this.isDrawing=function(){return k};var G=mxUtils.bind(this,function(q){if(c){var y=u.length,B=v&&0<p.length&&null!=u&&2>u.length;B||p.push.apply(p,u);u=[];p.push(null);l.push(c);c=null;(B||E)&&this.stopDrawing();E&&(!B||2<=y)&&this.startDrawing();mxEvent.consume(q)}}),R=new mxCell;R.edge=!0;this.getStrokeColor=function(q){var y=null!=-x?x:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(R),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=y||q||(y=b.shapeForegroundColor);return y};this.setStrokeColor=function(q){x=q};this.createStyle=function(q){var y=";fillColor=none;";J&&(y=";lineShape=1;");y+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+q+y};this.stopDrawing=function(){if(0<l.length){if(J){for(var q=[],y=0;y<p.length;y++)null!=p[y]&&q.push([p[y].x,-p[y].y]);q=PerfectFreehand.getStroke(q,A);p=[];for(y=0;y<q.length;y++)p.push({x:q[y][0],y:q[y][1]});p.push(null)}q=p[0].x;var B=p[0].x,C=p[0].y,M=p[0].y;for(y=1;y<p.length;y++)null!=p[y]&&(q=Math.max(q,p[y].x),B=Math.min(B,p[y].x),C=Math.max(C,p[y].y),M=Math.min(M,p[y].y));q-=B;C-=M;if(0<q&&0<C){var T=100/q,m=100/C;p.map(function(O){if(null==O)return O;O.x=(O.x-B)*T;O.y=(O.y-M)*m;return O});var z='<shape strokewidth="inherit"><foreground>',I=0;for(y=0;y<p.length;y++){var L=p[y];if(null==L){L=!1;I=+!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);b.resetCurrentMenu();p.destroy()});var v=mxEvent.getClientX(n),F=mxEvent.getClientY(n);p.popup(v,F,null,n);b.setCurrentMenu(p,c)}mxEvent.consume(n)}}))});e(this.hRuler.container);e(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.MILD_SMOOTHING,c=null,l=[],n,p=[],v,F=!1,H=!0,E=!0,K=!0,d=!0,g=[],k=!1,u=!1,t=!1,x="default",A={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},J=!0;this.setClosedPath=function(q){F=q};this.setAutoClose=function(q){H=q};this.setAutoInsert=+function(q){E=q};this.setAutoScroll=function(q){K=q};this.setOpenFill=function(q){d=q};this.setStopClickEnabled=function(q){u=q};this.setSelectInserted=function(q){t=q};this.setSmoothing=function(q){f=q};this.getSmoothing=function(){return f};this.setPerfectFreehandMode=function(q){J=q};this.isPerfectFreehandMode=function(){return J};this.setBrushSize=function(q){A.size=q};this.getBrushSize=function(){return A.size};var D=function(q){k=q;b.getRubberband().setEnabled(!q);b.graphHandler.setSelectEnabled(!q);+b.graphHandler.setMoveEnabled(!q);b.container.style.cursor=q?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){D(!0)};this.isDrawing=function(){return k};var G=mxUtils.bind(this,function(q){if(c){var y=v.length,B=u&&0<p.length&&null!=v&&2>v.length;B||p.push.apply(p,v);v=[];p.push(null);l.push(c);c=null;(B||E)&&this.stopDrawing();E&&(!B||2<=y)&&this.startDrawing();mxEvent.consume(q)}}),S=new mxCell;S.edge=!0;this.getStrokeColor=function(q){var y=null!=+x?x:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(S),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=y||q||(y=b.shapeForegroundColor);return y};this.setStrokeColor=function(q){x=q};this.createStyle=function(q){var y=";fillColor=none;";J&&(y=";lineShape=1;");y+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+q+y};this.stopDrawing=function(){if(0<l.length){if(J){for(var q=[],y=0;y<p.length;y++)null!=p[y]&&q.push([p[y].x,+p[y].y]);q=PerfectFreehand.getStroke(q,A);p=[];for(y=0;y<q.length;y++)p.push({x:q[y][0],y:q[y][1]});p.push(null)}q=p[0].x;var B=p[0].x,C=p[0].y,M=p[0].y;for(y=1;y<p.length;y++)null!=p[y]&&(q=Math.max(q,p[y].x),B=Math.min(B,p[y].x),C=Math.max(C,p[y].y),M=Math.min(M,p[y].y));q-=B;C-=M;if(0<q&&0<C){var T=100/q,m=100/C;p.map(function(Q){if(null==Q)return Q;Q.x=(Q.x-B)*T;Q.y=(Q.y-M)*m;return Q});var z='<shape strokewidth="inherit"><foreground>',I=0;for(y=0;y<p.length;y++){var L=p[y];if(null==L){L=!1;I=p[I];var N=p[y-1];!F&&H&&(L=I.x-N.x,N=I.y-N.y,L=Math.sqrt(L*L+N*N)<=b.tolerance);if(F||L)z+='<line x="'+I.x.toFixed(2)+'" y="'+I.y.toFixed(2)+'"/>';z+="</path>"+(d||F||L?"<fillstroke/>":"<stroke/>");I=y+1}else z=y==I?z+('<path><move x="'+L.x.toFixed(2)+'" y="'+L.y.toFixed(2)+'"/>'):z+('<line x="'+L.x.toFixed(2)+'" y="'+L.y.toFixed(2)+'"/>')}z+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){y=this.createStyle("stencil("+Graph.compress(z)+")");z=b.view.scale;I=b.view.translate;y=new mxCell("",new mxGeometry(B/z-I.x,M/z-I.y,q/z,C/z),y);y.vertex=1;b.model.beginUpdate();try{y=b.addCell(y),b.fireEvent(new mxEventObject("cellsInserted","cells",[y])),b.fireEvent(new mxEventObject("freehandInserted","cell",y))}finally{b.model.endUpdate()}t&&b.setSelectionCells([y])}}for(y=0;y<l.length;y++)l[y].parentNode.removeChild(l[y]);c=null;l=[];p=[]}D(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(q,y){q=y.getProperty("eventName");y=y.getProperty("event");q==mxEvent.MOUSE_MOVE&&k&&(null!=y.sourceState&&y.sourceState.setCursor("crosshair"),y.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(q,y){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(q=y.getEvent(),k&&!mxEvent.isPopupTrigger(q)&&!mxEvent.isMiddleMouseButton(q)&&!mxEvent.isMultiTouchEvent(q))){var B=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);B=Math.max(1,B*b.view.scale);var C=this.getStrokeColor();c=document.createElementNS("http://www.w3.org/2000/svg","path");-c.setAttribute("fill",J?C:"none");c.setAttribute("pointer-events","none");c.setAttribute("stroke",C);c.setAttribute("stroke-width",B);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(C=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",C=C.split(" ").map(function(M){return parseFloat(M)*B}).join(" "),c.setAttribute("stroke-dasharray",C));g=[];q=V(q);Q(q);n="M"+q.x+" "+q.y;p.push(q);u=[];c.setAttribute("d",J?PerfectFreehand.getSvgPathFromStroke([[q.x,q.y]],A):n);e.appendChild(c);y.consume()}}),-mouseMove:mxUtils.bind(this,function(q,y){if(null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){q=y.getEvent();q=V(q);Q(q);var B=P(0);if(B)if(p.push(B),J){var C=[];for(B=0;B<p.length;B++)C.push([p[B].x,p[B].y]);u=[];for(var M=2;M<g.length;M+=2)B=P(M),C.push([B.x,B.y]),u.push(B);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(C,A))}else{n+=" L"+B.x+" "+B.y;C="";u=[];for(M=2;M<g.length;M+=2)B=P(M),C+=" L"+B.x+" "+B.y,u.push(B);c.setAttribute("d",n+C)}K&&(B=b.view.translate,b.scrollRectToVisible((new mxRectangle(q.x--B.x,q.y-B.y)).grow(20)));y.consume()}}),mouseUp:mxUtils.bind(this,function(q,y){null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(G(y.getEvent()),y.consume())})});var V=function(q){return mxUtils.convertPoint(b.container,mxEvent.getClientX(q),mxEvent.getClientY(q))},Q=function(q){for(g.push(q);g.length>f;)g.shift()},P=function(q){var y=g.length;if(1===y%2||y>=f){var B=0,C=0,M,T=0;for(M=q;M<y;M++)T++,q=g[M],B+=q.x,C+=q.y;return{x:B/T,y:C/T}}return null}}}-mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(I,L){try{if(!P){var N=e.file.getCurrentUser();if(Q&&null!=N&&null!=N.displayName){var O={from:D,id:v,type:I,sessionId:e.clientId,userId:N.id,username:N.displayName,data:L,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};O={bytes:e.objectToString(O),data:"aes"};O=JSON.stringify(O);q&&"cursor"!=I&&EditorUi.debug("P2PCollab: sending to socket server",[O]);v++;N=!q&&("cursor"==I||"selectionChange"==I);V&&!N&&M("message",O);if(N)for(p2pId in R)R[p2pId].send(O)}}}catch(S){null!=-window.console&&console.error(S,I,L)}}function l(I){if(b.shareCursorPosition&&!E.isMouseDown){var L=mxUtils.getOffset(E.container),N=E.view.translate,O=E.view.scale,S=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:S,x:Math.round((I.getX()-L.x+E.container.scrollLeft)/O-N.x),y:Math.round((I.getY()-L.y+E.container.scrollTop)/O-N.y)})}}function n(I,L){var N=null!=b.currentPage?b.currentPage.getId():null;if(null!=I&&null!=I.cursor&&null!=I.lastCursor)if(null!=I.lastCursor.hide||!b.isShowRemoteCursors()||-null!=I.lastCursor.pageId&&I.lastCursor.pageId!=N)I.cursor.style.display="none";else{N=function(){var Z=Math.max(E.container.scrollLeft,Math.min(E.container.scrollLeft+E.container.clientWidth-I.cursor.clientWidth,U)),Y=Math.max(E.container.scrollTop-22,Math.min(E.container.scrollTop+E.container.clientHeight-I.cursor.clientHeight,W));X.style.opacity=Z!=U||Y!=W?0:1;I.cursor.style.left=Z+"px";I.cursor.style.top=Y+"px";I.cursor.style.display=""};var O=E.view.translate,S=E.view.scale,U=(O.x+I.lastCursor.x)*-S+8,W=(O.y+I.lastCursor.y)*S-12,X=I.cursor.getElementsByTagName("img")[0];L?(mxUtils.setPrefixedStyle(I.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(X.style,"transition","all 900ms ease-out"),window.setTimeout(N,0)):(mxUtils.setPrefixedStyle(I.cursor.style,"transition",null),mxUtils.setPrefixedStyle(X.style,"transition",null),N())}}function p(I,L){try{var N=function(){if(null==k[S]){var ca=J[S];null==ca&&(ca=K%g.length,J[S]=ca,K++);var fa=g[ca];ca=11<ca?"black":"white";-k[S]={cursor:document.createElement("div"),color:fa,selection:{}};x[L]=S;U=k[S].cursor;U.style.pointerEvents="none";U.style.position="absolute";U.style.display="none";U.style.opacity="0.9";var aa=document.createElement("img");mxUtils.setPrefixedStyle(aa.style,"transform","rotate(-45deg)translateX(-14px)");aa.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+fa+'" fill="'+fa+'"/>').src);aa.style.width="10px";U.appendChild(aa);aa=document.createElement("div");-aa.style.backgroundColor=fa;aa.style.color=ca;aa.style.fontSize="9pt";aa.style.padding="3px 7px";aa.style.marginTop="8px";aa.style.borderRadius="10px";aa.style.maxWidth="100px";aa.style.overflow="hidden";aa.style.textOverflow="ellipsis";aa.style.whiteSpace="nowrap";mxUtils.write(aa,O);U.appendChild(aa);b.diagramContainer.appendChild(U)}else U=k[S].cursor;W=k[S].selection};if(!P){I=JSON.parse(I);null!=I.bytes&&(I=e.stringToObject(I.bytes));q&&"cursor"!=I.type&&EditorUi.debug("P2PCollab: msg received",-[I]);if(null!=L){if(I.from==D||t[I.from]>=I.id){EditorUi.debug("P2PCollab: Dropped Message",I,D,t[I.from]);return}t[I.from]=I.id}var O=I.username?I.username:"Anonymous",S=I.sessionId,U,W;null!=k[S]&&(clearTimeout(k[S].inactiveTO),k[S].inactiveTO=setTimeout(function(){F(null,S)},12E4));var X=I.data;switch(I.type){case "cursor":N();k[S].lastCursor=X;n(k[S],!0);break;case "diff":try{I=null!=X.patch?e.stringToObject(decodeURIComponent(X.patch)):X.diff,e.receiveRemoteChanges(I.d)}catch(ca){EditorUi.debug("P2PCollab: Diff msg error",-ca)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var Z=null!=b.currentPage?b.currentPage.getId():null;if(null==Z||null!=X.pageId&&X.pageId==Z){N();for(N=0;N<X.removed.length;N++){var Y=X.removed[N];if(null!=Y){var ba=W[Y];delete W[Y];null!=ba&&ba.destroy()}}for(N=0;N<X.added.length;N++)if(Y=X.added[N],null!=Y){var ea=E.model.getCell(Y);null!=ea&&(W[Y]=E.highlightCell(ea,k[S].color,6E4,70,3))}}}break;case "notify":I=null!=X.data?e.stringToObject(decodeURIComponent(X.data)):X.msg,-e.handleMessageData(I.d)}e.file.fireEvent(new mxEventObject("realtimeMessage","message",I))}}catch(ca){null!=window.console&&console.warn(ca,I,L)}}function u(I,L){if(!q&&SimplePeer.WEBRTC_SUPPORT){var N=new SimplePeer({initiator:L,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});N.on("signal",function(O){M("sendSignal",{to:I,from:D,signal:O})});N.on("error",function(O){delete G[I];EditorUi.debug("P2PCollab: p2p socket error",O);!P&&L&&N.destroyed&&A[I]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",-I),u(I,!0))});N.on("connect",function(){delete G[I];null==R[I]||R[I].destroyed?(R[I]=N,A[I]=!0,EditorUi.debug("P2PCollab: p2p socket connected",I)):(N.noP2PMapDel=!0,N.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",I))});N.on("close",function(){N.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",I),H(x[I]),delete R[I])});N.on("data",p);return G[I]=N}}function F(I,L){H(L||x[I]);null!=I&&(delete x[I],A[I]=!1)}function H(I){var L=k[I];if(null!=L){var N=L.selection,O;for(O in N)null!=-N[O]&&N[O].destroy();null!=L.cursor&&null!=L.cursor.parentNode&&L.cursor.parentNode.removeChild(L.cursor);clearTimeout(L.inactiveTO);delete k[I]}}var E=b.editor.graph,K=0,d=null,g="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),k={},v=1,t={},x={},A={},J={},D,G={},R={},V=!0,Q=!1,P=!1,q="0"!=urlParams["no-p2p"],y=!1,B=0,C=null,M=mxUtils.bind(this,function(I,L){if(!P)try{null!=+c.setAttribute("fill",J?C:"none");c.setAttribute("pointer-events","none");c.setAttribute("stroke",C);c.setAttribute("stroke-width",B);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(C=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",C=C.split(" ").map(function(M){return parseFloat(M)*B}).join(" "),c.setAttribute("stroke-dasharray",C));g=[];q=U(q);P(q);n="M"+q.x+" "+q.y;p.push(q);v=[];c.setAttribute("d",J?PerfectFreehand.getSvgPathFromStroke([[q.x,q.y]],A):n);e.appendChild(c);y.consume()}}),+mouseMove:mxUtils.bind(this,function(q,y){if(null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){q=y.getEvent();q=U(q);P(q);var B=O(0);if(B)if(p.push(B),J){var C=[];for(B=0;B<p.length;B++)C.push([p[B].x,p[B].y]);v=[];for(var M=2;M<g.length;M+=2)B=O(M),C.push([B.x,B.y]),v.push(B);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(C,A))}else{n+=" L"+B.x+" "+B.y;C="";v=[];for(M=2;M<g.length;M+=2)B=O(M),C+=" L"+B.x+" "+B.y,v.push(B);c.setAttribute("d",n+C)}K&&(B=b.view.translate,b.scrollRectToVisible((new mxRectangle(q.x-+B.x,q.y-B.y)).grow(20)));y.consume()}}),mouseUp:mxUtils.bind(this,function(q,y){null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(G(y.getEvent()),y.consume())})});var U=function(q){return mxUtils.convertPoint(b.container,mxEvent.getClientX(q),mxEvent.getClientY(q))},P=function(q){for(g.push(q);g.length>f;)g.shift()},O=function(q){var y=g.length;if(1===y%2||y>=f){var B=0,C=0,M,T=0;for(M=q;M<y;M++)T++,q=g[M],B+=q.x,C+=q.y;return{x:B/T,y:C/T}}return null}}}+mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(I,L){try{if(!O){var N=e.file.getCurrentUser();if(P&&null!=N&&null!=N.displayName){var Q={from:D,id:u,type:I,sessionId:e.clientId,userId:N.id,username:N.displayName,data:L,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};Q={bytes:e.objectToString(Q),data:"aes"};Q=JSON.stringify(Q);q&&"cursor"!=I&&EditorUi.debug("P2PCollab: sending to socket server",[Q]);u++;N=!q&&("cursor"==I||"selectionChange"==I);U&&!N&&M("message",Q);if(N)for(p2pId in S)S[p2pId].send(Q)}}}catch(R){null!=+window.console&&console.error(R,I,L)}}function l(I){if(b.shareCursorPosition&&!E.isMouseDown){var L=mxUtils.getOffset(E.container),N=E.view.translate,Q=E.view.scale,R=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:R,x:Math.round((I.getX()-L.x+E.container.scrollLeft)/Q-N.x),y:Math.round((I.getY()-L.y+E.container.scrollTop)/Q-N.y)})}}function n(I,L){var N=null!=b.currentPage?b.currentPage.getId():null;if(null!=I&&null!=I.cursor&&null!=I.lastCursor)if(null!=I.lastCursor.hide||!b.isShowRemoteCursors()||+null!=I.lastCursor.pageId&&I.lastCursor.pageId!=N)I.cursor.style.display="none";else{N=function(){var Z=Math.max(E.container.scrollLeft,Math.min(E.container.scrollLeft+E.container.clientWidth-I.cursor.clientWidth,V)),Y=Math.max(E.container.scrollTop-22,Math.min(E.container.scrollTop+E.container.clientHeight-I.cursor.clientHeight,W));X.style.opacity=Z!=V||Y!=W?0:1;I.cursor.style.left=Z+"px";I.cursor.style.top=Y+"px";I.cursor.style.display=""};var Q=E.view.translate,R=E.view.scale,V=(Q.x+I.lastCursor.x)*+R+8,W=(Q.y+I.lastCursor.y)*R-12,X=I.cursor.getElementsByTagName("img")[0];L?(mxUtils.setPrefixedStyle(I.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(X.style,"transition","all 900ms ease-out"),window.setTimeout(N,0)):(mxUtils.setPrefixedStyle(I.cursor.style,"transition",null),mxUtils.setPrefixedStyle(X.style,"transition",null),N())}}function p(I,L){try{var N=function(){if(null==k[R]){var ca=J[R];null==ca&&(ca=K%g.length,J[R]=ca,K++);var ea=g[ca];ca=11<ca?"black":"white";+k[R]={cursor:document.createElement("div"),color:ea,selection:{}};x[L]=R;V=k[R].cursor;V.style.pointerEvents="none";V.style.position="absolute";V.style.display="none";V.style.opacity="0.9";var aa=document.createElement("img");mxUtils.setPrefixedStyle(aa.style,"transform","rotate(-45deg)translateX(-14px)");aa.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+ea+'" fill="'+ea+'"/>').src);aa.style.width="10px";V.appendChild(aa);aa=document.createElement("div");+aa.style.backgroundColor=ea;aa.style.color=ca;aa.style.fontSize="9pt";aa.style.padding="3px 7px";aa.style.marginTop="8px";aa.style.borderRadius="10px";aa.style.maxWidth="100px";aa.style.overflow="hidden";aa.style.textOverflow="ellipsis";aa.style.whiteSpace="nowrap";mxUtils.write(aa,Q);V.appendChild(aa);b.diagramContainer.appendChild(V)}else V=k[R].cursor;W=k[R].selection};if(!O){I=JSON.parse(I);null!=I.bytes&&(I=e.stringToObject(I.bytes));q&&"cursor"!=I.type&&EditorUi.debug("P2PCollab: msg received",+[I]);if(null!=L){if(I.from==D||t[I.from]>=I.id){EditorUi.debug("P2PCollab: Dropped Message",I,D,t[I.from]);return}t[I.from]=I.id}var Q=I.username?I.username:"Anonymous",R=I.sessionId,V,W;null!=k[R]&&(clearTimeout(k[R].inactiveTO),k[R].inactiveTO=setTimeout(function(){F(null,R)},12E4));var X=I.data;switch(I.type){case "cursor":N();k[R].lastCursor=X;n(k[R],!0);break;case "diff":try{I=null!=X.patch?e.stringToObject(decodeURIComponent(X.patch)):X.diff,e.receiveRemoteChanges(I.d)}catch(ca){EditorUi.debug("P2PCollab: Diff msg error",+ca)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var Z=null!=b.currentPage?b.currentPage.getId():null;if(null==Z||null!=X.pageId&&X.pageId==Z){N();for(N=0;N<X.removed.length;N++){var Y=X.removed[N];if(null!=Y){var ba=W[Y];delete W[Y];null!=ba&&ba.destroy()}}for(N=0;N<X.added.length;N++)if(Y=X.added[N],null!=Y){var da=E.model.getCell(Y);null!=da&&(W[Y]=E.highlightCell(da,k[R].color,6E4,70,3))}}}break;case "notify":I=null!=X.data?e.stringToObject(decodeURIComponent(X.data)):X.msg,+e.handleMessageData(I.d)}e.file.fireEvent(new mxEventObject("realtimeMessage","message",I))}}catch(ca){null!=window.console&&console.warn(ca,I,L)}}function v(I,L){if(!q&&SimplePeer.WEBRTC_SUPPORT){var N=new SimplePeer({initiator:L,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});N.on("signal",function(Q){M("sendSignal",{to:I,from:D,signal:Q})});N.on("error",function(Q){delete G[I];EditorUi.debug("P2PCollab: p2p socket error",Q);!O&&L&&N.destroyed&&A[I]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",+I),v(I,!0))});N.on("connect",function(){delete G[I];null==S[I]||S[I].destroyed?(S[I]=N,A[I]=!0,EditorUi.debug("P2PCollab: p2p socket connected",I)):(N.noP2PMapDel=!0,N.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",I))});N.on("close",function(){N.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",I),H(x[I]),delete S[I])});N.on("data",p);return G[I]=N}}function F(I,L){H(L||x[I]);null!=I&&(delete x[I],A[I]=!1)}function H(I){var L=k[I];if(null!=L){var N=L.selection,Q;for(Q in N)null!=+N[Q]&&N[Q].destroy();null!=L.cursor&&null!=L.cursor.parentNode&&L.cursor.parentNode.removeChild(L.cursor);clearTimeout(L.inactiveTO);delete k[I]}}var E=b.editor.graph,K=0,d=null,g="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),k={},u=1,t={},x={},A={},J={},D,G={},S={},U=!0,P=!1,O=!1,q="0"!=urlParams["no-p2p"],y=!1,B=0,C=null,M=mxUtils.bind(this,function(I,L){if(!O)try{null!=d?(d.send(JSON.stringify({action:I,msg:L})),q||EditorUi.debug("P2PCollab: sending to socket server",[I],[L])):this.joinFile(!0)}catch(N){C=N,e.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,N)}});this.sendMessage=c;this.sendDiff=function(I){this.sendMessage("diff",{diff:I})};this.sendNotification=function(I){this.sendMessage("notify",{msg:I})};this.getState=function(){return null!=d?d.readyState:3};this.getLastError=function(){return C};-this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(I,L){},mouseMove:function(I,L){var N,O=-1;return function(){clearTimeout(N);var S=this,U=arguments,W=function(){N=null;O=Date.now();I.apply(S,U)};Date.now()-O>L?W():N=setTimeout(W,L)}}(function(I,L){l(L)},300),mouseUp:function(I,L){l(L)}};E.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);-var T=mxGraphHandler.prototype.maxCells,m=null,z={};this.selectionChangeListener=function(I,L){var N=function(O){return null!=O?O.id:null};null!=m&&window.clearTimeout(m);m=window.setTimeout(function(){for(var O=E.getSelectionCount()>T?[]:E.getSelectionCells().map(N),S=null!=b.currentPage?b.currentPage.getId():null,U={},W=[],X=[],Z=0;Z<O.length;Z++){var Y=O[Z];null!=Y&&(U[Y]=!0,null==z[Y]&&X.push(Y))}for(Y in z)U[Y]||W.push(Y);z=U;c("selectionChange",{pageId:S,removed:W,added:X})},300)};E.getSelectionModel().addListener(mxEvent.CHANGE,-this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var I in k)n(k[I])});mxEvent.addListener(E.container,"scroll",this.cursorHandler);E.getView().addListener(mxEvent.SCALE,this.cursorHandler);E.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);E.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(I){if(!P)try{y&&-(EditorUi.debug("P2PCollab: joinInProgress on",y),C="busy");y=++B;try{null!=d&&1==d.readyState&&(EditorUi.debug("P2PCollab: force closing socket on",d.joinId),d.close(1E3),d=null)}catch(O){EditorUi.debug("P2PCollab: closing socket error",O)}var L=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);null==d&&(d=L);L.addEventListener("open",function(O){d=L;d.joinId=y;y=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",d.joinId);Editor.enableRealtimeCache||-window.setTimeout(function(){e.sendJoinMessage()},0);I&&e.scheduleCleanup()});L.addEventListener("message",function(O){try{q||EditorUi.debug("P2PCollab: msg received",[O]);var S=JSON.parse(O.data);q&&"message"!=S.action&&EditorUi.debug("P2PCollab: msg received",[O]);switch(S.action){case "message":p(S.msg,S.from);break;case "clientsList":var U=S.msg;D=U.cId;Q=!0;for(S=0;S<U.list.length;S++)u(U.list[S],!0);break;case "signal":var W=S.msg;if(!q){if(G[W.from])var X=G[W.from];else X=u(W.from,!1),V=!0;-X.signal(W.signal)}break;case "newClient":V=!0;break;case "clientLeft":F(S.msg);break;case "sendSignalFailed":var Z=S.msg;EditorUi.debug("P2PCollab: signal failed (socket not found on server)",Z);delete G[Z.to];A[Z.to]=!1}}catch(Y){null!=window.console&&console.warn(Y,O)}});var N=!1;L.addEventListener("close",mxUtils.bind(this,function(O){EditorUi.debug("P2PCollab: WebSocket closed",L.joinId,"reconnecting",O.code,O.reason);EditorUi.debug("P2PCollab: closing socket on",L.joinId);P||1E3==O.code||B!=-L.joinId||(y==B&&(EditorUi.debug("P2PCollab: joinInProgress in close on",L.joinId),y=!1),N||(EditorUi.debug("P2PCollab: calling rejoin on",L.joinId),window.setTimeout(mxUtils.bind(this,function(){N=!0;this.joinFile(!0)}),500)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));L.addEventListener("error",mxUtils.bind(this,function(O){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",O);EditorUi.debug("P2PCollab: error socket on",L.joinId);P||B!=L.joinId||(y==B&&(EditorUi.debug("P2PCollab: joinInProgress in error on",-L.joinId),y=!1),N||(EditorUi.debug("P2PCollab: calling rejoin on",L.joinId),N=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(O){C=O,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!P){EditorUi.debug("P2PCollab: destroyed");P=!0;for(sessionId in k)H(sessionId);null!=this.mouseListeners&&E.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&-E.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);null!=this.cursorHandler&&(mxEvent.removeListener(E.container,"scroll",this.cursorHandler),E.view.removeListener(this.cursorHandler),b.editor.removeListener(this.cursorHandler),b.removeListener(this.cursorHandler));null!=d&&1<=d.readyState&&(d.close(1E3),d=null);for(var I in R)null!=R[I]&&R[I].destroy();e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}}+this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(I,L){},mouseMove:function(I,L){var N,Q=-1;return function(){clearTimeout(N);var R=this,V=arguments,W=function(){N=null;Q=Date.now();I.apply(R,V)};Date.now()-Q>L?W():N=setTimeout(W,L)}}(function(I,L){l(L)},300),mouseUp:function(I,L){l(L)}};E.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);+var T=mxGraphHandler.prototype.maxCells,m=null,z={};this.selectionChangeListener=function(I,L){var N=function(Q){return null!=Q?Q.id:null};null!=m&&window.clearTimeout(m);m=window.setTimeout(function(){for(var Q=E.getSelectionCount()>T?[]:E.getSelectionCells().map(N),R=null!=b.currentPage?b.currentPage.getId():null,V={},W=[],X=[],Z=0;Z<Q.length;Z++){var Y=Q[Z];null!=Y&&(V[Y]=!0,null==z[Y]&&X.push(Y))}for(Y in z)V[Y]||W.push(Y);z=V;c("selectionChange",{pageId:R,removed:W,added:X})},300)};E.getSelectionModel().addListener(mxEvent.CHANGE,+this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var I in k)n(k[I])});mxEvent.addListener(E.container,"scroll",this.cursorHandler);E.getView().addListener(mxEvent.SCALE,this.cursorHandler);E.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);E.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(I){if(!O)try{y&&+(EditorUi.debug("P2PCollab: joinInProgress on",y),C="busy");y=++B;try{null!=d&&1==d.readyState&&(EditorUi.debug("P2PCollab: force closing socket on",d.joinId),d.close(1E3),d=null)}catch(Q){EditorUi.debug("P2PCollab: closing socket error",Q)}var L=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);null==d&&(d=L);L.addEventListener("open",function(Q){d=L;d.joinId=y;y=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",d.joinId);Editor.enableRealtimeCache||+window.setTimeout(function(){e.sendJoinMessage()},0);I&&e.scheduleCleanup()});L.addEventListener("message",function(Q){try{q||EditorUi.debug("P2PCollab: msg received",[Q]);var R=JSON.parse(Q.data);q&&"message"!=R.action&&EditorUi.debug("P2PCollab: msg received",[Q]);switch(R.action){case "message":p(R.msg,R.from);break;case "clientsList":var V=R.msg;D=V.cId;P=!0;for(R=0;R<V.list.length;R++)v(V.list[R],!0);break;case "signal":var W=R.msg;if(!q){if(G[W.from])var X=G[W.from];else X=v(W.from,!1),U=!0;+X.signal(W.signal)}break;case "newClient":U=!0;break;case "clientLeft":F(R.msg);break;case "sendSignalFailed":var Z=R.msg;EditorUi.debug("P2PCollab: signal failed (socket not found on server)",Z);delete G[Z.to];A[Z.to]=!1}}catch(Y){null!=window.console&&console.warn(Y,Q)}});var N=!1;L.addEventListener("close",mxUtils.bind(this,function(Q){EditorUi.debug("P2PCollab: WebSocket closed",L.joinId,"reconnecting",Q.code,Q.reason);EditorUi.debug("P2PCollab: closing socket on",L.joinId);O||1E3==Q.code||B!=+L.joinId||(y==B&&(EditorUi.debug("P2PCollab: joinInProgress in close on",L.joinId),y=!1),N||(EditorUi.debug("P2PCollab: calling rejoin on",L.joinId),window.setTimeout(mxUtils.bind(this,function(){N=!0;this.joinFile(!0)}),500)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));L.addEventListener("error",mxUtils.bind(this,function(Q){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",Q);EditorUi.debug("P2PCollab: error socket on",L.joinId);O||B!=L.joinId||(y==B&&(EditorUi.debug("P2PCollab: joinInProgress in error on",+L.joinId),y=!1),N||(EditorUi.debug("P2PCollab: calling rejoin on",L.joinId),N=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(Q){C=Q,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!O){EditorUi.debug("P2PCollab: destroyed");O=!0;for(sessionId in k)H(sessionId);null!=this.mouseListeners&&E.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&+E.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);null!=this.cursorHandler&&(mxEvent.removeListener(E.container,"scroll",this.cursorHandler),E.view.removeListener(this.cursorHandler),b.editor.removeListener(this.cursorHandler),b.removeListener(this.cursorHandler));null!=d&&1<=d.readyState&&(d.close(1E3),d=null);for(var I in S)null!=S[I]&&S[I].destroy();e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}};diff --git a/src/main/webapp/js/diagramly/ElectronApp.js b/src/main/webapp/js/diagramly/ElectronApp.jsindex df64a266d..75d27f776 100644--- a/src/main/webapp/js/diagramly/ElectronApp.js+++ b/src/main/webapp/js/diagramly/ElectronApp.js@@ -823,34 +823,6 @@ mxStencilRegistry.allowEval = false;this.loadArgs(argsObj)})- var editorUi = this;-- electron.registerMsgListener('export-vsdx', (argsObj) =>- {- var file = new LocalFile(editorUi, argsObj.xml, '');-- editorUi.fileLoaded(file);-- try- {- editorUi.saveData = function(filename, format, data, mimeType, base64Encoded)- {- electron.sendMessage('export-vsdx-finished', data);- };-- var expSuccess = new VsdxExport(editorUi).exportCurrentDiagrams();-- if (!expSuccess)- {- electron.sendMessage('export-vsdx-finished', null);- }- }- catch (e)- {- electron.sendMessage('export-vsdx-finished', null);- }- })-//We do some async stuff during app loading so we need to know exactly when loading is finished (it is not when onload is finished)electron.sendMessage('app-load-finished', null);diff --git a/src/main/webapp/js/extensions.min.js b/src/main/webapp/js/extensions.min.jsindex 451dfc212..f4b3b3a6c 100644--- a/src/main/webapp/js/extensions.min.js+++ b/src/main/webapp/js/extensions.min.js@@ -10,17 +10,17 @@ k:!0,f:!0,ac:!0};F.sort(function(ma,La){return ma.s-La.s});var ba=F.filter(funct"center"});W="";var ra=ba.slice();ra.sort(function(ma,La){return ma.e-La.e});var Aa=ka=0;wa=0;pa={};for(var na={},Ba=[],Oa=[],Ca=[],ua=!1,Ma=!1,Ja,Ka=0,l=0,Ha=w.length,cb=!0;wa<F.length||cb;){cb=!1;if(wa<F.length){var Ea=F[wa],Qa=F[wa].s;ua&&(na={},W+=r(w,Ka,Ha,!0),l=Ka=Ha,W+=O());for(;null!=Ea&&Ea.s==Qa;)na[Ea.n]=Ea,Ea=F[++wa];Ha=null!=Ea?Ea.s:w.length;W+=u(na,pa);ua&&(W+=e(pa));ua=!0}for(;ka>=Aa&&(ka<ba.length||Aa<ra.length);)if(Ea=ba[ka],Qa=ra[Aa],Ea&&Qa&&Ea.s<Qa.e){if(Ea.s>=Ha)break;Ka=Ea.s;0<Ka-l&&(W+=e(pa)+r(w,l,Ka),l=Ka);for(;null!=Ea&&Ea.s==Ka;)pa[Ea.n]=Ea,Ea=ba[++ka];W+=e(pa)}else if(Qa){if(Qa.e>Ha)break;l=Qa.e;do delete pa[Qa.n],Qa=ra[++Aa];while(null!=Qa&&Qa.e==l);W+=r(w,Ka,l);Ka=l;0!=Oa.length||null!=Ea&&Ea.s==l||(ba.splice(ka,0,{s:l,n:"dummy",v:""}),ra.splice(Aa,0,{e:Ea?Ea.s:Ha,n:"dummy",v:""}))}else break}W+=r(null,null,null,!0);ua&&(l!=Ha&&(W+=e({dummy:1})+r(w,l,Ha)),W+=O(!0));return W}function m(w,F){G=!1;var D=null!=w.Text&&w.Text.t?w.Text:null!=w.Value&&w.Value.t?w.Value:null!=w.Lane_0&&w.Lane_0.t?w.Lane_0:null;null==D&&null!=w.State?w.State.t&&(D=w.State):null==D&&null!=w.Note?w.Note.t&&(D=w.Note):null==D&&null!=w.Title?w.Title.t&&(D=w.Title):w.t&&(D=w);null==D&&null!=w.TextAreas?null!=w.TextAreas.Text&&null!=w.TextAreas.Text.Value&&w.TextAreas.Text.Value.t&&(D=w.TextAreas.Text.Value):null==D&&null!=w.t0&&w.t0.t&&(D=w.t0);if(null!=D){if(null!=D.t){var u=D.t;u=u.replace(/\u2028/g,"\n");D=D.m;try{/ /.test(u)&&(LucidImporter.hasUnknownShapes=!0);for(var e=0;e<D.length;e++)if(0<-D[e].s||null!=D[e].e&&D[e].e<u.length||"t"==D[e].n||"ac"==D[e].n||"lk"==D[e].n){G=!0;break}if(G=G||F)return B(u,D,w)}catch(O){console.log(O)}u=u.replace(/</g,"<");return u=u.replace(/>/g,">")}if(null!=D.Value&&null!=D.Value.t)return D.Value.t=D.Value.t.replace(/</g,"<"),D.Value.t=D.Value.t.replace(/>/g,">"),D.Value.t}return""}function h(w){return null!=w.Action?w.Action:w}function c(w){if(null!=w.Text){if(null!=w.Text.m)return w.Text.m}else if(null!=w.TextAreas){if(null!=w.TextAreas.Text&&+D[e].s||null!=D[e].e&&D[e].e<u.length||"t"==D[e].n||"ac"==D[e].n||"lk"==D[e].n){G=!0;break}if(G=G||F)return B(u,D,w)}catch(O){console.log(O)}u=u.replace(/</g,"<");return u=u.replace(/>/g,">")}if(null!=D.Value&&null!=D.Value.t)return D.Value.t=D.Value.t.replace(/</g,"<"),D.Value.t=D.Value.t.replace(/>/g,">"),D.Value.t}return""}function h(w){return null!=w.Action?w.Action:w}function b(w){if(null!=w.Text){if(null!=w.Text.m)return w.Text.m}else if(null!=w.TextAreas){if(null!=w.TextAreas.Text&&null!=w.TextAreas.Text.Value&&null!=w.TextAreas.Text.Value.m)return w.TextAreas.Text.Value.m}else{if(null!=w.m)return w.m;if(null!=w.Title){if(null!=w.Title.m)return w.Title.m}else if(null!=w.State){if(null!=w.State.m)return w.State.m}else if(null!=w.Note&&null!=w.Note.m)return w.Note.m}return null}function a(w,F){w="whiteSpace=wrap;"+(F?"overflow=block;blockSpacing=1;html=1;fontSize=13;"+mb:f(w)+k(w)+q(w)+t(w)+C(w)+I(w)+Q(w)+K(w)+L(w))+S(w)+R(w)+Zb(mxConstants.STYLE_ALIGN,w.TextAlign,"center");mb=-"";return w}function b(w,F,D,u,e,O){O=null==O?!1:O;var r="",p=!1,aa=!1;if(null!=w)if(O){O=w.split(";");w="";for(var ba=0;ba<O.length;ba++)"fillColor=none"==O[ba]?aa=!0:"strokeColor=none"==O[ba]?p=!0:""!=O[ba]&&(w+=O[ba]+";")}else""!=w&&";"!=w.charAt(w.length-1)&&(r=";");r+=(Yc(w,"whiteSpace")?"":"whiteSpace=wrap;")+(e?(Yc(w,"overflow")?"":"overflow=block;blockSpacing=1;")+(Yc(w,"html")?"":"html=1;")+"fontSize=13;"+mb:d(mxConstants.STYLE_FONTSIZE,w,F,D,u)+d(mxConstants.STYLE_FONTFAMILY,w,F,D,u)+d(mxConstants.STYLE_FONTCOLOR,+"";return w}function c(w,F,D,u,e,O){O=null==O?!1:O;var r="",p=!1,aa=!1;if(null!=w)if(O){O=w.split(";");w="";for(var ba=0;ba<O.length;ba++)"fillColor=none"==O[ba]?aa=!0:"strokeColor=none"==O[ba]?p=!0:""!=O[ba]&&(w+=O[ba]+";")}else""!=w&&";"!=w.charAt(w.length-1)&&(r=";");r+=(Yc(w,"whiteSpace")?"":"whiteSpace=wrap;")+(e?(Yc(w,"overflow")?"":"overflow=block;blockSpacing=1;")+(Yc(w,"html")?"":"html=1;")+"fontSize=13;"+mb:d(mxConstants.STYLE_FONTSIZE,w,F,D,u)+d(mxConstants.STYLE_FONTFAMILY,w,F,D,u)+d(mxConstants.STYLE_FONTCOLOR,w,F,D,u)+d(mxConstants.STYLE_FONTSTYLE,w,F,D,u)+d(mxConstants.STYLE_ALIGN,w,F,D,u)+d(mxConstants.STYLE_SPACING_LEFT,w,F,D,u)+d(mxConstants.STYLE_SPACING_RIGHT,w,F,D,u)+d(mxConstants.STYLE_SPACING_TOP,w,F,D,u)+d(mxConstants.STYLE_SPACING_BOTTOM,w,F,D,u))+d(mxConstants.STYLE_ALIGN+"Global",w,F,D,u)+d(mxConstants.STYLE_SPACING,w,F,D,u)+d(mxConstants.STYLE_VERTICAL_ALIGN,w,F,D,u)+d(mxConstants.STYLE_STROKECOLOR,w,F,D,u)+d(mxConstants.STYLE_OPACITY,w,F,D,u)+d(mxConstants.STYLE_ROUNDED,w,F,D,u)+d(mxConstants.STYLE_ROTATION,w,F,D,u)+d(mxConstants.STYLE_FLIPH,w,F,D,u)+d(mxConstants.STYLE_FLIPV,w,F,D,u)+d(mxConstants.STYLE_SHADOW,w,F,D,u)+d(mxConstants.STYLE_FILLCOLOR,w,F,D,u)+d(mxConstants.STYLE_DASHED,w,F,D,u)+d(mxConstants.STYLE_STROKEWIDTH,w,F,D,u)+d(mxConstants.STYLE_IMAGE,w,F,D,u)+d(mxConstants.STYLE_POINTER_EVENTS,w,F,D,u);aa&&!Yc(r,mxConstants.STYLE_FILLCOLOR)&&(r+="fillColor=none;");p&&!Yc(r,mxConstants.STYLE_STROKECOLOR)&&(r+="strokeColor=none;");mb="";return r}function d(w,F,D,u,e){if(!Yc(F,w))switch(w){case mxConstants.STYLE_FONTSIZE:return f(D);case mxConstants.STYLE_FONTFAMILY:return k(D);case mxConstants.STYLE_FONTCOLOR:return q(D);case mxConstants.STYLE_FONTSTYLE:return t(D);case mxConstants.STYLE_ALIGN:return C(D);case mxConstants.STYLE_ALIGN+"Global":return Zb(mxConstants.STYLE_ALIGN,D.TextAlign,"center");case mxConstants.STYLE_SPACING_LEFT:return I(D);case mxConstants.STYLE_SPACING_RIGHT:return Q(D);case mxConstants.STYLE_SPACING_TOP:return K(D);case mxConstants.STYLE_SPACING_BOTTOM:return L(D);case mxConstants.STYLE_SPACING:return S(D);case mxConstants.STYLE_VERTICAL_ALIGN:return R(D);case mxConstants.STYLE_STROKECOLOR:return H(D,u);case mxConstants.STYLE_OPACITY:return M(D,u,e);case mxConstants.STYLE_ROUNDED:return w=!e.edge&&!e.style.includes("rounded")&&null!=D.Rounding&&0<D.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+z(.75*D.Rounding)+";":"",w;case mxConstants.STYLE_ROTATION:return T(D,u,e);case mxConstants.STYLE_FLIPH:return w=D.FlipX?"flipH=1;":"",w;case mxConstants.STYLE_FLIPV:return w=D.FlipY?"flipV=1;":"",w;case mxConstants.STYLE_SHADOW:return ca(D);-case mxConstants.STYLE_FILLCOLOR:return Y(D,u);case mxConstants.STYLE_DASHED:return sa(D);case mxConstants.STYLE_STROKEWIDTH:return oa(D);case mxConstants.STYLE_IMAGE:return Ra(D,u);case mxConstants.STYLE_POINTER_EVENTS:return D.Magnetize?"container=1;pointerEvents=0;collapsible=0;recursiveResize=0;":""}return""}function f(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("s"==D.n&&D.v)return"fontSize="+z(.75*D.v)+";";F++}return"fontSize=13;"}function k(w){var F=c(w);if(null!=F)for(var D=-0;D<F.length;D++)if("f"==F[D].n&&F[D].v){var u=F[D].v;break}!u&&w.Font&&(u=w.Font);y(u);return mb}function n(w){return"ext"==w.tp?w.url:"ml"==w.tp?"mailto:"+w.eml:"pg"==w.tp?"data:page/id,"+(LucidImporter.pageIdsMap[w.id]||0):"c"==w.tp?"data:confluence/id,"+w.ccid:null}function q(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("c"==D.n&&null!=D.v)return w=V(D.v).substring(0,7),"#000000"==w&&(w="default"),mxConstants.STYLE_FONTCOLOR+"="+w+";";F++}return""}function t(w){return A(c(w))}function A(w){if(null!=-w){var F=0,D=!1;if(null!=w)for(var u=0;!D&&u<w.length;){var e=w[u];"b"==e.n?null!=e.v&&e.v&&(D=!0,F+=1):"fc"==e.n&&"Bold"==e.v&&(D=!0,F+=1);u++}D=!1;if(null!=w)for(u=0;!D&&u<w.length;)e=w[u],"i"==e.n&&null!=e.v&&e.v&&(D=!0,F+=2),u++;D=!1;if(null!=w)for(u=0;!D&&u<w.length;)e=w[u],"u"==e.n&&null!=e.v&&e.v&&(D=!0,F+=4),u++;if(0<F)return"fontStyle="+F+";"}return""}function C(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("a"==D.n&&null!=D.v)return"align="+D.v+";";F++}return""}function I(w){w=-c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if(null!=D.v&&"il"==D.n)return"spacingLeft="+z(.75*D.v)+";";F++}return""}function Q(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("ir"==D.n&&null!=D.v)return"spacingRight="+z(.75*D.v)+";";F++}return""}function K(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("mt"==D.n&&null!=D.v)return"spacingTop="+z(.75*D.v)+";";F++}return""}function L(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("mb"==D.n&&null!=D.v)return"spacingBottom="++case mxConstants.STYLE_FILLCOLOR:return Y(D,u);case mxConstants.STYLE_DASHED:return sa(D);case mxConstants.STYLE_STROKEWIDTH:return oa(D);case mxConstants.STYLE_IMAGE:return Ra(D,u);case mxConstants.STYLE_POINTER_EVENTS:return D.Magnetize?"container=1;pointerEvents=0;collapsible=0;recursiveResize=0;":""}return""}function f(w){w=b(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("s"==D.n&&D.v)return"fontSize="+z(.75*D.v)+";";F++}return"fontSize=13;"}function k(w){var F=b(w);if(null!=F)for(var D=+0;D<F.length;D++)if("f"==F[D].n&&F[D].v){var u=F[D].v;break}!u&&w.Font&&(u=w.Font);y(u);return mb}function n(w){return"ext"==w.tp?w.url:"ml"==w.tp?"mailto:"+w.eml:"pg"==w.tp?"data:page/id,"+(LucidImporter.pageIdsMap[w.id]||0):"c"==w.tp?"data:confluence/id,"+w.ccid:null}function q(w){w=b(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("c"==D.n&&null!=D.v)return w=V(D.v).substring(0,7),"#000000"==w&&(w="default"),mxConstants.STYLE_FONTCOLOR+"="+w+";";F++}return""}function t(w){return A(b(w))}function A(w){if(null!=+w){var F=0,D=!1;if(null!=w)for(var u=0;!D&&u<w.length;){var e=w[u];"b"==e.n?null!=e.v&&e.v&&(D=!0,F+=1):"fc"==e.n&&"Bold"==e.v&&(D=!0,F+=1);u++}D=!1;if(null!=w)for(u=0;!D&&u<w.length;)e=w[u],"i"==e.n&&null!=e.v&&e.v&&(D=!0,F+=2),u++;D=!1;if(null!=w)for(u=0;!D&&u<w.length;)e=w[u],"u"==e.n&&null!=e.v&&e.v&&(D=!0,F+=4),u++;if(0<F)return"fontStyle="+F+";"}return""}function C(w){w=b(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("a"==D.n&&null!=D.v)return"align="+D.v+";";F++}return""}function I(w){w=+b(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if(null!=D.v&&"il"==D.n)return"spacingLeft="+z(.75*D.v)+";";F++}return""}function Q(w){w=b(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("ir"==D.n&&null!=D.v)return"spacingRight="+z(.75*D.v)+";";F++}return""}function K(w){w=b(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("mt"==D.n&&null!=D.v)return"spacingTop="+z(.75*D.v)+";";F++}return""}function L(w){w=b(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("mb"==D.n&&null!=D.v)return"spacingBottom="+z(.75*D.v)+";";F++}return""}function S(w){return"number"===typeof w.InsetMargin?"spacing="+Math.max(0,z(.75*w.InsetMargin))+";":""}function R(w){return null!=w.Text_VAlign&&"string"===typeof w.Text_VAlign?"verticalAlign="+w.Text_VAlign+";":null!=w.Title_VAlign&&"string"===typeof w.Title_VAlign?"verticalAlign="+w.Title_VAlign+";":Zb(mxConstants.STYLE_VERTICAL_ALIGN,w.TextVAlign,"middle")}function H(w,F){return 0==w.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":Zb(mxConstants.STYLE_STROKECOLOR,P(w.LineColor),"#000000")}function N(w){return null!=w?mxConstants.STYLE_FILLCOLOR+"="+P(w)+";":""}function J(w){return null!=w?"swimlaneFillColor="+P(w)+";":""}function M(w,F,D){F="";if("string"===typeof w.LineColor&&(w.LineColor=V(w.LineColor),7<w.LineColor.length)){var u="0x"+w.LineColor.substring(w.LineColor.length-2,w.LineColor.length);D.style.includes("strokeOpacity")||(F+="strokeOpacity="+Math.round(parseInt(u)/2.55)+";")}"string"===typeof w.FillColor&&(w.FillColor=V(w.FillColor),7<w.FillColor.length&&(w="0x"+w.FillColor.substring(w.FillColor.length-2,w.FillColor.length),D.style.includes("fillOpacity")||(F+="fillOpacity="+Math.round(parseInt(w)/2.55)+";")));return F}function T(w,F,D){var u="";if(null!=w.Rotation){w=mxUtils.toDegree(parseFloat(w.Rotation));var e=!0;0!=w&&F.Class&&("UMLSwimLaneBlockV2"==F.Class||(0<=F.Class.indexOf("Rotated")||-90==w||270==w)&&(0<=F.Class.indexOf("Pool")||0<=F.Class.indexOf("SwimLane")))?(w+=90,D.geometry.rotate90(),D.geometry.isRotated=!0,e=!1):0<=mxUtils.indexOf(wf,@@ -31,7 +31,7 @@ return""}function sa(w){return"dotted"==w.StrokeStyle?"dashed=1;fixDash=1;dashPaF.Class&&null!=w.ImageFillProps&&null!=w.ImageFillProps.url&&(D=w.ImageFillProps.url);return null!=D?"image="+g(D)+";"+u:""}function la(w,F,D){null!=F.Link&&0<F.Link.length&&D.setAttributeForCell(w,"link",n(F.Link[0]));null!=F.NoteHint&&F.NoteHint.t&&D.setAttributeForCell(w,"Notes",F.NoteHint.t);var u=[],e=D.convertValueToString(w),O=!1;if(null!=e){for(var r=0;match=yf.exec(e);){var p=match[0];O=!0;if(2<p.length){var aa=p.substring(2,p.length-2);"documentName"==aa?aa="filename":"pageName"==aa?aa="page":"totalPages"==aa?aa="pagecount":"page"==aa?aa="pagenumber":"date:"==aa.substring(0,5)?aa="date{"+aa.substring(5).replace(/MMMM/g,"mmmm").replace(/MM/g,"mm").replace(/YYYY/g,"yyyy")+"}":"lastModifiedTime"==aa.substring(0,16)?aa=aa.replace(/MMMM/g,"mmmm").replace(/MM/g,"mm").replace(/YYYY/g,"yyyy"):"i18nDate:"==aa.substring(0,9)&&(aa="date{"+aa.substring(9).replace(/i18nShort/g,"shortDate").replace(/i18nMediumWithTime/g,"mmm d, yyyy hh:MM TT")+"}");aa="%"+aa+"%";u.push(e.substring(r,match.index)+(null!=aa?aa:p));r=match.index+p.length}}O&&(u.push(e.substring(r)),D.setAttributeForCell(w,"label",u.join("")),D.setAttributeForCell(w,"placeholders","1"))}for(var ba in F)if(F.hasOwnProperty(ba)&&ba.toString().startsWith("ShapeData_"))try{var W=F[ba],wa=mxUtils.trim(W.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");Sa(w,wa,W.Value,D)}catch(ka){window.console&&console.log("Ignored "+ba+":",ka)}}function Sa(w,F,D,u){for(var e=F,O=0;null!=u.getAttributeForCell(w,e);)O++,e=F+-"_"+O;u.setAttributeForCell(w,e,null!=D?D:"")}function Xa(w,F,D,u,e,O){var r=h(F);if(null!=r){var p=Pd[r.Class];null!=p?(w.style+=p,";"!=w.style.charAt(w.style.length-1)&&(w.style+=";")):w.edge||(console.log("No mapping found for: "+r.Class),LucidImporter.hasUnknownShapes=!0);p=null!=r.Properties?r.Properties:r;if(null!=p&&(w.value=O?"":m(p),w.style+=b(w.style,p,r,w,G,!0),w.style.includes("strokeColor")||(w.style+=H(p,r)),la(w,p,D),p.Title&&p.Title.t&&p.Text&&p.Text.t&&"ExtShape"!=r.Class.substr(0,+"_"+O;u.setAttributeForCell(w,e,null!=D?D:"")}function Xa(w,F,D,u,e,O){var r=h(F);if(null!=r){var p=Pd[r.Class];null!=p?(w.style+=p,";"!=w.style.charAt(w.style.length-1)&&(w.style+=";")):w.edge||(console.log("No mapping found for: "+r.Class),LucidImporter.hasUnknownShapes=!0);p=null!=r.Properties?r.Properties:r;if(null!=p&&(w.value=O?"":m(p),w.style+=c(w.style,p,r,w,G,!0),w.style.includes("strokeColor")||(w.style+=H(p,r)),la(w,p,D),p.Title&&p.Title.t&&p.Text&&p.Text.t&&"ExtShape"!=r.Class.substr(0,8)&&(D=w.geometry,D=new mxCell(m(p.Title),new mxGeometry(0,D.height,D.width,10),"strokeColor=none;fillColor=none;"),D.vertex=!0,w.insert(D),D.style+=a(p.Title,G)),w.edge)){w.style=null!=p.Rounding&&"diagonal"!=p.Shape?w.style+("rounded=1;arcSize="+p.Rounding+";"):w.style+"rounded=0;";if(D="curve"==p.Shape)w.style+="curved=1;";else if("diagonal"!=p.Shape)if(null!=p.ElbowPoints&&0<p.ElbowPoints.length)for(w.geometry.points=[],r=0;r<p.ElbowPoints.length;r++)w.geometry.points.push(new mxPoint(Math.round(.75*p.ElbowPoints[r].x+xc),Math.round(.75*p.ElbowPoints[r].y+yc)));else if("elbow"==p.Shape||null!=p.Endpoint1.Block&&null!=p.Endpoint2.Block)w.style+="edgeStyle=orthogonalEdgeStyle;";if(p.LineJumps||LucidImporter.globalProps.LineJumps)w.style+="jumpStyle=arc;";null!=p.Endpoint1.Style&&(O=Fe[p.Endpoint1.Style],null!=O?(O=O.replace(/xyz/g,"start"),w.style+="startArrow="+O+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+p.Endpoint1.Style)));null!=p.Endpoint2.Style&&(O=Fe[p.Endpoint2.Style],null!=O?(O=O.replace(/xyz/g,"end"),w.style+="endArrow="+O+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+p.Endpoint2.Style)));O=null!=p.ElbowControlPoints&&0<p.ElbowControlPoints.length?p.ElbowControlPoints:p.Joints;if(D&&null!=p.BezierJoints&&0<p.BezierJoints.length){O=[];D=p.BezierJoints[p.BezierJoints.length-1];D.p.x=p.Endpoint2.x;D.p.y=p.Endpoint2.y;for(r=0;r<p.BezierJoints.length;r++)D=p.BezierJoints[r],O.push({x:D.p.x+@@ -62,29 +62,29 @@ F.children&&0<F.children.length)for(e=F.children.slice(),u=0;u<e.length;u++)D.inAa.n1){var Oa=W[Aa.p2].x,Ca=W[Aa.p2].y,ua=u,Ma=e,Ja=new Rd(W[Aa.p1].x/u,W[Aa.p1].y/e,Aa.n1.x/u,Aa.n1.y/e,W[Aa.p2].x/u,W[Aa.p2].y/e,Aa.n2.x/u,Aa.n2.y/e);if(2<=Ja.getSize()){Ja.getX(0);Ja.getY(0);Ja.getX(1);Ja.getY(1);Oa=Math.round(100*Oa/ua*100)/100;Ca=Math.round(100*Ca/Ma*100)/100;ua=[];Ma=[];for(var Ka=[],l=Ja.getSize(),Ha=0;Ha<l-1;Ha+=3)ua.push(new mxPoint(Ja.getX(Ha),Ja.getY(Ha))),Ma.push(new mxPoint(Ja.getX(Ha+1),Ja.getY(Ha+1))),Ha<l-2?Ka.push(new mxPoint(Ja.getX(Ha+2),Ja.getY(Ha+2))):Ka.push(new mxPoint(Oa,Ca));var cb="";for(Ha=0;Ha<ua.length;Ha++)cb+='<curve x1="'+ua[Ha].x+'" y1="'+ua[Ha].y+'" x2="'+Ma[Ha].x+'" y2="'+Ma[Ha].y+'" x3="'+Ka[Ha].x+'" y3="'+Ka[Ha].y+'"/>';var Ea=cb}else Ea=void 0;ka.push(Ea)}else na=W[Aa.p2].x,Ba=W[Aa.p2].y,na=100*na/u,Ba=100*Ba/e,na=Math.round(100*na)/100,Ba=Math.round(100*Ba)/100,ka.push('<line x="'+na+'" y="'+Ba+'"/>');pa=Aa.p2}ka.push("</path>");ka.push("<fillstroke/>");ka.push("</foreground></shape>");D.push({shapeStencil:"stencil("+Graph.compress(ka.join(""))+")",FillColor:p,LineColor:aa,LineWidth:ba})}LucidImporter.stencilsMap[w]={text:F.Text,w:u,h:e,x:F.BoundingBox.x,y:F.BoundingBox.y,stencils:D}}catch(Qa){console.log("Stencil parsing error:",Qa)}}function tc(w,F,D,u,e,O,r,p){w=new mxCell("",new mxGeometry(w,F,0,0),"strokeColor=none;fillColor=none;");w.vertex=!0;r.insert(w);O=[w];D=D.clone();p.insertEdge(D,!1);w.insertEdge(D,!0);O.push(D);u.push(e.addCell(D,null,null,null,null))}function gb(w,F,D,u,e,O,r,p,aa){w=new mxCell("",new mxGeometry(w,F,0,0),"strokeColor=none;fillColor=none;");-w.vertex=!0;aa.insert(w);D=new mxCell("",new mxGeometry(D,u,0,0),"strokeColor=none;fillColor=none;");D.vertex=!0;aa.insert(D);p=[D];e=e.clone();w.insertEdge(e,!0);D.insertEdge(e,!1);p.push(e);O.push(r.addCell(e,null,null,null,null))}function Ta(w,F,D,u,e,O){u.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";u.style+=b(u.style,e,O,u);F=m(e);u.vertex=!0;w=new mxCell(F,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+-"=mxgraph.gcp2."+w+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");w.style+=b(w.style,e,O,w,G);w.geometry.relative=!0;w.geometry.offset=new mxPoint(5,-12);w.vertex=!0;u.insert(w)}function Ya(w,F,D,u,e,O,r,p){e="transparent"!=w?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";O.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";O.style+=b(O.style,-r,p,O);O.value=m(r);O.vertex=!0;w=new mxCell(null,new mxGeometry(.5,0,.7*u*F,.7*u*D),e+w+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");w.geometry.relative=!0;w.geometry.offset=new mxPoint(-F*u*.35,10+(1-D)*u*.35);w.vertex=!0;w.style+=b(w.style,r,p,w,G);O.insert(w)}function Yc(w,F){return null!=w&&null!=F&&(F==mxConstants.STYLE_ALIGN+"Global"&&(F=mxConstants.STYLE_ALIGN),w.includes(";"+F+"=")||w.substring(0,F.length+1)==F+"=")?!0:!1}function Sd(w,F){function D(u){u=Math.round(parseInt("0x"++w.vertex=!0;aa.insert(w);D=new mxCell("",new mxGeometry(D,u,0,0),"strokeColor=none;fillColor=none;");D.vertex=!0;aa.insert(D);p=[D];e=e.clone();w.insertEdge(e,!0);D.insertEdge(e,!1);p.push(e);O.push(r.addCell(e,null,null,null,null))}function Ta(w,F,D,u,e,O){u.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";u.style+=c(u.style,e,O,u);F=m(e);u.vertex=!0;w=new mxCell(F,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE++"=mxgraph.gcp2."+w+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");w.style+=c(w.style,e,O,w,G);w.geometry.relative=!0;w.geometry.offset=new mxPoint(5,-12);w.vertex=!0;u.insert(w)}function Ya(w,F,D,u,e,O,r,p){e="transparent"!=w?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";O.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";O.style+=c(O.style,+r,p,O);O.value=m(r);O.vertex=!0;w=new mxCell(null,new mxGeometry(.5,0,.7*u*F,.7*u*D),e+w+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");w.geometry.relative=!0;w.geometry.offset=new mxPoint(-F*u*.35,10+(1-D)*u*.35);w.vertex=!0;w.style+=c(w.style,r,p,w,G);O.insert(w)}function Yc(w,F){return null!=w&&null!=F&&(F==mxConstants.STYLE_ALIGN+"Global"&&(F=mxConstants.STYLE_ALIGN),w.includes(";"+F+"=")||w.substring(0,F.length+1)==F+"=")?!0:!1}function Sd(w,F){function D(u){u=Math.round(parseInt("0x"+u)*F).toString(16);return 1==u.length?"0"+u:u}return"#"+D(w.substr(1,2))+D(w.substr(3,2))+D(w.substr(5,2))}function Je(w,F,D){var u=h(w),e=u.Properties,O=e.BoundingBox,r=Math.round(.75*O.w),p=Math.round(.75*O.h),aa=Math.round(.75*O.x+xc),ba=Math.round(.75*O.y+yc);null==w.Class||"GCPInputDatabase"!==w.Class&&"GCPInputRecord"!==w.Class&&"GCPInputPayment"!==w.Class&&"GCPInputGateway"!==w.Class&&"GCPInputLocalCompute"!==w.Class&&"GCPInputBeacon"!==w.Class&&"GCPInputStorage"!==w.Class&&"GCPInputList"!==w.Class&&"GCPInputStream"!==w.Class&&"GCPInputMobileDevices"!==w.Class&&"GCPInputCircuitBoard"!==w.Class&&"GCPInputLive"!==w.Class&&"GCPInputUsers"!==w.Class&&"GCPInputLaptop"!==w.Class&&"GCPInputApplication"!==w.Class&&"GCPInputLightbulb"!==w.Class&&"GCPInputGame"!==w.Class&&"GCPInputDesktop"!==w.Class&&"GCPInputDesktopAndMobile"!==w.Class&&"GCPInputWebcam"!==w.Class&&"GCPInputSpeaker"!==w.Class&&"GCPInputRetail"!==w.Class&&"GCPInputReport"!==w.Class&&"GCPInputPhone"!==w.Class&&"GCPInputBlank"!==w.Class||(p+=20);v=new mxCell("",new mxGeometry(aa,ba,r,p),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;v.zOrder=e.ZOrder;var W=null!=w.Class?w.Class:null!=u?u.Class:null;switch(W){case "BraceNoteBlock":case "UI2BraceNoteBlock":var wa=!1;null!=e.BraceDirection&&"Right"==e.BraceDirection&&(wa=!0);var ka=null,pa=null,ra=m(e),Aa=e.Rotation?mxUtils.getSizeForString(ra.replace(/\n/g,"<br>"),null,null,Math.abs(r-.125*p)):{width:0,height:0};wa?(ka=new mxCell("",new mxGeometry(r-.125*-p,0,.125*p,p),"shape=curlyBracket;rounded=1;"),pa=new mxCell("",new mxGeometry(Aa.height,-2*Aa.width,r-.125*p,p),"strokeColor=none;fillColor=none;")):(ka=new mxCell("",new mxGeometry(0,0,.125*p,p),"shape=curlyBracket;rounded=1;flipH=1;"),pa=new mxCell("",new mxGeometry(.125*p-Aa.height,Aa.width,r-.125*p,p),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);ka.vertex=!0;v.insert(ka);ka.style+=b(ka.style,e,u,ka);pa.vertex=!0;pa.value=ra;v.insert(pa);-pa.style+=b(pa.style,e,u,pa,G);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var na="MainText",Ba=null,Oa="HeaderFill_",Ca="BodyFill_",ua=25,Ma=25,Ja=0;if(null!=e.Lanes)Ja=e.Lanes.length;else if(null!=e.PrimaryLane){var Ka=function(hb){if(hb)32>hb?hb=32:208<hb&&(hb=208);else return 0;return.75*hb};Ja=e.PrimaryLane.length;+p,0,.125*p,p),"shape=curlyBracket;rounded=1;"),pa=new mxCell("",new mxGeometry(Aa.height,-2*Aa.width,r-.125*p,p),"strokeColor=none;fillColor=none;")):(ka=new mxCell("",new mxGeometry(0,0,.125*p,p),"shape=curlyBracket;rounded=1;flipH=1;"),pa=new mxCell("",new mxGeometry(.125*p-Aa.height,Aa.width,r-.125*p,p),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,u,v);ka.vertex=!0;v.insert(ka);ka.style+=c(ka.style,e,u,ka);pa.vertex=!0;pa.value=ra;v.insert(pa);+pa.style+=c(pa.style,e,u,pa,G);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var na="MainText",Ba=null,Oa="HeaderFill_",Ca="BodyFill_",ua=25,Ma=25,Ja=0;if(null!=e.Lanes)Ja=e.Lanes.length;else if(null!=e.PrimaryLane){var Ka=function(hb){if(hb)32>hb?hb=32:208<hb&&(hb=208);else return 0;return.75*hb};Ja=e.PrimaryLane.length;for(var l=p=r=0;l<Ja;l++)r+=e.PrimaryLane[l];for(l=0;l<e.SecondaryLane.length;l++)p+=e.SecondaryLane[l];ua=Ka(e.PrimaryPoolTitleHeight);Ma=Ka(e.PrimaryLaneTitleHeight);r*=.75;p=.75*p+ua+Ma;v.geometry.width=r;v.geometry.height=p;na="poolPrimaryTitleKey";Oa="PrimaryLaneHeaderFill_";Ca="CellFill_0,";Ba=e.PrimaryLaneTextAreaIds;if(null==Ba)for(Ba=[],l=0;l<Ja;l++)Ba.push("Primary_"+l)}if(0==e.IsPrimaryLaneVertical){e.Rotation=-1.5707963267948966;var Ha=v.geometry.x,cb=v.geometry.y}var Ea=0!=e.Rotation,-Qa=0<W.indexOf("Pool"),ma=0==W.indexOf("BPMN"),La=null!=e[na];v.style=(Qa?"swimlane;startSize="+ua+";":"fillColor=none;strokeColor=none;pointerEvents=0;fontStyle=0;")+"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;"+(Ea?"horizontalStack=0;":"");v.style+=b(v.style,e,u,v);La&&(v.value=m(e[na]),v.style+=(G?"overflow=block;blockSpacing=1;fontSize=13;"+mb:f(e[na])+q(e[na])+k(e[na])+t(e[na])+C(e[na],v)+I(e[na])+Q(e[na])+K(e[na])+L(e[na]))+S(e[na])++Qa=0<W.indexOf("Pool"),ma=0==W.indexOf("BPMN"),La=null!=e[na];v.style=(Qa?"swimlane;startSize="+ua+";":"fillColor=none;strokeColor=none;pointerEvents=0;fontStyle=0;")+"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;"+(Ea?"horizontalStack=0;":"");v.style+=c(v.style,e,u,v);La&&(v.value=m(e[na]),v.style+=(G?"overflow=block;blockSpacing=1;fontSize=13;"+mb:f(e[na])+q(e[na])+k(e[na])+t(e[na])+C(e[na],v)+I(e[na])+Q(e[na])+K(e[na])+L(e[na]))+S(e[na])+R(e[na]));for(var ya=0,za=[],Qb="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;fontStyle=0;startSize="+Ma+";dropTarget=0;rounded=0;"+(Ea?"horizontal=0;":"")+(ma?"swimlaneLine=0;fillColor=none;":""),ha=e.Rotation=0;ha<Ja;ha++){if(null==Ba){var xb=parseFloat(e.Lanes[ha].p);l=parseInt(e.Lanes[ha].tid)||ha;var Wa="Lane_"+l}else xb=.75*e.PrimaryLane[ha]/r,l=ha,Wa=Ba[ha];var rc=r*ya,wc=Qa?ua:0;za.push(new mxCell("",Ea?new mxGeometry(wc,rc,p-wc,r*xb):new mxGeometry(rc,wc,r*xb,p--wc),Qb));za[ha].vertex=!0;v.insert(za[ha]);za[ha].value=m(e[Wa]);za[ha].style+=b(za[ha].style,e,u,za[ha],G)+(G?"fontSize=13;":f(e[Wa])+q(e[Wa])+t(e[Wa])+C(e[Wa],za[ha])+I(e[Wa])+Q(e[Wa])+K(e[Wa])+L(e[Wa]))+S(e[Wa])+R(e[Wa])+N(e[Oa+l])+J(e[Ca+l]);ya+=xb}null!=Ha&&(v.geometry.x=Ha,v.geometry.y=cb);break;case "UMLMultidimensionalSwimlane":var Gb=0,Rb=0,Lb=null,$b=null;if(null!=e.Rows&&null!=e.Columns){Gb=e.Rows.length;Rb=e.Columns.length;var Za=.75*e.TitleHeight||25,qb=.75*e.TitleWidth||25}else if(null!=+wc),Qb));za[ha].vertex=!0;v.insert(za[ha]);za[ha].value=m(e[Wa]);za[ha].style+=c(za[ha].style,e,u,za[ha],G)+(G?"fontSize=13;":f(e[Wa])+q(e[Wa])+t(e[Wa])+C(e[Wa],za[ha])+I(e[Wa])+Q(e[Wa])+K(e[Wa])+L(e[Wa]))+S(e[Wa])+R(e[Wa])+N(e[Oa+l])+J(e[Ca+l]);ya+=xb}null!=Ha&&(v.geometry.x=Ha,v.geometry.y=cb);break;case "UMLMultidimensionalSwimlane":var Gb=0,Rb=0,Lb=null,$b=null;if(null!=e.Rows&&null!=e.Columns){Gb=e.Rows.length;Rb=e.Columns.length;var Za=.75*e.TitleHeight||25,qb=.75*e.TitleWidth||25}else if(null!=e.PrimaryLane&&null!=e.SecondaryLane){Gb=e.SecondaryLane.length;Rb=e.PrimaryLane.length;qb=.75*e.SecondaryLaneTitleHeight||25;Za=.75*e.PrimaryLaneTitleHeight||25;for(l=p=r=0;l<Gb;l++)p+=e.SecondaryLane[l];for(l=0;l<Rb;l++)r+=e.PrimaryLane[l];r=.75*r+qb;p=.75*p+Za;v.geometry.width=r;v.geometry.height=p;Lb=e.SecondaryLaneTextAreaIds;$b=e.PrimaryLaneTextAreaIds}v.style="group;";var Oc=new mxCell("",new mxGeometry(0,Za,r,p-Za),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;horizontalStack=0;");Oc.vertex=!0;var Gc=new mxCell("",new mxGeometry(qb,0,r-qb,p),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;");Gc.vertex=!0;v.insert(Oc);v.insert(Gc);ba=0;var Hc="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;horizontal=0;fontStyle=0;startSize="+qb+";";for(ha=0;ha<Gb;ha++){if(null==Lb){var Td=.75*parseInt(e.Rows[ha].height);l=parseInt(e.Rows[ha].id)||ha;var Sb="Row_"+l}else Td=-.75*e.SecondaryLane[ha],Sb=Lb[ha];var Ic=new mxCell("",new mxGeometry(0,ba,r,Td),Hc);ba+=Td;Ic.vertex=!0;Oc.insert(Ic);Ic.value=m(e[Sb]);Ic.style+=b(Ic.style,e,u,Ic,G)+(G?"fontSize=13;":f(e[Sb])+q(e[Sb])+t(e[Sb])+C(e[Sb],Ic)+I(e[Sb])+Q(e[Sb])+K(e[Sb])+L(e[Sb]))+S(e[Sb])+R(e[Sb])}var Ef="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;fontStyle=0;startSize="+Za+";";for(ha=aa=0;ha<Rb;ha++){if(null==$b){var Zc=.75*parseInt(e.Columns[ha].width);l=parseInt(e.Columns[ha].id)||-ha;var Tb="Column_"+l}else Zc=.75*e.PrimaryLane[ha],Tb=$b[ha];var Jc=new mxCell("",new mxGeometry(aa,0,Zc,p),Ef);aa+=Zc;Jc.vertex=!0;Gc.insert(Jc);Jc.value=m(e[Tb]);Jc.style+=b(Jc.style,e,u,Jc,G)+(G?"fontSize=13;":f(e[Tb])+q(e[Tb])+t(e[Tb])+C(e[Tb],Jc)+I(e[Tb])+Q(e[Tb])+K(e[Tb])+L(e[Tb]))+S(e[Tb])+R(e[Tb])}break;case "UMLStateBlock":if(0==e.Composite)v.style="rounded=1;arcSize=20",v.value=m(e.State,!0),v.style+=b(v.style,e,u,v,G);else{v.style="swimlane;startSize=25;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;rounded=1;arcSize=20;fontStyle=0;";-v.value=m(e.State,!0);v.style+=b(v.style,e,u,v,G);v.style+=Y(e,u).replace("fillColor","swimlaneFillColor");var zb=new mxCell("",new mxGeometry(0,25,r,p-25),"rounded=1;arcSize=20;strokeColor=none;fillColor=none");zb.value=m(e.Action,!0);zb.style+=b(zb.style,e,u,zb,G);zb.vertex=!0;v.insert(zb)}break;case "GSDFDProcessBlock":var ie=Math.round(.75*e.nameHeight);v.style="shape=swimlane;html=1;rounded=1;arcSize=10;collapsible=0;fontStyle=0;startSize="+ie;v.value=m(e.Number,!0);v.style+=b(v.style,e,u,v,-G);v.style+=Y(e,u).replace("fillColor","swimlaneFillColor");zb=new mxCell("",new mxGeometry(0,ie,r,p-ie),"rounded=1;arcSize=10;strokeColor=none;fillColor=none");zb.value=m(e.Text,!0);zb.style+=b(zb.style,e,u,zb,G);zb.vertex=!0;v.insert(zb);break;case "AndroidDevice":if(null!=e.AndroidDeviceName){var nb=T(e,u,v);v.style="fillColor=#000000;strokeColor=#000000;";var zc=null,$c=null,ad=null;if("Tablet"==e.AndroidDeviceName||"Mini Tablet"==e.AndroidDeviceName||"custom"==e.AndroidDeviceName&&"Tablet"==+.75*e.SecondaryLane[ha],Sb=Lb[ha];var Ic=new mxCell("",new mxGeometry(0,ba,r,Td),Hc);ba+=Td;Ic.vertex=!0;Oc.insert(Ic);Ic.value=m(e[Sb]);Ic.style+=c(Ic.style,e,u,Ic,G)+(G?"fontSize=13;":f(e[Sb])+q(e[Sb])+t(e[Sb])+C(e[Sb],Ic)+I(e[Sb])+Q(e[Sb])+K(e[Sb])+L(e[Sb]))+S(e[Sb])+R(e[Sb])}var Ef="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;fontStyle=0;startSize="+Za+";";for(ha=aa=0;ha<Rb;ha++){if(null==$b){var Zc=.75*parseInt(e.Columns[ha].width);l=parseInt(e.Columns[ha].id)||+ha;var Tb="Column_"+l}else Zc=.75*e.PrimaryLane[ha],Tb=$b[ha];var Jc=new mxCell("",new mxGeometry(aa,0,Zc,p),Ef);aa+=Zc;Jc.vertex=!0;Gc.insert(Jc);Jc.value=m(e[Tb]);Jc.style+=c(Jc.style,e,u,Jc,G)+(G?"fontSize=13;":f(e[Tb])+q(e[Tb])+t(e[Tb])+C(e[Tb],Jc)+I(e[Tb])+Q(e[Tb])+K(e[Tb])+L(e[Tb]))+S(e[Tb])+R(e[Tb])}break;case "UMLStateBlock":if(0==e.Composite)v.style="rounded=1;arcSize=20",v.value=m(e.State,!0),v.style+=c(v.style,e,u,v,G);else{v.style="swimlane;startSize=25;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;rounded=1;arcSize=20;fontStyle=0;";+v.value=m(e.State,!0);v.style+=c(v.style,e,u,v,G);v.style+=Y(e,u).replace("fillColor","swimlaneFillColor");var zb=new mxCell("",new mxGeometry(0,25,r,p-25),"rounded=1;arcSize=20;strokeColor=none;fillColor=none");zb.value=m(e.Action,!0);zb.style+=c(zb.style,e,u,zb,G);zb.vertex=!0;v.insert(zb)}break;case "GSDFDProcessBlock":var ie=Math.round(.75*e.nameHeight);v.style="shape=swimlane;html=1;rounded=1;arcSize=10;collapsible=0;fontStyle=0;startSize="+ie;v.value=m(e.Number,!0);v.style+=c(v.style,e,u,v,+G);v.style+=Y(e,u).replace("fillColor","swimlaneFillColor");zb=new mxCell("",new mxGeometry(0,ie,r,p-ie),"rounded=1;arcSize=10;strokeColor=none;fillColor=none");zb.value=m(e.Text,!0);zb.style+=c(zb.style,e,u,zb,G);zb.vertex=!0;v.insert(zb);break;case "AndroidDevice":if(null!=e.AndroidDeviceName){var nb=T(e,u,v);v.style="fillColor=#000000;strokeColor=#000000;";var zc=null,$c=null,ad=null;if("Tablet"==e.AndroidDeviceName||"Mini Tablet"==e.AndroidDeviceName||"custom"==e.AndroidDeviceName&&"Tablet"==e.CustomDeviceType)v.style+="shape=mxgraph.android.tab2;",zc=new mxCell("",new mxGeometry(.112,.077,.77*r,.85*p),nb),e.KeyboardShown&&($c=new mxCell("",new mxGeometry(.112,.727,.77*r,.2*p),"shape=mxgraph.android.keyboard;"+nb)),e.FullScreen||(ad=new mxCell("",new mxGeometry(.112,.077,.77*r,.03*p),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*p+";"+nb));else if("Large Phone"==e.AndroidDeviceName||"Phone"==e.AndroidDeviceName||"custom"==e.AndroidDeviceName&&"Phone"==e.CustomDeviceType)v.style+="shape=mxgraph.android.phone2;",zc=new mxCell("",new mxGeometry(.04,.092,.92*r,.816*p),nb),e.KeyboardShown&&($c=new mxCell("",new mxGeometry(.04,.708,.92*r,.2*p),"shape=mxgraph.android.keyboard;"+nb)),e.FullScreen||(ad=new mxCell("",new mxGeometry(.04,.092,.92*r,.03*p),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*p+";"+nb));zc.vertex=!0;zc.geometry.relative=!0;v.insert(zc);"Dark"==e.Scheme?zc.style+="fillColor=#111111;":-"Light"==e.Scheme&&(zc.style+="fillColor=#ffffff;");null!=$c&&($c.vertex=!0,$c.geometry.relative=!0,v.insert($c));null!=ad&&(ad.vertex=!0,ad.geometry.relative=!0,v.insert(ad))}v.style+=b(v.style,e,u,v);break;case "AndroidAlertDialog":var ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);var Pa=new mxCell("",new mxGeometry(0,25,r,10),"shape=line;strokeColor=#33B5E5;");Pa.vertex=!0;v.insert(Pa);var rd=new mxCell("",new mxGeometry(0,+"Light"==e.Scheme&&(zc.style+="fillColor=#ffffff;");null!=$c&&($c.vertex=!0,$c.geometry.relative=!0,v.insert($c));null!=ad&&(ad.vertex=!0,ad.geometry.relative=!0,v.insert(ad))}v.style+=c(v.style,e,u,v);break;case "AndroidAlertDialog":var ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);var Pa=new mxCell("",new mxGeometry(0,25,r,10),"shape=line;strokeColor=#33B5E5;");Pa.vertex=!0;v.insert(Pa);var rd=new mxCell("",new mxGeometry(0,30,r,p-30),"strokeColor=none;fillColor=none;verticalAlign=top;");rd.vertex=!0;v.insert(rd);var jb=new mxCell("",new mxGeometry(0,p-25,.5*r,25),"fillColor=none;");jb.vertex=!0;v.insert(jb);var kb=new mxCell("",new mxGeometry(.5*r,p-25,.5*r,25),"fillColor=none;");kb.vertex=!0;v.insert(kb);ac.value=m(e.DialogTitle);ac.style+=a(e.DialogTitle,G);rd.value=m(e.DialogText);rd.style+=a(e.DialogText,G);jb.value=m(e.Button_0);jb.style+=a(e.Button_0,G);kb.value=m(e.Button_1);kb.style+=a(e.Button_1,G);"Dark"==-e.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",jb.style+="strokeColor=#353535;",kb.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",jb.style+="strokeColor=#E2E2E2;",kb.style+="strokeColor=#E2E2E2;");v.style+=b(v.style,e,u,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);ac.value=m(e.DialogTitle);ac.style+=a(e.DialogTitle,+e.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",jb.style+="strokeColor=#353535;",kb.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",jb.style+="strokeColor=#E2E2E2;",kb.style+="strokeColor=#E2E2E2;");v.style+=c(v.style,e,u,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);ac.value=m(e.DialogTitle);ac.style+=a(e.DialogTitle,G);Pa=new mxCell("",new mxGeometry(0,25,r,10),"shape=line;strokeColor=#33B5E5;");Pa.vertex=!0;v.insert(Pa);jb=new mxCell("",new mxGeometry(0,p-25,.5*r,25),"fillColor=none;");jb.vertex=!0;v.insert(jb);jb.value=m(e.Button_0);jb.style+=a(e.Button_0,G);kb=new mxCell("",new mxGeometry(.5*r,p-25,.5*r,25),"fillColor=none;");kb.vertex=!0;v.insert(kb);kb.value=m(e.Button_1);kb.style+=a(e.Button_1,G);var bd=new mxCell("",new mxGeometry(.5*r-4,41,8,4),"shape=triangle;direction=north;");bd.vertex=!0;v.insert(bd);var cd=new mxCell("",new mxGeometry(.25*r-4,41,8,4),"shape=triangle;direction=north;");cd.vertex=!0;v.insert(cd);var dd=new mxCell("",new mxGeometry(.75*r-4,41,8,4),"shape=triangle;direction=north;");dd.vertex=!0;v.insert(dd);var sd=new mxCell("",new mxGeometry(.375*r,50,.2*r,15),"strokeColor=none;fillColor=none;");sd.vertex=!0;v.insert(sd);sd.value=m(e.Label_1);sd.style+=a(e.Label_1,G);var td=new mxCell("",new mxGeometry(.125*r,50,.2*r,15),"strokeColor=none;fillColor=none;");td.vertex=!0;v.insert(td);td.value=m(e.Label_0);td.style+=a(e.Label_0,G);var ed=null;"AndroidDateDialog"==w.Class&&(ed=new mxCell("",new mxGeometry(.625*r,50,.2*r,15),"strokeColor=none;fillColor=none;"),ed.vertex=!0,v.insert(ed),ed.value=m(e.Label_2),ed.style+=a(e.Label_2,G));var Ab=new mxCell("",new mxGeometry(.43*r,60,.14*r,10),"shape=line;strokeColor=#33B5E5;");Ab.vertex=!0;v.insert(Ab);var Bb=new mxCell("",new mxGeometry(.18*r,60,.14*r,10),"shape=line;strokeColor=#33B5E5;");Bb.vertex=!0;v.insert(Bb);var Me=new mxCell("",@@ -93,62 +93,62 @@ r,65,.2*r,15),"strokeColor=none;fillColor=none;");vd.vertex=!0;v.insert(vd);vd.v!0;v.insert(Oe);var Pe=new mxCell("",new mxGeometry(.68*r,75,.14*r,10),"shape=line;strokeColor=#33B5E5;");Pe.vertex=!0;v.insert(Pe);var xd=new mxCell("",new mxGeometry(.375*r,80,.2*r,15),"strokeColor=none;fillColor=none;");xd.vertex=!0;v.insert(xd);xd.value=m(e.Label_7);xd.style+=a(e.Label_7,G);var yd=new mxCell("",new mxGeometry(.125*r,80,.2*r,15),"strokeColor=none;fillColor=none;");yd.vertex=!0;v.insert(yd);yd.value=m(e.Label_6);yd.style+=a(e.Label_6,G);var zd=new mxCell("",new mxGeometry(.625*r,80,.2*r,15),"strokeColor=none;fillColor=none;");zd.vertex=!0;v.insert(zd);zd.value=m(e.Label_8);zd.style+=a(e.Label_8,G);var gd=new mxCell("",new mxGeometry(.5*r-4,99,8,4),"shape=triangle;direction=south;");gd.vertex=!0;v.insert(gd);var hd=new mxCell("",new mxGeometry(.25*r-4,99,8,4),"shape=triangle;direction=south;");hd.vertex=!0;v.insert(hd);var id=new mxCell("",new mxGeometry(.75*r-4,99,8,4),"shape=triangle;direction=south;");id.vertex=!0;v.insert(id);"Dark"==e.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",jb.style+="strokeColor=#353535;",kb.style+="strokeColor=#353535;",bd.style+="strokeColor=none;fillColor=#7E7E7E;",cd.style+="strokeColor=none;fillColor=#7E7E7E;",dd.style+="strokeColor=none;fillColor=#7E7E7E;",gd.style+="strokeColor=none;fillColor=#7E7E7E;",hd.style+="strokeColor=none;fillColor=#7E7E7E;",id.style+="strokeColor=none;fillColor=#7E7E7E;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",jb.style+="strokeColor=#E2E2E2;",kb.style+="strokeColor=#E2E2E2;",bd.style+="strokeColor=none;fillColor=#939393;",-cd.style+="strokeColor=none;fillColor=#939393;",dd.style+="strokeColor=none;fillColor=#939393;",gd.style+="strokeColor=none;fillColor=#939393;",hd.style+="strokeColor=none;fillColor=#939393;",id.style+="strokeColor=none;fillColor=#939393;");v.style+=b(v.style,e,u,v);break;case "AndroidListItems":var Cb=p,Ac=0;if(e.ShowHeader){Ac=8;var Pc=new mxCell("",new mxGeometry(0,0,r,Ac),"strokeColor=none;fillColor=none;");Pc.vertex=!0;v.insert(Pc);Pc.value=m(e.Header);Pc.style+=a(e.Header,G);Cb-=Ac;var Qe=new mxCell("",+cd.style+="strokeColor=none;fillColor=#939393;",dd.style+="strokeColor=none;fillColor=#939393;",gd.style+="strokeColor=none;fillColor=#939393;",hd.style+="strokeColor=none;fillColor=#939393;",id.style+="strokeColor=none;fillColor=#939393;");v.style+=c(v.style,e,u,v);break;case "AndroidListItems":var Cb=p,Ac=0;if(e.ShowHeader){Ac=8;var Pc=new mxCell("",new mxGeometry(0,0,r,Ac),"strokeColor=none;fillColor=none;");Pc.vertex=!0;v.insert(Pc);Pc.value=m(e.Header);Pc.style+=a(e.Header,G);Cb-=Ac;var Qe=new mxCell("",new mxGeometry(0,Ac-2,r,4),"shape=line;strokeColor=#999999;");Qe.vertex=!0;v.insert(Qe)}var bc=parseInt(e.Items);0<bc&&(Cb/=bc);var X=[];Pa=[];for(l=0;l<bc;l++)X[l]=new mxCell("",new mxGeometry(0,Ac+l*Cb,r,Cb),"strokeColor=none;fillColor=none;"),X[l].vertex=!0,v.insert(X[l]),X[l].value=m(e["Item_"+l]),X[l].style+=a(e["Item_"+l],G),0<l&&(Pa[l]=new mxCell("",new mxGeometry(0,Ac+l*Cb-2,r,4),"shape=line;"),Pa[l].vertex=!0,v.insert(Pa[l]),Pa[l].style="Dark"==e.Scheme?Pa[l].style+"strokeColor=#ffffff;":-Pa[l].style+"strokeColor=#D9D9D9;");v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#111111;":v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=b(v.style,e,u,v);break;case "AndroidTabs":var cc=parseInt(e.Tabs),Hb=r;0<cc&&(Hb/=cc);var Ua=[];Pa=[];for(l=0;l<cc;l++)Ua[l]=new mxCell("",new mxGeometry(l*Hb,0,Hb,p),"strokeColor=none;fillColor=none;"),Ua[l].vertex=!0,v.insert(Ua[l]),Ua[l].value=m(e["Tab_"+l]),Ua[l].style+=a(e["Tab_"+l],G),0<l&&(Pa[l]=new mxCell("",new mxGeometry(l*Hb-2,-.2*p,4,.6*p),"shape=line;direction=north;"),Pa[l].vertex=!0,v.insert(Pa[l]),Pa[l].style="Dark"==e.Scheme?Pa[l].style+"strokeColor=#484848;":Pa[l].style+"strokeColor=#CCCCCC;");var Re=new mxCell("",new mxGeometry(e.Selected*Hb+2,p-3,Hb-4,3),"strokeColor=none;fillColor=#33B5E5;");Re.vertex=!0;v.insert(Re);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=b(v.style,e,u,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(aa),-Math.round(ba+.25*p),Math.round(r),Math.round(.5*p)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;var Ad=new mxCell("",new mxGeometry(0,0,r*e.BarPosition,Math.round(.5*p)),"strokeColor=none;fillColor=#33B5E5;");Ad.vertex=!0;v.insert(Ad);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";v.style+=b(v.style,e,u,v);break;case "AndroidImageBlock":v.style="Dark"==e.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+=b(v.style,e,u,v);break;case "AndroidTextBlock":v.style="Dark"==e.Scheme?e.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":e.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=m(e.Label);v.style+=a(e.Label,G);v.style+=b(v.style,e,u,v,G);break;case "AndroidActionBar":v.style+="strokeColor=none;";+Pa[l].style+"strokeColor=#D9D9D9;");v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#111111;":v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=c(v.style,e,u,v);break;case "AndroidTabs":var cc=parseInt(e.Tabs),Hb=r;0<cc&&(Hb/=cc);var Ua=[];Pa=[];for(l=0;l<cc;l++)Ua[l]=new mxCell("",new mxGeometry(l*Hb,0,Hb,p),"strokeColor=none;fillColor=none;"),Ua[l].vertex=!0,v.insert(Ua[l]),Ua[l].value=m(e["Tab_"+l]),Ua[l].style+=a(e["Tab_"+l],G),0<l&&(Pa[l]=new mxCell("",new mxGeometry(l*Hb-2,+.2*p,4,.6*p),"shape=line;direction=north;"),Pa[l].vertex=!0,v.insert(Pa[l]),Pa[l].style="Dark"==e.Scheme?Pa[l].style+"strokeColor=#484848;":Pa[l].style+"strokeColor=#CCCCCC;");var Re=new mxCell("",new mxGeometry(e.Selected*Hb+2,p-3,Hb-4,3),"strokeColor=none;fillColor=#33B5E5;");Re.vertex=!0;v.insert(Re);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=c(v.style,e,u,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(aa),+Math.round(ba+.25*p),Math.round(r),Math.round(.5*p)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;var Ad=new mxCell("",new mxGeometry(0,0,r*e.BarPosition,Math.round(.5*p)),"strokeColor=none;fillColor=#33B5E5;");Ad.vertex=!0;v.insert(Ad);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";v.style+=c(v.style,e,u,v);break;case "AndroidImageBlock":v.style="Dark"==e.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+=c(v.style,e,u,v);break;case "AndroidTextBlock":v.style="Dark"==e.Scheme?e.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":e.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=m(e.Label);v.style+=a(e.Label,G);v.style+=c(v.style,e,u,v,G);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(e.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(e.HighlightShow){var Bc=null;Bc=e.HighlightTop?new mxCell("",new mxGeometry(0,0,r,2),"strokeColor=none;"):new mxCell("",new mxGeometry(0,p-2,r,2),"strokeColor=none;");Bc.vertex=!0;v.insert(Bc);switch(e.HighlightColor){case "Blue":Bc.style+="fillColor=#33B5E5;";break;case "Dark Gray":Bc.style+=-"fillColor=#B0B0B0;";break;case "White":Bc.style+="fillColor=#ffffff;"}}if(e.VlignShow){var jd=new mxCell("",new mxGeometry(20,5,2,p-10),"shape=line;direction=north;");jd.vertex=!0;v.insert(jd);switch(e.VlignColor){case "Blue":jd.style+="strokeColor=#244C5A;";break;case "White":jd.style+="strokeColor=#ffffff;"}}v.style+=b(v.style,e,u,v);break;case "AndroidButton":v.value=m(e.Label);v.style+=a(e.Label,G)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==e.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":-v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";v.style+=b(v.style,e,u,v);break;case "AndroidTextBox":v.value=m(e.Label);v.style+=a(e.Label,G);var Bd=new mxCell("",new mxGeometry(2,p-6,r-4,4),"shape=partialRectangle;top=0;fillColor=none;");Bd.vertex=!0;v.insert(Bd);v.style="Dark"==e.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;";Bd.style=e.TextFocused?Bd.style+"strokeColor=#33B5E5;":Bd.style+"strokeColor=#A9A9A9;";v.style+=b(v.style,e,u,v);+"fillColor=#B0B0B0;";break;case "White":Bc.style+="fillColor=#ffffff;"}}if(e.VlignShow){var jd=new mxCell("",new mxGeometry(20,5,2,p-10),"shape=line;direction=north;");jd.vertex=!0;v.insert(jd);switch(e.VlignColor){case "Blue":jd.style+="strokeColor=#244C5A;";break;case "White":jd.style+="strokeColor=#ffffff;"}}v.style+=c(v.style,e,u,v);break;case "AndroidButton":v.value=m(e.Label);v.style+=a(e.Label,G)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==e.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":+v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";v.style+=c(v.style,e,u,v);break;case "AndroidTextBox":v.value=m(e.Label);v.style+=a(e.Label,G);var Bd=new mxCell("",new mxGeometry(2,p-6,r-4,4),"shape=partialRectangle;top=0;fillColor=none;");Bd.vertex=!0;v.insert(Bd);v.style="Dark"==e.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;";Bd.style=e.TextFocused?Bd.style+"strokeColor=#33B5E5;":Bd.style+"strokeColor=#A9A9A9;";v.style+=c(v.style,e,u,v);break;case "AndroidRadioButton":var Qc=null;e.Checked&&(Qc=new mxCell("",new mxGeometry(.15*r,.15*p,.7*r,.7*p),"ellipse;fillColor=#33B5E5;strokeWidth=1;"),Qc.vertex=!0,v.insert(Qc));"Dark"==e.Scheme?(v.style+="shape=ellipse;perimeter=ellipsePerimeter;strokeWidth=1;strokeColor=#272727;",e.Checked?(Qc.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"):(v.style+="shape=ellipse;perimeter=ellipsePerimeter;strokeWidth=1;fillColor=#ffffff;strokeColor=#5C5C5C;",e.Checked&&-(Qc.style+="strokeColor=#999999;"));v.style+=b(v.style,e,u,v);break;case "AndroidCheckBox":var je=null;e.Checked&&(je=new mxCell("",new mxGeometry(.25*r,.05*-p,r,.8*p),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),je.vertex=!0,v.insert(je));v.style="Dark"==e.Scheme?v.style+"strokeWidth=1;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=1;strokeColor=#5C5C5C;fillColor=#ffffff;";v.style+=b(v.style,e,u,v);break;case "AndroidToggle":v.style="Dark"==e.Scheme?e.Checked?-v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":e.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";v.style+=b(v.style,e,u,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+e.BarPosition+";fillColor=#33b5e5;";v.style+=b(v.style,e,u,v);break;case "iOSSegmentedControl":cc=parseInt(e.Tabs);Hb=r;v.style+="strokeColor=none;fillColor=none;";-0<cc&&(Hb/=cc);Ua=[];Pa=[];for(l=0;l<cc;l++)Ua[l]=new mxCell("",new mxGeometry(l*Hb,0,Hb,p),"strokeColor="+e.FillColor+";"),Ua[l].vertex=!0,v.insert(Ua[l]),Ua[l].value=m(e["Tab_"+l]),Ua[l].style+=a(e["Tab_"+l],G),Ua[l].style=e.Selected==l?Ua[l].style+Y(e,u):Ua[l].style+"fillColor=none;";v.style+=b(v.style,e,u,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+e.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*e.BarPosition+";";v.style+=b(v.style,e,u,v);break;case "iOSProgressBar":v=-new mxCell("",new mxGeometry(Math.round(aa),Math.round(ba+.25*p),Math.round(r),Math.round(.5*p)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;Ad=new mxCell("",new mxGeometry(0,0,r*e.BarPosition,Math.round(.5*p)),"strokeColor=none;"+Y(e,u));Ad.vertex=!0;v.insert(Ad);v.style+=b(v.style,e,u,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=b(v.style,e,u,v);break;case "iOSStatusBar":v.style+=-"shape=mxgraph.ios7ui.appBar;strokeColor=#000000;";var Da=new mxCell(m(e.Text),new mxGeometry(.35*r,0,.3*r,p),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.Text,G);var Db=new mxCell(m(e.Carrier),new mxGeometry(.09*r,0,.2*r,p),"strokeColor=none;fillColor=none;");Db.vertex=!0;v.insert(Db);Db.style+=a(e.Carrier,G);v.style+=b(v.style,e,u,v);break;case "iOSSearchBar":v.value=m(e.Search);v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v,G)+a(e.Search,G);var Ia=new mxCell("",-new mxGeometry(.3*r,.3*p,.4*p,.4*p),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");Ia.vertex=!0;v.insert(Ia);break;case "iOSNavBar":v.value=m(e.Title);v.style+="shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;"+a(e.Title,G);v.style+=b(v.style,e,u,v,G);Da=new mxCell(m(e.LeftText),new mxGeometry(.03*r,0,.3*r,p),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.LeftText,G);Db=new mxCell(m(e.RightText),new mxGeometry(.65*r,0,.3*-r,p),"strokeColor=none;fillColor=none;");Db.vertex=!0;v.insert(Db);Db.style+=a(e.RightText,G);Ia=new mxCell("",new mxGeometry(.02*r,.2*p,.3*p,.5*p),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;");Ia.vertex=!0;v.insert(Ia);break;case "iOSTabs":cc=parseInt(e.Tabs);Hb=r;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=b(v.style,e,u,v);0<cc&&(Hb/=cc);Ua=[];Pa=[];for(l=0;l<cc;l++)Ua[l]=new mxCell("",new mxGeometry(l*Hb,0,Hb,p),"strokeColor=none;"),+(Qc.style+="strokeColor=#999999;"));v.style+=c(v.style,e,u,v);break;case "AndroidCheckBox":var je=null;e.Checked&&(je=new mxCell("",new mxGeometry(.25*r,.05*-p,r,.8*p),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),je.vertex=!0,v.insert(je));v.style="Dark"==e.Scheme?v.style+"strokeWidth=1;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=1;strokeColor=#5C5C5C;fillColor=#ffffff;";v.style+=c(v.style,e,u,v);break;case "AndroidToggle":v.style="Dark"==e.Scheme?e.Checked?+v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":e.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";v.style+=c(v.style,e,u,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+e.BarPosition+";fillColor=#33b5e5;";v.style+=c(v.style,e,u,v);break;case "iOSSegmentedControl":cc=parseInt(e.Tabs);Hb=r;v.style+="strokeColor=none;fillColor=none;";+0<cc&&(Hb/=cc);Ua=[];Pa=[];for(l=0;l<cc;l++)Ua[l]=new mxCell("",new mxGeometry(l*Hb,0,Hb,p),"strokeColor="+e.FillColor+";"),Ua[l].vertex=!0,v.insert(Ua[l]),Ua[l].value=m(e["Tab_"+l]),Ua[l].style+=a(e["Tab_"+l],G),Ua[l].style=e.Selected==l?Ua[l].style+Y(e,u):Ua[l].style+"fillColor=none;";v.style+=c(v.style,e,u,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+e.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*e.BarPosition+";";v.style+=c(v.style,e,u,v);break;case "iOSProgressBar":v=+new mxCell("",new mxGeometry(Math.round(aa),Math.round(ba+.25*p),Math.round(r),Math.round(.5*p)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;Ad=new mxCell("",new mxGeometry(0,0,r*e.BarPosition,Math.round(.5*p)),"strokeColor=none;"+Y(e,u));Ad.vertex=!0;v.insert(Ad);v.style+=c(v.style,e,u,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=c(v.style,e,u,v);break;case "iOSStatusBar":v.style+=+"shape=mxgraph.ios7ui.appBar;strokeColor=#000000;";var Da=new mxCell(m(e.Text),new mxGeometry(.35*r,0,.3*r,p),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.Text,G);var Db=new mxCell(m(e.Carrier),new mxGeometry(.09*r,0,.2*r,p),"strokeColor=none;fillColor=none;");Db.vertex=!0;v.insert(Db);Db.style+=a(e.Carrier,G);v.style+=c(v.style,e,u,v);break;case "iOSSearchBar":v.value=m(e.Search);v.style+="strokeColor=none;";v.style+=c(v.style,e,u,v,G)+a(e.Search,G);var Ia=new mxCell("",+new mxGeometry(.3*r,.3*p,.4*p,.4*p),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");Ia.vertex=!0;v.insert(Ia);break;case "iOSNavBar":v.value=m(e.Title);v.style+="shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;"+a(e.Title,G);v.style+=c(v.style,e,u,v,G);Da=new mxCell(m(e.LeftText),new mxGeometry(.03*r,0,.3*r,p),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.LeftText,G);Db=new mxCell(m(e.RightText),new mxGeometry(.65*r,0,.3*+r,p),"strokeColor=none;fillColor=none;");Db.vertex=!0;v.insert(Db);Db.style+=a(e.RightText,G);Ia=new mxCell("",new mxGeometry(.02*r,.2*p,.3*p,.5*p),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;");Ia.vertex=!0;v.insert(Ia);break;case "iOSTabs":cc=parseInt(e.Tabs);Hb=r;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=c(v.style,e,u,v);0<cc&&(Hb/=cc);Ua=[];Pa=[];for(l=0;l<cc;l++)Ua[l]=new mxCell("",new mxGeometry(l*Hb,0,Hb,p),"strokeColor=none;"),Ua[l].vertex=!0,v.insert(Ua[l]),Ua[l].value=m(e["Tab_"+l]),Ua[l].style+=G?"overflow=block;blockSpacing=1;html=1;fontSize=13;"+mb:f(e["Tab_"+l])+k(e["Tab_"+l])+q(e["Tab_"+l])+t(e["Tab_"+l])+C(e["Tab_"+l])+I(e["Tab_"+l])+Q(e["Tab_"+l])+K(e["Tab_"+l])+L(e["Tab_"+l])+S(e["Tab_"+l]),Ua[l].style+="verticalAlign=bottom;",Ua[l].style=e.Selected==l?Ua[l].style+"fillColor=#BBBBBB;":Ua[l].style+"fillColor=none;";break;case "iOSDatePicker":var dc=new mxCell("",new mxGeometry(0,0,.5*r,.2*p),"strokeColor=none;fillColor=none;");dc.vertex=!0;v.insert(dc);dc.value=m(e.Option11);dc.style+=a(e.Option11,G);var ec=new mxCell("",new mxGeometry(.5*r,0,.15*r,.2*p),"strokeColor=none;fillColor=none;");ec.vertex=!0;v.insert(ec);ec.value=m(e.Option21);ec.style+=a(e.Option21,G);var fc=new mxCell("",new mxGeometry(.65*r,0,.15*r,.2*p),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=m(e.Option31);fc.style+=a(e.Option31,G);var gc=new mxCell("",new mxGeometry(0,.2*p,.5*r,.2*p),"strokeColor=none;fillColor=none;");gc.vertex=!0;v.insert(gc);gc.value=m(e.Option12);gc.style+=a(e.Option12,G);var hc=new mxCell("",new mxGeometry(.5*r,.2*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");hc.vertex=!0;v.insert(hc);hc.value=m(e.Option22);hc.style+=a(e.Option22,G);var ic=new mxCell("",new mxGeometry(.65*r,.2*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");ic.vertex=!0;v.insert(ic);ic.value=m(e.Option32);ic.style+=a(e.Option32,G);var rb=new mxCell("",new mxGeometry(0,.4*p,.5*r,.2*p),"strokeColor=none;fillColor=none;");rb.vertex=!0;v.insert(rb);rb.value=m(e.Option13);rb.style+=a(e.Option13,G);var sb=new mxCell("",new mxGeometry(.5*r,.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");sb.vertex=!0;v.insert(sb);sb.value=m(e.Option23);sb.style+=a(e.Option23,G);var jc=new mxCell("",new mxGeometry(.65*r,.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");jc.vertex=!0;v.insert(jc);jc.value=m(e.Option33);jc.style+=a(e.Option33,G);var tb=new mxCell("",new mxGeometry(.8*r,.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");tb.vertex=!0;v.insert(tb);tb.value=m(e.Option43);tb.style+=a(e.Option43,G);var ub=new mxCell("",new mxGeometry(0,.6*p,.5*r,.2*p),"strokeColor=none;fillColor=none;");ub.vertex=!0;v.insert(ub);ub.value=m(e.Option14);ub.style+=a(e.Option14,G);var kc=new mxCell("",new mxGeometry(.5*r,.6*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");kc.vertex=!0;v.insert(kc);kc.value=m(e.Option24);kc.style+=a(e.Option24,G);var lc=new mxCell("",new mxGeometry(.65*r,.6*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");lc.vertex=!0;v.insert(lc);lc.value=m(e.Option34);lc.style+=a(e.Option34,G);var mc=new mxCell("",new mxGeometry(.8*r,.6*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");mc.vertex=!0;v.insert(mc);mc.value=m(e.Option44);mc.style+=a(e.Option44,G);var vb=new mxCell("",new mxGeometry(0,.8*p,.5*r,.2*p),"strokeColor=none;fillColor=none;");vb.vertex=!0;v.insert(vb);vb.value=m(e.Option15);vb.style+=a(e.Option15,G);var nc=new mxCell("",new mxGeometry(.5*r,.8*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");nc.vertex=-!0;v.insert(nc);nc.value=m(e.Option25);nc.style+=a(e.Option25,G);var oc=new mxCell("",new mxGeometry(.65*r,.8*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");oc.vertex=!0;v.insert(oc);oc.value=m(e.Option35);oc.style+=a(e.Option35,G);Ab=new mxCell("",new mxGeometry(0,.4*p-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);Bb=new mxCell("",new mxGeometry(0,.6*p-2,r,4),"shape=line;strokeColor=#888888;");Bb.vertex=!0;v.insert(Bb);v.style+="strokeColor=none;";v.style+=b(v.style,e,u,+!0;v.insert(nc);nc.value=m(e.Option25);nc.style+=a(e.Option25,G);var oc=new mxCell("",new mxGeometry(.65*r,.8*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");oc.vertex=!0;v.insert(oc);oc.value=m(e.Option35);oc.style+=a(e.Option35,G);Ab=new mxCell("",new mxGeometry(0,.4*p-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);Bb=new mxCell("",new mxGeometry(0,.6*p-2,r,4),"shape=line;strokeColor=#888888;");Bb.vertex=!0;v.insert(Bb);v.style+="strokeColor=none;";v.style+=c(v.style,e,u,v);break;case "iOSTimePicker":dc=new mxCell("",new mxGeometry(0,0,.25*r,.2*p),"strokeColor=none;fillColor=none;");dc.vertex=!0;v.insert(dc);dc.value=m(e.Option11);dc.style+=a(e.Option11,G);ec=new mxCell("",new mxGeometry(.25*r,0,.3*r,.2*p),"strokeColor=none;fillColor=none;");ec.vertex=!0;v.insert(ec);ec.value=m(e.Option21);ec.style+=a(e.Option21,G);gc=new mxCell("",new mxGeometry(0,.2*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");gc.vertex=!0;v.insert(gc);gc.value=m(e.Option12);gc.style+=a(e.Option12,G);hc=new mxCell("",new mxGeometry(.25*r,.2*p,.3*r,.2*p),"strokeColor=none;fillColor=none;");hc.vertex=!0;v.insert(hc);hc.value=m(e.Option22);hc.style+=a(e.Option22,G);rb=new mxCell("",new mxGeometry(0,.4*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");rb.vertex=!0;v.insert(rb);rb.value=m(e.Option13);rb.style+=a(e.Option13,G);sb=new mxCell("",new mxGeometry(.25*r,.4*p,.3*r,.2*p),"strokeColor=none;fillColor=none;");sb.vertex=!0;v.insert(sb);sb.value=m(e.Option23);sb.style+=a(e.Option23,G);tb=new mxCell("",new mxGeometry(.7*r,.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");tb.vertex=!0;v.insert(tb);tb.value=m(e.Option33);tb.style+=a(e.Option33,G);ub=new mxCell("",new mxGeometry(0,.6*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");ub.vertex=!0;v.insert(ub);ub.value=m(e.Option14);ub.style+=a(e.Option14,G);kc=new mxCell("",new mxGeometry(.25*r,.6*p,.3*r,.2*p),"strokeColor=none;fillColor=none;");kc.vertex=!0;v.insert(kc);kc.value=m(e.Option24);kc.style+=a(e.Option24,G);mc=new mxCell("",new mxGeometry(.7*r,.6*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");mc.vertex=!0;v.insert(mc);mc.value=m(e.Option34);mc.style+=a(e.Option34,G);vb=new mxCell("",new mxGeometry(0,.8*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");vb.vertex=!0;v.insert(vb);vb.value=m(e.Option15);vb.style+=a(e.Option15,G);nc=new mxCell("",new mxGeometry(.25*r,.8*p,.3*r,.2*p),"strokeColor=none;fillColor=none;");nc.vertex=!0;v.insert(nc);nc.value=m(e.Option25);nc.style+=a(e.Option25,G);Ab=new mxCell("",new mxGeometry(0,.4*p-2,r,4),-"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);Bb=new mxCell("",new mxGeometry(0,.6*p-2,r,4),"shape=line;strokeColor=#888888;");Bb.vertex=!0;v.insert(Bb);v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);break;case "iOSCountdownPicker":fc=new mxCell("",new mxGeometry(.45*r,0,.2*r,.2*p),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=m(e.Option31);fc.style+=a(e.Option31,G);ic=new mxCell("",new mxGeometry(.45*r,.2*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");+"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);Bb=new mxCell("",new mxGeometry(0,.6*p-2,r,4),"shape=line;strokeColor=#888888;");Bb.vertex=!0;v.insert(Bb);v.style+="strokeColor=none;";v.style+=c(v.style,e,u,v);break;case "iOSCountdownPicker":fc=new mxCell("",new mxGeometry(.45*r,0,.2*r,.2*p),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=m(e.Option31);fc.style+=a(e.Option31,G);ic=new mxCell("",new mxGeometry(.45*r,.2*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");ic.vertex=!0;v.insert(ic);ic.value=m(e.Option32);ic.style+=a(e.Option32,G);rb=new mxCell("",new mxGeometry(0,.4*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");rb.vertex=!0;v.insert(rb);rb.value=m(e.Option13);rb.style+=a(e.Option13,G);sb=new mxCell("",new mxGeometry(.2*r,.4*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");sb.vertex=!0;v.insert(sb);sb.value=m(e.Option23);sb.style+=a(e.Option23,G);jc=new mxCell("",new mxGeometry(.45*r,.4*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");jc.vertex=!0;v.insert(jc);jc.value=m(e.Option33);jc.style+=a(e.Option33,G);tb=new mxCell("",new mxGeometry(.6*r,.4*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");tb.vertex=!0;v.insert(tb);tb.value=m(e.Option43);tb.style+=a(e.Option43,G);ub=new mxCell("",new mxGeometry(0,.6*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");ub.vertex=!0;v.insert(ub);ub.value=m(e.Option14);ub.style+=a(e.Option14,G);lc=new mxCell("",new mxGeometry(.45*r,.6*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");lc.vertex=!0;v.insert(lc);lc.value=m(e.Option34);lc.style+=a(e.Option34,G);vb=new mxCell("",new mxGeometry(0,.8*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");vb.vertex=!0;v.insert(vb);vb.value=m(e.Option15);vb.style+=a(e.Option15,G);oc=new mxCell("",new mxGeometry(.45*r,.8*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");oc.vertex=!0;v.insert(oc);oc.value=m(e.Option35);oc.style+=a(e.Option35,G);Ab=new mxCell("",new mxGeometry(0,.4*p-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);Bb=new mxCell("",new mxGeometry(0,-.6*p-2,r,4),"shape=line;strokeColor=#888888;");Bb.vertex=!0;v.insert(Bb);v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);break;case "iOSBasicCell":v.value=m(e.text);v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.75*e.SeparatorInset+";";v.style+=(G?"fontSize=13;":f(e.text)+q(e.text)+t(e.text))+R(e.text);v.style+=b(v.style,e,u,v,G);switch(e.AccessoryIndicatorType){case "Disclosure":Ia=new mxCell("",new mxGeometry(.91*+.6*p-2,r,4),"shape=line;strokeColor=#888888;");Bb.vertex=!0;v.insert(Bb);v.style+="strokeColor=none;";v.style+=c(v.style,e,u,v);break;case "iOSBasicCell":v.value=m(e.text);v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.75*e.SeparatorInset+";";v.style+=(G?"fontSize=13;":f(e.text)+q(e.text)+t(e.text))+R(e.text);v.style+=c(v.style,e,u,v,G);switch(e.AccessoryIndicatorType){case "Disclosure":Ia=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ia.vertex=!0;v.insert(Ia);break;case "DetailDisclosure":Ia=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ia.vertex=!0;v.insert(Ia);var ab=new mxCell("",new mxGeometry(.79*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ab.vertex=!0;v.insert(ab);break;case "DetailIndicator":ab=new mxCell("",new mxGeometry(.87*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ab.vertex=!0;v.insert(ab);break;case "CheckMark":Ia=new mxCell("",new mxGeometry(.89*r,.37*p,.4*p,.26*p),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ia.vertex=!0,v.insert(Ia)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=-G?"fontSize=13;":f(e.subtext)+q(e.subtext)+t(e.subtext);v.style+=b(v.style,e,u,v,G);var db=new mxCell("",new mxGeometry(0,.4*p,r,.6*p),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.75*e.SeparatorInset+";");db.vertex=!0;v.insert(db);db.value=m(e.text);db.style+=G?"html=1;fontSize=13;"+mb:f(e.text)+k(e.text)+q(e.text)+t(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ia=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");+G?"fontSize=13;":f(e.subtext)+q(e.subtext)+t(e.subtext);v.style+=c(v.style,e,u,v,G);var db=new mxCell("",new mxGeometry(0,.4*p,r,.6*p),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.75*e.SeparatorInset+";");db.vertex=!0;v.insert(db);db.value=m(e.text);db.style+=G?"html=1;fontSize=13;"+mb:f(e.text)+k(e.text)+q(e.text)+t(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ia=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ia.vertex=!0;v.insert(Ia);break;case "DetailDisclosure":Ia=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ia.vertex=!0;v.insert(Ia);ab=new mxCell("",new mxGeometry(.79*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ab.vertex=!0;v.insert(ab);break;case "DetailIndicator":ab=new mxCell("",new mxGeometry(.87*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");-ab.vertex=!0;v.insert(ab);break;case "CheckMark":Ia=new mxCell("",new mxGeometry(.89*r,.37*p,.4*p,.26*p),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ia.vertex=!0,v.insert(Ia)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=G?"fontSize=13;":f(e.subtext)+q(e.subtext)+t(e.subtext);v.style+=b(v.style,+ab.vertex=!0;v.insert(ab);break;case "CheckMark":Ia=new mxCell("",new mxGeometry(.89*r,.37*p,.4*p,.26*p),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ia.vertex=!0,v.insert(Ia)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=G?"fontSize=13;":f(e.subtext)+q(e.subtext)+t(e.subtext);v.style+=c(v.style,e,u,v,G);db=null;switch(e.AccessoryIndicatorType){case "Disclosure":Ia=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ia.vertex=!0;v.insert(Ia);db=new mxCell("",new mxGeometry(.55*r,0,.3*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailDisclosure":Ia=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ia.vertex=!0;v.insert(Ia);ab=new mxCell("",new mxGeometry(.79*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ab.vertex=!0;v.insert(ab);db=new mxCell("",new mxGeometry(.45*r,0,.3*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailIndicator":ab=new mxCell("",new mxGeometry(.87*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ab.vertex=!0;v.insert(ab);db=new mxCell("",new mxGeometry(.52*r,0,.3*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "CheckMark":Ia=new mxCell("",new mxGeometry(.89*r,.37*p,.4*p,.26*p),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;");Ia.vertex=!0;v.insert(Ia);db=new mxCell("",new mxGeometry(.55*r,0,.3*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;default:db=new mxCell("",new mxGeometry(.65*r,0,.3*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;")}db.vertex=!0;v.insert(db);db.value=m(e.text);db.style+=G?"html=1;fontSize=13;"+mb:f(e.text)+k(e.text)+-q(e.text)+t(e.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";v.style+=b(v.style,e,u,v);var Ub=new mxCell("",new mxGeometry(0,0,.25*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");Ub.vertex=!0;v.insert(Ub);Ub.value=m(e.subtext);Ub.style+=G?"html=1;fontSize=13;"+mb:f(e.subtext)+k(e.subtext)+q(e.subtext)+t(e.subtext);db=new mxCell("",new mxGeometry(.25*r,0,.5*r,p),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");+q(e.text)+t(e.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";v.style+=c(v.style,e,u,v);var Ub=new mxCell("",new mxGeometry(0,0,.25*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");Ub.vertex=!0;v.insert(Ub);Ub.value=m(e.subtext);Ub.style+=G?"html=1;fontSize=13;"+mb:f(e.subtext)+k(e.subtext)+q(e.subtext)+t(e.subtext);db=new mxCell("",new mxGeometry(.25*r,0,.5*r,p),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");db.vertex=!0;v.insert(db);db.value=m(e.text);db.style+=G?"html=1;fontSize=13;"+mb:f(e.text)+k(e.text)+q(e.text)+t(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ia=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ia.vertex=!0;v.insert(Ia);break;case "DetailDisclosure":Ia=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ia.vertex=!0;v.insert(Ia);ab=new mxCell("",new mxGeometry(.79*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ab.vertex=!0;v.insert(ab);break;case "DetailIndicator":ab=new mxCell("",new mxGeometry(.87*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ab.vertex=!0;v.insert(ab);break;case "CheckMark":Ia=new mxCell("",new mxGeometry(.89*r,.37*p,.4*p,.26*p),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ia.vertex=!0,v.insert(Ia)}break;case "iOSTableGroupedSectionBreak":v.style+="shape=partialRectangle;left=0;right=0;fillColor=#EFEFF4;strokeColor=#C8C7CC;";Da=new mxCell("",new mxGeometry(0,0,r,.4*p),"fillColor=none;strokeColor=none;spacing=10;align=left;");Da.vertex=!0;v.insert(Da);Da.value=m(e.text);Da.style+=G?"html=1;fontSize=13;"+mb:f(e.text)+k(e.text)+q(e.text)+t(e.text);Db=new mxCell("",new mxGeometry(0,.6*p,r,.4*p),"fillColor=none;strokeColor=none;spacing=10;align=left;");Db.vertex=!0;v.insert(Db);Db.value=m(e["bottom-text"]);Db.style+=G?"html=1;fontSize=13;"+mb:f(e["bottom-text"])+-k(e["bottom-text"])+q(e["bottom-text"])+t(e["bottom-text"]);break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.value=m(e.text);v.style+=G?"fontSize=13;":f(e.text)+q(e.text)+t(e.text);v.style+=b(v.style,e,u,v,G);break;case "SMPage":if(e.Group){v.style+="strokeColor=none;fillColor=none;";var x=new mxCell("",new mxGeometry(0,0,.9*r,.9*p),"rounded=1;arcSize=3;part=1;");x.vertex=!0;v.insert(x);x.style+=H(e,u)+Y(e,u)+M(e,u,x)+ca(e)+-oa(e);var E=new mxCell("",new mxGeometry(.1*r,.1*p,.9*r,.9*p),"rounded=1;arcSize=3;part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=H(e,u)+Y(e,u)+M(e,u,E)+ca(e)+oa(e)+a(e,G);e.Future&&(x.style+="dashed=1;fixDash=1;",E.style+="dashed=1;fixDash=1;")}else v.style+="rounded=1;arcSize=3;",e.Future&&(v.style+="dashed=1;fixDash=1;"),v.value=m(e.Text),v.style+=H(e,u)+Y(e,u)+M(e,u,v)+ca(e)+oa(e)+a(e,G);v.style+=b(v.style,e,u,v,G);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":x=+k(e["bottom-text"])+q(e["bottom-text"])+t(e["bottom-text"]);break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.value=m(e.text);v.style+=G?"fontSize=13;":f(e.text)+q(e.text)+t(e.text);v.style+=c(v.style,e,u,v,G);break;case "SMPage":if(e.Group){v.style+="strokeColor=none;fillColor=none;";var x=new mxCell("",new mxGeometry(0,0,.9*r,.9*p),"rounded=1;arcSize=3;part=1;");x.vertex=!0;v.insert(x);x.style+=H(e,u)+Y(e,u)+M(e,u,x)+ca(e)++oa(e);var E=new mxCell("",new mxGeometry(.1*r,.1*p,.9*r,.9*p),"rounded=1;arcSize=3;part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=H(e,u)+Y(e,u)+M(e,u,E)+ca(e)+oa(e)+a(e,G);e.Future&&(x.style+="dashed=1;fixDash=1;",E.style+="dashed=1;fixDash=1;")}else v.style+="rounded=1;arcSize=3;",e.Future&&(v.style+="dashed=1;fixDash=1;"),v.value=m(e.Text),v.style+=H(e,u)+Y(e,u)+M(e,u,v)+ca(e)+oa(e)+a(e,G);v.style+=c(v.style,e,u,v,G);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":x=null;switch(w.Class){case "SMHome":x=new mxCell("",new mxGeometry(.5*r-.4*p,.1*p,.8*p,.8*p),"part=1;shape=mxgraph.office.concepts.home;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMPrint":x=new mxCell("",new mxGeometry(.5*r-.4*p,.19*p,.8*p,.62*p),"part=1;shape=mxgraph.office.devices.printer;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSearch":x=new mxCell("",new mxGeometry(.5*r-.4*p,.1*p,.8*p,.8*p),"part=1;shape=mxgraph.office.concepts.search;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSettings":x=new mxCell("",new mxGeometry(.5*r-.35*p,.15*p,.7*p,.7*p),"part=1;shape=mxgraph.mscae.enterprise.settings;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSitemap":x=new mxCell("",new mxGeometry(.5*r-.35*p,.2*p,.7*p,.6*p),"part=1;shape=mxgraph.office.sites.site_collection;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSuccess":x=new mxCell("",new mxGeometry(.5*r-.3*p,.25*p,.6*p,.5*p),"part=1;shape=mxgraph.mscae.general.checkmark;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMVideo":x=new mxCell("",new mxGeometry(.5*r-.4*p,.2*p,.8*p,.6*p),"part=1;shape=mxgraph.office.concepts.video_play;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMAudio":x=new mxCell("",new mxGeometry(.5*r-.3*p,.2*p,.6*p,.6*p),"part=1;shape=mxgraph.mscae.general.audio;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMCalendar":x=new mxCell("",new mxGeometry(.5*r-.4*p,.15*p,.8*p,.7*p),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMChart":var Z=Y(e,u);Z=""==Z?"#ffffff;":Z.replace("fillColor=","");x=new mxCell("",new mxGeometry(.5*r-.35*p,.15*p,.7*p,.7*p),"part=1;shape=mxgraph.ios7.icons.pie_chart;fillColor=#e6e6e6;fillOpacity=50;strokeWidth=4;strokeColor="+Z);break;case "SMCloud":x=new mxCell("",new mxGeometry(.5*r-.4*p,.27*p,.8*p,.46*p),"part=1;shape=mxgraph.networks.cloud;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMDocument":x=new mxCell("",new mxGeometry(.5*r-.25*p,.15*p,.5*p,.7*p),"part=1;shape=mxgraph.mscae.enterprise.document;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMForm":x=new mxCell("",new mxGeometry(.5*r-.4*p,.15*p,.8*p,.7*p),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMGame":x=new mxCell("",new mxGeometry(.5*r-.4*p,.2*p,.8*p,.6*p),"part=1;shape=mxgraph.mscae.general.game_controller;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMUpload":x=new mxCell("",new mxGeometry(.5*r-.4*p,.2*p,.8*p,.6*p),"part=1;shape=mxgraph.mscae.enterprise.backup_online;fillColor=#e6e6e6;opacity=50;strokeColor=none;")}x.vertex=-!0;v.insert(x);x.value=m(e.Text);x.style+=a(e,G);v.style+=b(v.style,e,u,v);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;";x=new mxCell("",new mxGeometry(.1*r,0,.9*r,.9*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(0,.1*p,.9*r,.9*p),"part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=a(e.Text,G);E.style+=b(E.style,e,u,E,G);break;case "UMLConstraintBlock":var Cc=new mxCell("",new mxGeometry(0,0,.25*p,p),"shape=curlyBracket;rounded=1;");-Cc.vertex=!0;v.insert(Cc);var Dc=new mxCell("",new mxGeometry(r-.25*p,0,.25*p,p),"shape=curlyBracket;rounded=1;flipH=1;");Dc.vertex=!0;v.insert(Dc);pa=new mxCell("",new mxGeometry(.25*p,0,r-.5*p,p),"strokeColor=none;fillColor=none;");pa.vertex=!0;pa.value=m(e);v.insert(pa);v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);Cc.style+=M(e,u,Cc);Dc.style+=M(e,u,Dc);pa.style+=q(e,pa);Cc.style+=b(Cc.style,e,u,Cc);Dc.style+=b(Dc.style,e,u,Dc);pa.style+=b(pa.style,e,u,pa,G);break;case "UMLTextBlock":v.value=-m(e.Text);v.style+="strokeColor=none;"+a(e.Text,G);v.style+=b(v.style,e,u,v,G);break;case "UMLProvidedInterfaceBlock":case "UMLProvidedInterfaceBlockV2":nb=T(e,u,v);e.Rotatio=null;var Vb=b(v.style,e,u,v,G);-1==Vb.indexOf(mxConstants.STYLE_STROKEWIDTH)&&(Vb=mxConstants.STYLE_STROKEWIDTH+"=1;"+Vb);v.style="group;dropTarget=0;pointerEvents=0;"+nb;var Ud=.8*r,Ff=r-Ud,Rc=new mxCell("",new mxGeometry(.2,0,Ud,p),"shape=ellipse;"+Vb);Rc.vertex=!0;Rc.geometry.relative=!0;v.insert(Rc);Pa=new mxCell("",new mxGeometry(0,-.5,Ff,1),"line;"+Vb);Pa.geometry.relative=!0;Pa.vertex=!0;v.insert(Pa);break;case "UMLComponentBoxBlock":case "UMLComponentBoxBlockV2":v.value=m(e);v.style="html=1;dropTarget=0;"+b(v.style,e,u,v,G);var ob=new mxCell("",new mxGeometry(1,0,15,15),"shape=component;jettyWidth=8;jettyHeight=4;");ob.geometry.relative=!0;ob.geometry.offset=new mxPoint(-20,5);ob.vertex=!0;v.insert(ob);break;case "UMLAssemblyConnectorBlock":case "UMLAssemblyConnectorBlockV2":nb=T(e,u,v);e.Rotatio=null;Vb=b(v.style,e,u,v,G);+!0;v.insert(x);x.value=m(e.Text);x.style+=a(e,G);v.style+=c(v.style,e,u,v);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;";x=new mxCell("",new mxGeometry(.1*r,0,.9*r,.9*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);E=new mxCell("",new mxGeometry(0,.1*p,.9*r,.9*p),"part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=a(e.Text,G);E.style+=c(E.style,e,u,E,G);break;case "UMLConstraintBlock":var Cc=new mxCell("",new mxGeometry(0,0,.25*p,p),"shape=curlyBracket;rounded=1;");+Cc.vertex=!0;v.insert(Cc);var Dc=new mxCell("",new mxGeometry(r-.25*p,0,.25*p,p),"shape=curlyBracket;rounded=1;flipH=1;");Dc.vertex=!0;v.insert(Dc);pa=new mxCell("",new mxGeometry(.25*p,0,r-.5*p,p),"strokeColor=none;fillColor=none;");pa.vertex=!0;pa.value=m(e);v.insert(pa);v.style="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,u,v);Cc.style+=M(e,u,Cc);Dc.style+=M(e,u,Dc);pa.style+=q(e,pa);Cc.style+=c(Cc.style,e,u,Cc);Dc.style+=c(Dc.style,e,u,Dc);pa.style+=c(pa.style,e,u,pa,G);break;case "UMLTextBlock":v.value=+m(e.Text);v.style+="strokeColor=none;"+a(e.Text,G);v.style+=c(v.style,e,u,v,G);break;case "UMLProvidedInterfaceBlock":case "UMLProvidedInterfaceBlockV2":nb=T(e,u,v);e.Rotatio=null;var Vb=c(v.style,e,u,v,G);-1==Vb.indexOf(mxConstants.STYLE_STROKEWIDTH)&&(Vb=mxConstants.STYLE_STROKEWIDTH+"=1;"+Vb);v.style="group;dropTarget=0;pointerEvents=0;"+nb;var Ud=.8*r,Ff=r-Ud,Rc=new mxCell("",new mxGeometry(.2,0,Ud,p),"shape=ellipse;"+Vb);Rc.vertex=!0;Rc.geometry.relative=!0;v.insert(Rc);Pa=new mxCell("",new mxGeometry(0,+.5,Ff,1),"line;"+Vb);Pa.geometry.relative=!0;Pa.vertex=!0;v.insert(Pa);break;case "UMLComponentBoxBlock":case "UMLComponentBoxBlockV2":v.value=m(e);v.style="html=1;dropTarget=0;"+c(v.style,e,u,v,G);var ob=new mxCell("",new mxGeometry(1,0,15,15),"shape=component;jettyWidth=8;jettyHeight=4;");ob.geometry.relative=!0;ob.geometry.offset=new mxPoint(-20,5);ob.vertex=!0;v.insert(ob);break;case "UMLAssemblyConnectorBlock":case "UMLAssemblyConnectorBlockV2":nb=T(e,u,v);e.Rotatio=null;Vb=c(v.style,e,u,v,G);-1==Vb.indexOf(mxConstants.STYLE_STROKEWIDTH)&&(Vb=mxConstants.STYLE_STROKEWIDTH+"=1;"+Vb);v.style="group;dropTarget=0;pointerEvents=0;"+nb;var Se=.225*r,Te=.1*r;Ud=r-Se-Te;Rc=new mxCell("",new mxGeometry(.225,0,Ud,p),"shape=providedRequiredInterface;verticalLabelPosition=bottom;"+Vb);Rc.vertex=!0;Rc.geometry.relative=!0;v.insert(Rc);Ab=new mxCell("",new mxGeometry(0,.5,Se,1),"line;"+Vb);Ab.geometry.relative=!0;Ab.vertex=!0;v.insert(Ab);Bb=new mxCell("",new mxGeometry(.9,.5,Te,1),"line;"+Vb);Bb.geometry.relative=!0;Bb.vertex=!0;v.insert(Bb);break;case "BPMNActivity":v.value=m(e.Text);switch(e.bpmnActivityType){case 1:v.style+=a(e.Text,G);break;case 2:v.style+="shape=ext;double=1;"+a(e.Text,G);break;case 3:v.style+="shape=ext;dashed=1;dashPattern=2 5;"+a(e.Text,G);break;case 4:v.style+="shape=ext;strokeWidth=2;"+a(e.Text,G)}if(0!=e.bpmnTaskType){switch(e.bpmnTaskType){case 1:x=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");x.geometry.offset=new mxPoint(4,7);break;case 2:x=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");x.geometry.offset=new mxPoint(4,7);break;case 3:x=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");x.geometry.offset=new mxPoint(4,5);break;case 4:x=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");x.geometry.offset=new mxPoint(4,7);break;case 5:x=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");x.geometry.offset=new mxPoint(4,7);break;case 6:x=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");@@ -157,175 +157,175 @@ x.geometry.offset=new mxPoint(4,5);break;case 7:x=new mxCell("",new mxGeometry(0x.geometry.offset=new mxPoint(Eb,-20);x.style+=Y(e,u)+H(e,u);break;case 4:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");x.geometry.offset=new mxPoint(Eb,-20);x.style+=Y(e,u)+H(e,u);break;case 5:x=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");x.geometry.offset=new mxPoint(Eb,-17);Z=H(e,u);Z=Z.replace("strokeColor","fillColor");""==Z&&(Z="fillColor=#000000;");x.style+=Z;break;case 6:x=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),x.geometry.offset=new mxPoint(Eb,-18),x.style+=Y(e,u)+H(e,u)}x.geometry.relative=!0;x.vertex=!0;v.insert(x)}2==Cd&&(Eb=5);if(0!=e.bpmnActivityMarker2){switch(e.bpmnActivityMarker2){case 1:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");x.geometry.offset=new mxPoint(Eb,-20);x.style+=Y(e,u)+H(e,u);break;case 2:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");x.geometry.offset=new mxPoint(Eb,-20);x.style+=Y(e,u)+H(e,u);break;case 3:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");x.geometry.offset=new mxPoint(Eb,-20);x.style+=Y(e,u)+H(e,u);break;case 4:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");x.geometry.offset=new mxPoint(Eb,-20);x.style+=Y(e,u)+H(e,u);break;case 5:x=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");x.geometry.offset=new mxPoint(Eb,-17);Z=H(e,-u);Z=Z.replace("strokeColor","fillColor");""==Z&&(Z="fillColor=#000000;");x.style+=Z;break;case 6:x=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),x.geometry.offset=new mxPoint(Eb,-18),x.style+=Y(e,u)+H(e,u)}x.geometry.relative=!0;x.vertex=!0;v.insert(x)}v.style+=b(v.style,e,u,v);break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);if(1==e.bpmnDashed)switch(e.bpmnEventGroup){case 0:v.style+=+u);Z=Z.replace("strokeColor","fillColor");""==Z&&(Z="fillColor=#000000;");x.style+=Z;break;case 6:x=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),x.geometry.offset=new mxPoint(Eb,-18),x.style+=Y(e,u)+H(e,u)}x.geometry.relative=!0;x.vertex=!0;v.insert(x)}v.style+=c(v.style,e,u,v);break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);if(1==e.bpmnDashed)switch(e.bpmnEventGroup){case 0:v.style+="outline=eventNonint;";break;case 1:v.style+="outline=boundNonint;";break;case 2:v.style+="outline=end;"}else switch(e.bpmnEventGroup){case 0:v.style+="outline=standard;";break;case 1:v.style+="outline=throwing;";break;case 2:v.style+="outline=end;"}switch(e.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;";break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;";break;case 12:v.style+="symbol=terminate;"}v.style+=b(v.style,e,u,v,G);break;case "BPMNChoreography":try{var ja=P(e.FillColor),ke=Sd(ja,.75),Kc=f(e.Name).match(/\d+/),eb=Math.max(mxUtils.getSizeForString(e.Name.t,Kc?Kc[0]:"13",null,r-10).height,24);ja="swimlaneFillColor="+ke+";";v.value=-m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ja+"startSize="+eb+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Name,G);v.style+=b(v.style,e,u,v,G);var Wb=eb;Kc=f(e.TaskName).match(/\d+/);var pc=e.TaskHeight?.75*e.TaskHeight:Math.max(mxUtils.getSizeForString(e.TaskName.t,Kc?Kc[0]:"13",null,r-10).height+15,24),Ec=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");-Ec.value=m(e.TaskName);Ec.vertex=!0;v.insert(Ec);Ec.style+=a(e.TaskName,G);Ec.style+=b(Ec.style,e,u,Ec,G);Wb+=pc;X=[];for(l=0;l<e.Fields;l++){var Vd=e["Participant"+(l+1)];Kc=f(Vd).match(/\d+/);pc=Math.max(mxUtils.getSizeForString(Vd.t,Kc?Kc[0]:"13",null,r-10).height,24);X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;fillColor=none;spacingTop=-1;spacingLeft=3;spacingRight=3;");Wb+=pc;X[l].vertex=!0;v.insert(X[l]);X[l].style+=a(Vd,G);X[l].style+=b(X[l].style,e,u,X[l],G);-X[l].value=m(Vd)}}catch(hb){console.log(hb)}break;case "BPMNConversation":v.style+="shape=hexagon;perimeter=hexagonPerimeter2;";v.value=m(e.Text);v.style=0==e.bpmnConversationType?v.style+oa(e):v.style+"strokeWidth=2;";e.bpmnIsSubConversation&&(x=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),x.geometry.offset=new mxPoint(-6,-17),x.style+=Y(e,u)+H(e,u),x.geometry.relative=!0,x.vertex=!0,v.insert(x));v.style+=b(v.style,e,u,v,G);break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;verticalLabelPosition=bottom;verticalAlign=top;";-switch(e.bpmnGatewayType){case 0:v.style+="outline=none;symbol=general;";break;case 1:v.style+="outline=none;symbol=exclusiveGw;";break;case 2:v.style+="outline=catching;symbol=multiple;";break;case 3:v.style+="outline=none;symbol=parallelGw;";break;case 4:v.style+="outline=end;symbol=general;";break;case 5:v.style+="outline=standard;symbol=multiple;";break;case 6:v.style+="outline=none;symbol=complexGw;";break;case 7:v.style+="outline=standard;symbol=parallelMultiple;"}v.style+=b(v.style,e,u,v);+break;case 7:v.style+="symbol=cancel;";break;case 8:v.style+="symbol=compensation;";break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;";break;case 12:v.style+="symbol=terminate;"}v.style+=c(v.style,e,u,v,G);break;case "BPMNChoreography":try{var ja=P(e.FillColor),ke=Sd(ja,.75),Kc=f(e.Name).match(/\d+/),eb=Math.max(mxUtils.getSizeForString(e.Name.t,Kc?Kc[0]:"13",null,r-10).height,24);ja="swimlaneFillColor="+ke+";";v.value=+m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ja+"startSize="+eb+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Name,G);v.style+=c(v.style,e,u,v,G);var Wb=eb;Kc=f(e.TaskName).match(/\d+/);var pc=e.TaskHeight?.75*e.TaskHeight:Math.max(mxUtils.getSizeForString(e.TaskName.t,Kc?Kc[0]:"13",null,r-10).height+15,24),Ec=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");+Ec.value=m(e.TaskName);Ec.vertex=!0;v.insert(Ec);Ec.style+=a(e.TaskName,G);Ec.style+=c(Ec.style,e,u,Ec,G);Wb+=pc;X=[];for(l=0;l<e.Fields;l++){var Vd=e["Participant"+(l+1)];Kc=f(Vd).match(/\d+/);pc=Math.max(mxUtils.getSizeForString(Vd.t,Kc?Kc[0]:"13",null,r-10).height,24);X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;fillColor=none;spacingTop=-1;spacingLeft=3;spacingRight=3;");Wb+=pc;X[l].vertex=!0;v.insert(X[l]);X[l].style+=a(Vd,G);X[l].style+=c(X[l].style,e,u,X[l],G);+X[l].value=m(Vd)}}catch(hb){console.log(hb)}break;case "BPMNConversation":v.style+="shape=hexagon;perimeter=hexagonPerimeter2;";v.value=m(e.Text);v.style=0==e.bpmnConversationType?v.style+oa(e):v.style+"strokeWidth=2;";e.bpmnIsSubConversation&&(x=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),x.geometry.offset=new mxPoint(-6,-17),x.style+=Y(e,u)+H(e,u),x.geometry.relative=!0,x.vertex=!0,v.insert(x));v.style+=c(v.style,e,u,v,G);break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;verticalLabelPosition=bottom;verticalAlign=top;";+switch(e.bpmnGatewayType){case 0:v.style+="outline=none;symbol=general;";break;case 1:v.style+="outline=none;symbol=exclusiveGw;";break;case 2:v.style+="outline=catching;symbol=multiple;";break;case 3:v.style+="outline=none;symbol=parallelGw;";break;case 4:v.style+="outline=end;symbol=general;";break;case 5:v.style+="outline=standard;symbol=multiple;";break;case 6:v.style+="outline=none;symbol=complexGw;";break;case 7:v.style+="outline=standard;symbol=parallelMultiple;"}v.style+=c(v.style,e,u,v);v.value=m(e.Text);v.style+=a(e,G);break;case "BPMNData":v.style+="shape=note;size=14;";switch(e.bpmnDataType){case 0:v.value=m(e.Text);e.Text&&!e.Text.t&&(e.Text.t=" ");break;case 1:x=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");x.geometry.offset=new mxPoint(-6,-15);x.style+=Y(e,u)+H(e,u);x.geometry.relative=!0;x.vertex=!0;v.insert(x);break;case 2:x=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");x.geometry.offset=new mxPoint(3,3);x.style+=Y(e,u)+H(e,u);x.geometry.relative=!0;x.vertex=!0;v.insert(x);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";Da=new mxCell("",new mxGeometry(0,0,r,20),"strokeColor=none;fillColor=none;");Da.geometry.offset=new mxPoint(0,14);Da.geometry.relative=!0;Da.vertex=!0;v.insert(Da);Da.value=m(e.Text);Da.style+=a(e,G);break;case 3:x=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),x.geometry.offset=new mxPoint(3,3),x.style+=H(e,u),x.geometry.relative=-!0,x.vertex=!0,v.insert(x),Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),x.style+=Z,Da=new mxCell("",new mxGeometry(0,0,r,20),"strokeColor=none;fillColor=none;"),Da.geometry.offset=new mxPoint(0,14),Da.geometry.relative=!0,Da.vertex=!0,v.insert(Da),Da.value=m(e.Text),Da.style+=a(e,G)}v.style+=b(v.style,e,u,v);break;case "BPMNBlackPool":v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,r,p),"fillColor=#000000;strokeColor=none;opacity=30;");-x.vertex=!0;v.insert(x);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=new mxCell("",new mxGeometry(0,0,.95*r,.95*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.05*r,.05*p,.95*r,.95*p),"part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=a(e.Text,G);E.style+=b(E.style,e,u,E,G);break;case "GSDFDDataStoreBlock":v.value=m(e.Text);v.style+="shape=partialRectangle;right=0;"+a(e.Text,G);-v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,.2*r,p),"part=1;");x.vertex=!0;v.insert(x);x.value=m(e.Number);x.style+=a(e.Number,G);x.style+=b(x.style,e,u,x,G);break;case "OrgBlock":var Ue="";for(Fa in e.Active)"Photo"!=Fa&&e.Active[Fa]&&(Ue+=m(e[Fa],!0));if(e.Active.Photo){var le=.4*r;v.style+="spacingLeft="+le+";imageWidth="+(le-4)+";imageHeight="+(le-4)+";imageAlign=left;imageVerticalAlign=top;image="+g(e.Photo)}v.value=Ue;v.style+=b(v.style,e,u,v,!0);break;case "DefaultTableBlock":try{Gb=+!0,x.vertex=!0,v.insert(x),Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),x.style+=Z,Da=new mxCell("",new mxGeometry(0,0,r,20),"strokeColor=none;fillColor=none;"),Da.geometry.offset=new mxPoint(0,14),Da.geometry.relative=!0,Da.vertex=!0,v.insert(Da),Da.value=m(e.Text),Da.style+=a(e,G)}v.style+=c(v.style,e,u,v);break;case "BPMNBlackPool":v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,r,p),"fillColor=#000000;strokeColor=none;opacity=30;");+x.vertex=!0;v.insert(x);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,u,v);x=new mxCell("",new mxGeometry(0,0,.95*r,.95*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);E=new mxCell("",new mxGeometry(.05*r,.05*p,.95*r,.95*p),"part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=a(e.Text,G);E.style+=c(E.style,e,u,E,G);break;case "GSDFDDataStoreBlock":v.value=m(e.Text);v.style+="shape=partialRectangle;right=0;"+a(e.Text,G);+v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,.2*r,p),"part=1;");x.vertex=!0;v.insert(x);x.value=m(e.Number);x.style+=a(e.Number,G);x.style+=c(x.style,e,u,x,G);break;case "OrgBlock":var Ue="";for(Fa in e.Active)"Photo"!=Fa&&e.Active[Fa]&&(Ue+=m(e[Fa],!0));if(e.Active.Photo){var le=.4*r;v.style+="spacingLeft="+le+";imageWidth="+(le-4)+";imageHeight="+(le-4)+";imageAlign=left;imageVerticalAlign=top;image="+g(e.Photo)}v.value=Ue;v.style+=c(v.style,e,u,v,!0);break;case "DefaultTableBlock":try{Gb=e.RowHeights.length;Rb=e.ColWidths.length;var Wd=[],Dd=[];for(l=0;l<Gb;l++)Wd[l]=.75*e.RowHeights[l];for(ha=0;ha<Rb;ha++)Dd[ha]=.75*e.ColWidths[ha];v.style="group;dropTarget=0;pointerEvents=0;";var me=e.BandedColor1,ne=e.BandedColor2,Gf=e.BandedRows,Ve=e.BandedCols,Xd=e.HideH,Hf=e.HideV,We=e.TextVAlign,Xe=e.FillColor,Ye=e.StrokeStyle;delete e.StrokeStyle;var If=ea(Xe,"fillOpacity"),Ze=e.LineColor,Jf=ea(Ze,"strokeOpacity");ba=0;var Ed={};for(l=0;l<Gb;l++){aa=0;p=Wd[l];for(ha=0;ha<Rb;ha++){var Mb=l+","+ha;if(Ed[Mb])aa+=Dd[ha];else{var lb=e["CellFill_"+Mb],oe=e["NoBand_"+Mb],Yd=e["CellSize_"+Mb],qc=e["Cell_"+Mb],$e=e["Cell_"+Mb+"_VAlign"],Kf=e["Cell_"+Mb+"_TRotation"],Lf=e["CellBorderWidthH_"+Mb],Mf=e["CellBorderColorH_"+Mb],Nf=e["CellBorderStrokeStyleH_"+Mb],Of=e["CellBorderWidthV_"+Mb],Pf=e["CellBorderColorV_"+Mb],Qf=e["CellBorderStrokeStyleV_"+Mb],af=Xd?Pf:Mf,bf=ea(af,"strokeOpacity"),cf=Xd?Of:Lf,Tc=Xd?Qf:Nf;lb=Gf&&!oe?0==l%2?me:Ve&&!oe?0==ha%2?me:ne:ne:Ve&&!oe?0==ha%2?me:ne:lb;var Rf=ea(lb,"fillOpacity")||If;r=Dd[ha];var df=p;Zc=r;for(var Nb=l+1;Nb<l+Yd.h;Nb++)if(null!=Wd[Nb]){df+=Wd[Nb];Ed[Nb+","+ha]=!0;for(var Uc=ha+1;Uc<ha+Yd.w;Uc++)Ed[Nb+","+Uc]=!0}for(Nb=ha+1;Nb<ha+Yd.w;Nb++)if(null!=Dd[Nb])for(Zc+=Dd[Nb],Ed[l+","+Nb]=!0,Uc=l+1;Uc<l+Yd.h;Uc++)Ed[Uc+","+Nb]=!0;var qa=new mxCell("",new mxGeometry(aa,ba,Zc,df),"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;"+(Hf?"left=0;right=0;":"")+(Xd?"top=0;bottom=0;":"")+Y({FillColor:lb||Xe})+Zb(mxConstants.STYLE_STROKECOLOR,P(af),-P(Ze))+(null!=cf?Zb(mxConstants.STYLE_STROKEWIDTH,Math.round(.75*parseFloat(cf)),"1"):"")+(bf?bf:Jf)+Rf+"verticalAlign="+($e?$e:We?We:"middle")+";"+sa({StrokeStyle:Tc?Tc:Ye?Ye:"solid"})+(Kf?"horizontal=0;":""));qa.vertex=!0;qa.value=m(qc);qa.style+=b(qa.style,e,u,qa,G)+(G?"fontSize=13;":f(qc)+q(qc)+t(qc)+C(qc,qa)+I(qc)+Q(qc)+K(qc)+L(qc))+S(qc)+R(qc);v.insert(qa);aa+=r}}ba+=p}}catch(hb){console.log(hb)}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";-"VSMDedicatedProcessBlock"==w.Class?v.value=m(e.Text):"VSMProductionControlBlock"==w.Class&&(v.value=m(e.Resources));v.style+=b(v.style,e,u,v,G);"VSMDedicatedProcessBlock"==w.Class&&(x=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),x.geometry.relative=!0,x.geometry.offset=new mxPoint(4,-13),x.vertex=!0,v.insert(x),x.style+=b(x.style,e,u,x));Da=new mxCell("",new mxGeometry(0,0,r,15),"strokeColor=none;fillColor=none;part=1;");Da.vertex=!0;v.insert(Da);Da.value=-m(e.Title);Da.style+=a(e.Title,G);e.Text=null;break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);Da=new mxCell("",new mxGeometry(.1*r,.3*p,.8*r,.6*p),"part=1;");Da.vertex=!0;v.insert(Da);Da.value=m(e.Resource);Da.style+=a(e.Resource,G);Da.style+=b(Da.style,e,u,Da,G);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";-v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);Cb=p;bc=parseInt(e.Cells);ja=b("part=1;",e,u,v);0<bc&&(Cb/=bc);X=[];Pa=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(0,(l-1)*Cb,r,Cb),ja),X[l].vertex=!0,v.insert(X[l]),X[l].value=m(e["cell_"+l]),X[l].style+=a(e["cell_"+l],G);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";-v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);Cb=p;bc=parseInt(e.Cells);ja=b("part=1;fillColor=none;",e,u,v);0<bc&&(Cb/=bc);X=[];Ub=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(.5*r,(l-1)*Cb,.5*r,Cb),"shape=partialRectangle;left=0;"+ja),X[l].vertex=!0,v.insert(X[l]),Ub[l]=new mxCell("",new mxGeometry(0,(l-1)*Cb,r,Cb),"strokeColor=none;fillColor=none;part=1;"),Ub[l].vertex=!0,v.insert(Ub[l]),Ub[l].value=-m(e["cell_"+l]),Ub[l].style+=a(e["cell_"+l],G);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18";v.style+=b(v.style,e,u,v);v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.17*r,.2*p,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");x.vertex=!0;v.insert(x);-x.style+=b(x.style,e,u,x);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";ja="shape=card;size=18;flipH=1;part=1;";x=new mxCell("",new mxGeometry(.1*r,0,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ja);x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.05*r,.1*p,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ja);E.vertex=!0;v.insert(E);E.style+=b(E.style,-e,u,E);var U=new mxCell("",new mxGeometry(0,.2*p,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+ja);U.vertex=!0;v.insert(U);U.value=m(e.Text);U.style+=b(U.style,e,u,U,G);break;case "VSMElectronicInformationArrow":v.style="group;";v.value=m(e.Title);v.style+=a(e.Title,G);var va=new mxCell("",new mxGeometry(0,0,r,p),"shape=mxgraph.lean_mapping.electronic_info_flow_edge;html=1;entryX=0;entryY=1;exitX=1;exitY=0;");va.edge=!0;va.geometry.relative=-1;D.addCell(va,v,null,v,v);break;case "AWSRoundedRectangleContainerBlock2":case "AWSRoundedRectangleContainerBlock":v.style+="strokeColor=none;fillColor=none;";e.Spotfleet?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,35,40),-"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.Beanstalk?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,30,40),"strokeColor=none;shape=mxgraph.aws3.elastic_beanstalk;fillColor=#759C3E;"),-E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.EC2?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),E.geometry.relative=-!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.Subnet?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.permissions;fillColor=#146EB4;"),E.geometry.relative=!0,E.geometry.offset=-new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.VPC?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.virtual_private_cloud;fillColor=#146EB4;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,-0),E.vertex=!0,v.insert(E)):e.AWS?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):-e.Corporate?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):-(v.style="resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;",v.value=m(e.Title),v.style+=b(v.style,e,u,v,G));break;case "AWSElasticComputeCloudBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.ec2;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "AWSRoute53Block2":v.style+="strokeColor=none;shape=mxgraph.aws3.route_53;verticalLabelPosition=bottom;align=center;verticalAlign=top;";-v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "AWSRDBSBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.rds;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";qa=new mxCell("",new mxGeometry(.25*r,.25*p,.5*r,.5*p),"ellipse;html=1;strokeColor=#29AAE1;strokeWidth=2;");qa.vertex=!0;v.insert(qa);var Na=[qa];qa.style+=Y(e,u);va=new mxCell("",new mxGeometry(0,+P(Ze))+(null!=cf?Zb(mxConstants.STYLE_STROKEWIDTH,Math.round(.75*parseFloat(cf)),"1"):"")+(bf?bf:Jf)+Rf+"verticalAlign="+($e?$e:We?We:"middle")+";"+sa({StrokeStyle:Tc?Tc:Ye?Ye:"solid"})+(Kf?"horizontal=0;":""));qa.vertex=!0;qa.value=m(qc);qa.style+=c(qa.style,e,u,qa,G)+(G?"fontSize=13;":f(qc)+q(qc)+t(qc)+C(qc,qa)+I(qc)+Q(qc)+K(qc)+L(qc))+S(qc)+R(qc);v.insert(qa);aa+=r}}ba+=p}}catch(hb){console.log(hb)}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";+"VSMDedicatedProcessBlock"==w.Class?v.value=m(e.Text):"VSMProductionControlBlock"==w.Class&&(v.value=m(e.Resources));v.style+=c(v.style,e,u,v,G);"VSMDedicatedProcessBlock"==w.Class&&(x=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),x.geometry.relative=!0,x.geometry.offset=new mxPoint(4,-13),x.vertex=!0,v.insert(x),x.style+=c(x.style,e,u,x));Da=new mxCell("",new mxGeometry(0,0,r,15),"strokeColor=none;fillColor=none;part=1;");Da.vertex=!0;v.insert(Da);Da.value=+m(e.Title);Da.style+=a(e.Title,G);e.Text=null;break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);Da=new mxCell("",new mxGeometry(.1*r,.3*p,.8*r,.6*p),"part=1;");Da.vertex=!0;v.insert(Da);Da.value=m(e.Resource);Da.style+=a(e.Resource,G);Da.style+=c(Da.style,e,u,Da,G);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";+v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,u,v);Cb=p;bc=parseInt(e.Cells);ja=c("part=1;",e,u,v);0<bc&&(Cb/=bc);X=[];Pa=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(0,(l-1)*Cb,r,Cb),ja),X[l].vertex=!0,v.insert(X[l]),X[l].value=m(e["cell_"+l]),X[l].style+=a(e["cell_"+l],G);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";+v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=c(v.style,e,u,v);Cb=p;bc=parseInt(e.Cells);ja=c("part=1;fillColor=none;",e,u,v);0<bc&&(Cb/=bc);X=[];Ub=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(.5*r,(l-1)*Cb,.5*r,Cb),"shape=partialRectangle;left=0;"+ja),X[l].vertex=!0,v.insert(X[l]),Ub[l]=new mxCell("",new mxGeometry(0,(l-1)*Cb,r,Cb),"strokeColor=none;fillColor=none;part=1;"),Ub[l].vertex=!0,v.insert(Ub[l]),Ub[l].value=+m(e["cell_"+l]),Ub[l].style+=a(e["cell_"+l],G);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18";v.style+=c(v.style,e,u,v);v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.17*r,.2*p,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");x.vertex=!0;v.insert(x);+x.style+=c(x.style,e,u,x);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";ja="shape=card;size=18;flipH=1;part=1;";x=new mxCell("",new mxGeometry(.1*r,0,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ja);x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);E=new mxCell("",new mxGeometry(.05*r,.1*p,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ja);E.vertex=!0;v.insert(E);E.style+=c(E.style,+e,u,E);var U=new mxCell("",new mxGeometry(0,.2*p,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+ja);U.vertex=!0;v.insert(U);U.value=m(e.Text);U.style+=c(U.style,e,u,U,G);break;case "VSMElectronicInformationArrow":v.style="group;";v.value=m(e.Title);v.style+=a(e.Title,G);var va=new mxCell("",new mxGeometry(0,0,r,p),"shape=mxgraph.lean_mapping.electronic_info_flow_edge;html=1;entryX=0;entryY=1;exitX=1;exitY=0;");va.edge=!0;va.geometry.relative=+1;D.addCell(va,v,null,v,v);break;case "AWSRoundedRectangleContainerBlock2":case "AWSRoundedRectangleContainerBlock":v.style+="strokeColor=none;fillColor=none;";e.Spotfleet?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=c(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,35,40),+"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.Beanstalk?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=c(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,30,40),"strokeColor=none;shape=mxgraph.aws3.elastic_beanstalk;fillColor=#759C3E;"),+E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.EC2?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=c(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),E.geometry.relative=+!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.Subnet?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=c(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.permissions;fillColor=#146EB4;"),E.geometry.relative=!0,E.geometry.offset=+new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.VPC?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=c(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.virtual_private_cloud;fillColor=#146EB4;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,+0),E.vertex=!0,v.insert(E)):e.AWS?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=c(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):+e.Corporate?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=c(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):+(v.style="resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;",v.value=m(e.Title),v.style+=c(v.style,e,u,v,G));break;case "AWSElasticComputeCloudBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.ec2;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=c(v.style,e,u,v,G);break;case "AWSRoute53Block2":v.style+="strokeColor=none;shape=mxgraph.aws3.route_53;verticalLabelPosition=bottom;align=center;verticalAlign=top;";+v.value=m(e.Title);v.style+=c(v.style,e,u,v,G);break;case "AWSRDBSBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.rds;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=c(v.style,e,u,v,G);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";qa=new mxCell("",new mxGeometry(.25*r,.25*p,.5*r,.5*p),"ellipse;html=1;strokeColor=#29AAE1;strokeWidth=2;");qa.vertex=!0;v.insert(qa);var Na=[qa];qa.style+=Y(e,u);va=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=none;dashed=0;html=1;strokeColor=#29AAE1;strokeWidth=2;");va.geometry.relative=!0;va.edge=!0;tc(.5*r,0,va,F,D,Na,v,qa);tc(.855*r,.145*p,va,F,D,Na,v,qa);tc(r,.5*p,va,F,D,Na,v,qa);tc(.855*r,.855*p,va,F,D,Na,v,qa);tc(.5*r,p,va,F,D,Na,v,qa);tc(.145*r,.855*p,va,F,D,Na,v,qa);tc(0,.5*p,va,F,D,Na,v,qa);tc(.145*r,.145*p,va,F,D,Na,v,qa);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";qa=new mxCell("",new mxGeometry(0,.5*p-10,r,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");-qa.vertex=!0;v.insert(qa);Na=[qa];va=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");va.geometry.relative=!0;va.edge=!0;Na=[qa];var Fd=r/e.NumTopNodes;for(l=0;l<e.NumTopNodes;l++)tc(.5*Fd+l*Fd,0,va,F,D,Na,v,qa);Fd=r/e.NumBottomNodes;for(l=0;l<e.NumBottomNodes;l++)tc(.5*Fd+l*Fd,p,va,F,D,Na,v,qa);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);-e.ToggleCharge&&(v.style+="flipV=1;");break;case "EIMessageChannelBlock":case "EIDatatypeChannelBlock":case "EIInvalidMessageChannelBlock":case "EIDeadLetterChannelBlock":case "EIGuaranteedDeliveryBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);"EIMessageChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(.45*-r,0)):"EIDatatypeChannelBlock"==+qa.vertex=!0;v.insert(qa);Na=[qa];va=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");va.geometry.relative=!0;va.edge=!0;Na=[qa];var Fd=r/e.NumTopNodes;for(l=0;l<e.NumTopNodes;l++)tc(.5*Fd+l*Fd,0,va,F,D,Na,v,qa);Fd=r/e.NumBottomNodes;for(l=0;l<e.NumBottomNodes;l++)tc(.5*Fd+l*Fd,p,va,F,D,Na,v,qa);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.value=m(e.Title);v.style+=c(v.style,e,u,v,G);+e.ToggleCharge&&(v.style+="flipV=1;");break;case "EIMessageChannelBlock":case "EIDatatypeChannelBlock":case "EIInvalidMessageChannelBlock":case "EIDeadLetterChannelBlock":case "EIGuaranteedDeliveryBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);"EIMessageChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(.45*-r,0)):"EIDatatypeChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.dataChannel;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(.45*-r,0)):"EIInvalidMessageChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.invalidMessageChannel;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(.45*-r,0)):"EIDeadLetterChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.deadLetterChannel;fillColor=#818181;part=1;"),x.geometry.offset=-new mxPoint(.45*-r,0)):"EIGuaranteedDeliveryBlock"==w.Class&&(x=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(-10,-7));x.geometry.relative=!0;x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);va=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;");va.geometry.relative=!0;va.edge=!0;gb(.15*r,.25*p,.85*r,.25*p,va,F,D,Na,v,qa);break;-case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,.07*p,.21*r,.86*p),"fillColor=#FFFF33;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.26*r,.09*p,.2*r,.82*p),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);U=new mxCell("",new mxGeometry(1,.5,.35*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");-U.geometry.relative=!0;U.geometry.offset=new mxPoint(.4*-r,-10);U.vertex=!0;v.insert(U);U.style+=b(U.style,e,u,U);fa=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;");fa.geometry.relative=!0;fa.edge=!0;x.insertEdge(fa,!0);E.insertEdge(fa,!1);fa.style+=H(e,u);F.push(D.addCell(fa,null,null,null,null));da=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;");-da.geometry.relative=!0;da.edge=!0;E.insertEdge(da,!0);U.insertEdge(da,!1);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);var Gd=+new mxPoint(.45*-r,0)):"EIGuaranteedDeliveryBlock"==w.Class&&(x=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(-10,-7));x.geometry.relative=!0;x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);va=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;");va.geometry.relative=!0;va.edge=!0;gb(.15*r,.25*p,.85*r,.25*p,va,F,D,Na,v,qa);break;+case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,.07*p,.21*r,.86*p),"fillColor=#FFFF33;part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);E=new mxCell("",new mxGeometry(.26*r,.09*p,.2*r,.82*p),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");E.vertex=!0;v.insert(E);E.style+=c(E.style,e,u,E);U=new mxCell("",new mxGeometry(1,.5,.35*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");+U.geometry.relative=!0;U.geometry.offset=new mxPoint(.4*-r,-10);U.vertex=!0;v.insert(U);U.style+=c(U.style,e,u,U);fa=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;");fa.geometry.relative=!0;fa.edge=!0;x.insertEdge(fa,!0);E.insertEdge(fa,!1);fa.style+=H(e,u);F.push(D.addCell(fa,null,null,null,null));da=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;");+da.geometry.relative=!0;da.edge=!0;E.insertEdge(da,!0);U.insertEdge(da,!1);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);var Gd=e.Messages,pe=(p-17)/Gd;E=[];va=[];for(l=0;l<Gd;l++){var Hd=pe*(l+1)-3;E[l]=new mxCell("",new mxGeometry(r-20,Hd,20,20),"part=1;");E[l].vertex=!0;v.insert(E[l]);switch(w.Class){case "EIMessageBlock":E[l].value=m(e["message_"+(l+1)]);E.style+=a(e["message_"+(l+1)],G);break;case "EICommandMessageBlock":E[l].value="C";E[l].style+="fontStyle=1;fontSize=13;";break;case "EIDocumentMessageBlock":E[l].value="D";E[l].style+="fontStyle=1;fontSize=13;";break;case "EIEventMessageBlock":E[l].value="E",E[l].style+=-"fontStyle=1;fontSize=13;"}E[l].style+=b(E[l].style,e,u,E[l]);va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");va[l].geometry.relative=!0;va[l].edge=!0;x.insertEdge(va[l],!1);E[l].insertEdge(va[l],!0);va[l].style+=b(va[l].style,e,u,va[l]);var Lc=[];Lc.push(new mxPoint(aa+8.5,ba+Hd+10));va[l].geometry.points=Lc;F.push(D.addCell(va[l],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";-v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.45*r,.25*p,.3*r,.5*p),"part=1;fillColor=#ffffff");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);va=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;");va.geometry.relative=!0;va.edge=!0;gb(0,.5*p,.4*r,.5*p,va,F,D,Na,v,qa);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";-v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);var fa=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;");fa.geometry.relative=!0;fa.edge=!0;gb(.05*r,.5*p,.85*r,.5*p,fa,F,D,Na,v,qa);var da=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;");da.geometry.relative=!0;da.edge=!0;gb(.05*r,.5*p,.85*-r,.15*p,da,F,D,Na,v,qa);var xa=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;");xa.geometry.relative=!0;xa.edge=!0;gb(.05*r,.5*p,.85*r,.85*p,xa,F,D,Na,v,qa);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);fa=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;");+"fontStyle=1;fontSize=13;"}E[l].style+=c(E[l].style,e,u,E[l]);va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");va[l].geometry.relative=!0;va[l].edge=!0;x.insertEdge(va[l],!1);E[l].insertEdge(va[l],!0);va[l].style+=c(va[l].style,e,u,va[l]);var Lc=[];Lc.push(new mxPoint(aa+8.5,ba+Hd+10));va[l].geometry.points=Lc;F.push(D.addCell(va[l],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";+v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.45*r,.25*p,.3*r,.5*p),"part=1;fillColor=#ffffff");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);va=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;");va.geometry.relative=!0;va.edge=!0;gb(0,.5*p,.4*r,.5*p,va,F,D,Na,v,qa);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";+v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);var fa=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;");fa.geometry.relative=!0;fa.edge=!0;gb(.05*r,.5*p,.85*r,.5*p,fa,F,D,Na,v,qa);var da=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;");da.geometry.relative=!0;da.edge=!0;gb(.05*r,.5*p,.85*+r,.15*p,da,F,D,Na,v,qa);var xa=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;");xa.geometry.relative=!0;xa.edge=!0;gb(.05*r,.5*p,.85*r,.85*p,xa,F,D,Na,v,qa);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);fa=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;");fa.geometry.relative=!0;fa.edge=!0;fa.style+=H(e,u);gb(.05*r,.5*p,.95*r,.5*p,fa,F,D,Na,v,qa);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");da.geometry.relative=!0;da.edge=!0;da.style+=H(e,u);gb(.3*r,.1*p,.3*r,.5*p,da,F,D,Na,v,qa);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");-xa.geometry.relative=!0;xa.edge=!0;xa.style+=H(e,u);gb(.7*r,.1*p,.7*r,.5*p,xa,F,D,Na,v,qa);var $a=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");$a.geometry.relative=!0;$a.edge=!0;$a.style+=H(e,u);gb(.5*r,.5*p,.5*r,.9*p,$a,F,D,Na,v,qa);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,-e,u,v,G);x=new mxCell("",new mxGeometry(.2*r,.21*p,.16*r,.24*p),"part=1;fillColor=#ffffff;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);fa=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;");fa.geometry.relative=!0;fa.edge=!0;gb(.45*r,.33*p,.8*r,.33*p,fa,F,D,Na,v,qa);E=new mxCell("",new mxGeometry(.64*r,.55*p,.16*r,.24*p),"part=1;fillColor=#ffffff;");E.vertex=!0;v.insert(E);E.style+=b(E.style,-e,u,E);da=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;");da.geometry.relative=!0;da.edge=!0;gb(.55*r,.67*p,.2*r,.67*p,da,F,D,Na,v,qa);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.1*r,.15*p,.8*r,.7*p),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");x.vertex=!0;v.insert(x);-x.style+=b(x.style,e,u,x);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.04*r,.06*p,.18*r,.28*p),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.2*r,.56*p,.2*r,.32*p),"part=1;");E.vertex=!0;v.insert(E);E.value="A";E.style+="fontStyle=1;fontSize=13;";x.style+=b(x.style,e,u,x);fa=new mxCell("",new mxGeometry(0,-0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");fa.geometry.relative=!0;fa.edge=!0;x.insertEdge(fa,!1);E.insertEdge(fa,!0);fa.style+=b(fa.style,e,u,fa);Lc=[];Lc.push(new mxPoint(aa+.13*r,ba+.72*p));fa.geometry.points=Lc;F.push(D.addCell(fa,null,null,null,null));U=new mxCell("",new mxGeometry(.6*r,.06*p,.18*r,.28*p),"ellipse;fillColor=#808080;part=1;");U.vertex=!0;v.insert(U);U.style+=H(e,u)+oa(e);U.style+=b(U.style,e,u,U);ta=new mxCell("",-new mxGeometry(.76*r,.56*p,.2*r,.32*p),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=H(e,u)+M(e,u,ta)+oa(e)+sa(e);ta.value="B";ta.style+="fontStyle=1;fontSize=13;fillColor=#ffffff;";ta.style+=b(ta.style,e,u,ta);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");da.geometry.relative=!0;da.edge=!0;U.insertEdge(da,!1);ta.insertEdge(da,!0);da.style+=b(da.style,e,u,da);var ef=[];ef.push(new mxPoint(aa+.69*r,ba+.72*-p));da.geometry.points=ef;F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;");xa.geometry.relative=!0;xa.edge=!0;x.insertEdge(xa,!1);U.insertEdge(xa,!0);xa.style+=b(xa.style,e,u,xa);F.push(D.addCell(xa,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("1",new mxGeometry(.2*-r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("2",new mxGeometry(.45*r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);U=new mxCell("3",new mxGeometry(.7*r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");U.vertex=!0;v.insert(U);U.style+=b(U.style,e,u,U);fa=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");-x.insertEdge(fa,!1);E.insertEdge(fa,!0);fa.geometry.points=[new mxPoint(aa+.375*r,ba+.15*p)];fa.geometry.relative=!0;fa.edge=!0;fa.style+=b(fa.style,e,u,fa);F.push(D.addCell(fa,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");E.insertEdge(da,!1);U.insertEdge(da,!0);da.geometry.points=[new mxPoint(aa+.675*r,ba+.15*p)];da.geometry.relative=!0;da.edge=!0;da.style+=b(da.style,e,u,da);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+=-"verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.3*r,.2*p,.4*r,.6*p),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.38*r,.42*p,.24*r,.16*p),"part=1;fillColor=#aefe7d;");-x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.38*r,0,.24*r,.16*p),"part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);U=new mxCell("",new mxGeometry(.76*r,.23*p,.24*r,.16*p),"");U.vertex=!0;v.insert(U);U.style=E.style;var ta=new mxCell("",new mxGeometry(.76*r,.61*p,.24*r,.16*p),"");ta.vertex=!0;v.insert(ta);ta.style=E.style;var Zd=new mxCell("",new mxGeometry(.38*r,.84*p,.24*r,.16*p),"");Zd.vertex=!0;v.insert(Zd);Zd.style=E.style;var $d=new mxCell("",new mxGeometry(0,-.61*p,.24*r,.16*p),"");$d.vertex=!0;v.insert($d);$d.style=E.style;var ae=new mxCell("",new mxGeometry(0,.23*p,.24*r,.16*p),"");ae.vertex=!0;v.insert(ae);ae.style=E.style;fa=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(fa,!1);E.insertEdge(fa,!0);fa.edge=!0;fa.style+=b(fa.style,e,u,fa);F.push(D.addCell(fa,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(da,!1);U.insertEdge(da,!0);da.edge=!0;da.style+=b(da.style,e,u,da);-F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(xa,!1);ta.insertEdge(xa,!0);xa.edge=!0;xa.style+=b(xa.style,e,u,xa);F.push(D.addCell(xa,null,null,null,null));$a=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge($a,!1);Zd.insertEdge($a,!0);$a.edge=!0;$a.style+=b($a.style,e,u,$a);F.push(D.addCell($a,null,null,null,null));var Mc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(Mc,-!1);$d.insertEdge(Mc,!0);Mc.edge=!0;Mc.style+=b(Mc.style,e,u,Mc);F.push(D.addCell(Mc,null,null,null,null));var Nc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(Nc,!1);ae.insertEdge(Nc,!0);Nc.edge=!0;Nc.style+=b(Nc.style,e,u,Nc);F.push(D.addCell(Nc,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);fa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");-fa.geometry.relative=!0;fa.edge=!0;gb(.05*r,.5*p,.6*r,.25*p,fa,F,D,Na,v,qa);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");da.geometry.relative=!0;da.edge=!0;gb(.05*r,.5*p,.6*r,.75*p,da,F,D,Na,v,qa);x=new mxCell("",new mxGeometry(.7*r,.1*p,.15*r,.32*p),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";-v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.25*r,.25*p,.5*r,.5*p),"shape=mxgraph.eip.control_bus;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);U=new mxCell("",-new mxGeometry(r-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");U.vertex=!0;v.insert(U);U.style+=b(U.style,e,u,U);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");xa.geometry.relative=!0;xa.edge=!0;x.insertEdge(xa,!1);U.insertEdge(xa,!0);xa.style+=b(xa.style,e,u,xa);xa.geometry.points=[new mxPoint(aa+8.5,ba+40)];F.push(D.addCell(xa,null,null,null,null));ta=new mxCell("",new mxGeometry(r--45,p-20,20,20),"part=1;");ta.vertex=!0;v.insert(ta);ta.value=m(e.message_0);ta.style+=a(e.message_0,G);ta.style+=b(ta.style,e,u,ta,G);$a=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");$a.geometry.relative=!0;$a.edge=!0;x.insertEdge($a,!1);ta.insertEdge($a,!0);$a.style+=b($a.style,e,u,$a);$a.geometry.points=[new mxPoint(aa+8.5,ba+p-10)];F.push(D.addCell($a,null,null,null,null));Gd=e.HistoryMessages;pe=(p-75)/Gd;E=[];-va=[];for(l=0;l<Gd;l++)Hd=pe*(l+1)+30,E[l]=new mxCell("",new mxGeometry(r-20,Hd,20,20),"part=1;"),E[l].vertex=!0,E[l].value=m(e["message_"+(l+1)]),E.style+=a(e["message_"+(l+1)],G),v.insert(E[l]),E[l].style+=b(E[l].style,e,u,E[l],G),va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),va[l].geometry.relative=!0,va[l].edge=!0,U.insertEdge(va[l],!1),E[l].insertEdge(va[l],!0),va[l].style+=b(va[l].style,e,u,va[l]),Lc=[],-Lc.push(new mxPoint(aa+r-30,ba+Hd+10)),va[l].geometry.points=Lc,F.push(D.addCell(va[l],null,null,null,null));break;case "Equation":LucidImporter.hasMath=!0;v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);v.value="$$"+e.Latex+"$$";break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>e.DoorAngle&&(v.style+="flipV=1;");v.style+=b(v.style,e,u,v);break;case "fpWall":v.style+="labelPosition=center;verticalAlign=bottom;verticalLabelPosition=top;";v.value=m(e);v.style+=b(v.style,e,u,-v,G);v.style=v.style.replace("rotation=180;","");break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;";0<e.DoorAngle&&(v.style+="flipV=1;");v.style+=b(v.style,e,u,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=new mxCell("",new mxGeometry(0,0,r,.25*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=[];var ff=.02*r,qe=(r-2*ff)/e.LightCount,gf=.8*qe;for(l=0;l<e.LightCount;l++)E[l]=new mxCell("",new mxGeometry(ff+-qe*l+(qe-gf)/2,.25*p,gf,.75*p),"ellipse;part=1;"),E[l].vertex=!0,v.insert(E[l]),E[l].style+=b(E[l].style,e,u,E[l]);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=[];var hf=r/e.SinkCount;for(l=0;l<e.SinkCount;l++)x[l]=new mxCell("",new mxGeometry(hf*l,0,hf,p),"part=1;shape=mxgraph.floorplan.sink_2;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=b(x[l].style,e,u,x[l]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Fb=-.1*r/e.StallCount;x=new mxCell("",new mxGeometry(0,0,Fb,p),"fillColor=#000000;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);var Ob=(r-Fb)/e.StallCount,re=[],Id=[],Jd=[],Kd=[];Z=H(e,u);Z=""==Z?"#000000;":Z.replace("stokreColor=","");var se="part=1;fillColor="+Z;se+=b(se,e,u,v);var te=b("",e,u,v);for(l=0;l<e.StallCount;l++)re[l]=new mxCell("",new mxGeometry((l+1)*Ob,0,Fb,p),se),re[l].vertex=!0,v.insert(re[l]),Jd[l]=new mxCell("",new mxGeometry(Fb+l*Ob+.05*(Ob-Fb),p-.92*(Ob-Fb),.9*(Ob-+xa.geometry.relative=!0;xa.edge=!0;xa.style+=H(e,u);gb(.7*r,.1*p,.7*r,.5*p,xa,F,D,Na,v,qa);var $a=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");$a.geometry.relative=!0;$a.edge=!0;$a.style+=H(e,u);gb(.5*r,.5*p,.5*r,.9*p,$a,F,D,Na,v,qa);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,+e,u,v,G);x=new mxCell("",new mxGeometry(.2*r,.21*p,.16*r,.24*p),"part=1;fillColor=#ffffff;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);fa=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;");fa.geometry.relative=!0;fa.edge=!0;gb(.45*r,.33*p,.8*r,.33*p,fa,F,D,Na,v,qa);E=new mxCell("",new mxGeometry(.64*r,.55*p,.16*r,.24*p),"part=1;fillColor=#ffffff;");E.vertex=!0;v.insert(E);E.style+=c(E.style,+e,u,E);da=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;");da.geometry.relative=!0;da.edge=!0;gb(.55*r,.67*p,.2*r,.67*p,da,F,D,Na,v,qa);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.1*r,.15*p,.8*r,.7*p),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");x.vertex=!0;v.insert(x);+x.style+=c(x.style,e,u,x);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.04*r,.06*p,.18*r,.28*p),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);E=new mxCell("",new mxGeometry(.2*r,.56*p,.2*r,.32*p),"part=1;");E.vertex=!0;v.insert(E);E.value="A";E.style+="fontStyle=1;fontSize=13;";x.style+=c(x.style,e,u,x);fa=new mxCell("",new mxGeometry(0,+0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");fa.geometry.relative=!0;fa.edge=!0;x.insertEdge(fa,!1);E.insertEdge(fa,!0);fa.style+=c(fa.style,e,u,fa);Lc=[];Lc.push(new mxPoint(aa+.13*r,ba+.72*p));fa.geometry.points=Lc;F.push(D.addCell(fa,null,null,null,null));U=new mxCell("",new mxGeometry(.6*r,.06*p,.18*r,.28*p),"ellipse;fillColor=#808080;part=1;");U.vertex=!0;v.insert(U);U.style+=H(e,u)+oa(e);U.style+=c(U.style,e,u,U);ta=new mxCell("",+new mxGeometry(.76*r,.56*p,.2*r,.32*p),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=H(e,u)+M(e,u,ta)+oa(e)+sa(e);ta.value="B";ta.style+="fontStyle=1;fontSize=13;fillColor=#ffffff;";ta.style+=c(ta.style,e,u,ta);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");da.geometry.relative=!0;da.edge=!0;U.insertEdge(da,!1);ta.insertEdge(da,!0);da.style+=c(da.style,e,u,da);var ef=[];ef.push(new mxPoint(aa+.69*r,ba+.72*+p));da.geometry.points=ef;F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;");xa.geometry.relative=!0;xa.edge=!0;x.insertEdge(xa,!1);U.insertEdge(xa,!0);xa.style+=c(xa.style,e,u,xa);F.push(D.addCell(xa,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("1",new mxGeometry(.2*+r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);E=new mxCell("2",new mxGeometry(.45*r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");E.vertex=!0;v.insert(E);E.style+=c(E.style,e,u,E);U=new mxCell("3",new mxGeometry(.7*r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");U.vertex=!0;v.insert(U);U.style+=c(U.style,e,u,U);fa=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");+x.insertEdge(fa,!1);E.insertEdge(fa,!0);fa.geometry.points=[new mxPoint(aa+.375*r,ba+.15*p)];fa.geometry.relative=!0;fa.edge=!0;fa.style+=c(fa.style,e,u,fa);F.push(D.addCell(fa,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");E.insertEdge(da,!1);U.insertEdge(da,!0);da.geometry.points=[new mxPoint(aa+.675*r,ba+.15*p)];da.geometry.relative=!0;da.edge=!0;da.style+=c(da.style,e,u,da);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+=+"verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.3*r,.2*p,.4*r,.6*p),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.38*r,.42*p,.24*r,.16*p),"part=1;fillColor=#aefe7d;");+x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);E=new mxCell("",new mxGeometry(.38*r,0,.24*r,.16*p),"part=1;");E.vertex=!0;v.insert(E);E.style+=c(E.style,e,u,E);U=new mxCell("",new mxGeometry(.76*r,.23*p,.24*r,.16*p),"");U.vertex=!0;v.insert(U);U.style=E.style;var ta=new mxCell("",new mxGeometry(.76*r,.61*p,.24*r,.16*p),"");ta.vertex=!0;v.insert(ta);ta.style=E.style;var Zd=new mxCell("",new mxGeometry(.38*r,.84*p,.24*r,.16*p),"");Zd.vertex=!0;v.insert(Zd);Zd.style=E.style;var $d=new mxCell("",new mxGeometry(0,+.61*p,.24*r,.16*p),"");$d.vertex=!0;v.insert($d);$d.style=E.style;var ae=new mxCell("",new mxGeometry(0,.23*p,.24*r,.16*p),"");ae.vertex=!0;v.insert(ae);ae.style=E.style;fa=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(fa,!1);E.insertEdge(fa,!0);fa.edge=!0;fa.style+=c(fa.style,e,u,fa);F.push(D.addCell(fa,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(da,!1);U.insertEdge(da,!0);da.edge=!0;da.style+=c(da.style,e,u,da);+F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(xa,!1);ta.insertEdge(xa,!0);xa.edge=!0;xa.style+=c(xa.style,e,u,xa);F.push(D.addCell(xa,null,null,null,null));$a=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge($a,!1);Zd.insertEdge($a,!0);$a.edge=!0;$a.style+=c($a.style,e,u,$a);F.push(D.addCell($a,null,null,null,null));var Mc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(Mc,+!1);$d.insertEdge(Mc,!0);Mc.edge=!0;Mc.style+=c(Mc.style,e,u,Mc);F.push(D.addCell(Mc,null,null,null,null));var Nc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(Nc,!1);ae.insertEdge(Nc,!0);Nc.edge=!0;Nc.style+=c(Nc.style,e,u,Nc);F.push(D.addCell(Nc,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);fa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");+fa.geometry.relative=!0;fa.edge=!0;gb(.05*r,.5*p,.6*r,.25*p,fa,F,D,Na,v,qa);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");da.geometry.relative=!0;da.edge=!0;gb(.05*r,.5*p,.6*r,.75*p,da,F,D,Na,v,qa);x=new mxCell("",new mxGeometry(.7*r,.1*p,.15*r,.32*p),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";+v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.25*r,.25*p,.5*r,.5*p),"shape=mxgraph.eip.control_bus;part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);U=new mxCell("",+new mxGeometry(r-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");U.vertex=!0;v.insert(U);U.style+=c(U.style,e,u,U);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");xa.geometry.relative=!0;xa.edge=!0;x.insertEdge(xa,!1);U.insertEdge(xa,!0);xa.style+=c(xa.style,e,u,xa);xa.geometry.points=[new mxPoint(aa+8.5,ba+40)];F.push(D.addCell(xa,null,null,null,null));ta=new mxCell("",new mxGeometry(r-+45,p-20,20,20),"part=1;");ta.vertex=!0;v.insert(ta);ta.value=m(e.message_0);ta.style+=a(e.message_0,G);ta.style+=c(ta.style,e,u,ta,G);$a=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");$a.geometry.relative=!0;$a.edge=!0;x.insertEdge($a,!1);ta.insertEdge($a,!0);$a.style+=c($a.style,e,u,$a);$a.geometry.points=[new mxPoint(aa+8.5,ba+p-10)];F.push(D.addCell($a,null,null,null,null));Gd=e.HistoryMessages;pe=(p-75)/Gd;E=[];+va=[];for(l=0;l<Gd;l++)Hd=pe*(l+1)+30,E[l]=new mxCell("",new mxGeometry(r-20,Hd,20,20),"part=1;"),E[l].vertex=!0,E[l].value=m(e["message_"+(l+1)]),E.style+=a(e["message_"+(l+1)],G),v.insert(E[l]),E[l].style+=c(E[l].style,e,u,E[l],G),va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),va[l].geometry.relative=!0,va[l].edge=!0,U.insertEdge(va[l],!1),E[l].insertEdge(va[l],!0),va[l].style+=c(va[l].style,e,u,va[l]),Lc=[],+Lc.push(new mxPoint(aa+r-30,ba+Hd+10)),va[l].geometry.points=Lc,F.push(D.addCell(va[l],null,null,null,null));break;case "Equation":LucidImporter.hasMath=!0;v.style+="strokeColor=none;";v.style+=c(v.style,e,u,v);v.value="$$"+e.Latex+"$$";break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>e.DoorAngle&&(v.style+="flipV=1;");v.style+=c(v.style,e,u,v);break;case "fpWall":v.style+="labelPosition=center;verticalAlign=bottom;verticalLabelPosition=top;";v.value=m(e);v.style+=c(v.style,e,u,+v,G);v.style=v.style.replace("rotation=180;","");break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;";0<e.DoorAngle&&(v.style+="flipV=1;");v.style+=c(v.style,e,u,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,u,v);x=new mxCell("",new mxGeometry(0,0,r,.25*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);E=[];var ff=.02*r,qe=(r-2*ff)/e.LightCount,gf=.8*qe;for(l=0;l<e.LightCount;l++)E[l]=new mxCell("",new mxGeometry(ff++qe*l+(qe-gf)/2,.25*p,gf,.75*p),"ellipse;part=1;"),E[l].vertex=!0,v.insert(E[l]),E[l].style+=c(E[l].style,e,u,E[l]);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,u,v);x=[];var hf=r/e.SinkCount;for(l=0;l<e.SinkCount;l++)x[l]=new mxCell("",new mxGeometry(hf*l,0,hf,p),"part=1;shape=mxgraph.floorplan.sink_2;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=c(x[l].style,e,u,x[l]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Fb=+.1*r/e.StallCount;x=new mxCell("",new mxGeometry(0,0,Fb,p),"fillColor=#000000;part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);var Ob=(r-Fb)/e.StallCount,re=[],Id=[],Jd=[],Kd=[];Z=H(e,u);Z=""==Z?"#000000;":Z.replace("stokreColor=","");var se="part=1;fillColor="+Z;se+=c(se,e,u,v);var te=c("",e,u,v);for(l=0;l<e.StallCount;l++)re[l]=new mxCell("",new mxGeometry((l+1)*Ob,0,Fb,p),se),re[l].vertex=!0,v.insert(re[l]),Jd[l]=new mxCell("",new mxGeometry(Fb+l*Ob+.05*(Ob-Fb),p-.92*(Ob-Fb),.9*(Ob-Fb),.92*(Ob-Fb)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),Jd[l].vertex=!0,v.insert(Jd[l]),Jd[l].style+=te,Id[l]=new mxCell("",new mxGeometry(Fb+l*Ob+.2*(Ob-Fb),0,.6*(Ob-Fb),.8*(Ob-Fb)),"shape=mxgraph.floorplan.toilet;part=1;"),Id[l].vertex=!0,v.insert(Id[l]),Id[l].style+=te,Kd[l]=new mxCell("",new mxGeometry(Fb+l*Ob,.42*p,.15*(Ob-Fb),.12*(Ob-Fb)),"part=1;"),Kd[l].vertex=!0,v.insert(Kd[l]),Kd[l].style+=te;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var be="edgeStyle=none;endArrow=none;part=1;";-Z=H(e,u);Z=""==Z?"#000000;":Z.replace("strokeColor=","");var Vc="shape=triangle;part=1;fillColor="+Z;Vc+=b(Vc,e,u,v);fa=new mxCell("",new mxGeometry(0,0,0,0),be);fa.geometry.relative=!0;fa.edge=!0;gb(0,.5*p,.65*r,.5*p,fa,F,D,Na,v,qa);var ia=p/e.numLines;da=[];var Wc=[];for(l=0;l<e.numLines;l++)da[l]=new mxCell("",new mxGeometry(0,0,0,0),be),da[l].geometry.relative=!0,da[l].edge=!0,gb(.65*r,.5*p,.96*r,(l+.5)*ia,da[l],F,D,Na,v,qa),Wc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*ia,.05*r,.6*ia),Vc),-Wc[l].vertex=!0,v.insert(Wc[l]);break;case "PEMultilines":v.style+="strokeColor=none;fillColor=none;";be="edgeStyle=none;endArrow=none;part=1;";Z=H(e,u);Z=""==Z?"#000000;":Z.replace("strokeColor=","");Vc="shape=triangle;part=1;fillColor="+Z;Vc+=b(Vc,e,u,v);ia=p/e.numLines;da=[];Wc=[];for(l=0;l<e.numLines;l++)da[l]=new mxCell("",new mxGeometry(0,0,0,0),be),da[l].geometry.relative=!0,da[l].edge=!0,gb(0,(l+.5)*ia,.96*r,(l+.5)*ia,da[l],F,D,Na,v,qa),Wc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*ia,.05*-r,.6*ia),Vc),Wc[l].vertex=!0,v.insert(Wc[l]);break;case "PEVesselBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);switch(e.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+=b(v.style,e,u,v,G);break;case "PEClosedTankBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);1==e.peakedRoof&&0==e.stumpType?v.style+=-"shape=mxgraph.pid.vessels.tank_(conical_roof);":1==e.stumpType&&(v.style+="shape=mxgraph.pid.vessels.tank_(boot);");v.style+=b(v.style,e,u,v,G);break;case "PEColumnBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style=0==e.columnType?v.style+"shape=mxgraph.pid.vessels.pressurized_vessel;":v.style+"shape=mxgraph.pid.vessels.tank;";v.style+=b(v.style,e,u,v,G);break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;";v.value=m(e.Text);v.style+=-b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,.2*p,r,.6*p),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");x.vertex=!0;v.insert(x);x.style+=ja;x.style+=b(x.style,e,u,x);ja="endSize=4;endArrow=block;endFill=1;";0==e.compressorType?(fa=new mxCell("",new mxGeometry(0,0,0,0),""),fa.geometry.relative=!0,fa.edge=!0,fa.style+=ja,fa.style+=b(fa.style,e,u,fa),gb(0,0,0,.2*p,fa,F,D,Na,v,qa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=-ja,da.style+=b(da.style,e,u,da),gb(r,.67*p,r,p,da,F,D,Na,v,qa)):(x.style+="flipH=1;",fa=new mxCell("",new mxGeometry(0,0,0,0),""),fa.geometry.relative=!0,fa.edge=!0,fa.style+=ja,fa.style+=b(fa.style,e,u,fa),gb(0,0,0,.33*p,fa,F,D,Na,v,qa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ja,da.style+=b(da.style,e,u,da),gb(r,.8*p,r,p,da,F,D,Na,v,qa));1==e.centerLineType&&(xa=new mxCell("",new mxGeometry(0,0,0,0),""),xa.geometry.relative=!0,xa.edge=!0,xa.style+=-ja,xa.style+=b(xa.style,e,u,xa),gb(.2*r,.5*p,.8*r,.5*p,xa,F,D,Na,v,qa));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.2*r,.2*p,.6*r,.6*p),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(w.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+=b(v.style,e,u,v);"PEIndicator2Block"==-w.Class||"PESharedIndicator2Block"==w.Class?(x=new mxCell("",new mxGeometry(0,0,r,.5*r),"part=1;strokeColor=none;fillColor=none;"),x.vertex=!0,v.insert(x),x.value=m(e.TopText),x.style+=a(e.TopText,G),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,.5*r,r,.5*r),"part=1;strokeColor=none;fillColor=none;")):(x=new mxCell("",new mxGeometry(0,0,r,.5*p),"part=1;strokeColor=none;fillColor=none;"),x.vertex=!0,v.insert(x),x.value=m(e.TopText),x.style+=a(e.TopText,G),x.style+=b(x.style,e,u,x,G),-E=new mxCell("",new mxGeometry(0,.5*p,r,.5*p),"part=1;strokeColor=none;fillColor=none;"));E.vertex=!0;v.insert(E);E.value=m(e.BotText);E.style+=a(e.BotText,G);E.style+=b(E.style,e,u,E,G);switch(e.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 ue=+Z=H(e,u);Z=""==Z?"#000000;":Z.replace("strokeColor=","");var Vc="shape=triangle;part=1;fillColor="+Z;Vc+=c(Vc,e,u,v);fa=new mxCell("",new mxGeometry(0,0,0,0),be);fa.geometry.relative=!0;fa.edge=!0;gb(0,.5*p,.65*r,.5*p,fa,F,D,Na,v,qa);var ia=p/e.numLines;da=[];var Wc=[];for(l=0;l<e.numLines;l++)da[l]=new mxCell("",new mxGeometry(0,0,0,0),be),da[l].geometry.relative=!0,da[l].edge=!0,gb(.65*r,.5*p,.96*r,(l+.5)*ia,da[l],F,D,Na,v,qa),Wc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*ia,.05*r,.6*ia),Vc),+Wc[l].vertex=!0,v.insert(Wc[l]);break;case "PEMultilines":v.style+="strokeColor=none;fillColor=none;";be="edgeStyle=none;endArrow=none;part=1;";Z=H(e,u);Z=""==Z?"#000000;":Z.replace("strokeColor=","");Vc="shape=triangle;part=1;fillColor="+Z;Vc+=c(Vc,e,u,v);ia=p/e.numLines;da=[];Wc=[];for(l=0;l<e.numLines;l++)da[l]=new mxCell("",new mxGeometry(0,0,0,0),be),da[l].geometry.relative=!0,da[l].edge=!0,gb(0,(l+.5)*ia,.96*r,(l+.5)*ia,da[l],F,D,Na,v,qa),Wc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*ia,.05*+r,.6*ia),Vc),Wc[l].vertex=!0,v.insert(Wc[l]);break;case "PEVesselBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);switch(e.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+=c(v.style,e,u,v,G);break;case "PEClosedTankBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);1==e.peakedRoof&&0==e.stumpType?v.style+=+"shape=mxgraph.pid.vessels.tank_(conical_roof);":1==e.stumpType&&(v.style+="shape=mxgraph.pid.vessels.tank_(boot);");v.style+=c(v.style,e,u,v,G);break;case "PEColumnBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style=0==e.columnType?v.style+"shape=mxgraph.pid.vessels.pressurized_vessel;":v.style+"shape=mxgraph.pid.vessels.tank;";v.style+=c(v.style,e,u,v,G);break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;";v.value=m(e.Text);v.style+=+c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,.2*p,r,.6*p),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");x.vertex=!0;v.insert(x);x.style+=ja;x.style+=c(x.style,e,u,x);ja="endSize=4;endArrow=block;endFill=1;";0==e.compressorType?(fa=new mxCell("",new mxGeometry(0,0,0,0),""),fa.geometry.relative=!0,fa.edge=!0,fa.style+=ja,fa.style+=c(fa.style,e,u,fa),gb(0,0,0,.2*p,fa,F,D,Na,v,qa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=+ja,da.style+=c(da.style,e,u,da),gb(r,.67*p,r,p,da,F,D,Na,v,qa)):(x.style+="flipH=1;",fa=new mxCell("",new mxGeometry(0,0,0,0),""),fa.geometry.relative=!0,fa.edge=!0,fa.style+=ja,fa.style+=c(fa.style,e,u,fa),gb(0,0,0,.33*p,fa,F,D,Na,v,qa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ja,da.style+=c(da.style,e,u,da),gb(r,.8*p,r,p,da,F,D,Na,v,qa));1==e.centerLineType&&(xa=new mxCell("",new mxGeometry(0,0,0,0),""),xa.geometry.relative=!0,xa.edge=!0,xa.style+=+ja,xa.style+=c(xa.style,e,u,xa),gb(.2*r,.5*p,.8*r,.5*p,xa,F,D,Na,v,qa));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.2*r,.2*p,.6*r,.6*p),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(w.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+=c(v.style,e,u,v);"PEIndicator2Block"==+w.Class||"PESharedIndicator2Block"==w.Class?(x=new mxCell("",new mxGeometry(0,0,r,.5*r),"part=1;strokeColor=none;fillColor=none;"),x.vertex=!0,v.insert(x),x.value=m(e.TopText),x.style+=a(e.TopText,G),x.style+=c(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,.5*r,r,.5*r),"part=1;strokeColor=none;fillColor=none;")):(x=new mxCell("",new mxGeometry(0,0,r,.5*p),"part=1;strokeColor=none;fillColor=none;"),x.vertex=!0,v.insert(x),x.value=m(e.TopText),x.style+=a(e.TopText,G),x.style+=c(x.style,e,u,x,G),+E=new mxCell("",new mxGeometry(0,.5*p,r,.5*p),"part=1;strokeColor=none;fillColor=none;"));E.vertex=!0;v.insert(E);E.value=m(e.BotText);E.style+=a(e.BotText,G);E.style+=c(E.style,e,u,E,G);switch(e.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 ue=!1;"PEPoweredValveBlock"==w.Class?1!=e.poweredHandOperated&&(ue=!0):1!=e.handOperated&&(ue=!0);if(ue){e=h(w).Properties;O=e.BoundingBox;var Sf=O.h;O.h="PEAngleValveBlock"==w.Class||"PEAngleGlobeValveBlock"==w.Class?.7*O.h:.6*O.h;v=new mxCell("",new mxGeometry(Math.round(.75*O.x+xc),Math.round(.75*(O.y+Sf-O.h)+yc),Math.round(.75*O.w),Math.round(.75*O.h)),"");v.vertex=!0;Xa(v,w,D)}if("PEPoweredValveBlock"==w.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;",-v.style+=b(v.style,e,u,v),1==e.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",x=new mxCell("",new mxGeometry(.325*r,0,.35*r,.35*p),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),x.vertex=!0,v.insert(x),x.value=m(e.PoweredText),x.style+=(G?"":q(e.PoweredText)+t(e.PoweredText)+C(e.PoweredText)+I(e.PoweredText)+Q(e.PoweredText)+L(e.PoweredText)+S(e.PoweredText))+"fontSize=6;"+R(e.PoweredText),x.style+=b(x.style,e,u,x,G)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";-v.value=m(e.Text);switch(w.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==e.handOperated&&(v.style+="actuator=man;")}v.style+=b(v.style,e,u,v,G);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,+v.style+=c(v.style,e,u,v),1==e.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",x=new mxCell("",new mxGeometry(.325*r,0,.35*r,.35*p),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),x.vertex=!0,v.insert(x),x.value=m(e.PoweredText),x.style+=(G?"":q(e.PoweredText)+t(e.PoweredText)+C(e.PoweredText)+I(e.PoweredText)+Q(e.PoweredText)+L(e.PoweredText)+S(e.PoweredText))+"fontSize=6;"+R(e.PoweredText),x.style+=c(x.style,e,u,x,G)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";+v.value=m(e.Text);switch(w.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==e.handOperated&&(v.style+="actuator=man;")}v.style+=c(v.style,e,u,v,G);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-110),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(-20,110),U.vertex=!0,v.insert(U),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):-new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,u,v);break;case "UI2WindowBlock":v.value=m(e.Title);v.style+="shape=mxgraph.mockup.containers.window;mainText=;align=center;verticalAlign=top;spacing=5;"+(G?"fontSize=13;":f(e.Title)+q(e.Title)+t(e.Title));1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-50),+new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=c(v.style,e,u,v);break;case "UI2WindowBlock":v.value=m(e.Title);v.style+="shape=mxgraph.mockup.containers.window;mainText=;align=center;verticalAlign=top;spacing=5;"+(G?"fontSize=13;":f(e.Title)+q(e.Title)+t(e.Title));1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(-20,30),U.vertex=!0,v.insert(U),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",-new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,u,v,G);break;case "UI2DialogBlock":v.value=m(e.Text);v.style+=a(e.Text,G);x=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");x.vertex=!0;v.insert(x);x.value=m(e.Title);x.style+=a(e.Title,G);x.style+=b(x.style,e,u,x,G);E=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");+new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=c(v.style,e,u,v,G);break;case "UI2DialogBlock":v.value=m(e.Text);v.style+=a(e.Text,G);x=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");x.vertex=!0;v.insert(x);x.value=m(e.Title);x.style+=a(e.Title,G);x.style+=c(x.style,e,u,x,G);E=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");E.geometry.relative=!0;E.geometry.offset=new mxPoint(-25,-10);E.vertex=!0;x.insert(E);1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(-20,30),U.vertex=!0,v.insert(U),v.style+="spacingRight=20;");-1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,u,v);e.Text=null;break;case "UI2AccordionBlock":x=[];ia=25;for(l=0;l<=e.Panels-1;l++)x[l]=l<e.Selected-1?new mxCell("",new mxGeometry(0,+1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=c(v.style,e,u,v);e.Text=null;break;case "UI2AccordionBlock":x=[];ia=25;for(l=0;l<=e.Panels-1;l++)x[l]=l<e.Selected-1?new mxCell("",new mxGeometry(0,l*ia,r,ia),"part=1;fillColor=#000000;fillOpacity=25;"):l==e.Selected-1?new mxCell("",new mxGeometry(0,l*ia,r,ia),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0,p-(e.Panels-e.Selected)*ia+(l-e.Selected)*ia,r,ia),"part=1;fillColor=#000000;fillOpacity=25;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Panel_"+(l+1)]),x[l].style+=a(e["Panel_"+(l+1)],G),0>x[l].style.indexOf(";align=")&&(x[l].style+="align=left;spacingLeft=5;");var Va=H(e,u);Va=Va.replace("strokeColor","fillColor2");""==Va&&(Va="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-e.Selected*ia-20-(e.Panels-e.Selected)*ia),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-e.Selected*ia-(e.Panels-e.Selected)*ia),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,e.Selected*ia),E.vertex=!0,v.insert(E),v.style+=-"spacingRight=20;",E.style+=Va,E.style+=b(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20-(e.Panels-e.Selected)*ia),U.vertex=!0,v.insert(U),U.style+=Va,U.style+=b(U.style,e,u,U));ta=1==e.vScroll?new mxCell("",new mxGeometry(0,-e.Selected*ia,r-20,p-e.Selected*ia-20-(e.Panels-e.Selected)*ia),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,e.Selected*ia,r-20,p-e.Selected*ia-(e.Panels-e.Selected)*ia),"part=1;fillColor=none;strokeColor=none;");ta.vertex=!0;v.insert(ta);ta.value=m(e.Content_1);ta.style+=a(e.Content_1,G);!G&&0>ta.style.indexOf(";align=")&&(ta.style+="align=left;spacingLeft=5;");v.style+=b(v.style,e,u,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";-x=[];E=[];ia=25;var Ib=3,Ga=(r+Ib)/(e.Tabs+1),ib=new mxCell("",new mxGeometry(0,ia,r,p-ia),"part=1;");ib.vertex=!0;v.insert(ib);ib.style+=b(ib.style,e,u,ib);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(10+l*Ga,0,Ga-Ib,ia),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(10+l*Ga,0,Ga-Ib,ia),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ga-Ib,ia),"fillColor=#000000;fillOpacity=25;"),-E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;"),E[l].style+=b(E[l].style,e,u,E[l]);Va=H(e,u);Va=Va.replace("strokeColor","fillColor2");""==Va&&(Va="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20-ia),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p--ia),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ia),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Va,E.style+=b(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),-U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),U.style+=Va,U.style+=b(U.style,e,u,U));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];ia=25;Ib=3;Ga=(r+Ib)/e.Tabs;ib=new mxCell("",new mxGeometry(0,ia,r,p-ia),"part=1;");ib.vertex=!0;v.insert(ib);ib.style+=b(ib.style,e,u,ib);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga-Ib,ia),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",-new mxGeometry(l*Ga,0,Ga-Ib,ia),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ga-Ib,ia),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;");Va=H(e,u);Va=Va.replace("strokeColor","fillColor2");""==Va&&(Va="fillColor2=#000000;");1==-e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20-ia),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-ia),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ia),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Va,E.style+=b(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,-1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),U.style+=Va,U.style+=b(U.style,e,u,U));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];Ib=3;ia=25+Ib;Ga=80;Ac=10;ib=new mxCell("",new mxGeometry(Ga,0,r-Ga,p),"part=1;");ib.vertex=-!0;v.insert(ib);ib.style+=b(ib.style,e,u,ib);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,Ac+l*ia,Ga,ia-Ib),""),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G)):(x[l]=new mxCell("",new mxGeometry(0,Ac+l*ia,Ga,ia-Ib),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ga,ia-Ib),"fillColor=#000000;fillOpacity=25;"),-E[l].vertex=!0,x[l].insert(E[l]),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G)),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;"),E[l].style+=b(E[l].style,e,u,E[l]);Va=H(e,u);Va=Va.replace("strokeColor","fillColor2");""==Va&&(Va="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),-E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,0),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Va,E.style+=b(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(Ga,1,r-20-Ga,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(Ga,1,r-Ga,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),-U.style+=Va,U.style+=b(U.style,e,u,U));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";ia=p/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(0,l*ia+.5*ia-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=b(x[l].style,e,u,x[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&-(Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Z,E[l].style+=b(E[l].style,e,u,E[l]));break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";Ga=r/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(l*Ga,.5*p-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),-x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=b(x[l].style,e,u,x[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Z,E[l].style+=b(E[l].style,e,u,E[l]));break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";-ia=p/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(0,l*ia+.5*ia-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=b(x[l].style,e,u,x[l],G),null!=e.Selected&&e.Selected==l+1&&(Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2.5,-2.5,5,5),"ellipse;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Z,E[l].style+=b(E[l].style,e,u,E[l]));break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";Ga=r/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(l*Ga,.5*p-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=-b(x[l].style,e,u,x[l],G),null!=e.Selected&&e.Selected==l+1&&(Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"ellipse;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Z,E[l].style+=b(E[l].style,e,u,E[l]));break;case "UI2SelectBlock":v.style+="shape=mxgraph.mockup.forms.comboBox;strokeColor=#999999;fillColor=#ddeeff;align=left;fillColor2=#aaddff;mainText=;fontColor=#666666";v.value=m(e.Selected);break;case "UI2HSliderBlock":case "UI2VSliderBlock":v.style+=-"shape=mxgraph.mockup.forms.horSlider;sliderStyle=basic;handleStyle=handle;";"UI2VSliderBlock"==w.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*e.ScrollVal+";";v.style+=b(v.style,e,u,v);break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";x=new mxCell("",new mxGeometry(0,0,.6*r,p),"part=1;");x.vertex=!0;v.insert(x);x.value=m(e.Date);x.style+=a(e.Date,G);v.style+=b(v.style,e,u,v);Z=H(e,u);Z=Z.replace("strokeColor","fillColor");""==Z&&(Z="fillColor=#000000;");-E=new mxCell("",new mxGeometry(.75*r,0,.25*r,p),"part=1;shape=mxgraph.gmdl.calendar;");E.vertex=!0;v.insert(E);E.style+=Z;E.style+=b(E.style,e,u,E);break;case "UI2SearchBlock":v.value=m(e.Search);v.style+="shape=mxgraph.mockup.forms.searchBox;mainText=;flipH=1;align=left;spacingLeft=26;"+a(e.Search,G);v.style+=b(v.style,e,u,v,G);break;case "UI2NumericStepperBlock":Z=H(e,u);Z=Z.replace("strokeColor","fillColor");""==Z&&(Z="fillColor=#000000;");v.value=m(e.Number);v.style+="shape=mxgraph.mockup.forms.spinner;spinLayout=right;spinStyle=normal;adjStyle=triangle;mainText=;align=left;spacingLeft=8;"+-Z+a(e.Number,G);v.style+=b(v.style,e,u,v,G);break;case "UI2TableBlock":try{lb=P(e.FillColor);var Ld=P(e.LineColor);Tc="";var ce=20;v.style="html=1;overflow=fill;verticalAlign=top;spacing=0;";var Md='<table style="width:100%;height:100%;border-collapse: collapse;border: 1px solid '+Ld+';">',uc=e.Data.split("\n");var jf=e.AltRow&&"default"!=e.AltRow?"none"==e.AltRow?lb:P(e.AltRow):Sd(lb,.95);Pc=e.Header&&"default"!=e.Header?"none"==e.Header?jf:P(e.Header):Sd(lb,.8);if("full"==e.GridLines)Tc="border: 1px solid "++"spacingRight=20;",E.style+=Va,E.style+=c(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20-(e.Panels-e.Selected)*ia),U.vertex=!0,v.insert(U),U.style+=Va,U.style+=c(U.style,e,u,U));ta=1==e.vScroll?new mxCell("",new mxGeometry(0,+e.Selected*ia,r-20,p-e.Selected*ia-20-(e.Panels-e.Selected)*ia),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,e.Selected*ia,r-20,p-e.Selected*ia-(e.Panels-e.Selected)*ia),"part=1;fillColor=none;strokeColor=none;");ta.vertex=!0;v.insert(ta);ta.value=m(e.Content_1);ta.style+=a(e.Content_1,G);!G&&0>ta.style.indexOf(";align=")&&(ta.style+="align=left;spacingLeft=5;");v.style+=c(v.style,e,u,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";+x=[];E=[];ia=25;var Ib=3,Ga=(r+Ib)/(e.Tabs+1),ib=new mxCell("",new mxGeometry(0,ia,r,p-ia),"part=1;");ib.vertex=!0;v.insert(ib);ib.style+=c(ib.style,e,u,ib);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(10+l*Ga,0,Ga-Ib,ia),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(10+l*Ga,0,Ga-Ib,ia),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=x[l].style+=c(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ga-Ib,ia),"fillColor=#000000;fillOpacity=25;"),+E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;"),E[l].style+=c(E[l].style,e,u,E[l]);Va=H(e,u);Va=Va.replace("strokeColor","fillColor2");""==Va&&(Va="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20-ia),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-+ia),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ia),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Va,E.style+=c(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),+U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),U.style+=Va,U.style+=c(U.style,e,u,U));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];ia=25;Ib=3;Ga=(r+Ib)/e.Tabs;ib=new mxCell("",new mxGeometry(0,ia,r,p-ia),"part=1;");ib.vertex=!0;v.insert(ib);ib.style+=c(ib.style,e,u,ib);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga-Ib,ia),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",+new mxGeometry(l*Ga,0,Ga-Ib,ia),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=c(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ga-Ib,ia),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),E[l].style+=c(E[l].style,e,u,E[l],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;");Va=H(e,u);Va=Va.replace("strokeColor","fillColor2");""==Va&&(Va="fillColor2=#000000;");1==+e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20-ia),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-ia),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ia),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Va,E.style+=c(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,+1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),U.style+=Va,U.style+=c(U.style,e,u,U));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];Ib=3;ia=25+Ib;Ga=80;Ac=10;ib=new mxCell("",new mxGeometry(Ga,0,r-Ga,p),"part=1;");ib.vertex=+!0;v.insert(ib);ib.style+=c(ib.style,e,u,ib);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,Ac+l*ia,Ga,ia-Ib),""),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),E[l].style+=c(E[l].style,e,u,E[l],G)):(x[l]=new mxCell("",new mxGeometry(0,Ac+l*ia,Ga,ia-Ib),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=c(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ga,ia-Ib),"fillColor=#000000;fillOpacity=25;"),+E[l].vertex=!0,x[l].insert(E[l]),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G)),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;"),E[l].style+=c(E[l].style,e,u,E[l]);Va=H(e,u);Va=Va.replace("strokeColor","fillColor2");""==Va&&(Va="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),+E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,0),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Va,E.style+=c(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(Ga,1,r-20-Ga,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(Ga,1,r-Ga,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),+U.style+=Va,U.style+=c(U.style,e,u,U));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";ia=p/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(0,l*ia+.5*ia-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=c(x[l].style,e,u,x[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&+(Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Z,E[l].style+=c(E[l].style,e,u,E[l]));break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";Ga=r/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(l*Ga,.5*p-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),+x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=c(x[l].style,e,u,x[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Z,E[l].style+=c(E[l].style,e,u,E[l]));break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";+ia=p/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(0,l*ia+.5*ia-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=c(x[l].style,e,u,x[l],G),null!=e.Selected&&e.Selected==l+1&&(Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2.5,+2.5,5,5),"ellipse;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Z,E[l].style+=c(E[l].style,e,u,E[l]));break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";Ga=r/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(l*Ga,.5*p-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=+c(x[l].style,e,u,x[l],G),null!=e.Selected&&e.Selected==l+1&&(Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"ellipse;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Z,E[l].style+=c(E[l].style,e,u,E[l]));break;case "UI2SelectBlock":v.style+="shape=mxgraph.mockup.forms.comboBox;strokeColor=#999999;fillColor=#ddeeff;align=left;fillColor2=#aaddff;mainText=;fontColor=#666666";v.value=m(e.Selected);break;case "UI2HSliderBlock":case "UI2VSliderBlock":v.style+=+"shape=mxgraph.mockup.forms.horSlider;sliderStyle=basic;handleStyle=handle;";"UI2VSliderBlock"==w.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*e.ScrollVal+";";v.style+=c(v.style,e,u,v);break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";x=new mxCell("",new mxGeometry(0,0,.6*r,p),"part=1;");x.vertex=!0;v.insert(x);x.value=m(e.Date);x.style+=a(e.Date,G);v.style+=c(v.style,e,u,v);Z=H(e,u);Z=Z.replace("strokeColor","fillColor");""==Z&&(Z="fillColor=#000000;");+E=new mxCell("",new mxGeometry(.75*r,0,.25*r,p),"part=1;shape=mxgraph.gmdl.calendar;");E.vertex=!0;v.insert(E);E.style+=Z;E.style+=c(E.style,e,u,E);break;case "UI2SearchBlock":v.value=m(e.Search);v.style+="shape=mxgraph.mockup.forms.searchBox;mainText=;flipH=1;align=left;spacingLeft=26;"+a(e.Search,G);v.style+=c(v.style,e,u,v,G);break;case "UI2NumericStepperBlock":Z=H(e,u);Z=Z.replace("strokeColor","fillColor");""==Z&&(Z="fillColor=#000000;");v.value=m(e.Number);v.style+="shape=mxgraph.mockup.forms.spinner;spinLayout=right;spinStyle=normal;adjStyle=triangle;mainText=;align=left;spacingLeft=8;"++Z+a(e.Number,G);v.style+=c(v.style,e,u,v,G);break;case "UI2TableBlock":try{lb=P(e.FillColor);var Ld=P(e.LineColor);Tc="";var ce=20;v.style="html=1;overflow=fill;verticalAlign=top;spacing=0;";var Md='<table style="width:100%;height:100%;border-collapse: collapse;border: 1px solid '+Ld+';">',uc=e.Data.split("\n");var jf=e.AltRow&&"default"!=e.AltRow?"none"==e.AltRow?lb:P(e.AltRow):Sd(lb,.95);Pc=e.Header&&"default"!=e.Header?"none"==e.Header?jf:P(e.Header):Sd(lb,.8);if("full"==e.GridLines)Tc="border: 1px solid "+Ld,ce=19;else if("row"==e.GridLines)Tc="border-bottom: 1px solid "+Ld,ce=19;else if("default"==e.GridLines||"column"==e.GridLines)Tc="border-right: 1px solid "+Ld;uc=uc.filter(function(hb){return hb});/^\{[^}]*\}$/.test(uc[uc.length-1])&&uc.pop();Gc=uc[0].split(",").length;var kf="";for(ha=0;ha<Gc-1;ha++)kf+=" , ";for(l=uc.length;l<Math.ceil(p/20);l++)uc.push(kf);for(l=0;l<uc.length;l++){Md+='<tr style="height: '+ce+"px;background:"+(0==l?Pc:l%2?lb:jf)+'">';var lf=uc[l].split(",");for(ha=0;ha<lf.length;ha++){var Nd=-e["Cell_"+l+"_"+ha],Tf=Nd&&Nd.m&&Nd.m[0]&&"c"==Nd.m[0].n?P(Nd.m[0].v):Ld;Md+='<td style="height: '+ce+"px;color:"+Tf+";"+Tc+'">'+mxUtils.htmlEntities(lf[ha])+"</td>"}Md+="</tr>"}Md+="</table>";v.value=Md}catch(hb){console.log(hb)}break;case "UI2ButtonBarBlock":v.style+=b(v.style,e,u,v);x=[];E=[];Ga=r/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga,p),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga,p),"strokeColor=none;"),-x[l].vertex=!0,v.insert(x[l]),x[l].style+=x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ga,p),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Button_"+(l+1)]),E[l].style+=a(e["Button_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G);break;case "UI2VerticalButtonBarBlock":v.style+=b(v.style,e,u,v);x=[];E=[];ia=p/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,l*ia,r,ia),""),E[l].vertex=!0,v.insert(E[l])):-(x[l]=new mxCell("",new mxGeometry(0,l*ia,r,ia),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,r,ia),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Button_"+(l+1)]),E[l].style+=a(e["Button_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=[];E=[];Ga=r/e.Links;for(l=0;l<e.Links;l++)0!=-l?(E[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga,p),"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),E[l].style+=b(E[l].style,e,u,E[l])):E[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga,p),"fillColor=none;strokeColor=none;"),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Link_"+(l+1)]),E[l].style+=a(e["Link_"+(l+1)],G);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=[];E=[];Ga=r/e.Links;for(l=0;l<e.Links;l++)x[l]=new mxCell("",new mxGeometry(l*-Ga,0,Ga,p),"fillColor=none;strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Link_"+(l+1)]),x[l].style+=a(e["Link_"+(l+1)],G);for(l=1;l<e.Links;l++)E[l]=new mxCell("",new mxGeometry(l/e.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),E[l].geometry.relative=!0,E[l].geometry.offset=new mxPoint(-3,-5),E[l].vertex=!0,v.insert(E[l]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);x=[];Ga=r/(e.Buttons+1);for(l=0;l<=e.Buttons-1;l++)x[l]=l!=e.Selected-+e["Cell_"+l+"_"+ha],Tf=Nd&&Nd.m&&Nd.m[0]&&"c"==Nd.m[0].n?P(Nd.m[0].v):Ld;Md+='<td style="height: '+ce+"px;color:"+Tf+";"+Tc+'">'+mxUtils.htmlEntities(lf[ha])+"</td>"}Md+="</tr>"}Md+="</table>";v.value=Md}catch(hb){console.log(hb)}break;case "UI2ButtonBarBlock":v.style+=c(v.style,e,u,v);x=[];E=[];Ga=r/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga,p),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga,p),"strokeColor=none;"),+x[l].vertex=!0,v.insert(x[l]),x[l].style+=x[l].style+=c(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ga,p),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Button_"+(l+1)]),E[l].style+=a(e["Button_"+(l+1)],G),E[l].style+=c(E[l].style,e,u,E[l],G);break;case "UI2VerticalButtonBarBlock":v.style+=c(v.style,e,u,v);x=[];E=[];ia=p/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,l*ia,r,ia),""),E[l].vertex=!0,v.insert(E[l])):+(x[l]=new mxCell("",new mxGeometry(0,l*ia,r,ia),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=c(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,r,ia),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Button_"+(l+1)]),E[l].style+=a(e["Button_"+(l+1)],G),E[l].style+=c(E[l].style,e,u,E[l],G);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,u,v);x=[];E=[];Ga=r/e.Links;for(l=0;l<e.Links;l++)0!=+l?(E[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga,p),"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),E[l].style+=c(E[l].style,e,u,E[l])):E[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga,p),"fillColor=none;strokeColor=none;"),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Link_"+(l+1)]),E[l].style+=a(e["Link_"+(l+1)],G);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,u,v);x=[];E=[];Ga=r/e.Links;for(l=0;l<e.Links;l++)x[l]=new mxCell("",new mxGeometry(l*+Ga,0,Ga,p),"fillColor=none;strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Link_"+(l+1)]),x[l].style+=a(e["Link_"+(l+1)],G);for(l=1;l<e.Links;l++)E[l]=new mxCell("",new mxGeometry(l/e.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),E[l].geometry.relative=!0,E[l].geometry.offset=new mxPoint(-3,-5),E[l].vertex=!0,v.insert(E[l]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;";v.style+=c(v.style,e,u,v);x=[];Ga=r/(e.Buttons+1);for(l=0;l<=e.Buttons-1;l++)x[l]=l!=e.Selected-1?new mxCell("",new mxGeometry(0,0,Ga,p),"strokeColor=none;fillColor=none;resizeHeight=1;"):new mxCell("",new mxGeometry(0,0,Ga,p),"fillColor=#000000;fillOpacity=25;strokeColor=none;resizeHeight=1;"),x[l].geometry.relative=!0,x[l].geometry.offset=new mxPoint(l*Ga,0),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["MenuItem_"+(l+1)]),x[l].style+=a(e["MenuItem_"+(l+1)],G);break;case "UI2AtoZBlock":v.style+="fillColor=none;strokeColor=none;"+a(e.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;"+a(e.Text_prev);v.value=m(e.Text_prev)+" ";for(l=0;l<e.Links;l++)v.value+=m(e["Link_"+(l+1)])+" ";v.value+=m(e.Text_next);break;case "UI2ContextMenuBlock":v.style+=b(v.style,e,u,v);X=[];ob=[];var kd=[];ia=p/e.Lines;ja=null;for(l=0;l<e.Lines;l++)null!=e["Item_"+(l+1)]&&(null==ja&&(ja=""+f(e["Item_"+(l+1)])+q(e["Item_"+(l+1)])+t(e["Item_"+(l+1)])),X[l]=new mxCell("",new mxGeometry(0,l*p/e.Lines,r,ia),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),+break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+a(e.Text_prev);v.value=m(e.Text_prev)+" ";for(l=0;l<e.Links;l++)v.value+=m(e["Link_"+(l+1)])+" ";v.value+=m(e.Text_next);break;case "UI2ContextMenuBlock":v.style+=c(v.style,e,u,v);X=[];ob=[];var kd=[];ia=p/e.Lines;ja=null;for(l=0;l<e.Lines;l++)null!=e["Item_"+(l+1)]&&(null==ja&&(ja=""+f(e["Item_"+(l+1)])+q(e["Item_"+(l+1)])+t(e["Item_"+(l+1)])),X[l]=new mxCell("",new mxGeometry(0,l*p/e.Lines,r,ia),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=ja,X[l].value=m(e["Item_"+(l+1)])),null!=e.Icons[l+1]&&null!=X[l]&&("dot"==e.Icons[l+1]?(ob[l]=new mxCell("",new mxGeometry(0,.5,8,8),"ellipse;strokeColor=none;"),ob[l].geometry.offset=new mxPoint(6,-4)):"check"==e.Icons[l+1]&&(ob[l]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),ob[l].geometry.offset=new mxPoint(6.5,-4)),null!=ob[l]&&(ob[l].geometry.relative=!0,ob[l].vertex=!0,X[l].insert(ob[l]),Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),ob[l].style+=Z)),null!=e["Shortcut_"+(l+1)]&&(null==ja&&(ja=""+f(e["Shortcut_"+(l+1)])+q(e["Shortcut_"+(l+1)])+t(e["Shortcut_"+(l+1)])),kd[l]=new mxCell("",new mxGeometry(.6*r,l*p/e.Lines,.4*r,ia),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),kd[l].vertex=!0,v.insert(kd[l]),kd[l].style+=ja,kd[l].value=m(e["Shortcut_"+(l+1)])),null!=e.Dividers[l+1]&&(X[l]=new mxCell("",new mxGeometry(.05*r,l*p/e.Lines,.9*-r,ia),"shape=line;strokeWidth=1;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=H(e,u));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*e.ScrollVal+";";break;case "CalloutSquareBlock":case "UI2TooltipSquareBlock":v.value=m(e.Tip||e.Text);v.style+="html=1;shape=callout;flipV=1;base=13;size=7;position=0.5;position2=0.66;rounded=1;arcSize="+e.RoundCorners+";"+a(e.Tip||e.Text,G);v.style+=b(v.style,e,u,v,G);v.geometry.height+=10;break;case "UI2CalloutBlock":v.value=-m(e.Txt);v.style+="shape=ellipse;perimeter=ellipsePerimeter;"+a(e.Txt,G);v.style+=b(v.style,e,u,v,G);break;case "UI2AlertBlock":v.value=m(e.Txt);v.style+=a(e.Txt,G);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");x.vertex=!0;v.insert(x);x.value=m(e.Title);x.style+=a(e.Title,G);x.style+=b(x.style,e,u,x,G);E=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");E.geometry.relative=!0;E.geometry.offset=-new mxPoint(-25,-10);E.vertex=!0;x.insert(E);var Uf=45*e.Buttons+(10*e.Buttons-1);U=[];for(l=0;l<e.Buttons;l++)U[l]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),U[l].geometry.relative=!0,U[l].geometry.offset=new mxPoint(.5*-Uf+55*l,-40),U[l].vertex=!0,v.insert(U[l]),U[l].value=m(e["Button_"+(l+1)]),U[l].style+=a(e["Button_"+(l+1)],G),U[l].style+=b(U[l].style,e,u,U[l],G);break;case "UMLClassBlock":if(0==e.Simple){ja=Y(e,u);eb=Math.round(.75*e.TitleHeight)||25;ja=ja.replace("fillColor",-"swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Title);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ja+"startSize="+eb+";"+a(e.Title,G);v.style+=b(v.style,e,u,v,G);X=[];var ve=[],wb=eb/p;Wb=eb;for(l=0;l<=e.Attributes;l++)0<l&&(ve[l]=new mxCell("",new mxGeometry(0,Wb,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),+r,ia),"shape=line;strokeWidth=1;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=H(e,u));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*e.ScrollVal+";";break;case "CalloutSquareBlock":case "UI2TooltipSquareBlock":v.value=m(e.Tip||e.Text);v.style+="html=1;shape=callout;flipV=1;base=13;size=7;position=0.5;position2=0.66;rounded=1;arcSize="+e.RoundCorners+";"+a(e.Tip||e.Text,G);v.style+=c(v.style,e,u,v,G);v.geometry.height+=10;break;case "UI2CalloutBlock":v.value=+m(e.Txt);v.style+="shape=ellipse;perimeter=ellipsePerimeter;"+a(e.Txt,G);v.style+=c(v.style,e,u,v,G);break;case "UI2AlertBlock":v.value=m(e.Txt);v.style+=a(e.Txt,G);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");x.vertex=!0;v.insert(x);x.value=m(e.Title);x.style+=a(e.Title,G);x.style+=c(x.style,e,u,x,G);E=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");E.geometry.relative=!0;E.geometry.offset=+new mxPoint(-25,-10);E.vertex=!0;x.insert(E);var Uf=45*e.Buttons+(10*e.Buttons-1);U=[];for(l=0;l<e.Buttons;l++)U[l]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),U[l].geometry.relative=!0,U[l].geometry.offset=new mxPoint(.5*-Uf+55*l,-40),U[l].vertex=!0,v.insert(U[l]),U[l].value=m(e["Button_"+(l+1)]),U[l].style+=a(e["Button_"+(l+1)],G),U[l].style+=c(U[l].style,e,u,U[l],G);break;case "UMLClassBlock":if(0==e.Simple){ja=Y(e,u);eb=Math.round(.75*e.TitleHeight)||25;ja=ja.replace("fillColor",+"swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Title);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ja+"startSize="+eb+";"+a(e.Title,G);v.style+=c(v.style,e,u,v,G);X=[];var ve=[],wb=eb/p;Wb=eb;for(l=0;l<=e.Attributes;l++)0<l&&(ve[l]=new mxCell("",new mxGeometry(0,Wb,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),Wb+=8,ve[l].vertex=!0,v.insert(ve[l])),ia=0,0==e.Attributes?ia=l=1:l<e.Attributes?(ia=e["Text"+(l+1)+"Percent"],wb+=ia):ia=1-wb,pc=Math.round((p-eb)*ia)+(e.ExtraHeightSet&&1==l?.75*e.ExtraHeight:0),X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;whiteSpace=wrap;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;"),Wb+=pc,X[l].vertex=!0,v.insert(X[l]),X[l].style+=-ja+M(e,u,X[l])+a(e["Text"+(l+1)],G),X[l].value=m(e["Text"+(l+1)])}else v.value=m(e.Title),v.style+="align=center;",v.style+=a(e.Title,G),v.style+=b(v.style,e,u,v,G);break;case "ERDEntityBlock":ja=Y(e,u);eb=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ja+"startSize="+-eb+";"+a(e.Name,G);v.style+=b(v.style,e,u,v,G);e.ShadedHeader?(ja=P(e.FillColor),ke=Sd(ja,.85),v.style+="fillColor="+ke+";"):v.style+=Y(e,u);X=[];wb=eb/p;Wb=eb;for(l=0;l<e.Fields;l++)ia=0,pc=.75*e["Field"+(l+1)+"_h"],X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"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;html=1;whiteSpace=wrap;"),Wb+=pc,X[l].vertex=!0,v.insert(X[l]),X[l].style+=+ja+M(e,u,X[l])+a(e["Text"+(l+1)],G),X[l].value=m(e["Text"+(l+1)])}else v.value=m(e.Title),v.style+="align=center;",v.style+=a(e.Title,G),v.style+=c(v.style,e,u,v,G);break;case "ERDEntityBlock":ja=Y(e,u);eb=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ja+"startSize="++eb+";"+a(e.Name,G);v.style+=c(v.style,e,u,v,G);e.ShadedHeader?(ja=P(e.FillColor),ke=Sd(ja,.85),v.style+="fillColor="+ke+";"):v.style+=Y(e,u);X=[];wb=eb/p;Wb=eb;for(l=0;l<e.Fields;l++)ia=0,pc=.75*e["Field"+(l+1)+"_h"],X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"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;html=1;whiteSpace=wrap;"),Wb+=pc,X[l].vertex=!0,v.insert(X[l]),X[l].style+=ja+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;opacity=5;":X[l].style+("fillColor=none;"+M(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]);break;case "ERDEntityBlock2":ja=Y(e,u);eb=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ja+"startSize="+eb+";"+a(e.Name,G);v.style=e.ShadedHeader?-v.style+"fillColor=#e0e0e0;":v.style+Y(e,u);v.style+=b(v.style,e,u,v,G);X=[];var Fa=[];wb=eb;var Jb=30;null!=e.Column1&&(Jb=.75*e.Column1);for(l=0;l<e.Fields;l++)ia=0,Fa[l]=new mxCell("",new mxGeometry(0,wb,Jb,.75*e["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;html=1;whiteSpace=wrap;"),Fa[l].vertex=!0,v.insert(Fa[l]),Fa[l].style+=ja+a(e["Key"+(l+1)],+v.style+"fillColor=#e0e0e0;":v.style+Y(e,u);v.style+=c(v.style,e,u,v,G);X=[];var Fa=[];wb=eb;var Jb=30;null!=e.Column1&&(Jb=.75*e.Column1);for(l=0;l<e.Fields;l++)ia=0,Fa[l]=new mxCell("",new mxGeometry(0,wb,Jb,.75*e["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;html=1;whiteSpace=wrap;"),Fa[l].vertex=!0,v.insert(Fa[l]),Fa[l].style+=ja+a(e["Key"+(l+1)],G),Fa[l].style=1==e.AltRows&&0!=l%2?Fa[l].style+"fillColor=#000000;fillOpacity=5;":Fa[l].style+("fillColor=none;"+M(e,u,Fa[l])),Fa[l].value=m(e["Key"+(l+1)]),X[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb,.75*e["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;html=1;whiteSpace=wrap;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=-ja+a(e["Field"+(l+1)],G),v.style+=b(v.style,e,u,v),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+M(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]),wb+=.75*e["Key"+(l+1)+"_h"];break;case "ERDEntityBlock3":ja=Y(e,u);eb=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ja+"startSize="+eb+-";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+Y(e,u);v.value=m(e.Name);v.style+=b(v.style,e,u,v,G);X=[];Fa=[];wb=eb;Jb=30;null!=e.Column1&&(Jb=.75*e.Column1);for(l=0;l<e.Fields;l++)ia=0,Fa[l]=new mxCell("",new mxGeometry(0,wb,Jb,.75*e["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;whiteSpace=wrap;"),Fa[l].vertex=!0,v.insert(Fa[l]),-Fa[l].style+=ja+a(e["Field"+(l+1)],G),Fa[l].style=1==e.AltRows&&0!=l%2?Fa[l].style+"fillColor=#000000;fillOpacity=5;":Fa[l].style+("fillColor=none;"+M(e,u,Fa[l])),Fa[l].value=m(e["Field"+(l+1)]),Fa[l].style+=b(Fa[l].style,e,u,Fa[l],G),X[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb,.75*e["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;whiteSpace=wrap;"),-X[l].vertex=!0,v.insert(X[l]),X[l].style+=ja+a(e["Type"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+M(e,u,X[l])),X[l].value=m(e["Type"+(l+1)]),X[l].style+=b(X[l].style,e,u,X[l],G),wb+=.75*e["Field"+(l+1)+"_h"];break;case "ERDEntityBlock4":ja=Y(e,u);eb=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+-ja+"startSize="+eb+";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+Y(e,u);v.value=m(e.Name);v.style+=b(v.style,e,u,v,G);X=[];Fa=[];var Kb=[];wb=eb;Jb=30;var de=40;null!=e.Column1&&(Jb=.75*e.Column1);null!=e.Column2&&(de=.75*e.Column2);for(l=0;l<e.Fields;l++)ia=0,Fa[l]=new mxCell("",new mxGeometry(0,wb,Jb,.75*e["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;whiteSpace=wrap;"),-Fa[l].vertex=!0,v.insert(Fa[l]),Fa[l].style+=ja+a(e["Key"+(l+1)],G),Fa[l].style=1==e.AltRows&&0!=l%2?Fa[l].style+"fillColor=#000000;fillOpacity=5;":Fa[l].style+("fillColor=none;"+M(e,u,Fa[l])),Fa[l].value=m(e["Key"+(l+1)]),Fa[l].style+=b(Fa[l].style,e,u,Fa[l],G),X[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb-de,.75*e["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;whiteSpace=wrap;"),-X[l].vertex=!0,v.insert(X[l]),X[l].style+=ja+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+M(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]),X[l].style+=b(X[l].style,e,u,X[l],G),Kb[l]=new mxCell("",new mxGeometry(r-de,wb,de,.75*e["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;whiteSpace=wrap;"),-Kb[l].vertex=!0,v.insert(Kb[l]),Kb[l].style+=ja+a(e["Type"+(l+1)],G),Kb[l].style=1==e.AltRows&&0!=l%2?Kb[l].style+"fillColor=#000000;fillOpacity=5;":Kb[l].style+("fillColor=none;"+M(e,u,Kb[l])),Kb[l].value=m(e["Type"+(l+1)]),Kb[l].style+=b(Kb[l].style,e,u,Kb[l],G),wb+=.75*e["Key"+(l+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":Ta("application_system",r,p,v,e,u);break;case "GCPServiceCardAuthorizationBlock":Ta("internal_payment_authorization",r,p,v,e,u);break;case "GCPServiceCardBlankBlock":Ta("blank",+ja+a(e["Field"+(l+1)],G),v.style+=c(v.style,e,u,v),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+M(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]),wb+=.75*e["Key"+(l+1)+"_h"];break;case "ERDEntityBlock3":ja=Y(e,u);eb=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ja+"startSize="+eb++";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+Y(e,u);v.value=m(e.Name);v.style+=c(v.style,e,u,v,G);X=[];Fa=[];wb=eb;Jb=30;null!=e.Column1&&(Jb=.75*e.Column1);for(l=0;l<e.Fields;l++)ia=0,Fa[l]=new mxCell("",new mxGeometry(0,wb,Jb,.75*e["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;whiteSpace=wrap;"),Fa[l].vertex=!0,v.insert(Fa[l]),+Fa[l].style+=ja+a(e["Field"+(l+1)],G),Fa[l].style=1==e.AltRows&&0!=l%2?Fa[l].style+"fillColor=#000000;fillOpacity=5;":Fa[l].style+("fillColor=none;"+M(e,u,Fa[l])),Fa[l].value=m(e["Field"+(l+1)]),Fa[l].style+=c(Fa[l].style,e,u,Fa[l],G),X[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb,.75*e["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;whiteSpace=wrap;"),+X[l].vertex=!0,v.insert(X[l]),X[l].style+=ja+a(e["Type"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+M(e,u,X[l])),X[l].value=m(e["Type"+(l+1)]),X[l].style+=c(X[l].style,e,u,X[l],G),wb+=.75*e["Field"+(l+1)+"_h"];break;case "ERDEntityBlock4":ja=Y(e,u);eb=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"++ja+"startSize="+eb+";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+Y(e,u);v.value=m(e.Name);v.style+=c(v.style,e,u,v,G);X=[];Fa=[];var Kb=[];wb=eb;Jb=30;var de=40;null!=e.Column1&&(Jb=.75*e.Column1);null!=e.Column2&&(de=.75*e.Column2);for(l=0;l<e.Fields;l++)ia=0,Fa[l]=new mxCell("",new mxGeometry(0,wb,Jb,.75*e["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;whiteSpace=wrap;"),+Fa[l].vertex=!0,v.insert(Fa[l]),Fa[l].style+=ja+a(e["Key"+(l+1)],G),Fa[l].style=1==e.AltRows&&0!=l%2?Fa[l].style+"fillColor=#000000;fillOpacity=5;":Fa[l].style+("fillColor=none;"+M(e,u,Fa[l])),Fa[l].value=m(e["Key"+(l+1)]),Fa[l].style+=c(Fa[l].style,e,u,Fa[l],G),X[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb-de,.75*e["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;whiteSpace=wrap;"),+X[l].vertex=!0,v.insert(X[l]),X[l].style+=ja+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+M(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]),X[l].style+=c(X[l].style,e,u,X[l],G),Kb[l]=new mxCell("",new mxGeometry(r-de,wb,de,.75*e["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;whiteSpace=wrap;"),+Kb[l].vertex=!0,v.insert(Kb[l]),Kb[l].style+=ja+a(e["Type"+(l+1)],G),Kb[l].style=1==e.AltRows&&0!=l%2?Kb[l].style+"fillColor=#000000;fillOpacity=5;":Kb[l].style+("fillColor=none;"+M(e,u,Kb[l])),Kb[l].value=m(e["Type"+(l+1)]),Kb[l].style+=c(Kb[l].style,e,u,Kb[l],G),wb+=.75*e["Key"+(l+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":Ta("application_system",r,p,v,e,u);break;case "GCPServiceCardAuthorizationBlock":Ta("internal_payment_authorization",r,p,v,e,u);break;case "GCPServiceCardBlankBlock":Ta("blank",r,p,v,e,u);break;case "GCPServiceCardReallyBlankBlock":Ta("blank",r,p,v,e,u);break;case "GCPServiceCardBucketBlock":Ta("bucket",r,p,v,e,u);break;case "GCPServiceCardCDNInterconnectBlock":Ta("google_network_edge_cache",r,p,v,e,u);break;case "GCPServiceCardCloudDNSBlock":Ta("blank",r,p,v,e,u);break;case "GCPServiceCardClusterBlock":Ta("cluster",r,p,v,e,u);break;case "GCPServiceCardDiskSnapshotBlock":Ta("persistent_disk_snapshot",r,p,v,e,u);break;case "GCPServiceCardEdgePopBlock":Ta("google_network_edge_cache",r,p,v,e,u);break;case "GCPServiceCardFrontEndPlatformServicesBlock":Ta("frontend_platform_services",r,p,v,e,u);break;case "GCPServiceCardGatewayBlock":Ta("gateway",r,p,v,e,u);break;case "GCPServiceCardGoogleNetworkBlock":Ta("google_network_edge_cache",r,p,v,e,u);break;case "GCPServiceCardImageServicesBlock":Ta("image_services",r,p,v,e,u);break;case "GCPServiceCardLoadBalancerBlock":Ta("network_load_balancer",r,p,v,e,u);break;case "GCPServiceCardLocalComputeBlock":Ta("dedicated_game_server",r,p,v,e,u);break;case "GCPServiceCardLocalStorageBlock":Ta("persistent_disk_snapshot",r,p,v,e,u);break;case "GCPServiceCardLogsAPIBlock":Ta("logs_api",r,p,v,e,u);break;case "GCPServiceCardMemcacheBlock":Ta("memcache",r,p,v,e,u);break;case "GCPServiceCardNATBlock":Ta("nat",r,p,v,e,u);break;case "GCPServiceCardPaymentFormBlock":Ta("external_payment_form",r,p,v,e,u);break;case "GCPServiceCardPushNotificationsBlock":Ta("push_notification_service",r,p,v,e,u);break;case "GCPServiceCardScheduledTasksBlock":Ta("scheduled_tasks",r,p,v,e,u);break;case "GCPServiceCardServiceDiscoveryBlock":Ta("service_discovery",r,p,v,e,u);break;case "GCPServiceCardSquidProxyBlock":Ta("squid_proxy",r,p,v,e,u);break;case "GCPServiceCardTaskQueuesBlock":Ta("task_queues",r,p,v,e,u);break;case "GCPServiceCardVirtualFileSystemBlock":Ta("virtual_file_system",r,p,v,e,u);break;case "GCPServiceCardVPNGatewayBlock":Ta("gateway",r,p,v,e,u);break;case "GCPInputDatabase":Ya("database",1,.9,r,p,v,e,u);break;case "GCPInputRecord":Ya("record",1,.66,r,p,v,e,u);break;case "GCPInputPayment":Ya("payment",1,.8,r,p,v,e,u);break;case "GCPInputGateway":Ya("gateway_icon",1,.44,r,p,v,e,u);break;case "GCPInputLocalCompute":Ya("compute_engine_icon",1,.89,r,p,v,e,u);break;case "GCPInputBeacon":Ya("beacon",.73,1,r,p,v,e,u);break;case "GCPInputStorage":Ya("storage",1,.8,r,p,v,e,u);break;case "GCPInputList":Ya("list",.89,1,r,p,v,e,u);break;case "GCPInputStream":Ya("stream",1,.82,r,p,v,e,u);break;case "GCPInputMobileDevices":Ya("mobile_devices",1,.73,r,p,v,e,u);break;case "GCPInputCircuitBoard":Ya("circuit_board",1,.9,r,p,v,e,u);break;case "GCPInputLive":Ya("live",.74,1,r,p,v,e,u);break;case "GCPInputUsers":Ya("users",1,.63,r,p,v,e,u);break;case "GCPInputLaptop":Ya("laptop",1,.66,r,p,v,e,u);break;case "GCPInputApplication":Ya("application",1,.8,r,p,v,e,u);break;case "GCPInputLightbulb":Ya("lightbulb",.7,1,r,p,v,e,u);break;case "GCPInputGame":Ya("game",1,.54,r,p,v,e,u);break;case "GCPInputDesktop":Ya("desktop",1,.9,r,p,v,e,u);break;case "GCPInputDesktopAndMobile":Ya("desktop_and_mobile",-1,.66,r,p,v,e,u);break;case "GCPInputWebcam":Ya("webcam",.5,1,r,p,v,e,u);break;case "GCPInputSpeaker":Ya("speaker",.7,1,r,p,v,e,u);break;case "GCPInputRetail":Ya("retail",1,.89,r,p,v,e,u);break;case "GCPInputReport":Ya("report",1,1,r,p,v,e,u);break;case "GCPInputPhone":Ya("phone",.64,1,r,p,v,e,u);break;case "GCPInputBlank":Ya("transparent",1,1,r,p,v,e,u);break;case "PresentationFrameBlock":0==e.ZOrder?v.style+="strokeColor=none;fillColor=none;":(v.style+=a(e.Text),v.value=m(e.Text),v.style+=b(v.style,+1,.66,r,p,v,e,u);break;case "GCPInputWebcam":Ya("webcam",.5,1,r,p,v,e,u);break;case "GCPInputSpeaker":Ya("speaker",.7,1,r,p,v,e,u);break;case "GCPInputRetail":Ya("retail",1,.89,r,p,v,e,u);break;case "GCPInputReport":Ya("report",1,1,r,p,v,e,u);break;case "GCPInputPhone":Ya("phone",.64,1,r,p,v,e,u);break;case "GCPInputBlank":Ya("transparent",1,1,r,p,v,e,u);break;case "PresentationFrameBlock":0==e.ZOrder?v.style+="strokeColor=none;fillColor=none;":(v.style+=a(e.Text),v.value=m(e.Text),v.style+=c(v.style,e,u,v,G));break;case "SVGPathBlock2":try{var Vf=e.LineWidth,Wf=e.LineColor,mf=e.FillColor,nf=e.DrawData.Data,ee='<svg viewBox="0 0 1 1" xmlns="http://www.w3.org/2000/svg">',we=null;for(l=0;l<nf.length;l++){var vc=nf[l],Xf=vc.a,Yf=("prop"==vc.w||null==vc.w?Vf:vc.w)/Math.min(r,p)*.75;Sc="prop"==vc.s||null==vc.s?Wf:vc.s;Z="prop"==vc.f||null==vc.f?mf:vc.f;"object"==typeof Z&&(null!=Z.url&&(we="shape=image;image="+g(Z.url)+";"),Z=Array.isArray(Z.cs)?Z.cs[0].c:mf);ee+='<path d="'+Xf+'" fill="'+Z+'" stroke="'+-Sc+'" stroke-width="'+Yf+'"/>'}ee+="</svg>";v.style=we?we:"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,"+(window.btoa?btoa(ee):Base64.encode(ee,!0))+";"}catch(hb){}break;case "BraceBlock":case "BraceBlockRotated":case "BracketBlock":case "BracketBlockRotated":var of=0==W.indexOf("Bracket")?"size=0;arcSize=50;":"",pf=b(v.style,e,u,v,G);nb=T(e,u,v);v.style="group;"+nb;var xe=Math.min(.14*(nb?r:p),100),ye=-new mxCell("",new mxGeometry(0,0,xe,p),"shape=curlyBracket;rounded=1;"+of+pf);ye.vertex=!0;ye.geometry.relative=!0;var ze=new mxCell("",new mxGeometry(1-xe/r,0,xe,p),"shape=curlyBracket;rounded=1;flipH=1;"+of+pf);ze.vertex=!0;ze.geometry.relative=!0;v.insert(ye);v.insert(ze);break;case "BPMNTextAnnotation":case "NoteBlock":e.InsetMargin=null;v.value=m(e.Text);v.style="group;spacingLeft=8;align=left;spacing=0;strokeColor=none;";v.style+=b(v.style,e,u,v,G);0>v.style.indexOf("verticalAlign")&&(v.style+=-"verticalAlign=middle;");var ld=new mxCell("",new mxGeometry(0,0,8,p),"shape=partialRectangle;right=0;fillColor=none;");ld.geometry.relative=!0;ld.vertex=!0;ld.style+=b(ld.style,e,u,v,G);v.insert(ld);break;case "VSMTimelineBlock":case "TimelineBlock":case "TimelineMilestoneBlock":case "TimelineIntervalBlock":LucidImporter.hasTimeLine=!0;LucidImporter.hasUnknownShapes=!0;break;case "FreehandBlock":try{nb=T(e,u,v);v.style="group;"+nb;if(null!=e.Stencil){null==e.Stencil.id&&(e.Stencil.id="$$tmpId$$",+Sc+'" stroke-width="'+Yf+'"/>'}ee+="</svg>";v.style=we?we:"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,"+(window.btoa?btoa(ee):Base64.encode(ee,!0))+";"}catch(hb){}break;case "BraceBlock":case "BraceBlockRotated":case "BracketBlock":case "BracketBlockRotated":var of=0==W.indexOf("Bracket")?"size=0;arcSize=50;":"",pf=c(v.style,e,u,v,G);nb=T(e,u,v);v.style="group;"+nb;var xe=Math.min(.14*(nb?r:p),100),ye=+new mxCell("",new mxGeometry(0,0,xe,p),"shape=curlyBracket;rounded=1;"+of+pf);ye.vertex=!0;ye.geometry.relative=!0;var ze=new mxCell("",new mxGeometry(1-xe/r,0,xe,p),"shape=curlyBracket;rounded=1;flipH=1;"+of+pf);ze.vertex=!0;ze.geometry.relative=!0;v.insert(ye);v.insert(ze);break;case "BPMNTextAnnotation":case "NoteBlock":e.InsetMargin=null;v.value=m(e.Text);v.style="group;spacingLeft=8;align=left;spacing=0;strokeColor=none;";v.style+=c(v.style,e,u,v,G);0>v.style.indexOf("verticalAlign")&&(v.style+=+"verticalAlign=middle;");var ld=new mxCell("",new mxGeometry(0,0,8,p),"shape=partialRectangle;right=0;fillColor=none;");ld.geometry.relative=!0;ld.vertex=!0;ld.style+=c(ld.style,e,u,v,G);v.insert(ld);break;case "VSMTimelineBlock":case "TimelineBlock":case "TimelineMilestoneBlock":case "TimelineIntervalBlock":LucidImporter.hasTimeLine=!0;LucidImporter.hasUnknownShapes=!0;break;case "FreehandBlock":try{nb=T(e,u,v);v.style="group;"+nb;if(null!=e.Stencil){null==e.Stencil.id&&(e.Stencil.id="$$tmpId$$",Le(e.Stencil.id,e.Stencil));var Pb=LucidImporter.stencilsMap[e.Stencil.id],Zf=-Pb.x/Pb.w,$f=-Pb.y/Pb.h;for(l=0;l<Pb.stencils.length;l++){var pb=Pb.stencils[l];qa=new mxCell("",new mxGeometry(Zf,$f,r,p),"shape="+pb.shapeStencil+";");var ag=pb.FillColor,bg=pb.LineColor,cg=pb.LineWidth;"prop"==pb.FillColor&&(pb.FillColor=e.FillColor);null==pb.FillColor&&(pb.FillColor="#ffffff00");"prop"==pb.LineColor&&(pb.LineColor=e.LineColor);null==pb.LineColor&&(pb.LineColor="#ffffff00");"prop"==pb.LineWidth&&(pb.LineWidth=-e.LineWidth);qa.style+=b(qa.style,pb,u,qa,G);pb.FillColor=ag;pb.LineColor=bg;pb.LineWidth=cg;Z=e.FillColor;var dg=e.LineColor,eg=e.LineWidth;e.FillColor=null;e.LineColor=null;e.LineWidth=null;qa.style+=b(qa.style,e,u,qa,G);e.FillColor=Z;e.LineColor=dg;e.LineWidth=eg;qa.vertex=!0;qa.geometry.relative=!0;v.insert(qa)}var Xb=0;for(nb=e.Rotation;e["t"+Xb];){var qf=e["t"+Xb],rf=m(qf);if(rf){ra=new mxCell(rf,new mxGeometry(0,0,r,p),"strokeColor=none;fillColor=none;overflow=visible;");e.Rotation=0;ra.style+=-b(ra.style,qf,u,ra,G);ra.style+=b(ra.style,e,u,ra,G);e.Rotation=nb;if(null!=Pb.text&&null!=Pb.text["t"+Xb]){var fb=Pb.text["t"+Xb];fb.Rotation=nb+(fb.rotation?fb.rotation:0)+(e["t"+Xb+"_TRotation"]?e["t"+Xb+"_TRotation"]:0)+(e["t"+Xb+"_TAngle"]?e["t"+Xb+"_TAngle"]:0);ra.style+=b(ra.style,fb,u,ra,G);var Yb=ra.geometry;fb.w&&(Yb.width*=fb.w/Pb.w);fb.h&&(Yb.height*=fb.h/Pb.h);fb.x&&(Yb.x=fb.x/Pb.w);fb.y&&(Yb.y=fb.y/Pb.h);fb.fw&&(Yb.width*=.75*fb.fw/r);fb.fh&&(Yb.height*=.75*fb.fh/p);fb.fx&&(Yb.x=(0<-fb.fx?1:0)+.75*fb.fx/r);fb.fy&&(Yb.y=(0<fb.fy?1:0)+.75*fb.fy/p)}ra.vertex=!0;ra.geometry.relative=!0;v.insert(ra)}Xb++}}if(e.FillColor&&e.FillColor.url){var Od=new mxCell("",new mxGeometry(0,0,r,p),"shape=image;html=1;");Od.style+=Ra({},{},e.FillColor.url);Od.vertex=!0;Od.geometry.relative=!0;v.insert(Od)}}catch(hb){console.log("Freehand error",hb)}break;case "RightArrowBlock":var Ae=e.Head*p/r;v.style="shape=singleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+Ae;v.value=m(e);v.style+=b(v.style,-e,u,v,G);break;case "DoubleArrowBlock":Ae=e.Head*p/r;v.style="shape=doubleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+Ae;v.value=m(e);v.style+=b(v.style,e,u,v,G);break;case "VPCSubnet2017":case "VirtualPrivateCloudContainer2017":case "ElasticBeanStalkContainer2017":case "EC2InstanceContents2017":case "AWSCloudContainer2017":case "CorporateDataCenterContainer2017":switch(W){case "VPCSubnet2017":var md="shape=mxgraph.aws3.permissions;fillColor=#D9A741;";var nd=30;var od=35;break;case "VirtualPrivateCloudContainer2017":md=+e.LineWidth);qa.style+=c(qa.style,pb,u,qa,G);pb.FillColor=ag;pb.LineColor=bg;pb.LineWidth=cg;Z=e.FillColor;var dg=e.LineColor,eg=e.LineWidth;e.FillColor=null;e.LineColor=null;e.LineWidth=null;qa.style+=c(qa.style,e,u,qa,G);e.FillColor=Z;e.LineColor=dg;e.LineWidth=eg;qa.vertex=!0;qa.geometry.relative=!0;v.insert(qa)}var Xb=0;for(nb=e.Rotation;e["t"+Xb];){var qf=e["t"+Xb],rf=m(qf);if(rf){ra=new mxCell(rf,new mxGeometry(0,0,r,p),"strokeColor=none;fillColor=none;overflow=visible;");e.Rotation=0;ra.style+=+c(ra.style,qf,u,ra,G);ra.style+=c(ra.style,e,u,ra,G);e.Rotation=nb;if(null!=Pb.text&&null!=Pb.text["t"+Xb]){var fb=Pb.text["t"+Xb];fb.Rotation=nb+(fb.rotation?fb.rotation:0)+(e["t"+Xb+"_TRotation"]?e["t"+Xb+"_TRotation"]:0)+(e["t"+Xb+"_TAngle"]?e["t"+Xb+"_TAngle"]:0);ra.style+=c(ra.style,fb,u,ra,G);var Yb=ra.geometry;fb.w&&(Yb.width*=fb.w/Pb.w);fb.h&&(Yb.height*=fb.h/Pb.h);fb.x&&(Yb.x=fb.x/Pb.w);fb.y&&(Yb.y=fb.y/Pb.h);fb.fw&&(Yb.width*=.75*fb.fw/r);fb.fh&&(Yb.height*=.75*fb.fh/p);fb.fx&&(Yb.x=(0<+fb.fx?1:0)+.75*fb.fx/r);fb.fy&&(Yb.y=(0<fb.fy?1:0)+.75*fb.fy/p)}ra.vertex=!0;ra.geometry.relative=!0;v.insert(ra)}Xb++}}if(e.FillColor&&e.FillColor.url){var Od=new mxCell("",new mxGeometry(0,0,r,p),"shape=image;html=1;");Od.style+=Ra({},{},e.FillColor.url);Od.vertex=!0;Od.geometry.relative=!0;v.insert(Od)}}catch(hb){console.log("Freehand error",hb)}break;case "RightArrowBlock":var Ae=e.Head*p/r;v.style="shape=singleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+Ae;v.value=m(e);v.style+=c(v.style,+e,u,v,G);break;case "DoubleArrowBlock":Ae=e.Head*p/r;v.style="shape=doubleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+Ae;v.value=m(e);v.style+=c(v.style,e,u,v,G);break;case "VPCSubnet2017":case "VirtualPrivateCloudContainer2017":case "ElasticBeanStalkContainer2017":case "EC2InstanceContents2017":case "AWSCloudContainer2017":case "CorporateDataCenterContainer2017":switch(W){case "VPCSubnet2017":var md="shape=mxgraph.aws3.permissions;fillColor=#D9A741;";var nd=30;var od=35;break;case "VirtualPrivateCloudContainer2017":md="shape=mxgraph.aws3.virtual_private_cloud;fillColor=#F58536;";nd=52;od=36;break;case "ElasticBeanStalkContainer2017":md="shape=mxgraph.aws3.elastic_beanstalk;fillColor=#F58536;";nd=30;od=41;break;case "EC2InstanceContents2017":md="shape=mxgraph.aws3.instance;fillColor=#F58536;";nd=40;od=41;break;case "AWSCloudContainer2017":md="shape=mxgraph.aws3.cloud;fillColor=#F58536;";nd=52;od=36;break;case "CorporateDataCenterContainer2017":md="shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;",nd=-30,od=42}v.style="rounded=1;arcSize=10;dashed=0;verticalAlign=bottom;";v.value=m(e);v.style+=b(v.style,e,u,v,G);v.geometry.y+=20;v.geometry.height-=20;ob=new mxCell("",new mxGeometry(20,-20,nd,od),md);ob.vertex=!0;v.insert(ob);break;case "FlexiblePolygonBlock":var Xc=['<shape strokewidth="inherit"><foreground>'];Xc.push("<path>");for(ha=0;ha<e.Vertices.length;ha++)Pa=e.Vertices[ha],0==ha?Xc.push('<move x="'+100*Pa.x+'" y="'+100*Pa.y+'"/>'):Xc.push('<line x="'+100*Pa.x+'" y="'+100*Pa.y+'"/>');Xc.push("</path>");-Xc.push("<fillstroke/>");Xc.push("</foreground></shape>");v.style="shape=stencil("+Graph.compress(Xc.join(""))+");";v.value=m(e);v.style+=b(v.style,e,u,v,G);break;case "InfographicsBlock":var sf=e.ShapeData_1.Value,Be=e.ShapeData_2.Value-sf,Ce=e.ShapeData_3.Value-sf,fe=e.ShapeData_4.Value*r/200;Xb="ProgressBar"==e.InternalStencilId?4:5;lb=e["ShapeData_"+Xb].Value;lb="=fillColor()"==lb?e.FillColor:lb;var pd=e["ShapeData_"+(Xb+1)].Value;switch(e.InternalStencilId){case "ProgressDonut":v.style="shape=mxgraph.basic.donut;dx="+-fe+";strokeColor=none;fillColor="+P(pd)+";"+ea(pd,"fillOpacity");v.style+=b(v.style,e,u,v,G);var bb=new mxCell("",new mxGeometry(0,0,r,p),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+Ce/Be+";arcWidth="+fe/r*2+";strokeColor=none;fillColor="+P(lb)+";"+ea(lb,"fillOpacity"));bb.style+=b(bb.style,e,u,bb,G);bb.vertex=!0;bb.geometry.relative=1;v.insert(bb);break;case "ProgressHalfDonut":v.geometry.height*=2;v.geometry.rotate90();var tf=Ce/Be/2;v.style="shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+-tf+";arcWidth="+2*fe/r+";strokeColor=none;fillColor="+P(lb)+";"+ea(lb,"fillOpacity");e.Rotation-=Math.PI/2;v.style+=b(v.style,e,u,v,G);bb=new mxCell("",new mxGeometry(0,0,v.geometry.width,v.geometry.height),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+(.5-tf)+";arcWidth="+2*fe/r+";strokeColor=none;flipH=1;fillColor="+P(pd)+";"+ea(pd,"fillOpacity"));e.Rotation+=Math.PI;bb.style+=b(bb.style,e,u,bb,G);bb.vertex=!0;bb.geometry.relative=1;v.insert(bb);break;case "ProgressBar":v.style="strokeColor=none;fillColor="+-P(pd)+";"+ea(pd,"fillOpacity"),v.style+=b(v.style,e,u,v,G),bb=new mxCell("",new mxGeometry(0,0,r*Ce/Be,p),"strokeColor=none;fillColor="+P(lb)+";"+ea(lb,"fillOpacity")),bb.style+=b(bb.style,e,u,bb,G),bb.vertex=!0,bb.geometry.relative=1,v.insert(bb)}break;case "InternalStorageBlock":v.style+="shape=internalStorage;dx=10;dy=10";if(e.Text&&e.Text.m){var ge=e.Text.m,De=!1,Ee=!1;for(l=0;l<ge.length;l++){var qd=ge[l];De||"mt"!=qd.n?Ee||"il"!=qd.n||(qd.v=17+(qd.v||0),Ee=!0):(qd.v=17+(qd.v||0),De=!0)}De||-ge.push({s:0,n:"mt",v:17});Ee||ge.push({s:0,n:"il",v:17})}v.value=m(e);v.style+=b(v.style,e,u,v,G);break;case "PersonRoleBlock":try{ja=Y(e,u);eb=p/2;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Role);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ja+"startSize="+eb+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Role,G);v.style+=b(v.style,-e,u,v,G);var Fc=new mxCell("",new mxGeometry(0,p/2,r,p/2),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");Fc.value=m(e.Name);Fc.vertex=!0;v.insert(Fc);Fc.style+=a(e.Name,G);Fc.style+=b(Fc.style,e,u,Fc,G)}catch(hb){console.log(hb)}}v.style&&0>v.style.indexOf("html")&&(v.style+="html=1;");if(e.Title&&e.Title.t&&e.Text&&e.Text.t)try{var uf=v.geometry,vf=new mxCell(m(e.Title),new mxGeometry(0,uf.height+4,uf.width,10),"strokeColor=none;fillColor=none;whiteSpace=wrap;verticalAlign=top;labelPosition=center;verticalLabelPosition=top;align=center;");+30,od=42}v.style="rounded=1;arcSize=10;dashed=0;verticalAlign=bottom;";v.value=m(e);v.style+=c(v.style,e,u,v,G);v.geometry.y+=20;v.geometry.height-=20;ob=new mxCell("",new mxGeometry(20,-20,nd,od),md);ob.vertex=!0;v.insert(ob);break;case "FlexiblePolygonBlock":var Xc=['<shape strokewidth="inherit"><foreground>'];Xc.push("<path>");for(ha=0;ha<e.Vertices.length;ha++)Pa=e.Vertices[ha],0==ha?Xc.push('<move x="'+100*Pa.x+'" y="'+100*Pa.y+'"/>'):Xc.push('<line x="'+100*Pa.x+'" y="'+100*Pa.y+'"/>');Xc.push("</path>");+Xc.push("<fillstroke/>");Xc.push("</foreground></shape>");v.style="shape=stencil("+Graph.compress(Xc.join(""))+");";v.value=m(e);v.style+=c(v.style,e,u,v,G);break;case "InfographicsBlock":var sf=e.ShapeData_1.Value,Be=e.ShapeData_2.Value-sf,Ce=e.ShapeData_3.Value-sf,fe=e.ShapeData_4.Value*r/200;Xb="ProgressBar"==e.InternalStencilId?4:5;lb=e["ShapeData_"+Xb].Value;lb="=fillColor()"==lb?e.FillColor:lb;var pd=e["ShapeData_"+(Xb+1)].Value;switch(e.InternalStencilId){case "ProgressDonut":v.style="shape=mxgraph.basic.donut;dx="++fe+";strokeColor=none;fillColor="+P(pd)+";"+ea(pd,"fillOpacity");v.style+=c(v.style,e,u,v,G);var bb=new mxCell("",new mxGeometry(0,0,r,p),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+Ce/Be+";arcWidth="+fe/r*2+";strokeColor=none;fillColor="+P(lb)+";"+ea(lb,"fillOpacity"));bb.style+=c(bb.style,e,u,bb,G);bb.vertex=!0;bb.geometry.relative=1;v.insert(bb);break;case "ProgressHalfDonut":v.geometry.height*=2;v.geometry.rotate90();var tf=Ce/Be/2;v.style="shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="++tf+";arcWidth="+2*fe/r+";strokeColor=none;fillColor="+P(lb)+";"+ea(lb,"fillOpacity");e.Rotation-=Math.PI/2;v.style+=c(v.style,e,u,v,G);bb=new mxCell("",new mxGeometry(0,0,v.geometry.width,v.geometry.height),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+(.5-tf)+";arcWidth="+2*fe/r+";strokeColor=none;flipH=1;fillColor="+P(pd)+";"+ea(pd,"fillOpacity"));e.Rotation+=Math.PI;bb.style+=c(bb.style,e,u,bb,G);bb.vertex=!0;bb.geometry.relative=1;v.insert(bb);break;case "ProgressBar":v.style="strokeColor=none;fillColor="++P(pd)+";"+ea(pd,"fillOpacity"),v.style+=c(v.style,e,u,v,G),bb=new mxCell("",new mxGeometry(0,0,r*Ce/Be,p),"strokeColor=none;fillColor="+P(lb)+";"+ea(lb,"fillOpacity")),bb.style+=c(bb.style,e,u,bb,G),bb.vertex=!0,bb.geometry.relative=1,v.insert(bb)}break;case "InternalStorageBlock":v.style+="shape=internalStorage;dx=10;dy=10";if(e.Text&&e.Text.m){var ge=e.Text.m,De=!1,Ee=!1;for(l=0;l<ge.length;l++){var qd=ge[l];De||"mt"!=qd.n?Ee||"il"!=qd.n||(qd.v=17+(qd.v||0),Ee=!0):(qd.v=17+(qd.v||0),De=!0)}De||+ge.push({s:0,n:"mt",v:17});Ee||ge.push({s:0,n:"il",v:17})}v.value=m(e);v.style+=c(v.style,e,u,v,G);break;case "PersonRoleBlock":try{ja=Y(e,u);eb=p/2;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Role);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ja+"startSize="+eb+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Role,G);v.style+=c(v.style,+e,u,v,G);var Fc=new mxCell("",new mxGeometry(0,p/2,r,p/2),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");Fc.value=m(e.Name);Fc.vertex=!0;v.insert(Fc);Fc.style+=a(e.Name,G);Fc.style+=c(Fc.style,e,u,Fc,G)}catch(hb){console.log(hb)}}v.style&&0>v.style.indexOf("html")&&(v.style+="html=1;");if(e.Title&&e.Title.t&&e.Text&&e.Text.t)try{var uf=v.geometry,vf=new mxCell(m(e.Title),new mxGeometry(0,uf.height+4,uf.width,10),"strokeColor=none;fillColor=none;whiteSpace=wrap;verticalAlign=top;labelPosition=center;verticalLabelPosition=top;align=center;");vf.vertex=!0;v.insert(vf);v.style+=a(e.Title,G)}catch(hb){console.log(hb)}He(v,e);la(v,e,D);e.Hidden&&(v.visible=!1);return v}function He(w,F){if(F.Text_TRotation||F.TextRotation)try{var D=mxUtils.toDegree(F.Text_TRotation||0)+mxUtils.toDegree(F.TextRotation||0);if(!isNaN(D)&&0!=D&&w.value){var u=w.geometry.width,e=w.geometry.height,O=u,r=e,p=0,aa=0;if(-90==D||-270==D){O=e;r=u;var ba=(e-u)/2;p=-ba/u;aa=ba/e}D+=mxUtils.toDegree(F.Rotation);var W=w.style.split(";").filter(function(ka){return 0>ka.indexOf("fillColor=")&&0>ka.indexOf("strokeColor=")&&0>ka.indexOf("rotation=")}).join(";"),wa=new mxCell(w.value,new mxGeometry(p,aa,O,r),W+"fillColor=none;strokeColor=none;rotation="+D+";");w.value=null;wa.geometry.relative=!0;wa.vertex=!0;w.insert(wa)}}catch(ka){console.log(ka)}}function Ke(w,F,D,u,e){function O(Lb,$b){var Za="";try{for(var qb=0;qb<Lb.text.length;qb++){var Oc=Lb.text[qb];if(Oc[0]=="t_"+$b){for(var Gc in Oc[1]){var Hc=Oc[1][Gc];if(Hc)switch(Gc){case "font":Za+=y(Hc);break;case "bold":Za+="font-weight: bold;";break;case "italic":Za+="font-style: italic;";break;case "underline":Za+="text-decoration: underline;";break;case "size":Za+="font-size:"+z(.75*Hc)+"px;";break;case "color":Za+="color:"+V(Hc).substring(0,7)+";";break;case "fill":Za+="background-color:"+V(Hc).substring(0,7)+";";break;case "align":Za+="text-align:"+Hc+";"}}break}}}catch(Td){}return Za}try{var r=function(Lb,$b,Za){Lb=Aa+Lb;ra[Lb]=$b;$b="";for(var qb=0;qb<W.length;qb++)$b+='<div style="'+na[qb]+'">'+(Za[W[qb]]||" ")+"</div>";qb=mxUtils.getSizeForString($b);Za=g(Za.Image||Za["018__ImageUrl__"])||"https://cdn4.iconfinder.com/data/icons/basic-user-interface-elements/700/user-account-profile-human-avatar-face-head--128.png";Za=new mxCell($b,new mxGeometry(0,0,qb.width+Ba,qb.height+Oa),ua+(Ca?Za:""));Za.vertex=!0;e[Lb]=Za;u.addCell(Za,ba)},p=F.OrgChartBlockType,aa=F.Location,ba=new mxCell("",new mxGeometry(.75*aa.x,.75*aa.y,200,100),"group");ba.vertex=!0;u.addCell(ba);var W=F.FieldNames,wa=F.LayoutSettings,ka=F.BlockItemDefaultStyle||-{props:{}},pa=F.EdgeItemDefaultStyle,ra={},Aa=(w||Date.now())+"_";4==p&&(ka.props.LineWidth=0);var na=[],Ba=25,Oa=40,Ca=!0,ua=b("",ka.props,{},ba,!0);0==p?(ua+="spacingTop=54;imageWidth=54;imageHeight=54;imageAlign=center;imageVerticalAlign=top;image=",Oa+=54):1==p||2==p?(ua+="spacingLeft=54;imageWidth=50;imageHeight=50;imageAlign=left;imageVerticalAlign=top;image=",Ba+=54):3<=p&&(Ca=!1);for(w=0;w<W.length;w++)na.push(O(ka,W[w]));if(D.Items)for(var Ma=D.Items.n,Ja=0;Ja<Ma.length;Ja++){var Ka=Ma[Ja];+{props:{}},pa=F.EdgeItemDefaultStyle,ra={},Aa=(w||Date.now())+"_";4==p&&(ka.props.LineWidth=0);var na=[],Ba=25,Oa=40,Ca=!0,ua=c("",ka.props,{},ba,!0);0==p?(ua+="spacingTop=54;imageWidth=54;imageHeight=54;imageAlign=center;imageVerticalAlign=top;image=",Oa+=54):1==p||2==p?(ua+="spacingLeft=54;imageWidth=50;imageHeight=50;imageAlign=left;imageVerticalAlign=top;image=",Ba+=54):3<=p&&(Ca=!1);for(w=0;w<W.length;w++)na.push(O(ka,W[w]));if(D.Items)for(var Ma=D.Items.n,Ja=0;Ja<Ma.length;Ja++){var Ka=Ma[Ja];r(Ka.pk,Ka.ie[0]?Ka.ie[0].nf:null,Ka.f)}else{var l=F.ContractMap.derivative;if(null==l){var Ha=F.ContractMap.c.People;var cb=Ha.id;cb=cb.substr(0,cb.lastIndexOf("_"));for(w=0;w<W.length;w++)W[w]=Ha.f[W[w]]||W[w]}else for(Ja=0;Ja<l.length;Ja++)if("ForeignKeyGraph"==l[Ja].type)cb=l[Ja].c[0].id,cb=cb.substr(0,cb.lastIndexOf("_"));else if("MappedGraph"==l[Ja].type)for(w=0;w<W.length;w++)W[w]=l[Ja].nfs[W[w]]||W[w];var Ea;for(Ea in D){Ka=D[Ea].Collections;for(var Qa in Ka)if(Qa==cb)Ma=Ka[Qa].Items;else if(Ka[Qa].Properties.ForeignKeys&&Ka[Qa].Properties.ForeignKeys[0]){var ma=Ka[Qa].Properties.ForeignKeys[0].SourceFields[0];var La=Ka[Qa].Properties.Schema.PrimaryKey[0]}if(Ma)break}F={};for(var ya in Ma){Ka=Ma[ya];var za=Ka[La],Qb=Ka[ma];za==Qb?(F[za]=za+Date.now(),za=F[za],Ka[La]=za,r(za,Qb,Ka)):r(za,F[Qb]||Qb,Ka)}}for(Ea in ra){var ha=ra[Ea];if(null!=ha){var xb=e[Aa+ha],Wa=e[Ea];if(null!=xb&&null!=Wa){var rc=new mxCell("",new mxGeometry(0,0,100,100),"");rc.geometry.relative=!0;rc.edge=!0;null!=pa&&null!=pa.props&&Xa(rc,pa.props,u,null,null,!0);u.addCell(rc,ba,null,xb,Wa)}}}var wc=.75*wa.NodeSpacing.LevelSeparation;(new mxOrgChartLayout(u,0,wc,.75*wa.NodeSpacing.NeighborSeparation)).execute(ba);for(Ja=wa=r=0;ba.children&&Ja<ba.children.length;Ja++){var Gb=ba.children[Ja].geometry;r=Math.max(r,Gb.x+Gb.width);wa=Math.max(wa,Gb.y+Gb.height)}var Rb=ba.geometry;Rb.y-=wc;Rb.width=r;Rb.height=wa}catch(Lb){LucidImporter.hasUnknownShapes=!0,LucidImporter.hasOrgChart=!0,console.log(Lb)}}var xc=0,yc=0,he="text;html=1;resizable=0;labelBackgroundColor=default;align=center;verticalAlign=middle;",@@ -1059,147 +1059,147 @@ null;return F.join("")}})();function VsdxExport(g){function y(H,N){var J={"[Cont"visio/masters/master1.xml":"<?xml version='1.0' encoding='utf-8' ?><MasterContents xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Shapes><Shape ID='5' OriginalID='0' Type='Shape' LineStyle='7' FillStyle='7' TextStyle='7'><Cell N='PinX' V='1.5' F='GUARD((BeginX+EndX)/2)'/><Cell N='PinY' V='1.5' F='GUARD((BeginY+EndY)/2)'/><Cell N='Width' V='1' F='GUARD(EndX-BeginX)'/><Cell N='Height' V='-1' F='GUARD(EndY-BeginY)'/><Cell N='LocPinX' V='0.5' F='GUARD(Width*0.5)'/><Cell N='LocPinY' V='-0.5' F='GUARD(Height*0.5)'/><Cell N='Angle' V='0' F='GUARD(0DA)'/><Cell N='FlipX' V='0' F='GUARD(FALSE)'/><Cell N='FlipY' V='0' F='GUARD(FALSE)'/><Cell N='ResizeMode' V='0'/><Cell N='BeginX' V='1'/><Cell N='BeginY' V='2'/><Cell N='EndX' V='2'/><Cell N='EndY' V='1'/><Cell N='TxtPinX' V='0' F='SETATREF(Controls.TextPosition)'/><Cell N='TxtPinY' V='-1' F='SETATREF(Controls.TextPosition.Y)'/><Cell N='TxtWidth' V='0.5555555555555556' F='MAX(TEXTWIDTH(TheText),5*Char.Size)'/><Cell N='TxtHeight' V='0.2444444444444444' F='TEXTHEIGHT(TheText,TxtWidth)'/><Cell N='TxtLocPinX' V='0.2777777777777778' F='TxtWidth*0.5'/><Cell N='TxtLocPinY' V='0.1222222222222222' F='TxtHeight*0.5'/><Cell N='TxtAngle' V='0'/><Cell N='LockHeight' V='1'/><Cell N='LockCalcWH' V='1'/><Cell N='HelpTopic' V='Vis_SE.chm!#20000'/><Cell N='Copyright' V='Copyright 2001 Microsoft Corporation. All rights reserved.'/><Cell N='NoAlignBox' V='1'/><Cell N='DynFeedback' V='2'/><Cell N='GlueType' V='2'/><Cell N='ObjType' V='2'/><Cell N='NoLiveDynamics' V='1'/><Cell N='ShapeSplittable' V='1'/><Cell N='LayerMember' V='0'/><Section N='Control'><Row N='TextPosition'><Cell N='X' V='0'/><Cell N='Y' V='-1'/><Cell N='XDyn' V='0' F='Controls.TextPosition'/><Cell N='YDyn' V='-1' F='Controls.TextPosition.Y'/><Cell N='XCon' V='5' F='IF(OR(STRSAME(SHAPETEXT(TheText),\"\"),HideText),5,0)'/><Cell N='YCon' V='0'/><Cell N='CanGlue' V='0'/><Cell N='Prompt' V='Reposition Text'/></Row></Section><Section N='Geometry' IX='0'><Cell N='NoFill' V='1'/><Cell N='NoLine' V='0'/><Cell N='NoShow' V='0'/><Cell N='NoSnap' V='0'/><Cell N='NoQuickDrag' V='0'/><Row T='MoveTo' IX='1'><Cell N='X' V='0'/><Cell N='Y' V='0'/></Row><Row T='LineTo' IX='2'><Cell N='X' V='0'/><Cell N='Y' V='-1'/></Row></Section></Shape></Shapes></MasterContents>"},M;for(M in J)if(1<N&&M==K.CONTENT_TYPES_XML){for(var T=mxUtils.parseXml(J[M]),ca=T.documentElement,V=ca.children,P=null,ea=0;ea<V.length;ea++){var Y=V[ea];"/visio/pages/page1.xml"==Y.getAttribute(K.PART_NAME)&&(P=Y)}for(ea=2;ea<=N;ea++)V=P.cloneNode(),V.setAttribute(K.PART_NAME,"/visio/pages/page"+ea+".xml"),ca.appendChild(V);C(H,M,T,!0)}else H.file(M,J[M])}function z(H,N,J){return null!=H.createElementNS?H.createElementNS(N,J):H.createElement(J)}function B(H){var N=S[H];null==N&&(N=R++,S[H]=N);return N}function m(H){var N={};try{var J=H.getGraphBounds().clone(),M=H.view.scale,T=H.view.translate,ca=Math.round(J.x/M)-T.x,V=Math.round(J.y/M)-T.y,P=H.pageFormat.width,ea=H.pageFormat.height;0>ca&&(ca+=Math.ceil((T.x-J.x/M)/P)*P);0>V&&(V+=Math.ceil((T.y-J.y/M)/ea)*ea);var Y=Math.max(1,Math.ceil((J.width/M+ca)/P)),sa=Math.max(1,Math.ceil((J.height/M+V)/ea));N.gridEnabled=H.gridEnabled;N.gridSize=H.gridSize;N.guidesEnabled=H.graphHandler.guidesEnabled;N.pageVisible=H.pageVisible;N.pageScale=H.pageScale;-N.pageWidth=H.pageFormat.width*Y;N.pageHeight=H.pageFormat.height*sa;N.backgroundClr=H.background;N.mathEnabled=H.mathEnabled;N.shadowVisible=H.shadowVisible}catch(oa){}return N}function h(H,N,J,M){return c(H,N/K.CONVERSION_FACTOR,J,M)}function c(H,N,J,M){J=z(J,K.XMLNS,"Cell");J.setAttribute("N",H);J.setAttribute("V",N);M&&J.setAttribute("F",M);return J}function a(H,N,J,M,T){var ca=z(T,K.XMLNS,"Row");ca.setAttribute("T",H);ca.setAttribute("IX",N);ca.appendChild(h("X",J,T));ca.appendChild(h("Y",M,-T));return ca}function b(H){mxUtils.isLightDarkColor(H)&&(H=mxUtils.parseLightDarkColor(H).light);return mxUtils.rgba2hex(H)}function d(H,N,J){var M=b(H.style[mxConstants.STYLE_FILLCOLOR]);if(M&&"none"!=M){if(N.appendChild(c("FillForegnd",M,J)),(M=b(H.style[mxConstants.STYLE_GRADIENTCOLOR]))&&"none"!=M){N.appendChild(c("FillBkgnd",M,J));M=H.style[mxConstants.STYLE_GRADIENT_DIRECTION];var T=28;if(M)switch(M){case mxConstants.DIRECTION_EAST:T=25;break;case mxConstants.DIRECTION_WEST:T=27;break;case mxConstants.DIRECTION_NORTH:T=-30}N.appendChild(c("FillPattern",T,J))}}else N.appendChild(c("FillPattern",0,J));(M=b(H.style[mxConstants.STYLE_STROKECOLOR]))&&"none"!=M?N.appendChild(c("LineColor",M,J)):N.appendChild(c("LinePattern",0,J));(M=H.style[mxConstants.STYLE_STROKEWIDTH])&&N.appendChild(h("LineWeight",M,J));(T=H.style[mxConstants.STYLE_OPACITY])?M=T:(M=H.style[mxConstants.STYLE_FILL_OPACITY],T=H.style[mxConstants.STYLE_STROKE_OPACITY]);M&&N.appendChild(c("FillForegndTrans",1-parseInt(M)/100,J));T&&N.appendChild(c("LineColorTrans",-1-parseInt(T)/100,J));if(1==H.style[mxConstants.STYLE_DASHED]){M=H.style[mxConstants.STYLE_DASH_PATTERN];T=9;if(M)switch(M){case "1 1":T=10;break;case "1 2":T=3;break;case "1 4":T=17}N.appendChild(c("LinePattern",T,J))}1==H.style[mxConstants.STYLE_SHADOW]&&(N.appendChild(c("ShdwPattern",1,J)),N.appendChild(c("ShdwForegnd","#000000",J)),N.appendChild(c("ShdwForegndTrans",.6,J)),N.appendChild(c("ShapeShdwType",1,J)),N.appendChild(c("ShapeShdwOffsetX","0.02946278254943948",J)),N.appendChild(c("ShapeShdwOffsetY",-"-0.02946278254943948",J)),N.appendChild(c("ShapeShdwScaleFactor","1",J)),N.appendChild(c("ShapeShdwBlur","0.05555555555555555",J)),N.appendChild(c("ShapeShdwShow",2,J)));1==H.style[mxConstants.STYLE_FLIPH]&&N.appendChild(c("FlipX",1,J));1==H.style[mxConstants.STYLE_FLIPV]&&N.appendChild(c("FlipY",1,J));1==H.style[mxConstants.STYLE_ROUNDED]&&N.appendChild(h("Rounding",.1*H.cell.geometry.width,J));(H=b(H.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]))&&N.appendChild(c("TextBkgnd",H,J))}function f(H,-N,J,M,T,ca){var V=z(M,K.XMLNS,"Shape");V.setAttribute("ID",H);V.setAttribute("NameU","Shape"+H);V.setAttribute("LineStyle","0");V.setAttribute("FillStyle","0");V.setAttribute("TextStyle","0");H=N.width/2;var P=N.height/2;V.appendChild(h("PinX",N.x+H+(ca?0:L.shiftX),M));V.appendChild(h("PinY",T-N.y-P-(ca?0:L.shiftY),M));V.appendChild(h("Width",N.width,M));V.appendChild(h("Height",N.height,M));V.appendChild(h("LocPinX",H,M));V.appendChild(h("LocPinY",P,M));V.appendChild(c("LayerMember",J+"",M));return V}+N.pageWidth=H.pageFormat.width*Y;N.pageHeight=H.pageFormat.height*sa;N.backgroundClr=H.background;N.mathEnabled=H.mathEnabled;N.shadowVisible=H.shadowVisible}catch(oa){}return N}function h(H,N,J,M){return b(H,N/K.CONVERSION_FACTOR,J,M)}function b(H,N,J,M){J=z(J,K.XMLNS,"Cell");J.setAttribute("N",H);J.setAttribute("V",N);M&&J.setAttribute("F",M);return J}function a(H,N,J,M,T){var ca=z(T,K.XMLNS,"Row");ca.setAttribute("T",H);ca.setAttribute("IX",N);ca.appendChild(h("X",J,T));ca.appendChild(h("Y",M,+T));return ca}function c(H){mxUtils.isLightDarkColor(H)&&(H=mxUtils.parseLightDarkColor(H).light);return mxUtils.rgba2hex(H)}function d(H,N,J){var M=c(H.style[mxConstants.STYLE_FILLCOLOR]);if(M&&"none"!=M){if(N.appendChild(b("FillForegnd",M,J)),(M=c(H.style[mxConstants.STYLE_GRADIENTCOLOR]))&&"none"!=M){N.appendChild(b("FillBkgnd",M,J));M=H.style[mxConstants.STYLE_GRADIENT_DIRECTION];var T=28;if(M)switch(M){case mxConstants.DIRECTION_EAST:T=25;break;case mxConstants.DIRECTION_WEST:T=27;break;case mxConstants.DIRECTION_NORTH:T=+30}N.appendChild(b("FillPattern",T,J))}}else N.appendChild(b("FillPattern",0,J));(M=c(H.style[mxConstants.STYLE_STROKECOLOR]))&&"none"!=M?N.appendChild(b("LineColor",M,J)):N.appendChild(b("LinePattern",0,J));(M=H.style[mxConstants.STYLE_STROKEWIDTH])&&N.appendChild(h("LineWeight",M,J));(T=H.style[mxConstants.STYLE_OPACITY])?M=T:(M=H.style[mxConstants.STYLE_FILL_OPACITY],T=H.style[mxConstants.STYLE_STROKE_OPACITY]);M&&N.appendChild(b("FillForegndTrans",1-parseInt(M)/100,J));T&&N.appendChild(b("LineColorTrans",+1-parseInt(T)/100,J));if(1==H.style[mxConstants.STYLE_DASHED]){M=H.style[mxConstants.STYLE_DASH_PATTERN];T=9;if(M)switch(M){case "1 1":T=10;break;case "1 2":T=3;break;case "1 4":T=17}N.appendChild(b("LinePattern",T,J))}1==H.style[mxConstants.STYLE_SHADOW]&&(N.appendChild(b("ShdwPattern",1,J)),N.appendChild(b("ShdwForegnd","#000000",J)),N.appendChild(b("ShdwForegndTrans",.6,J)),N.appendChild(b("ShapeShdwType",1,J)),N.appendChild(b("ShapeShdwOffsetX","0.02946278254943948",J)),N.appendChild(b("ShapeShdwOffsetY",+"-0.02946278254943948",J)),N.appendChild(b("ShapeShdwScaleFactor","1",J)),N.appendChild(b("ShapeShdwBlur","0.05555555555555555",J)),N.appendChild(b("ShapeShdwShow",2,J)));1==H.style[mxConstants.STYLE_FLIPH]&&N.appendChild(b("FlipX",1,J));1==H.style[mxConstants.STYLE_FLIPV]&&N.appendChild(b("FlipY",1,J));1==H.style[mxConstants.STYLE_ROUNDED]&&N.appendChild(h("Rounding",.1*H.cell.geometry.width,J));(H=c(H.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]))&&N.appendChild(b("TextBkgnd",H,J))}function f(H,+N,J,M,T,ca){var V=z(M,K.XMLNS,"Shape");V.setAttribute("ID",H);V.setAttribute("NameU","Shape"+H);V.setAttribute("LineStyle","0");V.setAttribute("FillStyle","0");V.setAttribute("TextStyle","0");H=N.width/2;var P=N.height/2;V.appendChild(h("PinX",N.x+H+(ca?0:L.shiftX),M));V.appendChild(h("PinY",T-N.y-P-(ca?0:L.shiftY),M));V.appendChild(h("Width",N.width,M));V.appendChild(h("Height",N.height,M));V.appendChild(h("LocPinX",H,M));V.appendChild(h("LocPinY",P,M));V.appendChild(b("LayerMember",J+"",M));return V}function k(H,N){H=K.ARROWS_MAP[(null==H?"none":H)+"|"+(null==N?"1":N)];return null!=H?H:1}function n(H){return null==H?2:2>=H?0:3>=H?1:5>=H?2:7>=H?3:9>=H?4:22>=H?5:6}function q(H,N,J,M,T,ca){var V=J.view.getState(H,!0);if(null==V||null==V.absolutePoints||null==V.cellBounds)return null;J=z(M,K.XMLNS,"Shape");var P=B(H.id);J.setAttribute("ID",P);J.setAttribute("NameU","Dynamic connector."+P);J.setAttribute("Name","Dynamic connector."+P);J.setAttribute("Type","Shape");J.setAttribute("Master","4");var ea=L.state;P=V.absolutePoints;var Y=V.cellBounds,sa=Y.width/2,oa=Y.height/2;J.appendChild(h("PinX",Y.x+sa+(ca?0:L.shiftX),M));J.appendChild(h("PinY",T-Y.y-oa-(ca?0:L.shiftY),M));J.appendChild(h("Width",Y.width,M));J.appendChild(h("Height",Y.height,M));J.appendChild(h("LocPinX",sa,M));J.appendChild(h("LocPinY",oa,M));L.newEdge(J,V,M);sa=function(Ra,la,Sa){var Xa=Ra.x;Ra=Ra.y;Xa=Xa*ea.scale-Y.x+ea.dx+(Sa||ca?0:L.shiftX);Ra=(la?0:Y.height)-Ra*ea.scale+Y.y-ea.dy-(Sa||ca?0:L.shiftY);return{x:Xa,y:Ra}};oa=-sa(P[0],!0);J.appendChild(h("BeginX",Y.x+oa.x,M,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));J.appendChild(h("BeginY",T-Y.y+oa.y,M,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));oa=sa(P[P.length-1],!0);J.appendChild(h("EndX",Y.x+oa.x,M,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));J.appendChild(h("EndY",T-Y.y+oa.y,M,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));J.appendChild(c("BegTrigger","2",M,H.source?"_XFTRIGGER(Sheet."+B(H.source.id)+"!EventXFMod)":null));J.appendChild(c("EndTrigger",-"2",M,H.target?"_XFTRIGGER(Sheet."+B(H.target.id)+"!EventXFMod)":null));J.appendChild(c("ConFixedCode","6",M));J.appendChild(c("LayerMember",N+"",M));d(V,J,M);N=V.style[mxConstants.STYLE_STARTSIZE];H=k(V.style[mxConstants.STYLE_STARTARROW],V.style[mxConstants.STYLE_STARTFILL]);J.appendChild(c("BeginArrow",H,M));J.appendChild(c("BeginArrowSize",n(N),M));N=V.style[mxConstants.STYLE_ENDSIZE];H=k(V.style[mxConstants.STYLE_ENDARROW],V.style[mxConstants.STYLE_ENDFILL]);J.appendChild(c("EndArrow",H,M));-J.appendChild(c("EndArrowSize",n(N),M));null!=V.text&&V.text.checkBounds()&&(L.save(),V.text.paint(L),L.restore());V=z(M,K.XMLNS,"Section");V.setAttribute("N","Geometry");V.setAttribute("IX","0");for(H=0;H<P.length;H++)N=sa(P[H],!1,!0),V.appendChild(a(0==H?"MoveTo":"LineTo",H+1,N.x,N.y,M));V.appendChild(c("NoFill","1",M));V.appendChild(c("NoLine","0",M));J.appendChild(V);return J}function t(H,N,J,M,T,ca,V){var P=H.geometry,ea=P;if(null!=P)try{P.relative&&ca&&(ea=P.clone(),P.x*=ca.width,P.y*=ca.height,+sa(P[0],!0);J.appendChild(h("BeginX",Y.x+oa.x,M,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));J.appendChild(h("BeginY",T-Y.y+oa.y,M,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));oa=sa(P[P.length-1],!0);J.appendChild(h("EndX",Y.x+oa.x,M,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));J.appendChild(h("EndY",T-Y.y+oa.y,M,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));J.appendChild(b("BegTrigger","2",M,H.source?"_XFTRIGGER(Sheet."+B(H.source.id)+"!EventXFMod)":null));J.appendChild(b("EndTrigger",+"2",M,H.target?"_XFTRIGGER(Sheet."+B(H.target.id)+"!EventXFMod)":null));J.appendChild(b("ConFixedCode","6",M));J.appendChild(b("LayerMember",N+"",M));d(V,J,M);N=V.style[mxConstants.STYLE_STARTSIZE];H=k(V.style[mxConstants.STYLE_STARTARROW],V.style[mxConstants.STYLE_STARTFILL]);J.appendChild(b("BeginArrow",H,M));J.appendChild(b("BeginArrowSize",n(N),M));N=V.style[mxConstants.STYLE_ENDSIZE];H=k(V.style[mxConstants.STYLE_ENDARROW],V.style[mxConstants.STYLE_ENDFILL]);J.appendChild(b("EndArrow",H,M));+J.appendChild(b("EndArrowSize",n(N),M));null!=V.text&&V.text.checkBounds()&&(L.save(),V.text.paint(L),L.restore());V=z(M,K.XMLNS,"Section");V.setAttribute("N","Geometry");V.setAttribute("IX","0");for(H=0;H<P.length;H++)N=sa(P[H],!1,!0),V.appendChild(a(0==H?"MoveTo":"LineTo",H+1,N.x,N.y,M));V.appendChild(b("NoFill","1",M));V.appendChild(b("NoLine","0",M));J.appendChild(V);return J}function t(H,N,J,M,T,ca,V){var P=H.geometry,ea=P;if(null!=P)try{P.relative&&ca&&(ea=P.clone(),P.x*=ca.width,P.y*=ca.height,H.vertex&&null!=P.offset&&(P.x+=P.offset.x,P.y+=P.offset.y),P.relative=0);var Y=B(H.id);if(!H.treatAsSingle&&0<H.getChildCount()){var sa=f(Y+"10000",P,N,M,T,V);sa.setAttribute("Type","Group");var oa=z(M,K.XMLNS,"Shapes");L.save();L.translate(-P.x,-P.y);var Ra=P.clone();Ra.x=0;Ra.y=0;H.setGeometry(Ra);H.treatAsSingle=!0;var la=t(H,N,J,M,P.height,P,!0);delete H.treatAsSingle;H.setGeometry(P);null!=la&&oa.appendChild(la);for(T=0;T<H.getChildCount();T++)la=t(H.children[T],N,J,M,P.height,P,!0),null!=la&&oa.appendChild(la);sa.appendChild(oa);L.restore();return sa}if(H.vertex){sa=f(Y,P,N,M,T,V);var Sa=J.view.getState(H,!0);null!=Sa&&(d(Sa,sa,M),L.newShape(sa,Sa,M),null!=Sa.text&&Sa.text.checkBounds()&&(L.save(),Sa.text.paint(L),L.restore()),null!=Sa.shape&&Sa.shape.checkBounds()&&(L.save(),Sa.shape.paint(L),L.restore()),sa.appendChild(L.getShapeGeo()),L.endShape(),sa.setAttribute("Type",L.getShapeType()));return sa}return q(H,N,J,M,T,V)}finally{H.geometry=ea}else return null}function A(H,N){var J=mxUtils.createXmlDocument(),M=z(J,K.XMLNS,"PageContents");M.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",K.XMLNS);M.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",K.XMLNS_R);var T=z(J,K.XMLNS,"Shapes");M.appendChild(T);var ca=H.model,V=H.view.translate,P=H.view.scale,ea=H.getGraphBounds();L.shiftX=0;L.shiftY=0;if(ea.x/P<V.x||ea.y/P<V.y)L.shiftX=Math.ceil((V.x-ea.x/P)/H.pageFormat.width)*H.pageFormat.width,L.shiftY=Math.ceil((V.y-ea.y/P)/H.pageFormat.height)*H.pageFormat.height;L.save();L.translate(-V.x,-V.y);L.scale(1/P);L.newPage();P=H.model.getChildCells(H.model.root);V={};for(ea=0;ea<P.length;ea++)V[P[ea].id]=ea;for(var Y in ca.cells)P=ca.cells[Y],ea=null!=P.parent?V[P.parent.id]:null,null!=ea&&(P=t(P,ea,H,J,N.pageHeight),null!=P&&T.appendChild(P));H=z(J,K.XMLNS,"Connects");M.appendChild(H);for(Y in ca.cells)P=ca.cells[Y],P.edge&&(P.source&&(N=z(J,K.XMLNS,"Connect"),N.setAttribute("FromSheet",B(P.id)),N.setAttribute("FromCell","BeginX"),N.setAttribute("ToSheet",B(P.source.id)),H.appendChild(N)),P.target&&(N=z(J,K.XMLNS,"Connect"),N.setAttribute("FromSheet",B(P.id)),N.setAttribute("FromCell","EndX"),N.setAttribute("ToSheet",B(P.target.id)),H.appendChild(N)));J.appendChild(M);L.restore();return J}function C(H,N,J,M){H.file(N,(M?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(J,"\n"))}function I(H,N,J,M){var T=mxUtils.createXmlDocument(),ca=mxUtils.createXmlDocument(),V=z(T,K.XMLNS,"Pages");V.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",-K.XMLNS);V.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",K.XMLNS_R);var P=z(ca,K.RELS_XMLNS,"Relationships"),ea=1,Y;for(Y in N){var sa="page"+ea+".xml",oa=z(T,K.XMLNS,"Page");oa.setAttribute("ID",ea-1);oa.setAttribute("NameU",Y);oa.setAttribute("Name",Y);var Ra=z(T,K.XMLNS,"PageSheet"),la=M[Y];Ra.appendChild(h("PageWidth",la.pageWidth,T));Ra.appendChild(h("PageHeight",la.pageHeight,T));Ra.appendChild(c("PageScale",la.pageScale,T));Ra.appendChild(c("DrawingScale",1,T));la=z(T,K.XMLNS,"Rel");-la.setAttributeNS(K.XMLNS_R,"r:id","rId"+ea);var Sa=z(T,K.XMLNS,"Section");Sa.setAttribute("N","Layer");for(var Xa=J[Y],sc=0;sc<Xa.length;sc++){var yb=z(T,K.XMLNS,"Row");yb.setAttribute("IX",sc+"");Sa.appendChild(yb);yb.appendChild(c("Name",Xa[sc].name,T));yb.appendChild(c("Color","255",T));yb.appendChild(c("Status","0",T));yb.appendChild(c("Visible",Xa[sc].visible?"1":"0",T));yb.appendChild(c("Print","1",T));yb.appendChild(c("Active","0",T));yb.appendChild(c("Lock",Xa[sc].locked?"1":"0",T));yb.appendChild(c("Snap",-"1",T));yb.appendChild(c("Glue","1",T));yb.appendChild(c("NameUniv",Xa[sc].name,T));yb.appendChild(c("ColorTrans","0",T))}Ra.appendChild(Sa);oa.appendChild(Ra);oa.appendChild(la);V.appendChild(oa);oa=z(ca,K.RELS_XMLNS,"Relationship");oa.setAttribute("Id","rId"+ea);oa.setAttribute("Type",K.PAGES_TYPE);oa.setAttribute("Target",sa);P.appendChild(oa);C(H,K.VISIO_PAGES+sa,N[Y]);ea++}T.appendChild(V);ca.appendChild(P);C(H,K.VISIO_PAGES+"pages.xml",T);C(H,K.VISIO_PAGES+"_rels/pages.xml.rels",ca)}function Q(H,+K.XMLNS);V.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",K.XMLNS_R);var P=z(ca,K.RELS_XMLNS,"Relationships"),ea=1,Y;for(Y in N){var sa="page"+ea+".xml",oa=z(T,K.XMLNS,"Page");oa.setAttribute("ID",ea-1);oa.setAttribute("NameU",Y);oa.setAttribute("Name",Y);var Ra=z(T,K.XMLNS,"PageSheet"),la=M[Y];Ra.appendChild(h("PageWidth",la.pageWidth,T));Ra.appendChild(h("PageHeight",la.pageHeight,T));Ra.appendChild(b("PageScale",la.pageScale,T));Ra.appendChild(b("DrawingScale",1,T));la=z(T,K.XMLNS,"Rel");+la.setAttributeNS(K.XMLNS_R,"r:id","rId"+ea);var Sa=z(T,K.XMLNS,"Section");Sa.setAttribute("N","Layer");for(var Xa=J[Y],sc=0;sc<Xa.length;sc++){var yb=z(T,K.XMLNS,"Row");yb.setAttribute("IX",sc+"");Sa.appendChild(yb);yb.appendChild(b("Name",Xa[sc].name,T));yb.appendChild(b("Color","255",T));yb.appendChild(b("Status","0",T));yb.appendChild(b("Visible",Xa[sc].visible?"1":"0",T));yb.appendChild(b("Print","1",T));yb.appendChild(b("Active","0",T));yb.appendChild(b("Lock",Xa[sc].locked?"1":"0",T));yb.appendChild(b("Snap",+"1",T));yb.appendChild(b("Glue","1",T));yb.appendChild(b("NameUniv",Xa[sc].name,T));yb.appendChild(b("ColorTrans","0",T))}Ra.appendChild(Sa);oa.appendChild(Ra);oa.appendChild(la);V.appendChild(oa);oa=z(ca,K.RELS_XMLNS,"Relationship");oa.setAttribute("Id","rId"+ea);oa.setAttribute("Type",K.PAGES_TYPE);oa.setAttribute("Target",sa);P.appendChild(oa);C(H,K.VISIO_PAGES+sa,N[Y]);ea++}T.appendChild(V);ca.appendChild(P);C(H,K.VISIO_PAGES+"pages.xml",T);C(H,K.VISIO_PAGES+"_rels/pages.xml.rels",ca)}function Q(H,N){N=K.VISIO_PAGES_RELS+"page"+N+".xml.rels";var J=mxUtils.createXmlDocument(),M=z(J,K.RELS_XMLNS,"Relationships"),T=z(J,K.RELS_XMLNS,"Relationship");T.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");T.setAttribute("Id","rId1");T.setAttribute("Target","../masters/master1.xml");M.appendChild(T);var ca=L.images;if(0<ca.length)for(var V=0;V<ca.length;V++)T=z(J,K.RELS_XMLNS,"Relationship"),T.setAttribute("Type",K.XMLNS_R+"/image"),T.setAttribute("Id","rId"+(V+2)),T.setAttribute("Target","../media/"+ca[V]),M.appendChild(T);J.appendChild(M);C(H,N,J)}var K=this,L=new mxVsdxCanvas2D,S={},R=1;this.exportCurrentDiagrams=function(H){try{if(g.spinner.spin(document.body,mxResources.get("exporting"))){var N=function(la,Sa){la=la.model.getChildCells(la.model.root);T[Sa]=[];for(var Xa=0;Xa<la.length;Xa++)la[Xa].visible&&T[Sa].push({name:la[Xa].value||"Background",visible:la[Xa].visible,locked:la[Xa].style&&0<=la[Xa].style.indexOf("locked=1")})},J=new JSZip;L.init(J);S={};R=1;var M={},T={},ca={},V=null!=g.pages?g.pages.length:1;if(null!=g.pages){var P=function(la){la=la.getName();var Sa=g.editor.graph,Xa=m(Sa);M[la]=A(Sa,Xa);N(Sa,la);Q(J,sa+1);ca[la]=Xa},ea=g.editor.graph.getSelectionCells(),Y=g.currentPage;if(H)P(Y);else{for(var sa=0;sa<g.pages.length;sa++){var oa=g.pages[sa];g.currentPage!=oa&&g.selectPage(oa,!0);P(oa)}Y!=g.currentPage&&g.selectPage(Y,!0);g.editor.graph.setSelectionCells(ea)}}else{P=g.editor.graph;var Ra=m(P);M.Page1=A(P,Ra);N(P,"Page1");Q(J,1);ca.Page1=Ra}y(J,V);I(J,M,T,ca);H=function(){J.generateAsync({type:"base64"}).then(function(la){g.spinner.stop();var Sa=g.getBaseFilename();g.saveData(Sa+".vsdx","vsdx",la,"application/vnd.visio2013",!0)})};0<L.filesLoading?L.onFilesLoaded=H:H()}return!0}catch(la){return console.log(la),g.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(g){this.filesLoading=0;this.zip=g};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(g){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,g):this.xmlDoc.createElement(g)};+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);this.pageIndex=0}mxUtils.extend(mxVsdxCanvas2D,mxAbstractCanvas2D);mxVsdxCanvas2D.prototype.textEnabled=!0;mxVsdxCanvas2D.prototype.init=function(g){this.filesLoading=0;this.zip=g};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(g){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,g):this.xmlDoc.createElement(g)};mxVsdxCanvas2D.prototype.createGeoSec=function(){null!=this.geoSec&&this.shape.appendChild(this.geoSec);var g=this.createElt("Section");g.setAttribute("N","Geometry");g.setAttribute("IX",this.geoIndex++);this.geoSec=g;this.geoStepIndex=1;this.lastMoveToY=this.lastMoveToX=this.lastY=this.lastX=0};mxVsdxCanvas2D.prototype.newShape=function(g,y,z){this.geoIndex=0;this.shape=g;this.cellState=y;this.xmGeo=y.cell.geometry;this.xmlDoc=z;this.shapeImg=this.geoSec=null;this.shapeType="Shape";this.createGeoSec()};-mxVsdxCanvas2D.prototype.newEdge=function(g,y,z){this.shape=g;this.cellState=y;this.xmGeo=y.cellBounds;this.xmlDoc=z};mxVsdxCanvas2D.prototype.endShape=function(){null!=this.shapeImg&&this.addForeignData(this.shapeImg.type,this.shapeImg.id)};mxVsdxCanvas2D.prototype.newPage=function(){this.images=[]};mxVsdxCanvas2D.prototype.getShapeType=function(){return this.shapeType};mxVsdxCanvas2D.prototype.getShapeGeo=function(){return this.geoSec};+mxVsdxCanvas2D.prototype.newEdge=function(g,y,z){this.shape=g;this.cellState=y;this.xmGeo=y.cellBounds;this.xmlDoc=z};mxVsdxCanvas2D.prototype.endShape=function(){null!=this.shapeImg&&this.addForeignData(this.shapeImg.type,this.shapeImg.id)};mxVsdxCanvas2D.prototype.newPage=function(){this.images=[];this.pageIndex++};mxVsdxCanvas2D.prototype.getShapeType=function(){return this.shapeType};mxVsdxCanvas2D.prototype.getShapeGeo=function(){return this.geoSec};mxVsdxCanvas2D.prototype.createCellElemScaled=function(g,y,z){return this.createCellElem(g,y/VsdxExport.prototype.CONVERSION_FACTOR,z)};mxVsdxCanvas2D.prototype.createCellElem=function(g,y,z){var B=this.createElt("Cell");B.setAttribute("N",g);B.setAttribute("V",y);z&&B.setAttribute("F",z);return B};-mxVsdxCanvas2D.prototype.createRowScaled=function(g,y,z,B,m,h,c,a,b,d,f,k,n,q){return this.createRowRel(g,y,z/VsdxExport.prototype.CONVERSION_FACTOR,B/VsdxExport.prototype.CONVERSION_FACTOR,m/VsdxExport.prototype.CONVERSION_FACTOR,h/VsdxExport.prototype.CONVERSION_FACTOR,c/VsdxExport.prototype.CONVERSION_FACTOR,a/VsdxExport.prototype.CONVERSION_FACTOR,b,d,f,k,n,q)};-mxVsdxCanvas2D.prototype.createRowRel=function(g,y,z,B,m,h,c,a,b,d,f,k,n,q){var t=this.createElt("Row");t.setAttribute("T",g);t.setAttribute("IX",y);t.appendChild(this.createCellElem("X",z,b));t.appendChild(this.createCellElem("Y",B,d));null!=m&&isFinite(m)&&t.appendChild(this.createCellElem("A",m,f));null!=h&&isFinite(h)&&t.appendChild(this.createCellElem("B",h,k));null!=c&&isFinite(c)&&t.appendChild(this.createCellElem("C",c,n));null!=a&&isFinite(a)&&t.appendChild(this.createCellElem("D",a,q));+mxVsdxCanvas2D.prototype.createRowScaled=function(g,y,z,B,m,h,b,a,c,d,f,k,n,q){return this.createRowRel(g,y,z/VsdxExport.prototype.CONVERSION_FACTOR,B/VsdxExport.prototype.CONVERSION_FACTOR,m/VsdxExport.prototype.CONVERSION_FACTOR,h/VsdxExport.prototype.CONVERSION_FACTOR,b/VsdxExport.prototype.CONVERSION_FACTOR,a/VsdxExport.prototype.CONVERSION_FACTOR,c,d,f,k,n,q)};+mxVsdxCanvas2D.prototype.createRowRel=function(g,y,z,B,m,h,b,a,c,d,f,k,n,q){var t=this.createElt("Row");t.setAttribute("T",g);t.setAttribute("IX",y);t.appendChild(this.createCellElem("X",z,c));t.appendChild(this.createCellElem("Y",B,d));null!=m&&isFinite(m)&&t.appendChild(this.createCellElem("A",m,f));null!=h&&isFinite(h)&&t.appendChild(this.createCellElem("B",h,k));null!=b&&isFinite(b)&&t.appendChild(this.createCellElem("C",b,n));null!=a&&isFinite(a)&&t.appendChild(this.createCellElem("D",a,q));return t};mxVsdxCanvas2D.prototype.begin=function(){1<this.geoStepIndex&&this.createGeoSec()};mxVsdxCanvas2D.prototype.rect=function(g,y,z,B){1<this.geoStepIndex&&this.createGeoSec();var m=this.state;z*=m.scale;B*=m.scale;var h=this.xmGeo;g=(g-h.x+m.dx)*m.scale;y=(h.height-y+h.y-m.dy)*m.scale;this.geoSec.appendChild(this.createRowScaled("MoveTo",this.geoStepIndex++,g,y));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g+z,y));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g+z,y-B));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g,y-B));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g,y))};mxVsdxCanvas2D.prototype.roundrect=function(g,y,z,B,m,h){this.rect(g,y,z,B);this.shape.appendChild(this.createCellElemScaled("Rounding",m))};-mxVsdxCanvas2D.prototype.ellipse=function(g,y,z,B){1<this.geoStepIndex&&this.createGeoSec();var m=this.state;z*=m.scale;B*=m.scale;var h=this.xmGeo,c=h.height*m.scale,a=h.width*m.scale;g=(g-h.x+m.dx)*m.scale;y=c+(-y+h.y-m.dy)*m.scale;this.geoSec.appendChild(this.createRowScaled("Ellipse",this.geoStepIndex++,g+z/2,y-B/2,g,y-B/2,g+z/2,y,"Width*"+(g+z/2)/a,"Height*"+(y-B/2)/c,"Width*"+g/a,"Height*"+(y-B/2)/c,"Width*"+(g+z/2)/a,"Height*"+y/c))};+mxVsdxCanvas2D.prototype.ellipse=function(g,y,z,B){1<this.geoStepIndex&&this.createGeoSec();var m=this.state;z*=m.scale;B*=m.scale;var h=this.xmGeo,b=h.height*m.scale,a=h.width*m.scale;g=(g-h.x+m.dx)*m.scale;y=b+(-y+h.y-m.dy)*m.scale;this.geoSec.appendChild(this.createRowScaled("Ellipse",this.geoStepIndex++,g+z/2,y-B/2,g,y-B/2,g+z/2,y,"Width*"+(g+z/2)/a,"Height*"+(y-B/2)/b,"Width*"+g/a,"Height*"+(y-B/2)/b,"Width*"+(g+z/2)/a,"Height*"+y/b))};mxVsdxCanvas2D.prototype.moveTo=function(g,y){1<this.geoStepIndex&&this.createGeoSec();this.lastMoveToX=g;this.lastMoveToY=y;this.lastX=g;this.lastY=y;var z=this.xmGeo,B=this.state;g=(g-z.x+B.dx)*B.scale;y=(z.height-y+z.y-B.dy)*B.scale;var m=z.height*B.scale;z=z.width*B.scale;this.geoSec.appendChild(this.createRowRel("RelMoveTo",this.geoStepIndex++,g/z,y/m))};mxVsdxCanvas2D.prototype.lineTo=function(g,y){this.lastX=g;this.lastY=y;var z=this.xmGeo,B=this.state;g=(g-z.x+B.dx)*B.scale;y=(z.height-y+z.y-B.dy)*B.scale;var m=z.height*B.scale;z=z.width*B.scale;this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,g/z,y/m))};-mxVsdxCanvas2D.prototype.quadTo=function(g,y,z,B){this.lastX=z;this.lastY=B;var m=this.state,h=this.xmGeo,c=h.height*m.scale,a=h.width*m.scale;g=(g-h.x+m.dx)*m.scale;y=(h.height-y+h.y-m.dy)*m.scale;z=(z-h.x+m.dx)*m.scale;B=(h.height-B+h.y-m.dy)*m.scale;g/=a;y/=c;z/=a;B/=c;this.geoSec.appendChild(this.createRowRel("RelQuadBezTo",this.geoStepIndex++,z,B,g,y))};-mxVsdxCanvas2D.prototype.curveTo=function(g,y,z,B,m,h){this.lastX=m;this.lastY=h;var c=this.state,a=this.xmGeo,b=a.height*c.scale,d=a.width*c.scale;g=(g-a.x+c.dx)*c.scale;y=(a.height-y+a.y-c.dy)*c.scale;z=(z-a.x+c.dx)*c.scale;B=(a.height-B+a.y-c.dy)*c.scale;m=(m-a.x+c.dx)*c.scale;h=(a.height-h+a.y-c.dy)*c.scale;g/=d;y/=b;z/=d;B/=b;m/=d;h/=b;this.geoSec.appendChild(this.createRowRel("RelCubBezTo",this.geoStepIndex++,m,h,g,y,z,B))};+mxVsdxCanvas2D.prototype.quadTo=function(g,y,z,B){this.lastX=z;this.lastY=B;var m=this.state,h=this.xmGeo,b=h.height*m.scale,a=h.width*m.scale;g=(g-h.x+m.dx)*m.scale;y=(h.height-y+h.y-m.dy)*m.scale;z=(z-h.x+m.dx)*m.scale;B=(h.height-B+h.y-m.dy)*m.scale;g/=a;y/=b;z/=a;B/=b;this.geoSec.appendChild(this.createRowRel("RelQuadBezTo",this.geoStepIndex++,z,B,g,y))};+mxVsdxCanvas2D.prototype.curveTo=function(g,y,z,B,m,h){this.lastX=m;this.lastY=h;var b=this.state,a=this.xmGeo,c=a.height*b.scale,d=a.width*b.scale;g=(g-a.x+b.dx)*b.scale;y=(a.height-y+a.y-b.dy)*b.scale;z=(z-a.x+b.dx)*b.scale;B=(a.height-B+a.y-b.dy)*b.scale;m=(m-a.x+b.dx)*b.scale;h=(a.height-h+a.y-b.dy)*b.scale;g/=d;y/=c;z/=d;B/=c;m/=d;h/=c;this.geoSec.appendChild(this.createRowRel("RelCubBezTo",this.geoStepIndex++,m,h,g,y,z,B))};mxVsdxCanvas2D.prototype.close=function(){this.lastMoveToX==this.lastX&&this.lastMoveToY==this.lastY||this.lineTo(this.lastMoveToX,this.lastMoveToY)};mxVsdxCanvas2D.prototype.addForeignData=function(g,y){var z=this.createElt("ForeignData");z.setAttribute("ForeignType","Bitmap");g=g.toUpperCase();"BMP"!=g&&z.setAttribute("CompressionType",g);g=this.createElt("Rel");g.setAttribute("r:id","rId"+y);z.appendChild(g);this.shape.appendChild(z);this.shapeType="Foreign"};-mxVsdxCanvas2D.prototype.convertSvg2Png=function(g,y,z){var B=this;this.filesLoading++;try{var m=document.createElement("canvas"),h=m.getContext("2d");y||(g=String.fromCharCode.apply(null,new Uint8Array(g)),g=window.btoa?btoa(g):Base64.encode(g,!0));y="data:image/svg+xml;base64,"+g;img=new Image;img.onload=function(){m.width=this.width;m.height=this.height;h.drawImage(this,0,0);try{z(m.toDataURL("image/png"))}catch(c){}B.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()};img.onerror=function(){console.log("SVG2PNG conversion failed");-try{z(g)}catch(c){}B.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()};img.src=y}catch(c){console.log("SVG2PNG conversion failed"+c.message);try{z(g)}catch(a){}this.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()}};-mxVsdxCanvas2D.prototype.image=function(g,y,z,B,m,h,c,a){var b=this,d="image"+(this.images.length+1)+".";if(0==m.indexOf("data:")){var f=m.indexOf("base64,");h=m.substring(f+7);f=m.substring(11,f-1);0==f.indexOf("svg")?(f="png",d+=f,this.convertSvg2Png(h,!0,function(n){b.zip.file("visio/media/"+d,n.substring(22),{base64:!0})})):(d+=f,this.zip.file("visio/media/"+d,h,{base64:!0}))}else if(window.XMLHttpRequest){m=this.converter.convert(m);this.filesLoading++;f=m.lastIndexOf(".");f=m.substring(f+1);-var k=!1;0==f.indexOf("svg")&&(f="png",k=!0);d+=f;h=new XMLHttpRequest;h.open("GET",m,!0);h.responseType="arraybuffer";h.onreadystatechange=function(n){if(4==this.readyState&&(200==this.status&&(k?b.convertSvg2Png(this.response,!1,function(q){b.zip.file("visio/media/"+d,q.substring(22),{base64:!0})}):b.zip.file("visio/media/"+d,this.response)),b.filesLoading--,0==b.filesLoading))b.onFilesLoaded()};h.send()}this.images.push(d);this.shapeImg={type:f,id:this.images.length+1};m=this.state;z*=m.scale;-B*=m.scale;f=this.xmGeo;g=(g-f.x+m.dx)*m.scale;y=(f.height-y+f.y-m.dy)*m.scale;this.shape.appendChild(this.createCellElemScaled("ImgOffsetX",g));this.shape.appendChild(this.createCellElemScaled("ImgOffsetY",y-B));this.shape.appendChild(this.createCellElemScaled("ImgWidth",z));this.shape.appendChild(this.createCellElemScaled("ImgHeight",B))};-mxVsdxCanvas2D.prototype.text=function(g,y,z,B,m,h,c,a,b,d,f,k,n){var q=this;if(this.textEnabled&&null!=m){mxUtils.isNode(m)&&(m=mxUtils.getOuterHtml(m));0==z&&0==B&&(B=mxUtils.getSizeForString(m,q.cellState.style.fontSize,q.cellState.style.fontFamily),z=2*B.width,B=2*B.height);"html"==b&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(m=m.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML=Graph.sanitizeHtml(m),+mxVsdxCanvas2D.prototype.convertSvg2Png=function(g,y,z,B,m){var h=this;this.filesLoading++;try{var b=document.createElement("canvas"),a=b.getContext("2d");B||(g=String.fromCharCode.apply(null,new Uint8Array(g)),g=window.btoa?btoa(g):Base64.encode(g,!0));B="data:image/svg+xml;base64,"+g;img=new Image;img.onload=function(){b.width=Math.max(this.width,y);b.height=Math.max(this.height,z);a.drawImage(this,0,0,b.width,b.height);try{m(b.toDataURL("image/png"))}catch(c){}h.filesLoading--;if(0==h.filesLoading)h.onFilesLoaded()};+img.onerror=function(){console.log("SVG2PNG conversion failed");try{m(g)}catch(c){}h.filesLoading--;if(0==h.filesLoading)h.onFilesLoaded()};img.src=B}catch(c){console.log("SVG2PNG conversion failed"+c.message);try{m(g)}catch(d){}this.filesLoading--;if(0==h.filesLoading)h.onFilesLoaded()}};+mxVsdxCanvas2D.prototype.image=function(g,y,z,B,m,h,b,a){var c=this;h=this.state;z*=h.scale;B*=h.scale;var d=this.pageIndex+"_image"+(this.images.length+1)+".";if(0==m.indexOf("data:")){var f=m.indexOf("base64,");b=m.substring(f+7);f=m.substring(11,f-1);0==f.indexOf("svg")?(f="png",d+=f,this.convertSvg2Png(b,z,B,!0,function(n){c.zip.file("visio/media/"+d,n.substring(22),{base64:!0})})):(d+=f,this.zip.file("visio/media/"+d,b,{base64:!0}))}else if(window.XMLHttpRequest){m=this.converter.convert(m);+this.filesLoading++;f=m.lastIndexOf(".");f=m.substring(f+1);var k=!1;0==f.indexOf("svg")&&(f="png",k=!0);d+=f;b=new XMLHttpRequest;b.open("GET",m,!0);b.responseType="arraybuffer";b.onreadystatechange=function(n){if(4==this.readyState&&(200==this.status&&(k?c.convertSvg2Png(this.response,z,B,!1,function(q){c.zip.file("visio/media/"+d,q.substring(22),{base64:!0})}):c.zip.file("visio/media/"+d,this.response)),c.filesLoading--,0==c.filesLoading))c.onFilesLoaded()};b.send()}this.images.push(d);this.shapeImg=+{type:f,id:this.images.length+1};m=this.xmGeo;g=(g-m.x+h.dx)*h.scale;y=(m.height-y+m.y-h.dy)*h.scale;this.shape.appendChild(this.createCellElemScaled("ImgOffsetX",g));this.shape.appendChild(this.createCellElemScaled("ImgOffsetY",y-B));this.shape.appendChild(this.createCellElemScaled("ImgWidth",z));this.shape.appendChild(this.createCellElemScaled("ImgHeight",B))};+mxVsdxCanvas2D.prototype.text=function(g,y,z,B,m,h,b,a,c,d,f,k,n){var q=this;if(this.textEnabled&&null!=m){mxUtils.isNode(m)&&(m=mxUtils.getOuterHtml(m));0==z&&0==B&&(B=mxUtils.getSizeForString(m,q.cellState.style.fontSize,q.cellState.style.fontFamily),z=2*B.width,B=2*B.height);"html"==c&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(m=m.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML=Graph.sanitizeHtml(m),m=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));d=this.state;f=this.xmGeo;z*=d.scale;B*=d.scale;var t=this.createElt("Section");t.setAttribute("N","Character");var A=this.createElt("Section");A.setAttribute("N","Paragraph");var C=this.createElt("Text"),I=0,Q=0,K=0,L=0,S=0,R=0,H=0,N=function(V,P,ea,Y,sa){var oa=V.fontSize,Ra=V.fontFamily,la=mxUtils.getSizeForString(sa,oa,Ra);a&&la.width>z&&(la=mxUtils.getSizeForString(sa,oa,Ra,z));V.blockElem?(S+=la.width,K=Math.min(Math.max(K,S),z),S=0,R=Math.max(R,la.height),L+=R+H,H=R,R=0):(S+=la.width,K=Math.min(Math.max(K,S),z),R=Math.max(R,la.height),L=Math.max(L,R));la=q.createElt("Row");la.setAttribute("IX",I);V.fontColor&&la.appendChild(q.createCellElem("Color",mxUtils.rgba2hex(V.fontColor)));oa&&la.appendChild(q.createCellElemScaled("Size",.97*oa));Ra&&la.appendChild(q.createCellElem("Font",Ra));oa=0;V.bold&&(oa|=17);V.italic&&(oa|=34);V.underline&&(oa|=4);la.appendChild(q.createCellElem("Style",oa));la.appendChild(q.createCellElem("Case","0"));la.appendChild(q.createCellElem("Pos","0"));la.appendChild(q.createCellElem("FontScale","1"));la.appendChild(q.createCellElem("Letterspace","0"));P.appendChild(la);P=q.createElt("Row");P.setAttribute("IX",Q);switch(V.align){case "left":oa=0;break;case "center":oa=1;break;case "right":oa=2;break;case "start":oa=0;break;case "end":oa=2;break;case "justify":oa=0;break;default:oa=1}P.appendChild(q.createCellElem("HorzAlign",oa));ea.appendChild(P);ea=q.createElt("cp");ea.setAttribute("IX",I++);Y.appendChild(ea);V=q.xmlDoc.createTextNode(sa+(V.blockElem?"\n":""));Y.appendChild(V)},J=function(V,P){P=P||{};for(var ea=0;ea<V.length;ea++){var Y=V[ea];if(3==Y.nodeType){var sa=q.cellState.style.fontStyle;sa={fontColor:P.fontColor||q.cellState.style.fontColor,fontSize:P.fontSize||q.cellState.style.fontSize,fontFamily:P.fontFamily||q.cellState.style.fontFamily,align:P.align||q.cellState.style.align,bold:P.bold||sa&1,italic:P.italic||sa&2,underline:P.underline||sa&4};var oa=!1;ea+1<V.length&&"BR"==V[ea+1].nodeName.toUpperCase()&&(oa=!0,ea++);N(sa,t,A,C,(P.OL?P.LiIndex+". ":"")+Y.textContent+(oa?"\n":""))}else if(1==Y.nodeType){oa=Y.nodeName.toUpperCase();var Ra=Y.childNodes.length;sa=window.getComputedStyle(Y,null);sa={bold:"bold"==sa.getPropertyValue("font-weight")||P.bold,italic:"italic"==sa.getPropertyValue("font-style")||P.italic,underline:0<=sa.getPropertyValue("text-decoration").indexOf("underline")||P.underline,align:sa.getPropertyValue("text-align"),fontColor:sa.getPropertyValue("color"),fontSize:parseFloat(sa.getPropertyValue("font-size")),fontFamily:sa.getPropertyValue("font-family").replace(/"/g,""),blockElem:"block"==sa.getPropertyValue("display")||"BR"==oa||"LI"==oa,OL:P.OL,LiIndex:P.LiIndex};if("UL"==oa){var la=q.createElt("Row");la.setAttribute("IX",Q);la.appendChild(q.createCellElem("HorzAlign","0"));la.appendChild(q.createCellElem("Bullet","1"));A.appendChild(la);la=q.createElt("pp");la.setAttribute("IX",Q++);C.appendChild(la)}else"OL"==oa?sa.OL=!0:"LI"==oa&&(sa.LiIndex=ea+1);0<Ra?(J(Y.childNodes,sa),"UL"==oa&&(la=q.createElt("Row"),-la.setAttribute("IX",Q),la.appendChild(q.createCellElem("Bullet","0")),A.appendChild(la),la=q.createElt("pp"),la.setAttribute("IX",Q++),C.appendChild(la)),N(sa,t,A,C,"")):N(sa,t,A,C,(P.OL?P.LiIndex+". ":"")+Y.textContent)}}};"html"==b&&mxClient.IS_SVG?(m=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1],null!=m&&J(m.childNodes,{})):N({fontColor:q.cellState.style.fontColor,fontSize:q.cellState.style.fontSize,fontFamily:q.cellState.style.fontFamily},t,A,C,m);b=m=0;B=Math.max(B,-L);z=Math.max(z,K);n=z/2;var M=B/2,T=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),ca=T*Math.PI/180;switch(h){case "right":0!=T?(g-=n*Math.cos(ca),y-=n*Math.sin(ca)):m=K/2;break;case "left":0!=T?(g+=n*Math.cos(ca),y+=n*Math.sin(ca)):m=-K/2}switch(c){case "top":0!=T?(g+=M*Math.sin(ca),y+=M*Math.cos(ca)):b=L/2;break;case "bottom":0!=T?(g-=M*Math.sin(ca),y-=M*Math.cos(ca)):b=-L/2}g=(g-f.x+d.dx)*d.scale;y=(f.height-y+f.y-d.dy)*d.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",-g));this.shape.appendChild(this.createCellElemScaled("TxtPinY",y));this.shape.appendChild(this.createCellElemScaled("TxtWidth",z));this.shape.appendChild(this.createCellElemScaled("TxtHeight",B));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",n+m));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",M+b));k-=T;0!=k&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-k)*Math.PI/180));this.shape.appendChild(t);this.shape.appendChild(A);this.shape.appendChild(C)}};+la.setAttribute("IX",Q),la.appendChild(q.createCellElem("Bullet","0")),A.appendChild(la),la=q.createElt("pp"),la.setAttribute("IX",Q++),C.appendChild(la)),N(sa,t,A,C,"")):N(sa,t,A,C,(P.OL?P.LiIndex+". ":"")+Y.textContent)}}};"html"==c&&mxClient.IS_SVG?(m=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1],null!=m&&J(m.childNodes,{})):N({fontColor:q.cellState.style.fontColor,fontSize:q.cellState.style.fontSize,fontFamily:q.cellState.style.fontFamily},t,A,C,m);c=m=0;B=Math.max(B,+L);z=Math.max(z,K);n=z/2;var M=B/2,T=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),ca=T*Math.PI/180;switch(h){case "right":0!=T?(g-=n*Math.cos(ca),y-=n*Math.sin(ca)):m=K/2;break;case "left":0!=T?(g+=n*Math.cos(ca),y+=n*Math.sin(ca)):m=-K/2}switch(b){case "top":0!=T?(g+=M*Math.sin(ca),y+=M*Math.cos(ca)):c=L/2;break;case "bottom":0!=T?(g-=M*Math.sin(ca),y-=M*Math.cos(ca)):c=-L/2}g=(g-f.x+d.dx)*d.scale;y=(f.height-y+f.y-d.dy)*d.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",+g));this.shape.appendChild(this.createCellElemScaled("TxtPinY",y));this.shape.appendChild(this.createCellElemScaled("TxtWidth",z));this.shape.appendChild(this.createCellElemScaled("TxtHeight",B));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",n+m));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",M+c));k-=T;0!=k&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-k)*Math.PI/180));this.shape.appendChild(t);this.shape.appendChild(A);this.shape.appendChild(C)}};mxVsdxCanvas2D.prototype.rotate=function(g,y,z,B,m){0!=g&&(y=this.state,B+=y.dx,m+=y.dy,B*=y.scale,m*=y.scale,this.shape.appendChild(this.createCellElem("Angle",(360-g)*Math.PI/180)),y.rotation+=g,y.rotationCx=B,y.rotationCy=m)};mxVsdxCanvas2D.prototype.stroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","1"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};mxVsdxCanvas2D.prototype.fill=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","1"))};mxVsdxCanvas2D.prototype.fillAndStroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};function BmpDecoder(g,y){this.pos=0;this.buffer=g;this.is_with_alpha=!!y;if(66!=this.buffer[0]&&77!=this.buffer[1])throw Error("Invalid BMP File");this.pos+=2;this.parseHeader();this.parseBGR()}BmpDecoder.prototype.parseHeader=function(){var g=this.buffer;this.fileSize=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.reserved=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.offset=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.headerSize=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.width=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.height=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.planes=g[this.pos+1]<<8|g[this.pos];this.pos+=2;this.bitPP=g[this.pos+1]<<8|g[this.pos];this.pos+=2;this.compress=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.rawSize=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.hr=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.vr=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.colors=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.importantColors=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15);if(15>this.bitPP){g=0===this.colors?1<<this.bitPP:this.colors;this.palette=Array(g);for(var y=0;y<g;y++){var z=this.buffer[this.pos++],B=this.buffer[this.pos++],m=this.buffer[this.pos++],h=this.buffer[this.pos++];this.palette[y]={red:m,green:B,blue:z,quad:h}}}};BmpDecoder.prototype.parseBGR=function(){this.pos=this.offset;try{var g="bit"+this.bitPP,y=document.createElement("canvas").getContext("2d").createImageData(this.width,this.height);this.imageData=y;this.data=y.data;this[g]()}catch(z){console.log("bit decode error:"+z)}};-BmpDecoder.prototype.bit1=function(){for(var g=Math.ceil(this.width/8),y=g%4,z=this.height-1;0<=z;z--){for(var B=0;B<g;B++)for(var m=this.buffer[this.pos++],h=z*this.width*4+32*B,c=0;8>c;c++)if(8*B+c<this.width){var a=this.palette[m>>7-c&1];this.data[h+4*c]=a.red;this.data[h+4*c+1]=a.green;this.data[h+4*c+2]=a.blue;this.data[h+4*c+3]=255}else break;0!=y&&(this.pos+=4-y)}};-BmpDecoder.prototype.bit4=function(){for(var g=Math.ceil(this.width/2),y=g%4,z=this.height-1;0<=z;z--){for(var B=0;B<g;B++){var m=this.buffer[this.pos++],h=z*this.width*4+8*B,c=m&15;m=this.palette[m>>4];this.data[h]=m.red;this.data[h+1]=m.green;this.data[h+2]=m.blue;this.data[h+3]=255;if(2*B+1>=this.width)break;m=this.palette[c];this.data[h+4]=m.red;this.data[h+4+1]=m.green;this.data[h+4+2]=m.blue;this.data[h+4+3]=255}0!=y&&(this.pos+=4-y)}};+BmpDecoder.prototype.bit1=function(){for(var g=Math.ceil(this.width/8),y=g%4,z=this.height-1;0<=z;z--){for(var B=0;B<g;B++)for(var m=this.buffer[this.pos++],h=z*this.width*4+32*B,b=0;8>b;b++)if(8*B+b<this.width){var a=this.palette[m>>7-b&1];this.data[h+4*b]=a.red;this.data[h+4*b+1]=a.green;this.data[h+4*b+2]=a.blue;this.data[h+4*b+3]=255}else break;0!=y&&(this.pos+=4-y)}};+BmpDecoder.prototype.bit4=function(){for(var g=Math.ceil(this.width/2),y=g%4,z=this.height-1;0<=z;z--){for(var B=0;B<g;B++){var m=this.buffer[this.pos++],h=z*this.width*4+8*B,b=m&15;m=this.palette[m>>4];this.data[h]=m.red;this.data[h+1]=m.green;this.data[h+2]=m.blue;this.data[h+3]=255;if(2*B+1>=this.width)break;m=this.palette[b];this.data[h+4]=m.red;this.data[h+4+1]=m.green;this.data[h+4+2]=m.blue;this.data[h+4+3]=255}0!=y&&(this.pos+=4-y)}};BmpDecoder.prototype.bit8=function(){for(var g=this.width%4,y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos++],m=y*this.width*4+4*z;B<this.palette.length?(B=this.palette[B],this.data[m]=B.red,this.data[m+1]=B.green,this.data[m+2]=B.blue):(this.data[m]=255,this.data[m+1]=255,this.data[m+2]=255);this.data[m+3]=255}0!=g&&(this.pos+=4-g)}};-BmpDecoder.prototype.bit15=function(){var g=2*this.width%4;0!=g&&(g=4-g);for(var y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var m=(B&31)/31*255|0,h=(B>>5&31)/31*255|0,c=B>>15?255:0,a=y*this.width*4+4*z;this.data[a]=(B>>10&31)/31*255|0;this.data[a+1]=h;this.data[a+2]=m;this.data[a+3]=c}this.pos+=g}};-BmpDecoder.prototype.bit16=function(){var g=2*this.width%4;0!=g&&(g=4-g);for(var y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var m=(B&31)/31*255|0,h=(B>>5&31)/31*255|0,c=y*this.width*4+4*z;this.data[c]=(B>>10&31)/31*255|0;this.data[c+1]=h;this.data[c+2]=m;this.data[c+3]=255}this.pos+=g}};-BmpDecoder.prototype.bit24=function(){var g=3*this.width%4;0!=g&&(g=4-g);for(var y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos++],m=this.buffer[this.pos++],h=this.buffer[this.pos++],c=y*this.width*4+4*z;this.data[c]=h;this.data[c+1]=m;this.data[c+2]=B;this.data[c+3]=255}this.pos+=g}};-BmpDecoder.prototype.bit32=function(){for(var g=this.height-1;0<=g;g--)for(var y=0;y<this.width;y++){var z=this.buffer[this.pos++],B=this.buffer[this.pos++],m=this.buffer[this.pos++],h=this.buffer[this.pos++],c=g*this.width*4+4*y;this.data[c]=m;this.data[c+1]=B;this.data[c+2]=z;this.data[c+3]=h}};BmpDecoder.prototype.getData=function(){return this.data};var __extends=this&&this.__extends||function(g,y){function z(){this.constructor=g}for(var B in y)y.hasOwnProperty(B)&&(g[B]=y[B]);g.prototype=null===y?Object.create(y):(z.prototype=y.prototype,new z)},com;-(function(g){(function(y){(function(z){var B=function(){function m(c){this.RESPONSE_END="</mxfile>";this.RESPONSE_DIAGRAM_START="";this.RESPONSE_DIAGRAM_END="</diagram>";this.RESPONSE_HEADER='<?xml version="1.0" encoding="UTF-8"?><mxfile>';this.vertexMap={};this.edgeShapeMap={};this.vertexShapeMap={};this.parentsMap={};this.layerNames=[];this.debugPaths=!1;this.vsdxModel=null;this.editorUi=c;this.shapeIndexShift=0}function h(c,a,b,d,f){c=b.createLabelSubShape(c,a);null!=c&&(0!==d&&(a=c.getStyle().match(/;rotation=(\d+\.*\d+)/),-null!=a&&(d+=parseFloat(a[1])),c.setStyle(c.getStyle().replace(/;rotation=(\d+\.*\d+)/,"")+";rotation="+(60<d&&240>d?(d+180)%360:d))),d=c.getGeometry(),d.x=0,d.y=0,d.relative=!0,f=f||new mxPoint(0,0),d.offset=new mxPoint(f.x-d.width/2,f.y-d.height/2))}m.vsdxPlaceholder_$LI$=function(){null==m.vsdxPlaceholder&&(m.vsdxPlaceholder=window.atob?atob("dmlzaW8="):Base64.decode("dmlzaW8=",!0));return m.vsdxPlaceholder};m.parsererrorNS_$LI$=function(){m.parsererrorNS=mxConstants.NS_XHTML;return m.parsererrorNS};-m.parseXml=function(c){try{var a=mxUtils.parseXml(c);return 0<a.getElementsByTagNameNS(m.parsererrorNS,"parsererror").length?null:a}catch(b){return null}};m.decodeUTF16LE=function(c){for(var a="",b=0;b<c.length;b+=2)a+=String.fromCharCode(c.charCodeAt(b)|c.charCodeAt(b+1)<<8);return a};m.prototype.scaleGraph=function(c,a){if(1!==a){c=c.getModel();for(var b in c.cells){var d=c.cells[b],f=c.getGeometry(d);if(null!=f&&(this.scaleRect(f,a),this.scaleRect(f.alternateBounds,a),c.isEdge(d)&&(this.scalePoint(f.sourcePoint,-a),this.scalePoint(f.targetPoint,a),this.scalePoint(f.offset,a),d=f.points,null!=d)))for(f=0;f<d.length;f++)this.scalePoint(d[f],a)}}};m.incorrectXMLReqExp=[{regExp:/&(?!amp;|lt;|gt;|quot;|#)/g,repl:"&"}];m.prototype.decodeVsdx=function(c,a,b,d){function f(K,L,S){function R(){C++;I();L++;L==H&&f(K,L,S)}for(var H=Math.min(L+Q,K.length),N=L;N<H;N++)(function(J){function M(ca){var V=new FormData;V.append("img",ca,J.name);V.append("inputformat","emf");V.append("outputformat","png");var P=new XMLHttpRequest;+BmpDecoder.prototype.bit15=function(){var g=2*this.width%4;0!=g&&(g=4-g);for(var y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var m=(B&31)/31*255|0,h=(B>>5&31)/31*255|0,b=B>>15?255:0,a=y*this.width*4+4*z;this.data[a]=(B>>10&31)/31*255|0;this.data[a+1]=h;this.data[a+2]=m;this.data[a+3]=b}this.pos+=g}};+BmpDecoder.prototype.bit16=function(){var g=2*this.width%4;0!=g&&(g=4-g);for(var y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var m=(B&31)/31*255|0,h=(B>>5&31)/31*255|0,b=y*this.width*4+4*z;this.data[b]=(B>>10&31)/31*255|0;this.data[b+1]=h;this.data[b+2]=m;this.data[b+3]=255}this.pos+=g}};+BmpDecoder.prototype.bit24=function(){var g=3*this.width%4;0!=g&&(g=4-g);for(var y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos++],m=this.buffer[this.pos++],h=this.buffer[this.pos++],b=y*this.width*4+4*z;this.data[b]=h;this.data[b+1]=m;this.data[b+2]=B;this.data[b+3]=255}this.pos+=g}};+BmpDecoder.prototype.bit32=function(){for(var g=this.height-1;0<=g;g--)for(var y=0;y<this.width;y++){var z=this.buffer[this.pos++],B=this.buffer[this.pos++],m=this.buffer[this.pos++],h=this.buffer[this.pos++],b=g*this.width*4+4*y;this.data[b]=m;this.data[b+1]=B;this.data[b+2]=z;this.data[b+3]=h}};BmpDecoder.prototype.getData=function(){return this.data};var __extends=this&&this.__extends||function(g,y){function z(){this.constructor=g}for(var B in y)y.hasOwnProperty(B)&&(g[B]=y[B]);g.prototype=null===y?Object.create(y):(z.prototype=y.prototype,new z)},com;+(function(g){(function(y){(function(z){var B=function(){function m(b){this.RESPONSE_END="</mxfile>";this.RESPONSE_DIAGRAM_START="";this.RESPONSE_DIAGRAM_END="</diagram>";this.RESPONSE_HEADER='<?xml version="1.0" encoding="UTF-8"?><mxfile>';this.vertexMap={};this.edgeShapeMap={};this.vertexShapeMap={};this.parentsMap={};this.layerNames=[];this.debugPaths=!1;this.vsdxModel=null;this.editorUi=b;this.shapeIndexShift=0}function h(b,a,c,d,f){b=c.createLabelSubShape(b,a);null!=b&&(0!==d&&(a=b.getStyle().match(/;rotation=(\d+\.*\d+)/),+null!=a&&(d+=parseFloat(a[1])),b.setStyle(b.getStyle().replace(/;rotation=(\d+\.*\d+)/,"")+";rotation="+(60<d&&240>d?(d+180)%360:d))),d=b.getGeometry(),d.x=0,d.y=0,d.relative=!0,f=f||new mxPoint(0,0),d.offset=new mxPoint(f.x-d.width/2,f.y-d.height/2))}m.vsdxPlaceholder_$LI$=function(){null==m.vsdxPlaceholder&&(m.vsdxPlaceholder=window.atob?atob("dmlzaW8="):Base64.decode("dmlzaW8=",!0));return m.vsdxPlaceholder};m.parsererrorNS_$LI$=function(){m.parsererrorNS=mxConstants.NS_XHTML;return m.parsererrorNS};+m.parseXml=function(b){try{var a=mxUtils.parseXml(b);return 0<a.getElementsByTagNameNS(m.parsererrorNS,"parsererror").length?null:a}catch(c){return null}};m.decodeUTF16LE=function(b){for(var a="",c=0;c<b.length;c+=2)a+=String.fromCharCode(b.charCodeAt(c)|b.charCodeAt(c+1)<<8);return a};m.prototype.scaleGraph=function(b,a){if(1!==a){b=b.getModel();for(var c in b.cells){var d=b.cells[c],f=b.getGeometry(d);if(null!=f&&(this.scaleRect(f,a),this.scaleRect(f.alternateBounds,a),b.isEdge(d)&&(this.scalePoint(f.sourcePoint,+a),this.scalePoint(f.targetPoint,a),this.scalePoint(f.offset,a),d=f.points,null!=d)))for(f=0;f<d.length;f++)this.scalePoint(d[f],a)}}};m.incorrectXMLReqExp=[{regExp:/&(?!amp;|lt;|gt;|quot;|#)/g,repl:"&"}];m.prototype.decodeVsdx=function(b,a,c,d){function f(K,L,S){function R(){C++;I();L++;L==H&&f(K,L,S)}for(var H=Math.min(L+Q,K.length),N=L;N<H;N++)(function(J){function M(ca){var V=new FormData;V.append("img",ca,J.name);V.append("inputformat","emf");V.append("outputformat","png");var P=new XMLHttpRequest;P.open("POST",EMF_CONVERT_URL);P.responseType="blob";k.editorUi.addRemoteServiceSecurityCheck(P);P.onreadystatechange=mxUtils.bind(this,function(){if(4==P.readyState)if(200<=P.status&&299>=P.status)try{var ea=new FileReader;ea.readAsDataURL(P.response);ea.onloadend=function(){var Y=ea.result.indexOf(",")+1;S[J.name]=ea.result.substr(Y);R()}}catch(Y){console.log(Y),R()}else T++,3>T?M(ca):R()});P.send(V)}var T=0;J.async("blob").then(M)})(K[N])}var k=this,n={},q={},t=function(){function K(){H=H.concat(k.RESPONSE_END);a&&a(H)}for(var L=m.vsdxPlaceholder+"/document.xml",S=n[L]?n[L]:null,R=S.firstChild;null!=R&&1!=R.nodeType;)R=R.nextSibling;if(null!=R&&1==R.nodeType)k.importNodes(S,R,L,n);else return null;k.vsdxModel=new g.mxgraph.io.vsdx.mxVsdxModel(S,n,q);L=k.vsdxModel.getPages();var H=k.RESPONSE_HEADER;var N=function(ca){null==ca.entries&&(ca.entries=[]);return ca.entries}(L);m.pageTitleMap={};m.pageIdsSet={};try{for(L=0;L<N.length;L++){var J=N[L].getValue();m.pageTitleMap[J.getPageName()]=J.getPageNameU();m.pageIdsSet[J.getPageNameU()]=!0}}catch(ca){}var M=function(ca,V){var P=N[ca].getValue(),ea=T.createMxGraph();ea.getModel().beginUpdate();T.importPage(P,ea,ea.getDefaultParent(),!0);T.scaleGraph(ea,P.getPageScale()/P.getDrawingScale());ea.getModel().endUpdate();T.postImportPage(P,ea,function(){T.sanitiseGraph(ea);H=H.concat(k.RESPONSE_DIAGRAM_START);H=H.concat(k.processPage(ea,P));H=H.concat(k.RESPONSE_DIAGRAM_END);ca<N.length-1?M(ca+1,V):V()})},T=k;0<N.length?M(0,K):K()},A=0,C=0,I=function(){if(C==A)try{t()}catch(K){console.log(K),-null!=d?d(K):a("")}},Q=window.EMF_CHUNK_SIZE||10;JSZip.loadAsync(c).then(function(K){if(0==Object.keys(K.files).length)null!=d&&d();else{var L=[];K.forEach(function(S,R){var H=R.name;S=H.toLowerCase();var N=S.length;S.indexOf(".xml")==N-4||S.indexOf(".rels")==N-5?(A++,R.async("string").then(function(J){if(0!==J.length){65279==J.charCodeAt(0)&&(J=J.substring(1));var M=m.parseXml(J);if(null==M)if(0===J.charCodeAt(1)&&0===J.charCodeAt(3)&&0===J.charCodeAt(5))M=m.parseXml(m.decodeUTF16LE(J));else{for(M=+null!=d?d(K):a("")}},Q=window.EMF_CHUNK_SIZE||10;JSZip.loadAsync(b).then(function(K){if(0==Object.keys(K.files).length)null!=d&&d();else{var L=[];K.forEach(function(S,R){var H=R.name;S=H.toLowerCase();var N=S.length;S.indexOf(".xml")==N-4||S.indexOf(".rels")==N-5?(A++,R.async("string").then(function(J){if(0!==J.length){65279==J.charCodeAt(0)&&(J=J.substring(1));var M=m.parseXml(J);if(null==M)if(0===J.charCodeAt(1)&&0===J.charCodeAt(3)&&0===J.charCodeAt(5))M=m.parseXml(m.decodeUTF16LE(J));else{for(M=0;M<m.incorrectXMLReqExp.length;M++)m.incorrectXMLReqExp[M].regExp.test(J)&&(J=J.replace(m.incorrectXMLReqExp[M].regExp,m.incorrectXMLReqExp[M].repl));M=m.parseXml(J)}null!=M&&(M.vsdxFileName=H,n[H]=M)}C++;I()})):0===S.indexOf(m.vsdxPlaceholder+"/media")&&(A++,function(J,M){var T=J.length-M.length;J=J.indexOf(M,T);return-1!==J&&J===T}(S,".emf")?JSZip.support.blob&&window.EMF_CONVERT_URL?L.push(R):(C++,I()):function(J,M){var T=J.length-M.length;J=J.indexOf(M,T);return-1!==J&&J===T}(S,".bmp")?JSZip.support.uint8array&&-R.async("uint8array").then(function(J){J=new BmpDecoder(J);var M=document.createElement("canvas");M.width=J.width;M.height=J.height;M.getContext("2d").putImageData(J.imageData,0,0);J=M.toDataURL("image/jpeg");q[H]=J.substr(23);C++;I()}):R.async("base64").then(function(J){q[H]=J;C++;I()}))});f(L,0,q)}},function(K){null!=d&&d(K)})};m.prototype.createMxGraph=function(){var c=new Graph;c.setExtendParents(!1);c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=-!1;return c};m.prototype.processPage=function(c,a){c=(new mxCodec).encode(c.getModel());c.setAttribute("style","default-style2");c=mxUtils.getXml(c);var b="";if(null!=a){var d=mxUtils.htmlEntities(a.getPageName())+(a.isBackground()?" (Background)":"");a=mxUtils.htmlEntities(a.getPageNameU());b+='<diagram name="'+d+'" id="'+a.replace(/\s/g,"_")+'">'}return b+=Graph.compress(c)};m.prototype.scalePoint=function(c,a){null!=c&&(c.x*=a,c.y*=a);return c};m.prototype.scaleRect=function(c,a){null!=c&&(c.x*=-a,c.y*=a,c.height*=a,c.width*=a);return c};m.prototype.importNodes=function(c,a,b,d){var f=b.lastIndexOf("/"),k=b,n=b;if(-1!==f&&(k=b.substring(0,f),n=b.substring(f+1,b.length),b=function(C,I){return C[I]?C[I]:null}(d,k+"/_rels/"+n+".rels"),null!=b)){var q=b.getElementsByTagName("Relationship");b={};for(f=0;f<q.length;f++){n=q.item(f);var t=n.getAttribute("Id");n=n.getAttribute("Target");b[t]=n}a=a.getElementsByTagName("Rel");for(f=0;f<a.length;f++)if(q=a.item(f),n=function(C,I){return C[I]?C[I]:-null}(b,q.getAttribute("r:id")),n=k+"/"+n,null!=n&&(t=d[n]?d[n]:null,null!=t)){q=q.parentNode;for(t=t.firstChild;null!=t&&1!=t.nodeType;)t=t.nextSibling;if(null!=t&&1==t.nodeType)for(t=t.firstChild;null!=t;){if(null!=t&&1==t.nodeType){var A=q.appendChild(c.importNode(t,!0));this.importNodes(c,A,n,d)}t=t.nextSibling}}}};m.prototype.layerIndexToNames=function(c){var a=[];if(c)for(var b=0;b<c.length;b++){var d=parseInt(c[b]);d<this.layerNames.length&&a.push(this.layerNames[d])}return 0<a.length?a:[mxResources.get("background")]};-m.prototype.importPage=function(c,a,b,d){var f=c.getBackPage();if(null!=f){a.getModel().setValue(a.getDefaultParent(),c.getPageName());var k=new mxCell(f.getPageName());a.addCell(k,a.getModel().getRoot(),0,null,null);this.importPage(f,a,a.getDefaultParent())}var n=c.getLayers();k=c.getShapes();f=[];for(var q=0;q<n.length;q++){var t=n[q],A=t.Name.replace(/\s/g,"_");this.layerNames.push(A);0==t.Visible&&f.push(A)}t=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<-C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(k));k=c.getPageDimensions().y;for(q=c.getId();t.hasNext();)n=t.next(),n=n.getValue(),A=this.addShape(a,n,b,q,k),n=this.layerIndexToNames(n.layerMember),null!=A&&null!=n&&a.addTagsForCells([A],n);for(c=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(c.getConnects()));c.hasNext();)n=c.next(),n=this.addConnectedEdge(a,-n.getValue(),q,k),null!=n&&function(C,I){null==C.entries&&(C.entries=[]);for(var Q=0;Q<C.entries.length;Q++)if(null!=C.entries[Q].key.equals&&C.entries[Q].key.equals(I)||C.entries[Q].key===I)return C.entries.splice(Q,1)[0]}(this.edgeShapeMap,n);for(c=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(this.edgeShapeMap));c.hasNext();)n=c.next(),n.getKey().getPageNumber()===q&&-(t=this.addUnconnectedEdge(a,function(C,I){null==C.entries&&(C.entries=[]);for(var Q=0;Q<C.entries.length;Q++)if(null!=C.entries[Q].key.equals&&C.entries[Q].key.equals(I)||C.entries[Q].key===I)return C.entries[Q].value;return null}(this.parentsMap,n.getKey()),n.getValue(),k),n=this.layerIndexToNames(n.getValue().layerMember),null!=n&&a.addTagsForCells([t],n));if(0<this.layerNames.length){c=a.getAllTags();q=!1;for(n=0;n<this.layerNames.length;n++)if(0>mxUtils.indexOf(c,this.layerNames[n])){q=!0;break}q&&-(b=a.insertVertex(b,null,null,0,0,0,0),a.addTagsForCells([b],this.layerNames),b.setVisible(!1));a.setHiddenTags(f)}d||this.sanitiseGraph(a);return k};m.prototype.postImportPage=function(c,a,b){try{var d=function(q){if(null!=q){q=q.entries||[];for(var t=0;t<q.length;t++){var A=q[t].value||{};A.toBeCroppedImg&&k.push(A);d(A.getChildShapes())}}},f=this,k=[];d(c.getShapes());if(0<k.length){var n=function(q,t){function A(){q<k.length-1?n(q+1,t):t()}var C=k[q],I=C.toBeCroppedImg,Q=function(L,S){null==L.entries&&-(L.entries=[]);for(var R=0;R<L.entries.length;R++)if(null!=L.entries[R].key.equals&&L.entries[R].key.equals(S)||L.entries[R].key===S)return L.entries[R].value;return null}(f.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(c.Id,C.Id)),K=new Image;K.onload=function(){var L=I.iData,S=I.iType;try{var R=K.width/I.imgWidth,H=K.height/I.imgHeight,N=-I.imgOffsetX*R,J=(I.imgHeight-I.height+I.imgOffsetY)*H,M=document.createElement("canvas");M.width=I.width*R;M.height=I.height*H;var T=M.getContext("2d");T.fillStyle=-"#FFFFFF";T.fillRect(0,0,M.width,M.height);T.drawImage(K,N,J,M.width,M.height,0,0,M.width,M.height);L=M.toDataURL("image/jpeg").substr(23);S="jpg"}catch(ca){console.log(ca)}Q.style+=";image=data:image/"+S+","+L;A()};K.src="data:image/"+I.iType+";base64,"+I.iData;K.onerror=function(){Q.style+=";image=data:image/"+I.iType+","+I.iData;A()}};n(0,b)}else b()}catch(q){console.log(q),b()}};m.prototype.addShape=function(c,a,b,d,f){a.parentHeight=f;var k=g.mxgraph.io.vsdx.VsdxShape.getType(a.getShape());if(null!=-k&&(function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var n=a.getId();if(a.isVertex()){k=null;k=a.isGroup()?this.addGroup(c,a,b,d,f):this.addVertex(c,a,b,d,f);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=-q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);b=a.getHyperlink();b.pageLink?(d=b.pageLink,m.pageIdsSet[d]||null==m.pageTitleMap[d]||(d=m.pageTitleMap[d]+""),c.setLinkForCell(k,"data:page/id,"+d.replace(/\s/g,"_"))):b.extLink&&c.setLinkForCell(k,b.extLink);a=a.getProperties();-for(b=0;b<a.length;b++)try{c.setAttributeForCell(k,a[b].key,a[b].val)}catch(q){console.log('Attribute: "',a[b].key,'" with value "',a[b].val,'" not allowed in HTML')}return k}a.isGroup()&&this.addGroup(c,a,b,d,f,!0);a.setShapeIndex(c.getModel().getChildCount(b));(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},-getValue:function(){return this.value}})})(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),b)}return null};m.prototype.addGroup=function(c,-a,b,d,f,k){var n=a.getDimensions(),q=a.getMaster(),t=a.getStyleFromShape(),A=a.getGeomList();if(A.isNoFill()||k)t[mxConstants.STYLE_FILLCOLOR]="none",t[mxConstants.STYLE_GRADIENTCOLOR]="none";if(A.isNoLine()||k)t[mxConstants.STYLE_STROKECOLOR]="none";t.html="1";t[mxConstants.STYLE_WHITE_SPACE]="wrap";var C=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(t,"=");k=null;A=a.getChildShapes();k=null!=A&&0<function(K){null==K.entries&&(K.entries=[]);return K.entries.length}(A);t=a.isDisplacedLabel()||a.isRotatedLabel()||-k;k=a.getOriginPoint(f,!0);if(t)k=c.insertVertex(b,null,null,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),C);else{var I=a.noLabelGroup?null:a.getTextLabel();k=c.insertVertex(b,null,I,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),C)}b=k.geometry.height;for(A=function(K){var L=0;return{next:function(){return L<+R.async("uint8array").then(function(J){J=new BmpDecoder(J);var M=document.createElement("canvas");M.width=J.width;M.height=J.height;M.getContext("2d").putImageData(J.imageData,0,0);J=M.toDataURL("image/jpeg");q[H]=J.substr(23);C++;I()}):R.async("base64").then(function(J){q[H]=J;C++;I()}))});f(L,0,q)}},function(K){null!=d&&d(K)})};m.prototype.createMxGraph=function(){var b=new Graph;b.setExtendParents(!1);b.setExtendParentsOnAdd(!1);b.setConstrainChildren(!1);b.setHtmlLabels(!0);b.getModel().maintainEdgeParent=+!1;return b};m.prototype.processPage=function(b,a){b=(new mxCodec).encode(b.getModel());b.setAttribute("style","default-style2");b=mxUtils.getXml(b);var c="";if(null!=a){var d=mxUtils.htmlEntities(a.getPageName())+(a.isBackground()?" (Background)":"");a=mxUtils.htmlEntities(a.getPageNameU());c+='<diagram name="'+d+'" id="'+a.replace(/\s/g,"_")+'">'}return c+=Graph.compress(b)};m.prototype.scalePoint=function(b,a){null!=b&&(b.x*=a,b.y*=a);return b};m.prototype.scaleRect=function(b,a){null!=b&&(b.x*=+a,b.y*=a,b.height*=a,b.width*=a);return b};m.prototype.importNodes=function(b,a,c,d){var f=c.lastIndexOf("/"),k=c,n=c;if(-1!==f&&(k=c.substring(0,f),n=c.substring(f+1,c.length),c=function(C,I){return C[I]?C[I]:null}(d,k+"/_rels/"+n+".rels"),null!=c)){var q=c.getElementsByTagName("Relationship");c={};for(f=0;f<q.length;f++){n=q.item(f);var t=n.getAttribute("Id");n=n.getAttribute("Target");c[t]=n}a=a.getElementsByTagName("Rel");for(f=0;f<a.length;f++)if(q=a.item(f),n=function(C,I){return C[I]?C[I]:+null}(c,q.getAttribute("r:id")),n=k+"/"+n,null!=n&&(t=d[n]?d[n]:null,null!=t)){q=q.parentNode;for(t=t.firstChild;null!=t&&1!=t.nodeType;)t=t.nextSibling;if(null!=t&&1==t.nodeType)for(t=t.firstChild;null!=t;){if(null!=t&&1==t.nodeType){var A=q.appendChild(b.importNode(t,!0));this.importNodes(b,A,n,d)}t=t.nextSibling}}}};m.prototype.layerIndexToNames=function(b){var a=[];if(b)for(var c=0;c<b.length;c++){var d=parseInt(b[c]);d<this.layerNames.length&&a.push(this.layerNames[d])}return 0<a.length?a:[mxResources.get("background")]};+m.prototype.importPage=function(b,a,c,d){var f=b.getBackPage();if(null!=f){a.getModel().setValue(a.getDefaultParent(),b.getPageName());var k=new mxCell(f.getPageName());a.addCell(k,a.getModel().getRoot(),0,null,null);this.importPage(f,a,a.getDefaultParent())}var n=b.getLayers();k=b.getShapes();f=[];for(var q=0;q<n.length;q++){var t=n[q],A=t.Name.replace(/\s/g,"_");this.layerNames.push(A);0==t.Visible&&f.push(A)}t=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<+C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(k));k=b.getPageDimensions().y;for(q=b.getId();t.hasNext();)n=t.next(),n=n.getValue(),A=this.addShape(a,n,c,q,k),n=this.layerIndexToNames(n.layerMember),null!=A&&null!=n&&a.addTagsForCells([A],n);for(b=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(b.getConnects()));b.hasNext();)n=b.next(),n=this.addConnectedEdge(a,+n.getValue(),q,k),null!=n&&function(C,I){null==C.entries&&(C.entries=[]);for(var Q=0;Q<C.entries.length;Q++)if(null!=C.entries[Q].key.equals&&C.entries[Q].key.equals(I)||C.entries[Q].key===I)return C.entries.splice(Q,1)[0]}(this.edgeShapeMap,n);for(b=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(this.edgeShapeMap));b.hasNext();)n=b.next(),n.getKey().getPageNumber()===q&&+(t=this.addUnconnectedEdge(a,function(C,I){null==C.entries&&(C.entries=[]);for(var Q=0;Q<C.entries.length;Q++)if(null!=C.entries[Q].key.equals&&C.entries[Q].key.equals(I)||C.entries[Q].key===I)return C.entries[Q].value;return null}(this.parentsMap,n.getKey()),n.getValue(),k),n=this.layerIndexToNames(n.getValue().layerMember),null!=n&&a.addTagsForCells([t],n));if(0<this.layerNames.length){b=a.getAllTags();q=!1;for(n=0;n<this.layerNames.length;n++)if(0>mxUtils.indexOf(b,this.layerNames[n])){q=!0;break}q&&+(c=a.insertVertex(c,null,null,0,0,0,0),a.addTagsForCells([c],this.layerNames),c.setVisible(!1));a.setHiddenTags(f)}d||this.sanitiseGraph(a);return k};m.prototype.postImportPage=function(b,a,c){try{var d=function(q){if(null!=q){q=q.entries||[];for(var t=0;t<q.length;t++){var A=q[t].value||{};A.toBeCroppedImg&&k.push(A);d(A.getChildShapes())}}},f=this,k=[];d(b.getShapes());if(0<k.length){var n=function(q,t){function A(){q<k.length-1?n(q+1,t):t()}var C=k[q],I=C.toBeCroppedImg,Q=function(L,S){null==L.entries&&+(L.entries=[]);for(var R=0;R<L.entries.length;R++)if(null!=L.entries[R].key.equals&&L.entries[R].key.equals(S)||L.entries[R].key===S)return L.entries[R].value;return null}(f.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b.Id,C.Id)),K=new Image;K.onload=function(){var L=I.iData,S=I.iType;try{var R=K.width/I.imgWidth,H=K.height/I.imgHeight,N=-I.imgOffsetX*R,J=(I.imgHeight-I.height+I.imgOffsetY)*H,M=document.createElement("canvas");M.width=I.width*R;M.height=I.height*H;var T=M.getContext("2d");T.fillStyle=+"#FFFFFF";T.fillRect(0,0,M.width,M.height);T.drawImage(K,N,J,M.width,M.height,0,0,M.width,M.height);L=M.toDataURL("image/jpeg").substr(23);S="jpg"}catch(ca){console.log(ca)}Q.style+=";image=data:image/"+S+","+L;A()};K.src="data:image/"+I.iType+";base64,"+I.iData;K.onerror=function(){Q.style+=";image=data:image/"+I.iType+","+I.iData;A()}};n(0,c)}else c()}catch(q){console.log(q),c()}};m.prototype.addShape=function(b,a,c,d,f){a.parentHeight=f;var k=g.mxgraph.io.vsdx.VsdxShape.getType(a.getShape());if(null!=+k&&(function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var n=a.getId();if(a.isVertex()){k=null;k=a.isGroup()?this.addGroup(b,a,c,d,f):this.addVertex(b,a,c,d,f);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=+q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);c=a.getHyperlink();c.pageLink?(d=c.pageLink,m.pageIdsSet[d]||null==m.pageTitleMap[d]||(d=m.pageTitleMap[d]+""),b.setLinkForCell(k,"data:page/id,"+d.replace(/\s/g,"_"))):c.extLink&&b.setLinkForCell(k,c.extLink);a=a.getProperties();+for(c=0;c<a.length;c++)try{b.setAttributeForCell(k,a[c].key,a[c].val)}catch(q){console.log('Attribute: "',a[c].key,'" with value "',a[c].val,'" not allowed in HTML')}return k}a.isGroup()&&this.addGroup(b,a,c,d,f,!0);a.setShapeIndex(b.getModel().getChildCount(c));(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},+getValue:function(){return this.value}})})(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),c)}return null};m.prototype.addGroup=function(b,+a,c,d,f,k){var n=a.getDimensions(),q=a.getMaster(),t=a.getStyleFromShape(),A=a.getGeomList();if(A.isNoFill()||k)t[mxConstants.STYLE_FILLCOLOR]="none",t[mxConstants.STYLE_GRADIENTCOLOR]="none";if(A.isNoLine()||k)t[mxConstants.STYLE_STROKECOLOR]="none";t.html="1";t[mxConstants.STYLE_WHITE_SPACE]="wrap";var C=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(t,"=");k=null;A=a.getChildShapes();k=null!=A&&0<function(K){null==K.entries&&(K.entries=[]);return K.entries.length}(A);t=a.isDisplacedLabel()||a.isRotatedLabel()||+k;k=a.getOriginPoint(f,!0);if(t)k=b.insertVertex(c,null,null,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),C);else{var I=a.noLabelGroup?null:a.getTextLabel();k=b.insertVertex(c,null,I,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),C)}c=k.geometry.height;for(A=function(K){var L=0;return{next:function(){return L<K.length?K[L++]:null},hasNext:function(){return L<K.length}}}(function(K){null==K.entries&&(K.entries=[]);return K.entries}(A));A.hasNext();)if(C=A.next().getValue(),I=C.getId(),C.isVertex()){var Q=g.mxgraph.io.vsdx.VsdxShape.getType(C.getShape());null!=Q&&(function(K,L){return K&&K.equals?K.equals(L):K===L}(Q,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(K,L){return K&&K.equals?K.equals(L):K===L}(Q,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(K,L){return K&&K.equals?K.equals(L):-K===L}(Q,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&C.isVertex()&&(C.propagateRotation(a.getRotation()),(Q=C.isGroup()?this.addGroup(c,C,k,d,n.y):this.addVertex(c,C,k,d,n.y))&&Q.geometry&&(b=Math.max(Q.geometry.height,b)));null==q&&function(K,L,S){null==K.entries&&(K.entries=[]);for(var R=0;R<K.entries.length;R++)if(null!=K.entries[R].key.equals&&K.entries[R].key.equals(L)||K.entries[R].key===L){K.entries[R].value=S;return}K.entries.push({key:L,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,+K===L}(Q,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&C.isVertex()&&(C.propagateRotation(a.getRotation()),(Q=C.isGroup()?this.addGroup(b,C,k,d,n.y):this.addVertex(b,C,k,d,n.y))&&Q.geometry&&(c=Math.max(Q.geometry.height,c)));null==q&&function(K,L,S){null==K.entries&&(K.entries=[]);for(var R=0;R<K.entries.length;R++)if(null!=K.entries[R].key.equals&&K.entries[R].key.equals(L)||K.entries[R].key===L){K.entries[R].value=S;return}K.entries.push({key:L,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),C)}else null==q?(function(K,L,S){null==K.entries&&(K.entries=[]);for(var R=0;R<K.entries.length;R++)if(null!=K.entries[R].key.equals&&K.entries[R].key.equals(L)||K.entries[R].key===L){K.entries[R].value=S;return}K.entries.push({key:L,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),C),function(K,L,S){null==K.entries&&(K.entries=[]);for(var R=0;R<K.entries.length;R++)if(null!=-K.entries[R].key.equals&&K.entries[R].key.equals(L)||K.entries[R].key===L){K.entries[R].value=S;return}K.entries.push({key:L,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),k)):this.addUnconnectedEdge(c,k,C,f);if(k.children&&0==k.geometry.height&&0<b)for(k.geometry.height=b,f=0;f<k.children.length;f++)n=k.children[f],n.geometry&&(n.geometry.y+=b);t&&a.createLabelSubShape(c,k);c=a.getRotation();if(0!==c)for(f=-k.getGeometry(),q=f.width/2,t=f.height/2,f=0;f<k.getChildCount();f++)n=k.getChildAt(f),g.mxgraph.online.Utils.rotatedGeometry(n.getGeometry(),c,q,t);(function(K,L,S){null==K.entries&&(K.entries=[]);for(var R=0;R<K.entries.length;R++)if(null!=K.entries[R].key.equals&&K.entries[R].key.equals(L)||K.entries[R].key===L){K.entries[R].value=S;return}K.entries.push({key:L,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,-a.getId()),k);return k};m.rotatedEdgePoint=function(c,a,b,d){a=a*Math.PI/180;var f=Math.cos(a);a=Math.sin(a);var k=c.x-b,n=c.y-d;c.x=Math.round(k*f-n*a+b);c.y=Math.round(n*f+k*a+d)};m.prototype.addVertex=function(c,a,b,d,f){var k="",n=a.isDisplacedLabel()||a.isRotatedLabel();n||(k=a.getTextLabel());var q=a.getDimensions(),t=a.getStyleFromShape();t.html="1";var A=t.hasOwnProperty(mxConstants.STYLE_SHAPE)||t.hasOwnProperty("stencil");t.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&A||(t[mxConstants.STYLE_FILLCOLOR]=-"none");A||(t[mxConstants.STYLE_STROKECOLOR]="none");t.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&A||(t[mxConstants.STYLE_GRADIENTCOLOR]="none");t[mxConstants.STYLE_WHITE_SPACE]="wrap";f=a.getOriginPoint(f,!0);return A||null!=k?(t=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(t,"="),A=null,A=n?c.insertVertex(b,null,null,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*q.x)/100),Math.floor(Math.round(100*q.y)/100),t):c.insertVertex(b,null,k,Math.floor(Math.round(100*+K.entries[R].key.equals&&K.entries[R].key.equals(L)||K.entries[R].key===L){K.entries[R].value=S;return}K.entries.push({key:L,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),k)):this.addUnconnectedEdge(b,k,C,f);if(k.children&&0==k.geometry.height&&0<c)for(k.geometry.height=c,f=0;f<k.children.length;f++)n=k.children[f],n.geometry&&(n.geometry.y+=c);t&&a.createLabelSubShape(b,k);b=a.getRotation();if(0!==b)for(f=+k.getGeometry(),q=f.width/2,t=f.height/2,f=0;f<k.getChildCount();f++)n=k.getChildAt(f),g.mxgraph.online.Utils.rotatedGeometry(n.getGeometry(),b,q,t);(function(K,L,S){null==K.entries&&(K.entries=[]);for(var R=0;R<K.entries.length;R++)if(null!=K.entries[R].key.equals&&K.entries[R].key.equals(L)||K.entries[R].key===L){K.entries[R].value=S;return}K.entries.push({key:L,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,+a.getId()),k);return k};m.rotatedEdgePoint=function(b,a,c,d){a=a*Math.PI/180;var f=Math.cos(a);a=Math.sin(a);var k=b.x-c,n=b.y-d;b.x=Math.round(k*f-n*a+c);b.y=Math.round(n*f+k*a+d)};m.prototype.addVertex=function(b,a,c,d,f){var k="",n=a.isDisplacedLabel()||a.isRotatedLabel();n||(k=a.getTextLabel());var q=a.getDimensions(),t=a.getStyleFromShape();t.html="1";var A=t.hasOwnProperty(mxConstants.STYLE_SHAPE)||t.hasOwnProperty("stencil");t.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&A||(t[mxConstants.STYLE_FILLCOLOR]=+"none");A||(t[mxConstants.STYLE_STROKECOLOR]="none");t.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&A||(t[mxConstants.STYLE_GRADIENTCOLOR]="none");t[mxConstants.STYLE_WHITE_SPACE]="wrap";f=a.getOriginPoint(f,!0);return A||null!=k?(t=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(t,"="),A=null,A=n?b.insertVertex(c,null,null,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*q.x)/100),Math.floor(Math.round(100*q.y)/100),t):b.insertVertex(c,null,k,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*q.x)/100),Math.floor(Math.round(100*q.y)/100),t),function(C,I,Q){null==C.entries&&(C.entries=[]);for(var K=0;K<C.entries.length;K++)if(null!=C.entries[K].key.equals&&C.entries[K].key.equals(I)||C.entries[K].key===I){C.entries[K].value=Q;return}C.entries.push({key:I,value:Q,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,a.getId()),A),a.setLabelOffset(A,-t),n&&a.createLabelSubShape(c,A),A):null};m.calculateAbsolutePoint=function(c){for(var a=0,b=0;null!=c;){var d=c.geometry;null!=d&&(a+=d.x,b+=d.y);c=c.parent}return new mxPoint(a,b)};m.prototype.processEdgeGeo=function(c,a){try{var b=c.geomList.geomList[0].rows;for(c=0;c<b.length;c++)if(b[c]instanceof g.mxgraph.io.vsdx.geometry.ArcTo){a.style+="jumpStyle=arc;";break}for(c=0;c<b.length;c++);}catch(d){}};m.prototype.addConnectedEdge=function(c,a,b,d){var f=a.getFromSheet();f=new g.mxgraph.io.vsdx.ShapePageId(b,-f);var k=function(H,N){null==H.entries&&(H.entries=[]);for(var J=0;J<H.entries.length;J++)if(null!=H.entries[J].key.equals&&H.entries[J].key.equals(N)||H.entries[J].key===N)return H.entries[J].value;return null}(this.edgeShapeMap,f);if(null==k)return null;var n=function(H,N){null==H.entries&&(H.entries=[]);for(var J=0;J<H.entries.length;J++)if(null!=H.entries[J].key.equals&&H.entries[J].key.equals(N)||H.entries[J].key===N)return H.entries[J].value;return null}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(b,-k.getId()));if(null!=n){var q=c.getModel().getGeometry(n);null!=q&&(d=q.height)}var t=k.getStartXY(d),A=k.getEndXY(d);q=k.getRoutingPoints(d,t,k.getRotation());this.rotateChildEdge(c.getModel(),n,t,A,q);var C=null,I=a.getSourceToSheet();I=null!=I?function(H,N){null==H.entries&&(H.entries=[]);for(var J=0;J<H.entries.length;J++)if(null!=H.entries[J].key.equals&&H.entries[J].key.equals(N)||H.entries[J].key===N)return H.entries[J].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,-I)):null;var Q=!0;if(null==I||0==I.geometry.width||0==I.geometry.height)I=c.insertVertex(n,null,null,Math.floor(Math.round(100*t.x)/100),Math.floor(Math.round(100*t.y)/100),0,0);else if(I.style&&-1==I.style.indexOf(";rotation=")){C=m.calculateAbsolutePoint(I);var K=m.calculateAbsolutePoint(n),L=I.geometry;C=new mxPoint((K.x+t.x-C.x)/L.width,(K.y+t.y-C.y)/L.height)}else Q=!1;t=null;a=a.getTargetToSheet();a=null!=a?function(H,N){null==H.entries&&(H.entries=[]);for(var J=0;J<H.entries.length;J++)if(null!=-H.entries[J].key.equals&&H.entries[J].key.equals(N)||H.entries[J].key===N)return H.entries[J].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,a)):null;K=!0;null==a||0==a.geometry.width||0==a.geometry.height?a=c.insertVertex(n,null,null,Math.floor(Math.round(100*A.x)/100),Math.floor(Math.round(100*A.y)/100),0,0):a.style&&-1==a.style.indexOf(";rotation=")?(b=m.calculateAbsolutePoint(a),t=m.calculateAbsolutePoint(n),L=a.geometry,t=new mxPoint((t.x+A.x-b.x)/L.width,(t.y+A.y-b.y)/-L.height)):K=!1;b=k.getStyleFromEdgeShape(d);L=k.getRotation();A="";var S=k.isDisplacedLabel()||k.isRotatedLabel()||0!==L,R=k.getLblEdgeOffset(c.getView(),q);S||(A=k.getTextLabel(!0));A=c.insertEdge(n,null,A,I,a,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,"="));S?h(c,A,k,L,R):A.getGeometry().offset=R;null!=C&&c.setConnectionConstraint(A,I,!0,new mxConnectionConstraint(C,!1));Q&&q.shift();null!=t&&c.setConnectionConstraint(A,a,!1,new mxConnectionConstraint(t,!1));K&&q.pop();Q=c.getModel().getGeometry(A);-if(I.parent!=a.parent&&null!=n&&1!=n.id&&1==I.parent.id){a=C=0;do t=n.geometry,null!=t&&(C+=t.x,a+=t.y),n=n.parent;while(null!=n);A.parent=I.parent;for(n=0;n<q.length;n++)q[n].x+=C,q[n].y+=a}Q.points=q;b.hasOwnProperty("curved")&&function(H,N){return H&&H.equals?H.equals(N):H===N}(function(H,N){return H[N]?H[N]:null}(b,"curved"),"1")&&(Q=c.getModel().getGeometry(A),d=k.getControlPoints(d),Q.points=d);this.processEdgeGeo(k,A);k=this.layerIndexToNames(k.layerMember);null!=k&&c.addTagsForCells([A],k);-return f};m.prototype.addUnconnectedEdge=function(c,a,b,d){if(null!=a){var f=c.getModel().getGeometry(a);null!=f&&(d=f.height)}f=b.getStartXY(d);var k=b.getEndXY(d),n=b.getStyleFromEdgeShape(d),q=b.getRoutingPoints(d,f,b.getRotation()),t=b.getRotation();var A="";var C=b.isDisplacedLabel()||b.isRotatedLabel()||0!==t,I=b.getLblEdgeOffset(c.getView(),q);C||(A=b.getTextLabel(!0));0===b.getShapeIndex()?A=c.insertEdge(a,null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")):(A=c.createEdge(a,-null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")),A=c.addEdge(A,a,null,null,b.getShapeIndex()+this.shapeIndexShift++));C?h(c,A,b,t,I):A.getGeometry().offset=I;this.rotateChildEdge(c.getModel(),a,f,k,q);a=c.getModel().getGeometry(A);q.pop();q.shift();a.points=q;a.setTerminalPoint(f,!0);a.setTerminalPoint(k,!1);n.hasOwnProperty("curved")&&function(Q,K){return Q&&Q.equals?Q.equals(K):Q===K}(function(Q,K){return Q[K]?Q[K]:null}(n,"curved"),"1")&&(a=c.getModel().getGeometry(A),c=b.getControlPoints(d),-a.points=c);this.processEdgeGeo(b,A);return A};m.prototype.rotateChildEdge=function(c,a,b,d,f){if(null!=a){var k=c.getGeometry(a);c=c.getStyle(a);if(null!=k&&null!=c&&(a=c.indexOf("rotation="),-1<a))for(c=parseFloat(c.substring(a+9,c.indexOf(";",a))),a=k.width/2,k=k.height/2,m.rotatedEdgePoint(b,c,a,k),m.rotatedEdgePoint(d,c,a,k),b=0;b<f.length;b++)m.rotatedEdgePoint(f[b],c,a,k)}};m.prototype.sanitiseGraph=function(c){var a=c.getModel().getRoot();this.sanitiseCell(c,a)};m.prototype.sanitiseCell=function(c,-a){for(var b=c.getModel(),d=b.getChildCount(a),f=[],k=0;k<d;k++){var n=b.getChildAt(a,k);this.sanitiseCell(c,n)&&f.push(n)}for(c=0;c<f.length;c++)b.remove(f[c]);f=a.geometry;null!=f&&(0>f.height&&(f.height=Math.abs(f.height),f.y-=f.height,a.style+=";flipV=1;"),0>f.width&&(f.width=Math.abs(f.width),f.x-=f.width,a.style+=";flipH=1;"));0<d&&(d=b.getChildCount(a));f=(new String(b.getValue(a))).toString();c=b.getStyle(a);return 0!==d||!b.isVertex(a)||null!=b.getValue(a)&&0!==f.length||null==c||-1==c.indexOf(mxConstants.STYLE_FILLCOLOR+-"=none")||-1==c.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=c.indexOf("image=")?!1:!0};return m}();z.mxVsdxCodec=B;B.__class="com.mxgraph.io.mxVsdxCodec"})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){var B=function(m){function h(c){var a=m.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=c;return a}__extends(h,m);h.prototype.decodeVssx=function(c,a,b,d){var f=this,k="<mxlibrary>[";this.decodeVsdx(c,function(n){k=k.concat(n);var q=f.vsdxModel.getMasterShapes(),t=function(L){var S=0;return{next:function(){return S<L.length?L[S++]:null},hasNext:function(){return S<L.length}}}(function(L){var S=+t),n&&a.createLabelSubShape(b,A),A):null};m.calculateAbsolutePoint=function(b){for(var a=0,c=0;null!=b;){var d=b.geometry;null!=d&&(a+=d.x,c+=d.y);b=b.parent}return new mxPoint(a,c)};m.prototype.processEdgeGeo=function(b,a){try{var c=b.geomList.geomList[0].rows;for(b=0;b<c.length;b++)if(c[b]instanceof g.mxgraph.io.vsdx.geometry.ArcTo){a.style+="jumpStyle=arc;";break}for(b=0;b<c.length;b++);}catch(d){}};m.prototype.addConnectedEdge=function(b,a,c,d){var f=a.getFromSheet();f=new g.mxgraph.io.vsdx.ShapePageId(c,+f);var k=function(H,N){null==H.entries&&(H.entries=[]);for(var J=0;J<H.entries.length;J++)if(null!=H.entries[J].key.equals&&H.entries[J].key.equals(N)||H.entries[J].key===N)return H.entries[J].value;return null}(this.edgeShapeMap,f);if(null==k)return null;var n=function(H,N){null==H.entries&&(H.entries=[]);for(var J=0;J<H.entries.length;J++)if(null!=H.entries[J].key.equals&&H.entries[J].key.equals(N)||H.entries[J].key===N)return H.entries[J].value;return null}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(c,+k.getId()));if(null!=n){var q=b.getModel().getGeometry(n);null!=q&&(d=q.height)}var t=k.getStartXY(d),A=k.getEndXY(d);q=k.getRoutingPoints(d,t,k.getRotation());this.rotateChildEdge(b.getModel(),n,t,A,q);var C=null,I=a.getSourceToSheet();I=null!=I?function(H,N){null==H.entries&&(H.entries=[]);for(var J=0;J<H.entries.length;J++)if(null!=H.entries[J].key.equals&&H.entries[J].key.equals(N)||H.entries[J].key===N)return H.entries[J].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(c,+I)):null;var Q=!0;if(null==I||0==I.geometry.width||0==I.geometry.height)I=b.insertVertex(n,null,null,Math.floor(Math.round(100*t.x)/100),Math.floor(Math.round(100*t.y)/100),0,0);else if(I.style&&-1==I.style.indexOf(";rotation=")){C=m.calculateAbsolutePoint(I);var K=m.calculateAbsolutePoint(n),L=I.geometry;C=new mxPoint((K.x+t.x-C.x)/L.width,(K.y+t.y-C.y)/L.height)}else Q=!1;t=null;a=a.getTargetToSheet();a=null!=a?function(H,N){null==H.entries&&(H.entries=[]);for(var J=0;J<H.entries.length;J++)if(null!=+H.entries[J].key.equals&&H.entries[J].key.equals(N)||H.entries[J].key===N)return H.entries[J].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(c,a)):null;K=!0;null==a||0==a.geometry.width||0==a.geometry.height?a=b.insertVertex(n,null,null,Math.floor(Math.round(100*A.x)/100),Math.floor(Math.round(100*A.y)/100),0,0):a.style&&-1==a.style.indexOf(";rotation=")?(c=m.calculateAbsolutePoint(a),t=m.calculateAbsolutePoint(n),L=a.geometry,t=new mxPoint((t.x+A.x-c.x)/L.width,(t.y+A.y-c.y)/+L.height)):K=!1;c=k.getStyleFromEdgeShape(d);L=k.getRotation();A="";var S=k.isDisplacedLabel()||k.isRotatedLabel()||0!==L,R=k.getLblEdgeOffset(b.getView(),q);S||(A=k.getTextLabel(!0));A=b.insertEdge(n,null,A,I,a,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(c,"="));S?h(b,A,k,L,R):A.getGeometry().offset=R;null!=C&&b.setConnectionConstraint(A,I,!0,new mxConnectionConstraint(C,!1));Q&&q.shift();null!=t&&b.setConnectionConstraint(A,a,!1,new mxConnectionConstraint(t,!1));K&&q.pop();Q=b.getModel().getGeometry(A);+if(I.parent!=a.parent&&null!=n&&1!=n.id&&1==I.parent.id){a=C=0;do t=n.geometry,null!=t&&(C+=t.x,a+=t.y),n=n.parent;while(null!=n);A.parent=I.parent;for(n=0;n<q.length;n++)q[n].x+=C,q[n].y+=a}Q.points=q;c.hasOwnProperty("curved")&&function(H,N){return H&&H.equals?H.equals(N):H===N}(function(H,N){return H[N]?H[N]:null}(c,"curved"),"1")&&(Q=b.getModel().getGeometry(A),d=k.getControlPoints(d),Q.points=d);this.processEdgeGeo(k,A);k=this.layerIndexToNames(k.layerMember);null!=k&&b.addTagsForCells([A],k);+return f};m.prototype.addUnconnectedEdge=function(b,a,c,d){if(null!=a){var f=b.getModel().getGeometry(a);null!=f&&(d=f.height)}f=c.getStartXY(d);var k=c.getEndXY(d),n=c.getStyleFromEdgeShape(d),q=c.getRoutingPoints(d,f,c.getRotation()),t=c.getRotation();var A="";var C=c.isDisplacedLabel()||c.isRotatedLabel()||0!==t,I=c.getLblEdgeOffset(b.getView(),q);C||(A=c.getTextLabel(!0));0===c.getShapeIndex()?A=b.insertEdge(a,null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")):(A=b.createEdge(a,+null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")),A=b.addEdge(A,a,null,null,c.getShapeIndex()+this.shapeIndexShift++));C?h(b,A,c,t,I):A.getGeometry().offset=I;this.rotateChildEdge(b.getModel(),a,f,k,q);a=b.getModel().getGeometry(A);q.pop();q.shift();a.points=q;a.setTerminalPoint(f,!0);a.setTerminalPoint(k,!1);n.hasOwnProperty("curved")&&function(Q,K){return Q&&Q.equals?Q.equals(K):Q===K}(function(Q,K){return Q[K]?Q[K]:null}(n,"curved"),"1")&&(a=b.getModel().getGeometry(A),b=c.getControlPoints(d),+a.points=b);this.processEdgeGeo(c,A);return A};m.prototype.rotateChildEdge=function(b,a,c,d,f){if(null!=a){var k=b.getGeometry(a);b=b.getStyle(a);if(null!=k&&null!=b&&(a=b.indexOf("rotation="),-1<a))for(b=parseFloat(b.substring(a+9,b.indexOf(";",a))),a=k.width/2,k=k.height/2,m.rotatedEdgePoint(c,b,a,k),m.rotatedEdgePoint(d,b,a,k),c=0;c<f.length;c++)m.rotatedEdgePoint(f[c],b,a,k)}};m.prototype.sanitiseGraph=function(b){var a=b.getModel().getRoot();this.sanitiseCell(b,a)};m.prototype.sanitiseCell=function(b,+a){for(var c=b.getModel(),d=c.getChildCount(a),f=[],k=0;k<d;k++){var n=c.getChildAt(a,k);this.sanitiseCell(b,n)&&f.push(n)}for(b=0;b<f.length;b++)c.remove(f[b]);f=a.geometry;null!=f&&(0>f.height&&(f.height=Math.abs(f.height),f.y-=f.height,a.style+=";flipV=1;"),0>f.width&&(f.width=Math.abs(f.width),f.x-=f.width,a.style+=";flipH=1;"));0<d&&(d=c.getChildCount(a));f=(new String(c.getValue(a))).toString();b=c.getStyle(a);return 0!==d||!c.isVertex(a)||null!=c.getValue(a)&&0!==f.length||null==b||-1==b.indexOf(mxConstants.STYLE_FILLCOLOR++"=none")||-1==b.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=b.indexOf("image=")?!1:!0};return m}();z.mxVsdxCodec=B;B.__class="com.mxgraph.io.mxVsdxCodec"})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){var B=function(m){function h(b){var a=m.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=b;return a}__extends(h,m);h.prototype.decodeVssx=function(b,a,c,d){var f=this,k="<mxlibrary>[";this.decodeVsdx(b,function(n){k=k.concat(n);var q=f.vsdxModel.getMasterShapes(),t=function(L){var S=0;return{next:function(){return S<L.length?L[S++]:null},hasNext:function(){return S<L.length}}}(function(L){var S=[];null==L.entries&&(L.entries=[]);for(var R=0;R<L.entries.length;R++)S.push(L.entries[R].value);return S}(f.vsdxModel.getPages())).next();if(null!=q){var A={str:"",toString:function(){return this.str}},C=0===n.length?"":",",I=function(L){return Object.keys(L).map(function(S){return L[S]})}(q);n=function(L){L=I[L];var S=Q.createMxGraph(),R=1;if(null!=L.pageSheet){var H=R=1,N=L.pageSheet.DrawingScale;null!=N&&(R=parseFloat(N.getAttribute("V"))||1);N=L.pageSheet.PageScale;null!=N&&(H=parseFloat(N.getAttribute("V"))||1);R=H/R}H=!1;for(N=0;null!=L.firstLevelShapes&&N<L.firstLevelShapes.length;N++){var J=L.firstLevelShapes[N].getShape(),M=new g.mxgraph.io.vsdx.VsdxShape(t,J,!t.isEdge(J),q,null,Q.vsdxModel);J=null;if(M.isVertex()){Q.edgeShapeMap.entries=[];Q.parentsMap.entries=[];J=Q.addShape(S,M,S.getDefaultParent(),0,1169);M=function(P){null==P.entries&&(P.entries=[]);return P.entries}(Q.edgeShapeMap);for(var T=0;T<M.length;T++){var ca=M[T],V=function(P,ea){null==P.entries&&(P.entries=[]);for(var Y=0;Y<P.entries.length;Y++)if(null!=P.entries[Y].key.equals&&P.entries[Y].key.equals(ea)||P.entries[Y].key===ea)return P.entries[Y].value;return null}(Q.parentsMap,ca.getKey());Q.addUnconnectedEdge(S,V,ca.getValue(),1169)}}else J=Q.addUnconnectedEdge(S,null,M,1169);H|=null!=J}if(H){Q.scaleGraph(S,R);R=Q.normalizeGraph(S);Q.sanitiseGraph(S);if(0===S.getModel().getChildCount(S.getDefaultParent()))return"continue";A.str=A.str.concat(C);A.str=A.str.concat('{"xml":"');S=m.prototype.processPage.call(Q,S,null);A.str=A.str.concat(S);A.str=-A.str.concat('","w":');A.str=A.str.concat(R.width);A.str=A.str.concat(',"h":');A.str=A.str.concat(R.height);A.str=A.str.concat(',"title":');L=L.getName();null==L&&(L="");L=mxUtils.htmlEntities(JSON.stringify(L));A.str=A.str.concat(L);A.str=A.str.concat("}");C=","}};for(var Q=f,K=0;K<I.length;K++)n(K);k=k.concat(A)}k=k.concat("]</mxlibrary>");if(a)try{a(k)}catch(L){null!=d?d(L):a("")}},b)};h.prototype.normalizeGeo=function(c){var a=c.getGeometry();a.x=0;a.y=0;var b=a.sourcePoint;if(c.isEdge()&&null!=-b){this.transPoint(a.targetPoint,b);this.transPoint(a.offset,b);c=a.points;if(null!=c)for(var d=0;d<c.length;d++)this.transPoint(c[d],b);this.transPoint(b,b)}return a};h.prototype.normalizeGraph=function(c){function a(C){null!=C&&(null==b?(b=C.x,d=C.y,f=C.x+(C.width||0),k=C.y+(C.height||0)):(b=Math.min(C.x,b),d=Math.min(C.y,d),f=Math.max(C.x+(C.width||0),f),k=Math.max(C.y+(C.height||0),k)))}var b,d,f,k,n;for(n in c.model.cells){var q=c.model.cells[n],t=q.geometry;if(null!=t&&1==q.parent.id)if(q.vertex)a(t);-else for(a(t.sourcePoint),a(t.targetPoint),q=t.points,t=0;null!=q&&t<q.length;t++)a(q[t])}var A={x:b,y:d};for(n in c.model.cells)if(q=c.model.cells[n],t=q.geometry,null!=t&&1==q.parent.id&&(t.x-=b,t.y-=d,q.isEdge()))for(this.transPoint(t.sourcePoint,A),this.transPoint(t.targetPoint,A),this.transPoint(t.offset,A),q=t.points,t=0;null!=q&&t<q.length;t++)this.transPoint(q[t],A);return{width:f-b,height:k-d}};h.prototype.transPoint=function(c,a){null!=c&&(c.x-=a.x,c.y-=a.y)};h.prototype.processPage=function(c,-a){var b=c.getModel(),d="",f="";for(q in b.cells){var k=b.cells[q];if(c.getDefaultParent()===b.getParent(k)){d=d.concat(f);d=d.concat('{"xml":"');var n=this.createMxGraph();n.addCell(k);this.sanitiseGraph(n);if(0===n.getModel().getChildCount(n.getDefaultParent()))return"continue";f=this.normalizeGeo(k);n=m.prototype.processPage.call(this,n,null);d=d.concat(n);d=d.concat('","w":');d=d.concat(f.width);d=d.concat(',"h":');d=d.concat(f.height);d=d.concat(',"title":"');f=b.getStyle(k);k="";if(null!=f&&+A.str.concat('","w":');A.str=A.str.concat(R.width);A.str=A.str.concat(',"h":');A.str=A.str.concat(R.height);A.str=A.str.concat(',"title":');L=L.getName();null==L&&(L="");L=mxUtils.htmlEntities(JSON.stringify(L));A.str=A.str.concat(L);A.str=A.str.concat("}");C=","}};for(var Q=f,K=0;K<I.length;K++)n(K);k=k.concat(A)}k=k.concat("]</mxlibrary>");if(a)try{a(k)}catch(L){null!=d?d(L):a("")}},c)};h.prototype.normalizeGeo=function(b){var a=b.getGeometry();a.x=0;a.y=0;var c=a.sourcePoint;if(b.isEdge()&&null!=+c){this.transPoint(a.targetPoint,c);this.transPoint(a.offset,c);b=a.points;if(null!=b)for(var d=0;d<b.length;d++)this.transPoint(b[d],c);this.transPoint(c,c)}return a};h.prototype.normalizeGraph=function(b){function a(C){null!=C&&(null==c?(c=C.x,d=C.y,f=C.x+(C.width||0),k=C.y+(C.height||0)):(c=Math.min(C.x,c),d=Math.min(C.y,d),f=Math.max(C.x+(C.width||0),f),k=Math.max(C.y+(C.height||0),k)))}var c,d,f,k,n;for(n in b.model.cells){var q=b.model.cells[n],t=q.geometry;if(null!=t&&1==q.parent.id)if(q.vertex)a(t);+else for(a(t.sourcePoint),a(t.targetPoint),q=t.points,t=0;null!=q&&t<q.length;t++)a(q[t])}var A={x:c,y:d};for(n in b.model.cells)if(q=b.model.cells[n],t=q.geometry,null!=t&&1==q.parent.id&&(t.x-=c,t.y-=d,q.isEdge()))for(this.transPoint(t.sourcePoint,A),this.transPoint(t.targetPoint,A),this.transPoint(t.offset,A),q=t.points,t=0;null!=q&&t<q.length;t++)this.transPoint(q[t],A);return{width:f-c,height:k-d}};h.prototype.transPoint=function(b,a){null!=b&&(b.x-=a.x,b.y-=a.y)};h.prototype.processPage=function(b,+a){var c=b.getModel(),d="",f="";for(q in c.cells){var k=c.cells[q];if(b.getDefaultParent()===c.getParent(k)){d=d.concat(f);d=d.concat('{"xml":"');var n=this.createMxGraph();n.addCell(k);this.sanitiseGraph(n);if(0===n.getModel().getChildCount(n.getDefaultParent()))return"continue";f=this.normalizeGeo(k);n=m.prototype.processPage.call(this,n,null);d=d.concat(n);d=d.concat('","w":');d=d.concat(f.width);d=d.concat(',"h":');d=d.concat(f.height);d=d.concat(',"title":"');f=c.getStyle(k);k="";if(null!=f&&(n=f.indexOf(g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID),0<=n)){n+=g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID.length+1;var q=parseInt(f.substring(n,f.indexOf(";",n)));a:{f=this.vertexShapeMap;n=new g.mxgraph.io.vsdx.ShapePageId(a.getId(),q);null==f.entries&&(f.entries=[]);for(var t=0;t<f.entries.length;t++)if(null!=f.entries[t].key.equals&&f.entries[t].key.equals(n)||f.entries[t].key===n){f=f.entries[t].value;break a}f=null}null!=f&&(k=f.getName())}d=d.concat(k);d=d.concat('"}');f=","}}this.RESPONSE_DIAGRAM_START=0<d.length?",":"";return d};return h}(g.mxgraph.io.mxVsdxCodec);z.mxVssxCodec=B;B.__class="com.mxgraph.io.mxVssxCodec"})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d){this.formulaE=this.formulaA=this.d=this.c=this.b=this.a=this.y=this.x=null;this.index=0;this.index=a;this.x=b;this.y=d}c.prototype.getX=function(){return this.x};c.prototype.getY=function(){return this.y};c.prototype.getA=function(){return this.a};c.prototype.getB=function(){return this.b};c.prototype.getC=function(){return this.c};c.prototype.getD=function(){return this.d};c.prototype.getFormulaA=-function(){return this.formulaA};c.prototype.getFormulaE=function(){return this.formulaE};c.prototype.getIndex=function(){return this.index};return c}();m.Row=h;h.__class="com.mxgraph.io.vsdx.geometry.Row"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(){}c.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))||1}catch(b){return 1}};c.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var b=parseFloat(a);if(isFinite(b))return b}}catch(d){}return null};c.getRowObj=function(a,b){var d=a.getAttribute("T"),f=c.getIndex(a);var k=(k=a.getAttribute("Del"))&&k.equals?k.equals("1"):"1"===k;if(!k){var n=null;f<=b.length&&(n=b[f-1]);var q=k=b=null,t=null,-A=null,C=null,I=null,Q=null;null!=n&&(b=n.x,k=n.y,q=n.getA(),t=n.getB(),A=n.getC(),C=n.getD(),Q=n.getFormulaA(),I=n.getFormulaE());a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(n=0;n<a.length;n++){var K=a[n],L=K.getAttribute("N"),S=K.getAttribute("V");switch(L){case "X":b=c.getDoubleVal(S);break;case "Y":k=c.getDoubleVal(S);break;case "A":q=c.getDoubleVal(S);Q=K.getAttribute("V");break;case "B":t=c.getDoubleVal(S);break;case "C":A=c.getDoubleVal(S);break;case "D":C=c.getDoubleVal(S);-break;case "E":I=S}}switch(d){case "MoveTo":return new g.mxgraph.io.vsdx.geometry.MoveTo(f,b,k);case "LineTo":return new g.mxgraph.io.vsdx.geometry.LineTo(f,b,k);case "ArcTo":return new g.mxgraph.io.vsdx.geometry.ArcTo(f,b,k,q);case "Ellipse":return new g.mxgraph.io.vsdx.geometry.Ellipse(f,b,k,q,t,A,C);case "EllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.EllipticalArcTo(f,b,k,q,t,A,C);case "InfiniteLine":return new g.mxgraph.io.vsdx.geometry.InfiniteLine(f,b,k,q,t);case "NURBSTo":return new g.mxgraph.io.vsdx.geometry.NURBSTo(f,-b,k,q,t,A,C,I);case "PolylineTo":return new g.mxgraph.io.vsdx.geometry.PolylineTo(f,b,k,Q);case "RelCubBezTo":return new g.mxgraph.io.vsdx.geometry.RelCubBezTo(f,b,k,q,t,A,C);case "RelEllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(f,b,k,q,t,A,C);case "RelLineTo":return new g.mxgraph.io.vsdx.geometry.RelLineTo(f,b,k);case "RelMoveTo":return new g.mxgraph.io.vsdx.geometry.RelMoveTo(f,b,k);case "RelQuadBezTo":return new g.mxgraph.io.vsdx.geometry.RelQuadBezTo(f,b,k,q,t);case "SplineKnot":return new g.mxgraph.io.vsdx.geometry.SplineKnot(f,-b,k,q);case "SplineStart":return new g.mxgraph.io.vsdx.geometry.SplineStart(f,b,k,q,t,A,C)}}return new g.mxgraph.io.vsdx.geometry.DelRow(f)};return c}();m.RowFactory=h;h.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(a,c,d){this.formulaE=this.formulaA=this.d=this.c=this.b=this.a=this.y=this.x=null;this.index=0;this.index=a;this.x=c;this.y=d}b.prototype.getX=function(){return this.x};b.prototype.getY=function(){return this.y};b.prototype.getA=function(){return this.a};b.prototype.getB=function(){return this.b};b.prototype.getC=function(){return this.c};b.prototype.getD=function(){return this.d};b.prototype.getFormulaA=+function(){return this.formulaA};b.prototype.getFormulaE=function(){return this.formulaE};b.prototype.getIndex=function(){return this.index};return b}();m.Row=h;h.__class="com.mxgraph.io.vsdx.geometry.Row"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(){}b.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))||1}catch(c){return 1}};b.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var c=parseFloat(a);if(isFinite(c))return c}}catch(d){}return null};b.getRowObj=function(a,c){var d=a.getAttribute("T"),f=b.getIndex(a);var k=(k=a.getAttribute("Del"))&&k.equals?k.equals("1"):"1"===k;if(!k){var n=null;f<=c.length&&(n=c[f-1]);var q=k=c=null,t=null,+A=null,C=null,I=null,Q=null;null!=n&&(c=n.x,k=n.y,q=n.getA(),t=n.getB(),A=n.getC(),C=n.getD(),Q=n.getFormulaA(),I=n.getFormulaE());a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(n=0;n<a.length;n++){var K=a[n],L=K.getAttribute("N"),S=K.getAttribute("V");switch(L){case "X":c=b.getDoubleVal(S);break;case "Y":k=b.getDoubleVal(S);break;case "A":q=b.getDoubleVal(S);Q=K.getAttribute("V");break;case "B":t=b.getDoubleVal(S);break;case "C":A=b.getDoubleVal(S);break;case "D":C=b.getDoubleVal(S);+break;case "E":I=S}}switch(d){case "MoveTo":return new g.mxgraph.io.vsdx.geometry.MoveTo(f,c,k);case "LineTo":return new g.mxgraph.io.vsdx.geometry.LineTo(f,c,k);case "ArcTo":return new g.mxgraph.io.vsdx.geometry.ArcTo(f,c,k,q);case "Ellipse":return new g.mxgraph.io.vsdx.geometry.Ellipse(f,c,k,q,t,A,C);case "EllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.EllipticalArcTo(f,c,k,q,t,A,C);case "InfiniteLine":return new g.mxgraph.io.vsdx.geometry.InfiniteLine(f,c,k,q,t);case "NURBSTo":return new g.mxgraph.io.vsdx.geometry.NURBSTo(f,+c,k,q,t,A,C,I);case "PolylineTo":return new g.mxgraph.io.vsdx.geometry.PolylineTo(f,c,k,Q);case "RelCubBezTo":return new g.mxgraph.io.vsdx.geometry.RelCubBezTo(f,c,k,q,t,A,C);case "RelEllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(f,c,k,q,t,A,C);case "RelLineTo":return new g.mxgraph.io.vsdx.geometry.RelLineTo(f,c,k);case "RelMoveTo":return new g.mxgraph.io.vsdx.geometry.RelMoveTo(f,c,k);case "RelQuadBezTo":return new g.mxgraph.io.vsdx.geometry.RelQuadBezTo(f,c,k,q,t);case "SplineKnot":return new g.mxgraph.io.vsdx.geometry.SplineKnot(f,+c,k,q);case "SplineStart":return new g.mxgraph.io.vsdx.geometry.SplineStart(f,c,k,q,t,A,C)}}return new g.mxgraph.io.vsdx.geometry.DelRow(f)};return b}();m.RowFactory=h;h.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(){this.colorElementMap={};this.fontElementMap={}}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0())};h.defaultColors_$LI$=function(){h.__static_initialize();null==h.defaultColors&&(h.defaultColors={});return h.defaultColors};h.__static_initializer_0=function(){h.defaultColors_$LI$()["0"]="#000000";h.defaultColors_$LI$()["1"]="#FFFFFF";h.defaultColors_$LI$()["2"]="#FF0000";h.defaultColors_$LI$()["3"]="#00FF00";h.defaultColors_$LI$()["4"]="#0000FF";h.defaultColors_$LI$()["5"]="#FFFF00";h.defaultColors_$LI$()["6"]="#FF00FF";h.defaultColors_$LI$()["7"]="#00FFFF";h.defaultColors_$LI$()["8"]="#800000";h.defaultColors_$LI$()["9"]="#008000";h.defaultColors_$LI$()["10"]="#000080";h.defaultColors_$LI$()["11"]="#808000";h.defaultColors_$LI$()["12"]="#800080";h.defaultColors_$LI$()["13"]="#008080";h.defaultColors_$LI$()["14"]="#C0C0C0";h.defaultColors_$LI$()["15"]="#E6E6E6";-h.defaultColors_$LI$()["16"]="#CDCDCD";h.defaultColors_$LI$()["17"]="#B3B3B3";h.defaultColors_$LI$()["18"]="#9A9A9A";h.defaultColors_$LI$()["19"]="#808080";h.defaultColors_$LI$()["20"]="#666666";h.defaultColors_$LI$()["21"]="#4D4D4D";h.defaultColors_$LI$()["22"]="#333333";h.defaultColors_$LI$()["23"]="#1A1A1A"};h.prototype.initialise=function(c,a){if(null!=c){a=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.COLORS);if(0<a.length){var b=a.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR_ENTRY),-d=b.length;for(a=0;a<d;a++){var f=b.item(a),k=f.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.INDEX);f=f.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.RGB);this.colorElementMap[k]=f}}a=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.FACE_NAMES);if(0<a.length)for(c=a.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.FACE_NAME),b=c.length,a=0;a<b;a++)k=c.item(a),d=k.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID),k=k.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FONT_NAME),-this.fontElementMap[d]=k}};h.prototype.getColor=function(c){var a=function(b,d){return b[d]?b[d]:null}(this.colorElementMap,c);return null==a&&(a=function(b,d){return b[d]?b[d]:null}(h.defaultColors_$LI$(),c),null==a)?"":a};h.prototype.getFont=function(c){var a=this.fontElementMap;c=a[c]?a[c]:null;return null==c?"":c};return h}();m.__static_initialized=!1;B.mxPropertiesManager=m;m.__class="com.mxgraph.io.vsdx.mxPropertiesManager"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||+h.defaultColors_$LI$()["16"]="#CDCDCD";h.defaultColors_$LI$()["17"]="#B3B3B3";h.defaultColors_$LI$()["18"]="#9A9A9A";h.defaultColors_$LI$()["19"]="#808080";h.defaultColors_$LI$()["20"]="#666666";h.defaultColors_$LI$()["21"]="#4D4D4D";h.defaultColors_$LI$()["22"]="#333333";h.defaultColors_$LI$()["23"]="#1A1A1A"};h.prototype.initialise=function(b,a){if(null!=b){a=b.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.COLORS);if(0<a.length){var c=a.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR_ENTRY),+d=c.length;for(a=0;a<d;a++){var f=c.item(a),k=f.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.INDEX);f=f.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.RGB);this.colorElementMap[k]=f}}a=b.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.FACE_NAMES);if(0<a.length)for(b=a.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.FACE_NAME),c=b.length,a=0;a<c;a++)k=b.item(a),d=k.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID),k=k.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FONT_NAME),+this.fontElementMap[d]=k}};h.prototype.getColor=function(b){var a=function(c,d){return c[d]?c[d]:null}(this.colorElementMap,b);return null==a&&(a=function(c,d){return c[d]?c[d]:null}(h.defaultColors_$LI$(),b),null==a)?"":a};h.prototype.getFont=function(b){var a=this.fontElementMap;b=a[b]?a[b]:null;return null==b?"":b};return h}();m.__static_initialized=!1;B.mxPropertiesManager=m;m.__class="com.mxgraph.io.vsdx.mxPropertiesManager"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c){this.sourceToSheet=this.fromSheet=null;this.sourceToPart=-1;this.targetToSheet=null;this.targetToPart=-1;this.endShape=this.fromCell=null;var a=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FROM_SHEET);this.fromSheet=null!=a&&0!==a.length?parseFloat(a):-1;a=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FROM_CELL);this.addFromCell(c,a)}h.prototype.addFromCell=function(c,a){var b=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TO_SHEET),d=-!0;null!=a&&function(f,k){return f&&f.equals?f.equals(k):f===k}(a,g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X)?(this.sourceToSheet=null!=b&&0!==b.length?parseFloat(b):-1,d=!0):null!=a&&function(f,k){return f&&f.equals?f.equals(k):f===k}(a,g.mxgraph.io.vsdx.mxVsdxConstants.END_X)?(this.targetToSheet=null!=b&&0!==b.length?parseFloat(b):-1,d=!1):null==this.sourceToSheet?(this.sourceToSheet=null!=b&&0!==b.length?parseFloat(b):-1,d=!0):null==this.targetToSheet&&(this.targetToSheet=null!=b&&0!==b.length?-parseFloat(b):-1,d=!1);this.findToPart(c,d)};h.prototype.findToPart=function(c,a){c=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TO_PART);c=null!=c&&0!==c.length?parseFloat(c):-1;a?this.sourceToPart=c:this.targetToPart=c};h.prototype.getFromSheet=function(){return this.fromSheet};h.prototype.getSourceToSheet=function(){return this.sourceToSheet};h.prototype.getTargetToSheet=function(){return this.targetToSheet};h.prototype.getSourceToPart=function(){return this.sourceToPart};h.prototype.getTargetToPart=-function(){return this.targetToPart};h.prototype.addConnect=function(c){this.endShape=c;var a=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FROM_CELL);this.addFromCell(c,a)};return h}();B.mxVsdxConnect=m;m.__class="com.mxgraph.io.vsdx.mxVsdxConnect"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b){this.sourceToSheet=this.fromSheet=null;this.sourceToPart=-1;this.targetToSheet=null;this.targetToPart=-1;this.endShape=this.fromCell=null;var a=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FROM_SHEET);this.fromSheet=null!=a&&0!==a.length?parseFloat(a):-1;a=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FROM_CELL);this.addFromCell(b,a)}h.prototype.addFromCell=function(b,a){var c=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TO_SHEET),d=+!0;null!=a&&function(f,k){return f&&f.equals?f.equals(k):f===k}(a,g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X)?(this.sourceToSheet=null!=c&&0!==c.length?parseFloat(c):-1,d=!0):null!=a&&function(f,k){return f&&f.equals?f.equals(k):f===k}(a,g.mxgraph.io.vsdx.mxVsdxConstants.END_X)?(this.targetToSheet=null!=c&&0!==c.length?parseFloat(c):-1,d=!1):null==this.sourceToSheet?(this.sourceToSheet=null!=c&&0!==c.length?parseFloat(c):-1,d=!0):null==this.targetToSheet&&(this.targetToSheet=null!=c&&0!==c.length?+parseFloat(c):-1,d=!1);this.findToPart(b,d)};h.prototype.findToPart=function(b,a){b=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TO_PART);b=null!=b&&0!==b.length?parseFloat(b):-1;a?this.sourceToPart=b:this.targetToPart=b};h.prototype.getFromSheet=function(){return this.fromSheet};h.prototype.getSourceToSheet=function(){return this.sourceToSheet};h.prototype.getTargetToSheet=function(){return this.targetToSheet};h.prototype.getSourceToPart=function(){return this.sourceToPart};h.prototype.getTargetToPart=+function(){return this.targetToPart};h.prototype.addConnect=function(b){this.endShape=b;var a=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FROM_CELL);this.addFromCell(b,a)};return h}();B.mxVsdxConnect=m;m.__class="com.mxgraph.io.vsdx.mxVsdxConnect"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(){}h.SET_VALUES_$LI$=function(){null==h.SET_VALUES&&(h.SET_VALUES=["a","b"]);return h.SET_VALUES};h.MY_SET_$LI$=function(){null==h.MY_SET&&(h.MY_SET=h.SET_VALUES_$LI$().slice(0).slice(0));return h.MY_SET};return h}();m.ANGLE="Angle";m.ARC_TO="ArcTo";m.BACKGROUND="Background";m.BACK_PAGE="BackPage";m.BEGIN_ARROW="BeginArrow";m.BEGIN_ARROW_SIZE="BeginArrowSize";m.BEGIN_X="BeginX";m.BEGIN_Y="BeginY";m.BOTTOM_MARGIN="BottomMargin";m.BULLET="Bullet";m.CASE="Case";m.CHARACTER="Character";m.COLOR="Color";m.COLOR_ENTRY="ColorEntry";m.COLORS="Colors";m.COLOR_TRANS="ColorTrans";m.CONNECT="Connect";m.CONNECTS="Connects";m.CONNECTION="Connection";m.CONTROL="Control";m.DELETED="Del";m.DOCUMENT_SHEET="DocumentSheet";m.ELLIPSE="Ellipse";m.ELLIPTICAL_ARC_TO="EllipticalArcTo";m.END_ARROW="EndArrow";m.END_ARROW_SIZE="EndArrowSize";m.END_X="EndX";m.END_Y="EndY";m.FACE_NAME="FaceName";m.FACE_NAMES="FaceNames";m.FALSE="0";m.FILL="Fill";m.FILL_BKGND="FillBkgnd";m.FILL_BKGND_TRANS="FillBkgndTrans";m.FILL_FOREGND="FillForegnd";m.FILL_FOREGND_TRANS="FillForegndTrans";m.FILL_PATTERN="FillPattern";m.FILL_STYLE="FillStyle";m.FILL_GRADIENT_ENABLED="FillGradientEnabled";m.FLAGS="Flags";m.FLIP_X="FlipX";m.FLIP_Y="FlipY";m.FONT="Font";m.FONT_NAME="Name";m.FOREIGN="Foreign";m.FROM_CELL="FromCell";m.FROM_SHEET="FromSheet";m.GEOM="Geom";m.HEIGHT="Height";m.HORIZONTAL_ALIGN="HorzAlign";m.ID="ID";m.INDENT_FIRST="IndFirst";m.INDENT_LEFT="IndLeft";m.INDENT_RIGHT=@@ -1207,490 +1207,490 @@ m.BULLET="Bullet";m.CASE="Case";m.CHARACTER="Character";m.COLOR="Color";m.COLOR_"PageWidth";m.PAGES="Pages";m.PARAGRAPH="Paragraph";m.PIN_X="PinX";m.PIN_Y="PinY";m.POS="Pos";m.RGB="RGB";m.RIGHT_MARGIN="RightMargin";m.ROUNDING="Rounding";m.RTL_TEXT="RTLText";m.SIZE="Size";m.SHAPE="Shape";m.SHAPES="Shapes";m.SHAPE_SHDW_SHOW="ShapeShdwShow";m.SHDW_PATTERN="ShdwPattern";m.SPACE_AFTER="SpAfter";m.SPACE_BEFORE="SpBefore";m.SPACE_LINE="SpLine";m.STRIKETHRU="Strikethru";m.STYLE="Style";m.STYLE_SHEET="StyleSheet";m.STYLE_SHEETS="StyleSheets";m.TEXT="Text";m.TEXT_BKGND="TextBkgnd";m.TEXT_BLOCK="TextBlock";m.TEXT_STYLE="TextStyle";m.TO_PART="ToPart";m.TO_SHEET="ToSheet";m.TOP_MARGIN="TopMargin";m.TRUE="1";m.TXT_ANGLE="TxtAngle";m.TXT_HEIGHT="TxtHeight";m.TXT_LOC_PIN_X="TxtLocPinX";m.TXT_LOC_PIN_Y="TxtLocPinY";m.TXT_PIN_X="TxtPinX";m.TXT_PIN_Y="TxtPinY";m.TXT_WIDTH="TxtWidth";m.TYPE="Type";m.TYPE_GROUP="Group";m.TYPE_SHAPE="Shape";m.UNIQUE_ID="UniqueID";m.VERTICAL_ALIGN="VerticalAlign";m.WIDTH="Width";m.X_CON="XCon";m.X_DYN="XDyn";m.X="X";m.Y_CON="YCon";m.Y_DYN="YDyn";m.Y="Y";m.HIDE_TEXT="HideText";m.VSDX_ID="vsdxID";m.CONNECT_TO_PART_WHOLE_SHAPE=3;B.mxVsdxConstants=m;m.__class="com.mxgraph.io.vsdx.mxVsdxConstants"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a){this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1;this.rows=null;if((null!=c&&1==c.nodeType||null===c)&&(null!=a&&a instanceof Array||null===a))Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(c),null!=a&&this.index<a.length&&this.inheritGeo(a[this.index]),-this.processGeoElem(c);else if((null!=c&&1==c.nodeType||null===c)&&void 0===a)Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(c),this.processGeoElem(c);else throw Error("invalid overload");}h.prototype.getIndex$org_w3c_dom_Element=function(c){try{return parseInt(c.getAttribute("IX"))||0}catch(a){return 0}};h.prototype.getIndex=function(c){if(null!=c&&1==c.nodeType||-null===c)return this.getIndex$org_w3c_dom_Element(c);if(void 0===c)return this.getIndex$();throw Error("invalid overload");};h.prototype.processGeoElem=function(c){var a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"Cell");c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"Row");if(null==this.rows){this.rows=[];for(var b=0;b<c.length;b++)this.rows.push(null)}for(b=0;b<a.length;b++){var d=a[b],f=d.getAttribute("N");d=d.getAttribute("V");switch(f){case "NoFill":this.noFill=-function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoLine":this.noLine=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoShow":this.noShow=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoSnap":this.noSnap=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoQuickDrag":this.noQuickDrag=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d)}}a=this.rows.length;b=!1;for(f=0;f<c.length;f++)d=g.mxgraph.io.vsdx.geometry.RowFactory.getRowObj(c[f],-this.rows),d.getIndex()>a?(this.rows.push(d),b=!0):this.rows[d.getIndex()-1]=d;b&&function(k,n){n.compare?k.sort(function(q,t){return n.compare(q,t)}):k.sort(n)}(this.rows,new h.mxVsdxGeometry$0(this))};h.prototype.inheritGeo=function(c){this.noFill=c.noFill;this.noLine=c.noLine;this.noShow=c.noShow;this.noSnap=c.noSnap;this.noQuickDrag=c.noQuickDrag;var a=this.rows=[];a.push.apply(a,c.rows)};h.prototype.getIndex$=function(){return this.index};h.prototype.isNoFill=function(){return this.noFill};h.prototype.isNoLine=-function(){return this.noLine};h.prototype.isNoShow=function(){return this.noShow};h.prototype.isNoSnap=function(){return this.noSnap};h.prototype.isNoQuickDrag=function(){return this.noQuickDrag};h.prototype.getRows=function(){return this.rows};h.prototype.getPathXML=function(c,a){if(this.noShow)return"";for(var b="",d=0;d<this.rows.length;d++){var f=this.rows[d];b=b.concat(null!=f?f.handle(c,a):"")}return b};return h}();B.mxVsdxGeometry=m;m.__class="com.mxgraph.io.vsdx.mxVsdxGeometry";(function(h){var c=-function(){function a(b){this.__parent=b}a.prototype.compare=function(b,d){b=null!=b?b.getIndex():0;d=null!=d?d.getIndex():0;return b-d};return a}();h.mxVsdxGeometry$0=c;c.__interfaces=["java.util.Comparator"]})(m=B.mxVsdxGeometry||(B.mxVsdxGeometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c){this.geomList=[];this.parentGeomList=null;this.sortNeeded=!1;if(null!=c){this.parentGeomList=c.geomList;var a=this.geomList;a.push.apply(a,c.geomList)}}h.prototype.addGeometry=function(c){c=new g.mxgraph.io.vsdx.mxVsdxGeometry(c,this.parentGeomList);c.getIndex()<this.geomList.length?this.geomList[c.getIndex()]=c:(this.geomList.push(c),this.sortNeeded=!0)};h.prototype.sort=function(){this.sortNeeded&&(function(c,a){a.compare?-c.sort(function(b,d){return a.compare(b,d)}):c.sort(a)}(this.geomList,new h.mxVsdxGeometryList$0(this)),this.sortNeeded=!1)};h.prototype.isNoShow=function(){for(var c=0;c<this.geomList.length;c++)if(!this.geomList[c].isNoShow())return!1;return!0};h.prototype.isNoFill=function(){for(var c=0;c<this.geomList.length;c++){var a=this.geomList[c];if(!a.isNoShow()&&!a.isNoFill())return!1}return!0};h.prototype.isNoLine=function(){for(var c=0;c<this.geomList.length;c++){var a=this.geomList[c];if(!a.isNoShow()&&-!a.isNoLine())return!1}return!0};h.prototype.hasGeom=function(){return 0!=this.geomList.length};h.prototype.getGeoCount=function(){for(var c=0,a=0;a<this.geomList.length;a++)this.geomList[a].isNoShow()||c++;return c};h.prototype.rotatedPoint=function(c,a,b){var d=c.y*a+c.x*b;c.x=c.x*a-c.y*b;c.y=d};h.prototype.getRoutingPoints=function(c,a,b){this.sort();c=[];c.push(a.clone());for(var d=0,f=0,k=0;k<this.geomList.length;k++){var n=this.geomList[k];if(!n.isNoShow()){n=n.getRows();for(var q=0;q<n.length;q++){var t=-n[q];if(0==q&&null!=t&&t instanceof g.mxgraph.io.vsdx.geometry.MoveTo)d=null!=t.x?t.x:0,f=null!=t.y?t.y:0;else if(null!=t&&t instanceof g.mxgraph.io.vsdx.geometry.LineTo){var A=null!=t.x?t.x:0;t=null!=t.y?t.y:0;var C=new mxPoint(A,t);0!==b&&(b=(360-b)*Math.PI/180,this.rotatedPoint(C,Math.cos(b),Math.sin(b)));A=(C.x-d)*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();A+=a.x;t=(C.y-f)*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()*-1;t+=a.y;A=Math.round(100*A)/100;t=Math.round(100*t)/100;-C.x=A;C.y=t;c.push(C)}}}}return c};h.prototype.getShapeXML=function(c){var a=new mxPoint(0,0),b={str:'<shape strokewidth="inherit"><foreground>',toString:function(){return this.str}},d=b.str.length;var f=this.processGeo(c,a,b,-1,!0);f=this.processGeo(c,a,b,f,!1);if(b.str.length===d)return"";this.closePath(b,f);b.str=b.str.concat("</foreground></shape>");return b.str};h.prototype.processGeo=function(c,a,b,d,f){var k=c.getRounding(),n="";0<k&&(n=' rounded="1" arcSize="'+k*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor+-'" ');for(k=0;k<this.geomList.length;k++){var q=this.geomList[k];if(f!==q.isNoFill()){var t=q.getPathXML(a,c);0!==t.length&&(q=this.getGeoStyle(q),-1===d?b.str=b.str.concat("<path"+n+">"):d!==q&&(this.closePath(b,d),b.str=b.str.concat("<path"+n+">")),b.str=b.str.concat(t),d=q)}}return d};h.prototype.getGeoStyle=function(c){var a=0;c.isNoLine()||c.isNoFill()?c.isNoFill()?c.isNoLine()||(a=3):a=2:a=1;return a};h.prototype.closePath=function(c,a){c.str=c.str.concat("</path>");1===a?c.str=c.str.concat("<fillstroke/>"):-2===a?c.str=c.str.concat("<fill/>"):3===a&&(c.str=c.str.concat("<stroke/>"))};return h}();B.mxVsdxGeometryList=m;m.__class="com.mxgraph.io.vsdx.mxVsdxGeometryList";(function(h){var c=function(){function a(b){this.__parent=b}a.prototype.compare=function(b,d){return b.getIndex()-d.getIndex()};return a}();h.mxVsdxGeometryList$0=c;c.__interfaces=["java.util.Comparator"]})(m=B.mxVsdxGeometryList||(B.mxVsdxGeometryList={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com=+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b,a){this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1;this.rows=null;if((null!=b&&1==b.nodeType||null===b)&&(null!=a&&a instanceof Array||null===a))Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(b),null!=a&&this.index<a.length&&this.inheritGeo(a[this.index]),+this.processGeoElem(b);else if((null!=b&&1==b.nodeType||null===b)&&void 0===a)Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(b),this.processGeoElem(b);else throw Error("invalid overload");}h.prototype.getIndex$org_w3c_dom_Element=function(b){try{return parseInt(b.getAttribute("IX"))||0}catch(a){return 0}};h.prototype.getIndex=function(b){if(null!=b&&1==b.nodeType||+null===b)return this.getIndex$org_w3c_dom_Element(b);if(void 0===b)return this.getIndex$();throw Error("invalid overload");};h.prototype.processGeoElem=function(b){var a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Cell");b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Row");if(null==this.rows){this.rows=[];for(var c=0;c<b.length;c++)this.rows.push(null)}for(c=0;c<a.length;c++){var d=a[c],f=d.getAttribute("N");d=d.getAttribute("V");switch(f){case "NoFill":this.noFill=+function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoLine":this.noLine=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoShow":this.noShow=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoSnap":this.noSnap=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoQuickDrag":this.noQuickDrag=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d)}}a=this.rows.length;c=!1;for(f=0;f<b.length;f++)d=g.mxgraph.io.vsdx.geometry.RowFactory.getRowObj(b[f],+this.rows),d.getIndex()>a?(this.rows.push(d),c=!0):this.rows[d.getIndex()-1]=d;c&&function(k,n){n.compare?k.sort(function(q,t){return n.compare(q,t)}):k.sort(n)}(this.rows,new h.mxVsdxGeometry$0(this))};h.prototype.inheritGeo=function(b){this.noFill=b.noFill;this.noLine=b.noLine;this.noShow=b.noShow;this.noSnap=b.noSnap;this.noQuickDrag=b.noQuickDrag;var a=this.rows=[];a.push.apply(a,b.rows)};h.prototype.getIndex$=function(){return this.index};h.prototype.isNoFill=function(){return this.noFill};h.prototype.isNoLine=+function(){return this.noLine};h.prototype.isNoShow=function(){return this.noShow};h.prototype.isNoSnap=function(){return this.noSnap};h.prototype.isNoQuickDrag=function(){return this.noQuickDrag};h.prototype.getRows=function(){return this.rows};h.prototype.getPathXML=function(b,a){if(this.noShow)return"";for(var c="",d=0;d<this.rows.length;d++){var f=this.rows[d];c=c.concat(null!=f?f.handle(b,a):"")}return c};return h}();B.mxVsdxGeometry=m;m.__class="com.mxgraph.io.vsdx.mxVsdxGeometry";(function(h){var b=+function(){function a(c){this.__parent=c}a.prototype.compare=function(c,d){c=null!=c?c.getIndex():0;d=null!=d?d.getIndex():0;return c-d};return a}();h.mxVsdxGeometry$0=b;b.__interfaces=["java.util.Comparator"]})(m=B.mxVsdxGeometry||(B.mxVsdxGeometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b){this.geomList=[];this.parentGeomList=null;this.sortNeeded=!1;if(null!=b){this.parentGeomList=b.geomList;var a=this.geomList;a.push.apply(a,b.geomList)}}h.prototype.addGeometry=function(b){b=new g.mxgraph.io.vsdx.mxVsdxGeometry(b,this.parentGeomList);b.getIndex()<this.geomList.length?this.geomList[b.getIndex()]=b:(this.geomList.push(b),this.sortNeeded=!0)};h.prototype.sort=function(){this.sortNeeded&&(function(b,a){a.compare?+b.sort(function(c,d){return a.compare(c,d)}):b.sort(a)}(this.geomList,new h.mxVsdxGeometryList$0(this)),this.sortNeeded=!1)};h.prototype.isNoShow=function(){for(var b=0;b<this.geomList.length;b++)if(!this.geomList[b].isNoShow())return!1;return!0};h.prototype.isNoFill=function(){for(var b=0;b<this.geomList.length;b++){var a=this.geomList[b];if(!a.isNoShow()&&!a.isNoFill())return!1}return!0};h.prototype.isNoLine=function(){for(var b=0;b<this.geomList.length;b++){var a=this.geomList[b];if(!a.isNoShow()&&+!a.isNoLine())return!1}return!0};h.prototype.hasGeom=function(){return 0!=this.geomList.length};h.prototype.getGeoCount=function(){for(var b=0,a=0;a<this.geomList.length;a++)this.geomList[a].isNoShow()||b++;return b};h.prototype.rotatedPoint=function(b,a,c){var d=b.y*a+b.x*c;b.x=b.x*a-b.y*c;b.y=d};h.prototype.getRoutingPoints=function(b,a,c){this.sort();b=[];b.push(a.clone());for(var d=0,f=0,k=0;k<this.geomList.length;k++){var n=this.geomList[k];if(!n.isNoShow()){n=n.getRows();for(var q=0;q<n.length;q++){var t=+n[q];if(0==q&&null!=t&&t instanceof g.mxgraph.io.vsdx.geometry.MoveTo)d=null!=t.x?t.x:0,f=null!=t.y?t.y:0;else if(null!=t&&t instanceof g.mxgraph.io.vsdx.geometry.LineTo){var A=null!=t.x?t.x:0;t=null!=t.y?t.y:0;var C=new mxPoint(A,t);0!==c&&(c=(360-c)*Math.PI/180,this.rotatedPoint(C,Math.cos(c),Math.sin(c)));A=(C.x-d)*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();A+=a.x;t=(C.y-f)*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()*-1;t+=a.y;A=Math.round(100*A)/100;t=Math.round(100*t)/100;+C.x=A;C.y=t;b.push(C)}}}}return b};h.prototype.getShapeXML=function(b){var a=new mxPoint(0,0),c={str:'<shape strokewidth="inherit"><foreground>',toString:function(){return this.str}},d=c.str.length;var f=this.processGeo(b,a,c,-1,!0);f=this.processGeo(b,a,c,f,!1);if(c.str.length===d)return"";this.closePath(c,f);c.str=c.str.concat("</foreground></shape>");return c.str};h.prototype.processGeo=function(b,a,c,d,f){var k=b.getRounding(),n="";0<k&&(n=' rounded="1" arcSize="'+k*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor++'" ');for(k=0;k<this.geomList.length;k++){var q=this.geomList[k];if(f!==q.isNoFill()){var t=q.getPathXML(a,b);0!==t.length&&(q=this.getGeoStyle(q),-1===d?c.str=c.str.concat("<path"+n+">"):d!==q&&(this.closePath(c,d),c.str=c.str.concat("<path"+n+">")),c.str=c.str.concat(t),d=q)}}return d};h.prototype.getGeoStyle=function(b){var a=0;b.isNoLine()||b.isNoFill()?b.isNoFill()?b.isNoLine()||(a=3):a=2:a=1;return a};h.prototype.closePath=function(b,a){b.str=b.str.concat("</path>");1===a?b.str=b.str.concat("<fillstroke/>"):+2===a?b.str=b.str.concat("<fill/>"):3===a&&(b.str=b.str.concat("<stroke/>"))};return h}();B.mxVsdxGeometryList=m;m.__class="com.mxgraph.io.vsdx.mxVsdxGeometryList";(function(h){var b=function(){function a(c){this.__parent=c}a.prototype.compare=function(c,d){return c.getIndex()-d.getIndex()};return a}();h.mxVsdxGeometryList$0=b;b.__interfaces=["java.util.Comparator"]})(m=B.mxVsdxGeometryList||(B.mxVsdxGeometryList={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a){this.masterShape=this.Id=null;this.childShapes={};this.master=c;this.Id=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID)||"";this.processMasterShapes(a)}h.prototype.processMasterShapes=function(c){for(var a=this.master.firstChild;null!=a;){if(null!=a&&1==a.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(a.nodeName,"Rel")){var b=c.getRelationship(a.getAttribute("r:id"),g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/_rels/masters.xml.rels"),-d=b.getAttribute("Target");b=b.getAttribute("Type");var f=null;null!=b&&function(k,n){var q=k.length-n.length;k=k.indexOf(n,q);return-1!==k&&k===q}(b,"master")&&(f=c.getXmlDoc(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/"+d));if(null!=f)for(d=f.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(d.nodeName,"MasterContents")){this.processMasterShape(d,c);break}d=d.nextSibling}}else if(1==a.nodeType&&"PageSheet"==a.nodeName)for(this.pageSheet={},-d=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Cell"),b=0;b<d.length;b++)this.pageSheet[d[b].getAttribute("N")]=d[b];a=a.nextSibling}};h.prototype.processMasterShape=function(c,a,b){b||(this.firstLevelShapes=[]);for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(q,t){return q&&q.equals?q.equals(t):q===t}(c.nodeName,"Shapes"))for(var d=c.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(q,t){return q&&q.equals?q.equals(t):q===t}(d.nodeName,"Shape")){var f=d,k=f.getAttribute("ID"),-n=new g.mxgraph.io.vsdx.Shape(f,a);this.masterShape=null==this.masterShape?n:this.masterShape;this.childShapes[k]=n;b||this.firstLevelShapes.push(n);this.processMasterShape(f,a,!0)}d=d.nextSibling}else if(null!=c&&1==c.nodeType&&"Connects"==c.nodeName)for(this.connects={},d=c.firstChild;null!=d;)null!=d&&1==d.nodeType&&"Connect"==d.nodeName&&(f=new g.mxgraph.io.vsdx.mxVsdxConnect(d),this.connects[f.getFromSheet()]=f),d=d.nextSibling;c=c.nextSibling}};h.prototype.getMasterShape=function(){return this.masterShape};-h.prototype.getSubShape=function(c){var a=this.childShapes;return a[c]?a[c]:null};h.prototype.getNameU=function(){return this.master.getAttribute("NameU")||""};h.prototype.getName=function(){return this.master.getAttribute("Name")||""};h.prototype.getUniqueID=function(){var c="";this.master.hasAttribute("UniqueID")&&(c=this.master.getAttribute("UniqueID"));return c};h.prototype.getId=function(){return this.Id};h.prototype.getMasterElement=function(){return this.master};return h}();B.mxVsdxMaster=+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b,a){this.masterShape=this.Id=null;this.childShapes={};this.master=b;this.Id=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID)||"";this.processMasterShapes(a)}h.prototype.processMasterShapes=function(b){for(var a=this.master.firstChild;null!=a;){if(null!=a&&1==a.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(a.nodeName,"Rel")){var c=b.getRelationship(a.getAttribute("r:id"),g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/_rels/masters.xml.rels"),+d=c.getAttribute("Target");c=c.getAttribute("Type");var f=null;null!=c&&function(k,n){var q=k.length-n.length;k=k.indexOf(n,q);return-1!==k&&k===q}(c,"master")&&(f=b.getXmlDoc(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/"+d));if(null!=f)for(d=f.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(d.nodeName,"MasterContents")){this.processMasterShape(d,b);break}d=d.nextSibling}}else if(1==a.nodeType&&"PageSheet"==a.nodeName)for(this.pageSheet={},+d=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Cell"),c=0;c<d.length;c++)this.pageSheet[d[c].getAttribute("N")]=d[c];a=a.nextSibling}};h.prototype.processMasterShape=function(b,a,c){c||(this.firstLevelShapes=[]);for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(q,t){return q&&q.equals?q.equals(t):q===t}(b.nodeName,"Shapes"))for(var d=b.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(q,t){return q&&q.equals?q.equals(t):q===t}(d.nodeName,"Shape")){var f=d,k=f.getAttribute("ID"),+n=new g.mxgraph.io.vsdx.Shape(f,a);this.masterShape=null==this.masterShape?n:this.masterShape;this.childShapes[k]=n;c||this.firstLevelShapes.push(n);this.processMasterShape(f,a,!0)}d=d.nextSibling}else if(null!=b&&1==b.nodeType&&"Connects"==b.nodeName)for(this.connects={},d=b.firstChild;null!=d;)null!=d&&1==d.nodeType&&"Connect"==d.nodeName&&(f=new g.mxgraph.io.vsdx.mxVsdxConnect(d),this.connects[f.getFromSheet()]=f),d=d.nextSibling;b=b.nextSibling}};h.prototype.getMasterShape=function(){return this.masterShape};+h.prototype.getSubShape=function(b){var a=this.childShapes;return a[b]?a[b]:null};h.prototype.getNameU=function(){return this.master.getAttribute("NameU")||""};h.prototype.getName=function(){return this.master.getAttribute("Name")||""};h.prototype.getUniqueID=function(){var b="";this.master.hasAttribute("UniqueID")&&(b=this.master.getAttribute("UniqueID"));return b};h.prototype.getId=function(){return this.Id};h.prototype.getMasterElement=function(){return this.master};return h}();B.mxVsdxMaster=m;m.__class="com.mxgraph.io.vsdx.mxVsdxMaster"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a,b){this.pages=this.media=this.xmlDocs=null;this.masters={};this.stylesheets={};this.themes={};this.pm=this.rootElement=null;this.xmlDocs=a;this.media=b;for(c=c.firstChild;null!=c;){if(a=null!=c&&1==c.nodeType)a=c.tagName.toLowerCase(),b=g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"document",a=a&&a.equals?a.equals(b):a===b;if(a){this.rootElement=c;break}c=c.nextSibling}this.pm=new g.mxgraph.io.vsdx.mxPropertiesManager;-this.pm.initialise(this.rootElement,this);this.initStylesheets();this.initThemes();this.initMasters();this.initPages()}h.prototype.initThemes=function(){if(null!=this.xmlDocs)for(var c=!0,a=1;c;){var b=function(f,k){return f[k]?f[k]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/theme/theme"+a+".xml");if(null!=b){for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(b.tagName,"a:theme")){b=new g.mxgraph.io.vsdx.mxVsdxTheme(b);0>-b.getThemeIndex()&&b.processTheme();var d=function(f,k){null==f.entries&&(f.entries=[]);for(var n=0;n<f.entries.length;n++)if(null!=f.entries[n].key.equals&&f.entries[n].key.equals(k)||f.entries[n].key===k)return f.entries[n].value;return null}(this.themes,b.getThemeIndex());null!=d&&d.isPure()||function(f,k,n){null==f.entries&&(f.entries=[]);for(var q=0;q<f.entries.length;q++)if(null!=f.entries[q].key.equals&&f.entries[q].key.equals(k)||f.entries[q].key===k){f.entries[q].value=n;return}f.entries.push({key:k,-value:n,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.themes,b.getThemeIndex(),b);break}b=b.nextSibling}a++}else c=!1}};h.prototype.initStylesheets=function(){var c=this.rootElement.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEETS);if(0<c.length){c=c.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEET);for(var a=c.length,b=0;b<a;b++){var d=c.item(b),f=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID);d=new g.mxgraph.io.vsdx.Style(d,-this);this.stylesheets[f]=d}}for(c=function(k){var n=0;return{next:function(){return n<k.length?k[n++]:null},hasNext:function(){return n<k.length}}}(function(k){return Object.keys(k).map(function(n){return k[n]})}(this.stylesheets));c.hasNext();)d=c.next(),d.stylesheetRefs(this)};h.prototype.initMasters=function(){if(null!=this.xmlDocs){var c=function(b,d){return b[d]?b[d]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/masters.xml");if(null!=c)for(c=c.firstChild;null!=c;){if(null!=-c&&1==c.nodeType&&function(b,d){return b&&b.equals?b.equals(d):b===d}(c.tagName,g.mxgraph.io.vsdx.mxVsdxConstants.MASTERS)){for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(b,d){return b&&b.equals?b.equals(d):b===d}(c.tagName,"Master")){var a=new g.mxgraph.io.vsdx.mxVsdxMaster(c,this);this.masters[a.getId()]=a}c=c.nextSibling}break}c=c.nextSibling}}};h.prototype.initPages=function(){if(null!=this.xmlDocs){var c=function(k,n){return k[n]?k[n]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+-"/pages/pages.xml");if(null!=c)for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(c.tagName,g.mxgraph.io.vsdx.mxVsdxConstants.PAGES)){var a=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.PAGE);if(null!=a&&0<a.length){this.pages={};c={};for(var b=a.length,d=0;d<b;d++){var f=a.item(d);f=this.createPage(f);f.isBackground()&&function(k,n,q){null==k.entries&&(k.entries=[]);for(var t=0;t<k.entries.length;t++)if(null!=k.entries[t].key.equals&&-k.entries[t].key.equals(n)||k.entries[t].key===n){k.entries[t].value=q;return}k.entries.push({key:n,value:q,getKey:function(){return this.key},getValue:function(){return this.value}})}(c,f.getId(),f);(function(k,n,q){null==k.entries&&(k.entries=[]);for(var t=0;t<k.entries.length;t++)if(null!=k.entries[t].key.equals&&k.entries[t].key.equals(n)||k.entries[t].key===n){k.entries[t].value=q;return}k.entries.push({key:n,value:q,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.pages,-f.getId(),f)}a=function(k){null==k.entries&&(k.entries=[]);return k.entries}(this.pages);for(b=0;b<a.length;b++)f=a[b].getValue(),d=f.getBackPageId(),null!=d&&(d=function(k,n){null==k.entries&&(k.entries=[]);for(var q=0;q<k.entries.length;q++)if(null!=k.entries[q].key.equals&&k.entries[q].key.equals(n)||k.entries[q].key===n)return k.entries[q].value;return null}(c,d),f.setBackPage(d))}break}c=c.nextSibling}}};h.prototype.getPages=function(){return this.pages};h.prototype.getThemes=function(){return this.themes};-h.prototype.getDefaultTheme=function(){null==this.defaultTheme&&null!=this.themes.entries&&0<this.themes.entries.length&&(this.defaultTheme=this.themes.entries[0].getValue());return this.defaultTheme};h.prototype.getRelationship=function(c,a){a=function(f,k){return f[k]?f[k]:null}(this.xmlDocs,a);if(null==a||null==c||0===c.length)return null;a=a.getElementsByTagName("Relationship");for(var b=0;b<a.length;b++){var d=a.item(b);if(function(f,k){return f&&f.equals?f.equals(k):f===k}(d.getAttribute("Id"),-c))return d}return null};h.prototype.getMaster=function(c){var a=this.masters;return a[c]?a[c]:null};h.prototype.createPage=function(c){return new g.mxgraph.io.vsdx.mxVsdxPage(c,this)};h.prototype.getPropertiesManager=function(){return this.pm};h.prototype.setPropertiesManager=function(c){this.pm=c};h.prototype.getMasterShapes=function(){return this.masters};h.prototype.setMasterShapes=function(c){this.masters=c};h.prototype.getStylesheet=function(c){var a=this.stylesheets;return a[c]?a[c]:null};-h.prototype.getXmlDoc=function(c){var a=this.xmlDocs;return a[c]?a[c]:null};h.prototype.getMedia=function(c){var a=this.media;return a[c]?a[c]:null};return h}();B.mxVsdxModel=m;m.__class="com.mxgraph.io.vsdx.mxVsdxModel"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a){this.pageName=this.Id=null;this.__isBackground=!1;this.model=this.pageSheet=this.pageElement=this.backPage=this.backPageId=null;this.shapes={};this.connects={};this.connectsMap={};this.cellElements={};this.model=a;this.pageElement=c;this.layers=[];var b=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.BACKGROUND),d;if(d=null!=b)d=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE,d=b&&b.equals?b.equals(d):b===d;this.__isBackground=-d?!0:!1;b=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.BACK_PAGE);null!=b&&0<b.length&&(this.backPageId=parseFloat(b));this.Id=parseFloat(c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID));this.pageName=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME)||"";this.pageNameU=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||this.pageName;b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"PageSheet");if(0<b.length){b=b[0];d=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,-"Cell");for(var f=0;f<d.length;f++){var k=d[f],n=k.getAttribute("N");this.cellElements[n]=k}b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Section");for(d=0;d<b.length;d++)if(f=b[d],n=f.getAttribute("N"),"Layer"==n)for(n=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Row"),f=0;f<n.length;f++){k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(n[f],"Cell");for(var q={},t=0;t<k.length;t++)q[k[t].getAttribute("N")]=k[t].getAttribute("V");null==q.Name&&(q.Name="Layer "+-f);this.layers[parseInt(n[f].getAttribute("IX"))]=q}}this.parseNodes(c,a,"pages")}h.prototype.parseNodes=function(c,a,b){for(var d=c.firstChild;null!=d;){if(null!=d&&1==d.nodeType){var f=d,k=f.nodeName;if(function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"Connects"))for(f=f.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONNECT),f=null!=f&&0<f.length?f.item(0):null;null!=f;){if(null!=f&&1==f.nodeType){k=f;var n=new g.mxgraph.io.vsdx.mxVsdxConnect(k),q=n.getFromSheet();this.connectsMap[q]=+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b,a,c){this.pages=this.media=this.xmlDocs=null;this.masters={};this.stylesheets={};this.themes={};this.pm=this.rootElement=null;this.xmlDocs=a;this.media=c;for(b=b.firstChild;null!=b;){if(a=null!=b&&1==b.nodeType)a=b.tagName.toLowerCase(),c=g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"document",a=a&&a.equals?a.equals(c):a===c;if(a){this.rootElement=b;break}b=b.nextSibling}this.pm=new g.mxgraph.io.vsdx.mxPropertiesManager;+this.pm.initialise(this.rootElement,this);this.initStylesheets();this.initThemes();this.initMasters();this.initPages()}h.prototype.initThemes=function(){if(null!=this.xmlDocs)for(var b=!0,a=1;b;){var c=function(f,k){return f[k]?f[k]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/theme/theme"+a+".xml");if(null!=c){for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(c.tagName,"a:theme")){c=new g.mxgraph.io.vsdx.mxVsdxTheme(c);0>+c.getThemeIndex()&&c.processTheme();var d=function(f,k){null==f.entries&&(f.entries=[]);for(var n=0;n<f.entries.length;n++)if(null!=f.entries[n].key.equals&&f.entries[n].key.equals(k)||f.entries[n].key===k)return f.entries[n].value;return null}(this.themes,c.getThemeIndex());null!=d&&d.isPure()||function(f,k,n){null==f.entries&&(f.entries=[]);for(var q=0;q<f.entries.length;q++)if(null!=f.entries[q].key.equals&&f.entries[q].key.equals(k)||f.entries[q].key===k){f.entries[q].value=n;return}f.entries.push({key:k,+value:n,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.themes,c.getThemeIndex(),c);break}c=c.nextSibling}a++}else b=!1}};h.prototype.initStylesheets=function(){var b=this.rootElement.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEETS);if(0<b.length){b=b.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEET);for(var a=b.length,c=0;c<a;c++){var d=b.item(c),f=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID);d=new g.mxgraph.io.vsdx.Style(d,+this);this.stylesheets[f]=d}}for(b=function(k){var n=0;return{next:function(){return n<k.length?k[n++]:null},hasNext:function(){return n<k.length}}}(function(k){return Object.keys(k).map(function(n){return k[n]})}(this.stylesheets));b.hasNext();)d=b.next(),d.stylesheetRefs(this)};h.prototype.initMasters=function(){if(null!=this.xmlDocs){var b=function(c,d){return c[d]?c[d]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/masters.xml");if(null!=b)for(b=b.firstChild;null!=b;){if(null!=+b&&1==b.nodeType&&function(c,d){return c&&c.equals?c.equals(d):c===d}(b.tagName,g.mxgraph.io.vsdx.mxVsdxConstants.MASTERS)){for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(c,d){return c&&c.equals?c.equals(d):c===d}(b.tagName,"Master")){var a=new g.mxgraph.io.vsdx.mxVsdxMaster(b,this);this.masters[a.getId()]=a}b=b.nextSibling}break}b=b.nextSibling}}};h.prototype.initPages=function(){if(null!=this.xmlDocs){var b=function(k,n){return k[n]?k[n]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder++"/pages/pages.xml");if(null!=b)for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(b.tagName,g.mxgraph.io.vsdx.mxVsdxConstants.PAGES)){var a=b.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.PAGE);if(null!=a&&0<a.length){this.pages={};b={};for(var c=a.length,d=0;d<c;d++){var f=a.item(d);f=this.createPage(f);f.isBackground()&&function(k,n,q){null==k.entries&&(k.entries=[]);for(var t=0;t<k.entries.length;t++)if(null!=k.entries[t].key.equals&&+k.entries[t].key.equals(n)||k.entries[t].key===n){k.entries[t].value=q;return}k.entries.push({key:n,value:q,getKey:function(){return this.key},getValue:function(){return this.value}})}(b,f.getId(),f);(function(k,n,q){null==k.entries&&(k.entries=[]);for(var t=0;t<k.entries.length;t++)if(null!=k.entries[t].key.equals&&k.entries[t].key.equals(n)||k.entries[t].key===n){k.entries[t].value=q;return}k.entries.push({key:n,value:q,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.pages,+f.getId(),f)}a=function(k){null==k.entries&&(k.entries=[]);return k.entries}(this.pages);for(c=0;c<a.length;c++)f=a[c].getValue(),d=f.getBackPageId(),null!=d&&(d=function(k,n){null==k.entries&&(k.entries=[]);for(var q=0;q<k.entries.length;q++)if(null!=k.entries[q].key.equals&&k.entries[q].key.equals(n)||k.entries[q].key===n)return k.entries[q].value;return null}(b,d),f.setBackPage(d))}break}b=b.nextSibling}}};h.prototype.getPages=function(){return this.pages};h.prototype.getThemes=function(){return this.themes};+h.prototype.getDefaultTheme=function(){null==this.defaultTheme&&null!=this.themes.entries&&0<this.themes.entries.length&&(this.defaultTheme=this.themes.entries[0].getValue());return this.defaultTheme};h.prototype.getRelationship=function(b,a){a=function(f,k){return f[k]?f[k]:null}(this.xmlDocs,a);if(null==a||null==b||0===b.length)return null;a=a.getElementsByTagName("Relationship");for(var c=0;c<a.length;c++){var d=a.item(c);if(function(f,k){return f&&f.equals?f.equals(k):f===k}(d.getAttribute("Id"),+b))return d}return null};h.prototype.getMaster=function(b){var a=this.masters;return a[b]?a[b]:null};h.prototype.createPage=function(b){return new g.mxgraph.io.vsdx.mxVsdxPage(b,this)};h.prototype.getPropertiesManager=function(){return this.pm};h.prototype.setPropertiesManager=function(b){this.pm=b};h.prototype.getMasterShapes=function(){return this.masters};h.prototype.setMasterShapes=function(b){this.masters=b};h.prototype.getStylesheet=function(b){var a=this.stylesheets;return a[b]?a[b]:null};+h.prototype.getXmlDoc=function(b){var a=this.xmlDocs;return a[b]?a[b]:null};h.prototype.getMedia=function(b){var a=this.media;return a[b]?a[b]:null};return h}();B.mxVsdxModel=m;m.__class="com.mxgraph.io.vsdx.mxVsdxModel"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b,a){this.pageName=this.Id=null;this.__isBackground=!1;this.model=this.pageSheet=this.pageElement=this.backPage=this.backPageId=null;this.shapes={};this.connects={};this.connectsMap={};this.cellElements={};this.model=a;this.pageElement=b;this.layers=[];var c=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.BACKGROUND),d;if(d=null!=c)d=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE,d=c&&c.equals?c.equals(d):c===d;this.__isBackground=+d?!0:!1;c=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.BACK_PAGE);null!=c&&0<c.length&&(this.backPageId=parseFloat(c));this.Id=parseFloat(b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID));this.pageName=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME)||"";this.pageNameU=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||this.pageName;c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"PageSheet");if(0<c.length){c=c[0];d=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,+"Cell");for(var f=0;f<d.length;f++){var k=d[f],n=k.getAttribute("N");this.cellElements[n]=k}c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"Section");for(d=0;d<c.length;d++)if(f=c[d],n=f.getAttribute("N"),"Layer"==n)for(n=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Row"),f=0;f<n.length;f++){k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(n[f],"Cell");for(var q={},t=0;t<k.length;t++)q[k[t].getAttribute("N")]=k[t].getAttribute("V");null==q.Name&&(q.Name="Layer "++f);this.layers[parseInt(n[f].getAttribute("IX"))]=q}}this.parseNodes(b,a,"pages")}h.prototype.parseNodes=function(b,a,c){for(var d=b.firstChild;null!=d;){if(null!=d&&1==d.nodeType){var f=d,k=f.nodeName;if(function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"Connects"))for(f=f.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONNECT),f=null!=f&&0<f.length?f.item(0):null;null!=f;){if(null!=f&&1==f.nodeType){k=f;var n=new g.mxgraph.io.vsdx.mxVsdxConnect(k),q=n.getFromSheet();this.connectsMap[q]=(this.connectsMap[q]||0)+1;q=null!=q&&-1<q?function(t,A){null==t.entries&&(t.entries=[]);for(var C=0;C<t.entries.length;C++)if(null!=t.entries[C].key.equals&&t.entries[C].key.equals(A)||t.entries[C].key===A)return t.entries[C].value;return null}(this.connects,q):null;null!=q?q.addConnect(k):function(t,A,C){null==t.entries&&(t.entries=[]);for(var I=0;I<t.entries.length;I++)if(null!=t.entries[I].key.equals&&t.entries[I].key.equals(A)||t.entries[I].key===A){t.entries[I].value=C;return}t.entries.push({key:A,-value:C,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.connects,n.getFromSheet(),n)}f=f.nextSibling}}d=d.nextSibling}for(d=c.firstChild;null!=d;)null!=d&&1==d.nodeType&&(f=d,k=f.nodeName,function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"Rel")?this.resolveRel(f,a,b):function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"Shapes")?this.shapes=this.parseShapes(f,null,!1):function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"PageSheet")&&(this.pageSheet=f)),d=d.nextSibling};-h.prototype.resolveRel=function(c,a,b){b=a.getRelationship(c.getAttribute("r:id"),g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/_rels/"+b+".xml.rels");c=b.getAttribute("Target");b=b.getAttribute("Type");if(function(f,k){var n=f.length-k.length;f=f.indexOf(k,n);return-1!==f&&f===n}((new String(b)).toString(),"page")){var d=null;null!=b&&function(f,k){var n=f.length-k.length;f=f.indexOf(k,n);return-1!==f&&f===n}(b,"page")&&(d=a.getXmlDoc(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/"+c));if(null!=-d)for(b=d.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(b.tagName,"PageContents")){d=c.indexOf(".");-1!==d&&this.parseNodes(b,a,c.substring(0,d));break}b=b.nextSibling}}};h.prototype.parseShapes=function(c,a,b){b={};c=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.SHAPE);for(c=null!=c&&0<c.length?c.item(0):null;null!=c;){if(null!=c&&1==c.nodeType){var d=c,f=a;if(null==f){var k=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER);+value:C,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.connects,n.getFromSheet(),n)}f=f.nextSibling}}d=d.nextSibling}for(d=b.firstChild;null!=d;)null!=d&&1==d.nodeType&&(f=d,k=f.nodeName,function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"Rel")?this.resolveRel(f,a,c):function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"Shapes")?this.shapes=this.parseShapes(f,null,!1):function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"PageSheet")&&(this.pageSheet=f)),d=d.nextSibling};+h.prototype.resolveRel=function(b,a,c){c=a.getRelationship(b.getAttribute("r:id"),g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/_rels/"+c+".xml.rels");b=c.getAttribute("Target");c=c.getAttribute("Type");if(function(f,k){var n=f.length-k.length;f=f.indexOf(k,n);return-1!==f&&f===n}((new String(c)).toString(),"page")){var d=null;null!=c&&function(f,k){var n=f.length-k.length;f=f.indexOf(k,n);return-1!==f&&f===n}(c,"page")&&(d=a.getXmlDoc(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/"+b));if(null!=+d)for(c=d.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(c.tagName,"PageContents")){d=b.indexOf(".");-1!==d&&this.parseNodes(c,a,b.substring(0,d));break}c=c.nextSibling}}};h.prototype.parseShapes=function(b,a,c){c={};b=b.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.SHAPE);for(b=null!=b&&0<b.length?b.item(0):null;null!=b;){if(null!=b&&1==b.nodeType){var d=b,f=a;if(null==f){var k=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER);null==k||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,"")||(f=this.model.getMaster(k))}var n=this.isEdge(d);n||null==f||(k=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE),n=f.getMasterElement(),null==k||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,"")||(k=f.getSubShape(k),n=null!=k?k.getShape():n),n=this.isEdge(n));d=this.createCell(d,!n,f);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||-q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(b,d.getId(),d)}c=c.nextSibling}return b};h.prototype.createCell=function(c,a,b){return new g.mxgraph.io.vsdx.VsdxShape(this,c,a,this.model.getMasterShapes(),b,this.model)};h.prototype.isEdge=function(c){if(null!=c&&(c=c.childNodes,null!=c))for(c=c.item(0);null!=c;){if(null!=c&&1==c.nodeType){var a=c;if(function(b,d){return b&&b.equals?b.equals(d):-b===d}(a.nodeName,"Cell")&&(a=a.getAttribute("N"),function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"BeginX")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"BeginY")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"EndY")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"EndX")))return!0}c=c.nextSibling}return!1};h.prototype.getPageDimensions=function(){var c=0,a=0,b=function(f,k){return f[k]?f[k]:null}(this.cellElements,"PageHeight"),d=function(f,k){return f[k]?f[k]:null}(this.cellElements,-"PageWidth");null!=b&&(c=parseFloat(b.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),c=Math.round(100*c)/100);null!=d&&(a=parseFloat(d.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),a=Math.round(100*a)/100);return new mxPoint(a,c)};h.prototype.getDrawingScale=function(){var c=this.cellElements;c=c.DrawingScale?c.DrawingScale:null;return null!=c?parseFloat(c.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};h.prototype.getPageScale=-function(){var c=this.cellElements;c=c.PageScale?c.PageScale:null;return null!=c?parseFloat(c.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};h.prototype.getCellValue=function(c){var a=this.cellElements;c=a[c]?a[c]:null;return null!=c?c.getAttribute("V")||"":null};h.prototype.getCellIntValue=function(c,a){c=this.getCellValue(c);return null!=c?parseInt(c):a};h.prototype.getId=function(){return this.Id};h.prototype.getPageName=function(){return this.pageName};h.prototype.getPageNameU=-function(){return this.pageNameU};h.prototype.getShapes=function(){return this.shapes};h.prototype.getLayers=function(){return this.layers};h.prototype.getConnects=function(){return this.connects};h.prototype.isBackground=function(){return this.__isBackground};h.prototype.getBackPageId=function(){return this.backPageId};h.prototype.setBackPage=function(c){this.backPage=c};h.prototype.getBackPage=function(){return this.backPage};return h}();B.mxVsdxPage=m;m.__class="com.mxgraph.io.vsdx.mxVsdxPage"})(z.vsdx||+q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(c,d.getId(),d)}b=b.nextSibling}return c};h.prototype.createCell=function(b,a,c){return new g.mxgraph.io.vsdx.VsdxShape(this,b,a,this.model.getMasterShapes(),c,this.model)};h.prototype.isEdge=function(b){if(null!=b&&(b=b.childNodes,null!=b))for(b=b.item(0);null!=b;){if(null!=b&&1==b.nodeType){var a=b;if(function(c,d){return c&&c.equals?c.equals(d):+c===d}(a.nodeName,"Cell")&&(a=a.getAttribute("N"),function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"BeginX")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"BeginY")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"EndY")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"EndX")))return!0}b=b.nextSibling}return!1};h.prototype.getPageDimensions=function(){var b=0,a=0,c=function(f,k){return f[k]?f[k]:null}(this.cellElements,"PageHeight"),d=function(f,k){return f[k]?f[k]:null}(this.cellElements,+"PageWidth");null!=c&&(b=parseFloat(c.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),b=Math.round(100*b)/100);null!=d&&(a=parseFloat(d.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),a=Math.round(100*a)/100);return new mxPoint(a,b)};h.prototype.getDrawingScale=function(){var b=this.cellElements;b=b.DrawingScale?b.DrawingScale:null;return null!=b?parseFloat(b.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};h.prototype.getPageScale=+function(){var b=this.cellElements;b=b.PageScale?b.PageScale:null;return null!=b?parseFloat(b.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};h.prototype.getCellValue=function(b){var a=this.cellElements;b=a[b]?a[b]:null;return null!=b?b.getAttribute("V")||"":null};h.prototype.getCellIntValue=function(b,a){b=this.getCellValue(b);return null!=b?parseInt(b):a};h.prototype.getId=function(){return this.Id};h.prototype.getPageName=function(){return this.pageName};h.prototype.getPageNameU=+function(){return this.pageNameU};h.prototype.getShapes=function(){return this.shapes};h.prototype.getLayers=function(){return this.layers};h.prototype.getConnects=function(){return this.connects};h.prototype.isBackground=function(){return this.__isBackground};h.prototype.getBackPageId=function(){return this.backPageId};h.prototype.setBackPage=function(b){this.backPage=b};h.prototype.getBackPage=function(){return this.backPage};return h}();B.mxVsdxPage=m;m.__class="com.mxgraph.io.vsdx.mxVsdxPage"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c){this.themeIndex=-1;this.themeVariant=0;this.baseColors={};this.variantsColors=function(a){var b=function(d){if(0!=d.length){for(var f=[],k=0;k<d[0];k++)f.push(b(d.slice(1)));return f}};return b(a)}([4,7]);this.isMonotoneVariant=Array(4);this.defaultClr=new g.mxgraph.io.vsdx.theme.Color(255,255,255);this.defaultLineClr=new g.mxgraph.io.vsdx.theme.Color(0,0,0);this.defaultLineStyle=new g.mxgraph.io.vsdx.theme.LineStyle;-this.fillStyles=[];this.connFillStyles=[];this.lineStyles=[];this.connLineStyles=[];this.lineStylesExt=[];this.connLineStylesExt=[];this.connFontColors=[];this.connFontStyles=[];this.fontColors=[];this.fontStyles=[];this.variantEmbellishment=[0,0,0,0];this.variantFillIdx=function(a){var b=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(b(d.slice(1)));return f};return b(a)}([4,4]);this.variantLineIdx=function(a){var b=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(b(d.slice(1)));-return f};return b(a)}([4,4]);this.variantEffectIdx=function(a){var b=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(b(d.slice(1)));return f};return b(a)}([4,4]);this.variantFontIdx=function(a){var b=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(b(d.slice(1)));return f};return b(a)}([4,4]);this.isProcessed=!1;this.__isPure=!0;this.name=this.bkgndColor=this.theme=null;this.theme=c;this.name=c.getAttribute("name")||"";c=function(a,b){return a[b]?a[b]:-null}(h.themesIds_$LI$(),this.name);null!=c&&(this.themeIndex=c)}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0(),h.__static_initializer_1())};h.themesIds_$LI$=function(){h.__static_initialize();null==h.themesIds&&(h.themesIds={});return h.themesIds};h.__static_initializer_0=function(){h.themesIds_$LI$().Office=33;h.themesIds_$LI$().Linear=34;h.themesIds_$LI$().Zephyr=35;h.themesIds_$LI$().Integral=36;h.themesIds_$LI$().Simple=37;h.themesIds_$LI$().Whisp=+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b){this.themeIndex=-1;this.themeVariant=0;this.baseColors={};this.variantsColors=function(a){var c=function(d){if(0!=d.length){for(var f=[],k=0;k<d[0];k++)f.push(c(d.slice(1)));return f}};return c(a)}([4,7]);this.isMonotoneVariant=Array(4);this.defaultClr=new g.mxgraph.io.vsdx.theme.Color(255,255,255);this.defaultLineClr=new g.mxgraph.io.vsdx.theme.Color(0,0,0);this.defaultLineStyle=new g.mxgraph.io.vsdx.theme.LineStyle;+this.fillStyles=[];this.connFillStyles=[];this.lineStyles=[];this.connLineStyles=[];this.lineStylesExt=[];this.connLineStylesExt=[];this.connFontColors=[];this.connFontStyles=[];this.fontColors=[];this.fontStyles=[];this.variantEmbellishment=[0,0,0,0];this.variantFillIdx=function(a){var c=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(c(d.slice(1)));return f};return c(a)}([4,4]);this.variantLineIdx=function(a){var c=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(c(d.slice(1)));+return f};return c(a)}([4,4]);this.variantEffectIdx=function(a){var c=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(c(d.slice(1)));return f};return c(a)}([4,4]);this.variantFontIdx=function(a){var c=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(c(d.slice(1)));return f};return c(a)}([4,4]);this.isProcessed=!1;this.__isPure=!0;this.name=this.bkgndColor=this.theme=null;this.theme=b;this.name=b.getAttribute("name")||"";b=function(a,c){return a[c]?a[c]:+null}(h.themesIds_$LI$(),this.name);null!=b&&(this.themeIndex=b)}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0(),h.__static_initializer_1())};h.themesIds_$LI$=function(){h.__static_initialize();null==h.themesIds&&(h.themesIds={});return h.themesIds};h.__static_initializer_0=function(){h.themesIds_$LI$().Office=33;h.themesIds_$LI$().Linear=34;h.themesIds_$LI$().Zephyr=35;h.themesIds_$LI$().Integral=36;h.themesIds_$LI$().Simple=37;h.themesIds_$LI$().Whisp=38;h.themesIds_$LI$().Daybreak=39;h.themesIds_$LI$().Parallel=40;h.themesIds_$LI$().Sequence=41;h.themesIds_$LI$().Slice=42;h.themesIds_$LI$().Ion=43;h.themesIds_$LI$().Retrospect=44;h.themesIds_$LI$().Organic=45;h.themesIds_$LI$().Bubble=46;h.themesIds_$LI$().Clouds=47;h.themesIds_$LI$().Gemstone=48;h.themesIds_$LI$().Lines=49;h.themesIds_$LI$().Facet=50;h.themesIds_$LI$().Prominence=51;h.themesIds_$LI$().Smoke=52;h.themesIds_$LI$().Radiance=53;h.themesIds_$LI$().Shade=54;h.themesIds_$LI$().Pencil=-55;h.themesIds_$LI$().Pen=56;h.themesIds_$LI$().Marker=57;h.themesIds_$LI$().Whiteboard=58};h.colorIds_$LI$=function(){h.__static_initialize();null==h.colorIds&&(h.colorIds={});return h.colorIds};h.__static_initializer_1=function(){(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),-0,"dk1");(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),1,"lt1");(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===-a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),2,"accent1");(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),3,"accent2");-(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),4,"accent3");(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=-b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),5,"accent4");(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),6,"accent5");(function(c,a,b){null==-c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),7,"accent6")};h.prototype.getThemeIndex=function(){return this.themeIndex};h.prototype.setVariant=function(c){this.themeVariant=c};h.prototype.isPure=function(){return this.__isPure};h.prototype.processTheme=-function(){if(!this.isProcessed){try{for(var c=this.theme.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(c.nodeName,"a:themeElements"))for(var a=c.firstChild;null!=a;){if(null!=a&&1==a.nodeType){var b=a,d=b.nodeName;(function(f,k){return f&&f.equals?f.equals(k):f===k})(d,"a:clrScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,b.getAttribute("name"))||(this.__isPure=!1),this.processColors(b)):function(f,k){return f&&f.equals?-f.equals(k):f===k}(d,"a:fontScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,b.getAttribute("name"))||(this.__isPure=!1),this.processFonts(b)):function(f,k){return f&&f.equals?f.equals(k):f===k}(d,"a:fmtScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,b.getAttribute("name"))||(this.__isPure=!1),this.processFormats(b)):function(f,k){return f&&f.equals?f.equals(k):f===k}(d,"a:extLst")&&this.processExtras(b)}a=a.nextSibling}c=c.nextSibling}}catch(f){}this.isProcessed=-!0}};h.prototype.processExtras=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var a=0;a<c.length;a++){var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c[a]);switch(b.nodeName){case "vt:fmtConnectorScheme":var d=this.name;var f=b.getAttribute("name");d=d&&d.equals?d.equals(f):d===f;d||(this.__isPure=!1);b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(d=0;d<b.length;d++)switch(f=b[d],f.nodeName){case "a:fillStyleLst":f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);-for(var k=0;k<f.length;k++)this.connFillStyles.push(g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(f[k]));break;case "a:lnStyleLst":for(f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),k=0;k<f.length;k++)this.connLineStyles.push(new g.mxgraph.io.vsdx.theme.LineStyle(f[k]))}break;case "vt:lineStyles":b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(d=0;d<b.length;d++)switch(f=b[d],f.nodeName){case "vt:fmtConnectorSchemeLineStyles":f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);-for(k=0;k<f.length;k++)this.connLineStylesExt.push(new g.mxgraph.io.vsdx.theme.LineStyleExt(f[k]));break;case "vt:fmtSchemeLineStyles":for(f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),k=0;k<f.length;k++)this.lineStylesExt.push(new g.mxgraph.io.vsdx.theme.LineStyleExt(f[k]))}break;case "vt:fontStylesGroup":b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(d=0;d<b.length;d++)switch(f=b[d],f.nodeName){case "vt:connectorFontStyles":this.fillFontStyles(f,this.connFontColors,this.connFontStyles);-break;case "vt:fontStyles":this.fillFontStyles(f,this.fontColors,this.fontStyles)}break;case "vt:variationStyleSchemeLst":for(b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b),f=d=0;f<b.length;f++){k=b[f];this.variantEmbellishment[d]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(k,"embellishment");k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(k);for(var n=0,q=0;q<k.length;q++){var t=k[q];this.variantFillIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,-"fillIdx");this.variantLineIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,"lineIdx");this.variantEffectIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,"effectIdx");this.variantFontIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,"fontIdx");n++}d++}}}};h.prototype.fillFontStyles=function(c,a,b){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var d=0;d<c.length;d++){var f=-c[d];b.push(g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"style"));f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(f);null!=f&&a.push(g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(f)))}};h.prototype.processFormats=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var a=0;a<c.length;a++){var b=c[a];switch(b.nodeName){case "a:fillStyleLst":b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);-for(var d=0;d<b.length;d++)this.fillStyles.push(g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(b[d]));break;case "a:lnStyleLst":for(b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b),d=0;d<b.length;d++)this.lineStyles.push(new g.mxgraph.io.vsdx.theme.LineStyle(b[d]))}}};h.prototype.processFonts=function(c){};h.prototype.processColors=function(c){for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType){var a=c,b=a.nodeName;a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);var d=-(d=b)&&d.equals?d.equals("a:extLst"):"a:extLst"===d;d?3===a.length&&(0>this.themeIndex&&this.extractThemeIndex(a[0]),this.addBkgndColor(a[1]),this.addVariantColors(a[2])):(b=b.substring(2),0<a.length&&this.addBasicColor(b,a[0]))}c=c.nextSibling}};h.prototype.addVariantColors=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c);if(null!=c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var a=0,b=0;b<c.length;b++){var d=c[b];this.addVariantColorsSet(a++,d)}}};h.prototype.addVariantColorsSet=-function(c,a){var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);this.isMonotoneVariant[c]=a.hasAttribute("monotone");for(a=0;a<b.length;a++){var d=b[a];switch(d.nodeName){case "vt:varColor1":this.variantsColors[c][0]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor2":this.variantsColors[c][1]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));-break;case "vt:varColor3":this.variantsColors[c][2]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor4":this.variantsColors[c][3]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor5":this.variantsColors[c][4]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));-break;case "vt:varColor6":this.variantsColors[c][5]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor7":this.variantsColors[c][6]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d))}}};h.prototype.addBkgndColor=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c);null!=c&&(this.bkgndColor=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c)))};-h.prototype.extractThemeIndex=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c);null!=c&&(this.themeIndex=parseInt(c.getAttribute("schemeEnum")))};h.prototype.addBasicColor=function(c,a){this.baseColors[c]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(a)};h.prototype.getSchemeColor=function(c){this.processTheme();var a=this.baseColors;c=a[c]?a[c]:null;return null!=c?c.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this):this.defaultClr};h.prototype.getStyleColor=function(c){this.processTheme();-if(8>c){var a=function(d,f){return d[f]?d[f]:null}(this.baseColors,function(d,f){null==d.entries&&(d.entries=[]);for(var k=0;k<d.entries.length;k++)if(null!=d.entries[k].key.equals&&d.entries[k].key.equals(f)||d.entries[k].key===f)return d.entries[k].value;return null}(h.colorIds_$LI$(),c));if(null!=a)return a.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}else if(8===c){if(null!=this.bkgndColor)return this.bkgndColor.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}else{a=null;var b=0;200<=c?b=c-200:-100<=c&&(b=c-100);0<=b&&6>=b&&(a=this.variantsColors[this.themeVariant][b]);if(null!=a)return a.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}return this.defaultClr};h.prototype.getFillGraientColor=function(c){return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(c,!0)};h.prototype.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(c,!1)};h.prototype.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean=-function(c,a){this.processTheme();var b=c.getQuickStyleFillColor(),d=null;switch(c.getQuickStyleFillMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:d=this.fillStyles[c.getQuickStyleFillMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&(b=100),d=c.getQuickStyleFillMatrix()-100,d=this.fillStyles[this.variantFillIdx[this.themeVariant][d]-1]}a=null!=d?a?null!=d&&d instanceof g.mxgraph.io.vsdx.theme.GradFill?d.applyStyle(b,this).getGradientClr():null:-d.applyStyle(b,this):a?null:this.getStyleColor(b);b=c.getQuickStyleVariation();if(null!=a&&0<(b&8)){b=this.getStyleColor(8).toHsl();c=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);d=c.toHsl();var f=a.toHsl();.1666<=Math.abs(b.getLum()-f.getLum())||(.7292>=b.getLum()?a=new g.mxgraph.io.vsdx.theme.Color(255,255,255):Math.abs(b.getLum()-d.getLum())>Math.abs(b.getLum()-f.getLum())&&(a=c))}return a};h.prototype.getFillColor=function(c,a){if(!(null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||-null===c)||"boolean"!==typeof a&&null!==a){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a)return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);throw Error("invalid overload");}return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(c,a)};h.prototype.getLineStyle=function(c,a){this.processTheme();var b=null;switch(c){case 1:case 2:case 3:case 4:case 5:case 6:b=a[c-1];break;case 100:case 101:case 102:case 103:b=a===this.lineStyles?-this.lineStyles[this.variantLineIdx[this.themeVariant][c-100]-1]:this.defaultLineStyle}return b};h.prototype.getLineStyleExt=function(c,a){this.processTheme();var b=null;switch(c){case 0:case 1:case 2:case 3:case 4:case 5:case 6:b=a[c]}return b};h.prototype.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(c,a){this.processTheme();var b=c.getQuickStyleLineColor();a=this.getLineStyle(c.getQuickStyleLineMatrix(),a);switch(c.getQuickStyleLineMatrix()){case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&-(b=100)}b=null!=a?a.getLineColor(b,this):this.getStyleColor(b);if(0<(c.getQuickStyleVariation()&4)){a=this.getStyleColor(8).toHsl();c=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);var d=c.toHsl(),f=b.toHsl();.1666<=Math.abs(a.getLum()-f.getLum())||(.7292>=a.getLum()?b=new g.mxgraph.io.vsdx.theme.Color(255,255,255):Math.abs(a.getLum()-d.getLum())>Math.abs(a.getLum()-f.getLum())&&(b=c))}return b};h.prototype.getLineColor=function(c,a){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||-null===c)&&(null!=a&&a instanceof Array||null===a))return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,a);if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a)return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);throw Error("invalid overload");};h.prototype.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.lineStyles)};-h.prototype.getConnLineColor=function(c){return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.connLineStyles)};h.prototype.getDefaultLineClr=function(){return this.defaultLineClr};h.prototype.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList=function(c,a,b){a=this.getLineStyleExt(c.getQuickStyleLineMatrix(),a);if(null!=a)return a.isDashed();c=this.getLineStyle(c.getQuickStyleLineMatrix(),b);return null!=c?c.isDashed():-!1};h.prototype.isLineDashed=function(c,a,b){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&(null!=a&&a instanceof Array||null===a)&&(null!=b&&b instanceof Array||null===b))return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,a,b);if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a&&void 0===b)return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);throw Error("invalid overload");-};h.prototype.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,this.lineStylesExt,this.lineStyles)};h.prototype.isConnLineDashed=function(c){return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,this.connLineStylesExt,this.connLineStyles)};h.prototype.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList=-function(c,a,b){a=this.getLineStyleExt(c.getQuickStyleLineMatrix(),a);if(null!=a)return a.getLineDashPattern();c=this.getLineStyle(c.getQuickStyleLineMatrix(),b);return null!=c?c.getLineDashPattern():null};h.prototype.getLineDashPattern=function(c,a,b){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&(null!=a&&a instanceof Array||null===a)&&(null!=b&&b instanceof Array||null===b))return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,-a,b);if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a&&void 0===b)return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);throw Error("invalid overload");};h.prototype.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,this.lineStylesExt,this.lineStyles)};h.prototype.getConnLineDashPattern=function(c){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,-this.connLineStylesExt,this.connLineStyles)};h.prototype.getArrowSize=function(c,a,b,d){b=this.getLineStyleExt(c.getQuickStyleLineMatrix(),b);if(null!=b)return a?b.getStartSize():b.getEndSize();c=this.getLineStyle(c.getQuickStyleLineMatrix(),d);return null!=c?a?c.getStartSize():c.getEndSize():4};h.prototype.getStartSize=function(c){return this.getArrowSize(c,!0,this.lineStylesExt,this.lineStyles)};h.prototype.getConnStartSize=function(c){return this.getArrowSize(c,!0,this.connLineStylesExt,this.connLineStyles)};-h.prototype.getEndSize=function(c){return this.getArrowSize(c,!1,this.lineStylesExt,this.lineStyles)};h.prototype.getConnEndSize=function(c){return this.getArrowSize(c,!1,this.connLineStylesExt,this.connLineStyles)};h.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(c,a){this.processTheme();var b=c.getQuickStyleFontColor(),d=null;switch(c.getQuickStyleFontMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:d=a[c.getQuickStyleFontMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&-(b=100),d=c.getQuickStyleFontMatrix()-100,a!==this.fontColors?(a=this.baseColors,d=a.dk1?a.dk1:null):d=a[this.variantFontIdx[this.themeVariant][d]-1]}b=null!=d?d.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(b,this):this.getStyleColor(b);if(0<(c.getQuickStyleVariation()&2)){d=this.getStyleColor(8).toHsl();var f=b.toHsl();a=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);var k=a.toHsl();c=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);var n=c.toHsl();.1666<=Math.abs(d.getLum()--f.getLum())||(.7292>=d.getLum()?b=new g.mxgraph.io.vsdx.theme.Color(255,255,255):(n=Math.abs(d.getLum()-n.getLum()),k=Math.abs(d.getLum()-k.getLum()),d=Math.abs(d.getLum()-f.getLum()),d=Math.max(n,k,d),d==n?b=c:d==k&&(b=a)))}return b};h.prototype.getFontColor=function(c,a){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&(null!=a&&a instanceof Array||null===a))return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,a);if((null!=c&&c instanceof-g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a)return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);throw Error("invalid overload");};h.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.fontColors)};h.prototype.getConnFontColor=function(c){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.connFontColors)};h.prototype.getArrowType=-function(c,a,b,d){b=this.getLineStyleExt(c.getQuickStyleLineMatrix(),b);if(null!=b)return a?b.getStart():b.getEnd();c=this.getLineStyle(c.getQuickStyleLineMatrix(),d);return null!=c?a?c.getStart():c.getEnd():0};h.prototype.getEdgeMarker=function(c,a){return this.getArrowType(a,c,this.lineStylesExt,this.lineStyles)};h.prototype.getConnEdgeMarker=function(c,a){return this.getArrowType(a,c,this.connLineStylesExt,this.connLineStyles)};h.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=-function(c,a){c=this.getLineStyle(c.getQuickStyleLineMatrix(),a);return null!=c?c.getLineWidth():0};h.prototype.getLineWidth=function(c,a){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&(null!=a&&a instanceof Array||null===a))return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,a);if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a)return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);-throw Error("invalid overload");};h.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.lineStyles)};h.prototype.getConnLineWidth=function(c){return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.connLineStyles)};return h}();m.__static_initialized=!1;B.mxVsdxTheme=m;m.__class="com.mxgraph.io.vsdx.mxVsdxTheme"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io=+55;h.themesIds_$LI$().Pen=56;h.themesIds_$LI$().Marker=57;h.themesIds_$LI$().Whiteboard=58};h.colorIds_$LI$=function(){h.__static_initialize();null==h.colorIds&&(h.colorIds={});return h.colorIds};h.__static_initializer_1=function(){(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),+0,"dk1");(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),1,"lt1");(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===+a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),2,"accent1");(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),3,"accent2");+(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),4,"accent3");(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=+c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),5,"accent4");(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),6,"accent5");(function(b,a,c){null==+b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),7,"accent6")};h.prototype.getThemeIndex=function(){return this.themeIndex};h.prototype.setVariant=function(b){this.themeVariant=b};h.prototype.isPure=function(){return this.__isPure};h.prototype.processTheme=+function(){if(!this.isProcessed){try{for(var b=this.theme.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(b.nodeName,"a:themeElements"))for(var a=b.firstChild;null!=a;){if(null!=a&&1==a.nodeType){var c=a,d=c.nodeName;(function(f,k){return f&&f.equals?f.equals(k):f===k})(d,"a:clrScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,c.getAttribute("name"))||(this.__isPure=!1),this.processColors(c)):function(f,k){return f&&f.equals?+f.equals(k):f===k}(d,"a:fontScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,c.getAttribute("name"))||(this.__isPure=!1),this.processFonts(c)):function(f,k){return f&&f.equals?f.equals(k):f===k}(d,"a:fmtScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,c.getAttribute("name"))||(this.__isPure=!1),this.processFormats(c)):function(f,k){return f&&f.equals?f.equals(k):f===k}(d,"a:extLst")&&this.processExtras(c)}a=a.nextSibling}b=b.nextSibling}}catch(f){}this.isProcessed=+!0}};h.prototype.processExtras=function(b){b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var a=0;a<b.length;a++){var c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b[a]);switch(c.nodeName){case "vt:fmtConnectorScheme":var d=this.name;var f=c.getAttribute("name");d=d&&d.equals?d.equals(f):d===f;d||(this.__isPure=!1);c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(d=0;d<c.length;d++)switch(f=c[d],f.nodeName){case "a:fillStyleLst":f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);+for(var k=0;k<f.length;k++)this.connFillStyles.push(g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(f[k]));break;case "a:lnStyleLst":for(f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),k=0;k<f.length;k++)this.connLineStyles.push(new g.mxgraph.io.vsdx.theme.LineStyle(f[k]))}break;case "vt:lineStyles":c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(d=0;d<c.length;d++)switch(f=c[d],f.nodeName){case "vt:fmtConnectorSchemeLineStyles":f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);+for(k=0;k<f.length;k++)this.connLineStylesExt.push(new g.mxgraph.io.vsdx.theme.LineStyleExt(f[k]));break;case "vt:fmtSchemeLineStyles":for(f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),k=0;k<f.length;k++)this.lineStylesExt.push(new g.mxgraph.io.vsdx.theme.LineStyleExt(f[k]))}break;case "vt:fontStylesGroup":c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(d=0;d<c.length;d++)switch(f=c[d],f.nodeName){case "vt:connectorFontStyles":this.fillFontStyles(f,this.connFontColors,this.connFontStyles);+break;case "vt:fontStyles":this.fillFontStyles(f,this.fontColors,this.fontStyles)}break;case "vt:variationStyleSchemeLst":for(c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c),f=d=0;f<c.length;f++){k=c[f];this.variantEmbellishment[d]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(k,"embellishment");k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(k);for(var n=0,q=0;q<k.length;q++){var t=k[q];this.variantFillIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,+"fillIdx");this.variantLineIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,"lineIdx");this.variantEffectIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,"effectIdx");this.variantFontIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,"fontIdx");n++}d++}}}};h.prototype.fillFontStyles=function(b,a,c){b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var d=0;d<b.length;d++){var f=+b[d];c.push(g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"style"));f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(f);null!=f&&a.push(g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(f)))}};h.prototype.processFormats=function(b){b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var a=0;a<b.length;a++){var c=b[a];switch(c.nodeName){case "a:fillStyleLst":c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);+for(var d=0;d<c.length;d++)this.fillStyles.push(g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(c[d]));break;case "a:lnStyleLst":for(c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c),d=0;d<c.length;d++)this.lineStyles.push(new g.mxgraph.io.vsdx.theme.LineStyle(c[d]))}}};h.prototype.processFonts=function(b){};h.prototype.processColors=function(b){for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType){var a=b,c=a.nodeName;a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);var d=+(d=c)&&d.equals?d.equals("a:extLst"):"a:extLst"===d;d?3===a.length&&(0>this.themeIndex&&this.extractThemeIndex(a[0]),this.addBkgndColor(a[1]),this.addVariantColors(a[2])):(c=c.substring(2),0<a.length&&this.addBasicColor(c,a[0]))}b=b.nextSibling}};h.prototype.addVariantColors=function(b){b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b);if(null!=b){b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var a=0,c=0;c<b.length;c++){var d=b[c];this.addVariantColorsSet(a++,d)}}};h.prototype.addVariantColorsSet=+function(b,a){var c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);this.isMonotoneVariant[b]=a.hasAttribute("monotone");for(a=0;a<c.length;a++){var d=c[a];switch(d.nodeName){case "vt:varColor1":this.variantsColors[b][0]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor2":this.variantsColors[b][1]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));+break;case "vt:varColor3":this.variantsColors[b][2]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor4":this.variantsColors[b][3]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor5":this.variantsColors[b][4]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));+break;case "vt:varColor6":this.variantsColors[b][5]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor7":this.variantsColors[b][6]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d))}}};h.prototype.addBkgndColor=function(b){b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b);null!=b&&(this.bkgndColor=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b)))};+h.prototype.extractThemeIndex=function(b){b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b);null!=b&&(this.themeIndex=parseInt(b.getAttribute("schemeEnum")))};h.prototype.addBasicColor=function(b,a){this.baseColors[b]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(a)};h.prototype.getSchemeColor=function(b){this.processTheme();var a=this.baseColors;b=a[b]?a[b]:null;return null!=b?b.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this):this.defaultClr};h.prototype.getStyleColor=function(b){this.processTheme();+if(8>b){var a=function(d,f){return d[f]?d[f]:null}(this.baseColors,function(d,f){null==d.entries&&(d.entries=[]);for(var k=0;k<d.entries.length;k++)if(null!=d.entries[k].key.equals&&d.entries[k].key.equals(f)||d.entries[k].key===f)return d.entries[k].value;return null}(h.colorIds_$LI$(),b));if(null!=a)return a.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}else if(8===b){if(null!=this.bkgndColor)return this.bkgndColor.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}else{a=null;var c=0;200<=b?c=b-200:+100<=b&&(c=b-100);0<=c&&6>=c&&(a=this.variantsColors[this.themeVariant][c]);if(null!=a)return a.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}return this.defaultClr};h.prototype.getFillGraientColor=function(b){return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(b,!0)};h.prototype.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(b,!1)};h.prototype.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean=+function(b,a){this.processTheme();var c=b.getQuickStyleFillColor(),d=null;switch(b.getQuickStyleFillMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:d=this.fillStyles[b.getQuickStyleFillMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&(c=100),d=b.getQuickStyleFillMatrix()-100,d=this.fillStyles[this.variantFillIdx[this.themeVariant][d]-1]}a=null!=d?a?null!=d&&d instanceof g.mxgraph.io.vsdx.theme.GradFill?d.applyStyle(c,this).getGradientClr():null:+d.applyStyle(c,this):a?null:this.getStyleColor(c);c=b.getQuickStyleVariation();if(null!=a&&0<(c&8)){c=this.getStyleColor(8).toHsl();b=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);d=b.toHsl();var f=a.toHsl();.1666<=Math.abs(c.getLum()-f.getLum())||(.7292>=c.getLum()?a=new g.mxgraph.io.vsdx.theme.Color(255,255,255):Math.abs(c.getLum()-d.getLum())>Math.abs(c.getLum()-f.getLum())&&(a=b))}return a};h.prototype.getFillColor=function(b,a){if(!(null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||+null===b)||"boolean"!==typeof a&&null!==a){if((null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");}return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(b,a)};h.prototype.getLineStyle=function(b,a){this.processTheme();var c=null;switch(b){case 1:case 2:case 3:case 4:case 5:case 6:c=a[b-1];break;case 100:case 101:case 102:case 103:c=a===this.lineStyles?+this.lineStyles[this.variantLineIdx[this.themeVariant][b-100]-1]:this.defaultLineStyle}return c};h.prototype.getLineStyleExt=function(b,a){this.processTheme();var c=null;switch(b){case 0:case 1:case 2:case 3:case 4:case 5:case 6:c=a[b]}return c};h.prototype.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(b,a){this.processTheme();var c=b.getQuickStyleLineColor();a=this.getLineStyle(b.getQuickStyleLineMatrix(),a);switch(b.getQuickStyleLineMatrix()){case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&+(c=100)}c=null!=a?a.getLineColor(c,this):this.getStyleColor(c);if(0<(b.getQuickStyleVariation()&4)){a=this.getStyleColor(8).toHsl();b=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);var d=b.toHsl(),f=c.toHsl();.1666<=Math.abs(a.getLum()-f.getLum())||(.7292>=a.getLum()?c=new g.mxgraph.io.vsdx.theme.Color(255,255,255):Math.abs(a.getLum()-d.getLum())>Math.abs(a.getLum()-f.getLum())&&(c=b))}return c};h.prototype.getLineColor=function(b,a){if((null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||+null===b)&&(null!=a&&a instanceof Array||null===a))return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,a);if((null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};h.prototype.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.lineStyles)};+h.prototype.getConnLineColor=function(b){return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.connLineStyles)};h.prototype.getDefaultLineClr=function(){return this.defaultLineClr};h.prototype.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList=function(b,a,c){a=this.getLineStyleExt(b.getQuickStyleLineMatrix(),a);if(null!=a)return a.isDashed();b=this.getLineStyle(b.getQuickStyleLineMatrix(),c);return null!=b?b.isDashed():+!1};h.prototype.isLineDashed=function(b,a,c){if((null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a)&&(null!=c&&c instanceof Array||null===c))return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,a,c);if((null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a&&void 0===c)return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");+};h.prototype.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,this.lineStylesExt,this.lineStyles)};h.prototype.isConnLineDashed=function(b){return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,this.connLineStylesExt,this.connLineStyles)};h.prototype.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList=+function(b,a,c){a=this.getLineStyleExt(b.getQuickStyleLineMatrix(),a);if(null!=a)return a.getLineDashPattern();b=this.getLineStyle(b.getQuickStyleLineMatrix(),c);return null!=b?b.getLineDashPattern():null};h.prototype.getLineDashPattern=function(b,a,c){if((null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a)&&(null!=c&&c instanceof Array||null===c))return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,+a,c);if((null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a&&void 0===c)return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};h.prototype.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,this.lineStylesExt,this.lineStyles)};h.prototype.getConnLineDashPattern=function(b){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,+this.connLineStylesExt,this.connLineStyles)};h.prototype.getArrowSize=function(b,a,c,d){c=this.getLineStyleExt(b.getQuickStyleLineMatrix(),c);if(null!=c)return a?c.getStartSize():c.getEndSize();b=this.getLineStyle(b.getQuickStyleLineMatrix(),d);return null!=b?a?b.getStartSize():b.getEndSize():4};h.prototype.getStartSize=function(b){return this.getArrowSize(b,!0,this.lineStylesExt,this.lineStyles)};h.prototype.getConnStartSize=function(b){return this.getArrowSize(b,!0,this.connLineStylesExt,this.connLineStyles)};+h.prototype.getEndSize=function(b){return this.getArrowSize(b,!1,this.lineStylesExt,this.lineStyles)};h.prototype.getConnEndSize=function(b){return this.getArrowSize(b,!1,this.connLineStylesExt,this.connLineStyles)};h.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(b,a){this.processTheme();var c=b.getQuickStyleFontColor(),d=null;switch(b.getQuickStyleFontMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:d=a[b.getQuickStyleFontMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&+(c=100),d=b.getQuickStyleFontMatrix()-100,a!==this.fontColors?(a=this.baseColors,d=a.dk1?a.dk1:null):d=a[this.variantFontIdx[this.themeVariant][d]-1]}c=null!=d?d.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(c,this):this.getStyleColor(c);if(0<(b.getQuickStyleVariation()&2)){d=this.getStyleColor(8).toHsl();var f=c.toHsl();a=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);var k=a.toHsl();b=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);var n=b.toHsl();.1666<=Math.abs(d.getLum()-+f.getLum())||(.7292>=d.getLum()?c=new g.mxgraph.io.vsdx.theme.Color(255,255,255):(n=Math.abs(d.getLum()-n.getLum()),k=Math.abs(d.getLum()-k.getLum()),d=Math.abs(d.getLum()-f.getLum()),d=Math.max(n,k,d),d==n?c=b:d==k&&(c=a)))}return c};h.prototype.getFontColor=function(b,a){if((null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a))return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,a);if((null!=b&&b instanceof+g.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};h.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.fontColors)};h.prototype.getConnFontColor=function(b){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.connFontColors)};h.prototype.getArrowType=+function(b,a,c,d){c=this.getLineStyleExt(b.getQuickStyleLineMatrix(),c);if(null!=c)return a?c.getStart():c.getEnd();b=this.getLineStyle(b.getQuickStyleLineMatrix(),d);return null!=b?a?b.getStart():b.getEnd():0};h.prototype.getEdgeMarker=function(b,a){return this.getArrowType(a,b,this.lineStylesExt,this.lineStyles)};h.prototype.getConnEdgeMarker=function(b,a){return this.getArrowType(a,b,this.connLineStylesExt,this.connLineStyles)};h.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=+function(b,a){b=this.getLineStyle(b.getQuickStyleLineMatrix(),a);return null!=b?b.getLineWidth():0};h.prototype.getLineWidth=function(b,a){if((null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a))return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,a);if((null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);+throw Error("invalid overload");};h.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.lineStyles)};h.prototype.getConnLineWidth=function(b){return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.connLineStyles)};return h}();m.__static_initialized=!1;B.mxVsdxTheme=m;m.__class="com.mxgraph.io.vsdx.mxVsdxTheme"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(){}h.conversionFactor_$LI$=function(){null==h.conversionFactor&&(h.conversionFactor=h.screenCoordinatesPerCm*h.CENTIMETERS_PER_INCHES);return h.conversionFactor};h.getDirectChildNamedElements=function(c,a){var b=[];for(c=c.firstChild;null!=c;c=c.nextSibling){var d;if(d=null!=c&&1==c.nodeType){d=a;var f=c.nodeName;d=d&&d.equals?d.equals(f):d===f}d&&b.push(c)}return b};h.getDirectChildElements=function(c){var a=[];for(c=-c.firstChild;null!=c;c=c.nextSibling)null!=c&&1==c.nodeType&&a.push(c);return a};h.getDirectFirstChildElement=function(c){for(c=c.firstChild;null!=c;c=c.nextSibling)if(null!=c&&1==c.nodeType)return c;return null};h.getIntAttr$org_w3c_dom_Element$java_lang_String$int=function(c,a,b){try{var d=c.getAttribute(a);if(null!=d)return parseInt(d)}catch(f){}return b};h.getIntAttr=function(c,a,b){if((null==c||1!=c.nodeType)&&null!==c||"string"!==typeof a&&null!==a||"number"!==typeof b&&null!==b){if((null==-c||1!=c.nodeType)&&null!==c||"string"!==typeof a&&null!==a||void 0!==b)throw Error("invalid overload");return g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(c,a)}return g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String$int(c,a,b)};h.getIntAttr$org_w3c_dom_Element$java_lang_String=function(c,a){return h.getIntAttr$org_w3c_dom_Element$java_lang_String$int(c,a,0)};h.getStyleString=function(c,a){for(var b="",d=function(q){var t=0;return{next:function(){return t<-q.length?q[t++]:null},hasNext:function(){return t<q.length}}}(function(q){return Object.keys(q).map(function(t){return q[t]})}(c)),f=function(q){var t=0;return{next:function(){return t<q.length?q[t++]:null},hasNext:function(){return t<q.length}}}(Object.keys(c));f.hasNext();){var k=f.next(),n=d.next();if(!function(q,t){return q&&q.equals?q.equals(t):q===t}(k,mxConstants.STYLE_SHAPE)||!function(q,t,A){void 0===A&&(A=0);return q.substr(A,t.length)===t}(c[k]?c[k]:null,"image")&&!function(q,t,A){void 0===-A&&(A=0);return q.substr(A,t.length)===t}(c[k]?c[k]:null,"rounded="))try{b=b+k+a}catch(q){}b=b+n+";"}return b};h.surroundByTags=function(c,a,b){return"<"+a+(b?' style="'+b+'"':"")+">"+c+"</"+a+">"};h.htmlEntities=function(c){return c.replace(RegExp("&","g"),"&").replace(RegExp('"',"g"),""").replace(RegExp("'","g"),"′").replace(RegExp("<","g"),"<").replace(RegExp(">","g"),">")};h.toInitialCapital=function(c){c=c.split(" ");for(var a="",b=0;b<c.length;b++){var d=c[b],f=d.substring(0,-1);d=d.substring(1);f=f.toUpperCase();a+=f+d}return a.substring(0,a.length)};h.toSmallCaps=function(c,a){var b="",d=b;if(a&&a.equals?a.equals(d):a===d)b=c;else for(c=c.split(""),d=0;d<c.length;d++){var f=c[d];(null==f.charCodeAt?f:f.charCodeAt(0))>=(null=="a".charCodeAt?"a":97)&&(null==f.charCodeAt?f:f.charCodeAt(0))<=(null=="z".charCodeAt?"z":122)?(f=(new String(f)).toString(),f=f.toUpperCase(),b+='<font style="font-size:'+parseFloat(a)/1.28+'px">'+f+"</font>"):b+=f}return b};h.getStyleMap=function(c,-a){var b={};c=c.split(";");for(var d=0;d<c.length;d++){var f=c[d],k=f.indexOf(a),n=f.substring(0,k);f=f.substring(k+1);b[n]=f}return b};h.isInsideTriangle=function(c,a,b,d,f,k,n,q){var t=(c-f)*(d-k)-(b-f)*(a-k);f=(c-n)*(k-q)-(f-n)*(a-q);c=(c-b)*(q-d)-(n-b)*(a-d);return!((0>t||0>f||0>c)&&(0<t||0<f||0<c))};return h}();m.screenCoordinatesPerCm=40;m.CENTIMETERS_PER_INCHES=2.54;B.mxVsdxUtils=m;m.__class="com.mxgraph.io.vsdx.mxVsdxUtils"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(){}h.conversionFactor_$LI$=function(){null==h.conversionFactor&&(h.conversionFactor=h.screenCoordinatesPerCm*h.CENTIMETERS_PER_INCHES);return h.conversionFactor};h.getDirectChildNamedElements=function(b,a){var c=[];for(b=b.firstChild;null!=b;b=b.nextSibling){var d;if(d=null!=b&&1==b.nodeType){d=a;var f=b.nodeName;d=d&&d.equals?d.equals(f):d===f}d&&c.push(b)}return c};h.getDirectChildElements=function(b){var a=[];for(b=+b.firstChild;null!=b;b=b.nextSibling)null!=b&&1==b.nodeType&&a.push(b);return a};h.getDirectFirstChildElement=function(b){for(b=b.firstChild;null!=b;b=b.nextSibling)if(null!=b&&1==b.nodeType)return b;return null};h.getIntAttr$org_w3c_dom_Element$java_lang_String$int=function(b,a,c){try{var d=b.getAttribute(a);if(null!=d)return parseInt(d)}catch(f){}return c};h.getIntAttr=function(b,a,c){if((null==b||1!=b.nodeType)&&null!==b||"string"!==typeof a&&null!==a||"number"!==typeof c&&null!==c){if((null==+b||1!=b.nodeType)&&null!==b||"string"!==typeof a&&null!==a||void 0!==c)throw Error("invalid overload");return g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(b,a)}return g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String$int(b,a,c)};h.getIntAttr$org_w3c_dom_Element$java_lang_String=function(b,a){return h.getIntAttr$org_w3c_dom_Element$java_lang_String$int(b,a,0)};h.getStyleString=function(b,a){for(var c="",d=function(q){var t=0;return{next:function(){return t<+q.length?q[t++]:null},hasNext:function(){return t<q.length}}}(function(q){return Object.keys(q).map(function(t){return q[t]})}(b)),f=function(q){var t=0;return{next:function(){return t<q.length?q[t++]:null},hasNext:function(){return t<q.length}}}(Object.keys(b));f.hasNext();){var k=f.next(),n=d.next();if(!function(q,t){return q&&q.equals?q.equals(t):q===t}(k,mxConstants.STYLE_SHAPE)||!function(q,t,A){void 0===A&&(A=0);return q.substr(A,t.length)===t}(b[k]?b[k]:null,"image")&&!function(q,t,A){void 0===+A&&(A=0);return q.substr(A,t.length)===t}(b[k]?b[k]:null,"rounded="))try{c=c+k+a}catch(q){}c=c+n+";"}return c};h.surroundByTags=function(b,a,c){return"<"+a+(c?' style="'+c+'"':"")+">"+b+"</"+a+">"};h.htmlEntities=function(b){return b.replace(RegExp("&","g"),"&").replace(RegExp('"',"g"),""").replace(RegExp("'","g"),"′").replace(RegExp("<","g"),"<").replace(RegExp(">","g"),">")};h.toInitialCapital=function(b){b=b.split(" ");for(var a="",c=0;c<b.length;c++){var d=b[c],f=d.substring(0,+1);d=d.substring(1);f=f.toUpperCase();a+=f+d}return a.substring(0,a.length)};h.toSmallCaps=function(b,a){var c="",d=c;if(a&&a.equals?a.equals(d):a===d)c=b;else for(b=b.split(""),d=0;d<b.length;d++){var f=b[d];(null==f.charCodeAt?f:f.charCodeAt(0))>=(null=="a".charCodeAt?"a":97)&&(null==f.charCodeAt?f:f.charCodeAt(0))<=(null=="z".charCodeAt?"z":122)?(f=(new String(f)).toString(),f=f.toUpperCase(),c+='<font style="font-size:'+parseFloat(a)/1.28+'px">'+f+"</font>"):c+=f}return c};h.getStyleMap=function(b,+a){var c={};b=b.split(";");for(var d=0;d<b.length;d++){var f=b[d],k=f.indexOf(a),n=f.substring(0,k);f=f.substring(k+1);c[n]=f}return c};h.isInsideTriangle=function(b,a,c,d,f,k,n,q){var t=(b-f)*(d-k)-(c-f)*(a-k);f=(b-n)*(k-q)-(f-n)*(a-q);b=(b-c)*(q-d)-(n-c)*(a-d);return!((0>t||0>f||0>b)&&(0<t||0<f||0<b))};return h}();m.screenCoordinatesPerCm=40;m.CENTIMETERS_PER_INCHES=2.54;B.mxVsdxUtils=m;m.__class="com.mxgraph.io.vsdx.mxVsdxUtils"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a,b,d){this.paraIndex=this.fields=this.charIndices=this.values=null;this.values=[];this.values.push(c);this.charIndices=[];this.charIndices.push(a);this.fields=[];this.fields.push(d);this.paraIndex=b}h.prototype.addText=function(c,a,b){this.values.push(c);this.charIndices.push(a);this.fields.push(b)};h.prototype.getParagraphIndex=function(){return this.paraIndex};h.prototype.getValue=function(c){return this.values[c]};h.prototype.numValues=-function(){return this.values.length};h.prototype.getChar=function(c){return this.charIndices[c]};h.prototype.getField=function(c){return this.fields[c]};return h}();B.Paragraph=m;m.__class="com.mxgraph.io.vsdx.Paragraph"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c){this.elem=c}h.prototype.getIndexedCell=function(c,a){for(var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.elem,"Row"),d=0;d<b.length;d++){var f=b[d],k=f.getAttribute("IX");if(function(t,A){return t&&t.equals?t.equals(A):t===A}(k,c)||null==c){f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Cell");for(var n=0;n<f.length;n++){var q=f[n];k=q.getAttribute("N");if(function(t,A){return t&&+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b,a,c,d){this.paraIndex=this.fields=this.charIndices=this.values=null;this.values=[];this.values.push(b);this.charIndices=[];this.charIndices.push(a);this.fields=[];this.fields.push(d);this.paraIndex=c}h.prototype.addText=function(b,a,c){this.values.push(b);this.charIndices.push(a);this.fields.push(c)};h.prototype.getParagraphIndex=function(){return this.paraIndex};h.prototype.getValue=function(b){return this.values[b]};h.prototype.numValues=+function(){return this.values.length};h.prototype.getChar=function(b){return this.charIndices[b]};h.prototype.getField=function(b){return this.fields[b]};return h}();B.Paragraph=m;m.__class="com.mxgraph.io.vsdx.Paragraph"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b){this.elem=b}h.prototype.getIndexedCell=function(b,a){for(var c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.elem,"Row"),d=0;d<c.length;d++){var f=c[d],k=f.getAttribute("IX");if(function(t,A){return t&&t.equals?t.equals(A):t===A}(k,b)||null==b){f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Cell");for(var n=0;n<f.length;n++){var q=f[n];k=q.getAttribute("N");if(function(t,A){return t&&t.equals?t.equals(A):t===A}(k,a))return q}}}return null};return h}();B.Section=m;m.__class="com.mxgraph.io.vsdx.Section"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a){this.pageNumber=0;this.pageNumber=c;this.Id=a}h.prototype.getId=function(){return this.Id};h.prototype.getPageNumber=function(){return this.pageNumber};h.prototype.equals=function(c){return null==c||this.constructor!==c.constructor||this.pageNumber!==c.pageNumber||this.Id!==c.Id?!1:!0};h.prototype.hashCode=function(){return 1E5*this.pageNumber+this.Id};return h}();B.ShapePageId=m;m.__class="com.mxgraph.io.vsdx.ShapePageId"})(z.vsdx||+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b,a){this.pageNumber=0;this.pageNumber=b;this.Id=a}h.prototype.getId=function(){return this.Id};h.prototype.getPageNumber=function(){return this.pageNumber};h.prototype.equals=function(b){return null==b||this.constructor!==b.constructor||this.pageNumber!==b.pageNumber||this.Id!==b.Id?!1:!0};h.prototype.hashCode=function(){return 1E5*this.pageNumber+this.Id};return h}();B.ShapePageId=m;m.__class="com.mxgraph.io.vsdx.ShapePageId"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d){this.blue=this.green=this.red=0;this.gradientClr=null;this.red=a;this.green=b;this.blue=d}c.NONE_$LI$=function(){null==c.NONE&&(c.NONE=new c(-1,-1,-1));return c.NONE};c.prototype.getRed=function(){return this.red};c.prototype.setRed=function(a){this.red=a};c.prototype.getGreen=function(){return this.green};c.prototype.setGreen=function(a){this.green=a};c.prototype.getBlue=function(){return this.blue};-c.prototype.setBlue=function(a){this.blue=a};c.prototype.toHsl=function(){var a=this.getRed()/255,b=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(b,d)),k=Math.min(a,Math.min(b,d)),n=(f+k)/2;if(f===k)a=k=0;else{var q=f-k;k=.5<n?q/(2-f-k):q/(f+k);a=(f===a?(b-d)/q+(b<d?6:0):f===b?(d-a)/q+2:(a-b)/q+4)/6}return new g.mxgraph.io.vsdx.theme.HSLColor(a,k,n)};c.prototype.toHsv=function(){var a=this.getRed()/255,b=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(b,d)),k=Math.min(a,-Math.min(b,d)),n=f-k;a=f===k?0:(f===a?(b-d)/n+(b<d?6:0):f===b?(d-a)/n+2:(a-b)/n+4)/6;return new g.mxgraph.io.vsdx.theme.HSVColor(a,0===f?0:n/f,f)};c.decodeColorHex=function(a){a=parseInt(a,16);return new c(a>>16&255,a>>8&255,a&255)};c.prototype.toHexStr=function(){var a=this.red.toString(16);a=1==a.length?"0"+a:a;var b=this.green.toString(16);b=1==b.length?"0"+b:b;var d=this.blue.toString(16);d=1==d.length?"0"+d:d;return"#"+a+b+d};c.prototype.getGradientClr=function(){return this.gradientClr};c.prototype.setGradientClr=-function(a){this.gradientClr=a};return c}();m.Color=h;h.__class="com.mxgraph.io.vsdx.theme.Color"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(){}c.getFillStyle=function(a){var b=null;switch(a.nodeName){case "a:solidFill":b=new g.mxgraph.io.vsdx.theme.SolidFillStyle(g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a)));break;case "a:noFill":b=new g.mxgraph.io.vsdx.theme.NoFillStyle;break;case "a:gradFill":b=new g.mxgraph.io.vsdx.theme.GradFill(a)}return b};return c}();m.FillStyleFactory=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(a,c,d){this.blue=this.green=this.red=0;this.gradientClr=null;this.red=a;this.green=c;this.blue=d}b.NONE_$LI$=function(){null==b.NONE&&(b.NONE=new b(-1,-1,-1));return b.NONE};b.prototype.getRed=function(){return this.red};b.prototype.setRed=function(a){this.red=a};b.prototype.getGreen=function(){return this.green};b.prototype.setGreen=function(a){this.green=a};b.prototype.getBlue=function(){return this.blue};+b.prototype.setBlue=function(a){this.blue=a};b.prototype.toHsl=function(){var a=this.getRed()/255,c=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(c,d)),k=Math.min(a,Math.min(c,d)),n=(f+k)/2;if(f===k)a=k=0;else{var q=f-k;k=.5<n?q/(2-f-k):q/(f+k);a=(f===a?(c-d)/q+(c<d?6:0):f===c?(d-a)/q+2:(a-c)/q+4)/6}return new g.mxgraph.io.vsdx.theme.HSLColor(a,k,n)};b.prototype.toHsv=function(){var a=this.getRed()/255,c=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(c,d)),k=Math.min(a,+Math.min(c,d)),n=f-k;a=f===k?0:(f===a?(c-d)/n+(c<d?6:0):f===c?(d-a)/n+2:(a-c)/n+4)/6;return new g.mxgraph.io.vsdx.theme.HSVColor(a,0===f?0:n/f,f)};b.decodeColorHex=function(a){a=parseInt(a,16);return new b(a>>16&255,a>>8&255,a&255)};b.prototype.toHexStr=function(){var a=this.red.toString(16);a=1==a.length?"0"+a:a;var c=this.green.toString(16);c=1==c.length?"0"+c:c;var d=this.blue.toString(16);d=1==d.length?"0"+d:d;return"#"+a+c+d};b.prototype.getGradientClr=function(){return this.gradientClr};b.prototype.setGradientClr=+function(a){this.gradientClr=a};return b}();m.Color=h;h.__class="com.mxgraph.io.vsdx.theme.Color"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(){}b.getFillStyle=function(a){var c=null;switch(a.nodeName){case "a:solidFill":c=new g.mxgraph.io.vsdx.theme.SolidFillStyle(g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a)));break;case "a:noFill":c=new g.mxgraph.io.vsdx.theme.NoFillStyle;break;case "a:gradFill":c=new g.mxgraph.io.vsdx.theme.GradFill(a)}return c};return b}();m.FillStyleFactory=h;h.__class="com.mxgraph.io.vsdx.theme.FillStyleFactory"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a){this.color2=this.color1=null;a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"a:gsLst");0<a.length&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a[0]),2<=a.length&&(this.color2=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[0])),this.color1=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[a.length--1]))));null==this.color1&&(this.color1=this.color2=new g.mxgraph.io.vsdx.theme.SrgbClr("FFFFFF"))}c.prototype.applyStyle=function(a,b){var d=this.color1.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b);d.setGradientClr(this.color2.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b));return d};return c}();m.GradFill=h;h.__class="com.mxgraph.io.vsdx.theme.GradFill";h.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(a){this.color2=this.color1=null;a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"a:gsLst");0<a.length&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a[0]),2<=a.length&&(this.color2=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[0])),this.color1=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[a.length-+1]))));null==this.color1&&(this.color1=this.color2=new g.mxgraph.io.vsdx.theme.SrgbClr("FFFFFF"))}b.prototype.applyStyle=function(a,c){var d=this.color1.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,c);d.setGradientClr(this.color2.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,c));return d};return b}();m.GradFill=h;h.__class="com.mxgraph.io.vsdx.theme.GradFill";h.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d){this.lum=this.sat=this.hue=0;this.hue=a;this.sat=b;this.lum=d}c.prototype.getHue=function(){return this.hue};c.prototype.setHue=function(a){this.hue=a};c.prototype.getSat=function(){return this.sat};c.prototype.setSat=function(a){this.sat=a};c.prototype.getLum=function(){return this.lum};c.prototype.setLum=function(a){this.lum=a};c.prototype.hue2rgb=function(a,b,d){0>d&&(d+=1);1<d&&--d;return d<1/6?-a+6*(b-a)*d:.5>d?b:d<2/3?a+(b-a)*(2/3-d)*6:a};c.prototype.toRgb=function(){var a=this.hue;var b=this.sat;var d=this.lum;if(0===b)d=b=a=d;else{var f=.5>d?d*(1+b):d+b-d*b,k=2*d-f;d=this.hue2rgb(k,f,a+1/3);b=this.hue2rgb(k,f,a);a=this.hue2rgb(k,f,a-1/3)}return new g.mxgraph.io.vsdx.theme.Color(255*d|0,255*b|0,255*a|0)};c.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};c.prototype.tint=function(a){this.lum*=1+a/100;this.lum=this.clamp01(this.lum);return this};c.prototype.shade=function(a){this.lum*=-a/100;this.lum=this.clamp01(this.lum);return this};c.prototype.satMod=function(a){this.sat*=a/100;this.sat=this.clamp01(this.sat);return this};c.prototype.lumMod=function(a){this.lum*=a/100;this.lum=this.clamp01(this.lum);return this};return c}();m.HSLColor=h;h.__class="com.mxgraph.io.vsdx.theme.HSLColor"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d){this.h=a;this.s=b;this.v=d}c.prototype.toRgb=function(){var a=6*this.h,b=this.s,d=Math.floor(a),f=a-d;a=this.v*(1-b);var k=this.v*(1-f*b);b=this.v*(1-(1-f)*b);d=(d|0)%6;return new g.mxgraph.io.vsdx.theme.Color(255*[this.v,k,a,a,b,this.v][d]|0,255*[b,this.v,this.v,k,a,a][d]|0,255*[a,a,b,this.v,this.v,k][d]|0)};c.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};c.prototype.tint=function(a){this.v*=-1+a/100;this.v=this.clamp01(this.v);return this};c.prototype.shade=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};c.prototype.satMod=function(a){this.s*=a/100;this.s=this.clamp01(this.s);return this};c.prototype.lumMod=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};c.prototype.hueMod=function(a){this.h*=a/100;this.h=this.clamp01(this.h);return this};return c}();m.HSVColor=h;h.__class="com.mxgraph.io.vsdx.theme.HSVColor"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(a,c,d){this.lum=this.sat=this.hue=0;this.hue=a;this.sat=c;this.lum=d}b.prototype.getHue=function(){return this.hue};b.prototype.setHue=function(a){this.hue=a};b.prototype.getSat=function(){return this.sat};b.prototype.setSat=function(a){this.sat=a};b.prototype.getLum=function(){return this.lum};b.prototype.setLum=function(a){this.lum=a};b.prototype.hue2rgb=function(a,c,d){0>d&&(d+=1);1<d&&--d;return d<1/6?+a+6*(c-a)*d:.5>d?c:d<2/3?a+(c-a)*(2/3-d)*6:a};b.prototype.toRgb=function(){var a=this.hue;var c=this.sat;var d=this.lum;if(0===c)d=c=a=d;else{var f=.5>d?d*(1+c):d+c-d*c,k=2*d-f;d=this.hue2rgb(k,f,a+1/3);c=this.hue2rgb(k,f,a);a=this.hue2rgb(k,f,a-1/3)}return new g.mxgraph.io.vsdx.theme.Color(255*d|0,255*c|0,255*a|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.lum*=1+a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.shade=function(a){this.lum*=+a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.satMod=function(a){this.sat*=a/100;this.sat=this.clamp01(this.sat);return this};b.prototype.lumMod=function(a){this.lum*=a/100;this.lum=this.clamp01(this.lum);return this};return b}();m.HSLColor=h;h.__class="com.mxgraph.io.vsdx.theme.HSLColor"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(a,c,d){this.h=a;this.s=c;this.v=d}b.prototype.toRgb=function(){var a=6*this.h,c=this.s,d=Math.floor(a),f=a-d;a=this.v*(1-c);var k=this.v*(1-f*c);c=this.v*(1-(1-f)*c);d=(d|0)%6;return new g.mxgraph.io.vsdx.theme.Color(255*[this.v,k,a,a,c,this.v][d]|0,255*[c,this.v,this.v,k,a,a][d]|0,255*[a,a,c,this.v,this.v,k][d]|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.v*=+1+a/100;this.v=this.clamp01(this.v);return this};b.prototype.shade=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};b.prototype.satMod=function(a){this.s*=a/100;this.s=this.clamp01(this.s);return this};b.prototype.lumMod=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};b.prototype.hueMod=function(a){this.h*=a/100;this.h=this.clamp01(this.h);return this};return b}();m.HSVColor=h;h.__class="com.mxgraph.io.vsdx.theme.HSVColor"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a){this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1;if(null!=a&&1==a.nodeType||null===a){Array.prototype.slice.call(arguments);this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=-this.isBevelJoin=this.isRoundJoin=!1;this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.lineWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"w");var b=a.getAttribute("cap");if(null!=b)switch(b){case "rnd":this.lineCap=c.LineCapType.ROUND;break;case "sq":this.lineCap=c.LineCapType.SQUARE;break;case "flat":this.lineCap=c.LineCapType.FLAT}b=-a.getAttribute("cmpd");if(null!=b)switch(b){case "sng":this.lineComp=c.CompoundLineType.SINGLE;break;case "dbl":this.lineComp=c.CompoundLineType.DOUBLE;break;case "thickThin":this.lineComp=c.CompoundLineType.THICK_THIN_DOUBLE;break;case "thinThick":this.lineComp=c.CompoundLineType.THIN_THICK_DOUBLE;break;case "tri":this.lineComp=c.CompoundLineType.THIN_THICK_THIN_TRIPLE}b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var d=0;d<b.length;d++){var f=b[d];switch(f.nodeName){case "a:noFill":case "a:solidFill":case "a:gradFill":case "a:pattFill":this.fillStyle=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(a){this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1;if(null!=a&&1==a.nodeType||null===a){Array.prototype.slice.call(arguments);this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=+this.isBevelJoin=this.isRoundJoin=!1;this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.lineWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"w");var c=a.getAttribute("cap");if(null!=c)switch(c){case "rnd":this.lineCap=b.LineCapType.ROUND;break;case "sq":this.lineCap=b.LineCapType.SQUARE;break;case "flat":this.lineCap=b.LineCapType.FLAT}c=+a.getAttribute("cmpd");if(null!=c)switch(c){case "sng":this.lineComp=b.CompoundLineType.SINGLE;break;case "dbl":this.lineComp=b.CompoundLineType.DOUBLE;break;case "thickThin":this.lineComp=b.CompoundLineType.THICK_THIN_DOUBLE;break;case "thinThick":this.lineComp=b.CompoundLineType.THIN_THICK_DOUBLE;break;case "tri":this.lineComp=b.CompoundLineType.THIN_THICK_THIN_TRIPLE}c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var d=0;d<c.length;d++){var f=c[d];switch(f.nodeName){case "a:noFill":case "a:solidFill":case "a:gradFill":case "a:pattFill":this.fillStyle=g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(f);break;case "a:prstDash":f=f.getAttribute("val");this.isLineDashed=!0;switch(f){case "solid":this.isLineDashed=!1;break;case "sysDot":case "dot":this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "lgDash":this.lineDashPattern.push(12);this.lineDashPattern.push(4);break;case "sysDashDot":case "dashDot":this.lineDashPattern.push(8);this.lineDashPattern.push(4);this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "lgDashDot":this.lineDashPattern.push(12);this.lineDashPattern.push(4);this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "sysDashDotDot":case "lgDashDotDot":this.lineDashPattern.push(12),this.lineDashPattern.push(4),this.lineDashPattern.push(1),this.lineDashPattern.push(4),this.lineDashPattern.push(1),this.lineDashPattern.push(4)}break;case "a:custDash":this.isLineDashed=!0;f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"a:ds");for(var k=0;k<f.length;k++){var n=f[k],q=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"d");n=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"sp");this.lineDashPattern.push(q/1E4);this.lineDashPattern.push(n/1E4)}break;case "a:round":this.isRoundJoin=!0;break;case "a:bevel":this.isBevelJoin=!0;break;case "a:miter":g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"lim");this.isMiterJoin=!0;break;case "a:headEnd":this.headEndType=this.getLineEndType(f);this.headEndWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"w");this.headEndLen=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"len");break;case "a:tailEnd":this.tailEndType=this.getLineEndType(f),this.tailEndWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"w"),this.tailEndLen=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"len")}}}else if(void 0===a)Array.prototype.slice.call(arguments),this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=-null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0,this.isLineDashed=!1,this.lineDashPattern=[],this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1,this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0;else throw Error("invalid overload");}c.prototype.getLineEndType=function(a){var b=null;switch(a.getAttribute("type")){case "none":b=-c.LineEndType.NONE;break;case "triangle":b=c.LineEndType.TRIANGLE;break;case "stealth":b=c.LineEndType.STEALTH;break;case "diamond":b=c.LineEndType.DIAMOND;break;case "oval":b=c.LineEndType.OVAL;break;case "arrow":b=c.LineEndType.ARROW}return b};c.prototype.getLineColor=function(a,b){return null!=this.fillStyle?this.fillStyle.applyStyle(a,b):b.getDefaultLineClr()};c.prototype.isDashed=function(){return this.isLineDashed};c.prototype.getLineDashPattern=function(){return this.lineDashPattern};c.prototype.getStartSize=-function(){return 4};c.prototype.getEndSize=function(){return 4};c.prototype.getStart=function(){return 0};c.prototype.getEnd=function(){return 0};c.prototype.getLineWidth=function(){return this.lineWidth};return c}();m.LineStyle=h;h.__class="com.mxgraph.io.vsdx.theme.LineStyle";(function(c){(function(a){a[a.ROUND=0]="ROUND";a[a.SQUARE=1]="SQUARE";a[a.FLAT=2]="FLAT"})(c.LineCapType||(c.LineCapType={}));(function(a){a[a.SINGLE=0]="SINGLE";a[a.DOUBLE=1]="DOUBLE";a[a.THICK_THIN_DOUBLE=2]="THICK_THIN_DOUBLE";-a[a.THIN_THICK_DOUBLE=3]="THIN_THICK_DOUBLE";a[a.THIN_THICK_THIN_TRIPLE=4]="THIN_THICK_THIN_TRIPLE"})(c.CompoundLineType||(c.CompoundLineType={}));(function(a){a[a.NONE=0]="NONE";a[a.TRIANGLE=1]="TRIANGLE";a[a.STEALTH=2]="STEALTH";a[a.DIAMOND=3]="DIAMOND";a[a.OVAL=4]="OVAL";a[a.ARROW=5]="ARROW"})(c.LineEndType||(c.LineEndType={}))})(h=m.LineStyle||(m.LineStyle={}))})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a){this.pattern=this.endSize=this.end=this.startSize=this.start=this.rndg=0;this.lineDashPattern=null;a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a);this.rndg=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"rndg");this.start=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"start");this.startSize=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,-"startSize");this.end=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"end");this.endSize=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"endSize");this.pattern=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"pattern");this.lineDashPattern=g.mxgraph.io.vsdx.Style.getLineDashPattern(this.pattern)}c.prototype.getRndg=function(){return this.rndg};c.prototype.getStart=function(){return this.start};c.prototype.getStartSize=-function(){return this.startSize};c.prototype.getEnd=function(){return this.end};c.prototype.getEndSize=function(){return this.endSize};c.prototype.isDashed=function(){return 1<this.pattern};c.prototype.getLineDashPattern=function(){return this.lineDashPattern};return c}();m.LineStyleExt=h;h.__class="com.mxgraph.io.vsdx.theme.LineStyleExt"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(){}c.prototype.applyStyle=function(a,b){return g.mxgraph.io.vsdx.theme.Color.NONE_$LI$()};return c}();m.NoFillStyle=h;h.__class="com.mxgraph.io.vsdx.theme.NoFillStyle";h.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(){this.invGamma=this.gamma=this.blueMod=this.blueOff=this.blue=this.greenMod=this.greenOff=this.green=this.redMod=this.redOff=this.red=this.lumMod=this.lumOff=this.lum=this.satMod=this.satOff=this.sat=this.hueMod=this.hueOff=this.hue=this.alphaMod=this.alphaOff=this.alpha=this.gray=this.inv=this.comp=this.shade=this.tint=0;this.hasEffects=this.isInitialized=this.isDynamic=!1;this.color=null}c.prototype.calcColor=-function(a,b){this.hasEffects&&(a=this.color.toHsv(),0!==this.tint&&a.tint(this.tint),0!==this.shade&&a.shade(this.shade),0!==this.satMod&&a.satMod(this.satMod),0!==this.lumMod&&a.lumMod(this.lumMod),0!==this.hueMod&&a.hueMod(this.hueMod),this.color=a.toRgb())};c.prototype.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme=function(a,b){if(this.isDynamic||!this.isInitialized)this.calcColor(a,b),this.isInitialized=!0;return this.color};c.prototype.getColor=function(a,b){if("number"!==typeof a&&null!==a||-!(null!=b&&b instanceof g.mxgraph.io.vsdx.mxVsdxTheme||null===b)){if((null!=a&&a instanceof g.mxgraph.io.vsdx.mxVsdxTheme||null===a)&&void 0===b)return this.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(a);throw Error("invalid overload");}return this.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b)};c.prototype.getColor$com_mxgraph_io_vsdx_mxVsdxTheme=function(a){return this.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(-1,a)};c.prototype.setTint=function(a){this.tint=a;this.hasEffects=!0};c.prototype.setShade=-function(a){this.shade=a;this.hasEffects=!0};c.prototype.setComp=function(a){this.comp=a;this.hasEffects=!0};c.prototype.setInv=function(a){this.inv=a;this.hasEffects=!0};c.prototype.setGray=function(a){this.gray=a;this.hasEffects=!0};c.prototype.setAlpha=function(a){this.alpha=a;this.hasEffects=!0};c.prototype.setAlphaOff=function(a){this.alphaOff=a;this.hasEffects=!0};c.prototype.setAlphaMod=function(a){this.alphaMod=a;this.hasEffects=!0};c.prototype.setHue=function(a){this.hue=a;this.hasEffects=-!0};c.prototype.setHueOff=function(a){this.hueOff=a;this.hasEffects=!0};c.prototype.setHueMod=function(a){this.hueMod=a;this.hasEffects=!0};c.prototype.setSat=function(a){this.sat=a;this.hasEffects=!0};c.prototype.setSatOff=function(a){this.satOff=a;this.hasEffects=!0};c.prototype.setSatMod=function(a){this.satMod=a;this.hasEffects=!0};c.prototype.setLum=function(a){this.lum=a;this.hasEffects=!0};c.prototype.setLumOff=function(a){this.lumOff=a;this.hasEffects=!0};c.prototype.setLumMod=function(a){this.lumMod=-a;this.hasEffects=!0};c.prototype.setRed=function(a){this.red=a;this.hasEffects=!0};c.prototype.setRedOff=function(a){this.redOff=a;this.hasEffects=!0};c.prototype.setRedMod=function(a){this.redMod=a;this.hasEffects=!0};c.prototype.setGreen=function(a){this.green=a;this.hasEffects=!0};c.prototype.setGreenOff=function(a){this.greenOff=a;this.hasEffects=!0};c.prototype.setGreenMod=function(a){this.greenMod=a;this.hasEffects=!0};c.prototype.setBlue=function(a){this.blue=a;this.hasEffects=!0};c.prototype.setBlueOff=-function(a){this.blueOff=a;this.hasEffects=!0};c.prototype.setBlueMod=function(a){this.blueMod=a;this.hasEffects=!0};c.prototype.setGamma=function(a){this.gamma=a;this.hasEffects=!0};c.prototype.setInvGamma=function(a){this.invGamma=a;this.hasEffects=!0};return c}();m.OoxmlColor=h;h.__class="com.mxgraph.io.vsdx.theme.OoxmlColor"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(){}c.getOoxmlColor=function(a){var b=null;switch(a.nodeName){case "a:scrgbClr":b=new g.mxgraph.io.vsdx.theme.ScrgbClr(parseInt(a.getAttribute("r")),parseInt(a.getAttribute("g")),parseInt(a.getAttribute("b")));break;case "a:srgbClr":b=new g.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"));break;case "a:hslClr":b=new g.mxgraph.io.vsdx.theme.HslClr(parseInt(a.getAttribute("hue")),parseInt(a.getAttribute("sat")),-parseInt(a.getAttribute("lum")));break;case "a:sysClr":b=new g.mxgraph.io.vsdx.theme.SysClr(a.getAttribute("val"),a.getAttribute("lastClr"));break;case "a:schemeClr":b=new g.mxgraph.io.vsdx.theme.SchemeClr(a.getAttribute("val"));break;case "a:prstClr":b=new g.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"))}a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var d=0;d<a.length;d++){var f=a[d],k=parseInt(f.getAttribute("val"))/1E3|0;switch(f.nodeName){case "a:tint":b.setTint(k);break;-case "a:shade":b.setShade(k);break;case "a:satMod":b.setSatMod(k);break;case "a:lumMod":b.setLumMod(k);break;case "a:hueMod":b.setHueMod(k)}}return b};return c}();m.OoxmlColorFactory=h;h.__class="com.mxgraph.io.vsdx.theme.OoxmlColorFactory"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d,f,k,n,q,t,A,C){this.quickStyleVariation=this.quickStyleType=this.quickStyleShadowColor=this.quickStyleLineColor=this.quickStyleFontMatrix=this.quickStyleFontColor=this.quickStyleFillMatrix=this.quickStyleFillColor=this.quickStyleEffectsMatrix=0;this.quickStyleEffectsMatrix=a;this.quickStyleFillColor=b;this.quickStyleFillMatrix=d;this.quickStyleFontColor=f;this.quickStyleFontMatrix=k;this.quickStyleLineColor=-n;this.quickStyleLineMatrix=q;this.quickStyleShadowColor=t;this.quickStyleType=A;this.quickStyleVariation=C}c.prototype.getQuickStyleEffectsMatrix=function(){return this.quickStyleEffectsMatrix};c.prototype.getQuickStyleFillColor=function(){return this.quickStyleFillColor};c.prototype.getQuickStyleFillMatrix=function(){return this.quickStyleFillMatrix};c.prototype.getQuickStyleFontColor=function(){return this.quickStyleFontColor};c.prototype.getQuickStyleFontMatrix=function(){return this.quickStyleFontMatrix};-c.prototype.getQuickStyleLineColor=function(){return this.quickStyleLineColor};c.prototype.getQuickStyleLineMatrix=function(){return this.quickStyleLineMatrix};c.prototype.getQuickStyleShadowColor=function(){return this.quickStyleShadowColor};c.prototype.getQuickStyleType=function(){return this.quickStyleType};c.prototype.getQuickStyleVariation=function(){return this.quickStyleVariation};c.prototype.setQuickStyleEffectsMatrix=function(a){this.quickStyleEffectsMatrix=a};c.prototype.setQuickStyleFillColor=-function(a){this.quickStyleFillColor=a};c.prototype.setQuickStyleFillMatrix=function(a){this.quickStyleFillMatrix=a};c.prototype.setQuickStyleFontColor=function(a){this.quickStyleFontColor=a};c.prototype.setQuickStyleFontMatrix=function(a){this.quickStyleFontMatrix=a};c.prototype.setQuickStyleLineColor=function(a){this.quickStyleLineColor=a};c.prototype.setQuickStyleLineMatrix=function(a){this.quickStyleLineMatrix=a};c.prototype.setQuickStyleShadowColor=function(a){this.quickStyleShadowColor=a};c.prototype.setQuickStyleType=-function(a){this.quickStyleType=a};c.prototype.setQuickStyleVariation=function(a){this.quickStyleVariation=a};return c}();m.QuickStyleVals=h;h.__class="com.mxgraph.io.vsdx.theme.QuickStyleVals"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a){this.color=null;this.color=a}c.prototype.applyStyle=function(a,b){return this.color.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b)};return c}();m.SolidFillStyle=h;h.__class="com.mxgraph.io.vsdx.theme.SolidFillStyle";h.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0,this.isLineDashed=!1,this.lineDashPattern=[],this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1,this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0;else throw Error("invalid overload");}b.prototype.getLineEndType=function(a){var c=null;switch(a.getAttribute("type")){case "none":c=+b.LineEndType.NONE;break;case "triangle":c=b.LineEndType.TRIANGLE;break;case "stealth":c=b.LineEndType.STEALTH;break;case "diamond":c=b.LineEndType.DIAMOND;break;case "oval":c=b.LineEndType.OVAL;break;case "arrow":c=b.LineEndType.ARROW}return c};b.prototype.getLineColor=function(a,c){return null!=this.fillStyle?this.fillStyle.applyStyle(a,c):c.getDefaultLineClr()};b.prototype.isDashed=function(){return this.isLineDashed};b.prototype.getLineDashPattern=function(){return this.lineDashPattern};b.prototype.getStartSize=+function(){return 4};b.prototype.getEndSize=function(){return 4};b.prototype.getStart=function(){return 0};b.prototype.getEnd=function(){return 0};b.prototype.getLineWidth=function(){return this.lineWidth};return b}();m.LineStyle=h;h.__class="com.mxgraph.io.vsdx.theme.LineStyle";(function(b){(function(a){a[a.ROUND=0]="ROUND";a[a.SQUARE=1]="SQUARE";a[a.FLAT=2]="FLAT"})(b.LineCapType||(b.LineCapType={}));(function(a){a[a.SINGLE=0]="SINGLE";a[a.DOUBLE=1]="DOUBLE";a[a.THICK_THIN_DOUBLE=2]="THICK_THIN_DOUBLE";+a[a.THIN_THICK_DOUBLE=3]="THIN_THICK_DOUBLE";a[a.THIN_THICK_THIN_TRIPLE=4]="THIN_THICK_THIN_TRIPLE"})(b.CompoundLineType||(b.CompoundLineType={}));(function(a){a[a.NONE=0]="NONE";a[a.TRIANGLE=1]="TRIANGLE";a[a.STEALTH=2]="STEALTH";a[a.DIAMOND=3]="DIAMOND";a[a.OVAL=4]="OVAL";a[a.ARROW=5]="ARROW"})(b.LineEndType||(b.LineEndType={}))})(h=m.LineStyle||(m.LineStyle={}))})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(a){this.pattern=this.endSize=this.end=this.startSize=this.start=this.rndg=0;this.lineDashPattern=null;a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a);this.rndg=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"rndg");this.start=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"start");this.startSize=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,+"startSize");this.end=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"end");this.endSize=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"endSize");this.pattern=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"pattern");this.lineDashPattern=g.mxgraph.io.vsdx.Style.getLineDashPattern(this.pattern)}b.prototype.getRndg=function(){return this.rndg};b.prototype.getStart=function(){return this.start};b.prototype.getStartSize=+function(){return this.startSize};b.prototype.getEnd=function(){return this.end};b.prototype.getEndSize=function(){return this.endSize};b.prototype.isDashed=function(){return 1<this.pattern};b.prototype.getLineDashPattern=function(){return this.lineDashPattern};return b}();m.LineStyleExt=h;h.__class="com.mxgraph.io.vsdx.theme.LineStyleExt"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(){}b.prototype.applyStyle=function(a,c){return g.mxgraph.io.vsdx.theme.Color.NONE_$LI$()};return b}();m.NoFillStyle=h;h.__class="com.mxgraph.io.vsdx.theme.NoFillStyle";h.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(){this.invGamma=this.gamma=this.blueMod=this.blueOff=this.blue=this.greenMod=this.greenOff=this.green=this.redMod=this.redOff=this.red=this.lumMod=this.lumOff=this.lum=this.satMod=this.satOff=this.sat=this.hueMod=this.hueOff=this.hue=this.alphaMod=this.alphaOff=this.alpha=this.gray=this.inv=this.comp=this.shade=this.tint=0;this.hasEffects=this.isInitialized=this.isDynamic=!1;this.color=null}b.prototype.calcColor=+function(a,c){this.hasEffects&&(a=this.color.toHsv(),0!==this.tint&&a.tint(this.tint),0!==this.shade&&a.shade(this.shade),0!==this.satMod&&a.satMod(this.satMod),0!==this.lumMod&&a.lumMod(this.lumMod),0!==this.hueMod&&a.hueMod(this.hueMod),this.color=a.toRgb())};b.prototype.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme=function(a,c){if(this.isDynamic||!this.isInitialized)this.calcColor(a,c),this.isInitialized=!0;return this.color};b.prototype.getColor=function(a,c){if("number"!==typeof a&&null!==a||+!(null!=c&&c instanceof g.mxgraph.io.vsdx.mxVsdxTheme||null===c)){if((null!=a&&a instanceof g.mxgraph.io.vsdx.mxVsdxTheme||null===a)&&void 0===c)return this.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(a);throw Error("invalid overload");}return this.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,c)};b.prototype.getColor$com_mxgraph_io_vsdx_mxVsdxTheme=function(a){return this.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(-1,a)};b.prototype.setTint=function(a){this.tint=a;this.hasEffects=!0};b.prototype.setShade=+function(a){this.shade=a;this.hasEffects=!0};b.prototype.setComp=function(a){this.comp=a;this.hasEffects=!0};b.prototype.setInv=function(a){this.inv=a;this.hasEffects=!0};b.prototype.setGray=function(a){this.gray=a;this.hasEffects=!0};b.prototype.setAlpha=function(a){this.alpha=a;this.hasEffects=!0};b.prototype.setAlphaOff=function(a){this.alphaOff=a;this.hasEffects=!0};b.prototype.setAlphaMod=function(a){this.alphaMod=a;this.hasEffects=!0};b.prototype.setHue=function(a){this.hue=a;this.hasEffects=+!0};b.prototype.setHueOff=function(a){this.hueOff=a;this.hasEffects=!0};b.prototype.setHueMod=function(a){this.hueMod=a;this.hasEffects=!0};b.prototype.setSat=function(a){this.sat=a;this.hasEffects=!0};b.prototype.setSatOff=function(a){this.satOff=a;this.hasEffects=!0};b.prototype.setSatMod=function(a){this.satMod=a;this.hasEffects=!0};b.prototype.setLum=function(a){this.lum=a;this.hasEffects=!0};b.prototype.setLumOff=function(a){this.lumOff=a;this.hasEffects=!0};b.prototype.setLumMod=function(a){this.lumMod=+a;this.hasEffects=!0};b.prototype.setRed=function(a){this.red=a;this.hasEffects=!0};b.prototype.setRedOff=function(a){this.redOff=a;this.hasEffects=!0};b.prototype.setRedMod=function(a){this.redMod=a;this.hasEffects=!0};b.prototype.setGreen=function(a){this.green=a;this.hasEffects=!0};b.prototype.setGreenOff=function(a){this.greenOff=a;this.hasEffects=!0};b.prototype.setGreenMod=function(a){this.greenMod=a;this.hasEffects=!0};b.prototype.setBlue=function(a){this.blue=a;this.hasEffects=!0};b.prototype.setBlueOff=+function(a){this.blueOff=a;this.hasEffects=!0};b.prototype.setBlueMod=function(a){this.blueMod=a;this.hasEffects=!0};b.prototype.setGamma=function(a){this.gamma=a;this.hasEffects=!0};b.prototype.setInvGamma=function(a){this.invGamma=a;this.hasEffects=!0};return b}();m.OoxmlColor=h;h.__class="com.mxgraph.io.vsdx.theme.OoxmlColor"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(){}b.getOoxmlColor=function(a){var c=null;switch(a.nodeName){case "a:scrgbClr":c=new g.mxgraph.io.vsdx.theme.ScrgbClr(parseInt(a.getAttribute("r")),parseInt(a.getAttribute("g")),parseInt(a.getAttribute("b")));break;case "a:srgbClr":c=new g.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"));break;case "a:hslClr":c=new g.mxgraph.io.vsdx.theme.HslClr(parseInt(a.getAttribute("hue")),parseInt(a.getAttribute("sat")),+parseInt(a.getAttribute("lum")));break;case "a:sysClr":c=new g.mxgraph.io.vsdx.theme.SysClr(a.getAttribute("val"),a.getAttribute("lastClr"));break;case "a:schemeClr":c=new g.mxgraph.io.vsdx.theme.SchemeClr(a.getAttribute("val"));break;case "a:prstClr":c=new g.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"))}a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var d=0;d<a.length;d++){var f=a[d],k=parseInt(f.getAttribute("val"))/1E3|0;switch(f.nodeName){case "a:tint":c.setTint(k);break;+case "a:shade":c.setShade(k);break;case "a:satMod":c.setSatMod(k);break;case "a:lumMod":c.setLumMod(k);break;case "a:hueMod":c.setHueMod(k)}}return c};return b}();m.OoxmlColorFactory=h;h.__class="com.mxgraph.io.vsdx.theme.OoxmlColorFactory"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(a,c,d,f,k,n,q,t,A,C){this.quickStyleVariation=this.quickStyleType=this.quickStyleShadowColor=this.quickStyleLineColor=this.quickStyleFontMatrix=this.quickStyleFontColor=this.quickStyleFillMatrix=this.quickStyleFillColor=this.quickStyleEffectsMatrix=0;this.quickStyleEffectsMatrix=a;this.quickStyleFillColor=c;this.quickStyleFillMatrix=d;this.quickStyleFontColor=f;this.quickStyleFontMatrix=k;this.quickStyleLineColor=+n;this.quickStyleLineMatrix=q;this.quickStyleShadowColor=t;this.quickStyleType=A;this.quickStyleVariation=C}b.prototype.getQuickStyleEffectsMatrix=function(){return this.quickStyleEffectsMatrix};b.prototype.getQuickStyleFillColor=function(){return this.quickStyleFillColor};b.prototype.getQuickStyleFillMatrix=function(){return this.quickStyleFillMatrix};b.prototype.getQuickStyleFontColor=function(){return this.quickStyleFontColor};b.prototype.getQuickStyleFontMatrix=function(){return this.quickStyleFontMatrix};+b.prototype.getQuickStyleLineColor=function(){return this.quickStyleLineColor};b.prototype.getQuickStyleLineMatrix=function(){return this.quickStyleLineMatrix};b.prototype.getQuickStyleShadowColor=function(){return this.quickStyleShadowColor};b.prototype.getQuickStyleType=function(){return this.quickStyleType};b.prototype.getQuickStyleVariation=function(){return this.quickStyleVariation};b.prototype.setQuickStyleEffectsMatrix=function(a){this.quickStyleEffectsMatrix=a};b.prototype.setQuickStyleFillColor=+function(a){this.quickStyleFillColor=a};b.prototype.setQuickStyleFillMatrix=function(a){this.quickStyleFillMatrix=a};b.prototype.setQuickStyleFontColor=function(a){this.quickStyleFontColor=a};b.prototype.setQuickStyleFontMatrix=function(a){this.quickStyleFontMatrix=a};b.prototype.setQuickStyleLineColor=function(a){this.quickStyleLineColor=a};b.prototype.setQuickStyleLineMatrix=function(a){this.quickStyleLineMatrix=a};b.prototype.setQuickStyleShadowColor=function(a){this.quickStyleShadowColor=a};b.prototype.setQuickStyleType=+function(a){this.quickStyleType=a};b.prototype.setQuickStyleVariation=function(a){this.quickStyleVariation=a};return b}();m.QuickStyleVals=h;h.__class="com.mxgraph.io.vsdx.theme.QuickStyleVals"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(a){this.color=null;this.color=a}b.prototype.applyStyle=function(a,c){return this.color.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,c)};return b}();m.SolidFillStyle=h;h.__class="com.mxgraph.io.vsdx.theme.SolidFillStyle";h.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){var B=function(){function m(){}m.MAX_AREA_$LI$=function(){null==m.MAX_AREA&&(m.MAX_AREA=1E8);return m.MAX_AREA};return m}();B.MAX_REQUEST_SIZE=52428800;B.IMAGE_DOMAIN="http://img.diagramly.com/";z.Constants=B;B.__class="com.mxgraph.online.Constants"})(y.online||(y.online={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){var B=function(){function m(){}m.getRotatedPoint=function(h,c,a,b){var d=h.x-b.x;h=h.y-b.y;return new mxPoint(d*c-h*a+b.x,h*c+d*a+b.y)};m.rotatedGeometry=function(h,c,a,b){c=c*Math.PI/180;var d=Math.cos(c);c=Math.sin(c);var f=h.getCenterX()-a,k=h.getCenterY()-b;h.x=Math.round(f*d-k*c+a-h.width/2);h.y=Math.round(k*d+f*c+b-h.height/2)};return m}();B.CHARSET_FOR_URL_ENCODING="ISO-8859-1";z.Utils=B;B.__class="com.mxgraph.online.Utils"})(y.online||(y.online={}))})(g.mxgraph||+(function(g){(function(y){(function(z){var B=function(){function m(){}m.getRotatedPoint=function(h,b,a,c){var d=h.x-c.x;h=h.y-c.y;return new mxPoint(d*b-h*a+c.x,h*b+d*a+c.y)};m.rotatedGeometry=function(h,b,a,c){b=b*Math.PI/180;var d=Math.cos(b);b=Math.sin(b);var f=h.getCenterX()-a,k=h.getCenterY()-c;h.x=Math.round(f*d-k*b+a-h.width/2);h.y=Math.round(k*d+f*b+c-h.height/2)};return m}();B.CHARSET_FOR_URL_ENCODING="ISO-8859-1";z.Utils=B;B.__class="com.mxgraph.online.Utils"})(y.online||(y.online={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k){b=c.call(this,b,d,f)||this;b.a=k;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a){var f=d.getHeight(),k=d.getWidth(),n=Math.floor(Math.round(d.getLastX()*k)/100),q=Math.floor(Math.round(d.getLastY()*f)/100);b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var t=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();t=f-t;var A=-this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.abs(b-n);q=Math.abs(t-q);n=q=.5*A+(n*n+q*q)/(8*A);var C=Math.abs(q);q=Math.round(100*q/k*100)/100;n=Math.round(100*n/f*100)/100;b=Math.round(100*b/k*100)/100;t=Math.round(100*t/f*100)/100;A=Math.round(100*A)/100;q=Math.abs(q);n=Math.abs(n);f=0>A?"1":"0";A=C<Math.abs(A)?"1":"0";d.setLastX(b);d.setLastY(t);return'<arc rx="'+(new String(q)).toString()+'" ry="'+(new String(n)).toString()+'" x="'+(new String(b)).toString()+'" y="'+(new String(t)).toString()++(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k){c=b.call(this,c,d,f)||this;c.a=k;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a){var f=d.getHeight(),k=d.getWidth(),n=Math.floor(Math.round(d.getLastX()*k)/100),q=Math.floor(Math.round(d.getLastY()*f)/100);c=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var t=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();t=f-t;var A=+this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.abs(c-n);q=Math.abs(t-q);n=q=.5*A+(n*n+q*q)/(8*A);var C=Math.abs(q);q=Math.round(100*q/k*100)/100;n=Math.round(100*n/f*100)/100;c=Math.round(100*c/k*100)/100;t=Math.round(100*t/f*100)/100;A=Math.round(100*A)/100;q=Math.abs(q);n=Math.abs(n);f=0>A?"1":"0";A=C<Math.abs(A)?"1":"0";d.setLastX(c);d.setLastY(t);return'<arc rx="'+(new String(q)).toString()+'" ry="'+(new String(n)).toString()+'" x="'+(new String(c)).toString()+'" y="'+(new String(t)).toString()+'" x-axis-rotation="0" large-arc-flag="'+A+'" sweep-flag="'+f+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.ArcTo=h;h.__class="com.mxgraph.io.vsdx.geometry.ArcTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b){return c.call(this,b,null,null)||this}__extends(a,c);a.prototype.handle=function(b,d){return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.DelRow=h;h.__class="com.mxgraph.io.vsdx.geometry.DelRow"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){b=d.getHeight();var f=d.getWidth(),k=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=b-d;var n=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),-q=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();q=b-q;var t=this.c*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.d*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.abs(n-k);q=Math.abs(q-d);q=Math.sqrt(n*n+q*q);t=Math.abs(t-k);A=Math.abs(b-A-d);k=100*k/f;A=Math.round(100*Math.sqrt(t*t+A*A)/b/2*100)/100;f=Math.round(100*q/f/2*100)/100;t=Math.round(100*(k-2*f))/100;k=Math.round(100*(k+2*f))/100;b=Math.round(100*d/b*100)/100;return'<move x="'+(new String(t)).toString()+-'" y="'+(new String(b)).toString()+'"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(A)).toString()+'" x="'+(new String(k)).toString()+'" y="'+(new String(b)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(A)).toString()+'" x="'+(new String(t)).toString()+'" y="'+(new String(b)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.Ellipse=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c){return b.call(this,c,null,null)||this}__extends(a,b);a.prototype.handle=function(c,d){return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.DelRow=h;h.__class="com.mxgraph.io.vsdx.geometry.DelRow"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k,n,q,t){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;c.c=q;c.d=t;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){c=d.getHeight();var f=d.getWidth(),k=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=c-d;var n=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),+q=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();q=c-q;var t=this.c*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.d*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.abs(n-k);q=Math.abs(q-d);q=Math.sqrt(n*n+q*q);t=Math.abs(t-k);A=Math.abs(c-A-d);k=100*k/f;A=Math.round(100*Math.sqrt(t*t+A*A)/c/2*100)/100;f=Math.round(100*q/f/2*100)/100;t=Math.round(100*(k-2*f))/100;k=Math.round(100*(k+2*f))/100;c=Math.round(100*d/c*100)/100;return'<move x="'+(new String(t)).toString()++'" y="'+(new String(c)).toString()+'"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(A)).toString()+'" x="'+(new String(k)).toString()+'" y="'+(new String(c)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(A)).toString()+'" x="'+(new String(t)).toString()+'" y="'+(new String(c)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.Ellipse=h;h.__class="com.mxgraph.io.vsdx.geometry.Ellipse"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var f=d.getHeight(),k=d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=f-n;var q=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),-t=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.c,C=this.d;b=100*b/k;n=100*n/f;var I=d.getLastX()*k/100,Q=d.getLastY()*f/100,K=b*k/100,L=n*f/100,S=f-t,R=-A;A=Math.sqrt(I*I+Q*Q)*Math.cos(Math.atan2(Q,I)-R);t=Math.sqrt(I*I+Q*Q)*Math.sin(Math.atan2(Q,I)-R);var H=Math.sqrt(K*K+L*L)*Math.cos(Math.atan2(L,K)-R),N=Math.sqrt(K*K+L*L)*Math.sin(Math.atan2(L,K)-R),J=Math.sqrt(q*q+S*S)*Math.cos(Math.atan2(S,q)-R),M=Math.sqrt(q*q+S*S)*Math.sin(Math.atan2(S,q)-R),T=((A-H)*(A+H)*(N-M)-(H-J)*-(H+J)*(t-N)+C*C*(t-N)*(N-M)*(t-M))/(2*((A-H)*(N-M)-(H-J)*(t-N))),ca=((A-H)*(H-J)*(A-J)/(C*C)+(H-J)*(t-N)*(t+N)-(A-H)*(N-M)*(N+M))/(2*((H-J)*(t-N)-(A-H)*(N-M))),V=A-T,P=t-ca;V=Math.sqrt(V*V+P*P*C*C);C=V/C;R=180*R/Math.PI;b=Math.round(100*b)/100;n=Math.round(100*n)/100;V=Math.round(100*V/k*100)/100;C=Math.round(100*C/f*100)/100;R=Math.round(100*R)/100;f=0<(K-I)*(S-Q)-(L-Q)*(q-I)?"0":"1";k="0";g.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(T,ca,A,t,H,N,J,M)&&(k="1");d.setLastX(b);d.setLastY(n);return'<arc rx="'+-(new String(V)).toString()+'" ry="'+(new String(C)).toString()+'" x="'+(new String(b)).toString()+'" y="'+(new String(n)).toString()+'" x-axis-rotation="'+(new String(R)).toString()+'" large-arc-flag="'+k+'" sweep-flag="'+f+'"/>'}return""};a.prototype.isReflexAngle=function(b,d,f,k,n,q,t,A){f-=b;k-=d;q-=d;n=t-b;A-=d;d=b=0;f=180*(Math.atan2(k,f)-Math.atan2(d,b))/Math.PI;n=180*(Math.atan2(q,n)-Math.atan2(d,b))/Math.PI;b=180*(Math.atan2(A,t)-Math.atan2(d,b))/Math.PI;f=(f-b)%360;n=(n-b)%360;180<f?f-=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k,n,q,t){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;c.c=q;c.d=t;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var f=d.getHeight(),k=d.getWidth();c=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=f-n;var q=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),+t=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.c,C=this.d;c=100*c/k;n=100*n/f;var I=d.getLastX()*k/100,Q=d.getLastY()*f/100,K=c*k/100,L=n*f/100,S=f-t,R=-A;A=Math.sqrt(I*I+Q*Q)*Math.cos(Math.atan2(Q,I)-R);t=Math.sqrt(I*I+Q*Q)*Math.sin(Math.atan2(Q,I)-R);var H=Math.sqrt(K*K+L*L)*Math.cos(Math.atan2(L,K)-R),N=Math.sqrt(K*K+L*L)*Math.sin(Math.atan2(L,K)-R),J=Math.sqrt(q*q+S*S)*Math.cos(Math.atan2(S,q)-R),M=Math.sqrt(q*q+S*S)*Math.sin(Math.atan2(S,q)-R),T=((A-H)*(A+H)*(N-M)-(H-J)*+(H+J)*(t-N)+C*C*(t-N)*(N-M)*(t-M))/(2*((A-H)*(N-M)-(H-J)*(t-N))),ca=((A-H)*(H-J)*(A-J)/(C*C)+(H-J)*(t-N)*(t+N)-(A-H)*(N-M)*(N+M))/(2*((H-J)*(t-N)-(A-H)*(N-M))),V=A-T,P=t-ca;V=Math.sqrt(V*V+P*P*C*C);C=V/C;R=180*R/Math.PI;c=Math.round(100*c)/100;n=Math.round(100*n)/100;V=Math.round(100*V/k*100)/100;C=Math.round(100*C/f*100)/100;R=Math.round(100*R)/100;f=0<(K-I)*(S-Q)-(L-Q)*(q-I)?"0":"1";k="0";g.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(T,ca,A,t,H,N,J,M)&&(k="1");d.setLastX(c);d.setLastY(n);return'<arc rx="'++(new String(V)).toString()+'" ry="'+(new String(C)).toString()+'" x="'+(new String(c)).toString()+'" y="'+(new String(n)).toString()+'" x-axis-rotation="'+(new String(R)).toString()+'" large-arc-flag="'+k+'" sweep-flag="'+f+'"/>'}return""};a.prototype.isReflexAngle=function(c,d,f,k,n,q,t,A){f-=c;k-=d;q-=d;n=t-c;A-=d;d=c=0;f=180*(Math.atan2(k,f)-Math.atan2(d,c))/Math.PI;n=180*(Math.atan2(q,n)-Math.atan2(d,c))/Math.PI;c=180*(Math.atan2(A,t)-Math.atan2(d,c))/Math.PI;f=(f-c)%360;n=(n-c)%360;180<f?f-=360:-180>f&&(f+=360);180<n?n-=360:-180>n&&(n+=360);return(0<f&&0>n||0>f&&0<n)&&180<Math.abs(f-n)?!0:!1};return a}(g.mxgraph.io.vsdx.geometry.Row);m.EllipticalArcTo=h;h.__class="com.mxgraph.io.vsdx.geometry.EllipticalArcTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;return b}__extends(a,c);a.prototype.handle=function(b,d){return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.InfiniteLine=h;h.__class="com.mxgraph.io.vsdx.geometry.InfiniteLine"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y,n=d.getHeight(),q=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/q*100)/100;k=Math.round(100*(100-100*k/n))/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'++(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k,n){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;return c}__extends(a,b);a.prototype.handle=function(c,d){return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.InfiniteLine=h;h.__class="com.mxgraph.io.vsdx.geometry.InfiniteLine"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f){return b.call(this,c,d,f)||this}__extends(a,b);a.prototype.handle=function(c,d){var f=c.x,k=c.y,n=d.getHeight(),q=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/q*100)/100;k=Math.round(100*(100-100*k/n))/100;c.x=f;c.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.LineTo=h;h.__class="com.mxgraph.io.vsdx.geometry.LineTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y,n=d.getHeight(),q=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/q*100)/100;k=Math.round(100*(100-100*k/n))/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);d.setLastMoveX(f);+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f){return b.call(this,c,d,f)||this}__extends(a,b);a.prototype.handle=function(c,d){var f=c.x,k=c.y,n=d.getHeight(),q=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/q*100)/100;k=Math.round(100*(100-100*k/n))/100;c.x=f;c.y=k;d.setLastX(f);d.setLastY(k);d.setLastMoveX(f);d.setLastMoveY(k);return'<move x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.MoveTo=h;h.__class="com.mxgraph.io.vsdx.geometry.MoveTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t,A){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;b.formulaE=A;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.formulaE){var f=d.getHeight(),k=d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),q=this.formulaE.split("NURBS(").join("");q=q.split(")").join("");-q=new a.Nurbs(this,q,k,f);if(2<=q.getSize()){var t=q.getX(0),A=q.getY(0),C=q.getX(1),I=q.getY(1);b=Math.round(100*b/k*100)/100;n=Math.round(100*(100-100*n/f))/100;t=Math.round(100*t)/100;A=Math.round(100*A)/100;C=Math.round(100*C)/100;I=Math.round(100*I)/100;d.setLastX(b);d.setLastY(n);if(3===q.getDegree()&&q.isOrderedByThree(this.getA())){d=[];f=[];k=[];A=q.getSize();for(t=0;t<A-1;t+=3)d.push(new mxPoint(q.getX(t),q.getY(t))),f.push(new mxPoint(q.getX(t+1),q.getY(t+1))),t<A-2?k.push(new mxPoint(q.getX(t+-2),q.getY(t+2))):k.push(new mxPoint(b,n));b="";for(t=0;t<d.length;t++)b+='<curve x1="'+d[t].x+'" y1="'+d[t].y+'" x2="'+f[t].x+'" y2="'+f[t].y+'" x3="'+k[t].x+'" y3="'+k[t].y+'"/>\n';return b}return'<curve x1="'+(new String(t)).toString()+'" y1="'+(new String(A)).toString()+'" x2="'+(new String(C)).toString()+'" y2="'+(new String(I)).toString()+'" x3="'+(new String(b)).toString()+'" y3="'+(new String(n)).toString()+'"/>'}}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.NURBSTo=h;h.__class="com.mxgraph.io.vsdx.geometry.NURBSTo";-(function(c){var a=function(){function b(d,f,k,n){this.__parent=d;this.nurbsValues=[];d=f.split(/\s*,\s*/).slice(0);for(f=0;f<d.length;f++)3<f&&0===f%4?this.nurbsValues.push(100*parseFloat(d[f])):3<f&&1===f%4?this.nurbsValues.push(100-100*parseFloat(d[f])):this.nurbsValues.push(parseFloat(d[f]))}b.prototype.isOrderedByThree=function(d){for(var f=0;f+2<this.getSize();f+=3){var k=Math.round(100*this.getKnot(f))/100,n=Math.round(100*this.getKnot(f+1))/100,q=Math.round(100*this.getKnot(f+2))/100;if(k!==-n||k!==q||n!==q)return!1}f=Math.round(10*this.getKnot(this.getSize()-2))/10;k=Math.round(10*this.getKnot(this.getSize()-1))/10;d=Math.round(10*d)/10;return f!==k||f!==d||k!==d?!1:!0};b.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};b.prototype.getKnotLast=function(){return this.nurbsValues[0]};b.prototype.getDegree=function(){return this.nurbsValues[1]};b.prototype.getXType=function(){return this.nurbsValues[2]};b.prototype.getYType=function(){return this.nurbsValues[3]};b.prototype.getX=-function(d){return this.nurbsValues[4*(d+1)]};b.prototype.getY=function(d){return this.nurbsValues[4*(d+1)+1]};b.prototype.getKnot=function(d){return this.nurbsValues[4*(d+1)+2]};b.prototype.getWeight=function(d){return this.nurbsValues[4*(d+1)+3]};return b}();c.Nurbs=a;a.__class="com.mxgraph.io.vsdx.geometry.NURBSTo.Nurbs"})(h=m.NURBSTo||(m.NURBSTo={}))})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k){b=c.call(this,b,d,f)||this;b.formulaA=k;return b}__extends(a,c);a.prototype.handle=function(b,d){b="";if(null!=this.x&&null!=this.y&&null!=this.formulaA){var f=d.getHeight(),k=d.getWidth(),n=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),q=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.round(100*n/k*100)/100;q=Math.round(100*(100-100*q/f))/100;var t=this.formulaA.replace(RegExp("\\s",+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k,n,q,t,A){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;c.c=q;c.d=t;c.formulaE=A;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.formulaE){var f=d.getHeight(),k=d.getWidth();c=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),q=this.formulaE.split("NURBS(").join("");q=q.split(")").join("");+q=new a.Nurbs(this,q,k,f);if(2<=q.getSize()){var t=q.getX(0),A=q.getY(0),C=q.getX(1),I=q.getY(1);c=Math.round(100*c/k*100)/100;n=Math.round(100*(100-100*n/f))/100;t=Math.round(100*t)/100;A=Math.round(100*A)/100;C=Math.round(100*C)/100;I=Math.round(100*I)/100;d.setLastX(c);d.setLastY(n);if(3===q.getDegree()&&q.isOrderedByThree(this.getA())){d=[];f=[];k=[];A=q.getSize();for(t=0;t<A-1;t+=3)d.push(new mxPoint(q.getX(t),q.getY(t))),f.push(new mxPoint(q.getX(t+1),q.getY(t+1))),t<A-2?k.push(new mxPoint(q.getX(t++2),q.getY(t+2))):k.push(new mxPoint(c,n));c="";for(t=0;t<d.length;t++)c+='<curve x1="'+d[t].x+'" y1="'+d[t].y+'" x2="'+f[t].x+'" y2="'+f[t].y+'" x3="'+k[t].x+'" y3="'+k[t].y+'"/>\n';return c}return'<curve x1="'+(new String(t)).toString()+'" y1="'+(new String(A)).toString()+'" x2="'+(new String(C)).toString()+'" y2="'+(new String(I)).toString()+'" x3="'+(new String(c)).toString()+'" y3="'+(new String(n)).toString()+'"/>'}}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.NURBSTo=h;h.__class="com.mxgraph.io.vsdx.geometry.NURBSTo";+(function(b){var a=function(){function c(d,f,k,n){this.__parent=d;this.nurbsValues=[];d=f.split(/\s*,\s*/).slice(0);for(f=0;f<d.length;f++)3<f&&0===f%4?this.nurbsValues.push(100*parseFloat(d[f])):3<f&&1===f%4?this.nurbsValues.push(100-100*parseFloat(d[f])):this.nurbsValues.push(parseFloat(d[f]))}c.prototype.isOrderedByThree=function(d){for(var f=0;f+2<this.getSize();f+=3){var k=Math.round(100*this.getKnot(f))/100,n=Math.round(100*this.getKnot(f+1))/100,q=Math.round(100*this.getKnot(f+2))/100;if(k!==+n||k!==q||n!==q)return!1}f=Math.round(10*this.getKnot(this.getSize()-2))/10;k=Math.round(10*this.getKnot(this.getSize()-1))/10;d=Math.round(10*d)/10;return f!==k||f!==d||k!==d?!1:!0};c.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};c.prototype.getKnotLast=function(){return this.nurbsValues[0]};c.prototype.getDegree=function(){return this.nurbsValues[1]};c.prototype.getXType=function(){return this.nurbsValues[2]};c.prototype.getYType=function(){return this.nurbsValues[3]};c.prototype.getX=+function(d){return this.nurbsValues[4*(d+1)]};c.prototype.getY=function(d){return this.nurbsValues[4*(d+1)+1]};c.prototype.getKnot=function(d){return this.nurbsValues[4*(d+1)+2]};c.prototype.getWeight=function(d){return this.nurbsValues[4*(d+1)+3]};return c}();b.Nurbs=a;a.__class="com.mxgraph.io.vsdx.geometry.NURBSTo.Nurbs"})(h=m.NURBSTo||(m.NURBSTo={}))})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k){c=b.call(this,c,d,f)||this;c.formulaA=k;return c}__extends(a,b);a.prototype.handle=function(c,d){c="";if(null!=this.x&&null!=this.y&&null!=this.formulaA){var f=d.getHeight(),k=d.getWidth(),n=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),q=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.round(100*n/k*100)/100;q=Math.round(100*(100-100*q/f))/100;var t=this.formulaA.replace(RegExp("\\s","g"),"").toLowerCase().replace(RegExp("polyline\\(","g"),"").replace(RegExp("\\)","g"),"");var A=t&&t.equals?t.equals("inh"):"inh"===t;if(A)throw Object.defineProperty(Error(),"__classes",{configurable:!0,value:["java.lang.Throwable","java.lang.Object","java.lang.RuntimeException","java.lang.IllegalArgumentException","java.lang.Exception"]});t=t.split(",").slice(0).slice(0);A=parseFloat(t.splice(0,1));parseFloat(t.splice(0,1));for(var C,I;0<t.length;)C=parseFloat(t.splice(0,1))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),-I=parseFloat(t.splice(0,1))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),1===A&&(C=100*C/k),1===A&&(I=100*I/f),I=100-I,C=Math.round(100*C)/100,I=Math.round(100*I)/100,d.setLastX(C),d.setLastY(I),b+='<line x="'+(new String(C)).toString()+'" y="'+(new String(I)).toString()+'"/>';b+='<line x="'+(new String(n)).toString()+'" y="'+(new String(q)).toString()+'"/>';d.getLastMoveX()===n&&d.getLastMoveY()===q&&(b+="<close/>")}return b};return a}(g.mxgraph.io.vsdx.geometry.Row);m.PolylineTo=h;h.__class=+I=parseFloat(t.splice(0,1))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),1===A&&(C=100*C/k),1===A&&(I=100*I/f),I=100-I,C=Math.round(100*C)/100,I=Math.round(100*I)/100,d.setLastX(C),d.setLastY(I),c+='<line x="'+(new String(C)).toString()+'" y="'+(new String(I)).toString()+'"/>';c+='<line x="'+(new String(n)).toString()+'" y="'+(new String(q)).toString()+'"/>';d.getLastMoveX()===n&&d.getLastMoveY()===q&&(c+="<close/>")}return c};return a}(g.mxgraph.io.vsdx.geometry.Row);m.PolylineTo=h;h.__class="com.mxgraph.io.vsdx.geometry.PolylineTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){b=100*this.x;var f=100-100*this.y,k=100*this.a,n=100-100*this.b,q=100*this.c,t=100-100*this.d;b=Math.round(100*b)/100;f=Math.round(100*f)/100;k=Math.round(100*k)/100;n=Math.round(100*n)/100;q=Math.round(100*-q)/100;t=Math.round(100*t)/100;d.setLastX(b);d.setLastY(f);return'<curve x1="'+(new String(k)).toString()+'" y1="'+(new String(n)).toString()+'" x2="'+(new String(q)).toString()+'" y2="'+(new String(t)).toString()+'" x3="'+(new String(b)).toString()+'" y3="'+(new String(f)).toString()+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelCubBezTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelCubBezTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k,n,q,t){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;c.c=q;c.d=t;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){c=100*this.x;var f=100-100*this.y,k=100*this.a,n=100-100*this.b,q=100*this.c,t=100-100*this.d;c=Math.round(100*c)/100;f=Math.round(100*f)/100;k=Math.round(100*k)/100;n=Math.round(100*n)/100;q=Math.round(100*+q)/100;t=Math.round(100*t)/100;d.setLastX(c);d.setLastY(f);return'<curve x1="'+(new String(k)).toString()+'" y1="'+(new String(n)).toString()+'" x2="'+(new String(q)).toString()+'" y2="'+(new String(t)).toString()+'" x3="'+(new String(c)).toString()+'" y3="'+(new String(f)).toString()+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelCubBezTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelCubBezTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y;null!=this.x&&null!=this.y&&(f=100*this.x,k=100-100*this.y);f=Math.round(100*f)/100;k=Math.round(100*k)/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelLineTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelLineTo"})(B.geometry||+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f){return b.call(this,c,d,f)||this}__extends(a,b);a.prototype.handle=function(c,d){var f=c.x,k=c.y;null!=this.x&&null!=this.y&&(f=100*this.x,k=100-100*this.y);f=Math.round(100*f)/100;k=Math.round(100*k)/100;c.x=f;c.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelLineTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelLineTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y;null!=this.x&&null!=this.y&&(f=100*this.x,k=100-100*this.y);f=Math.round(100*f)/100;k=Math.round(100*k)/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);d.setLastMoveX(f);d.setLastMoveY(k);return'<move x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f){return b.call(this,c,d,f)||this}__extends(a,b);a.prototype.handle=function(c,d){var f=c.x,k=c.y;null!=this.x&&null!=this.y&&(f=100*this.x,k=100-100*this.y);f=Math.round(100*f)/100;k=Math.round(100*k)/100;c.x=f;c.y=k;d.setLastX(f);d.setLastY(k);d.setLastMoveX(f);d.setLastMoveY(k);return'<move x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelMoveTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelMoveTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b){b=100*this.x;var f=100-100*this.y,k=100*this.a,n=100-100*this.b;b=Math.round(100*b)/100;f=Math.round(100*f)/100;k=Math.round(100*k)/100;n=Math.round(100*n)/100;d.setLastX(b);d.setLastY(f);return'<quad x1="'+(new String(k)).toString()+'" y1="'+-(new String(n)).toString()+'" x2="'+(new String(b)).toString()+'" y2="'+(new String(f)).toString()+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelQuadBezTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelQuadBezTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k){b=c.call(this,b,d,f)||this;b.a=k;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a){b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();b=Math.round(100*b)/100;f=Math.round(100*(100-f))/100;d.setLastX(b);d.setLastY(f)}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k,n){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b){c=100*this.x;var f=100-100*this.y,k=100*this.a,n=100-100*this.b;c=Math.round(100*c)/100;f=Math.round(100*f)/100;k=Math.round(100*k)/100;n=Math.round(100*n)/100;d.setLastX(c);d.setLastY(f);return'<quad x1="'+(new String(k)).toString()+'" y1="'++(new String(n)).toString()+'" x2="'+(new String(c)).toString()+'" y2="'+(new String(f)).toString()+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelQuadBezTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelQuadBezTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k){c=b.call(this,c,d,f)||this;c.a=k;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a){c=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();c=Math.round(100*c)/100;f=Math.round(100*(100-f))/100;d.setLastX(c);d.setLastY(f)}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.SplineKnot=h;h.__class="com.mxgraph.io.vsdx.geometry.SplineKnot"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){d.getHeight();d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d.setLastKnot(this.c);b=Math.round(100*b)/-100;f=Math.round(100*(100-f))/100;d.getLastX();d.getLastY();d.setLastX(b);d.setLastY(f);return"<curve "}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.SplineStart=h;h.__class="com.mxgraph.io.vsdx.geometry.SplineStart"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a){this.cellElements={};this.sections={};this.styleParents={};this.style=this.pm=this.Id=this.shape=null;this.shape=c;this.pm=a.getPropertiesManager();c=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID);try{this.Id=null!=c&&0!==c.length?parseFloat(c):-1}catch(b){this.Id=-1}this.cacheCells(a);this.stylesheetRefs(a)}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0(),+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k,n,q,t){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;c.c=q;c.d=t;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){d.getHeight();d.getWidth();c=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d.setLastKnot(this.c);c=Math.round(100*c)/+100;f=Math.round(100*(100-f))/100;d.getLastX();d.getLastY();d.setLastX(c);d.setLastY(f);return"<curve "}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.SplineStart=h;h.__class="com.mxgraph.io.vsdx.geometry.SplineStart"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b,a){this.cellElements={};this.sections={};this.styleParents={};this.style=this.pm=this.Id=this.shape=null;this.shape=b;this.pm=a.getPropertiesManager();b=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID);try{this.Id=null!=b&&0!==b.length?parseFloat(b):-1}catch(c){this.Id=-1}this.cacheCells(a);this.stylesheetRefs(a)}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0(),h.__static_initializer_1())};h.styleTypes_$LI$=function(){h.__static_initialize();null==h.styleTypes&&(h.styleTypes={});return h.styleTypes};h.__static_initializer_0=function(){h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND_TRANS]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND_TRANS]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$().QuickStyleFillColor=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$().QuickStyleFillMatrix=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$().QuickStyleLineColor=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$().QuickStyleLineMatrix=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.BOTTOM_MARGIN]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.LEFT_MARGIN]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.RIGHT_MARGIN]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.TOP_MARGIN]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER]=-g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$().QuickStyleFontColor=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$().QuickStyleFontMatrix=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE};h.prototype.getTheme=function(){return null};h.prototype.getQuickStyleVals=function(){return null};h.prototype.isVertex=function(){return!1};h.prototype.styleDebug=function(c){h.vsdxStyleDebug&&console.info(c)};h.prototype.stylesheetRefs=function(c){this.styleParents[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE]=-c.getStylesheet(this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE));this.styleParents[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE]=c.getStylesheet(this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE));this.styleParents[g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE]=c.getStylesheet(this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE));this.style=c.getStylesheet("0")};h.prototype.cacheCells=function(c){if(null!=this.shape){var a=this.shape.childNodes;-if(null!=a)for(a=a.item(0);null!=a;)null!=a&&1==a.nodeType&&this.parseShapeElem(a,c),a=a.nextSibling}};h.prototype.parseShapeElem=function(c,a){a=c.nodeName;(function(b,d){return b&&b.equals?b.equals(d):b===d})(a,"Cell")?this.cellElements[c.getAttribute("N")]=c:function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Section")&&this.parseSection(c)};h.prototype.parseSection=function(c){var a=new g.mxgraph.io.vsdx.Section(c);this.sections[c.getAttribute("N")]=a};h.prototype.hasProperty=function(c,a){return this.cellElements.hasOwnProperty(a)};-h.prototype.getValue=function(c,a){return null!=c?c.getAttribute("V")||"":a};h.prototype.getValueAsDouble=function(c,a){if(null!=c){var b=c.getAttribute("V");if(null!=b){if(function(f,k){return f&&f.equals?f.equals(k):f===k}(b,"Themed"))return 0;try{var d=parseFloat(b);(function(f,k){return f&&f.equals?f.equals(k):f===k})(c.getAttribute("U"),"PT")&&(d*=g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());return Math.round(100*d)/100}catch(f){}}}return a};h.prototype.getScreenNumericalValue$org_w3c_dom_Element$double=-function(c,a){if(null!=c&&(c=c.getAttribute("V"),null!=c))try{var b=parseFloat(c);return this.getScreenNumericalValue$double(b)}catch(d){}return a};h.prototype.getScreenNumericalValue=function(c,a){if((null==c||1!=c.nodeType)&&null!==c||"number"!==typeof a&&null!==a){if("number"!==typeof c&&null!==c||void 0!==a)throw Error("invalid overload");return this.getScreenNumericalValue$double(c)}return this.getScreenNumericalValue$org_w3c_dom_Element$double(c,a)};h.prototype.getScreenNumericalValue$double=-function(c){return c*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()};h.prototype.getAttribute=function(c,a,b){var d=this.cellElements;c=d[c]?d[c]:null;null!=c&&(b=c.getAttribute(a)||"");return b};h.prototype.getChildValues=function(c,a){var b={};for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType){var d=c,f;if((f=d.nodeName)&&f.equals?f.equals("Cell"):"Cell"===f){f=d.getAttribute("N")||"";var k=d.getAttribute("V")||""}else f=d.nodeName,k=d.textContent;if(null!=a){var n=a[f]?a[f]:null;null!=-n&&(k=d.getAttribute(n)||"")}b[f]=k}c=c.nextSibling}return b};h.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(c,a,b){var d=function(q,t){return q[t]?q[t]:null}(this.sections,b),f=null,k=!1;null!=d&&(f=d.getIndexedCell(a,c));if(null!=f){d=f.getAttribute("F");var n=f.getAttribute("V");if(null!=d&&null!=n)if(function(q,t){return q&&q.equals?q.equals(t):q===t}(d,"Inh")&&function(q,t){return q&&q.equals?q.equals(t):q===t}(n,"Themed"))k=!0;else if(function(q,t){return q&&-q.equals?q.equals(t):q===t}(d,"THEMEVAL()")&&function(q,t){return q&&q.equals?q.equals(t):q===t}(n,"Themed")&&null!=this.style){if(function(q,t){return q&&q.equals?q.equals(t):q===t}(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR,c))return f;d=this.style.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,a,b);if(null!=d)return d}}if(null==f||k)if(k=function(q,t){return q[t]?q[t]:null}(h.styleTypes_$LI$(),b),k=function(q,t){return q[t]?q[t]:null}(this.styleParents,k),null!=k&&(c=k.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,-a,b),null!=c))return c;return f};h.prototype.getCellElement=function(c,a,b){if("string"!==typeof c&&null!==c||"string"!==typeof a&&null!==a||"string"!==typeof b&&null!==b){if("string"!==typeof c&&null!==c||void 0!==a||void 0!==b)throw Error("invalid overload");return this.getCellElement$java_lang_String(c)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,a,b)};h.prototype.getCellElement$java_lang_String=function(c){var a=function(k,n){return k[n]?k[n]:null}(this.cellElements,-c),b=!1;if(null!=a){var d=a.getAttribute("F"),f=a.getAttribute("V");if(null!=d&&null!=f)if(function(k,n){return k&&k.equals?k.equals(n):k===n}(d,"Inh")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f,"Themed"))b=!0;else if(-1!=d.indexOf("THEMEVAL()")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f,"Themed")&&null!=this.style){if(function(k,n){return k&&k.equals?k.equals(n):k===n}("FillForegnd",c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR,-c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN,c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE,c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE,c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW,c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW,-c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT,c))return a;d=this.style.getCellElement$java_lang_String(c);if(null!=d)return d}}if(null==a||b)if(b=function(k,n){return k[n]?k[n]:null}(h.styleTypes_$LI$(),c),b=function(k,n){return k[n]?k[n]:null}(this.styleParents,b),null!=b&&(c=b.getCellElement$java_lang_String(c),null!=c))return c;return a};h.prototype.getStrokeColor=function(){var c="";(function(a,b){return a&&a.equals?a.equals(b):a===b})(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),-"1"),"0")?c="none":(c=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR)),function(a,b){return a&&a.equals?a.equals(b):a===b}("Themed",c)&&(c=this.getTheme(),c=null!=c?(this.isVertex()?c.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):c.getConnLineColor(this.getQuickStyleVals())).toHexStr():""));return c};h.prototype.getFillColor=function(){if(function(b,d){return b&&b.equals?b.equals(d):b===d}("1",this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),-"0"))){var c=function(b,d){return b[d]?b[d]:null}(this.sections,"FillGradient");if(null!=c&&(c=this.getColor(c.getIndexedCell("0","GradientStopColor")),null!=c&&0!==c.length))return c}c=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND));(function(b,d){return b&&b.equals?b.equals(d):b===d})("Themed",c)&&(c=this.getTheme(),null!=c?(c=c.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()),c=c.toHexStr()):c="#FFFFFF");var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),-"0");return null!=a&&function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")?"none":c};h.prototype.getColor=function(c){c=this.getValue(c,"");(function(a,b){return a&&a.equals?a.equals(b):a===b})("Themed",c)||function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(c,"#")||(c=this.pm.getColor(c));return c};h.prototype.getTextBkgndColor=function(c){c=this.getValue(c,"");return function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(c,"#")?c:function(a,b){return a&&a.equals?-a.equals(b):a===b}(c,"0")||function(a,b){return a&&a.equals?a.equals(b):a===b}(c,"255")||0===c.length?"none":this.pm.getColor((new String(parseInt(c)-1)).toString())};h.prototype.getLineWeight=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),0)};h.prototype.getStrokeTransparency=function(){return this.getValueAsDouble(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS),-0)};h.prototype.getNameU=function(){return this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||""};h.prototype.getName=function(){return this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME)||""};h.prototype.getUniqueID=function(){return this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.UNIQUE_ID)||""};h.prototype.getId=function(){return this.Id};h.prototype.getTextColor=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR,-c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);c=this.getValue(c,"#000000");(function(a,b){return a&&a.equals?a.equals(b):a===b})("Themed",c)?(c=this.getTheme(),c=null!=c?(this.isVertex()?c.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):c.getConnFontColor(this.getQuickStyleVals())).toHexStr():"#000000"):function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(c,"#")||(c=this.pm.getColor(c));return c};h.prototype.getTextTopMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TOP_MARGIN),+g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$().QuickStyleFontColor=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$().QuickStyleFontMatrix=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE};h.prototype.getTheme=function(){return null};h.prototype.getQuickStyleVals=function(){return null};h.prototype.isVertex=function(){return!1};h.prototype.styleDebug=function(b){h.vsdxStyleDebug&&console.info(b)};h.prototype.stylesheetRefs=function(b){this.styleParents[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE]=+b.getStylesheet(this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE));this.styleParents[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE]=b.getStylesheet(this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE));this.styleParents[g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE]=b.getStylesheet(this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE));this.style=b.getStylesheet("0")};h.prototype.cacheCells=function(b){if(null!=this.shape){var a=this.shape.childNodes;+if(null!=a)for(a=a.item(0);null!=a;)null!=a&&1==a.nodeType&&this.parseShapeElem(a,b),a=a.nextSibling}};h.prototype.parseShapeElem=function(b,a){a=b.nodeName;(function(c,d){return c&&c.equals?c.equals(d):c===d})(a,"Cell")?this.cellElements[b.getAttribute("N")]=b:function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"Section")&&this.parseSection(b)};h.prototype.parseSection=function(b){var a=new g.mxgraph.io.vsdx.Section(b);this.sections[b.getAttribute("N")]=a};h.prototype.hasProperty=function(b,a){return this.cellElements.hasOwnProperty(a)};+h.prototype.getValue=function(b,a){return null!=b?b.getAttribute("V")||"":a};h.prototype.getValueAsDouble=function(b,a){if(null!=b){var c=b.getAttribute("V");if(null!=c){if(function(f,k){return f&&f.equals?f.equals(k):f===k}(c,"Themed"))return 0;try{var d=parseFloat(c);(function(f,k){return f&&f.equals?f.equals(k):f===k})(b.getAttribute("U"),"PT")&&(d*=g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());return Math.round(100*d)/100}catch(f){}}}return a};h.prototype.getScreenNumericalValue$org_w3c_dom_Element$double=+function(b,a){if(null!=b&&(b=b.getAttribute("V"),null!=b))try{var c=parseFloat(b);return this.getScreenNumericalValue$double(c)}catch(d){}return a};h.prototype.getScreenNumericalValue=function(b,a){if((null==b||1!=b.nodeType)&&null!==b||"number"!==typeof a&&null!==a){if("number"!==typeof b&&null!==b||void 0!==a)throw Error("invalid overload");return this.getScreenNumericalValue$double(b)}return this.getScreenNumericalValue$org_w3c_dom_Element$double(b,a)};h.prototype.getScreenNumericalValue$double=+function(b){return b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()};h.prototype.getAttribute=function(b,a,c){var d=this.cellElements;b=d[b]?d[b]:null;null!=b&&(c=b.getAttribute(a)||"");return c};h.prototype.getChildValues=function(b,a){var c={};for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType){var d=b,f;if((f=d.nodeName)&&f.equals?f.equals("Cell"):"Cell"===f){f=d.getAttribute("N")||"";var k=d.getAttribute("V")||""}else f=d.nodeName,k=d.textContent;if(null!=a){var n=a[f]?a[f]:null;null!=+n&&(k=d.getAttribute(n)||"")}c[f]=k}b=b.nextSibling}return c};h.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(b,a,c){var d=function(q,t){return q[t]?q[t]:null}(this.sections,c),f=null,k=!1;null!=d&&(f=d.getIndexedCell(a,b));if(null!=f){d=f.getAttribute("F");var n=f.getAttribute("V");if(null!=d&&null!=n)if(function(q,t){return q&&q.equals?q.equals(t):q===t}(d,"Inh")&&function(q,t){return q&&q.equals?q.equals(t):q===t}(n,"Themed"))k=!0;else if(function(q,t){return q&&+q.equals?q.equals(t):q===t}(d,"THEMEVAL()")&&function(q,t){return q&&q.equals?q.equals(t):q===t}(n,"Themed")&&null!=this.style){if(function(q,t){return q&&q.equals?q.equals(t):q===t}(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR,b))return f;d=this.style.getCellElement$java_lang_String$java_lang_String$java_lang_String(b,a,c);if(null!=d)return d}}if(null==f||k)if(k=function(q,t){return q[t]?q[t]:null}(h.styleTypes_$LI$(),c),k=function(q,t){return q[t]?q[t]:null}(this.styleParents,k),null!=k&&(b=k.getCellElement$java_lang_String$java_lang_String$java_lang_String(b,+a,c),null!=b))return b;return f};h.prototype.getCellElement=function(b,a,c){if("string"!==typeof b&&null!==b||"string"!==typeof a&&null!==a||"string"!==typeof c&&null!==c){if("string"!==typeof b&&null!==b||void 0!==a||void 0!==c)throw Error("invalid overload");return this.getCellElement$java_lang_String(b)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(b,a,c)};h.prototype.getCellElement$java_lang_String=function(b){var a=function(k,n){return k[n]?k[n]:null}(this.cellElements,+b),c=!1;if(null!=a){var d=a.getAttribute("F"),f=a.getAttribute("V");if(null!=d&&null!=f)if(function(k,n){return k&&k.equals?k.equals(n):k===n}(d,"Inh")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f,"Themed"))c=!0;else if(-1!=d.indexOf("THEMEVAL()")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f,"Themed")&&null!=this.style){if(function(k,n){return k&&k.equals?k.equals(n):k===n}("FillForegnd",b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR,+b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN,b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE,b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE,b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW,b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW,+b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT,b))return a;d=this.style.getCellElement$java_lang_String(b);if(null!=d)return d}}if(null==a||c)if(c=function(k,n){return k[n]?k[n]:null}(h.styleTypes_$LI$(),b),c=function(k,n){return k[n]?k[n]:null}(this.styleParents,c),null!=c&&(b=c.getCellElement$java_lang_String(b),null!=b))return b;return a};h.prototype.getStrokeColor=function(){var b="";(function(a,c){return a&&a.equals?a.equals(c):a===c})(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),+"1"),"0")?b="none":(b=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR)),function(a,c){return a&&a.equals?a.equals(c):a===c}("Themed",b)&&(b=this.getTheme(),b=null!=b?(this.isVertex()?b.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):b.getConnLineColor(this.getQuickStyleVals())).toHexStr():""));return b};h.prototype.getFillColor=function(){if(function(c,d){return c&&c.equals?c.equals(d):c===d}("1",this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),+"0"))){var b=function(c,d){return c[d]?c[d]:null}(this.sections,"FillGradient");if(null!=b&&(b=this.getColor(b.getIndexedCell("0","GradientStopColor")),null!=b&&0!==b.length))return b}b=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND));(function(c,d){return c&&c.equals?c.equals(d):c===d})("Themed",b)&&(b=this.getTheme(),null!=b?(b=b.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()),b=b.toHexStr()):b="#FFFFFF");var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),+"0");return null!=a&&function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0")?"none":b};h.prototype.getColor=function(b){b=this.getValue(b,"");(function(a,c){return a&&a.equals?a.equals(c):a===c})("Themed",b)||function(a,c,d){void 0===d&&(d=0);return a.substr(d,c.length)===c}(b,"#")||(b=this.pm.getColor(b));return b};h.prototype.getTextBkgndColor=function(b){b=this.getValue(b,"");return function(a,c,d){void 0===d&&(d=0);return a.substr(d,c.length)===c}(b,"#")?b:function(a,c){return a&&a.equals?+a.equals(c):a===c}(b,"0")||function(a,c){return a&&a.equals?a.equals(c):a===c}(b,"255")||0===b.length?"none":this.pm.getColor((new String(parseInt(b)-1)).toString())};h.prototype.getLineWeight=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),0)};h.prototype.getStrokeTransparency=function(){return this.getValueAsDouble(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS),+0)};h.prototype.getNameU=function(){return this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||""};h.prototype.getName=function(){return this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME)||""};h.prototype.getUniqueID=function(){return this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.UNIQUE_ID)||""};h.prototype.getId=function(){return this.Id};h.prototype.getTextColor=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR,+b,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);b=this.getValue(b,"#000000");(function(a,c){return a&&a.equals?a.equals(c):a===c})("Themed",b)?(b=this.getTheme(),b=null!=b?(this.isVertex()?b.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):b.getConnFontColor(this.getQuickStyleVals())).toHexStr():"#000000"):function(a,c,d){void 0===d&&(d=0);return a.substr(d,c.length)===c}(b,"#")||(b=this.pm.getColor(b));return b};h.prototype.getTextTopMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TOP_MARGIN),0)};h.prototype.getTextBottomMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BOTTOM_MARGIN),0)};h.prototype.getTextLeftMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LEFT_MARGIN),0)};h.prototype.getTextRightMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.RIGHT_MARGIN),-0)};h.prototype.getTextStyle=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE,c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(c,"")};h.prototype.getTextFont=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FONT,c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(c,"")};h.prototype.getTextPos=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.POS,-c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(c,"")};h.prototype.getTextStrike=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.STRIKETHRU,c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);c=(c=this.getValue(c,""))&&c.equals?c.equals("1"):"1"===c;return c};h.prototype.getTextCase=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.CASE,c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);-return this.getValue(c,"")};h.prototype.getHorizontalAlign=function(c,a){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HORIZONTAL_ALIGN,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);switch(this.getValue(c,"")){case "0":a=a?"left":mxConstants.ALIGN_LEFT;break;case "2":a=a?"right":mxConstants.ALIGN_RIGHT;break;case "3":case "4":a=a?"justify":mxConstants.ALIGN_CENTER;break;default:a=a?"center":mxConstants.ALIGN_CENTER}return a};h.prototype.getIndentFirst=-function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.INDENT_FIRST,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,0))).toString()};h.prototype.getIndentLeft=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.INDENT_LEFT,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,-0))|0)).toString()};h.prototype.getIndentRight=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.INDENT_RIGHT,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,0))|0)).toString()};h.prototype.getSpBefore=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SPACE_BEFORE,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);-return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,0))|0)).toString()};h.prototype.getSpAfter=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SPACE_AFTER,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,0))|0)).toString()};h.prototype.getSpLine=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SPACE_LINE,-c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);c=this.getValue(c,"");var a=c&&c.equals?c.equals(""):""===c;return a?0:parseFloat(c)};h.prototype.getFlags=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLAGS,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return this.getValue(c,"0")};h.prototype.getLetterSpace=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LETTER_SPACE,-c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,0))).toString()};h.prototype.getBullet=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BULLET,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return this.getValue(c,"0")};h.prototype.getShape=function(){return this.shape};h.prototype.setShape=function(c){this.shape=c};h.lineDashPatterns_$LI$=function(){h.__static_initialize();-null==h.lineDashPatterns&&(h.lineDashPatterns=[]);return h.lineDashPatterns};h.__static_initializer_1=function(){h.lineDashPatterns_$LI$().push([]);h.lineDashPatterns_$LI$().push([]);h.lineDashPatterns_$LI$().push([]);var c=[];c.push(h.DOT);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DASH);c.push(h.SPACE);c.push(h.DOT);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DASH);c.push(h.SPACE);c.push(h.DOT);c.push(h.SPACE);c.push(h.DOT);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);-c=[];c.push(h.DASH);c.push(h.SPACE);c.push(h.DASH);c.push(h.SPACE);c.push(h.DOT);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.LONG_DASH);c.push(h.SPACE);c.push(h.SHORT_DASH);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.LONG_DASH);c.push(h.SPACE);c.push(h.SHORT_DASH);c.push(h.SPACE);c.push(h.SHORT_DASH);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DOT);c.push(h.SHORT_SPACE);-h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);c.push(h.DOT);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);c.push(h.DOT);c.push(h.SHORT_SPACE);c.push(h.DOT);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);c.push(h.DOT);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DASH);c.push(h.SHORT_SPACE);-c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DASH);c.push(h.SHORT_SPACE);c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.LONG_DASH);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DOT);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.LONG_DASH);c.push(h.LONG_SPACE);c.push(h.DOT);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);-c=[];c.push(h.LONG_DASH);c.push(h.LONG_SPACE);c.push(h.DOT);c.push(h.LONG_SPACE);c.push(h.DOT);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.LONG_DASH);c.push(h.LONG_SPACE);c.push(h.LONG_DASH);c.push(h.LONG_SPACE);c.push(h.DOT);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.XLONG_DASH);c.push(h.LONG_SPACE);c.push(h.DASH);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.XLONG_DASH);c.push(h.LONG_SPACE);c.push(h.DASH);c.push(h.LONG_SPACE);-c.push(h.DASH);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.XSHORT_DASH);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c)};h.getLineDashPattern=function(c){return 0<=c&&23>=c?h.lineDashPatterns_$LI$()[c]:h.lineDashPatterns_$LI$()[0]};return h}();m.__static_initialized=!1;m.vsdxStyleDebug=!1;m.SPACE=4;m.SHORT_SPACE=2;m.LONG_SPACE=6;m.DOT=1;m.DASH=8;m.LONG_DASH=12;m.SHORT_DASH=4;m.XLONG_DASH=20;m.XSHORT_DASH=2;B.Style=m;m.__class="com.mxgraph.io.vsdx.Style"})(z.vsdx||+0)};h.prototype.getTextStyle=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE,b,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};h.prototype.getTextFont=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FONT,b,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};h.prototype.getTextPos=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.POS,+b,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};h.prototype.getTextStrike=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.STRIKETHRU,b,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);b=(b=this.getValue(b,""))&&b.equals?b.equals("1"):"1"===b;return b};h.prototype.getTextCase=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.CASE,b,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);+return this.getValue(b,"")};h.prototype.getHorizontalAlign=function(b,a){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HORIZONTAL_ALIGN,b,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);switch(this.getValue(b,"")){case "0":a=a?"left":mxConstants.ALIGN_LEFT;break;case "2":a=a?"right":mxConstants.ALIGN_RIGHT;break;case "3":case "4":a=a?"justify":mxConstants.ALIGN_CENTER;break;default:a=a?"center":mxConstants.ALIGN_CENTER}return a};h.prototype.getIndentFirst=+function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.INDENT_FIRST,b,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))).toString()};h.prototype.getIndentLeft=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.INDENT_LEFT,b,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,+0))|0)).toString()};h.prototype.getIndentRight=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.INDENT_RIGHT,b,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};h.prototype.getSpBefore=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SPACE_BEFORE,b,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);+return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};h.prototype.getSpAfter=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SPACE_AFTER,b,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};h.prototype.getSpLine=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SPACE_LINE,+b,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);b=this.getValue(b,"");var a=b&&b.equals?b.equals(""):""===b;return a?0:parseFloat(b)};h.prototype.getFlags=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLAGS,b,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return this.getValue(b,"0")};h.prototype.getLetterSpace=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LETTER_SPACE,+b,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))).toString()};h.prototype.getBullet=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BULLET,b,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return this.getValue(b,"0")};h.prototype.getShape=function(){return this.shape};h.prototype.setShape=function(b){this.shape=b};h.lineDashPatterns_$LI$=function(){h.__static_initialize();+null==h.lineDashPatterns&&(h.lineDashPatterns=[]);return h.lineDashPatterns};h.__static_initializer_1=function(){h.lineDashPatterns_$LI$().push([]);h.lineDashPatterns_$LI$().push([]);h.lineDashPatterns_$LI$().push([]);var b=[];b.push(h.DOT);b.push(h.SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.DASH);b.push(h.SPACE);b.push(h.DOT);b.push(h.SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.DASH);b.push(h.SPACE);b.push(h.DOT);b.push(h.SPACE);b.push(h.DOT);b.push(h.SPACE);h.lineDashPatterns_$LI$().push(b);+b=[];b.push(h.DASH);b.push(h.SPACE);b.push(h.DASH);b.push(h.SPACE);b.push(h.DOT);b.push(h.SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.LONG_DASH);b.push(h.SPACE);b.push(h.SHORT_DASH);b.push(h.SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.LONG_DASH);b.push(h.SPACE);b.push(h.SHORT_DASH);b.push(h.SPACE);b.push(h.SHORT_DASH);b.push(h.SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.SHORT_DASH);b.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.DOT);b.push(h.SHORT_SPACE);+h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.SHORT_DASH);b.push(h.SHORT_SPACE);b.push(h.DOT);b.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.SHORT_DASH);b.push(h.SHORT_SPACE);b.push(h.DOT);b.push(h.SHORT_SPACE);b.push(h.DOT);b.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.SHORT_DASH);b.push(h.SHORT_SPACE);b.push(h.SHORT_DASH);b.push(h.SHORT_SPACE);b.push(h.DOT);b.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.DASH);b.push(h.SHORT_SPACE);+b.push(h.SHORT_DASH);b.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.DASH);b.push(h.SHORT_SPACE);b.push(h.SHORT_DASH);b.push(h.SHORT_SPACE);b.push(h.SHORT_DASH);b.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.LONG_DASH);b.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.DOT);b.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.LONG_DASH);b.push(h.LONG_SPACE);b.push(h.DOT);b.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(b);+b=[];b.push(h.LONG_DASH);b.push(h.LONG_SPACE);b.push(h.DOT);b.push(h.LONG_SPACE);b.push(h.DOT);b.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.LONG_DASH);b.push(h.LONG_SPACE);b.push(h.LONG_DASH);b.push(h.LONG_SPACE);b.push(h.DOT);b.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.XLONG_DASH);b.push(h.LONG_SPACE);b.push(h.DASH);b.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.XLONG_DASH);b.push(h.LONG_SPACE);b.push(h.DASH);b.push(h.LONG_SPACE);+b.push(h.DASH);b.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.XSHORT_DASH);b.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(b)};h.getLineDashPattern=function(b){return 0<=b&&23>=b?h.lineDashPatterns_$LI$()[b]:h.lineDashPatterns_$LI$()[0]};return h}();m.__static_initialized=!1;m.vsdxStyleDebug=!1;m.SPACE=4;m.SHORT_SPACE=2;m.LONG_SPACE=6;m.DOT=1;m.DASH=8;m.LONG_DASH=12;m.SHORT_DASH=4;m.XLONG_DASH=20;m.XSHORT_DASH=2;B.Style=m;m.__class="com.mxgraph.io.vsdx.Style"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){var k=c.call(this)||this;k.__com_mxgraph_io_vsdx_theme_HslClr_hue=b/360;k.__com_mxgraph_io_vsdx_theme_HslClr_sat=d/100;k.__com_mxgraph_io_vsdx_theme_HslClr_lum=f/100;k.color=(new g.mxgraph.io.vsdx.theme.HSLColor(b,d,f)).toRgb();return k}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.HslClr=h;h.__class="com.mxgraph.io.vsdx.theme.HslClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||-(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b){var d=c.call(this)||this;d.val=b;d.color=new g.mxgraph.io.vsdx.theme.Color(255,255,255);return d}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.PrstClr=h;h.__class="com.mxgraph.io.vsdx.theme.PrstClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b){var d=c.call(this)||this;d.isDynamic=!0;d.val=b;return d}__extends(a,c);a.prototype.calcColor=function(b,d){var f=this.val;f="phClr".equals?"phClr".equals(f):"phClr"===f;f?this.color=d.getStyleColor(b):(this.color=d.getSchemeColor(this.val),this.isDynamic=!1);c.prototype.calcColor.call(this,b,d)};return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SchemeClr=h;h.__class="com.mxgraph.io.vsdx.theme.SchemeClr"})(B.theme||+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f){var k=b.call(this)||this;k.__com_mxgraph_io_vsdx_theme_HslClr_hue=c/360;k.__com_mxgraph_io_vsdx_theme_HslClr_sat=d/100;k.__com_mxgraph_io_vsdx_theme_HslClr_lum=f/100;k.color=(new g.mxgraph.io.vsdx.theme.HSLColor(c,d,f)).toRgb();return k}__extends(a,b);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.HslClr=h;h.__class="com.mxgraph.io.vsdx.theme.HslClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||+(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c){var d=b.call(this)||this;d.val=c;d.color=new g.mxgraph.io.vsdx.theme.Color(255,255,255);return d}__extends(a,b);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.PrstClr=h;h.__class="com.mxgraph.io.vsdx.theme.PrstClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c){var d=b.call(this)||this;d.isDynamic=!0;d.val=c;return d}__extends(a,b);a.prototype.calcColor=function(c,d){var f=this.val;f="phClr".equals?"phClr".equals(f):"phClr"===f;f?this.color=d.getStyleColor(c):(this.color=d.getSchemeColor(this.val),this.isDynamic=!1);b.prototype.calcColor.call(this,c,d)};return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SchemeClr=h;h.__class="com.mxgraph.io.vsdx.theme.SchemeClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){var k=c.call(this)||this;k.r=0;k.g=0;k.b=0;k.r=b;k.g=d;k.b=f;k.color=new g.mxgraph.io.vsdx.theme.Color(b,d,f);return k}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.ScrgbClr=h;h.__class="com.mxgraph.io.vsdx.theme.ScrgbClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b){var d=c.call(this)||this;d.hexVal=null;d.hexVal=b;d.color=g.mxgraph.io.vsdx.theme.Color.decodeColorHex(b);return d}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SrgbClr=h;h.__class="com.mxgraph.io.vsdx.theme.SrgbClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d){var f=c.call(this)||this;f.lastClr=null;f.val=b;f.lastClr=d;if(null==d)switch(b){case "windowText":d="000000";break;case "window":d="FFFFFF";break;default:d="FFFFFF"}f.color=g.mxgraph.io.vsdx.theme.Color.decodeColorHex(d);return f}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SysClr=h;h.__class="com.mxgraph.io.vsdx.theme.SysClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f){var k=b.call(this)||this;k.r=0;k.g=0;k.b=0;k.r=c;k.g=d;k.b=f;k.color=new g.mxgraph.io.vsdx.theme.Color(c,d,f);return k}__extends(a,b);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.ScrgbClr=h;h.__class="com.mxgraph.io.vsdx.theme.ScrgbClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c){var d=b.call(this)||this;d.hexVal=null;d.hexVal=c;d.color=g.mxgraph.io.vsdx.theme.Color.decodeColorHex(c);return d}__extends(a,b);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SrgbClr=h;h.__class="com.mxgraph.io.vsdx.theme.SrgbClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d){var f=b.call(this)||this;f.lastClr=null;f.val=c;f.lastClr=d;if(null==d)switch(c){case "windowText":d="000000";break;case "window":d="FFFFFF";break;default:d="FFFFFF"}f.color=g.mxgraph.io.vsdx.theme.Color.decodeColorHex(d);return f}__extends(a,b);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SysClr=h;h.__class="com.mxgraph.io.vsdx.theme.SysClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){return c.call(this,b,d,f,k,n,q,t)||this}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var f=d.getHeight()/g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=d.getWidth()/g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();this.x*=k;this.y*=f;this.a*=k;this.b*=f}return c.prototype.handle.call(this,-b,d)};return a}(g.mxgraph.io.vsdx.geometry.EllipticalArcTo);m.RelEllipticalArcTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelEllipticalArcTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(h){function c(a,b){var d=this;d.text=null;d.fields=null;d.geom=null;d.imageData=null;d.theme=null;d.quickStyleVals=null;d=h.call(this,a,b)||this;d.paragraphs=null;d.styleMap={};d.width=0;d.height=0;d.rotation=0;d.lastX=0;d.lastY=0;d.lastMoveX=0;d.lastMoveY=0;d.lastKnot=-1;d.geomList=null;d.geomListProcessed=!1;d.themeVariant=0;d.cp="0";d.pp="0";d.tp="0";d.fld="0";d.width=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(f,-k){return f[k]?f[k]:null}(d.cellElements,g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0);d.height=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(f,k){return f[k]?f[k]:null}(d.cellElements,g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return d}__extends(c,h);c.UNICODE_LINE_SEP_$LI$=function(){null==c.UNICODE_LINE_SEP&&(c.ERROR_IMAGE="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8IS0tIENyZWF0ZWQgd2l0aCBJbmtzY2FwZSAoaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvKSAtLT4NCjxzdmcNCiAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyINCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiDQogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiDQogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIg0KICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiDQogICB3aWR0aD0iMjUwIg0KICAgaGVpZ2h0PSIyNTAiDQogICBpZD0ic3ZnMzMxOSINCiAgIHNvZGlwb2RpOnZlcnNpb249IjAuMzIiDQogICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjQ2Ig0KICAgdmVyc2lvbj0iMS4wIg0KICAgc29kaXBvZGk6ZG9jbmFtZT0ibm9waG90b19pLnN2ZyINCiAgIGlua3NjYXBlOm91dHB1dF9leHRlbnNpb249Im9yZy5pbmtzY2FwZS5vdXRwdXQuc3ZnLmlua3NjYXBlIj4NCiAgPGRlZnMNCiAgICAgaWQ9ImRlZnMzMzIxIj4NCiAgICA8aW5rc2NhcGU6cGVyc3BlY3RpdmUNCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIg0KICAgICAgIGlua3NjYXBlOnZwX3g9IjAgOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnBlcnNwM2Qtb3JpZ2luPSIzNzIuMDQ3MjQgOiAzNTAuNzg3MzkgOiAxIg0KICAgICAgIGlkPSJwZXJzcGVjdGl2ZTMzMjciIC8+DQogICAgPGlua3NjYXBlOnBlcnNwZWN0aXZlDQogICAgICAgaWQ9InBlcnNwZWN0aXZlMzM0MiINCiAgICAgICBpbmtzY2FwZTpwZXJzcDNkLW9yaWdpbj0iMzcyLjA0NzI0IDogMzUwLjc4NzM5IDogMSINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF94PSIwIDogNTI2LjE4MTA5IDogMSINCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIiAvPg0KICA8L2RlZnM+DQogIDxzb2RpcG9kaTpuYW1lZHZpZXcNCiAgICAgaWQ9ImJhc2UiDQogICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiINCiAgICAgYm9yZGVyY29sb3I9IiM2NjY2NjYiDQogICAgIGJvcmRlcm9wYWNpdHk9IjEuMCINCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAuMCINCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiINCiAgICAgaW5rc2NhcGU6em9vbT0iMi4yNDI5NDI3Ig0KICAgICBpbmtzY2FwZTpjeD0iMTIxLjk3NjQ4Ig0KICAgICBpbmtzY2FwZTpjeT0iMTIyLjQ0MTk4Ig0KICAgICBpbmtzY2FwZTpkb2N1bWVudC11bml0cz0icHgiDQogICAgIGlua3NjYXBlOmN1cnJlbnQtbGF5ZXI9ImxheWVyMSINCiAgICAgc2hvd2dyaWQ9ImZhbHNlIg0KICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE2NjQiDQogICAgIGlua3NjYXBlOndpbmRvdy1oZWlnaHQ9Ijg0NCINCiAgICAgaW5rc2NhcGU6d2luZG93LXg9Ii0zIg0KICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTE4IiAvPg0KICA8bWV0YWRhdGENCiAgICAgaWQ9Im1ldGFkYXRhMzMyNCI+DQogICAgPHJkZjpSREY+DQogICAgICA8Y2M6V29yaw0KICAgICAgICAgcmRmOmFib3V0PSIiPg0KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4NCiAgICAgICAgPGRjOnR5cGUNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz4NCiAgICAgICAgPGRjOnRpdGxlPkZvdG9ncmFmaWVydmVyYm90PC9kYzp0aXRsZT4NCiAgICAgICAgPGRjOmRhdGU+MjAwOC0wNi0yOTwvZGM6ZGF0ZT4NCiAgICAgICAgPGRjOmNyZWF0b3I+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnJzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOmNyZWF0b3I+DQogICAgICAgIDxkYzpyaWdodHM+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnN0ZW4gU2tvbXA8L2RjOnRpdGxlPg0KICAgICAgICAgIDwvY2M6QWdlbnQ+DQogICAgICAgIDwvZGM6cmlnaHRzPg0KICAgICAgICA8ZGM6cHVibGlzaGVyPg0KICAgICAgICAgIDxjYzpBZ2VudD4NCiAgICAgICAgICAgIDxkYzp0aXRsZT5Ub3JzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOnB1Ymxpc2hlcj4NCiAgICAgICAgPGRjOmxhbmd1YWdlPmRlX0RFPC9kYzpsYW5ndWFnZT4NCiAgICAgICAgPGRjOnN1YmplY3Q+DQogICAgICAgICAgPHJkZjpCYWc+DQogICAgICAgICAgICA8cmRmOmxpPlBpa3RvZ3JhbW07IEZvdG9ncmFmaWVydmVyYm90PC9yZGY6bGk+DQogICAgICAgICAgPC9yZGY6QmFnPg0KICAgICAgICA8L2RjOnN1YmplY3Q+DQogICAgICAgIDxkYzpkZXNjcmlwdGlvbj5Gb3RvZ3JhZmllcnZlcmJvdCBhbHMgUGlrdG9ncmFtbSA8L2RjOmRlc2NyaXB0aW9uPg0KICAgICAgICA8Y2M6bGljZW5zZQ0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL3B1YmxpY2RvbWFpbi8iIC8+DQogICAgICA8L2NjOldvcms+DQogICAgICA8Y2M6TGljZW5zZQ0KICAgICAgICAgcmRmOmFib3V0PSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9wdWJsaWNkb21haW4vIj4NCiAgICAgICAgPGNjOnBlcm1pdHMNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyNSZXByb2R1Y3Rpb24iIC8+DQogICAgICAgIDxjYzpwZXJtaXRzDQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjRGlzdHJpYnV0aW9uIiAvPg0KICAgICAgICA8Y2M6cGVybWl0cw0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zI0Rlcml2YXRpdmVXb3JrcyIgLz4NCiAgICAgIDwvY2M6TGljZW5zZT4NCiAgICA8L3JkZjpSREY+DQogIDwvbWV0YWRhdGE+DQogIDxnDQogICAgIGlua3NjYXBlOmxhYmVsPSJFYmVuZSAxIg0KICAgICBpbmtzY2FwZTpncm91cG1vZGU9ImxheWVyIg0KICAgICBpZD0ibGF5ZXIxIj4NCiAgICA8cGF0aA0KICAgICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjEiDQogICAgICAgZD0iTSAxNjQuNTMxMjUgNjIuNjg3NSBDIDE2Mi43OTExNSA2Mi42ODc1MDEgMTYxLjM3NSA2NC4wNzI0MTYgMTYxLjM3NSA2NS44MTI1IEwgMTYxLjM3NSA2OC43NSBMIDM4LjM3NSA2OC43NSBDIDM1LjA5MjI5OCA2OC43NDk5OTkgMzIuNDY4NzUgNzEuMzczNTQ4IDMyLjQ2ODc1IDc0LjY1NjI1IEwgMzIuNDY4NzUgMTgxLjM3NSBDIDMyLjQ2ODc1IDE4NC42NTc3IDM1LjA5MjMwNyAxODcuMzEyNTEgMzguMzc1IDE4Ny4zMTI1IEwgMjExLjYyNSAxODcuMzEyNSBDIDIxNC45MDc2OSAxODcuMzEyNSAyMTcuNTMxMjcgMTg0LjY1NzcgMjE3LjUzMTI1IDE4MS4zNzUgTCAyMTcuNTMxMjUgNzQuNjU2MjUgQyAyMTcuNTMxMjUgNzEuMzczNTUxIDIxNC45MDc2OCA2OC43NSAyMTEuNjI1IDY4Ljc1IEwgMjAyLjA2MjUgNjguNzUgTCAyMDIuMDYyNSA2NS44MTI1IEMgMjAyLjA2MjUgNjQuMDcyNDEgMjAwLjY0NjM1IDYyLjY4NzUgMTk4LjkwNjI1IDYyLjY4NzUgTCAxNjQuNTMxMjUgNjIuNjg3NSB6IE0gNDYuODEyNSA3OCBMIDg4LjY1NjI1IDc4IEMgOTAuMzk2MzQyIDc4IDkxLjgxMjUgNzkuMzg0OTA3IDkxLjgxMjUgODEuMTI1IEwgOTEuODEyNSA5Ni4zMTI1IEMgOTEuODEyNSA5OC4wNTI1OTIgOTAuMzk2MzQzIDk5LjQzNzUgODguNjU2MjUgOTkuNDM3NSBMIDQ2LjgxMjUgOTkuNDM3NSBDIDQ1LjA3MjQwOCA5OS40Mzc1IDQzLjY4NzUgOTguMDUyNTkzIDQzLjY4NzUgOTYuMzEyNSBMIDQzLjY4NzUgODEuMTI1IEMgNDMuNjg3NSA3OS4zODQ5MDggNDUuMDcyNDA3IDc4IDQ2LjgxMjUgNzggeiBNIDE0NiA4OC4yMTg3NSBDIDE2Ny43MzQ3NSA4OC4yMTg3NTMgMTg1LjM3NSAxMDYuMTUwNzEgMTg1LjM3NSAxMjguMjUgQyAxODUuMzc0OTkgMTUwLjM0OTI4IDE2Ny43MzQ3NCAxNjguMjgxMjUgMTQ2IDE2OC4yODEyNSBDIDEyNC4yNjUyNyAxNjguMjgxMjYgMTA2LjYyNSAxNTAuMzQ5MjkgMTA2LjYyNSAxMjguMjUgQyAxMDYuNjI1IDEwNi4xNTA3MSAxMjQuMjY1MjYgODguMjE4NzUgMTQ2IDg4LjIxODc1IHogTSAxNDYgOTEuNzE4NzUgQyAxMjYuMTY1NTcgOTEuNzE4NzUgMTEwLjA2MjUgMTA4LjA4Mjg5IDExMC4wNjI1IDEyOC4yNSBDIDExMC4wNjI1IDE0OC40MTcxMSAxMjYuMTY1NTcgMTY0Ljc4MTI2IDE0NiAxNjQuNzgxMjUgQyAxNjUuODM0NDMgMTY0Ljc4MTI1IDE4MS45Mzc1IDE0OC40MTcxIDE4MS45Mzc1IDEyOC4yNSBDIDE4MS45Mzc1IDEwOC4wODI4OSAxNjUuODM0NDMgOTEuNzE4NzUgMTQ2IDkxLjcxODc1IHogTSAxNDYgOTYuNTkzNzUgQyAxNjMuMTc3NjggOTYuNTkzNzUyIDE3Ny4xMjUgMTEwLjc4NDIgMTc3LjEyNSAxMjguMjUgQyAxNzcuMTI0OTkgMTQ1LjcxNTggMTYzLjE3NzY5IDE1OS44NzUgMTQ2IDE1OS44NzUgQyAxMjguODIyMzEgMTU5Ljg3NSAxMTQuODc1IDE0NS43MTU4IDExNC44NzUgMTI4LjI1IEMgMTE0Ljg3NSAxMTAuNzg0MTkgMTI4LjgyMjMxIDk2LjU5Mzc1IDE0NiA5Ni41OTM3NSB6IE0gMTc2LjUgMTcyLjcxODc1IEwgMjA2LjE4NzUgMTcyLjcxODc1IEMgMjA3LjQyMTM4IDE3Mi43MTg3NSAyMDguNDA2MjUgMTczLjEyNzgzIDIwOC40MDYyNSAxNzMuNjI1IEwgMjA4LjQwNjI1IDE3Ny45Njg3NSBDIDIwOC40MDYyNSAxNzguNDY1OTIgMjA3LjQyMTM4IDE3OC44NDM3NSAyMDYuMTg3NSAxNzguODQzNzUgTCAxNzYuNSAxNzguODQzNzUgQyAxNzUuMjY2MTEgMTc4Ljg0Mzc1IDE3NC4yODEyNSAxNzguNDY1OTIgMTc0LjI4MTI1IDE3Ny45Njg3NSBMIDE3NC4yODEyNSAxNzMuNjI1IEMgMTc0LjI4MTI1IDE3My4xMjc4MyAxNzUuMjY2MTIgMTcyLjcxODc1IDE3Ni41IDE3Mi43MTg3NSB6ICINCiAgICAgICBpZD0icmVjdDMyMDkiIC8+DQogICAgPHBhdGgNCiAgICAgICBzdHlsZT0iZmlsbDojYzQyNjFkO2ZpbGwtb3BhY2l0eToxIg0KICAgICAgIGQ9Ik0gMjAgMCBDIDE4LjU1OTkzOCAwIDE3LjE2NDc0NyAwLjE1MDk4NjY2IDE1LjgxMjUgMC40Mzc1IEMgMTUuMjEwMjkxIDAuNTY1MTk1NzggMTQuNjExOTEzIDAuNzI2MjExMjYgMTQuMDMxMjUgMC45MDYyNSBDIDEzLjU1NDc3MyAxLjA1Mzk4NTIgMTMuMDg1MzQ5IDEuMjI0ODUzNiAxMi42MjUgMS40MDYyNSBDIDEyLjMyODc2NiAxLjUyMzA3MzkgMTIuMDM5MDMzIDEuNjUwOTE4MiAxMS43NSAxLjc4MTI1IEMgMTEuMzQ3Mjc4IDEuOTYyMzU5OCAxMC45NTA0MDYgMi4xMzc0MTY1IDEwLjU2MjUgMi4zNDM3NSBDIDEwLjUyMTU1NSAyLjM2NTU2ODggMTAuNDc4MjczIDIuMzg0MTU1NSAxMC40Mzc1IDIuNDA2MjUgQyAxMC40MTY5MzQgMi40MTczNzU0IDEwLjM5NTUyMiAyLjQyNjMwNDkgMTAuMzc1IDIuNDM3NSBDIDkuODMyNjg2MSAyLjczMzM0NDYgOS4zMjI2NDQ4IDMuMDYzMjQ1MiA4LjgxMjUgMy40MDYyNSBDIDguMjgzMTIyMSAzLjc2MjE4NjUgNy43NzI3NzI4IDQuMTU4OTIwOSA3LjI4MTI1IDQuNTYyNSBDIDcuMjc1MDU1IDQuNTY3NTg2NiA3LjI1NjE4ODggNC41NTc0MDYxIDcuMjUgNC41NjI1IEMgNy4yMzg1NDc5IDQuNTcxOTQzNCA3LjIzMDE4MDYgNC41ODQyODE2IDcuMjE4NzUgNC41OTM3NSBDIDcuMTA0NzM1MiA0LjY4ODAxNTkgNi45ODY4NTA3IDQuNzc4MjY4NyA2Ljg3NSA0Ljg3NSBDIDYuNTE1NzAyMSA1LjE4NjQyNjQgNi4xNzk3OTA5IDUuNTA3NzA5MSA1Ljg0Mzc1IDUuODQzNzUgQyA1LjQwNDQwMjUgNi4yODE4MDc4IDQuOTkwNzQ0OSA2Ljc0MTM1NTQgNC41OTM3NSA3LjIxODc1IEMgNC41NzkwMDg2IDcuMjM2NTQ2MiA0LjU3NzE4MDYgNy4yNjM0MDE1IDQuNTYyNSA3LjI4MTI1IEMgMy43Njc0ODk4IDguMjQzOTE4MSAzLjA0MjI3MjEgOS4yNzE4NzA1IDIuNDM3NSAxMC4zNzUgQyAyLjQyNjIyMzIgMTAuMzk1NjM1IDIuNDE3NDU2MSAxMC40MTY4MiAyLjQwNjI1IDEwLjQzNzUgQyAyLjEwODM5MDggMTAuOTg1MzQ4IDEuODQwMjIzMyAxMS41NDcyMTQgMS41OTM3NSAxMi4xMjUgQyAxLjU3NTU4NjUgMTIuMTY3NjY1IDEuNTQ5MTI1NSAxMi4yMDcxODIgMS41MzEyNSAxMi4yNSBDIDEuMjg3NzEzMSAxMi44MzI0MzMgMS4wOTQ2NzU0IDEzLjQyMTgyMiAwLjkwNjI1IDE0LjAzMTI1IEMgMC43Mjk2MzAxNCAxNC42MDI0OTUgMC41NjMwOTYzNCAxNS4xODg4MjggMC40Mzc1IDE1Ljc4MTI1IEMgMC4xNDY5MTQwNCAxNy4xNDI1NzggLTQuMzkwNjEzM2UtMTggMTguNTQ5NDY2IDAgMjAgTCAwIDIzMCBDIDAgMjQxLjA4IDguOTIgMjUwIDIwIDI1MCBMIDIzMCAyNTAgQyAyMzEuNDQwMDYgMjUwIDIzMi44MzUyNSAyNDkuODQ5MDEgMjM0LjE4NzUgMjQ5LjU2MjUgQyAyMzQuNzg5MDMgMjQ5LjQzNDk3IDIzNS4zODg2NiAyNDkuMjczODEgMjM1Ljk2ODc1IDI0OS4wOTM3NSBDIDIzNi40NDQ3NiAyNDguOTQ2IDIzNi45MTUwNSAyNDguNzc1MjYgMjM3LjM3NSAyNDguNTkzNzUgQyAyMzcuNjcxMjMgMjQ4LjQ3NjkzIDIzNy45NjA5NyAyNDguMzQ5MDggMjM4LjI1IDI0OC4yMTg3NSBDIDIzOC4yNzk4MSAyNDguMjA1MzEgMjM4LjMxNDAyIDI0OC4yMDEwOSAyMzguMzQzNzUgMjQ4LjE4NzUgQyAyMzguNzU4MzYgMjQ3Ljk5ODMgMjM5LjE2Mzc0IDI0Ny44MDk4MSAyMzkuNTYyNSAyNDcuNTkzNzUgQyAyMzkuNTgzMTggMjQ3LjU4MjU0IDIzOS42MDQzNiAyNDcuNTczNzggMjM5LjYyNSAyNDcuNTYyNSBDIDI0MC4xNjkyNSAyNDcuMjY1MTIgMjQwLjY3NTU4IDI0Ni45Mzg3MyAyNDEuMTg3NSAyNDYuNTkzNzUgQyAyNDEuNjY4NzggMjQ2LjI2OTQxIDI0Mi4xNDM1OSAyNDUuOTI2MzkgMjQyLjU5Mzc1IDI0NS41NjI1IEMgMjQyLjY0NDc0IDI0NS41MjEyOCAyNDIuNjk5NDMgMjQ1LjQ3OTIxIDI0Mi43NSAyNDUuNDM3NSBDIDI0Mi44NzY1MSAyNDUuMzMzMTggMjQzLjAwMTE1IDI0NS4yMzIzNSAyNDMuMTI1IDI0NS4xMjUgQyAyNDMuNDgyNjUgMjQ0LjgxNTM4IDI0My44MjE1NSAyNDQuNDkwMTkgMjQ0LjE1NjI1IDI0NC4xNTYyNSBDIDI0NC40OTIyOSAyNDMuODIwMjEgMjQ0LjgxMzU3IDI0My40ODQzIDI0NS4xMjUgMjQzLjEyNSBDIDI0NS4yMzE2NyAyNDMuMDAyMzQgMjQ1LjMzMzgxIDI0Mi44NzUyNyAyNDUuNDM3NSAyNDIuNzUgQyAyNDUuNDQyNzYgMjQyLjc0MzYyIDI0NS40MzIyNSAyNDIuNzI1MTMgMjQ1LjQzNzUgMjQyLjcxODc1IEMgMjQ1Ljg0MjQ5IDI0Mi4yMjgzIDI0Ni4yMzY0IDI0MS43MTU3NiAyNDYuNTkzNzUgMjQxLjE4NzUgQyAyNDYuOTM4MTIgMjQwLjY3ODQzIDI0Ny4yNjUzNiAyNDAuMTY2MjIgMjQ3LjU2MjUgMjM5LjYyNSBDIDI0Ny41NzM2MyAyMzkuNjA0NzIgMjQ3LjU4MjY4IDIzOS41ODI4MiAyNDcuNTkzNzUgMjM5LjU2MjUgQyAyNDcuODkxOTcgMjM5LjAxNDggMjQ4LjE1OTMxIDIzOC40NTIzOSAyNDguNDA2MjUgMjM3Ljg3NSBDIDI0OC40MTU1NCAyMzcuODUzMjggMjQ4LjQyODI5IDIzNy44MzQyNiAyNDguNDM3NSAyMzcuODEyNSBDIDI0OC40NDY0NCAyMzcuNzkxMjkgMjQ4LjQ1OTg4IDIzNy43NzEyNSAyNDguNDY4NzUgMjM3Ljc1IEMgMjQ4LjcwOTkyIDIzNy4xNzQ3NiAyNDguOTA2MjggMjM2LjU3MDA4IDI0OS4wOTM3NSAyMzUuOTY4NzUgQyAyNDkuMjczNzUgMjM1LjM5MTM3IDI0OS40MzQ2OCAyMzQuODE3NTQgMjQ5LjU2MjUgMjM0LjIxODc1IEMgMjQ5Ljg1MzA5IDIzMi44NTc0MiAyNTAgMjMxLjQ1MDUzIDI1MCAyMzAgTCAyNTAgMjAgQyAyNTAgOC45MiAyNDEuMDggLTMuMzUzNzk4N2UtMTcgMjMwIDAgTCAyMCAwIHogTSAzNC43ODEyNSAxOS40MDYyNSBMIDIyNS40Njg3NSAxOS40MDYyNSBDIDIyOC4zMDk0NiAxOS40MDYyNSAyMzAuNTkzNzUgMjEuNjkwNTQ0IDIzMC41OTM3NSAyNC41MzEyNSBMIDIzMC41OTM3NSAyMTUuMjUgTCAzNC43ODEyNSAxOS40MDYyNSB6IE0gMTkuNDA2MjUgMzQuNzUgTCAyMTUuMjE4NzUgMjMwLjU5Mzc1IEwgMjQuNTMxMjUgMjMwLjU5Mzc1IEMgMjEuNjkwNTQ0IDIzMC41OTM3NiAxOS40MDYyNSAyMjguMzA5NDYgMTkuNDA2MjUgMjI1LjQ2ODc1IEwgMTkuNDA2MjUgMzQuNzUgeiAiDQogICAgICAgaWQ9InBhdGgzMTk2IiAvPg0KICA8L2c+DQo8L3N2Zz4NCg==",-c.UNICODE_LINE_SEP=String.fromCharCode(8232));return c.UNICODE_LINE_SEP};c.prototype.setThemeAndVariant=function(a,b){this.theme=a;this.themeVariant=b};c.prototype.getTheme=function(){null!=this.theme&&this.theme.setVariant(this.themeVariant);return this.theme};c.prototype.getQuickStyleVals=function(){return this.quickStyleVals};c.prototype.processGeomList=function(a){if(!this.geomListProcessed){this.geomList=new g.mxgraph.io.vsdx.mxVsdxGeometryList(a);if(null!=this.geom)for(a=0;a<this.geom.length;a++)this.geomList.addGeometry(this.geom[a]);-this.geomListProcessed=!0}};c.prototype.parseShapeElem=function(a,b){h.prototype.parseShapeElem.call(this,a,b);var d=a.nodeName;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(d,"ForeignData")){d=function(A,C){for(A=A.firstChild;null!=A;){if(1==A.nodeType){var I=A;if("rel"==I.nodeName.toLowerCase()&&(I=I.getAttribute("r:id"),null!=I&&0!==I.length)){A=C.lastIndexOf("/");var Q="",K="";try{Q=C.substring(0,A),K=C.substring(A,C.length)}catch(L){break}A=b.getRelationship(I,Q+"/_rels"+K+".rels");+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k,n,q,t){return b.call(this,c,d,f,k,n,q,t)||this}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var f=d.getHeight()/g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=d.getWidth()/g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();this.x*=k;this.y*=f;this.a*=k;this.b*=f}return b.prototype.handle.call(this,+c,d)};return a}(g.mxgraph.io.vsdx.geometry.EllipticalArcTo);m.RelEllipticalArcTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelEllipticalArcTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){var m=function(h){function b(a,c){var d=this;d.text=null;d.fields=null;d.geom=null;d.imageData=null;d.theme=null;d.quickStyleVals=null;d=h.call(this,a,c)||this;d.paragraphs=null;d.styleMap={};d.width=0;d.height=0;d.rotation=0;d.lastX=0;d.lastY=0;d.lastMoveX=0;d.lastMoveY=0;d.lastKnot=-1;d.geomList=null;d.geomListProcessed=!1;d.themeVariant=0;d.cp="0";d.pp="0";d.tp="0";d.fld="0";d.width=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(f,+k){return f[k]?f[k]:null}(d.cellElements,g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0);d.height=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(f,k){return f[k]?f[k]:null}(d.cellElements,g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return d}__extends(b,h);b.UNICODE_LINE_SEP_$LI$=function(){null==b.UNICODE_LINE_SEP&&(b.ERROR_IMAGE="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8IS0tIENyZWF0ZWQgd2l0aCBJbmtzY2FwZSAoaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvKSAtLT4NCjxzdmcNCiAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyINCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiDQogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiDQogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIg0KICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiDQogICB3aWR0aD0iMjUwIg0KICAgaGVpZ2h0PSIyNTAiDQogICBpZD0ic3ZnMzMxOSINCiAgIHNvZGlwb2RpOnZlcnNpb249IjAuMzIiDQogICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjQ2Ig0KICAgdmVyc2lvbj0iMS4wIg0KICAgc29kaXBvZGk6ZG9jbmFtZT0ibm9waG90b19pLnN2ZyINCiAgIGlua3NjYXBlOm91dHB1dF9leHRlbnNpb249Im9yZy5pbmtzY2FwZS5vdXRwdXQuc3ZnLmlua3NjYXBlIj4NCiAgPGRlZnMNCiAgICAgaWQ9ImRlZnMzMzIxIj4NCiAgICA8aW5rc2NhcGU6cGVyc3BlY3RpdmUNCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIg0KICAgICAgIGlua3NjYXBlOnZwX3g9IjAgOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnBlcnNwM2Qtb3JpZ2luPSIzNzIuMDQ3MjQgOiAzNTAuNzg3MzkgOiAxIg0KICAgICAgIGlkPSJwZXJzcGVjdGl2ZTMzMjciIC8+DQogICAgPGlua3NjYXBlOnBlcnNwZWN0aXZlDQogICAgICAgaWQ9InBlcnNwZWN0aXZlMzM0MiINCiAgICAgICBpbmtzY2FwZTpwZXJzcDNkLW9yaWdpbj0iMzcyLjA0NzI0IDogMzUwLjc4NzM5IDogMSINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF94PSIwIDogNTI2LjE4MTA5IDogMSINCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIiAvPg0KICA8L2RlZnM+DQogIDxzb2RpcG9kaTpuYW1lZHZpZXcNCiAgICAgaWQ9ImJhc2UiDQogICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiINCiAgICAgYm9yZGVyY29sb3I9IiM2NjY2NjYiDQogICAgIGJvcmRlcm9wYWNpdHk9IjEuMCINCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAuMCINCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiINCiAgICAgaW5rc2NhcGU6em9vbT0iMi4yNDI5NDI3Ig0KICAgICBpbmtzY2FwZTpjeD0iMTIxLjk3NjQ4Ig0KICAgICBpbmtzY2FwZTpjeT0iMTIyLjQ0MTk4Ig0KICAgICBpbmtzY2FwZTpkb2N1bWVudC11bml0cz0icHgiDQogICAgIGlua3NjYXBlOmN1cnJlbnQtbGF5ZXI9ImxheWVyMSINCiAgICAgc2hvd2dyaWQ9ImZhbHNlIg0KICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE2NjQiDQogICAgIGlua3NjYXBlOndpbmRvdy1oZWlnaHQ9Ijg0NCINCiAgICAgaW5rc2NhcGU6d2luZG93LXg9Ii0zIg0KICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTE4IiAvPg0KICA8bWV0YWRhdGENCiAgICAgaWQ9Im1ldGFkYXRhMzMyNCI+DQogICAgPHJkZjpSREY+DQogICAgICA8Y2M6V29yaw0KICAgICAgICAgcmRmOmFib3V0PSIiPg0KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4NCiAgICAgICAgPGRjOnR5cGUNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz4NCiAgICAgICAgPGRjOnRpdGxlPkZvdG9ncmFmaWVydmVyYm90PC9kYzp0aXRsZT4NCiAgICAgICAgPGRjOmRhdGU+MjAwOC0wNi0yOTwvZGM6ZGF0ZT4NCiAgICAgICAgPGRjOmNyZWF0b3I+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnJzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOmNyZWF0b3I+DQogICAgICAgIDxkYzpyaWdodHM+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnN0ZW4gU2tvbXA8L2RjOnRpdGxlPg0KICAgICAgICAgIDwvY2M6QWdlbnQ+DQogICAgICAgIDwvZGM6cmlnaHRzPg0KICAgICAgICA8ZGM6cHVibGlzaGVyPg0KICAgICAgICAgIDxjYzpBZ2VudD4NCiAgICAgICAgICAgIDxkYzp0aXRsZT5Ub3JzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOnB1Ymxpc2hlcj4NCiAgICAgICAgPGRjOmxhbmd1YWdlPmRlX0RFPC9kYzpsYW5ndWFnZT4NCiAgICAgICAgPGRjOnN1YmplY3Q+DQogICAgICAgICAgPHJkZjpCYWc+DQogICAgICAgICAgICA8cmRmOmxpPlBpa3RvZ3JhbW07IEZvdG9ncmFmaWVydmVyYm90PC9yZGY6bGk+DQogICAgICAgICAgPC9yZGY6QmFnPg0KICAgICAgICA8L2RjOnN1YmplY3Q+DQogICAgICAgIDxkYzpkZXNjcmlwdGlvbj5Gb3RvZ3JhZmllcnZlcmJvdCBhbHMgUGlrdG9ncmFtbSA8L2RjOmRlc2NyaXB0aW9uPg0KICAgICAgICA8Y2M6bGljZW5zZQ0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL3B1YmxpY2RvbWFpbi8iIC8+DQogICAgICA8L2NjOldvcms+DQogICAgICA8Y2M6TGljZW5zZQ0KICAgICAgICAgcmRmOmFib3V0PSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9wdWJsaWNkb21haW4vIj4NCiAgICAgICAgPGNjOnBlcm1pdHMNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyNSZXByb2R1Y3Rpb24iIC8+DQogICAgICAgIDxjYzpwZXJtaXRzDQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjRGlzdHJpYnV0aW9uIiAvPg0KICAgICAgICA8Y2M6cGVybWl0cw0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zI0Rlcml2YXRpdmVXb3JrcyIgLz4NCiAgICAgIDwvY2M6TGljZW5zZT4NCiAgICA8L3JkZjpSREY+DQogIDwvbWV0YWRhdGE+DQogIDxnDQogICAgIGlua3NjYXBlOmxhYmVsPSJFYmVuZSAxIg0KICAgICBpbmtzY2FwZTpncm91cG1vZGU9ImxheWVyIg0KICAgICBpZD0ibGF5ZXIxIj4NCiAgICA8cGF0aA0KICAgICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjEiDQogICAgICAgZD0iTSAxNjQuNTMxMjUgNjIuNjg3NSBDIDE2Mi43OTExNSA2Mi42ODc1MDEgMTYxLjM3NSA2NC4wNzI0MTYgMTYxLjM3NSA2NS44MTI1IEwgMTYxLjM3NSA2OC43NSBMIDM4LjM3NSA2OC43NSBDIDM1LjA5MjI5OCA2OC43NDk5OTkgMzIuNDY4NzUgNzEuMzczNTQ4IDMyLjQ2ODc1IDc0LjY1NjI1IEwgMzIuNDY4NzUgMTgxLjM3NSBDIDMyLjQ2ODc1IDE4NC42NTc3IDM1LjA5MjMwNyAxODcuMzEyNTEgMzguMzc1IDE4Ny4zMTI1IEwgMjExLjYyNSAxODcuMzEyNSBDIDIxNC45MDc2OSAxODcuMzEyNSAyMTcuNTMxMjcgMTg0LjY1NzcgMjE3LjUzMTI1IDE4MS4zNzUgTCAyMTcuNTMxMjUgNzQuNjU2MjUgQyAyMTcuNTMxMjUgNzEuMzczNTUxIDIxNC45MDc2OCA2OC43NSAyMTEuNjI1IDY4Ljc1IEwgMjAyLjA2MjUgNjguNzUgTCAyMDIuMDYyNSA2NS44MTI1IEMgMjAyLjA2MjUgNjQuMDcyNDEgMjAwLjY0NjM1IDYyLjY4NzUgMTk4LjkwNjI1IDYyLjY4NzUgTCAxNjQuNTMxMjUgNjIuNjg3NSB6IE0gNDYuODEyNSA3OCBMIDg4LjY1NjI1IDc4IEMgOTAuMzk2MzQyIDc4IDkxLjgxMjUgNzkuMzg0OTA3IDkxLjgxMjUgODEuMTI1IEwgOTEuODEyNSA5Ni4zMTI1IEMgOTEuODEyNSA5OC4wNTI1OTIgOTAuMzk2MzQzIDk5LjQzNzUgODguNjU2MjUgOTkuNDM3NSBMIDQ2LjgxMjUgOTkuNDM3NSBDIDQ1LjA3MjQwOCA5OS40Mzc1IDQzLjY4NzUgOTguMDUyNTkzIDQzLjY4NzUgOTYuMzEyNSBMIDQzLjY4NzUgODEuMTI1IEMgNDMuNjg3NSA3OS4zODQ5MDggNDUuMDcyNDA3IDc4IDQ2LjgxMjUgNzggeiBNIDE0NiA4OC4yMTg3NSBDIDE2Ny43MzQ3NSA4OC4yMTg3NTMgMTg1LjM3NSAxMDYuMTUwNzEgMTg1LjM3NSAxMjguMjUgQyAxODUuMzc0OTkgMTUwLjM0OTI4IDE2Ny43MzQ3NCAxNjguMjgxMjUgMTQ2IDE2OC4yODEyNSBDIDEyNC4yNjUyNyAxNjguMjgxMjYgMTA2LjYyNSAxNTAuMzQ5MjkgMTA2LjYyNSAxMjguMjUgQyAxMDYuNjI1IDEwNi4xNTA3MSAxMjQuMjY1MjYgODguMjE4NzUgMTQ2IDg4LjIxODc1IHogTSAxNDYgOTEuNzE4NzUgQyAxMjYuMTY1NTcgOTEuNzE4NzUgMTEwLjA2MjUgMTA4LjA4Mjg5IDExMC4wNjI1IDEyOC4yNSBDIDExMC4wNjI1IDE0OC40MTcxMSAxMjYuMTY1NTcgMTY0Ljc4MTI2IDE0NiAxNjQuNzgxMjUgQyAxNjUuODM0NDMgMTY0Ljc4MTI1IDE4MS45Mzc1IDE0OC40MTcxIDE4MS45Mzc1IDEyOC4yNSBDIDE4MS45Mzc1IDEwOC4wODI4OSAxNjUuODM0NDMgOTEuNzE4NzUgMTQ2IDkxLjcxODc1IHogTSAxNDYgOTYuNTkzNzUgQyAxNjMuMTc3NjggOTYuNTkzNzUyIDE3Ny4xMjUgMTEwLjc4NDIgMTc3LjEyNSAxMjguMjUgQyAxNzcuMTI0OTkgMTQ1LjcxNTggMTYzLjE3NzY5IDE1OS44NzUgMTQ2IDE1OS44NzUgQyAxMjguODIyMzEgMTU5Ljg3NSAxMTQuODc1IDE0NS43MTU4IDExNC44NzUgMTI4LjI1IEMgMTE0Ljg3NSAxMTAuNzg0MTkgMTI4LjgyMjMxIDk2LjU5Mzc1IDE0NiA5Ni41OTM3NSB6IE0gMTc2LjUgMTcyLjcxODc1IEwgMjA2LjE4NzUgMTcyLjcxODc1IEMgMjA3LjQyMTM4IDE3Mi43MTg3NSAyMDguNDA2MjUgMTczLjEyNzgzIDIwOC40MDYyNSAxNzMuNjI1IEwgMjA4LjQwNjI1IDE3Ny45Njg3NSBDIDIwOC40MDYyNSAxNzguNDY1OTIgMjA3LjQyMTM4IDE3OC44NDM3NSAyMDYuMTg3NSAxNzguODQzNzUgTCAxNzYuNSAxNzguODQzNzUgQyAxNzUuMjY2MTEgMTc4Ljg0Mzc1IDE3NC4yODEyNSAxNzguNDY1OTIgMTc0LjI4MTI1IDE3Ny45Njg3NSBMIDE3NC4yODEyNSAxNzMuNjI1IEMgMTc0LjI4MTI1IDE3My4xMjc4MyAxNzUuMjY2MTIgMTcyLjcxODc1IDE3Ni41IDE3Mi43MTg3NSB6ICINCiAgICAgICBpZD0icmVjdDMyMDkiIC8+DQogICAgPHBhdGgNCiAgICAgICBzdHlsZT0iZmlsbDojYzQyNjFkO2ZpbGwtb3BhY2l0eToxIg0KICAgICAgIGQ9Ik0gMjAgMCBDIDE4LjU1OTkzOCAwIDE3LjE2NDc0NyAwLjE1MDk4NjY2IDE1LjgxMjUgMC40Mzc1IEMgMTUuMjEwMjkxIDAuNTY1MTk1NzggMTQuNjExOTEzIDAuNzI2MjExMjYgMTQuMDMxMjUgMC45MDYyNSBDIDEzLjU1NDc3MyAxLjA1Mzk4NTIgMTMuMDg1MzQ5IDEuMjI0ODUzNiAxMi42MjUgMS40MDYyNSBDIDEyLjMyODc2NiAxLjUyMzA3MzkgMTIuMDM5MDMzIDEuNjUwOTE4MiAxMS43NSAxLjc4MTI1IEMgMTEuMzQ3Mjc4IDEuOTYyMzU5OCAxMC45NTA0MDYgMi4xMzc0MTY1IDEwLjU2MjUgMi4zNDM3NSBDIDEwLjUyMTU1NSAyLjM2NTU2ODggMTAuNDc4MjczIDIuMzg0MTU1NSAxMC40Mzc1IDIuNDA2MjUgQyAxMC40MTY5MzQgMi40MTczNzU0IDEwLjM5NTUyMiAyLjQyNjMwNDkgMTAuMzc1IDIuNDM3NSBDIDkuODMyNjg2MSAyLjczMzM0NDYgOS4zMjI2NDQ4IDMuMDYzMjQ1MiA4LjgxMjUgMy40MDYyNSBDIDguMjgzMTIyMSAzLjc2MjE4NjUgNy43NzI3NzI4IDQuMTU4OTIwOSA3LjI4MTI1IDQuNTYyNSBDIDcuMjc1MDU1IDQuNTY3NTg2NiA3LjI1NjE4ODggNC41NTc0MDYxIDcuMjUgNC41NjI1IEMgNy4yMzg1NDc5IDQuNTcxOTQzNCA3LjIzMDE4MDYgNC41ODQyODE2IDcuMjE4NzUgNC41OTM3NSBDIDcuMTA0NzM1MiA0LjY4ODAxNTkgNi45ODY4NTA3IDQuNzc4MjY4NyA2Ljg3NSA0Ljg3NSBDIDYuNTE1NzAyMSA1LjE4NjQyNjQgNi4xNzk3OTA5IDUuNTA3NzA5MSA1Ljg0Mzc1IDUuODQzNzUgQyA1LjQwNDQwMjUgNi4yODE4MDc4IDQuOTkwNzQ0OSA2Ljc0MTM1NTQgNC41OTM3NSA3LjIxODc1IEMgNC41NzkwMDg2IDcuMjM2NTQ2MiA0LjU3NzE4MDYgNy4yNjM0MDE1IDQuNTYyNSA3LjI4MTI1IEMgMy43Njc0ODk4IDguMjQzOTE4MSAzLjA0MjI3MjEgOS4yNzE4NzA1IDIuNDM3NSAxMC4zNzUgQyAyLjQyNjIyMzIgMTAuMzk1NjM1IDIuNDE3NDU2MSAxMC40MTY4MiAyLjQwNjI1IDEwLjQzNzUgQyAyLjEwODM5MDggMTAuOTg1MzQ4IDEuODQwMjIzMyAxMS41NDcyMTQgMS41OTM3NSAxMi4xMjUgQyAxLjU3NTU4NjUgMTIuMTY3NjY1IDEuNTQ5MTI1NSAxMi4yMDcxODIgMS41MzEyNSAxMi4yNSBDIDEuMjg3NzEzMSAxMi44MzI0MzMgMS4wOTQ2NzU0IDEzLjQyMTgyMiAwLjkwNjI1IDE0LjAzMTI1IEMgMC43Mjk2MzAxNCAxNC42MDI0OTUgMC41NjMwOTYzNCAxNS4xODg4MjggMC40Mzc1IDE1Ljc4MTI1IEMgMC4xNDY5MTQwNCAxNy4xNDI1NzggLTQuMzkwNjEzM2UtMTggMTguNTQ5NDY2IDAgMjAgTCAwIDIzMCBDIDAgMjQxLjA4IDguOTIgMjUwIDIwIDI1MCBMIDIzMCAyNTAgQyAyMzEuNDQwMDYgMjUwIDIzMi44MzUyNSAyNDkuODQ5MDEgMjM0LjE4NzUgMjQ5LjU2MjUgQyAyMzQuNzg5MDMgMjQ5LjQzNDk3IDIzNS4zODg2NiAyNDkuMjczODEgMjM1Ljk2ODc1IDI0OS4wOTM3NSBDIDIzNi40NDQ3NiAyNDguOTQ2IDIzNi45MTUwNSAyNDguNzc1MjYgMjM3LjM3NSAyNDguNTkzNzUgQyAyMzcuNjcxMjMgMjQ4LjQ3NjkzIDIzNy45NjA5NyAyNDguMzQ5MDggMjM4LjI1IDI0OC4yMTg3NSBDIDIzOC4yNzk4MSAyNDguMjA1MzEgMjM4LjMxNDAyIDI0OC4yMDEwOSAyMzguMzQzNzUgMjQ4LjE4NzUgQyAyMzguNzU4MzYgMjQ3Ljk5ODMgMjM5LjE2Mzc0IDI0Ny44MDk4MSAyMzkuNTYyNSAyNDcuNTkzNzUgQyAyMzkuNTgzMTggMjQ3LjU4MjU0IDIzOS42MDQzNiAyNDcuNTczNzggMjM5LjYyNSAyNDcuNTYyNSBDIDI0MC4xNjkyNSAyNDcuMjY1MTIgMjQwLjY3NTU4IDI0Ni45Mzg3MyAyNDEuMTg3NSAyNDYuNTkzNzUgQyAyNDEuNjY4NzggMjQ2LjI2OTQxIDI0Mi4xNDM1OSAyNDUuOTI2MzkgMjQyLjU5Mzc1IDI0NS41NjI1IEMgMjQyLjY0NDc0IDI0NS41MjEyOCAyNDIuNjk5NDMgMjQ1LjQ3OTIxIDI0Mi43NSAyNDUuNDM3NSBDIDI0Mi44NzY1MSAyNDUuMzMzMTggMjQzLjAwMTE1IDI0NS4yMzIzNSAyNDMuMTI1IDI0NS4xMjUgQyAyNDMuNDgyNjUgMjQ0LjgxNTM4IDI0My44MjE1NSAyNDQuNDkwMTkgMjQ0LjE1NjI1IDI0NC4xNTYyNSBDIDI0NC40OTIyOSAyNDMuODIwMjEgMjQ0LjgxMzU3IDI0My40ODQzIDI0NS4xMjUgMjQzLjEyNSBDIDI0NS4yMzE2NyAyNDMuMDAyMzQgMjQ1LjMzMzgxIDI0Mi44NzUyNyAyNDUuNDM3NSAyNDIuNzUgQyAyNDUuNDQyNzYgMjQyLjc0MzYyIDI0NS40MzIyNSAyNDIuNzI1MTMgMjQ1LjQzNzUgMjQyLjcxODc1IEMgMjQ1Ljg0MjQ5IDI0Mi4yMjgzIDI0Ni4yMzY0IDI0MS43MTU3NiAyNDYuNTkzNzUgMjQxLjE4NzUgQyAyNDYuOTM4MTIgMjQwLjY3ODQzIDI0Ny4yNjUzNiAyNDAuMTY2MjIgMjQ3LjU2MjUgMjM5LjYyNSBDIDI0Ny41NzM2MyAyMzkuNjA0NzIgMjQ3LjU4MjY4IDIzOS41ODI4MiAyNDcuNTkzNzUgMjM5LjU2MjUgQyAyNDcuODkxOTcgMjM5LjAxNDggMjQ4LjE1OTMxIDIzOC40NTIzOSAyNDguNDA2MjUgMjM3Ljg3NSBDIDI0OC40MTU1NCAyMzcuODUzMjggMjQ4LjQyODI5IDIzNy44MzQyNiAyNDguNDM3NSAyMzcuODEyNSBDIDI0OC40NDY0NCAyMzcuNzkxMjkgMjQ4LjQ1OTg4IDIzNy43NzEyNSAyNDguNDY4NzUgMjM3Ljc1IEMgMjQ4LjcwOTkyIDIzNy4xNzQ3NiAyNDguOTA2MjggMjM2LjU3MDA4IDI0OS4wOTM3NSAyMzUuOTY4NzUgQyAyNDkuMjczNzUgMjM1LjM5MTM3IDI0OS40MzQ2OCAyMzQuODE3NTQgMjQ5LjU2MjUgMjM0LjIxODc1IEMgMjQ5Ljg1MzA5IDIzMi44NTc0MiAyNTAgMjMxLjQ1MDUzIDI1MCAyMzAgTCAyNTAgMjAgQyAyNTAgOC45MiAyNDEuMDggLTMuMzUzNzk4N2UtMTcgMjMwIDAgTCAyMCAwIHogTSAzNC43ODEyNSAxOS40MDYyNSBMIDIyNS40Njg3NSAxOS40MDYyNSBDIDIyOC4zMDk0NiAxOS40MDYyNSAyMzAuNTkzNzUgMjEuNjkwNTQ0IDIzMC41OTM3NSAyNC41MzEyNSBMIDIzMC41OTM3NSAyMTUuMjUgTCAzNC43ODEyNSAxOS40MDYyNSB6IE0gMTkuNDA2MjUgMzQuNzUgTCAyMTUuMjE4NzUgMjMwLjU5Mzc1IEwgMjQuNTMxMjUgMjMwLjU5Mzc1IEMgMjEuNjkwNTQ0IDIzMC41OTM3NiAxOS40MDYyNSAyMjguMzA5NDYgMTkuNDA2MjUgMjI1LjQ2ODc1IEwgMTkuNDA2MjUgMzQuNzUgeiAiDQogICAgICAgaWQ9InBhdGgzMTk2IiAvPg0KICA8L2c+DQo8L3N2Zz4NCg==",+b.UNICODE_LINE_SEP=String.fromCharCode(8232));return b.UNICODE_LINE_SEP};b.prototype.setThemeAndVariant=function(a,c){this.theme=a;this.themeVariant=c};b.prototype.getTheme=function(){null!=this.theme&&this.theme.setVariant(this.themeVariant);return this.theme};b.prototype.getQuickStyleVals=function(){return this.quickStyleVals};b.prototype.processGeomList=function(a){if(!this.geomListProcessed){this.geomList=new g.mxgraph.io.vsdx.mxVsdxGeometryList(a);if(null!=this.geom)for(a=0;a<this.geom.length;a++)this.geomList.addGeometry(this.geom[a]);+this.geomListProcessed=!0}};b.prototype.parseShapeElem=function(a,c){h.prototype.parseShapeElem.call(this,a,c);var d=a.nodeName;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(d,"ForeignData")){d=function(A,C){for(A=A.firstChild;null!=A;){if(1==A.nodeType){var I=A;if("rel"==I.nodeName.toLowerCase()&&(I=I.getAttribute("r:id"),null!=I&&0!==I.length)){A=C.lastIndexOf("/");var Q="",K="";try{Q=C.substring(0,A),K=C.substring(A,C.length)}catch(L){break}A=c.getRelationship(I,Q+"/_rels"+K+".rels");if(null!=A){C=A.getAttribute("Target")||"";I=A.getAttribute("Type");A=C.lastIndexOf("/");try{C=C.substring(A+1,C.length)}catch(L){break}return{type:I,target:C}}break}}A=A.nextSibling}};var f=a.ownerDocument.vsdxFileName,k=a.getAttribute("ForeignType"),n=a.getAttribute("CompressionType")||"",q=null;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"Bitmap"))n=n.toLowerCase();else if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"MetaFile"))n="png";else if(function(A,C){return A&&A.equals?-A.equals(C):A===C}(k,"Enhanced Metafile")||function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"EnhMetaFile"))n="png";else if("Object"==k){if(q=d(a,f),0<q.type.indexOf("/oleObject"))if(n=b.getRelationship("rId1","visio/embeddings/_rels/"+q.target+".rels"),null!=n){q=n.getAttribute("Target");k=n.getAttribute("Type");try{var t=q.lastIndexOf("/");q=q.substring(t+1,q.length)}catch(A){return}n="png";q={type:k,target:q}}else return}else return;null==q&&(q=d(a,f));k=q.type;q=q.target;null!=k&&function(A,-C){var I=A.length-C.length;A=A.indexOf(C,I);return-1!==A&&A===I}(k,"image")&&(this.imageData={},(a=b.getMedia(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+q))?(this.imageData.iData=a,function(A,C){var I=A.length-C.length;A=A.indexOf(C,I);return-1!==A&&A===I}(q.toLowerCase(),".bmp")&&(n="jpg"),this.imageData.iType=n):(this.imageData.iData=c.ERROR_IMAGE,this.imageData.iType="svg+xml"))}else(function(A,C){return A&&A.equals?A.equals(C):A===C})(d,g.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text=-a)};c.prototype.parseSection=function(a){var b=a.getAttribute("N");if(function(I,Q){return I&&I.equals?I.equals(Q):I===Q}(b,"Geometry"))null==this.geom&&(this.geom=[]),this.geom.push(a);else if(function(I,Q){return I&&I.equals?I.equals(Q):I===Q}(b,"Field")){a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var d=0;d<a.length;d++){b=a[d];var f=b.getAttribute("IX")||"";if(0!==f.length)if(null==this.fields&&(this.fields={}),function(I,Q){return I&&I.equals?I.equals(Q):I===Q}("1",-b.getAttribute("Del")))this.fields[f]="";else{for(var k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Cell"),n="",q="",t=0;t<k.length;t++){var A=k[t];b=A.getAttribute("N");A=A.getAttribute("V")||A.textContent||"";switch(b){case "Value":n=A;break;case "Format":q=A}}if("esc(0)"==q)this.fields[f]=n;else if(0!==n.length){try{var C=isNaN(n)?new Date(n):new Date(c.VSDX_START_TIME+Math.floor(864E5*parseFloat(n)));q="c"==q?0==C.getHours()+C.getMinutes()+C.getSeconds()+C.getMilliseconds()?"m/d/yyyy":-"m/d/yyyy h:MM:ss tt":"ddddd"==q?"m/d/yyyy":"dddddd"==q?"dddd, mmmm dd, yyyy":"C"==q?"dddd, mmmm dd, yyyy h:MM:ss tt":"T"==q?"h:MM:ss tt":q.replace(/am\/pm/g,"tt").replace(/m/g,"@").replace(/M/g,"m").replace(/@/g,"M");n=Graph.prototype.formatDate(C,"UTC:"+q.replace(RegExp("\\{|\\}","g"),""))}catch(I){}this.fields[f]=n}}}}else h.prototype.parseSection.call(this,a)};c.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};c.prototype.getText=function(){return null!=-this.text?this.text.textContent:null};c.prototype.getTextChildren=function(){return null!=this.text?this.text.childNodes:null};c.prototype.getWidth=function(){if(1>this.width&&null!=this.childShapes)try{for(var a=0;a<this.childShapes.entries.length;a++)this.width=Math.max(this.childShapes.entries[a].value.width,this.width)}catch(b){}return 0===this.width&&0<this.height?1:this.width};c.prototype.getHeight=function(){if(1>this.height&&null!=this.childShapes)try{for(var a=0;a<this.childShapes.entries.length;a++)this.height=-Math.max(this.childShapes.entries[a].value.height,this.height)}catch(b){}return 0===this.height&&0<this.width?1:this.height};c.prototype.getRotation=function(){return this.rotation};c.prototype.getStyleMap=function(){return this.styleMap};c.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)};c.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};c.prototype.getPPList=function(a){var b=null;""!=a&&(a=this.getBullet(a),"0"!=a&&(b='<ul style="margin: 0;list-style-type: '+-("4"==a?"square":"disc")+'">'));return b};c.prototype.getTextParagraphFormated=function(a){var b="",d={};d["text-align"]=this.getHorizontalAlign(this.pp,!0);d["margin-left"]=this.getIndentLeft(this.pp);d["margin-right"]=this.getIndentRight(this.pp);d["margin-top"]=this.getSpBefore(this.pp)+"px";d["margin-bottom"]=this.getSpAfter(this.pp)+"px";d["text-indent"]=this.getIndentFirst(this.pp);d["vertical-align"]=this.getAlignVertical();d.direction=this.getTextDirection(this.pp);return b+=this.insertAttributes(a,-d)};c.prototype.getTextCharFormated=function(a){var b="color:"+this.getTextColor(this.cp)+";",d="font-size:"+parseFloat(this.getTextSize(this.cp))+"px;",f="font-family:"+this.getTextFont(this.cp)+";",k="direction:"+this.getRtlText(this.cp)+";",n="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",q="line-height:"+this.getSpcLine(this.pp),t=";opacity:"+this.getTextOpacity(this.cp),A=this.getTextPos(this.cp),C=this.getTextCase(this.cp);(function(I,Q){return I&&I.equals?I.equals(Q):+A.equals(C):A===C}(k,"Enhanced Metafile")||function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"EnhMetaFile"))n="png";else if("Object"==k){if(q=d(a,f),0<q.type.indexOf("/oleObject"))if(n=c.getRelationship("rId1","visio/embeddings/_rels/"+q.target+".rels"),null!=n){q=n.getAttribute("Target");k=n.getAttribute("Type");try{var t=q.lastIndexOf("/");q=q.substring(t+1,q.length)}catch(A){return}n="png";q={type:k,target:q}}else return}else return;null==q&&(q=d(a,f));k=q.type;q=q.target;null!=k&&function(A,+C){var I=A.length-C.length;A=A.indexOf(C,I);return-1!==A&&A===I}(k,"image")&&(this.imageData={},(a=c.getMedia(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+q))?(this.imageData.iData=a,function(A,C){var I=A.length-C.length;A=A.indexOf(C,I);return-1!==A&&A===I}(q.toLowerCase(),".bmp")&&(n="jpg"),this.imageData.iType=n):(this.imageData.iData=b.ERROR_IMAGE,this.imageData.iType="svg+xml"))}else(function(A,C){return A&&A.equals?A.equals(C):A===C})(d,g.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text=+a)};b.prototype.parseSection=function(a){var c=a.getAttribute("N");if(function(I,Q){return I&&I.equals?I.equals(Q):I===Q}(c,"Geometry"))null==this.geom&&(this.geom=[]),this.geom.push(a);else if(function(I,Q){return I&&I.equals?I.equals(Q):I===Q}(c,"Field")){a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var d=0;d<a.length;d++){c=a[d];var f=c.getAttribute("IX")||"";if(0!==f.length)if(null==this.fields&&(this.fields={}),function(I,Q){return I&&I.equals?I.equals(Q):I===Q}("1",+c.getAttribute("Del")))this.fields[f]="";else{for(var k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"Cell"),n="",q="",t=0;t<k.length;t++){var A=k[t];c=A.getAttribute("N");A=A.getAttribute("V")||A.textContent||"";switch(c){case "Value":n=A;break;case "Format":q=A}}if("esc(0)"==q)this.fields[f]=n;else if(0!==n.length){try{var C=isNaN(n)?new Date(n):new Date(b.VSDX_START_TIME+Math.floor(864E5*parseFloat(n)));q="c"==q?0==C.getHours()+C.getMinutes()+C.getSeconds()+C.getMilliseconds()?"m/d/yyyy":+"m/d/yyyy h:MM:ss tt":"ddddd"==q?"m/d/yyyy":"dddddd"==q?"dddd, mmmm dd, yyyy":"C"==q?"dddd, mmmm dd, yyyy h:MM:ss tt":"T"==q?"h:MM:ss tt":q.replace(/am\/pm/g,"tt").replace(/m/g,"@").replace(/M/g,"m").replace(/@/g,"M");n=Graph.prototype.formatDate(C,"UTC:"+q.replace(RegExp("\\{|\\}","g"),""))}catch(I){}this.fields[f]=n}}}}else h.prototype.parseSection.call(this,a)};b.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};b.prototype.getText=function(){return null!=+this.text?this.text.textContent:null};b.prototype.getTextChildren=function(){return null!=this.text?this.text.childNodes:null};b.prototype.getWidth=function(){if(1>this.width&&null!=this.childShapes)try{for(var a=0;a<this.childShapes.entries.length;a++)this.width=Math.max(this.childShapes.entries[a].value.width,this.width)}catch(c){}return 0===this.width&&0<this.height?1:this.width};b.prototype.getHeight=function(){if(1>this.height&&null!=this.childShapes)try{for(var a=0;a<this.childShapes.entries.length;a++)this.height=+Math.max(this.childShapes.entries[a].value.height,this.height)}catch(c){}return 0===this.height&&0<this.width?1:this.height};b.prototype.getRotation=function(){return this.rotation};b.prototype.getStyleMap=function(){return this.styleMap};b.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)};b.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};b.prototype.getPPList=function(a){var c=null;""!=a&&(a=this.getBullet(a),"0"!=a&&(c='<ul style="margin: 0;list-style-type: '++("4"==a?"square":"disc")+'">'));return c};b.prototype.getTextParagraphFormated=function(a){var c="",d={};d["text-align"]=this.getHorizontalAlign(this.pp,!0);d["margin-left"]=this.getIndentLeft(this.pp);d["margin-right"]=this.getIndentRight(this.pp);d["margin-top"]=this.getSpBefore(this.pp)+"px";d["margin-bottom"]=this.getSpAfter(this.pp)+"px";d["text-indent"]=this.getIndentFirst(this.pp);d["vertical-align"]=this.getAlignVertical();d.direction=this.getTextDirection(this.pp);return c+=this.insertAttributes(a,+d)};b.prototype.getTextCharFormated=function(a){var c="color:"+this.getTextColor(this.cp)+";",d="font-size:"+parseFloat(this.getTextSize(this.cp))+"px;",f="font-family:"+this.getTextFont(this.cp)+";",k="direction:"+this.getRtlText(this.cp)+";",n="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",q="line-height:"+this.getSpcLine(this.pp),t=";opacity:"+this.getTextOpacity(this.cp),A=this.getTextPos(this.cp),C=this.getTextCase(this.cp);(function(I,Q){return I&&I.equals?I.equals(Q):I===Q})(C,"1")?a=a.toUpperCase():function(I,Q){return I&&I.equals?I.equals(Q):I===Q}(C,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(I,Q){return I&&I.equals?I.equals(Q):I===Q})(A,"1")?a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(I,Q){return I&&I.equals?I.equals(Q):I===Q}(A,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sub"));a=this.isBold(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"b"):a;a=this.isItalic(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,-"i"):a;a=this.isUnderline(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"u"):a;a=this.getTextStrike(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"s"):a;a=this.isSmallCaps(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.toSmallCaps(a,this.getTextSize(this.cp)):a;return'<font style="'+d+f+b+k+n+q+t+'">'+a+"</font>"};c.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(b,d){return b&&b.equals?b.equals(d):b===d})(a,"0")?a="ltr":function(b,d){return b&&b.equals?b.equals(d):-b===d}(a,"1")&&(a="rtl");return a};c.prototype.getSpcLine=function(a){var b=!1;a=this.getSpLine(a);0<a?a*=g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():(a=0===a?100:100*Math.abs(a),b=!0);return(new String(a)).toString()+(b?"%":"px")};c.prototype.getSpcBefore=function(a){return this.getSpBefore(a)};c.prototype.insertAttributes=function(a,b){if(-1!=a.indexOf(">")){var d=a.indexOf(">"),f=a.substring(d);a=a.substring(0,d);b=' style="'+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,":")+'"';return a+-b+f}return a};c.prototype.getRtlText=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.RTL_TEXT,a,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);a=this.getValue(a,"ltr");(function(b,d){return b&&b.equals?b.equals(d):b===d})(a,"0")?a="ltr":function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1")&&(a="rtl");return a};c.prototype.isBold=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,-"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=1===(parseInt(a)&1));return b};c.prototype.isItalic=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=2===(parseInt(a)&2));return b};c.prototype.isUnderline=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&-d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=4===(parseInt(a)&4));return b};c.prototype.isSmallCaps=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=8===(parseInt(a)&8));return b};c.prototype.getTextOpacity=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR_TRANS,a,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);-a=this.getValue(a,"0");var b="1";null!=a&&0!==a.length&&(a=1-parseFloat(a),b=(new String(a)).toString());return b};c.prototype.getTextSize=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SIZE,a,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getScreenNumericalValue$org_w3c_dom_Element$double(a,12);return""+Math.round(100*a)/100};c.prototype.getAlignVertical=function(){var a=mxConstants.ALIGN_MIDDLE,b=parseInt(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.VERTICAL_ALIGN),-"1"));0===b?a=mxConstants.ALIGN_TOP:2===b&&(a=mxConstants.ALIGN_BOTTOM);return a};c.prototype.getGeomList=function(){return this.geomList};c.prototype.getLastX=function(){return this.lastX};c.prototype.getLastY=function(){return this.lastY};c.prototype.getLastMoveX=function(){return this.lastMoveX};c.prototype.getLastMoveY=function(){return this.lastMoveY};c.prototype.getLastKnot=function(){return this.lastKnot};c.prototype.setLastX=function(a){this.lastX=a};c.prototype.setLastY=function(a){this.lastY=-a};c.prototype.setLastMoveX=function(a){this.lastMoveX=a};c.prototype.setLastMoveY=function(a){this.lastMoveY=a};c.prototype.setLastKnot=function(a){this.lastKnot=a};c.prototype.getConnections=function(){var a=[];if(this.sections&&this.sections.Connection)for(var b=this.getHeight(),d=this.getWidth(),f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Connection.elem,"Row"),k=0;k<f.length;k++){for(var n=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f[k]),q,t,A=0;A<n.length;A++){var C=-n[A],I=C.getAttribute("N");C=this.getScreenNumericalValue$org_w3c_dom_Element$double(C,0);"X"==I?q=mxUtils.format(C/d):"Y"==I&&(t=mxUtils.format(1-C/b))}null!=q&&null!=t&&a.push({x:q,y:t})}0==a.length&&this.master&&this.master.masterShape&&(a=this.master.masterShape.getConnections());return a};return c}(g.mxgraph.io.vsdx.Style);m.VSDX_START_TIME=(new Date("1899-12-30T00:00:00Z")).getTime();B.Shape=m;m.__class="com.mxgraph.io.vsdx.Shape"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=+"i"):a;a=this.isUnderline(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"u"):a;a=this.getTextStrike(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"s"):a;a=this.isSmallCaps(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.toSmallCaps(a,this.getTextSize(this.cp)):a;return'<font style="'+d+f+c+k+n+q+t+'">'+a+"</font>"};b.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(c,d){return c&&c.equals?c.equals(d):c===d})(a,"0")?a="ltr":function(c,d){return c&&c.equals?c.equals(d):+c===d}(a,"1")&&(a="rtl");return a};b.prototype.getSpcLine=function(a){var c=!1;a=this.getSpLine(a);0<a?a*=g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():(a=0===a?100:100*Math.abs(a),c=!0);return(new String(a)).toString()+(c?"%":"px")};b.prototype.getSpcBefore=function(a){return this.getSpBefore(a)};b.prototype.insertAttributes=function(a,c){if(-1!=a.indexOf(">")){var d=a.indexOf(">"),f=a.substring(d);a=a.substring(0,d);c=' style="'+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(c,":")+'"';return a++c+f}return a};b.prototype.getRtlText=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.RTL_TEXT,a,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);a=this.getValue(a,"ltr");(function(c,d){return c&&c.equals?c.equals(d):c===d})(a,"0")?a="ltr":function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"1")&&(a="rtl");return a};b.prototype.isBold=function(a){var c=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,+"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(c=1===(parseInt(a)&1));return c};b.prototype.isItalic=function(a){var c=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(c=2===(parseInt(a)&2));return c};b.prototype.isUnderline=function(a){var c=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&+d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(c=4===(parseInt(a)&4));return c};b.prototype.isSmallCaps=function(a){var c=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(c=8===(parseInt(a)&8));return c};b.prototype.getTextOpacity=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR_TRANS,a,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);+a=this.getValue(a,"0");var c="1";null!=a&&0!==a.length&&(a=1-parseFloat(a),c=(new String(a)).toString());return c};b.prototype.getTextSize=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SIZE,a,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getScreenNumericalValue$org_w3c_dom_Element$double(a,12);return""+Math.round(100*a)/100};b.prototype.getAlignVertical=function(){var a=mxConstants.ALIGN_MIDDLE,c=parseInt(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.VERTICAL_ALIGN),+"1"));0===c?a=mxConstants.ALIGN_TOP:2===c&&(a=mxConstants.ALIGN_BOTTOM);return a};b.prototype.getGeomList=function(){return this.geomList};b.prototype.getLastX=function(){return this.lastX};b.prototype.getLastY=function(){return this.lastY};b.prototype.getLastMoveX=function(){return this.lastMoveX};b.prototype.getLastMoveY=function(){return this.lastMoveY};b.prototype.getLastKnot=function(){return this.lastKnot};b.prototype.setLastX=function(a){this.lastX=a};b.prototype.setLastY=function(a){this.lastY=+a};b.prototype.setLastMoveX=function(a){this.lastMoveX=a};b.prototype.setLastMoveY=function(a){this.lastMoveY=a};b.prototype.setLastKnot=function(a){this.lastKnot=a};b.prototype.getConnections=function(){var a=[];if(this.sections&&this.sections.Connection)for(var c=this.getHeight(),d=this.getWidth(),f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Connection.elem,"Row"),k=0;k<f.length;k++){for(var n=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f[k]),q,t,A=0;A<n.length;A++){var C=+n[A],I=C.getAttribute("N");C=this.getScreenNumericalValue$org_w3c_dom_Element$double(C,0);"X"==I?q=mxUtils.format(C/d):"Y"==I&&(t=mxUtils.format(1-C/c))}null!=q&&null!=t&&a.push({x:q,y:t})}0==a.length&&this.master&&this.master.masterShape&&(a=this.master.masterShape.getConnections());return a};return b}(g.mxgraph.io.vsdx.Style);m.VSDX_START_TIME=(new Date("1899-12-30T00:00:00Z")).getTime();B.Shape=m;m.__class="com.mxgraph.io.vsdx.Shape"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(h){function c(a,b,d,f,k,n){function q(){var I;if(I=2!=a.connectsMap[t.Id])if(I=null!=t.childShapes)I=t.childShapes,null==I.entries&&(I.entries=[]),I=0!=I.entries.length;try{if(1==t.childShapes.entries.length){var Q=t.childShapes.entries[0].value,K=t.fields?Object.values(t.fields).join(""):t.text.textContent,L=Q.fields?Object.values(Q.fields).join(""):Q.text.textContent;K==L&&(I=!1,t.childShapes.entries=[],t.noLabelGroup=!0)}}catch(S){console.log(S)}return I}-var t=this;t.masterShape=null;t.master=null;t.parentHeight=0;t=h.call(this,b,n)||this;t.htmlLabels=!0;t.rootShape=t;t.shapeName=null;t.shapeIndex=0;t.vertex=!0;t.childShapes={};var A=t.getMasterId(),C=t.getShapeMasterId();t.master=null!=A?f[A]?f[A]:null:k;null!=t.master&&(t.masterShape=null==A&&null!=C?t.master.getSubShape(C):t.master.getMasterShape());f=t.getNameU();k=f.lastIndexOf(".");-1!==k&&(f=f.substring(0,k));t.shapeName=f;b=b.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);-null!=b&&0<b.length&&(b=b.item(0),t.childShapes=a.parseShapes(b,t.master,!1));b=t.calcRotation();t.rotation=100*b/100;t.rotation%=360;b=a.getCellIntValue("ThemeIndex",-100);-100===b&&(b=parseInt(t.getValue(t.getCellElement$java_lang_String("ThemeIndex"),"0")));n=function(I,Q){null==I.entries&&(I.entries=[]);for(var K=0;K<I.entries.length;K++)if(null!=I.entries[K].key.equals&&I.entries[K].key.equals(Q)||I.entries[K].key===Q)return I.entries[K].value;return null}(n.getThemes(),b);null==n&&"1"==urlParams.dev&&-console.log("No theme found for index "+b);b=a.getCellIntValue("VariationColorIndex",0);t.setThemeAndVariant(n,b);f=function(I){null==I.entries&&(I.entries=[]);return I.entries}(t.childShapes);for(k=0;k<f.length;k++)A=f[k].getValue(),A.setRootShape(t),null==A.theme&&A.setThemeAndVariant(n,b);t.quickStyleVals=new g.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFillColor"),+(function(g){(function(y){(function(z){(function(B){var m=function(h){function b(a,c,d,f,k,n){function q(){var I;if(I=2!=a.connectsMap[t.Id])if(I=null!=t.childShapes)I=t.childShapes,null==I.entries&&(I.entries=[]),I=0!=I.entries.length;try{if(1==t.childShapes.entries.length){var Q=t.childShapes.entries[0].value,K=t.fields?Object.values(t.fields).join(""):t.text.textContent,L=Q.fields?Object.values(Q.fields).join(""):Q.text.textContent;K==L&&(I=!1,t.childShapes.entries=[],t.noLabelGroup=!0)}}catch(S){console.log(S)}return I}+var t=this;t.masterShape=null;t.master=null;t.parentHeight=0;t=h.call(this,c,n)||this;t.htmlLabels=!0;t.rootShape=t;t.shapeName=null;t.shapeIndex=0;t.vertex=!0;t.childShapes={};var A=t.getMasterId(),C=t.getShapeMasterId();t.master=null!=A?f[A]?f[A]:null:k;null!=t.master&&(t.masterShape=null==A&&null!=C?t.master.getSubShape(C):t.master.getMasterShape());f=t.getNameU();k=f.lastIndexOf(".");-1!==k&&(f=f.substring(0,k));t.shapeName=f;c=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);+null!=c&&0<c.length&&(c=c.item(0),t.childShapes=a.parseShapes(c,t.master,!1));c=t.calcRotation();t.rotation=100*c/100;t.rotation%=360;c=a.getCellIntValue("ThemeIndex",-100);-100===c&&(c=parseInt(t.getValue(t.getCellElement$java_lang_String("ThemeIndex"),"0")));n=function(I,Q){null==I.entries&&(I.entries=[]);for(var K=0;K<I.entries.length;K++)if(null!=I.entries[K].key.equals&&I.entries[K].key.equals(Q)||I.entries[K].key===Q)return I.entries[K].value;return null}(n.getThemes(),c);null==n&&"1"==urlParams.dev&&+console.log("No theme found for index "+c);c=a.getCellIntValue("VariationColorIndex",0);t.setThemeAndVariant(n,c);f=function(I){null==I.entries&&(I.entries=[]);return I.entries}(t.childShapes);for(k=0;k<f.length;k++)A=f[k].getValue(),A.setRootShape(t),null==A.theme&&A.setThemeAndVariant(n,c);t.quickStyleVals=new g.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFillColor"),"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFillMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFontColor"),"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFontMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleLineColor"),"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleLineMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleShadowColor"),"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleType"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleVariation"),"0")));null!=t.masterShape?(t.masterShape.processGeomList(null),t.processGeomList(t.masterShape.getGeomList()),0===t.width&&(t.width=t.getScreenNumericalValue$org_w3c_dom_Element$double(t.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0)),0===t.height&&(t.height=t.getScreenNumericalValue$org_w3c_dom_Element$double(t.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),-0))):t.processGeomList(null);t.vertex=d||q()||null!=t.geomList&&(!t.geomList.isNoFill()||1<t.geomList.getGeoCount());t.layerMember=t.getValue(t.getCellElement$java_lang_String("LayerMember"));t.layerMember&&(t.layerMember=t.layerMember.split(";"));return t}__extends(c,h);c.__static_initialize=function(){c.__static_initialized||(c.__static_initialized=!0,c.__static_initializer_0())};c.OFFSET_ARRAY_$LI$=function(){c.__static_initialize();null==c.OFFSET_ARRAY&&(c.OFFSET_ARRAY=["Organizational unit",-"Domain 3D"].slice(0).slice(0));return c.OFFSET_ARRAY};c.arrowSizes_$LI$=function(){c.__static_initialize();null==c.arrowSizes&&(c.arrowSizes=[2,3,5,7,9,22,45]);return c.arrowSizes};c.arrowTypes_$LI$=function(){c.__static_initialize();return c.arrowTypes};c.__static_initializer_0=function(){c.arrowTypes={};(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,-value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),0,mxConstants.NONE);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),1,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&-(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),2,"blockThin");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,-value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),3,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),4,mxConstants.ARROW_BLOCK);(function(a,b,d){null==-a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),5,mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=-d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),10,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),13,mxConstants.ARROW_BLOCK);-(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),14,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||-a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),17,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),-20,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),22,c.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=-a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),23,"dash");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),24,"ERone");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),25,"ERmandOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=-a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),27,"ERmany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),28,"ERoneToMany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),29,"ERzeroToMany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=-a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),30,"ERzeroToOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),6,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),7,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<-a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),8,mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,-value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),9,"openAsync");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),11,"diamond");(function(a,b,d){null==a.entries&&(a.entries=-[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),12,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,-value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),15,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),16,c.ARROW_NO_FILL_MARKER+-mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),18,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&-a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),19,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),21,c.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),26,"ERmandOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<-a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),31,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,-value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),32,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),33,c.ARROW_NO_FILL_MARKER+-mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),34,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&-a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),35,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),-36,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),37,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||-a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),38,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),-39,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),40,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&-a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),41,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),42,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),43,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<-a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),44,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,-value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),45,mxConstants.ARROW_OPEN)};c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$=function(){c.__static_initialize();null==c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER&&(c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER={});return c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER};c.prototype.getShapeNode=function(a){var b=this.cellElements;b=b[a]?b[a]:null;return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):-b};c.prototype.getTextLabel=function(a){var b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HIDE_TEXT),"0");b="1".equals?"1".equals(b):"1"===b;if(b)return null;b=this.getTextChildren();null==b&&null!=this.masterShape&&(b=this.masterShape.getTextChildren());if(this.htmlLabels){if(null!=b)return this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical(),this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign("0",!1),a||(this.styleMap.overflow=-"width"),this.getHtmlTextContent(b)}else return a=this.getText(),null==a&&null!=this.masterShape?this.masterShape.getText():a;return null};c.prototype.getIndex=function(a){a=a.getAttribute("IX")||"";return 0===a.length?"0":a};c.prototype.initLabels=function(a){this.paragraphs={};for(var b=null,d=null,f=null,k=0;k<a.length;k++){var n=a.item(k);switch(n.nodeName){case "cp":b=this.getIndex(n);break;case "tp":this.getIndex(n);break;case "pp":d=this.getIndex(n);break;case "fld":f=this.getIndex(n);break;-case "#text":n=n.textContent;var q=this.paragraphs;q=q[d]?q[d]:null;null==q?(q=new g.mxgraph.io.vsdx.Paragraph(n,b,d,f),this.paragraphs[d]=q):q.addText(n,b,f)}}};c.prototype.createHybridLabel=function(a){var b=function(q,t){return q[t]?q[t]:null}(this.paragraphs,a);this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign(a,!1);this.styleMap[mxConstants.STYLE_SPACING_LEFT]=this.getIndentLeft(a);this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=this.getIndentRight(a);this.styleMap[mxConstants.STYLE_SPACING_TOP]=-this.getSpBefore(a);this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=this.getSpAfter(a);this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical();this.styleMap.fontColor=this.getTextColor(a);this.styleMap.fontSize=this.getTextSize(a);this.styleMap.fontFamily=this.getTextFont(a);var d=this.isBold(a)?mxConstants.FONT_BOLD:0;d|=this.isItalic(a)?mxConstants.FONT_ITALIC:0;d|=this.isUnderline(a)?mxConstants.FONT_UNDERLINE:0;this.styleMap.fontStyle=(new String(d)).toString();a=b.numValues();-d=null;for(var f=0;f<a;f++){var k=b.getValue(f);if(0===k.length&&null!=this.fields){var n=b.getField(f);null!=n&&(k=function(q,t){return q[t]?q[t]:null}(this.fields,n),null==k&&null!=this.masterShape&&null!=this.masterShape.fields&&(k=function(q,t){return q[t]?q[t]:null}(this.masterShape.fields,n)))}null!=k&&(d=null==d?k:d+k)}return d};c.prototype.getHtmlTextContent=function(a){function b(A){A=g.mxgraph.io.vsdx.mxVsdxUtils.htmlEntities(A);n&&(A="<li>"+A,n=!1);k?(A=A.split("\n"),A[A.length-1]||(A.pop(),+0))):t.processGeomList(null);t.vertex=d||q()||null!=t.geomList&&(!t.geomList.isNoFill()||1<t.geomList.getGeoCount());t.layerMember=t.getValue(t.getCellElement$java_lang_String("LayerMember"));t.layerMember&&(t.layerMember=t.layerMember.split(";"));return t}__extends(b,h);b.__static_initialize=function(){b.__static_initialized||(b.__static_initialized=!0,b.__static_initializer_0())};b.OFFSET_ARRAY_$LI$=function(){b.__static_initialize();null==b.OFFSET_ARRAY&&(b.OFFSET_ARRAY=["Organizational unit",+"Domain 3D"].slice(0).slice(0));return b.OFFSET_ARRAY};b.arrowSizes_$LI$=function(){b.__static_initialize();null==b.arrowSizes&&(b.arrowSizes=[2,3,5,7,9,22,45]);return b.arrowSizes};b.arrowTypes_$LI$=function(){b.__static_initialize();return b.arrowTypes};b.__static_initializer_0=function(){b.arrowTypes={};(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),0,mxConstants.NONE);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),1,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&+(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),2,"blockThin");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),3,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),4,mxConstants.ARROW_BLOCK);(function(a,c,d){null==+a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),5,mxConstants.ARROW_CLASSIC);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=+d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),10,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),13,mxConstants.ARROW_BLOCK);+(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),14,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||+a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),17,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),+20,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),22,b.ARROW_NO_FILL_MARKER+"diamond");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=+a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),23,"dash");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},+getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),24,"ERone");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),25,"ERmandOne");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=+a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),27,"ERmany");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},+getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),28,"ERoneToMany");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),29,"ERzeroToMany");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=+a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),30,"ERzeroToOne");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},+getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),6,mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),7,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<+a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),8,mxConstants.ARROW_CLASSIC);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),9,"openAsync");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),11,"diamond");(function(a,c,d){null==a.entries&&(a.entries=+[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),12,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),15,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),16,b.ARROW_NO_FILL_MARKER++mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),18,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&+a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),19,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},+getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),21,b.ARROW_NO_FILL_MARKER+"diamond");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),26,"ERmandOne");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<+a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),31,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),32,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),33,b.ARROW_NO_FILL_MARKER++mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),34,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&+a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),35,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),+36,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),37,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||+a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),38,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),+39,mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),40,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&+a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),41,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},+getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),42,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),43,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<+a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),44,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),45,mxConstants.ARROW_OPEN)};b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$=function(){b.__static_initialize();null==b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER&&(b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER={});return b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER};b.prototype.getShapeNode=function(a){var c=this.cellElements;c=c[a]?c[a]:null;return null==c&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):+c};b.prototype.getTextLabel=function(a){var c=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HIDE_TEXT),"0");c="1".equals?"1".equals(c):"1"===c;if(c)return null;c=this.getTextChildren();null==c&&null!=this.masterShape&&(c=this.masterShape.getTextChildren());if(this.htmlLabels){if(null!=c)return this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical(),this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign("0",!1),a||(this.styleMap.overflow=+"width"),this.getHtmlTextContent(c)}else return a=this.getText(),null==a&&null!=this.masterShape?this.masterShape.getText():a;return null};b.prototype.getIndex=function(a){a=a.getAttribute("IX")||"";return 0===a.length?"0":a};b.prototype.initLabels=function(a){this.paragraphs={};for(var c=null,d=null,f=null,k=0;k<a.length;k++){var n=a.item(k);switch(n.nodeName){case "cp":c=this.getIndex(n);break;case "tp":this.getIndex(n);break;case "pp":d=this.getIndex(n);break;case "fld":f=this.getIndex(n);break;+case "#text":n=n.textContent;var q=this.paragraphs;q=q[d]?q[d]:null;null==q?(q=new g.mxgraph.io.vsdx.Paragraph(n,c,d,f),this.paragraphs[d]=q):q.addText(n,c,f)}}};b.prototype.createHybridLabel=function(a){var c=function(q,t){return q[t]?q[t]:null}(this.paragraphs,a);this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign(a,!1);this.styleMap[mxConstants.STYLE_SPACING_LEFT]=this.getIndentLeft(a);this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=this.getIndentRight(a);this.styleMap[mxConstants.STYLE_SPACING_TOP]=+this.getSpBefore(a);this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=this.getSpAfter(a);this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical();this.styleMap.fontColor=this.getTextColor(a);this.styleMap.fontSize=this.getTextSize(a);this.styleMap.fontFamily=this.getTextFont(a);var d=this.isBold(a)?mxConstants.FONT_BOLD:0;d|=this.isItalic(a)?mxConstants.FONT_ITALIC:0;d|=this.isUnderline(a)?mxConstants.FONT_UNDERLINE:0;this.styleMap.fontStyle=(new String(d)).toString();a=c.numValues();+d=null;for(var f=0;f<a;f++){var k=c.getValue(f);if(0===k.length&&null!=this.fields){var n=c.getField(f);null!=n&&(k=function(q,t){return q[t]?q[t]:null}(this.fields,n),null==k&&null!=this.masterShape&&null!=this.masterShape.fields&&(k=function(q,t){return q[t]?q[t]:null}(this.masterShape.fields,n)))}null!=k&&(d=null==d?k:d+k)}return d};b.prototype.getHtmlTextContent=function(a){function c(A){A=g.mxgraph.io.vsdx.mxVsdxUtils.htmlEntities(A);n&&(A="<li>"+A,n=!1);k?(A=A.split("\n"),A[A.length-1]||(A.pop(),n=!0),A=A.join("</li><li>")):A=A.replace(RegExp("\n","g"),"<br/>").replace(new RegExp(g.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP,"g"),"<br/>");return this.getTextCharFormated(A)}var d="",f=!0,k=!1,n=!1;if(null!=a&&0<a.length)for(var q=0;q<a.length;q++){var t=a.item(q);(function(A,C){return A&&A.equals?A.equals(C):A===C})(t.nodeName,"cp")?this.cp=this.getIndex(t):function(A,C){return A&&A.equals?A.equals(C):A===C}(t.nodeName,"tp")?this.tp=this.getIndex(t):function(A,C){return A&&A.equals?A.equals(C):A===C}(t.nodeName,"pp")?(this.pp=this.getIndex(t),k&&(d+="</li></ul>"),f?f=!1:d+="</p>",d+=this.getTextParagraphFormated("<p>"),t=this.getPPList(this.pp),n=k=null!=t,d+=k?t:""):function(A,C){return A&&A.equals?A.equals(C):A===C}(t.nodeName,"fld")?(this.fld=this.getIndex(t),t=null,null!=this.fields&&(t=function(A,C){return A[C]?A[C]:null}(this.fields,this.fld)),null==t&&null!=this.masterShape&&null!=this.masterShape.fields&&(t=function(A,C){return A[C]?A[C]:null}(this.masterShape.fields,this.fld)),-null!=t&&(d+=b.call(this,t))):function(A,C){return A&&A.equals?A.equals(C):A===C}(t.nodeName,"#text")&&(t=t.textContent,d+=b.call(this,t))}k&&(d+="</li></ul>");return g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(d+(f?"":"</p>"),"div","font-size: 1px")};c.prototype.isConnectorBigNameU=function(a){return function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree single")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree single")||function(b,d,f){void 0===-f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree double")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree double")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree tail")||-function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 2")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 1")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 3")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Double flexi-arrow")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Fancy arrow")};c.prototype.isVertex=function(){return this.vertex};c.prototype.getOriginPoint=-function(a,b){var d=this.getPinX(),f=this.getPinY(),k=this.getLocPinY(),n=this.getLocPinX(),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),t=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);d-=n;a-=f+(t-k);return!b||k===t/2&&n===q/2||0===this.rotation?new mxPoint(d,a):(b=q/2-n,k-=t/2,t=Math.cos((360-this.rotation)*Math.PI/180),n=Math.sin((360-this.rotation)*-Math.PI/180),new mxPoint(d+b-(b*t-k*n),b*n+k*t+a-k))};c.prototype.getDimensions=function(){var a=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return new mxPoint(0===a&&0<b?1:a,0===b&&0<a?1:b)};c.prototype.getPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.PIN_X),-0)};c.prototype.getPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.PIN_Y),0)};c.prototype.getLocPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_X),0)};c.prototype.getLocPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_Y),0)};c.prototype.getOpacity=-function(a){this.isGroup();a=this.getValueAsDouble(this.getCellElement$java_lang_String(a),0);a=Math.max(100-100*a,0);return a=Math.min(a,100)};c.prototype.getGradient=function(){if(function(d,f){return d&&d.equals?d.equals(f):d===f}("1",this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),"0"))){var a=function(d,f){return d[f]?d[f]:null}(this.sections,"FillGradient");if(null!=a){var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a.elem,-"Row");a=this.getColor(a.getIndexedCell(b[b.length-1].getAttribute("IX"),"GradientStopColor"));if(null!=a&&0!==a.length)return a}}a="";b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");25<=parseInt(b)?a=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND)):(b=this.getTheme(),null!=b&&(b=b.getFillGraientColor(this.getQuickStyleVals()),null!=b&&(a=b.toHexStr())));return a};c.prototype.getGradientDirection=-function(){var a="",b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");(function(d,f){return d&&d.equals?d.equals(f):d===f})(b,"25")?a=mxConstants.DIRECTION_EAST:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"27")?a=mxConstants.DIRECTION_WEST:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"28")?a=mxConstants.DIRECTION_SOUTH:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"30")&&(a=mxConstants.DIRECTION_NORTH);return a};c.prototype.calcRotation=-function(){var a=parseFloat(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.ANGLE),"0"));a=180*a/Math.PI;return 360-a%360*100/100};c.prototype.propagateRotation=function(a){this.rotation+=a;this.rotation%=360;this.rotation=100*this.rotation/100};c.prototype.getTopSpacing=function(){return 100*(this.getTextTopMargin()/2-2.8)/100};c.prototype.getBottomSpacing=function(){return 100*(this.getTextBottomMargin()/2-2.8)/100};c.prototype.getLeftSpacing=function(){return 100*-(this.getTextLeftMargin()/2-2.8)/100};c.prototype.getRightSpacing=function(){return 100*(this.getTextRightMargin()/2-2.8)/100};c.prototype.getLabelRotation=function(){var a=!0,b=this.calcRotation(),d=parseFloat(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),"0"));d=180*d/Math.PI;d-=b;45>Math.abs(d)||270<Math.abs(d)||(a=!1);return a};c.prototype.getHyperlink=function(){var a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("Address",-null,"Hyperlink");a=this.getValue(a,"");var b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("SubAddress",null,"Hyperlink");b=this.getValue(b,"");return{extLink:a,pageLink:b}};c.prototype.getProperties=function(){var a=[];if(this.sections&&this.sections.Property)for(var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Property.elem,"Row"),d=0;d<b.length;d++){var f=b[d],k=f.getAttribute("N"),n=null;f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);-for(var q=0;q<f.length;q++){var t=f[q],A=t.getAttribute("N");"Value"==A?n=t.getAttribute("V"):"Label"==A&&(k=t.getAttribute("V"))}null!=n&&a.push({key:k,val:n})}return a};c.prototype.getStyleFromShape=function(){this.styleMap[g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();this.rotation=Math.round(this.rotation);0!==this.rotation&&(this.styleMap[mxConstants.STYLE_ROTATION]=""+this.rotation);var a=this.getFillColor();(function(n,q){return n&&n.equals?n.equals(q):n===q})(a,"")?this.styleMap[mxConstants.STYLE_FILLCOLOR]=-"none":this.styleMap[mxConstants.STYLE_FILLCOLOR]=a;var b=this.getId();this.styleDebug("ID = "+b+" , Fill Color = "+a);a=this.getGradient();(function(n,q){return n&&n.equals?n.equals(q):n===q})(a,"")?this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]="none":(this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]=a,a=this.getGradientDirection(),function(n,q){return n&&n.equals?n.equals(q):n===q}(a,"")||function(n,q){return n&&n.equals?n.equals(q):n===q}(a,mxConstants.DIRECTION_SOUTH)||(this.styleMap[mxConstants.STYLE_GRADIENT_DIRECTION]=+null!=t&&(d+=c.call(this,t))):function(A,C){return A&&A.equals?A.equals(C):A===C}(t.nodeName,"#text")&&(t=t.textContent,d+=c.call(this,t))}k&&(d+="</li></ul>");return g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(d+(f?"":"</p>"),"div","font-size: 1px")};b.prototype.isConnectorBigNameU=function(a){return function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"60 degree single")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"45 degree single")||function(c,d,f){void 0===+f&&(f=0);return c.substr(f,d.length)===d}(a,"45 degree double")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"60 degree double")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"45 degree tail")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"60 degree tail")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"45 degree tail")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"60 degree tail")||+function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Flexi-arrow 2")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Flexi-arrow 1")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Flexi-arrow 3")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Double flexi-arrow")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Fancy arrow")};b.prototype.isVertex=function(){return this.vertex};b.prototype.getOriginPoint=+function(a,c){var d=this.getPinX(),f=this.getPinY(),k=this.getLocPinY(),n=this.getLocPinX(),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),t=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);d-=n;a-=f+(t-k);return!c||k===t/2&&n===q/2||0===this.rotation?new mxPoint(d,a):(c=q/2-n,k-=t/2,t=Math.cos((360-this.rotation)*Math.PI/180),n=Math.sin((360-this.rotation)*+Math.PI/180),new mxPoint(d+c-(c*t-k*n),c*n+k*t+a-k))};b.prototype.getDimensions=function(){var a=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),c=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return new mxPoint(0===a&&0<c?1:a,0===c&&0<a?1:c)};b.prototype.getPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.PIN_X),+0)};b.prototype.getPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.PIN_Y),0)};b.prototype.getLocPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_X),0)};b.prototype.getLocPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_Y),0)};b.prototype.getOpacity=+function(a){this.isGroup();a=this.getValueAsDouble(this.getCellElement$java_lang_String(a),0);a=Math.max(100-100*a,0);return a=Math.min(a,100)};b.prototype.getGradient=function(){if(function(d,f){return d&&d.equals?d.equals(f):d===f}("1",this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),"0"))){var a=function(d,f){return d[f]?d[f]:null}(this.sections,"FillGradient");if(null!=a){var c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a.elem,+"Row");a=this.getColor(a.getIndexedCell(c[c.length-1].getAttribute("IX"),"GradientStopColor"));if(null!=a&&0!==a.length)return a}}a="";c=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");25<=parseInt(c)?a=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND)):(c=this.getTheme(),null!=c&&(c=c.getFillGraientColor(this.getQuickStyleVals()),null!=c&&(a=c.toHexStr())));return a};b.prototype.getGradientDirection=+function(){var a="",c=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");(function(d,f){return d&&d.equals?d.equals(f):d===f})(c,"25")?a=mxConstants.DIRECTION_EAST:function(d,f){return d&&d.equals?d.equals(f):d===f}(c,"27")?a=mxConstants.DIRECTION_WEST:function(d,f){return d&&d.equals?d.equals(f):d===f}(c,"28")?a=mxConstants.DIRECTION_SOUTH:function(d,f){return d&&d.equals?d.equals(f):d===f}(c,"30")&&(a=mxConstants.DIRECTION_NORTH);return a};b.prototype.calcRotation=+function(){var a=parseFloat(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.ANGLE),"0"));a=180*a/Math.PI;return 360-a%360*100/100};b.prototype.propagateRotation=function(a){this.rotation+=a;this.rotation%=360;this.rotation=100*this.rotation/100};b.prototype.getTopSpacing=function(){return 100*(this.getTextTopMargin()/2-2.8)/100};b.prototype.getBottomSpacing=function(){return 100*(this.getTextBottomMargin()/2-2.8)/100};b.prototype.getLeftSpacing=function(){return 100*+(this.getTextLeftMargin()/2-2.8)/100};b.prototype.getRightSpacing=function(){return 100*(this.getTextRightMargin()/2-2.8)/100};b.prototype.getLabelRotation=function(){var a=!0,c=this.calcRotation(),d=parseFloat(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),"0"));d=180*d/Math.PI;d-=c;45>Math.abs(d)||270<Math.abs(d)||(a=!1);return a};b.prototype.getHyperlink=function(){var a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("Address",+null,"Hyperlink");a=this.getValue(a,"");var c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("SubAddress",null,"Hyperlink");c=this.getValue(c,"");return{extLink:a,pageLink:c}};b.prototype.getProperties=function(){var a=[];if(this.sections&&this.sections.Property)for(var c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Property.elem,"Row"),d=0;d<c.length;d++){var f=c[d],k=f.getAttribute("N"),n=null;f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);+for(var q=0;q<f.length;q++){var t=f[q],A=t.getAttribute("N");"Value"==A?n=t.getAttribute("V"):"Label"==A&&(k=t.getAttribute("V"))}null!=n&&a.push({key:k,val:n})}return a};b.prototype.getStyleFromShape=function(){this.styleMap[g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();this.rotation=Math.round(this.rotation);0!==this.rotation&&(this.styleMap[mxConstants.STYLE_ROTATION]=""+this.rotation);var a=this.getFillColor();(function(n,q){return n&&n.equals?n.equals(q):n===q})(a,"")?this.styleMap[mxConstants.STYLE_FILLCOLOR]=+"none":this.styleMap[mxConstants.STYLE_FILLCOLOR]=a;var c=this.getId();this.styleDebug("ID = "+c+" , Fill Color = "+a);a=this.getGradient();(function(n,q){return n&&n.equals?n.equals(q):n===q})(a,"")?this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]="none":(this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]=a,a=this.getGradientDirection(),function(n,q){return n&&n.equals?n.equals(q):n===q}(a,"")||function(n,q){return n&&n.equals?n.equals(q):n===q}(a,mxConstants.DIRECTION_SOUTH)||(this.styleMap[mxConstants.STYLE_GRADIENT_DIRECTION]=a));a=this.getOpacity(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_FILL_OPACITY]=""+a);a=this.getOpacity(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_STROKE_OPACITY]=""+a);a=this.getForm();a.hasOwnProperty(mxConstants.STYLE_SHAPE)&&function(n,q,t){void 0===t&&(t=0);return n.substr(t,q.length)===q}(function(n,q){return n[q]?n[q]:null}(a,mxConstants.STYLE_SHAPE),"image;")&&(this.styleMap[mxConstants.STYLE_WHITE_SPACE]=-"wrap");for(var d in a)this.styleMap[d]=a[d];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",d=this.getDashPattern(),null!=d&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=d));d=this.getStrokeColor();var f=this.getStrokeTransparency();this.styleDebug("ID = "+b+" , Color = "+d+" , stroke transparency = "+f);(function(n,q){return n&&n.equals?n.equals(q):n===q})(d,"")||1===f||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=d);b=Math.round(this.getLineWidth())|0;1!==b&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=-""+b);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE);b=Math.round(this.getTopSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+b);b=Math.round(this.getBottomSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+b);b=Math.round(this.getLeftSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+b);b=Math.round(this.getRightSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+b);a=-this.getDirection(a);a!==mxConstants.DIRECTION_EAST&&(this.styleMap[mxConstants.STYLE_DIRECTION]=a);a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLIP_X),"0");b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLIP_Y),"0");(function(n,q){return n&&n.equals?n.equals(q):n===q})("1",a)&&(this.styleMap[mxConstants.STYLE_FLIPH]="1");(function(n,q){return n&&n.equals?n.equals(q):n===q})("1",b)&&(this.styleMap[mxConstants.STYLE_FLIPV]=-"1");try{var k=this.getConnections();a=[];for(b=0;b<k.length;b++)a.push("["+k[b].x+","+k[b].y+",0]");this.styleMap.points="["+a.join(",")+"]"}catch(n){console.log(n)}this.resolveCommonStyles();return this.styleMap};c.prototype.getDashPattern=function(){var a=null,b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");(b&&b.equals?b.equals("Themed"):"Themed"===b)?(b=this.getTheme(),null!=b&&(a=this.isVertex()?b.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):-b.getConnLineDashPattern(this.getQuickStyleVals()))):a=B.Style.getLineDashPattern(parseInt(b));if(null!=a&&0!=a.length){b="";for(var d=0;d<a.length;d++)b=b.concat(a[d].toFixed(2)+" ");return b.trim()}return null};c.prototype.isDashed=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Themed")){if(a=this.getTheme(),null!=a)return this.isVertex()?a.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):-a.isConnLineDashed(this.getQuickStyleVals())}else if(!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1"))return!0;return!1};c.prototype.getLineWidth=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),"1"),b=1;try{var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=(this.isVertex()?f.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):-f.getConnLineWidth(this.getQuickStyleVals()))/1E4)}else b=parseFloat(a),b=this.getScreenNumericalValue$double(b)}catch(k){}1>b&&(b*=2);return b};c.prototype.getStartArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE),"4");try{var b=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=this.isVertex()?f.getStartSize(this.getQuickStyleVals()):f.getConnStartSize(this.getQuickStyleVals()))}else b=-parseFloat(a);return c.arrowSizes_$LI$()[b]}catch(k){}return 4};c.prototype.getFinalArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE),"4");try{var b=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=this.isVertex()?f.getEndSize(this.getQuickStyleVals()):f.getConnEndSize(this.getQuickStyleVals()))}else b=parseFloat(a);return c.arrowSizes_$LI$()[b]}catch(k){}return 4};c.prototype.getRounding=-function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.ROUNDING),"0");var b=a;b="Themed".equals?"Themed".equals(b):"Themed"===b;b&&(a="0");return parseFloat(a)};c.prototype.isShadow=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN),"0");return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Themed")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")?!1:!0};c.prototype.getEdgeStyle$java_util_Map=-function(a){var b={};(function(d,f){return d&&d.equals?d.equals(f):d===f})(function(d,f){return d[f]?d[f]:null}(a,mxConstants.STYLE_SHAPE),"mxgraph.lean_mapping.electronic_info_flow_edge")?b[mxConstants.STYLE_EDGE]=mxConstants.NONE:b[mxConstants.STYLE_EDGE]=mxConstants.EDGESTYLE_ELBOW;return b};c.prototype.getEdgeStyle=function(a){if(null!=a&&a instanceof Object||null===a)return this.getEdgeStyle$java_util_Map(a);if(void 0===a)return this.getEdgeStyle$();throw Error("invalid overload");};c.prototype.getMasterId=-function(){return this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER)?this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER):null};c.prototype.getShapeMasterId=function(){return this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE)?this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE):null};c.prototype.isGroup=function(){var a=(a=this.shape.getAttribute("Type"))&&a.equals?a.equals("Group"):"Group"===a;return a};c.getType=function(a){return a.getAttribute("Type")};-c.prototype.getMaster=function(){return this.master};c.prototype.getNameU=function(){var a=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||"",b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getNameU());return a};c.prototype.getName=function(){var a=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME),b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getName());return a};-c.prototype.getMasterName=function(){return this.shapeName};c.prototype.setLabelOffset=function(a,b){var d="",f="";this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(d=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));null!=this.getMaster()&&null!=this.getMaster().getMasterElement()&&this.getMaster().getMasterElement().hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(f=this.getMaster().getMasterElement().getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));+"wrap");for(var d in a)this.styleMap[d]=a[d];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",d=this.getDashPattern(),null!=d&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=d));d=this.getStrokeColor();var f=this.getStrokeTransparency();this.styleDebug("ID = "+c+" , Color = "+d+" , stroke transparency = "+f);(function(n,q){return n&&n.equals?n.equals(q):n===q})(d,"")||1===f||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=d);c=Math.round(this.getLineWidth())|0;1!==c&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=+""+c);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE);c=Math.round(this.getTopSpacing())|0;0!==c&&(this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+c);c=Math.round(this.getBottomSpacing())|0;0!==c&&(this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+c);c=Math.round(this.getLeftSpacing())|0;0!==c&&(this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+c);c=Math.round(this.getRightSpacing())|0;0!==c&&(this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+c);a=+this.getDirection(a);a!==mxConstants.DIRECTION_EAST&&(this.styleMap[mxConstants.STYLE_DIRECTION]=a);a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLIP_X),"0");c=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLIP_Y),"0");(function(n,q){return n&&n.equals?n.equals(q):n===q})("1",a)&&(this.styleMap[mxConstants.STYLE_FLIPH]="1");(function(n,q){return n&&n.equals?n.equals(q):n===q})("1",c)&&(this.styleMap[mxConstants.STYLE_FLIPV]=+"1");try{var k=this.getConnections();a=[];for(c=0;c<k.length;c++)a.push("["+k[c].x+","+k[c].y+",0]");this.styleMap.points="["+a.join(",")+"]"}catch(n){console.log(n)}this.resolveCommonStyles();return this.styleMap};b.prototype.getDashPattern=function(){var a=null,c=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");(c&&c.equals?c.equals("Themed"):"Themed"===c)?(c=this.getTheme(),null!=c&&(a=this.isVertex()?c.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):+c.getConnLineDashPattern(this.getQuickStyleVals()))):a=B.Style.getLineDashPattern(parseInt(c));if(null!=a&&0!=a.length){c="";for(var d=0;d<a.length;d++)c=c.concat(a[d].toFixed(2)+" ");return c.trim()}return null};b.prototype.isDashed=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");if(function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"Themed")){if(a=this.getTheme(),null!=a)return this.isVertex()?a.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):+a.isConnLineDashed(this.getQuickStyleVals())}else if(!function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0")&&!function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"1"))return!0;return!1};b.prototype.getLineWidth=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),"1"),c=1;try{var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(c=(this.isVertex()?f.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):+f.getConnLineWidth(this.getQuickStyleVals()))/1E4)}else c=parseFloat(a),c=this.getScreenNumericalValue$double(c)}catch(k){}1>c&&(c*=2);return c};b.prototype.getStartArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE),"4");try{var c=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(c=this.isVertex()?f.getStartSize(this.getQuickStyleVals()):f.getConnStartSize(this.getQuickStyleVals()))}else c=+parseFloat(a);return b.arrowSizes_$LI$()[c]}catch(k){}return 4};b.prototype.getFinalArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE),"4");try{var c=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(c=this.isVertex()?f.getEndSize(this.getQuickStyleVals()):f.getConnEndSize(this.getQuickStyleVals()))}else c=parseFloat(a);return b.arrowSizes_$LI$()[c]}catch(k){}return 4};b.prototype.getRounding=+function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.ROUNDING),"0");var c=a;c="Themed".equals?"Themed".equals(c):"Themed"===c;c&&(a="0");return parseFloat(a)};b.prototype.isShadow=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN),"0");return function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"Themed")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0")?!1:!0};b.prototype.getEdgeStyle$java_util_Map=+function(a){var c={};(function(d,f){return d&&d.equals?d.equals(f):d===f})(function(d,f){return d[f]?d[f]:null}(a,mxConstants.STYLE_SHAPE),"mxgraph.lean_mapping.electronic_info_flow_edge")?c[mxConstants.STYLE_EDGE]=mxConstants.NONE:c[mxConstants.STYLE_EDGE]=mxConstants.EDGESTYLE_ELBOW;return c};b.prototype.getEdgeStyle=function(a){if(null!=a&&a instanceof Object||null===a)return this.getEdgeStyle$java_util_Map(a);if(void 0===a)return this.getEdgeStyle$();throw Error("invalid overload");};b.prototype.getMasterId=+function(){return this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER)?this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER):null};b.prototype.getShapeMasterId=function(){return this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE)?this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE):null};b.prototype.isGroup=function(){var a=(a=this.shape.getAttribute("Type"))&&a.equals?a.equals("Group"):"Group"===a;return a};b.getType=function(a){return a.getAttribute("Type")};+b.prototype.getMaster=function(){return this.master};b.prototype.getNameU=function(){var a=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||"",c;(c=null==a)||(c=(c=a)&&c.equals?c.equals(""):""===c);c&&null!=this.masterShape&&(a=this.masterShape.getNameU());return a};b.prototype.getName=function(){var a=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME),c;(c=null==a)||(c=(c=a)&&c.equals?c.equals(""):""===c);c&&null!=this.masterShape&&(a=this.masterShape.getName());return a};+b.prototype.getMasterName=function(){return this.shapeName};b.prototype.setLabelOffset=function(a,c){var d="",f="";this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(d=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));null!=this.getMaster()&&null!=this.getMaster().getMasterElement()&&this.getMaster().getMasterElement().hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(f=this.getMaster().getMasterElement().getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));if(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(d,"Organizational unit")||function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(f,"Organizational unit")){var k=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;d="0.0";f=null;f="-0.4";null!=k&&(d=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.hasAttribute("F")?d.getAttribute("F"):d.textContent,f=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),-f=f.hasAttribute("F")?f.getAttribute("F"):f.textContent);k=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");(function(A,C){return A&&A.equals?A.equals(C):A===C})(d,"Inh")&&(d="0.0");(function(A,C){return A&&A.equals?A.equals(C):A===C})(f,"Inh")&&(f="-0.4");-1!=f.indexOf("txtHeight")&&(f="-0.4");b=b.split(";");for(var n="",q=0;q<b.length;q++){var t=b[q];t=t.trim();(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C})(t,"tabHeight=")&&-(n=t.split("tabHeight=").join(""))}(function(A,C){return A&&A.equals?A.equals(C):A===C})(n,"")&&(n="20");b=parseFloat(n);d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f-b/2);a.getGeometry().offset=d}else if(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(d,"Domain 3D")||function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(f,"Domain 3D")){k=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;+f=f.hasAttribute("F")?f.getAttribute("F"):f.textContent);k=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");(function(A,C){return A&&A.equals?A.equals(C):A===C})(d,"Inh")&&(d="0.0");(function(A,C){return A&&A.equals?A.equals(C):A===C})(f,"Inh")&&(f="-0.4");-1!=f.indexOf("txtHeight")&&(f="-0.4");c=c.split(";");for(var n="",q=0;q<c.length;q++){var t=c[q];t=t.trim();(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C})(t,"tabHeight=")&&+(n=t.split("tabHeight=").join(""))}(function(A,C){return A&&A.equals?A.equals(C):A===C})(n,"")&&(n="20");c=parseFloat(n);d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f-c/2);a.getGeometry().offset=d}else if(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(d,"Domain 3D")||function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(f,"Domain 3D")){k=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;d="0.0";f=null;f="-0.4";null!=k&&(d=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.getAttribute("F")||"",f=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),f=f.getAttribute("F")||"");k=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");if(function(A,C){return A&&A.equals?A.equals(C):A===C}(d,"Inh")||function(A,C){return A&&A.equals?A.equals(C):A===C}(d,""))d="0.0";if(function(A,C){return A&&A.equals?A.equals(C):-A===C}(f,"Inh")||function(A,C){return A&&A.equals?A.equals(C):A===C}(f,""))f="-0.4";-1!=f.indexOf("txtHeight")&&(f="-0.4");d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f);a.getGeometry().offset=d}};c.prototype.getForm=function(){var a={};if(this.isVertex())try{var b=c.getType(this.getShape());this.styleDebug("shape type = "+b);if(null!=this.imageData||function(L,S){return L&&L.equals?L.equals(S):L===S}(g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN,b)&&null!=this.masterShape&&+A===C}(f,"Inh")||function(A,C){return A&&A.equals?A.equals(C):A===C}(f,""))f="-0.4";-1!=f.indexOf("txtHeight")&&(f="-0.4");d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f);a.getGeometry().offset=d}};b.prototype.getForm=function(){var a={};if(this.isVertex())try{var c=b.getType(this.getShape());this.styleDebug("shape type = "+c);if(null!=this.imageData||function(L,S){return L&&L.equals?L.equals(S):L===S}(g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN,c)&&null!=this.masterShape&&null!=this.masterShape.imageData){var d=null!=this.imageData?this.imageData:this.masterShape.imageData;a.shape="image";a.aspect="fixed";var f=function(L,S){return L[S]?L[S]:null}(d,"iType"),k=function(L,S){return L[S]?L[S]:null}(d,"iData"),n=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetX"),"0")),q=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetY"),"0")),t=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgWidth"),"0")),A=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgHeight"),"0")),C=parseFloat(this.getValue(this.getCellElement$java_lang_String("Width"),"0")),I=parseFloat(this.getValue(this.getCellElement$java_lang_String("Height"),"0"));0!=n||0!=q||t!=C||A!=I?this.toBeCroppedImg={imgOffsetX:n,imgOffsetY:q,imgWidth:t,imgHeight:A,width:C,height:I,iType:f,iData:k}:a.image="data:image/"+f+","+k;return a}var Q=this.parseGeom();if(function(L,S){return L&&L.equals?L.equals(S):L===S}(Q,""))return this.styleDebug("No geom found"),a;var K=Graph.compress(Q);a[mxConstants.STYLE_SHAPE]=-"stencil("+K+")"}catch(L){}else return this.getEdgeStyle();return a};c.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Off-page reference")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Lined/Shaded process")?!0:!1};c.prototype.isExternal_process=function(){var a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};c.prototype.getDirection=function(a){a=mxResources.get("mxOffset"+-this.shapeName);if(null!=a&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")){if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1"))return mxConstants.DIRECTION_SOUTH;if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"2"))return mxConstants.DIRECTION_WEST;if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"3"))return mxConstants.DIRECTION_NORTH}return mxConstants.DIRECTION_EAST};c.prototype.isSubproces=function(){var a=-(a=this.shapeName)&&a.equals?a.equals("Subproces"):"Subproces"===a;return a};c.prototype.getEdgeStyle$=function(){return{edgeStyle:"none"}};c.prototype.getChildShapes=function(){return this.childShapes};c.prototype.setChildShapes=function(a){this.childShapes=a};c.prototype.isDisplacedLabel=function(){var a=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F",""),b=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F",""),d=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,-"F",""),f=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","");if(null!=this.masterShape){if(""===a||function(k,n){return k&&k.equals?k.equals(n):k===n}(a.toLowerCase(),"inh"))a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F","");if(""===b||function(k,n){return k&&k.equals?k.equals(n):k===n}(b.toLowerCase(),"inh"))b=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F","");if(""===d||function(k,n){return k&&k.equals?k.equals(n):-k===n}(d.toLowerCase(),"inh"))d=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,"F","");if(""===f||function(k,n){return k&&k.equals?k.equals(n):k===n}(f.toLowerCase(),"inh"))f=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","")}return function(k,n){return k&&k.equals?k.equals(n):k===n}(a.toLowerCase(),"width*0.5")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(b.toLowerCase(),"height*0.5")&&function(k,n){return k&&k.equals?k.equals(n):-k===n}(d.toLowerCase(),"width*1")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f.toLowerCase(),"height*1")||!(function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(a.toLowerCase(),"width*")&&function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(b.toLowerCase(),"height*")&&function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(d.toLowerCase(),"width*")&&function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(f.toLowerCase(),"height*")||function(k,-n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(a.toLowerCase(),"controls.row_")||function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(b.toLowerCase(),"controls.row_"))?!1:!0};c.prototype.isVerticalLabel=function(){var a=this.getAttribute("TextDirection","V","");a||null==this.masterShape||(a=this.masterShape.getAttribute("TextDirection","V",""));return"1"==a};c.prototype.isRotatedLabel=function(){if(this.isVerticalLabel())return!0;var a=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,-"V","");null!=this.masterShape&&function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")&&(a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V",""));return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0.0")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")?!1:!0};c.prototype.setRootShape=function(a){this.rootShape=a};c.prototype.getRootShape=function(){return this.rootShape};c.prototype.getStartXY=-function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X),0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_Y),0)))/100);return new mxPoint(b,a)};c.prototype.getEndXY=function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_X),-0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_Y),0)))/100);return new mxPoint(b,a)};c.prototype.getRoutingPoints=function(a,b,d){return null!=this.geomList?this.geomList.getRoutingPoints(a,b,d):null};c.prototype.getControlPoints=function(a){var b=this.getStartXY(a);a=this.getEndXY(a);var d=[];if(null!=this.shape){var f=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.GEOM);-if(0<f.length&&(f=f.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0).getElementsByTagName("E").item(0),null!=f)){f=f.getAttribute("F")||"";f=f.replace(RegExp("NURBS\\(","g"),"");f=f.replace(RegExp("\\)","g"),"");f=f.replace(RegExp(",","g")," ");f=f.replace(RegExp("\\s\\s","g")," ");f=f.split(" ");for(var k=f.length,n=[];0<k--;)n.push(0);for(k=0;k<f.length;k++)n[k]=parseFloat(f[k]);for(k=2;k+4<f.length;k+=4){var q=new mxPoint,t=n[k+3];q.x=Math.floor(Math.round(100*(b.x+-Math.min(100,Math.abs(a.x-b.x))*n[k+2]))/100);q.y=Math.floor(Math.round(100*(b.y-100*t))/100);d.push(q)}return d}}return null};c.prototype.getStyleFromEdgeShape=function(a){this.styleMap[g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();a=this.getForm();if(null!=a&&!function(d,f){return d&&d.equals?d.equals(f):d===f}(a,""))for(var b in a)this.styleMap[b]=a[b];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",b=this.getDashPattern(),null!=b&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=-b));b=this.getEdgeMarker(!0);null!=b&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(b,c.ARROW_NO_FILL_MARKER)&&(b=b.substring(c.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_STARTFILL]="0"),this.styleMap[mxConstants.STYLE_STARTARROW]=b);b=this.getEdgeMarker(!1);null!=b&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(b,c.ARROW_NO_FILL_MARKER)&&(b=b.substring(c.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_ENDFILL]="0"),this.styleMap[mxConstants.STYLE_ENDARROW]=-b);b=Math.round(this.getStartArrowSize())|0;6!==b&&(this.styleMap[mxConstants.STYLE_STARTSIZE]=""+b);b=Math.round(this.getFinalArrowSize())|0;6!==b&&(this.styleMap[mxConstants.STYLE_ENDSIZE]=""+b);b=Math.round(this.getLineWidth())|0;1!==b&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+b);b=this.getStrokeColor();(function(d,f){return d&&d.equals?d.equals(f):d===f})(b,"")||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=b);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE);-this.isConnectorBigNameU(this.getNameU())&&(this.styleMap[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_ARROW,b=this.getFillColor(),function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"")||(this.styleMap[mxConstants.STYLE_FILLCOLOR]=b));b=Math.round(this.getTopSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+b;b=Math.round(this.getBottomSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+b;b=Math.round(this.getLeftSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+-b;b=Math.round(this.getRightSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+b;b=this.getAlignVertical();this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=b;this.styleMap.html="1";this.resolveCommonStyles();return this.styleMap};c.prototype.resolveCommonStyles=function(){var a=this.getTextBkgndColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND));var b=a&&a.equals?a.equals(""):""===a;b||"1"!=this.getValue(this.getCellElement$java_lang_String("TextBkgndTrans"),-"0")&&(this.styleMap[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]=a);this.styleMap[mxConstants.STYLE_ROUNDED]=0<this.getRounding()?g.mxgraph.io.vsdx.mxVsdxConstants.TRUE:g.mxgraph.io.vsdx.mxVsdxConstants.FALSE;return this.styleMap};c.prototype.getEdgeMarker=function(a){var b=this.getValue(this.getCellElement$java_lang_String(a?g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW:g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW),"0"),d=0;try{if(function(k,n){return k&&k.equals?k.equals(n):k===n}(b,"Themed")){var f=-this.getTheme();null!=f&&(d=this.isVertex()?f.getEdgeMarker(a,this.getQuickStyleVals()):f.getConnEdgeMarker(a,this.getQuickStyleVals()))}else d=parseInt(b)}catch(k){}a=function(k,n){null==k.entries&&(k.entries=[]);for(var q=0;q<k.entries.length;q++)if(null!=k.entries[q].key.equals&&k.entries[q].key.equals(n)||k.entries[q].key===n)return k.entries[q].value;return null}(c.arrowTypes_$LI$(),d);0<d&&null==a&&(a=function(k,n){null==k.entries&&(k.entries=[]);for(var q=0;q<k.entries.length;q++)if(null!=-k.entries[q].key.equals&&k.entries[q].key.equals(n)||k.entries[q].key===n)return k.entries[q].value;return null}(c.arrowTypes_$LI$(),1));return a};c.prototype.getCellElement$java_lang_String=function(a){var b=h.prototype.getCellElement$java_lang_String.call(this,a);return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):b};c.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(a,b,d){var f=h.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String.call(this,-a,b,d);return null==f&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,d):f};c.prototype.getCellElement=function(a,b,d){if("string"!==typeof a&&null!==a||"string"!==typeof b&&null!==b||"string"!==typeof d&&null!==d){if("string"!==typeof a&&null!==a||void 0!==b||void 0!==d)throw Error("invalid overload");return this.getCellElement$java_lang_String(a)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,d)};c.prototype.createLabelSubShape=-function(a,b){var d=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth()),f=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),d/2),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),+"stencil("+K+")"}catch(L){}else return this.getEdgeStyle();return a};b.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"Off-page reference")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"Lined/Shaded process")?!0:!1};b.prototype.isExternal_process=function(){var a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};b.prototype.getDirection=function(a){a=mxResources.get("mxOffset"++this.shapeName);if(null!=a&&!function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0")&&!function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"")){if(function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"1"))return mxConstants.DIRECTION_SOUTH;if(function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"2"))return mxConstants.DIRECTION_WEST;if(function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"3"))return mxConstants.DIRECTION_NORTH}return mxConstants.DIRECTION_EAST};b.prototype.isSubproces=function(){var a=+(a=this.shapeName)&&a.equals?a.equals("Subproces"):"Subproces"===a;return a};b.prototype.getEdgeStyle$=function(){return{edgeStyle:"none"}};b.prototype.getChildShapes=function(){return this.childShapes};b.prototype.setChildShapes=function(a){this.childShapes=a};b.prototype.isDisplacedLabel=function(){var a=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F",""),c=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F",""),d=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,+"F",""),f=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","");if(null!=this.masterShape){if(""===a||function(k,n){return k&&k.equals?k.equals(n):k===n}(a.toLowerCase(),"inh"))a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F","");if(""===c||function(k,n){return k&&k.equals?k.equals(n):k===n}(c.toLowerCase(),"inh"))c=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F","");if(""===d||function(k,n){return k&&k.equals?k.equals(n):+k===n}(d.toLowerCase(),"inh"))d=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,"F","");if(""===f||function(k,n){return k&&k.equals?k.equals(n):k===n}(f.toLowerCase(),"inh"))f=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","")}return function(k,n){return k&&k.equals?k.equals(n):k===n}(a.toLowerCase(),"width*0.5")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(c.toLowerCase(),"height*0.5")&&function(k,n){return k&&k.equals?k.equals(n):+k===n}(d.toLowerCase(),"width*1")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f.toLowerCase(),"height*1")||!(function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(a.toLowerCase(),"width*")&&function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(c.toLowerCase(),"height*")&&function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(d.toLowerCase(),"width*")&&function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(f.toLowerCase(),"height*")||function(k,+n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(a.toLowerCase(),"controls.row_")||function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(c.toLowerCase(),"controls.row_"))?!1:!0};b.prototype.isVerticalLabel=function(){var a=this.getAttribute("TextDirection","V","");a||null==this.masterShape||(a=this.masterShape.getAttribute("TextDirection","V",""));return"1"==a};b.prototype.isRotatedLabel=function(){if(this.isVerticalLabel())return!0;var a=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,+"V","");null!=this.masterShape&&function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"")&&(a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V",""));return function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0.0")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"")?!1:!0};b.prototype.setRootShape=function(a){this.rootShape=a};b.prototype.getRootShape=function(){return this.rootShape};b.prototype.getStartXY=+function(a){var c=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X),0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_Y),0)))/100);return new mxPoint(c,a)};b.prototype.getEndXY=function(a){var c=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_X),+0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_Y),0)))/100);return new mxPoint(c,a)};b.prototype.getRoutingPoints=function(a,c,d){return null!=this.geomList?this.geomList.getRoutingPoints(a,c,d):null};b.prototype.getControlPoints=function(a){var c=this.getStartXY(a);a=this.getEndXY(a);var d=[];if(null!=this.shape){var f=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.GEOM);+if(0<f.length&&(f=f.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0).getElementsByTagName("E").item(0),null!=f)){f=f.getAttribute("F")||"";f=f.replace(RegExp("NURBS\\(","g"),"");f=f.replace(RegExp("\\)","g"),"");f=f.replace(RegExp(",","g")," ");f=f.replace(RegExp("\\s\\s","g")," ");f=f.split(" ");for(var k=f.length,n=[];0<k--;)n.push(0);for(k=0;k<f.length;k++)n[k]=parseFloat(f[k]);for(k=2;k+4<f.length;k+=4){var q=new mxPoint,t=n[k+3];q.x=Math.floor(Math.round(100*(c.x++Math.min(100,Math.abs(a.x-c.x))*n[k+2]))/100);q.y=Math.floor(Math.round(100*(c.y-100*t))/100);d.push(q)}return d}}return null};b.prototype.getStyleFromEdgeShape=function(a){this.styleMap[g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();a=this.getForm();if(null!=a&&!function(d,f){return d&&d.equals?d.equals(f):d===f}(a,""))for(var c in a)this.styleMap[c]=a[c];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",c=this.getDashPattern(),null!=c&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=+c));c=this.getEdgeMarker(!0);null!=c&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(c,b.ARROW_NO_FILL_MARKER)&&(c=c.substring(b.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_STARTFILL]="0"),this.styleMap[mxConstants.STYLE_STARTARROW]=c);c=this.getEdgeMarker(!1);null!=c&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(c,b.ARROW_NO_FILL_MARKER)&&(c=c.substring(b.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_ENDFILL]="0"),this.styleMap[mxConstants.STYLE_ENDARROW]=+c);c=Math.round(this.getStartArrowSize())|0;6!==c&&(this.styleMap[mxConstants.STYLE_STARTSIZE]=""+c);c=Math.round(this.getFinalArrowSize())|0;6!==c&&(this.styleMap[mxConstants.STYLE_ENDSIZE]=""+c);c=Math.round(this.getLineWidth())|0;1!==c&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+c);c=this.getStrokeColor();(function(d,f){return d&&d.equals?d.equals(f):d===f})(c,"")||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=c);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE);+this.isConnectorBigNameU(this.getNameU())&&(this.styleMap[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_ARROW,c=this.getFillColor(),function(d,f){return d&&d.equals?d.equals(f):d===f}(c,"")||(this.styleMap[mxConstants.STYLE_FILLCOLOR]=c));c=Math.round(this.getTopSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+c;c=Math.round(this.getBottomSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+c;c=Math.round(this.getLeftSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""++c;c=Math.round(this.getRightSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+c;c=this.getAlignVertical();this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=c;this.styleMap.html="1";this.resolveCommonStyles();return this.styleMap};b.prototype.resolveCommonStyles=function(){var a=this.getTextBkgndColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND));var c=a&&a.equals?a.equals(""):""===a;c||"1"!=this.getValue(this.getCellElement$java_lang_String("TextBkgndTrans"),+"0")&&(this.styleMap[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]=a);this.styleMap[mxConstants.STYLE_ROUNDED]=0<this.getRounding()?g.mxgraph.io.vsdx.mxVsdxConstants.TRUE:g.mxgraph.io.vsdx.mxVsdxConstants.FALSE;return this.styleMap};b.prototype.getEdgeMarker=function(a){var c=this.getValue(this.getCellElement$java_lang_String(a?g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW:g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW),"0"),d=0;try{if(function(k,n){return k&&k.equals?k.equals(n):k===n}(c,"Themed")){var f=+this.getTheme();null!=f&&(d=this.isVertex()?f.getEdgeMarker(a,this.getQuickStyleVals()):f.getConnEdgeMarker(a,this.getQuickStyleVals()))}else d=parseInt(c)}catch(k){}a=function(k,n){null==k.entries&&(k.entries=[]);for(var q=0;q<k.entries.length;q++)if(null!=k.entries[q].key.equals&&k.entries[q].key.equals(n)||k.entries[q].key===n)return k.entries[q].value;return null}(b.arrowTypes_$LI$(),d);0<d&&null==a&&(a=function(k,n){null==k.entries&&(k.entries=[]);for(var q=0;q<k.entries.length;q++)if(null!=+k.entries[q].key.equals&&k.entries[q].key.equals(n)||k.entries[q].key===n)return k.entries[q].value;return null}(b.arrowTypes_$LI$(),1));return a};b.prototype.getCellElement$java_lang_String=function(a){var c=h.prototype.getCellElement$java_lang_String.call(this,a);return null==c&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):c};b.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(a,c,d){var f=h.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String.call(this,+a,c,d);return null==f&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,c,d):f};b.prototype.getCellElement=function(a,c,d){if("string"!==typeof a&&null!==a||"string"!==typeof c&&null!==c||"string"!==typeof d&&null!==d){if("string"!==typeof a&&null!==a||void 0!==c||void 0!==d)throw Error("invalid overload");return this.getCellElement$java_lang_String(a)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,c,d)};b.prototype.createLabelSubShape=+function(a,c){var d=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth()),f=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),d/2),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),f/2),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),k),t=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),n),A=this.getValueAsDouble(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),0),C=this.getTextLabel(1>d||1>f);if(null!=C&&0!==C.length){var I=mxUtils.clone(this.getStyleMap())||{};I[mxConstants.STYLE_FILLCOLOR]=mxConstants.NONE;I[mxConstants.STYLE_STROKECOLOR]=-mxConstants.NONE;I[mxConstants.STYLE_GRADIENTCOLOR]=mxConstants.NONE;I.hasOwnProperty("align")||(I.align="center");I.hasOwnProperty("verticalAlign")||(I.verticalAlign="middle");I.hasOwnProperty("whiteSpace")||(I.whiteSpace="wrap");delete I.shape;delete I.image;this.isVerticalLabel()&&(A+=Math.PI+.01,I.horizontal="0");var Q=this.getRotation();0!==A&&(A=360-180*A/Math.PI,A=Math.round((A+Q)%360*100)/100,0!==A&&(I.rotation=""+A));I="text;"+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(I,"=");n=b.getGeometry().height--(t+f-n);k=q-k;0<Q&&(q=new mxGeometry(k,n,d,f),k=b.getGeometry(),g.mxgraph.online.Utils.rotatedGeometry(q,Q,k.width/2,k.height/2),k=q.x,n=q.y);return a.insertVertex(b,null,C,Math.round(100*k)/100,Math.round(100*n)/100,Math.round(100*d)/100,Math.round(100*f)/100,I+";html=1;")}return null};c.prototype.getLblEdgeOffset=function(a,b){if(null!=b&&1<b.length){var d=new mxCellState;d.absolutePoints=b;a.updateEdgeBounds(d);a=a.getPoint(d);d=b[0];var f=b[b.length-1];b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),+mxConstants.NONE;I[mxConstants.STYLE_GRADIENTCOLOR]=mxConstants.NONE;I.hasOwnProperty("align")||(I.align="center");I.hasOwnProperty("verticalAlign")||(I.verticalAlign="middle");I.hasOwnProperty("whiteSpace")||(I.whiteSpace="wrap");delete I.shape;delete I.image;this.isVerticalLabel()&&(A+=Math.PI+.01,I.horizontal="0");var Q=this.getRotation();0!==A&&(A=360-180*A/Math.PI,A=Math.round((A+Q)%360*100)/100,0!==A&&(I.rotation=""+A));I="text;"+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(I,"=");n=c.getGeometry().height-+(t+f-n);k=q-k;0<Q&&(q=new mxGeometry(k,n,d,f),k=c.getGeometry(),g.mxgraph.online.Utils.rotatedGeometry(q,Q,k.width/2,k.height/2),k=q.x,n=q.y);return a.insertVertex(c,null,C,Math.round(100*k)/100,Math.round(100*n)/100,Math.round(100*d)/100,Math.round(100*f)/100,I+";html=1;")}return null};b.prototype.getLblEdgeOffset=function(a,c){if(null!=c&&1<c.length){var d=new mxCellState;d.absolutePoints=c;a.updateEdgeBounds(d);a=a.getPoint(d);d=c[0];var f=c[c.length-1];c=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth());var k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),0),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),0),t=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),-0),A=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),0);f=(this.getHeight()-(d.y-f.y))/2+d.y-a.y-(A-q+k/2);a=t-n+b/2+(d.x-a.x);return 1E11<Math.abs(a)?null:new mxPoint(Math.floor(Math.round(100*a)/100),Math.floor(Math.round(100*f)/100))}return null};c.prototype.getShapeIndex=function(){return this.shapeIndex};c.prototype.setShapeIndex=function(a){this.shapeIndex=a};return c}(g.mxgraph.io.vsdx.Shape);m.__static_initialized=!1;m.ARROW_NO_FILL_MARKER=+0),A=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),0);f=(this.getHeight()-(d.y-f.y))/2+d.y-a.y-(A-q+k/2);a=t-n+c/2+(d.x-a.x);return 1E11<Math.abs(a)?null:new mxPoint(Math.floor(Math.round(100*a)/100),Math.floor(Math.round(100*f)/100))}return null};b.prototype.getShapeIndex=function(){return this.shapeIndex};b.prototype.setShapeIndex=function(a){this.shapeIndex=a};return b}(g.mxgraph.io.vsdx.Shape);m.__static_initialized=!1;m.ARROW_NO_FILL_MARKER="0";m.maxDp=2;m.USE_SHAPE_MATCH=!1;m.stencilTemplate='<shape h="htemplate" w="wtemplate" aspect="variable" strokewidth="inherit"><connections></connections><background></background><foreground></foreground></shape>';B.VsdxShape=m;m.__class="com.mxgraph.io.vsdx.VsdxShape"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){var B=function(){function m(){}m.__static_initialize=function(){m.__static_initialized||(m.__static_initialized=!0,m.__static_initializer_0())};m.CA_$LI$=function(){m.__static_initialize();null==m.CA&&(m.CA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""));return m.CA};m.IA_$LI$=function(){m.__static_initialize();if(null==m.IA){for(var h=256,c=[];0<h--;)c.push(0);m.IA=c}return m.IA};m.__static_initializer_0=function(){for(var h=m.IA_$LI$(),-c=0;c<h.length;c++)h[c]=-1;h=0;for(c=m.CA_$LI$().length;h<c;h++)m.IA_$LI$()[m.CA_$LI$()[h].charCodeAt(0)]=h;m.IA_$LI$()[61]=0};m.encodeToChar=function(h,c,a){var b=null!=h?h.length-c:0;if(0===b)return[];var d=3*(b/3|0),f=((b-1)/3|0)+1<<2;f+=a?((f-1)/76|0)<<1:0;for(var k=Array(f),n=c,q=0,t=0;n<d+c;){var A=(h[n++]&255)<<16|(h[n++]&255)<<8|h[n++]&255;k[q++]=m.CA_$LI$()[A>>>18&63];k[q++]=m.CA_$LI$()[A>>>12&63];k[q++]=m.CA_$LI$()[A>>>6&63];k[q++]=m.CA_$LI$()[A&63];a&&19===++t&&q<f-2&&(k[q++]="\r",k[q++]=-"\n",t=0)}a=b-d;0<a&&(A=(h[d+c]&255)<<10|(2===a?(h[b+c-1]&255)<<2:0),k[f-4]=m.CA_$LI$()[A>>12],k[f-3]=m.CA_$LI$()[A>>>6&63],k[f-2]=2===a?m.CA_$LI$()[A&63]:"=",k[f-1]="=");return k};m.decode$char_A=function(h){var c=null!=h?h.length:0;if(0===c)return[];for(var a=0,b=0;b<c;b++)0>m.IA_$LI$()[h[b].charCodeAt(0)]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h[--b].charCodeAt(0)];)61==function(q){return null==q.charCodeAt?q:q.charCodeAt(0)}(h[b])&&d++;c=(6*(c-a)>>3)-d;a=function(q){for(var t=-[];0<q--;)t.push(0);return t}(c);for(var f=d=0;f<c;){for(var k=b=0;4>k;k++){var n=m.IA_$LI$()[h[d++].charCodeAt(0)];0<=n?b|=n<<18-6*k:k--}a[f++]=b>>16|0;f<c&&(a[f++]=b>>8|0,f<c&&(a[f++]=b|0))}return a};m.decode=function(h){if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"string"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decode$char_A(h);if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"number"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decode$byte_A(h);-if("string"===typeof h||null===h)return g.mxgraph.online.mxBase64.decode$java_lang_String(h);throw Error("invalid overload");};m.decodeFast$char_A=function(h){var c=h.length;if(0===c)return[];for(var a=0,b=c-1;a<b&&0>m.IA_$LI$()[h[a].charCodeAt(0)];)a++;for(;0<b&&0>m.IA_$LI$()[h[b].charCodeAt(0)];)b--;var d=61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h[b])?61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h[b-1])?2:1:0,f=b-a+1,k=76<c?(13==function(C){return null==C.charCodeAt?-C:C.charCodeAt(0)}(h[76])?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;c=function(C){for(var I=[];0<C--;)I.push(0);return I}(f);for(var n=0,q=0,t=3*(f/3|0);n<t;){var A=m.IA_$LI$()[h[a++].charCodeAt(0)]<<18|m.IA_$LI$()[h[a++].charCodeAt(0)]<<12|m.IA_$LI$()[h[a++].charCodeAt(0)]<<6|m.IA_$LI$()[h[a++].charCodeAt(0)];c[n++]=A>>16|0;c[n++]=A>>8|0;c[n++]=A|0;0<k&&19===++q&&(a+=2,q=0)}if(n<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h[a++].charCodeAt(0)]<<18-6*k;for(h=16;n<f;h-=8)c[n++]=A>>h|0}return c};m.decodeFast=function(h){if(null!=-h&&h instanceof Array&&(0==h.length||null==h[0]||"string"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decodeFast$char_A(h);if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"number"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decodeFast$byte_A(h);if("string"===typeof h||null===h)return g.mxgraph.online.mxBase64.decodeFast$java_lang_String(h);throw Error("invalid overload");};m.encodeToByte=function(h,c){var a=null!=h?h.length:0;if(0===a)return[];for(var b=3*(a/-3|0),d=((a-1)/3|0)+1<<2,f=d+=c?((d-1)/76|0)<<1:0,k=[];0<f--;)k.push(0);for(var n=0,q=0,t=0;n<b;)f=(h[n++]&255)<<16|(h[n++]&255)<<8|h[n++]&255,k[q++]=m.CA_$LI$()[f>>>18&63].charCodeAt(0),k[q++]=m.CA_$LI$()[f>>>12&63].charCodeAt(0),k[q++]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[q++]=m.CA_$LI$()[f&63].charCodeAt(0),c&&19===++t&&q<d-2&&(k[q++]=13,k[q++]=10,t=0);c=a-b;0<c&&(f=(h[b]&255)<<10|(2===c?(h[a-1]&255)<<2:0),k[d-4]=m.CA_$LI$()[f>>12].charCodeAt(0),k[d-3]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[d-2]=-2===c?m.CA_$LI$()[f&63].charCodeAt(0):61,k[d-1]=61);return k};m.decode$byte_A=function(h){for(var c=h.length,a=0,b=0;b<c;b++)0>m.IA_$LI$()[h[b]&255]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h[--b]&255];)61==h[b]&&d++;b=c=(6*(c-a)>>3)-d;for(a=[];0<b--;)a.push(0);for(var f=d=0;f<c;){for(var k=b=0;4>k;k++){var n=m.IA_$LI$()[h[d++]&255];0<=n?b|=n<<18-6*k:k--}a[f++]=b>>16|0;f<c&&(a[f++]=b>>8|0,f<c&&(a[f++]=b|0))}return a};m.decodeFast$byte_A=function(h){var c=h.length;if(0===-c)return[];for(var a=0,b=c-1;a<b&&0>m.IA_$LI$()[h[a]&255];)a++;for(;0<b&&0>m.IA_$LI$()[h[b]&255];)b--;var d=61==h[b]?61==h[b-1]?2:1:0,f=b-a+1,k=76<c?(13==h[76]?f/78|0:0)<<1:0,n=f=(6*(f-k)>>3)-d;for(c=[];0<n--;)c.push(0);for(var q=n=0,t=3*(f/3|0);n<t;){var A=m.IA_$LI$()[h[a++]]<<18|m.IA_$LI$()[h[a++]]<<12|m.IA_$LI$()[h[a++]]<<6|m.IA_$LI$()[h[a++]];c[n++]=A>>16|0;c[n++]=A>>8|0;c[n++]=A|0;0<k&&19===++q&&(a+=2,q=0)}if(n<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h[a++]]<<18-6*k;for(h=16;n<f;h-=8)c[n++]=A>>-h|0}return c};m.encodeToString=function(h,c,a){return m.encodeToChar(h,c,a).join("")};m.decode$java_lang_String=function(h){var c=null!=h?h.length:0;if(0===c)return[];for(var a=0,b=0;b<c;b++)0>m.IA_$LI$()[h.charAt(b).charCodeAt(0)]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h.charAt(--b).charCodeAt(0)];)61==function(q){return null==q.charCodeAt?q:q.charCodeAt(0)}(h.charAt(b))&&d++;c=(6*(c-a)>>3)-d;a=function(q){for(var t=[];0<q--;)t.push(0);return t}(c);for(var f=d=0;f<c;){for(var k=-b=0;4>k;k++){var n=m.IA_$LI$()[h.charAt(d++).charCodeAt(0)];0<=n?b|=n<<18-6*k:k--}a[f++]=b>>16|0;f<c&&(a[f++]=b>>8|0,f<c&&(a[f++]=b|0))}return a};m.decodeFast$java_lang_String=function(h){var c=h.length;if(0===c)return[];for(var a=0,b=c-1;a<b&&0>m.IA_$LI$()[function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(a))&255];)a++;for(;0<b&&0>m.IA_$LI$()[function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(b))&255];)b--;var d=61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(b))?-61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(b-1))?2:1:0,f=b-a+1,k=76<c?(13==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(76))?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;c=function(C){for(var I=[];0<C--;)I.push(0);return I}(f);for(var n=0,q=0,t=3*(f/3|0);n<t;){var A=m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<18|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<12|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<6|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)];c[n++]=A>>16|0;c[n++]=A>>-8|0;c[n++]=A|0;0<k&&19===++q&&(a+=2,q=0)}if(n<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<18-6*k;for(h=16;n<f;h-=8)c[n++]=A>>h|0}return c};return m}();B.__static_initialized=!1;z.mxBase64=B;B.__class="com.mxgraph.online.mxBase64"})(y.online||(y.online={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));com.mxgraph.online.mxBase64.IA_$LI$();com.mxgraph.online.mxBase64.CA_$LI$();com.mxgraph.online.mxBase64.__static_initialize();com.mxgraph.io.vsdx.VsdxShape.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$();+(function(g){(function(y){(function(z){var B=function(){function m(){}m.__static_initialize=function(){m.__static_initialized||(m.__static_initialized=!0,m.__static_initializer_0())};m.CA_$LI$=function(){m.__static_initialize();null==m.CA&&(m.CA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""));return m.CA};m.IA_$LI$=function(){m.__static_initialize();if(null==m.IA){for(var h=256,b=[];0<h--;)b.push(0);m.IA=b}return m.IA};m.__static_initializer_0=function(){for(var h=m.IA_$LI$(),+b=0;b<h.length;b++)h[b]=-1;h=0;for(b=m.CA_$LI$().length;h<b;h++)m.IA_$LI$()[m.CA_$LI$()[h].charCodeAt(0)]=h;m.IA_$LI$()[61]=0};m.encodeToChar=function(h,b,a){var c=null!=h?h.length-b:0;if(0===c)return[];var d=3*(c/3|0),f=((c-1)/3|0)+1<<2;f+=a?((f-1)/76|0)<<1:0;for(var k=Array(f),n=b,q=0,t=0;n<d+b;){var A=(h[n++]&255)<<16|(h[n++]&255)<<8|h[n++]&255;k[q++]=m.CA_$LI$()[A>>>18&63];k[q++]=m.CA_$LI$()[A>>>12&63];k[q++]=m.CA_$LI$()[A>>>6&63];k[q++]=m.CA_$LI$()[A&63];a&&19===++t&&q<f-2&&(k[q++]="\r",k[q++]=+"\n",t=0)}a=c-d;0<a&&(A=(h[d+b]&255)<<10|(2===a?(h[c+b-1]&255)<<2:0),k[f-4]=m.CA_$LI$()[A>>12],k[f-3]=m.CA_$LI$()[A>>>6&63],k[f-2]=2===a?m.CA_$LI$()[A&63]:"=",k[f-1]="=");return k};m.decode$char_A=function(h){var b=null!=h?h.length:0;if(0===b)return[];for(var a=0,c=0;c<b;c++)0>m.IA_$LI$()[h[c].charCodeAt(0)]&&a++;if(0!==(b-a)%4)return null;var d=0;for(c=b;1<c&&0>=m.IA_$LI$()[h[--c].charCodeAt(0)];)61==function(q){return null==q.charCodeAt?q:q.charCodeAt(0)}(h[c])&&d++;b=(6*(b-a)>>3)-d;a=function(q){for(var t=+[];0<q--;)t.push(0);return t}(b);for(var f=d=0;f<b;){for(var k=c=0;4>k;k++){var n=m.IA_$LI$()[h[d++].charCodeAt(0)];0<=n?c|=n<<18-6*k:k--}a[f++]=c>>16|0;f<b&&(a[f++]=c>>8|0,f<b&&(a[f++]=c|0))}return a};m.decode=function(h){if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"string"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decode$char_A(h);if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"number"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decode$byte_A(h);+if("string"===typeof h||null===h)return g.mxgraph.online.mxBase64.decode$java_lang_String(h);throw Error("invalid overload");};m.decodeFast$char_A=function(h){var b=h.length;if(0===b)return[];for(var a=0,c=b-1;a<c&&0>m.IA_$LI$()[h[a].charCodeAt(0)];)a++;for(;0<c&&0>m.IA_$LI$()[h[c].charCodeAt(0)];)c--;var d=61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h[c])?61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h[c-1])?2:1:0,f=c-a+1,k=76<b?(13==function(C){return null==C.charCodeAt?+C:C.charCodeAt(0)}(h[76])?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;b=function(C){for(var I=[];0<C--;)I.push(0);return I}(f);for(var n=0,q=0,t=3*(f/3|0);n<t;){var A=m.IA_$LI$()[h[a++].charCodeAt(0)]<<18|m.IA_$LI$()[h[a++].charCodeAt(0)]<<12|m.IA_$LI$()[h[a++].charCodeAt(0)]<<6|m.IA_$LI$()[h[a++].charCodeAt(0)];b[n++]=A>>16|0;b[n++]=A>>8|0;b[n++]=A|0;0<k&&19===++q&&(a+=2,q=0)}if(n<f){for(k=A=0;a<=c-d;k++)A|=m.IA_$LI$()[h[a++].charCodeAt(0)]<<18-6*k;for(h=16;n<f;h-=8)b[n++]=A>>h|0}return b};m.decodeFast=function(h){if(null!=+h&&h instanceof Array&&(0==h.length||null==h[0]||"string"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decodeFast$char_A(h);if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"number"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decodeFast$byte_A(h);if("string"===typeof h||null===h)return g.mxgraph.online.mxBase64.decodeFast$java_lang_String(h);throw Error("invalid overload");};m.encodeToByte=function(h,b){var a=null!=h?h.length:0;if(0===a)return[];for(var c=3*(a/+3|0),d=((a-1)/3|0)+1<<2,f=d+=b?((d-1)/76|0)<<1:0,k=[];0<f--;)k.push(0);for(var n=0,q=0,t=0;n<c;)f=(h[n++]&255)<<16|(h[n++]&255)<<8|h[n++]&255,k[q++]=m.CA_$LI$()[f>>>18&63].charCodeAt(0),k[q++]=m.CA_$LI$()[f>>>12&63].charCodeAt(0),k[q++]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[q++]=m.CA_$LI$()[f&63].charCodeAt(0),b&&19===++t&&q<d-2&&(k[q++]=13,k[q++]=10,t=0);b=a-c;0<b&&(f=(h[c]&255)<<10|(2===b?(h[a-1]&255)<<2:0),k[d-4]=m.CA_$LI$()[f>>12].charCodeAt(0),k[d-3]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[d-2]=+2===b?m.CA_$LI$()[f&63].charCodeAt(0):61,k[d-1]=61);return k};m.decode$byte_A=function(h){for(var b=h.length,a=0,c=0;c<b;c++)0>m.IA_$LI$()[h[c]&255]&&a++;if(0!==(b-a)%4)return null;var d=0;for(c=b;1<c&&0>=m.IA_$LI$()[h[--c]&255];)61==h[c]&&d++;c=b=(6*(b-a)>>3)-d;for(a=[];0<c--;)a.push(0);for(var f=d=0;f<b;){for(var k=c=0;4>k;k++){var n=m.IA_$LI$()[h[d++]&255];0<=n?c|=n<<18-6*k:k--}a[f++]=c>>16|0;f<b&&(a[f++]=c>>8|0,f<b&&(a[f++]=c|0))}return a};m.decodeFast$byte_A=function(h){var b=h.length;if(0===+b)return[];for(var a=0,c=b-1;a<c&&0>m.IA_$LI$()[h[a]&255];)a++;for(;0<c&&0>m.IA_$LI$()[h[c]&255];)c--;var d=61==h[c]?61==h[c-1]?2:1:0,f=c-a+1,k=76<b?(13==h[76]?f/78|0:0)<<1:0,n=f=(6*(f-k)>>3)-d;for(b=[];0<n--;)b.push(0);for(var q=n=0,t=3*(f/3|0);n<t;){var A=m.IA_$LI$()[h[a++]]<<18|m.IA_$LI$()[h[a++]]<<12|m.IA_$LI$()[h[a++]]<<6|m.IA_$LI$()[h[a++]];b[n++]=A>>16|0;b[n++]=A>>8|0;b[n++]=A|0;0<k&&19===++q&&(a+=2,q=0)}if(n<f){for(k=A=0;a<=c-d;k++)A|=m.IA_$LI$()[h[a++]]<<18-6*k;for(h=16;n<f;h-=8)b[n++]=A>>+h|0}return b};m.encodeToString=function(h,b,a){return m.encodeToChar(h,b,a).join("")};m.decode$java_lang_String=function(h){var b=null!=h?h.length:0;if(0===b)return[];for(var a=0,c=0;c<b;c++)0>m.IA_$LI$()[h.charAt(c).charCodeAt(0)]&&a++;if(0!==(b-a)%4)return null;var d=0;for(c=b;1<c&&0>=m.IA_$LI$()[h.charAt(--c).charCodeAt(0)];)61==function(q){return null==q.charCodeAt?q:q.charCodeAt(0)}(h.charAt(c))&&d++;b=(6*(b-a)>>3)-d;a=function(q){for(var t=[];0<q--;)t.push(0);return t}(b);for(var f=d=0;f<b;){for(var k=+c=0;4>k;k++){var n=m.IA_$LI$()[h.charAt(d++).charCodeAt(0)];0<=n?c|=n<<18-6*k:k--}a[f++]=c>>16|0;f<b&&(a[f++]=c>>8|0,f<b&&(a[f++]=c|0))}return a};m.decodeFast$java_lang_String=function(h){var b=h.length;if(0===b)return[];for(var a=0,c=b-1;a<c&&0>m.IA_$LI$()[function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(a))&255];)a++;for(;0<c&&0>m.IA_$LI$()[function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(c))&255];)c--;var d=61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(c))?+61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(c-1))?2:1:0,f=c-a+1,k=76<b?(13==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(76))?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;b=function(C){for(var I=[];0<C--;)I.push(0);return I}(f);for(var n=0,q=0,t=3*(f/3|0);n<t;){var A=m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<18|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<12|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<6|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)];b[n++]=A>>16|0;b[n++]=A>>+8|0;b[n++]=A|0;0<k&&19===++q&&(a+=2,q=0)}if(n<f){for(k=A=0;a<=c-d;k++)A|=m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<18-6*k;for(h=16;n<f;h-=8)b[n++]=A>>h|0}return b};return m}();B.__static_initialized=!1;z.mxBase64=B;B.__class="com.mxgraph.online.mxBase64"})(y.online||(y.online={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));com.mxgraph.online.mxBase64.IA_$LI$();com.mxgraph.online.mxBase64.CA_$LI$();com.mxgraph.online.mxBase64.__static_initialize();com.mxgraph.io.vsdx.VsdxShape.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$();com.mxgraph.io.vsdx.VsdxShape.arrowTypes_$LI$();com.mxgraph.io.vsdx.VsdxShape.arrowSizes_$LI$();com.mxgraph.io.vsdx.VsdxShape.OFFSET_ARRAY_$LI$();com.mxgraph.io.vsdx.VsdxShape.__static_initialize();com.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP_$LI$();com.mxgraph.io.vsdx.Style.lineDashPatterns_$LI$();com.mxgraph.io.vsdx.Style.styleTypes_$LI$();com.mxgraph.io.vsdx.Style.__static_initialize();com.mxgraph.online.Constants.MAX_AREA_$LI$();com.mxgraph.io.vsdx.theme.Color.NONE_$LI$();com.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.colorIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.themesIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.__static_initialize();com.mxgraph.io.vsdx.mxVsdxConstants.MY_SET_$LI$();com.mxgraph.io.vsdx.mxVsdxConstants.SET_VALUES_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.defaultColors_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.__static_initialize();com.mxgraph.io.mxVsdxCodec.vsdxPlaceholder_$LI$();com.mxgraph.io.mxVsdxCodec.parsererrorNS_$LI$();EditorUi.prototype.doImportVisio=function(g,y,z,B){B=B||g.name;null!=B&&/(\.vs(x|sx?))($|\?)/i.test(B)?(new com.mxgraph.io.mxVssxCodec(this)).decodeVssx(g,y,null,z):(new com.mxgraph.io.mxVsdxCodec(this)).decodeVsdx(g,y,null,z)};function mxGraphMlCodec(){this.cachedRefObj={}}mxGraphMlCodec.prototype.refRegexp=/^\{y:GraphMLReference\s+(\d+)\}$/;mxGraphMlCodec.prototype.staticRegexp=/^\{x:Static\s+(.+)\.(.+)\}$/;-mxGraphMlCodec.prototype.decode=function(g,y,z){try{var B=mxUtils.parseXml(g),m=this.getDirectChildNamedElements(B.documentElement,mxGraphMlConstants.GRAPH);this.initializeKeys(B.documentElement);g='<?xml version="1.0" encoding="UTF-8"?><mxfile>';for(B=0;B<m.length;B++){var h=m[B],c=this.createMxGraph(),a=c.getModel();a.beginUpdate();try{for(this.nodesMap={},this.edges=[],this.importGraph(h,c,c.getDefaultParent()),B=0;B<this.edges.length;B++)for(var b=this.edges[B],d=b.edges,f=b.parent,k=b.dx,n=b.dy,-q=0;q<d.length;q++)this.importEdge(d[q],c,f,k,n)}catch(ca){throw console.log(ca),ca;}finally{a.endUpdate()}a.beginUpdate();try{var t=c.getModel().cells,A;for(A in t){var C=t[A];if(C.edge&&0<C.getChildCount())for(B=0;B<C.getChildCount();B++){var I=C.children[B].geometry;if(I.adjustIt){var Q=c.view.getState(C),K=Q.absolutePoints,L=K[0],S=K[K.length-1],R=I.x,H=I.y;k=S.x-L.x;n=S.y-L.y;var N=L.x+R*k,J=L.y+R*n,M=Math.sqrt(k*k+n*n);k/=M;n/=M;N-=H*n;J+=H*k;var T=c.view.getRelativePoint(Q,N,J);I.x=T.x;I.y=-T.y}}}}catch(ca){throw console.log(ca),ca;}finally{a.endUpdate()}g+=this.processPage(c,B+1)}y&&y(g+"</mxfile>")}catch(ca){z&&z(ca)}};+mxGraphMlCodec.prototype.decode=function(g,y,z){try{var B=mxUtils.parseXml(g),m=this.getDirectChildNamedElements(B.documentElement,mxGraphMlConstants.GRAPH);this.initializeKeys(B.documentElement);g='<?xml version="1.0" encoding="UTF-8"?><mxfile>';for(B=0;B<m.length;B++){var h=m[B],b=this.createMxGraph(),a=b.getModel();a.beginUpdate();try{for(this.nodesMap={},this.edges=[],this.importGraph(h,b,b.getDefaultParent()),B=0;B<this.edges.length;B++)for(var c=this.edges[B],d=c.edges,f=c.parent,k=c.dx,n=c.dy,+q=0;q<d.length;q++)this.importEdge(d[q],b,f,k,n)}catch(ca){throw console.log(ca),ca;}finally{a.endUpdate()}a.beginUpdate();try{var t=b.getModel().cells,A;for(A in t){var C=t[A];if(C.edge&&0<C.getChildCount())for(B=0;B<C.getChildCount();B++){var I=C.children[B].geometry;if(I.adjustIt){var Q=b.view.getState(C),K=Q.absolutePoints,L=K[0],S=K[K.length-1],R=I.x,H=I.y;k=S.x-L.x;n=S.y-L.y;var N=L.x+R*k,J=L.y+R*n,M=Math.sqrt(k*k+n*n);k/=M;n/=M;N-=H*n;J+=H*k;var T=b.view.getRelativePoint(Q,N,J);I.x=T.x;I.y=+T.y}}}}catch(ca){throw console.log(ca),ca;}finally{a.endUpdate()}g+=this.processPage(b,B+1)}y&&y(g+"</mxfile>")}catch(ca){z&&z(ca)}};mxGraphMlCodec.prototype.initializeKeys=function(g){var y=this.getDirectChildNamedElements(g,mxGraphMlConstants.KEY);this.nodesKeys={};this.edgesKeys={};this.portsKeys={};this.sharedData={};this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY]={};this.nodesKeys[mxGraphMlConstants.USER_TAGS]={};this.nodesKeys[mxGraphMlConstants.NODE_STYLE]={};this.nodesKeys[mxGraphMlConstants.NODE_LABELS]={};this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS]={};this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY]={};this.edgesKeys[mxGraphMlConstants.EDGE_STYLE]=-{};this.edgesKeys[mxGraphMlConstants.EDGE_LABELS]={};this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER]={};this.portsKeys[mxGraphMlConstants.PORT_STYLE]={};this.portsKeys[mxGraphMlConstants.PORT_VIEW_STATE]={};for(var z,B=0;B<y.length;B++){var m=this.dataElem2Obj(y[B]),h=m[mxGraphMlConstants.ID],c=m[mxGraphMlConstants.KEY_FOR],a=m[mxGraphMlConstants.KEY_NAME],b=m[mxGraphMlConstants.KEY_YTYPE];a==mxGraphMlConstants.SHARED_DATA&&(z=h);a=a?a:b;switch(c){case mxGraphMlConstants.NODE:this.nodesKeys[a]=-{key:h,keyObj:m};break;case mxGraphMlConstants.EDGE:this.edgesKeys[a]={key:h,keyObj:m};break;case mxGraphMlConstants.PORT:this.portsKeys[a]={key:h,keyObj:m};break;case mxGraphMlConstants.ALL:m={key:h,keyObj:m},this.nodesKeys[a]=m,this.edgesKeys[a]=m,this.portsKeys[a]=m}}g=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA);for(B=0;B<g.length;B++)if(g[B].getAttribute(mxGraphMlConstants.KEY)==z)for(c=this.getDirectChildNamedElements(g[B],mxGraphMlConstants.Y_SHARED_DATA),y=0;y<c.length;y++)for(a=-this.getDirectChildElements(c[y]),m=0;m<a.length;m++)h=a[m].getAttribute(mxGraphMlConstants.X_KEY),this.sharedData[h]=a[m];else for(c=this.getDirectChildNamedElements(g[B],mxGraphMlConstants.Y_RESOURCES),y=0;y<c.length;y++)for(a=this.getDirectChildElements(c[y]),m=0;m<a.length;m++)h=a[m].getAttribute(mxGraphMlConstants.ID),this.sharedData[h]=a[m]};+{};this.edgesKeys[mxGraphMlConstants.EDGE_LABELS]={};this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER]={};this.portsKeys[mxGraphMlConstants.PORT_STYLE]={};this.portsKeys[mxGraphMlConstants.PORT_VIEW_STATE]={};for(var z,B=0;B<y.length;B++){var m=this.dataElem2Obj(y[B]),h=m[mxGraphMlConstants.ID],b=m[mxGraphMlConstants.KEY_FOR],a=m[mxGraphMlConstants.KEY_NAME],c=m[mxGraphMlConstants.KEY_YTYPE];a==mxGraphMlConstants.SHARED_DATA&&(z=h);a=a?a:c;switch(b){case mxGraphMlConstants.NODE:this.nodesKeys[a]=+{key:h,keyObj:m};break;case mxGraphMlConstants.EDGE:this.edgesKeys[a]={key:h,keyObj:m};break;case mxGraphMlConstants.PORT:this.portsKeys[a]={key:h,keyObj:m};break;case mxGraphMlConstants.ALL:m={key:h,keyObj:m},this.nodesKeys[a]=m,this.edgesKeys[a]=m,this.portsKeys[a]=m}}g=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA);for(B=0;B<g.length;B++)if(g[B].getAttribute(mxGraphMlConstants.KEY)==z)for(b=this.getDirectChildNamedElements(g[B],mxGraphMlConstants.Y_SHARED_DATA),y=0;y<b.length;y++)for(a=+this.getDirectChildElements(b[y]),m=0;m<a.length;m++)h=a[m].getAttribute(mxGraphMlConstants.X_KEY),this.sharedData[h]=a[m];else for(b=this.getDirectChildNamedElements(g[B],mxGraphMlConstants.Y_RESOURCES),y=0;y<b.length;y++)for(a=this.getDirectChildElements(b[y]),m=0;m<a.length;m++)h=a[m].getAttribute(mxGraphMlConstants.ID),this.sharedData[h]=a[m]};mxGraphMlCodec.prototype.parseAttributes=function(g,y){if(g=g.attributes)for(var z=0;z<g.length;z++){var B=g[z].nodeValue,m=this.refRegexp.exec(B),h=this.staticRegexp.exec(B);m?(B=m[1],m=this.cachedRefObj[B],m||(m={},m[this.sharedData[B].nodeName]=this.dataElem2Obj(this.sharedData[B]),this.cachedRefObj[B]=m),y[g[z].nodeName]=m):h?(y[g[z].nodeName]={},y[g[z].nodeName][h[1]]=h[2]):y[g[z].nodeName]=B}};-mxGraphMlCodec.prototype.dataElem2Obj=function(g){var y=this.getDirectFirstChildNamedElements(g,mxGraphMlConstants.GRAPHML_REFERENCE)||g.getAttribute(mxGraphMlConstants.REFID),z=null,B=g,m={};if(y){z="string"===typeof y?y:y.getAttribute(mxGraphMlConstants.RESOURCE_KEY);if(y=this.cachedRefObj[z])return this.parseAttributes(g,y),y;g=this.sharedData[z]}this.parseAttributes(g,m);for(y=0;y<g.childNodes.length;y++){var h=g.childNodes[y];if(1==h.nodeType){var c=h.nodeName;if(c==mxGraphMlConstants.X_LIST){var a=-[];h=this.getDirectChildElements(h);for(var b=0;b<h.length;b++)c=h[b].nodeName,a.push(this.dataElem2Obj(h[b]));m[c]=a}else c==mxGraphMlConstants.X_STATIC?(c=h.getAttribute(mxGraphMlConstants.MEMBER),a=c.lastIndexOf("."),m[c.substr(0,a)]=c.substr(a+1)):(a=c.lastIndexOf("."),0<a&&(c=c.substr(a+1)),null!=m[c]?(m[c]instanceof Array||(m[c]=[m[c]]),m[c].push(this.dataElem2Obj(h))):m[c]=this.dataElem2Obj(h))}else 3!=h.nodeType&&4!=h.nodeType||!h.textContent.trim()||(m["#text"]=h.textContent)}return z?(g=+mxGraphMlCodec.prototype.dataElem2Obj=function(g){var y=this.getDirectFirstChildNamedElements(g,mxGraphMlConstants.GRAPHML_REFERENCE)||g.getAttribute(mxGraphMlConstants.REFID),z=null,B=g,m={};if(y){z="string"===typeof y?y:y.getAttribute(mxGraphMlConstants.RESOURCE_KEY);if(y=this.cachedRefObj[z])return this.parseAttributes(g,y),y;g=this.sharedData[z]}this.parseAttributes(g,m);for(y=0;y<g.childNodes.length;y++){var h=g.childNodes[y];if(1==h.nodeType){var b=h.nodeName;if(b==mxGraphMlConstants.X_LIST){var a=+[];h=this.getDirectChildElements(h);for(var c=0;c<h.length;c++)b=h[c].nodeName,a.push(this.dataElem2Obj(h[c]));m[b]=a}else b==mxGraphMlConstants.X_STATIC?(b=h.getAttribute(mxGraphMlConstants.MEMBER),a=b.lastIndexOf("."),m[b.substr(0,a)]=b.substr(a+1)):(a=b.lastIndexOf("."),0<a&&(b=b.substr(a+1)),null!=m[b]?(m[b]instanceof Array||(m[b]=[m[b]]),m[b].push(this.dataElem2Obj(h))):m[b]=this.dataElem2Obj(h))}else 3!=h.nodeType&&4!=h.nodeType||!h.textContent.trim()||(m["#text"]=h.textContent)}return z?(g={},this.parseAttributes(B,g),g[this.sharedData[z].nodeName]=m,this.cachedRefObj[z]=g):m};mxGraphMlCodec.prototype.mapArray=function(g,y,z){for(var B={},m=0;m<g.length;m++)g[m].name&&(B[g[m].name]=g[m].value||g[m]);this.mapObject(B,y,z)};-mxGraphMlCodec.prototype.mapObject=function(g,y,z){if(y.defaults)for(var B in y.defaults)z[B]=y.defaults[B];for(B in y){for(var m=B.split("."),h=g,c=0;c<m.length&&h;c++)h=h[m[c]];null==h&&g&&(h=g[B]);if(null!=h)if(m=y[B],"string"===typeof h)if("string"===typeof m)z[m]=h.toLowerCase();else if("object"===typeof m){c=h.toLowerCase();switch(m.mod){case "color":0==h.indexOf("#")&&9==h.length?c="#"+h.substr(3)+h.substr(1,2):"TRANSPARENT"==h&&(c="none");break;case "shape":c=mxGraphMlShapesMap[h.toLowerCase()];-break;case "bpmnOutline":c=mxGraphMlShapesMap.bpmnOutline[h.toLowerCase()];break;case "bpmnSymbol":c=mxGraphMlShapesMap.bpmnSymbol[h.toLowerCase()];break;case "bool":c="true"==h?"1":"0";break;case "scale":try{c=parseFloat(h)*m.scale}catch(a){}break;case "arrow":c=mxGraphMlArrowsMap[h]}null!=c&&(z[m.key]=c)}else m(h,z);else h instanceof Array?this.mapArray(h,m,z):null!=h.name&&null!=h.value?this.mapArray([h],m,z):this.mapObject(h,m,z)}};mxGraphMlCodec.prototype.createMxGraph=function(){return new mxGraph};-mxGraphMlCodec.prototype.importGraph=function(g,y,z){for(var B=this.getDirectChildNamedElements(g,mxGraphMlConstants.NODE),m=z,h=0,c=0;m&&m.geometry;)h+=m.geometry.x,c+=m.geometry.y,m=m.parent;for(m=0;m<B.length;m++)this.importNode(B[m],y,z,h,c);this.edges.push({edges:this.getDirectChildNamedElements(g,mxGraphMlConstants.EDGE),parent:z,dx:h,dy:c})};-mxGraphMlCodec.prototype.importPort=function(g,y){var z=g.getAttribute(mxGraphMlConstants.PORT_NAME),B={};g=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA);for(var m=0;m<g.length;m++){var h=g[m];h.getAttribute(mxGraphMlConstants.KEY);h=this.dataElem2Obj(h);h.key==this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER].key&&this.mapObject(h,{"y:FreeNodePortLocationModelParameter.Ratio":function(c,a){c=c.split(",");a.pos={x:c[0],y:c[1]}}},B)}y[z]=B};+mxGraphMlCodec.prototype.mapObject=function(g,y,z){if(y.defaults)for(var B in y.defaults)z[B]=y.defaults[B];for(B in y){for(var m=B.split("."),h=g,b=0;b<m.length&&h;b++)h=h[m[b]];null==h&&g&&(h=g[B]);if(null!=h)if(m=y[B],"string"===typeof h)if("string"===typeof m)z[m]=h.toLowerCase();else if("object"===typeof m){b=h.toLowerCase();switch(m.mod){case "color":0==h.indexOf("#")&&9==h.length?b="#"+h.substr(3)+h.substr(1,2):"TRANSPARENT"==h&&(b="none");break;case "shape":b=mxGraphMlShapesMap[h.toLowerCase()];+break;case "bpmnOutline":b=mxGraphMlShapesMap.bpmnOutline[h.toLowerCase()];break;case "bpmnSymbol":b=mxGraphMlShapesMap.bpmnSymbol[h.toLowerCase()];break;case "bool":b="true"==h?"1":"0";break;case "scale":try{b=parseFloat(h)*m.scale}catch(a){}break;case "arrow":b=mxGraphMlArrowsMap[h]}null!=b&&(z[m.key]=b)}else m(h,z);else h instanceof Array?this.mapArray(h,m,z):null!=h.name&&null!=h.value?this.mapArray([h],m,z):this.mapObject(h,m,z)}};mxGraphMlCodec.prototype.createMxGraph=function(){return new mxGraph};+mxGraphMlCodec.prototype.importGraph=function(g,y,z){for(var B=this.getDirectChildNamedElements(g,mxGraphMlConstants.NODE),m=z,h=0,b=0;m&&m.geometry;)h+=m.geometry.x,b+=m.geometry.y,m=m.parent;for(m=0;m<B.length;m++)this.importNode(B[m],y,z,h,b);this.edges.push({edges:this.getDirectChildNamedElements(g,mxGraphMlConstants.EDGE),parent:z,dx:h,dy:b})};+mxGraphMlCodec.prototype.importPort=function(g,y){var z=g.getAttribute(mxGraphMlConstants.PORT_NAME),B={};g=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA);for(var m=0;m<g.length;m++){var h=g[m];h.getAttribute(mxGraphMlConstants.KEY);h=this.dataElem2Obj(h);h.key==this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER].key&&this.mapObject(h,{"y:FreeNodePortLocationModelParameter.Ratio":function(b,a){b=b.split(",");a.pos={x:b[0],y:b[1]}}},B)}y[z]=B};mxGraphMlCodec.prototype.styleMap2Str=function(g){var y="",z="",B;for(B in g)z+=y+B+"="+g[B],y=";";return z};-mxGraphMlCodec.prototype.importNode=function(g,y,z,B,m){var h=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA),c=g.getAttribute(mxGraphMlConstants.ID),a=new mxCell;a.vertex=!0;a.geometry=new mxGeometry(0,0,30,30);y.addCell(a,z);z={graphMlID:c};for(var b=null,d=null,f=null,k=null,n=0;n<h.length;n++){var q=this.dataElem2Obj(h[n]);if(q.key)if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY].key)this.addNodeGeo(a,q,B,m);else if(q.key==this.nodesKeys[mxGraphMlConstants.USER_TAGS].key)f=-q;else if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_STYLE].key)b=q,q["yjs:StringTemplateNodeStyle"]?d=q["yjs:StringTemplateNodeStyle"]["#text"]:this.addNodeStyle(a,q,z);else if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_LABELS].key)k=q;else if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS].key){var t=b=null;for(t in q)if("key"!=t&&"#text"!=t){if("y:ProxyAutoBoundsNode"==t){if(t=q[t]["y:Realizers"])for(var A in t)if("active"!=A&&"#text"!=A){b=t[A][t.active];q={};q[A]=b;break}}else b=-q[t];break}b&&(b[mxGraphMlConstants.GEOMETRY]&&this.addNodeGeo(a,b[mxGraphMlConstants.GEOMETRY],B,m),b[mxGraphMlConstants.NODE_LABEL]&&(k=b[mxGraphMlConstants.NODE_LABEL]));b=q;this.addNodeStyle(a,q,z)}}m=this.getDirectChildNamedElements(g,mxGraphMlConstants.PORT);B={};for(n=0;n<m.length;n++)this.importPort(m[n],B);d&&this.handleTemplates(d,f,a,z);this.handleFixedRatio(a,z);this.handleCompoundShape(a,z,b,null);0==z.strokeWidth&&(z.strokeColor="none");a.style=this.styleMap2Str(z);g=this.getDirectChildNamedElements(g,-mxGraphMlConstants.GRAPH);for(n=0;n<g.length;n++)this.importGraph(g[n],y,a,B);k&&this.addLabels(a,k,z,y);this.nodesMap[c]={node:a,ports:B}};+mxGraphMlCodec.prototype.importNode=function(g,y,z,B,m){var h=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA),b=g.getAttribute(mxGraphMlConstants.ID),a=new mxCell;a.vertex=!0;a.geometry=new mxGeometry(0,0,30,30);y.addCell(a,z);z={graphMlID:b};for(var c=null,d=null,f=null,k=null,n=0;n<h.length;n++){var q=this.dataElem2Obj(h[n]);if(q.key)if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY].key)this.addNodeGeo(a,q,B,m);else if(q.key==this.nodesKeys[mxGraphMlConstants.USER_TAGS].key)f=+q;else if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_STYLE].key)c=q,q["yjs:StringTemplateNodeStyle"]?d=q["yjs:StringTemplateNodeStyle"]["#text"]:this.addNodeStyle(a,q,z);else if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_LABELS].key)k=q;else if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS].key){var t=c=null;for(t in q)if("key"!=t&&"#text"!=t){if("y:ProxyAutoBoundsNode"==t){if(t=q[t]["y:Realizers"])for(var A in t)if("active"!=A&&"#text"!=A){c=t[A][t.active];q={};q[A]=c;break}}else c=+q[t];break}c&&(c[mxGraphMlConstants.GEOMETRY]&&this.addNodeGeo(a,c[mxGraphMlConstants.GEOMETRY],B,m),c[mxGraphMlConstants.NODE_LABEL]&&(k=c[mxGraphMlConstants.NODE_LABEL]));c=q;this.addNodeStyle(a,q,z)}}m=this.getDirectChildNamedElements(g,mxGraphMlConstants.PORT);B={};for(n=0;n<m.length;n++)this.importPort(m[n],B);d&&this.handleTemplates(d,f,a,z);this.handleFixedRatio(a,z);this.handleCompoundShape(a,z,c,null);0==z.strokeWidth&&(z.strokeColor="none");a.style=this.styleMap2Str(z);g=this.getDirectChildNamedElements(g,+mxGraphMlConstants.GRAPH);for(n=0;n<g.length;n++)this.importGraph(g[n],y,a,B);k&&this.addLabels(a,k,z,y);this.nodesMap[b]={node:a,ports:B}};mxGraphMlCodec.prototype.addNodeStyle=function(g,y,z){g=function(R,H){if("line"!=R){H.dashed=1;switch(R){case "DashDot":R="3 1 1 1";break;case "Dot":R="1 1";break;case "DashDotDot":R="3 1 1 1 1 1";break;case "Dash":R="3 1";break;case "dotted":R="1 3";break;case "dashed":R="5 2";break;default:R=R.replace(/0/g,"1")}R&&(0>R.indexOf(" ")&&(R=R+" "+R),H.dashPattern=R)}};g={shape:{key:"shape",mod:"shape"},"y:Shape.type":{key:"shape",mod:"shape"},configuration:{key:"shape",mod:"shape"},type:{key:"shape",mod:"shape"},assetName:{key:"shape",mod:"shape"},activityType:{key:"shape",mod:"shape"},fill:{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"y:Fill":{color:{key:"fillColor",mod:"color"},transparent:function(R,H){"true"==R&&(H.fillColor="none")}},"y:BorderStyle":{color:{key:"strokeColor",mod:"color"},width:"strokeWidth",hasColor:function(R,H){"false"==R&&(H.strokeColor="none")},type:g},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:g,"dashStyle.yjs:DashStyle.dashes":g,fill:{key:"strokeColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"strokeColor",mod:"color"},"thickness.sys:Double":"strokeWidth",thickness:"strokeWidth"}};var B=mxUtils.clone(g);B.defaults={fillColor:"#CCCCCC",strokeColor:"#6881B3"};var m=mxUtils.clone(g);m.defaults={shape:"ext;rounded=1",fillColor:"#FFFFFF",strokeColor:"#000090"};var h=mxUtils.clone(g);h.defaults={shape:"rhombus;fillColor=#FFFFFF;strokeColor=#FFCD28"};-var c=mxUtils.clone(g);c.defaults={shape:"hexagon",strokeColor:"#007000"};var a=mxUtils.clone(g);a.defaults={shape:"mxgraph.bpmn.shape;perimeter=ellipsePerimeter;symbol=general",outline:"standard"};a.characteristic={key:"outline",mod:"bpmnOutline"};var b=mxUtils.clone(g);b.defaults={shape:"js:bpmnDataObject"};var d=mxUtils.clone(g);d.defaults={shape:"datastore"};var f=mxUtils.clone(g);f.defaults={shape:"swimlane;swimlaneLine=0;startSize=20;dashed=1;dashPattern=3 1 1 1;collapsible=0;rounded=1"};var k=+var b=mxUtils.clone(g);b.defaults={shape:"hexagon",strokeColor:"#007000"};var a=mxUtils.clone(g);a.defaults={shape:"mxgraph.bpmn.shape;perimeter=ellipsePerimeter;symbol=general",outline:"standard"};a.characteristic={key:"outline",mod:"bpmnOutline"};var c=mxUtils.clone(g);c.defaults={shape:"js:bpmnDataObject"};var d=mxUtils.clone(g);d.defaults={shape:"datastore"};var f=mxUtils.clone(g);f.defaults={shape:"swimlane;swimlaneLine=0;startSize=20;dashed=1;dashPattern=3 1 1 1;collapsible=0;rounded=1"};var k=mxUtils.clone(g);k.defaults={shape:"js:BpmnChoreography"};var n=mxUtils.clone(g);n.defaults={rounded:"1",glass:"1",strokeColor:"#FFFFFF"};n.inset="strokeWidth";n.radius="arcSize";n.drawShadow={key:"shadow",mod:"bool"};n.color={key:"fillColor",mod:"color",addGradient:"north"};n["color.yjs:Color.value"]=n.color;var q=mxUtils.clone(g);q.defaults={rounded:"1",arcSize:10,glass:"1",shadow:"1",strokeColor:"none"};q.drawShadow={key:"shadow",mod:"bool"};var t=mxUtils.clone(g);t.defaults={shape:"swimlane",startSize:20,strokeWidth:4,spacingLeft:10};t.isCollapsible={key:"collapsible",mod:"bool"};t.borderColor={key:"strokeColor",mod:"color"};t.folderFrontColor={key:"fillColor",mod:"color"};var A=mxUtils.clone(g);A.defaults={shape:"swimlane",startSize:20,spacingLeft:10};A["yjs:PanelNodeStyle"]={color:{key:"swimlaneFillColor",mod:"color"},"color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},labelInsetsColor:{key:"fillColor",mod:"color"},"labelInsetsColor.yjs:Color.value":{key:"fillColor",mod:"color"}};var C=mxUtils.clone(g);C.defaults={shape:"js:table"};var I=mxUtils.clone(g);I.defaults={shape:"image"};I.image=function(R,H){H.image=R};var Q=mxUtils.clone(g);Q.defaults={shape:"image"};Q["y:SVGModel.y:SVGContent.y:Resource.#text"]=function(R,H){H.image="data:image/svg+xml,"+(window.btoa?btoa(R):Base64.encode(R))};var K=mxUtils.clone(g);K.defaults={shape:"swimlane",startSize:20};K["y:Shape.type"]=function(R,H){"roundrectangle"==R&&(H.rounded=1,H.arcSize=5)};var L=mxUtils.clone(g);L.defaults={shape:"js:table2"};var S=mxUtils.clone(g);S.defaults={gradientDirection:"east"};S["y:Fill"].color2={key:"gradientColor",mod:"color"};S["y:StyleProperties.y:Property"]={"com.yworks.bpmn.characteristic":{key:"outline",mod:"bpmnOutline"},"com.yworks.bpmn.icon.fill":{key:"gradientColor",mod:"color"},"com.yworks.bpmn.icon.fill2":{key:"fillColor",mod:"color"},"com.yworks.bpmn.type":{key:"symbol",mod:"bpmnSymbol"},"y.view.ShadowNodePainter.SHADOW_PAINTING":{key:"shadow",mod:"bool"},doubleBorder:{key:"double",mod:"bool"},"com.yworks.sbgn.style.radius":{key:"arcSize",-mod:"scale",scale:2},"com.yworks.sbgn.style.inverse":{key:"flipV",mod:"bool"}};this.mapObject(y,{"yjs:ShapeNodeStyle":g,"demostyle:FlowchartNodeStyle":g,"demostyle:AssetNodeStyle":B,"bpmn:ActivityNodeStyle":m,"bpmn:GatewayNodeStyle":h,"bpmn:ConversationNodeStyle":c,"bpmn:EventNodeStyle":a,"bpmn:DataObjectNodeStyle":b,"bpmn:DataStoreNodeStyle":d,"bpmn:GroupNodeStyle":f,"bpmn:ChoreographyNodeStyle":k,"yjs:BevelNodeStyle":n,"yjs:ShinyPlateNodeStyle":q,"demostyle:DemoGroupStyle":t,"yjs:CollapsibleNodeStyleDecorator":A,+mod:"scale",scale:2},"com.yworks.sbgn.style.inverse":{key:"flipV",mod:"bool"}};this.mapObject(y,{"yjs:ShapeNodeStyle":g,"demostyle:FlowchartNodeStyle":g,"demostyle:AssetNodeStyle":B,"bpmn:ActivityNodeStyle":m,"bpmn:GatewayNodeStyle":h,"bpmn:ConversationNodeStyle":b,"bpmn:EventNodeStyle":a,"bpmn:DataObjectNodeStyle":c,"bpmn:DataStoreNodeStyle":d,"bpmn:GroupNodeStyle":f,"bpmn:ChoreographyNodeStyle":k,"yjs:BevelNodeStyle":n,"yjs:ShinyPlateNodeStyle":q,"demostyle:DemoGroupStyle":t,"yjs:CollapsibleNodeStyleDecorator":A,"bpmn:PoolNodeStyle":C,"yjs:TableNodeStyle":C,"demotablestyle:DemoTableStyle":C,"yjs:ImageNodeStyle":I,"y:ShapeNode":g,"y:GenericNode":S,"y:GenericGroupNode":S,"y:TableNode":L,"y:SVGNode":Q,"y:GroupNode":K},z)};-mxGraphMlCodec.prototype.handleTemplates=function(g,y,z,B){if(g){var m=z.geometry.width,h=z.geometry.height;z='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+m+" "+h+'"><g>';for(var c,a=[],b=/\{TemplateBinding\s+([^}]+)\}/g;null!=(c=b.exec(g));){var d="";switch(c[1]){case "width":d=m;break;case "height":d=h}a.push({match:c[0],repl:d})}if(y&&y["y:Json"])for(y=JSON.parse(y["y:Json"]["#text"]),m=/\{Binding\s+([^}]+)\}/g;null!=(c=m.exec(g));)if(h=c[1].split(","),-b=y[h[0]])1<h.length&&h[1].indexOf("Converter=")&&(d=mxGraphMlConverters[h[1].substr(11)])&&(b=[b],h[2]&&b.push(h[2].substr(11)),b=d.apply(null,b)),a.push({match:c[0],repl:mxUtils.htmlEntities(b)});for(c=0;c<a.length;c++)g=g.replace(a[c].match,a[c].repl);a=[];for(y=/<text.+data-content="([^"]+).+<\/text>/g;null!=(c=y.exec(g));)b=c[0].substr(0,c[0].length-7)+c[1]+"</text>",a.push({match:c[0],repl:b});for(c=0;c<a.length;c++)g=g.replace(a[c].match,a[c].repl);g=z+g+"</g></svg>";B.shape="image";B.image=+mxGraphMlCodec.prototype.handleTemplates=function(g,y,z,B){if(g){var m=z.geometry.width,h=z.geometry.height;z='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+m+" "+h+'"><g>';for(var b,a=[],c=/\{TemplateBinding\s+([^}]+)\}/g;null!=(b=c.exec(g));){var d="";switch(b[1]){case "width":d=m;break;case "height":d=h}a.push({match:b[0],repl:d})}if(y&&y["y:Json"])for(y=JSON.parse(y["y:Json"]["#text"]),m=/\{Binding\s+([^}]+)\}/g;null!=(b=m.exec(g));)if(h=b[1].split(","),+c=y[h[0]])1<h.length&&h[1].indexOf("Converter=")&&(d=mxGraphMlConverters[h[1].substr(11)])&&(c=[c],h[2]&&c.push(h[2].substr(11)),c=d.apply(null,c)),a.push({match:b[0],repl:mxUtils.htmlEntities(c)});for(b=0;b<a.length;b++)g=g.replace(a[b].match,a[b].repl);a=[];for(y=/<text.+data-content="([^"]+).+<\/text>/g;null!=(b=y.exec(g));)c=b[0].substr(0,b[0].length-7)+b[1]+"</text>",a.push({match:b[0],repl:c});for(b=0;b<a.length;b++)g=g.replace(a[b].match,a[b].repl);g=z+g+"</g></svg>";B.shape="image";B.image="data:image/svg+xml,"+(window.btoa?btoa(g):Base64.encode(g))}};mxGraphMlCodec.prototype.handleCompoundShape=function(g,y,z,B){var m=y.shape;if(m&&0==m.indexOf("js:")){switch(m){case "js:bpmnArtifactShadow":y.shadow="1";case "js:bpmnArtifact":y.shape=y.symbol;delete y.fillColor;delete y.strokeColor;delete y.gradientColor;this.handleCompoundShape(g,y,z,B);break;case "js:bpmnDataObjectShadow":case "js:bpmnDataObject":y.shape="note;size=16";z=z["bpmn:DataObjectNodeStyle"]||z["y:GenericNode"]||z["y:GenericGroupNode"];B={};this.mapObject(z,{"y:StyleProperties.y:Property":{"com.yworks.bpmn.dataObjectType":"dataObjectType","com.yworks.bpmn.marker1":"marker1"}},B);if("true"==z.collection||"bpmn_marker_parallel"==B.marker1){var h=new mxCell("",new mxGeometry(.5,1,10,10),"html=1;whiteSpace=wrap;shape=parallelMarker;");h.vertex=!0;h.geometry.relative=!0;h.geometry.offset=new mxPoint(-5,-10);g.insert(h)}if("INPUT"==z.type||"data_object_type_input"==B.dataObjectType)h=new mxCell("",new mxGeometry(0,0,10,10),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;"),h.vertex=!0,h.geometry.relative=!0,h.geometry.offset=new mxPoint(2,2),g.insert(h);else if("OUTPUT"==z.type||"data_object_type_output"==B.dataObjectType)h=new mxCell("",new mxGeometry(0,0,10,10),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;fillColor=#000000;"),h.vertex=!0,h.geometry.relative=!0,h.geometry.offset=new mxPoint(2,2),g.insert(h);break;case "js:BpmnChoreography":this.mapObject(z,{defaults:{shape:"swimlane;collapsible=0;rounded=1",startSize:"20",strokeColor:"#006000",fillColor:"#CCCCCC"}},y);h=g.geometry;h=new mxCell("",new mxGeometry(0,h.height-20,h.width,20),"strokeColor=#006000;fillColor=#777777;rounded=1");h.vertex=!0;g.insert(h);B&&B.lblTxts&&(g.value=B.lblTxts[0],h.value=B.lblTxts[1]);break;case "js:bpmnActivityShadow":case "js:bpmnActivity":y.shape="ext;rounded=1";B={};z=z["y:GenericNode"]||z["y:GenericGroupNode"];this.mapObject(z,{"y:StyleProperties.y:Property":{"com.yworks.bpmn.taskType":"taskType","com.yworks.bpmn.activityType":"activityType","com.yworks.bpmn.marker1":"marker1","com.yworks.bpmn.marker2":"marker2","com.yworks.bpmn.marker3":"marker3",-"com.yworks.bpmn.marker4":"marker4"}},B);switch(B.activityType){case "activity_type_transaction":y["double"]="1"}switch(B.taskType){case "task_type_send":var c=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;fillColor=#000000;strokeColor=#FFFFFF;");c.geometry.offset=new mxPoint(4,7);break;case "task_type_receive":c=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");c.geometry.offset=new mxPoint(4,7);break;case "task_type_user":c=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");-c.geometry.offset=new mxPoint(4,5);break;case "task_type_manual":c=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");c.geometry.offset=new mxPoint(4,7);break;case "task_type_business_rule":c=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");c.geometry.offset=new mxPoint(4,7);break;case "task_type_service":c=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");c.geometry.offset=new mxPoint(4,5);break;case "task_type_script":c=-new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),c.geometry.offset=new mxPoint(4,5)}c&&(c.vertex=!0,c.geometry.relative=!0,g.insert(c),c=null);var a=0;for(h=1;4>=h;h++)B["marker"+h]&&a++;z=-7.5*a-2*(a-1);for(h=1;h<=a;h++){switch(B["marker"+h]){case "bpmn_marker_closed":c=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");c.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_open":c=new mxCell("",new mxGeometry(.5,1,15,15),"shape=rect;part=1;");c.geometry.offset=-new mxPoint(z,-20);var b=new mxCell("",new mxGeometry(.5,.5,8,1),"shape=rect;part=1;");b.geometry.offset=new mxPoint(-4,-1);b.geometry.relative=!0;b.vertex=!0;c.insert(b);break;case "bpmn_marker_loop":c=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");c.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_parallel":c=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");c.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_sequential":c=new mxCell("",-new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");c.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_ad_hoc":c=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;fillColor=#000000");c.geometry.offset=new mxPoint(z,-17);break;case "bpmn_marker_compensation":c=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),c.geometry.offset=new mxPoint(z,-18)}c.geometry.relative=!0;c.vertex=!0;g.insert(c);+"com.yworks.bpmn.marker4":"marker4"}},B);switch(B.activityType){case "activity_type_transaction":y["double"]="1"}switch(B.taskType){case "task_type_send":var b=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;fillColor=#000000;strokeColor=#FFFFFF;");b.geometry.offset=new mxPoint(4,7);break;case "task_type_receive":b=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");b.geometry.offset=new mxPoint(4,7);break;case "task_type_user":b=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");+b.geometry.offset=new mxPoint(4,5);break;case "task_type_manual":b=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");b.geometry.offset=new mxPoint(4,7);break;case "task_type_business_rule":b=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");b.geometry.offset=new mxPoint(4,7);break;case "task_type_service":b=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");b.geometry.offset=new mxPoint(4,5);break;case "task_type_script":b=+new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),b.geometry.offset=new mxPoint(4,5)}b&&(b.vertex=!0,b.geometry.relative=!0,g.insert(b),b=null);var a=0;for(h=1;4>=h;h++)B["marker"+h]&&a++;z=-7.5*a-2*(a-1);for(h=1;h<=a;h++){switch(B["marker"+h]){case "bpmn_marker_closed":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");b.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_open":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=rect;part=1;");b.geometry.offset=+new mxPoint(z,-20);var c=new mxCell("",new mxGeometry(.5,.5,8,1),"shape=rect;part=1;");c.geometry.offset=new mxPoint(-4,-1);c.geometry.relative=!0;c.vertex=!0;b.insert(c);break;case "bpmn_marker_loop":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");b.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_parallel":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");b.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_sequential":b=new mxCell("",+new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");b.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_ad_hoc":b=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;fillColor=#000000");b.geometry.offset=new mxPoint(z,-17);break;case "bpmn_marker_compensation":b=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),b.geometry.offset=new mxPoint(z,-18)}b.geometry.relative=!0;b.vertex=!0;g.insert(b);z+=20}break;case "js:table":y.shape="swimlane;collapsible=0;swimlaneLine=0";B=z["yjs:TableNodeStyle"]||z["demotablestyle:DemoTableStyle"];!B&&z["bpmn:PoolNodeStyle"]&&(B=z["bpmn:PoolNodeStyle"]["yjs:TableNodeStyle"]);this.mapObject(B,{"backgroundStyle.demotablestyle:TableBackgroundStyle":{"insetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableBackgroundFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},"tableBackgroundStroke.yjs:Stroke":{fill:{key:"strokeColor",mod:"color"},thickness:"strokeWidth"}},"backgroundStyle.yjs:ShapeNodeStyle.fill":{key:"fillColor",mod:"color"},"backgroundStyle.yjs:ShapeNodeStyle.fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"}},y);y.swimlaneFillColor=y.fillColor;B=B.table["y:Table"];var d=a=0,f={x:0};z=0;(h=B.Insets)?(h=h.split(","),"0"!=h[0]?(y.startSize=h[0],f.x=parseFloat(h[0]),y.horizontal="0"):"0"!=h[1]&&(y.startSize=h[1],z=parseFloat(h[1]),d+=z)):y.startSize="0";var k={},n={Insets:function(A,C){C.startSize=A.split(",")[0]},"Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill",mod:"color"},backgroundFill:{key:"oddLaneFill",mod:"color"}}},"Style.yjs:NodeStyleStripeStyleAdapter":{"demotablestyle:DemoStripeStyle":{"stripeInsetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableLineFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"strokeColor",-mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"height"};this.mapObject(B.RowDefaults,{defaults:{shape:"swimlane;collapsible=0;horizontal=0",startSize:"0"},"y:StripeDefaults":n},k);c={};b={Insets:function(A,C){C.startSize=A.split(",")[1]},"Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill",+mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"height"};this.mapObject(B.RowDefaults,{defaults:{shape:"swimlane;collapsible=0;horizontal=0",startSize:"0"},"y:StripeDefaults":n},k);b={};c={Insets:function(A,C){C.startSize=A.split(",")[1]},"Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill",mod:"color"},backgroundFill:{key:"oddLaneFill",mod:"color"}}},"Style.yjs:NodeStyleStripeStyleAdapter":{"demotablestyle:DemoStripeStyle":{"stripeInsetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableLineFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"strokeColor",mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"width"};this.mapObject(B.ColumnDefaults,{defaults:{shape:"swimlane;collapsible=0",startSize:"0",fillColor:"none"},-"y:StripeDefaults":b},c);h=g.geometry;a=B.Rows["y:Row"];d+=parseFloat(c.startSize);var q=f.x,t=f.x;f.lx=f.x;if(a)for(a instanceof Array||(a=[a]),h=0;h<a.length;h++)f.x=t,f.lx=t,d=this.addRow(a[h],g,h&1,d,f,n,k),q=Math.max(f.x,q);B=B.Columns["y:Column"];a=q;if(B)for(B instanceof Array||(B=[B]),h=0;h<B.length;h++)a=this.addColumn(B[h],g,h&1,a,z,b,c);break;case "js:table2":y.shape="swimlane;collapsible=0;swimlaneLine=0";B={};this.mapObject(z,{"y:TableNode":{"y:StyleProperties.y:Property":{"yed.table.section.color":{key:"secColor",+"y:StripeDefaults":c},b);h=g.geometry;a=B.Rows["y:Row"];d+=parseFloat(b.startSize);var q=f.x,t=f.x;f.lx=f.x;if(a)for(a instanceof Array||(a=[a]),h=0;h<a.length;h++)f.x=t,f.lx=t,d=this.addRow(a[h],g,h&1,d,f,n,k),q=Math.max(f.x,q);B=B.Columns["y:Column"];a=q;if(B)for(B instanceof Array||(B=[B]),h=0;h<B.length;h++)a=this.addColumn(B[h],g,h&1,a,z,c,b);break;case "js:table2":y.shape="swimlane;collapsible=0;swimlaneLine=0";B={};this.mapObject(z,{"y:TableNode":{"y:StyleProperties.y:Property":{"yed.table.section.color":{key:"secColor",mod:"color"},"yed.table.header.height":"headerH","yed.table.header.color.main":{key:"headerColor",mod:"color"},"yed.table.header.color.alternating":{key:"headerColorAlt",mod:"color"},"yed.table.lane.color.main":{key:"laneColor",mod:"color"},"yed.table.lane.color.alternating":{key:"laneColorAlt",mod:"color"},"yed.table.lane.style":"laneStyle","com.yworks.bpmn.type":"isHorz",POOL_LANE_COLOR_ALTERNATING:{key:"laneColorAlt",mod:"color"},POOL_LANE_COLOR_MAIN:{key:"laneColor",mod:"color"},POOL_LANE_STYLE:"laneStyle",-POOL_HEADER_COLOR_MAIN:{key:"headerColor",mod:"color"},POOL_HEADER_COLOR_ALTERNATING:{key:"headerColorAlt",mod:"color"},POOL_TABLE_SECTION_COLOR:{key:"secColor",mod:"color"}},"y:Table":{"y:DefaultColumnInsets.top":"colHHeight","y:DefaultRowInsets.left":"rowHWidth","y:Insets":{top:"tblHHeight",left:"tblHWidth"}}}},B);y.swimlaneFillColor=y.fillColor;n=c=0;"pool_type_lane_and_column"==B.isHorz||"pool_type_empty"==B.isHorz||"pool_type_lane"==B.isHorz?n=parseFloat(B.tblHWidth):c=parseFloat(B.tblHHeight);-y.startSize=c?c:n;try{a=z["y:TableNode"]["y:Table"]["y:Rows"]["y:Row"];b=z["y:TableNode"]["y:Table"]["y:Columns"]["y:Column"];d="lane.style.rows"==B.laneStyle||"lane_style_rows"==B.laneStyle;a instanceof Array||(a=[a]);b instanceof Array||(b=[b]);f=parseFloat(B.rowHWidth);for(h=0;h<a.length;h++)a[h]["y:Insets"]&&(f=Math.max(f,parseFloat(a[h]["y:Insets"].left)+parseFloat(a[h]["y:Insets"].right)));k=parseFloat(B.colHHeight);for(h=0;h<b.length;h++)b[h]["y:Insets"]&&(k=Math.max(k,parseFloat(b[h]["y:Insets"].top)+-parseFloat(b[h]["y:Insets"].bottom)));d?(this.addTbl2Rows(g,a,c,n,f,k,d,B),this.addTbl2Cols(g,b,c,n,f,k,d,B)):(this.addTbl2Cols(g,b,c,n,f,k,d,B),this.addTbl2Rows(g,a,c,n,f,k,d,B))}catch(A){}break;case "js:relationship_big_entity":y.shape="swimlane;startSize=30;rounded=1;arcSize=5;collapsible=0";if(g=z["y:GenericNode"]["y:Fill"])y.fillColor=g.color2,y.swimlaneFillColor=g.color;break;case "js:relationship_attribute":y.shape="1"==y["double"]?"doubleEllipse":"ellipse"}0<m.indexOf("Shadow")&&(y.shadow=+POOL_HEADER_COLOR_MAIN:{key:"headerColor",mod:"color"},POOL_HEADER_COLOR_ALTERNATING:{key:"headerColorAlt",mod:"color"},POOL_TABLE_SECTION_COLOR:{key:"secColor",mod:"color"}},"y:Table":{"y:DefaultColumnInsets.top":"colHHeight","y:DefaultRowInsets.left":"rowHWidth","y:Insets":{top:"tblHHeight",left:"tblHWidth"}}}},B);y.swimlaneFillColor=y.fillColor;n=b=0;"pool_type_lane_and_column"==B.isHorz||"pool_type_empty"==B.isHorz||"pool_type_lane"==B.isHorz?n=parseFloat(B.tblHWidth):b=parseFloat(B.tblHHeight);+y.startSize=b?b:n;try{a=z["y:TableNode"]["y:Table"]["y:Rows"]["y:Row"];c=z["y:TableNode"]["y:Table"]["y:Columns"]["y:Column"];d="lane.style.rows"==B.laneStyle||"lane_style_rows"==B.laneStyle;a instanceof Array||(a=[a]);c instanceof Array||(c=[c]);f=parseFloat(B.rowHWidth);for(h=0;h<a.length;h++)a[h]["y:Insets"]&&(f=Math.max(f,parseFloat(a[h]["y:Insets"].left)+parseFloat(a[h]["y:Insets"].right)));k=parseFloat(B.colHHeight);for(h=0;h<c.length;h++)c[h]["y:Insets"]&&(k=Math.max(k,parseFloat(c[h]["y:Insets"].top)++parseFloat(c[h]["y:Insets"].bottom)));d?(this.addTbl2Rows(g,a,b,n,f,k,d,B),this.addTbl2Cols(g,c,b,n,f,k,d,B)):(this.addTbl2Cols(g,c,b,n,f,k,d,B),this.addTbl2Rows(g,a,b,n,f,k,d,B))}catch(A){}break;case "js:relationship_big_entity":y.shape="swimlane;startSize=30;rounded=1;arcSize=5;collapsible=0";if(g=z["y:GenericNode"]["y:Fill"])y.fillColor=g.color2,y.swimlaneFillColor=g.color;break;case "js:relationship_attribute":y.shape="1"==y["double"]?"doubleEllipse":"ellipse"}0<m.indexOf("Shadow")&&(y.shadow="1")}};-mxGraphMlCodec.prototype.addTbl2Rows=function(g,y,z,B,m,h,c,a){z+=h;for(var b=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var n={shape:"swimlane;collapsible=0;horizontal=0",startSize:m,fillColor:a.secColor||"none",swimlaneLine:b?"0":"1"};0==parseFloat(n.startSize)&&(n.fillColor="none",n.swimlaneLine="0");if(c){var q=f?a.headerColorAlt:a.headerColor;n.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;n.fillColor=q?q:n.swimlaneFillColor}f=parseFloat(y[d].height);q=b&&0==d?h:0;+mxGraphMlCodec.prototype.addTbl2Rows=function(g,y,z,B,m,h,b,a){z+=h;for(var c=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var n={shape:"swimlane;collapsible=0;horizontal=0",startSize:m,fillColor:a.secColor||"none",swimlaneLine:c?"0":"1"};0==parseFloat(n.startSize)&&(n.fillColor="none",n.swimlaneLine="0");if(b){var q=f?a.headerColorAlt:a.headerColor;n.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;n.fillColor=q?q:n.swimlaneFillColor}f=parseFloat(y[d].height);q=c&&0==d?h:0;k.geometry=new mxGeometry(B,z-q,g.geometry.width-B,f+q);z+=f;k.style=this.styleMap2Str(n);g.insert(k)}};-mxGraphMlCodec.prototype.addTbl2Cols=function(g,y,z,B,m,h,c,a){B=m+B;for(var b=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var n={shape:"swimlane;collapsible=0",startSize:h,fillColor:a.secColor||"none",swimlaneLine:b?"0":"1"};0==parseFloat(n.startSize)&&(n.fillColor="none");if(!c){var q=f?a.headerColorAlt:a.headerColor;n.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;n.fillColor=q?q:n.swimlaneFillColor}f=parseFloat(y[d].width);q=b&&0==d?m:0;k.geometry=new mxGeometry(B-q,+mxGraphMlCodec.prototype.addTbl2Cols=function(g,y,z,B,m,h,b,a){B=m+B;for(var c=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var n={shape:"swimlane;collapsible=0",startSize:h,fillColor:a.secColor||"none",swimlaneLine:c?"0":"1"};0==parseFloat(n.startSize)&&(n.fillColor="none");if(!b){var q=f?a.headerColorAlt:a.headerColor;n.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;n.fillColor=q?q:n.swimlaneFillColor}f=parseFloat(y[d].width);q=c&&0==d?m:0;k.geometry=new mxGeometry(B-q,z,f+q,g.geometry.height-z);B+=f;k.style=this.styleMap2Str(n);g.insert(k)}};-mxGraphMlCodec.prototype.addRow=function(g,y,z,B,m,h,c){var a=new mxCell;a.vertex=!0;var b=mxUtils.clone(c);this.mapObject(g,h,b);z?(b.oddFill&&(b.fillColor=b.oddFill),b.oddLaneFill&&(b.swimlaneFillColor=b.oddLaneFill)):(b.evenFill&&(b.fillColor=b.evenFill),b.evenLaneFill&&(b.swimlaneFillColor=b.evenLaneFill));z=parseFloat(b.height);a.geometry=new mxGeometry(m.lx,B,y.geometry.width-m.lx,z);var d=g.Labels;d&&this.addLabels(a,d,b);a.style=this.styleMap2Str(b);y.insert(a);g=g["y:Row"];m.lx=0;b.startSize&&-(m.lx=parseFloat(b.startSize),m.x+=m.lx);y=b=m.x;d=m.lx;var f=0;if(g){g instanceof Array||(g=[g]);for(var k=0;k<g.length;k++)m.x=b,m.lx=d,f=this.addRow(g[k],a,k&1,f,m,h,c),y=Math.max(m.x,y)}m.x=y;z=Math.max(z,f);a.geometry.height=z;return B+=z};-mxGraphMlCodec.prototype.addColumn=function(g,y,z,B,m,h,c){var a=new mxCell;a.vertex=!0;var b=mxUtils.clone(c);this.mapObject(g,h,b);z?(b.oddFill&&(b.fillColor=b.oddFill),b.oddLaneFill&&(b.swimlaneFillColor=b.oddLaneFill)):(b.evenFill&&(b.fillColor=b.evenFill),b.evenLaneFill&&(b.swimlaneFillColor=b.evenLaneFill));z=parseFloat(b.width);a.geometry=new mxGeometry(B,m,z,y.geometry.height-m);var d=g.Labels;d&&this.addLabels(a,d,b);a.style=this.styleMap2Str(b);y.insert(a);g=g["y:Column"];y=0;if(g)for(g instanceof-Array||(g=[g]),b=0;b<g.length;b++)y=this.addColumn(g[b],a,b&1,y,m,h,c);z=Math.max(z,y);a.geometry.width=z;return B+=z};mxGraphMlCodec.prototype.handleFixedRatio=function(g,y){y=y.shape;g=g.geometry;if(y&&g)if(0<y.indexOf(";aspect=fixed"))y=Math.min(g.height,g.width),y==g.height&&(g.x+=(g.width-y)/2),g.height=y,g.width=y;else if(0<y.indexOf(";rotation=90")||0<y.indexOf(";rotation=-90")){y=g.height;var z=g.width;g.height=z;g.width=y;y=(y-z)/2;g.x-=y;g.y+=y}};-mxGraphMlCodec.prototype.addNodeGeo=function(g,y,z,B){var m=y[mxGraphMlConstants.RECT],h=0,c=0,a=30,b=30;m?(h=m[mxGraphMlConstants.X],c=m[mxGraphMlConstants.Y],a=m[mxGraphMlConstants.WIDTH],b=m[mxGraphMlConstants.HEIGHT]):(h=y[mxGraphMlConstants.X_L]||h,c=y[mxGraphMlConstants.Y_L]||c,a=y[mxGraphMlConstants.WIDTH_L]||a,b=y[mxGraphMlConstants.HEIGHT_L]||b);g=g.geometry;g.x=parseFloat(h)-z;g.y=parseFloat(c)-B;g.width=parseFloat(a);g.height=parseFloat(b)};-mxGraphMlCodec.prototype.importEdge=function(g,y,z,B,m){var h=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA),c=g.getAttribute(mxGraphMlConstants.ID),a=g.getAttribute(mxGraphMlConstants.EDGE_SOURCE),b=g.getAttribute(mxGraphMlConstants.EDGE_TARGET),d=g.getAttribute(mxGraphMlConstants.EDGE_SOURCE_PORT);g=g.getAttribute(mxGraphMlConstants.EDGE_TARGET_PORT);a=this.nodesMap[a];b=this.nodesMap[b];z=y.insertEdge(z,null,"",a.node,b.node,"graphMLId="+c);c={graphMlID:c};for(var f=0;f<h.length;f++){var k=-this.dataElem2Obj(h[f]),n=k["y:PolyLineEdge"]||k["y:GenericEdge"]||k["y:ArcEdge"]||k["y:BezierEdge"]||k["y:QuadCurveEdge"]||k["y:SplineEdge"];k.key==this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY].key?this.addEdgeGeo(z,k,B,m):k.key==this.edgesKeys[mxGraphMlConstants.EDGE_STYLE].key?this.addEdgeStyle(z,k,c):k.key==this.edgesKeys[mxGraphMlConstants.EDGE_LABELS].key?this.addLabels(z,k,c,y):n&&(this.addEdgeStyle(z,k,c),k=this.addEdgePath(z,n["y:Path"],c,B,m),n["y:EdgeLabel"]&&this.addLabels(z,n["y:EdgeLabel"],-c,y,k),null!=c.shape&&0==c.shape.indexOf("link")&&(c.width=c.strokeWidth,c.strokeWidth=1))}a.ports&&d&&(y=a.ports[d],y.pos&&(c.exitX=y.pos.x,c.exitY=y.pos.y));b.ports&&g&&(y=b.ports[g],y.pos&&(c.entryX=y.pos.x,c.entryY=y.pos.y));z.style=this.styleMap2Str(c);return z};-mxGraphMlCodec.prototype.addEdgeGeo=function(g,y,z,B){if(y=y[mxGraphMlConstants.Y_BEND]){for(var m=[],h=0;h<y.length;h++){var c=y[h][mxGraphMlConstants.LOCATION];c&&(c=c.split(","),m.push(new mxPoint(parseFloat(c[0])-z,parseFloat(c[1])-B)))}g.geometry.points=m}};-mxGraphMlCodec.prototype.addEdgePath=function(g,y,z,B,m){var h=[];if(y){var c=parseFloat(y.sx),a=parseFloat(y.sy),b=parseFloat(y.tx),d=parseFloat(y.ty),f=g.source.geometry;0!=c||0!=a?(z.exitX=(c+f.width/2)/f.width,z.exitY=(a+f.height/2)/f.height,h.push(new mxPoint(f.x+z.exitX*f.width-B,f.y+z.exitY*f.height-m))):h.push(new mxPoint(f.x+f.width/2-B,f.y+f.height/2-m));c=g.target.geometry;0!=b||0!=d?(z.entryX=(b+c.width/2)/c.width,z.entryY=(d+c.height/2)/c.height,z=new mxPoint(c.x+z.entryX*c.width-B,c.y+-z.entryY*c.height-m)):z=new mxPoint(c.x+c.width/2-B,c.y+c.height/2-m);if(y=y["y:Point"]){y instanceof Array||(y=[y]);b=[];for(d=0;d<y.length;d++)c=new mxPoint(parseFloat(y[d].x)-B,parseFloat(y[d].y)-m),b.push(c),h.push(c);g.geometry.points=b}h.push(z)}return h};-mxGraphMlCodec.prototype.addEdgeStyle=function(g,y,z){g=function(a,b){b.dashed=1;switch(a){case "DashDot":a="3 1 1 1";break;case "Dot":a="1 1";break;case "DashDotDot":a="3 1 1 1 1 1";break;case "Dash":a="3 1";break;default:a=a.replace(/0/g,"1")}a&&(0>a.indexOf(" ")&&(a=a+" "+a),b.dashPattern=a)};var B=function(a,b){b.endFill="WHITE"==a||0==a.indexOf("white_")||0==a.indexOf("transparent_")?"0":"1"},m=function(a,b){b.startFill="WHITE"==a||0==a.indexOf("white_")||0==a.indexOf("transparent_")?"0":"1"},-h={defaults:{rounded:0,endArrow:"none"},configuration:{key:"shape",mod:"shape"},"y:LineStyle":{color:{key:"strokeColor",mod:"color"},type:function(a,b){"line"!=a&&(b.dashed=1);var d=null;switch(a){case "dashed":d="3 1";break;case "dotted":d="1 1";break;case "dashed_dotted":d="3 2 1 2"}d&&(b.dashPattern=d)},width:"strokeWidth"},"y:Arrows":{source:function(a,b){b.startArrow=mxGraphMlArrowsMap[a]||"classic";m(a,b)},target:function(a,b){b.endArrow=mxGraphMlArrowsMap[a]||"classic";B(a,b)}},"y:BendStyle":{smoothed:{key:"rounded",-mod:"bool"}}},c=mxUtils.clone(h);c.defaults.curved="1";this.mapObject(y,{"yjs:PolylineEdgeStyle":{defaults:{endArrow:"none",rounded:0},smoothingLength:function(a,b){b.rounded=a&&0<parseFloat(a)?"1":"0"},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:g,"dashStyle.yjs:DashStyle.dashes":g,fill:{key:"strokeColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"strokeColor",mod:"color"},"thickness.sys:Double":"strokeWidth",thickness:"strokeWidth"},targetArrow:{key:"endArrow",-mod:"arrow"},"targetArrow.yjs:Arrow":{defaults:{endArrow:"classic",endFill:"1",endSize:"6"},fill:B,scale:{key:"endSize",mod:"scale",scale:5},type:{key:"endArrow",mod:"arrow"}},sourceArrow:{key:"startArrow",mod:"arrow"},"sourceArrow.yjs:Arrow":{defaults:{startArrow:"classic",startFill:"1",startSize:"6"},fill:m,scale:{key:"startSize",mod:"scale",scale:5},type:{key:"startArrow",mod:"arrow"}}},"y:PolyLineEdge":h,"y:GenericEdge":h,"y:ArcEdge":c,"y:BezierEdge":c,"y:QuadCurveEdge":c,"y:SplineEdge":c},z)};-mxGraphMlCodec.prototype.addLabels=function(g,y,z,B,m){z=g.getChildCount();var h=y[mxGraphMlConstants.Y_LABEL]||y;y=[];var c=[],a=[];if(h){h instanceof Array||(h=[h]);for(var b=0;b<h.length;b++){var d=h[b],f={},k=d[mxGraphMlConstants.TEXT]||d;k&&(k=k["#text"]);var n=d[mxGraphMlConstants.LAYOUTPARAMETER]||d||{},q=function(K,L){K&&(K=K.toUpperCase());var S=L.fontStyle||0;switch(K){case "ITALIC":S|=2;break;case "BOLD":S|=1;break;case "UNDERLINE":S|=4}L.fontStyle=S};this.mapObject(d,{"Style.yjs:DefaultLabelStyle":{backgroundFill:{key:"labelBackgroundColor",+mxGraphMlCodec.prototype.addRow=function(g,y,z,B,m,h,b){var a=new mxCell;a.vertex=!0;var c=mxUtils.clone(b);this.mapObject(g,h,c);z?(c.oddFill&&(c.fillColor=c.oddFill),c.oddLaneFill&&(c.swimlaneFillColor=c.oddLaneFill)):(c.evenFill&&(c.fillColor=c.evenFill),c.evenLaneFill&&(c.swimlaneFillColor=c.evenLaneFill));z=parseFloat(c.height);a.geometry=new mxGeometry(m.lx,B,y.geometry.width-m.lx,z);var d=g.Labels;d&&this.addLabels(a,d,c);a.style=this.styleMap2Str(c);y.insert(a);g=g["y:Row"];m.lx=0;c.startSize&&+(m.lx=parseFloat(c.startSize),m.x+=m.lx);y=c=m.x;d=m.lx;var f=0;if(g){g instanceof Array||(g=[g]);for(var k=0;k<g.length;k++)m.x=c,m.lx=d,f=this.addRow(g[k],a,k&1,f,m,h,b),y=Math.max(m.x,y)}m.x=y;z=Math.max(z,f);a.geometry.height=z;return B+=z};+mxGraphMlCodec.prototype.addColumn=function(g,y,z,B,m,h,b){var a=new mxCell;a.vertex=!0;var c=mxUtils.clone(b);this.mapObject(g,h,c);z?(c.oddFill&&(c.fillColor=c.oddFill),c.oddLaneFill&&(c.swimlaneFillColor=c.oddLaneFill)):(c.evenFill&&(c.fillColor=c.evenFill),c.evenLaneFill&&(c.swimlaneFillColor=c.evenLaneFill));z=parseFloat(c.width);a.geometry=new mxGeometry(B,m,z,y.geometry.height-m);var d=g.Labels;d&&this.addLabels(a,d,c);a.style=this.styleMap2Str(c);y.insert(a);g=g["y:Column"];y=0;if(g)for(g instanceof+Array||(g=[g]),c=0;c<g.length;c++)y=this.addColumn(g[c],a,c&1,y,m,h,b);z=Math.max(z,y);a.geometry.width=z;return B+=z};mxGraphMlCodec.prototype.handleFixedRatio=function(g,y){y=y.shape;g=g.geometry;if(y&&g)if(0<y.indexOf(";aspect=fixed"))y=Math.min(g.height,g.width),y==g.height&&(g.x+=(g.width-y)/2),g.height=y,g.width=y;else if(0<y.indexOf(";rotation=90")||0<y.indexOf(";rotation=-90")){y=g.height;var z=g.width;g.height=z;g.width=y;y=(y-z)/2;g.x-=y;g.y+=y}};+mxGraphMlCodec.prototype.addNodeGeo=function(g,y,z,B){var m=y[mxGraphMlConstants.RECT],h=0,b=0,a=30,c=30;m?(h=m[mxGraphMlConstants.X],b=m[mxGraphMlConstants.Y],a=m[mxGraphMlConstants.WIDTH],c=m[mxGraphMlConstants.HEIGHT]):(h=y[mxGraphMlConstants.X_L]||h,b=y[mxGraphMlConstants.Y_L]||b,a=y[mxGraphMlConstants.WIDTH_L]||a,c=y[mxGraphMlConstants.HEIGHT_L]||c);g=g.geometry;g.x=parseFloat(h)-z;g.y=parseFloat(b)-B;g.width=parseFloat(a);g.height=parseFloat(c)};+mxGraphMlCodec.prototype.importEdge=function(g,y,z,B,m){var h=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA),b=g.getAttribute(mxGraphMlConstants.ID),a=g.getAttribute(mxGraphMlConstants.EDGE_SOURCE),c=g.getAttribute(mxGraphMlConstants.EDGE_TARGET),d=g.getAttribute(mxGraphMlConstants.EDGE_SOURCE_PORT);g=g.getAttribute(mxGraphMlConstants.EDGE_TARGET_PORT);a=this.nodesMap[a];c=this.nodesMap[c];z=y.insertEdge(z,null,"",a.node,c.node,"graphMLId="+b);b={graphMlID:b};for(var f=0;f<h.length;f++){var k=+this.dataElem2Obj(h[f]),n=k["y:PolyLineEdge"]||k["y:GenericEdge"]||k["y:ArcEdge"]||k["y:BezierEdge"]||k["y:QuadCurveEdge"]||k["y:SplineEdge"];k.key==this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY].key?this.addEdgeGeo(z,k,B,m):k.key==this.edgesKeys[mxGraphMlConstants.EDGE_STYLE].key?this.addEdgeStyle(z,k,b):k.key==this.edgesKeys[mxGraphMlConstants.EDGE_LABELS].key?this.addLabels(z,k,b,y):n&&(this.addEdgeStyle(z,k,b),k=this.addEdgePath(z,n["y:Path"],b,B,m),n["y:EdgeLabel"]&&this.addLabels(z,n["y:EdgeLabel"],+b,y,k),null!=b.shape&&0==b.shape.indexOf("link")&&(b.width=b.strokeWidth,b.strokeWidth=1))}a.ports&&d&&(y=a.ports[d],y.pos&&(b.exitX=y.pos.x,b.exitY=y.pos.y));c.ports&&g&&(y=c.ports[g],y.pos&&(b.entryX=y.pos.x,b.entryY=y.pos.y));z.style=this.styleMap2Str(b);return z};+mxGraphMlCodec.prototype.addEdgeGeo=function(g,y,z,B){if(y=y[mxGraphMlConstants.Y_BEND]){for(var m=[],h=0;h<y.length;h++){var b=y[h][mxGraphMlConstants.LOCATION];b&&(b=b.split(","),m.push(new mxPoint(parseFloat(b[0])-z,parseFloat(b[1])-B)))}g.geometry.points=m}};+mxGraphMlCodec.prototype.addEdgePath=function(g,y,z,B,m){var h=[];if(y){var b=parseFloat(y.sx),a=parseFloat(y.sy),c=parseFloat(y.tx),d=parseFloat(y.ty),f=g.source.geometry;0!=b||0!=a?(z.exitX=(b+f.width/2)/f.width,z.exitY=(a+f.height/2)/f.height,h.push(new mxPoint(f.x+z.exitX*f.width-B,f.y+z.exitY*f.height-m))):h.push(new mxPoint(f.x+f.width/2-B,f.y+f.height/2-m));b=g.target.geometry;0!=c||0!=d?(z.entryX=(c+b.width/2)/b.width,z.entryY=(d+b.height/2)/b.height,z=new mxPoint(b.x+z.entryX*b.width-B,b.y++z.entryY*b.height-m)):z=new mxPoint(b.x+b.width/2-B,b.y+b.height/2-m);if(y=y["y:Point"]){y instanceof Array||(y=[y]);c=[];for(d=0;d<y.length;d++)b=new mxPoint(parseFloat(y[d].x)-B,parseFloat(y[d].y)-m),c.push(b),h.push(b);g.geometry.points=c}h.push(z)}return h};+mxGraphMlCodec.prototype.addEdgeStyle=function(g,y,z){g=function(a,c){c.dashed=1;switch(a){case "DashDot":a="3 1 1 1";break;case "Dot":a="1 1";break;case "DashDotDot":a="3 1 1 1 1 1";break;case "Dash":a="3 1";break;default:a=a.replace(/0/g,"1")}a&&(0>a.indexOf(" ")&&(a=a+" "+a),c.dashPattern=a)};var B=function(a,c){c.endFill="WHITE"==a||0==a.indexOf("white_")||0==a.indexOf("transparent_")?"0":"1"},m=function(a,c){c.startFill="WHITE"==a||0==a.indexOf("white_")||0==a.indexOf("transparent_")?"0":"1"},+h={defaults:{rounded:0,endArrow:"none"},configuration:{key:"shape",mod:"shape"},"y:LineStyle":{color:{key:"strokeColor",mod:"color"},type:function(a,c){"line"!=a&&(c.dashed=1);var d=null;switch(a){case "dashed":d="3 1";break;case "dotted":d="1 1";break;case "dashed_dotted":d="3 2 1 2"}d&&(c.dashPattern=d)},width:"strokeWidth"},"y:Arrows":{source:function(a,c){c.startArrow=mxGraphMlArrowsMap[a]||"classic";m(a,c)},target:function(a,c){c.endArrow=mxGraphMlArrowsMap[a]||"classic";B(a,c)}},"y:BendStyle":{smoothed:{key:"rounded",+mod:"bool"}}},b=mxUtils.clone(h);b.defaults.curved="1";this.mapObject(y,{"yjs:PolylineEdgeStyle":{defaults:{endArrow:"none",rounded:0},smoothingLength:function(a,c){c.rounded=a&&0<parseFloat(a)?"1":"0"},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:g,"dashStyle.yjs:DashStyle.dashes":g,fill:{key:"strokeColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"strokeColor",mod:"color"},"thickness.sys:Double":"strokeWidth",thickness:"strokeWidth"},targetArrow:{key:"endArrow",+mod:"arrow"},"targetArrow.yjs:Arrow":{defaults:{endArrow:"classic",endFill:"1",endSize:"6"},fill:B,scale:{key:"endSize",mod:"scale",scale:5},type:{key:"endArrow",mod:"arrow"}},sourceArrow:{key:"startArrow",mod:"arrow"},"sourceArrow.yjs:Arrow":{defaults:{startArrow:"classic",startFill:"1",startSize:"6"},fill:m,scale:{key:"startSize",mod:"scale",scale:5},type:{key:"startArrow",mod:"arrow"}}},"y:PolyLineEdge":h,"y:GenericEdge":h,"y:ArcEdge":b,"y:BezierEdge":b,"y:QuadCurveEdge":b,"y:SplineEdge":b},z)};+mxGraphMlCodec.prototype.addLabels=function(g,y,z,B,m){z=g.getChildCount();var h=y[mxGraphMlConstants.Y_LABEL]||y;y=[];var b=[],a=[];if(h){h instanceof Array||(h=[h]);for(var c=0;c<h.length;c++){var d=h[c],f={},k=d[mxGraphMlConstants.TEXT]||d;k&&(k=k["#text"]);var n=d[mxGraphMlConstants.LAYOUTPARAMETER]||d||{},q=function(K,L){K&&(K=K.toUpperCase());var S=L.fontStyle||0;switch(K){case "ITALIC":S|=2;break;case "BOLD":S|=1;break;case "UNDERLINE":S|=4}L.fontStyle=S};this.mapObject(d,{"Style.yjs:DefaultLabelStyle":{backgroundFill:{key:"labelBackgroundColor",mod:"color"},"backgroundFill.yjs:SolidColorFill.color":{key:"labelBackgroundColor",mod:"color"},backgroundStroke:{key:"labelBorderColor",mod:"color"},"backgroundStroke.yjs:Stroke.fill":{key:"labelBorderColor",mod:"color"},textFill:{key:"fontColor",mod:"color"},"textFill.yjs:SolidColorFill.color":{key:"fontColor",mod:"color"},textSize:"fontSize",horizontalTextAlignment:"align",verticalTextAlignment:"verticalAlign",wrapping:function(K,L){K&&(L.whiteSpace="wrap")},"font.yjs:Font":{fontFamily:"fontFamily",-fontSize:"fontSize",fontStyle:q,fontWeight:q,textDecoration:q}},"Style.y:VoidLabelStyle":function(K,L){L.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:q,underlinedText:function(K,L){var S=L.fontStyle||0;"true"==K&&(S|=4);L.fontStyle=S},horizontalTextPosition:"",textColor:{key:"fontColor",mod:"color"},verticalTextPosition:"verticalAlign",hasText:{key:"hasText",mod:"bool"},rotationAngle:"rotation"},f);f.VoidLbl||"0"==f.hasText||(y.push(k),c.push(f),a.push(n))}}for(b=-0;b<y.length;b++)if(y[b]&&(!a[b]||!a[b]["bpmn:ParticipantParameter"])){y[b]=mxUtils.htmlEntities(y[b],!1).replace(/\n/g,"<br/>");n=g.geometry;f=new mxCell(y[b],new mxGeometry(0,0,n.width,n.height),"text;html=1;spacing=0;"+this.styleMap2Str(c[b]));f.vertex=!0;g.insert(f,z);h=f.geometry;if(a[b]["y:RatioAnchoredLabelModelParameter"])n=mxUtils.getSizeForString(y[b],c[b].fontSize,c[b].fontFamily),(d=a[b]["y:RatioAnchoredLabelModelParameter"].LayoutOffset)?(d=d.split(","),h.x=parseFloat(d[0]),h.y=parseFloat(d[1]),-h.width=n.width,h.height=n.height,f.style+=";spacingTop=-4;"):f.style+=";align=center;";else if(a[b]["y:InteriorLabelModel"]){switch(a[b]["y:InteriorLabelModel"]){case "Center":f.style+=";verticalAlign=middle;";break;case "North":h.height=1;break;case "West":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90"}f.style+=";align=center;"}else if(a[b]["y:StretchStripeLabelModel"]||a[b]["y:StripeLabelModelParameter"])switch(a[b]["y:StretchStripeLabelModel"]||a[b]["y:StripeLabelModelParameter"].Position){case "North":h.height=-1;break;case "West":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90;"}else if(a[b]["bpmn:PoolHeaderLabelModel"]){switch(a[b]["bpmn:PoolHeaderLabelModel"]){case "NORTH":h.height=1;break;case "WEST":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90;"}f.style+=";align=center;"}else if(a[b]["y:InteriorStretchLabelModelParameter"])f.style+=";align=center;";else if(a[b]["y:ExteriorLabelModel"])switch(a[b]["y:ExteriorLabelModel"]){case "East":f.style+=-";labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;";break;case "South":f.style+=";labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;";break;case "North":f.style+=";labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;";break;case "West":f.style+=";labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;"}else if(a[b]["y:FreeEdgeLabelModelParameter"]){h.relative=!0;h.adjustIt=!0;n=a[b]["y:FreeEdgeLabelModelParameter"];-d=n.Ratio;q=n.Distance;var t=n.Angle;d&&(h.x=parseFloat(d));q&&(h.y=parseFloat(q));t&&(f.style+=";rotation="+parseFloat(t)*(180/Math.PI));f.style+=";verticalAlign=middle;"}else if(a[b]["y:EdgePathLabelModelParameter"]){h.relative=!0;n=a[b]["y:EdgePathLabelModelParameter"];k=n.SideOfEdge;d=n.SegmentRatio;h.x=d?2*parseFloat(d)-1:0;if(k)switch(k){case "RightOfEdge":h.y=-15;break;case "LeftOfEdge":h.y=15}f.style+=";verticalAlign=middle;"}else if(n=parseFloat(a[b].x),d=parseFloat(a[b].y),a[b].width&&(h.width=-parseFloat(a[b].width)),a[b].height&&(h.height=parseFloat(a[b].height)),g.edge)if(h.relative=!0,h.x=0,h.y=0,f=g.source.geometry.getCenterX()-g.target.geometry.getCenterX(),k=g.source.geometry.getCenterY()-g.target.geometry.getCenterY(),B&&m&&a[b]["y:ModelParameter"]&&a[b]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"]){n=a[b]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"];t=parseFloat(n.angle);q=parseFloat(n.distance);var A=n.position;d=parseFloat(n.ratio);n=parseFloat(n.segment);var C=-new mxCellState;C.absolutePoints=m;B.view.updateEdgeBounds(C);var I="left"==A?1:-1;if(-1==n&&6.283185307179586==t)h.offset=new mxPoint(1>Math.abs(d)?C.segments[0]*d:d,I*q);else{-1==n&&(n=0);for(var Q=t=0;Q<n;Q++)t+=C.segments[Q];t+=C.segments[n]*d;h.x=t/C.length*2-1;h.y=(("center"==A?0:q)+h.height/2*I*(Math.abs(f)>Math.abs(k)?1:-1))*I}}else isNaN(n)||isNaN(d)||(h.offset=new mxPoint(n+f/2+(0<f?-h.width:h.width),d));else h.x=n||0,h.y=d||0;c[b].rotation&&270==c[b].rotation&&(h.x-=h.height/2)}return{lblTxts:y,-lblStyles:c}};mxGraphMlCodec.prototype.processPage=function(g,y){g=(new mxCodec).encode(g.getModel());g.setAttribute("style","default-style2");g=mxUtils.getXml(g);y='<diagram name="Page '+y+'">'+Graph.compress(g);return y+"</diagram>"};mxGraphMlCodec.prototype.getDirectChildNamedElements=function(g,y){var z=[];for(g=g.firstChild;null!=g;g=g.nextSibling)null!=g&&1==g.nodeType&&y==g.nodeName&&z.push(g);return z};+fontSize:"fontSize",fontStyle:q,fontWeight:q,textDecoration:q}},"Style.y:VoidLabelStyle":function(K,L){L.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:q,underlinedText:function(K,L){var S=L.fontStyle||0;"true"==K&&(S|=4);L.fontStyle=S},horizontalTextPosition:"",textColor:{key:"fontColor",mod:"color"},verticalTextPosition:"verticalAlign",hasText:{key:"hasText",mod:"bool"},rotationAngle:"rotation"},f);f.VoidLbl||"0"==f.hasText||(y.push(k),b.push(f),a.push(n))}}for(c=+0;c<y.length;c++)if(y[c]&&(!a[c]||!a[c]["bpmn:ParticipantParameter"])){y[c]=mxUtils.htmlEntities(y[c],!1).replace(/\n/g,"<br/>");n=g.geometry;f=new mxCell(y[c],new mxGeometry(0,0,n.width,n.height),"text;html=1;spacing=0;"+this.styleMap2Str(b[c]));f.vertex=!0;g.insert(f,z);h=f.geometry;if(a[c]["y:RatioAnchoredLabelModelParameter"])n=mxUtils.getSizeForString(y[c],b[c].fontSize,b[c].fontFamily),(d=a[c]["y:RatioAnchoredLabelModelParameter"].LayoutOffset)?(d=d.split(","),h.x=parseFloat(d[0]),h.y=parseFloat(d[1]),+h.width=n.width,h.height=n.height,f.style+=";spacingTop=-4;"):f.style+=";align=center;";else if(a[c]["y:InteriorLabelModel"]){switch(a[c]["y:InteriorLabelModel"]){case "Center":f.style+=";verticalAlign=middle;";break;case "North":h.height=1;break;case "West":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90"}f.style+=";align=center;"}else if(a[c]["y:StretchStripeLabelModel"]||a[c]["y:StripeLabelModelParameter"])switch(a[c]["y:StretchStripeLabelModel"]||a[c]["y:StripeLabelModelParameter"].Position){case "North":h.height=+1;break;case "West":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90;"}else if(a[c]["bpmn:PoolHeaderLabelModel"]){switch(a[c]["bpmn:PoolHeaderLabelModel"]){case "NORTH":h.height=1;break;case "WEST":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90;"}f.style+=";align=center;"}else if(a[c]["y:InteriorStretchLabelModelParameter"])f.style+=";align=center;";else if(a[c]["y:ExteriorLabelModel"])switch(a[c]["y:ExteriorLabelModel"]){case "East":f.style+=+";labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;";break;case "South":f.style+=";labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;";break;case "North":f.style+=";labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;";break;case "West":f.style+=";labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;"}else if(a[c]["y:FreeEdgeLabelModelParameter"]){h.relative=!0;h.adjustIt=!0;n=a[c]["y:FreeEdgeLabelModelParameter"];+d=n.Ratio;q=n.Distance;var t=n.Angle;d&&(h.x=parseFloat(d));q&&(h.y=parseFloat(q));t&&(f.style+=";rotation="+parseFloat(t)*(180/Math.PI));f.style+=";verticalAlign=middle;"}else if(a[c]["y:EdgePathLabelModelParameter"]){h.relative=!0;n=a[c]["y:EdgePathLabelModelParameter"];k=n.SideOfEdge;d=n.SegmentRatio;h.x=d?2*parseFloat(d)-1:0;if(k)switch(k){case "RightOfEdge":h.y=-15;break;case "LeftOfEdge":h.y=15}f.style+=";verticalAlign=middle;"}else if(n=parseFloat(a[c].x),d=parseFloat(a[c].y),a[c].width&&(h.width=+parseFloat(a[c].width)),a[c].height&&(h.height=parseFloat(a[c].height)),g.edge)if(h.relative=!0,h.x=0,h.y=0,f=g.source.geometry.getCenterX()-g.target.geometry.getCenterX(),k=g.source.geometry.getCenterY()-g.target.geometry.getCenterY(),B&&m&&a[c]["y:ModelParameter"]&&a[c]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"]){n=a[c]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"];t=parseFloat(n.angle);q=parseFloat(n.distance);var A=n.position;d=parseFloat(n.ratio);n=parseFloat(n.segment);var C=+new mxCellState;C.absolutePoints=m;B.view.updateEdgeBounds(C);var I="left"==A?1:-1;if(-1==n&&6.283185307179586==t)h.offset=new mxPoint(1>Math.abs(d)?C.segments[0]*d:d,I*q);else{-1==n&&(n=0);for(var Q=t=0;Q<n;Q++)t+=C.segments[Q];t+=C.segments[n]*d;h.x=t/C.length*2-1;h.y=(("center"==A?0:q)+h.height/2*I*(Math.abs(f)>Math.abs(k)?1:-1))*I}}else isNaN(n)||isNaN(d)||(h.offset=new mxPoint(n+f/2+(0<f?-h.width:h.width),d));else h.x=n||0,h.y=d||0;b[c].rotation&&270==b[c].rotation&&(h.x-=h.height/2)}return{lblTxts:y,+lblStyles:b}};mxGraphMlCodec.prototype.processPage=function(g,y){g=(new mxCodec).encode(g.getModel());g.setAttribute("style","default-style2");g=mxUtils.getXml(g);y='<diagram name="Page '+y+'">'+Graph.compress(g);return y+"</diagram>"};mxGraphMlCodec.prototype.getDirectChildNamedElements=function(g,y){var z=[];for(g=g.firstChild;null!=g;g=g.nextSibling)null!=g&&1==g.nodeType&&y==g.nodeName&&z.push(g);return z};mxGraphMlCodec.prototype.getDirectFirstChildNamedElements=function(g,y){for(g=g.firstChild;null!=g;g=g.nextSibling)if(null!=g&&1==g.nodeType&&y==g.nodeName)return g;return null};mxGraphMlCodec.prototype.getDirectChildElements=function(g){var y=[];for(g=g.firstChild;null!=g;g=g.nextSibling)null!=g&&1==g.nodeType&&y.push(g);return y};mxGraphMlCodec.prototype.getDirectFirstChildElement=function(g){for(g=g.firstChild;null!=g;g=g.nextSibling)if(null!=g&&1==g.nodeType)return g;return null};var mxGraphMlConverters={"orgchartconverters.linebreakconverter":function(g,y){if("string"===typeof g){for(var z=g;20<z.length&&-1<z.indexOf(" ");)z=z.substring(0,z.lastIndexOf(" "));return"true"===y?z:g.substring(z.length)}return""},"orgchartconverters.borderconverter":function(g,y){return"boolean"===typeof g?g?"#FFBB33":"rgba(0,0,0,0)":"#FFF"},"orgchartconverters.addhashconverter":function(g,y){return"string"===typeof g?"string"===typeof y?"#"+g+y:"#"+g:g},"orgchartconverters.intermediateconverter":function(g,y){return"string"===typeof g&&17<g.length?g.replace(/^(.)(\S*)(.*)/,"$1.$3"):g},"orgchartconverters.overviewconverter":function(g,y){return"string"===typeof g&&0<g.length?g.replace(/^(.)(\S*)(.*)/,"$1.$3"):""}},mxGraphMlArrowsMap={SIMPLE:"open",TRIANGLE:"block",DIAMOND:"diamond",CIRCLE:"oval",CROSS:"cross",SHORT:"classicThin",DEFAULT:"classic",NONE:"none",none:"none",white_delta_bar:"block",delta:"block",standard:"classic",diamond:"diamond",white_diamond:"diamond",white_delta:"block",plain:"open",diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.jsindex dd83f0f35..9e3b5c428 100644--- a/src/main/webapp/js/integrate.min.js+++ b/src/main/webapp/js/integrate.min.js@@ -64,7 +64,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";-window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.0.16",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.1.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||@@ -2018,7 +2018,7 @@ Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDthis.container.parentNode.removeChild(this.container)};var ErrorDialog=function(a,b,e,f,h,d,g,m,q,k,u){q=null!=q?q:!0;var w=document.createElement("div");w.style.textAlign="center";if(null!=b){var z=document.createElement("div");z.style.padding="0px";z.style.margin="0px";z.style.fontSize="18px";z.style.paddingBottom="16px";z.style.marginBottom="10px";z.style.borderBottom="1px solid #c0c0c0";z.style.color="gray";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.overflow="hidden";mxUtils.write(z,b);z.setAttribute("title",b);w.appendChild(z)}b=document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";"string"===typeof e&&(e=e.replace(/\n/g,"<br/>"));b.innerHTML=Graph.sanitizeHtml(e);w.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=k&&(k=mxUtils.button(k,function(){null!=u&&u()}),k.className="geBtn",e.appendChild(k));-var C=mxUtils.button(f,function(){q&&a.hideDialog();null!=h&&h()});C.className="geBtn";e.appendChild(C);null!=g&&(f=mxUtils.button(g,function(){q&&a.hideDialog();null!=m&&m()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){C.focus()};w.appendChild(e);this.container=w},PrintDialog=function(a,b,e){this.create(a,b,e)};+var C=mxUtils.button(f,function(){q&&a.hideDialog();null!=h&&h()});C.className="geBtn";e.appendChild(C);null!=g&&(f=mxUtils.button(g,function(){q&&a.hideDialog();null!=m&&m()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){C.focus()};w.appendChild(e);this.container=w},PrintDialog=function(a,b,e,f){this.create(a,b,e,f)};PrintDialog.prototype.create=function(a){function b(C){var E=g.checked||k.checked,D=parseInt(w.value)/100;isNaN(D)&&(D=1,w.value="100%");mxClient.IS_SF&&(D*=.75);var G=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,J=1/e.pageScale;if(E){var L=g.checked?1:parseInt(u.value);isNaN(L)||(J=mxUtils.getScaleForPageCount(L,e,G))}var Q=L=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*D);G.height=Math.ceil(G.height*D);J*=D;!E&&e.pageVisible?(D=e.getPageLayout(),L-=D.x*G.width,Q-=D.y*G.height):E=!0;E=PrintDialog.createPrintPreview(e,J,G,0,L,Q,E);E.open();C&&PrintDialog.printPreview(E)}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var h=document.createElement("tbody");var d=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");var m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";m.appendChild(g);var q=document.createElement("span");mxUtils.write(q," "+mxResources.get("fitPage"));m.appendChild(q);mxEvent.addListener(q,"click",function(C){g.checked=!g.checked;k.checked=!g.checked;mxEvent.consume(C)});mxEvent.addListener(g,"change",function(){k.checked=!g.checked});d.appendChild(m);h.appendChild(d);d=d.cloneNode(!1);var k=document.createElement("input");k.setAttribute("type","checkbox");m=document.createElement("td");m.style.fontSize="10pt";m.appendChild(k);q=document.createElement("span");mxUtils.write(q," "+mxResources.get("posterPrint")+":");m.appendChild(q);mxEvent.addListener(q,@@ -3175,9 +3175,9 @@ var b=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPAStyleFormatPanel.prototype.getCssRules=function(a){var b=document.implementation.createHTMLDocument(""),e=document.createElement("style");mxUtils.setTextContent(e,a);b.body.appendChild(e);return e.sheet.cssRules};StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var e=b.style.editableCssRules;if(null!=e){var f=new RegExp(e),h=b.style.image.substring(b.style.image.indexOf(",")+1),d=window.atob?decodeURIComponent(escape(atob(h))):Base64.decode(h,!0),g=mxUtils.parseXml(d);if(null!=g){var m="light"==g.documentElement.style.colorScheme||"0"==mxUtils.getValue(b.style,"darkMode",null),q=""==g.documentElement.style.colorScheme,k=g.getElementsByTagName("style");for(b=0;b<k.length;b++){var u=this.getCssRules(mxUtils.getTextContent(k[b]));for(e=0;e<u.length;e++)this.addSvgRule(a,u[e],g,k[b],u,e,f,m,q)}}}}catch(w){}return a};StyleFormatPanel.prototype.getColorSchemeFromCss=function(a){return(a=a.match(/color-scheme\s*:\s*([^;]+)/i))?a[1].trim():null};-StyleFormatPanel.prototype.addSvgRule=function(a,b,e,f,h,d,g,m,q){var k=this.editorUi,u=k.editor.graph;g.test(b.selectorText)&&(g=mxUtils.bind(this,function(w,z,C,E){var D=mxUtils.trim(w.style[z]);if(""!=D&&"url("!=D.substring(0,4)){var G=D;"transparent"==G?G=mxConstants.NONE:(D=mxUtils.isLightDarkColor(G))&&E?E=!1:D||E||(G="light-dark("+G+", "+G+")");w=this.createColorOption(C+" "+w.selectorText,function(){return G},mxUtils.bind(this,function(J){h[d].style[z]=J==mxConstants.NONE?"transparent":mxUtils.getLightDarkColor(J).cssText;-J="";q&&mxUtils.isLightDarkColor(h[d].style[z])&&(e.documentElement.style.colorScheme="light dark");for(var L=0;L<h.length;L++)J+=h[L].cssText+" ";f.textContent=J;J=mxUtils.getXml(e.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(unescape(encodeURIComponent(J))):Base64.encode(J,!0)),k.getSelectionState().cells)}),"#ffffff",{install:function(J){},destroy:function(){}},null,null,null,E);a.appendChild(w);a.style.display=""}}),g(b,"fill",mxResources.get("fill"),-m),g(b,"stroke",mxResources.get("line"),m),g(b,"stop-color",mxResources.get("gradient"),m))};+StyleFormatPanel.prototype.addSvgRule=function(a,b,e,f,h,d,g,m,q){var k=this.editorUi,u=k.editor.graph;g.test(b.selectorText)&&(g=mxUtils.bind(this,function(w,z,C,E){var D=mxUtils.trim(w.style.getPropertyValue(z));if(""!=D&&"url("!=D.substring(0,4)){var G=D;"transparent"==G?G=mxConstants.NONE:(D=mxUtils.isLightDarkColor(G))&&E?E=!1:D||E||(G="light-dark("+G+", "+G+")");w=this.createColorOption(C+" "+w.selectorText,function(){return G},mxUtils.bind(this,function(J){h[d].style.setProperty(z,J==mxConstants.NONE?+"transparent":mxUtils.getLightDarkColor(J).cssText);J="";q&&mxUtils.isLightDarkColor(h[d].style[z])&&(e.documentElement.style.colorScheme="light dark");for(var L=0;L<h.length;L++)J+=h[L].cssText+" ";f.textContent=J;J=mxUtils.getXml(e.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(unescape(encodeURIComponent(J))):Base64.encode(J,!0)),k.getSelectionState().cells)}),"#ffffff",{install:function(J){},destroy:function(){}},null,null,null,E);a.appendChild(w);+a.style.display=""}}),g(b,"fill",mxResources.get("fill"),m),g(b,"stroke",mxResources.get("line"),m),g(b,"stop-color",mxResources.get("gradient"),m))};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState();if(1==b.cells.length){var e=document.createElement("select");e.style.width="210px";e.style.textAlign="center";e.style.marginBottom="2px";var f="edit copyAsText editLink editShape editImage editData copyData pasteData editConnectionPoints editGeometry editTooltip editStyle".split(" "),h=null;if(null!=this.editorUi.sidebar){var d=this.editorUi.sidebar.getKeyStyle(b.cells[0].style);h=this.editorUi.sidebar.getLibsForStyle(d);null!=h||this.editorUi.sidebar.isSearchIndexLoaded()||null==b.style.shape||"mxgraph."!=String(b.style.shape).substring(0,8)||(h=[])}null!=h&&f.push("openLibrary");for(d=0;d<f.length;d++){var g=this.editorUi.actions.get(f[d]);if(null==g||g.enabled){var m=document.createElement("option");m.setAttribute("value",f[d]);var q=mxResources.get(f[d]);mxUtils.write(m,q+("edit"==f[d]?"":"..."));null!=g&&null!=g.shortcut&&(q+=" ("+g.shortcut+")");m.setAttribute("title",q);e.appendChild(m)}}1<e.children.length&&(a.appendChild(e),mxEvent.addListener(e,"change",mxUtils.bind(this,function(k){"openLibrary"==e.value?(null!=h&&0==h.length&&(this.editorUi.sidebar.updateSearchIndex(),k=this.editorUi.sidebar.getKeyStyle(b.cells[0].style),h=this.editorUi.sidebar.getLibsForStyle(k)),null!=h&&0<h.length?this.editorUi.sidebar.openLibraries(h):this.editorUi.handleError({message:mxResources.get("objectNotFound")}),e.value="edit"):(k=this.editorUi.actions.get(e.value),e.value="edit",null!=k&&k.funct())})),b.image&&(f=this.editorUi.editor.graph,@@ -12172,24 +12172,24 @@ function(x){l&&(window.clearTimeout(d),this.sync.cleanup(b,g,x))}),q,y):this.updDrawioFile.prototype.updateFile=function(b,g,l,d,q){null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",q,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=g&&g():this.getLatestVersion(mxUtils.bind(this,function(y){try{null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[y]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=g&&g():null!=y?this.mergeFile(y,b,g,d,q):this.reloadFile(b,g))}catch(x){null!=g&&g(x)}}),g))};DrawioFile.prototype.mergeFile=function(b,g,l,d,q){try{var y=b.getShadowPages();if(null!=y&&0<y.length){var x=this.getShadowPages(),D=[this.ui.diffPages(null!=d?d:x,y)],J=this.ignorePatches(D);if(J)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",J),null!=g&&g();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var K=this.isModified()?this.ui.diffPages(x,-this.isRealtime()?this.ownPages:this.ui.pages):null,L=this.ui.patchPages(this.ui.clonePages(x),D[0]),Q=this.ui.getHashValueForPages(L,{}),c=this.ui.getHashValueForPages(y,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",x,"pages",y,"patched",L,"patches",D,"changes",K,"checksum",Q,"current",c,"valid",Q==c,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",q);if(null!=Q&&Q!=c)this.checksumError(l,D,null,null,"mergeFile",-Q,c,b.getCurrentRevisionId());else{this.setShadowPages(y);if(null!=this.sync){var e=this.sync.patchRealtime(D,DrawioFile.LAST_WRITE_WINS?K:null,null,q);null==e||mxUtils.isEmptyObject(e)||D.push(e)}this.patch(D,DrawioFile.LAST_WRITE_WINS?K:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=g&&g()}}catch(n){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=l&&l(n);try{var f=this.getCurrentUser(),p=null!=f?+this.isRealtime()?this.ownPages:this.ui.pages):null,L=this.ui.patchPages(this.ui.clonePages(x),D[0]),P=this.ui.getHashValueForPages(L,{}),c=this.ui.getHashValueForPages(y,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",x,"pages",y,"patched",L,"patches",D,"changes",K,"checksum",P,"current",c,"valid",P==c,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",q);if(null!=P&&P!=c)this.checksumError(l,D,null,null,"mergeFile",+P,c,b.getCurrentRevisionId());else{this.setShadowPages(y);if(null!=this.sync){var e=this.sync.patchRealtime(D,DrawioFile.LAST_WRITE_WINS?K:null,null,q);null==e||mxUtils.isEmptyObject(e)||D.push(e)}this.patch(D,DrawioFile.LAST_WRITE_WINS?K:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=g&&g()}}catch(n){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=l&&l(n);try{var f=this.getCurrentUser(),p=null!=f?f.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),p,n)}catch(t){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(n){null!=l&&l(n)}};DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var g=new mxCodec(mxUtils.createXmlDocument()),l=g.document.createElement("mxfile");if(null!=b)for(var d=0;d<b.length;d++){var q=g.encode(new mxGraphModel(b[d].root));"1"!=urlParams.dev&&(q=this.ui.anonymizeNode(q,!0));q.setAttribute("id",b[d].getId());b[d].viewState&&this.ui.editor.graph.saveViewState(b[d].viewState,q,!0);l.appendChild(q)}return mxUtils.getPrettyXml(l)};DrawioFile.prototype.compressReportData=function(b,g,l){g=null!=g?g:1E4;null!=l&&null!=b&&b.length>l?b=b.substring(0,l)+"[...]":null!=b&&b.length>g&&(b=Graph.compress(b)+"\n");return b};-DrawioFile.prototype.checksumError=function(b,g,l,d,q,y,x,D){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var J=this.getCurrentUser(),K=null!=J?J.id:"unknown",L=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",Q=JSON.stringify(g).length,c=null;if(null!=g&&1E3>Q){for(b=0;b<g.length;b++)this.ui.anonymizePatch(g[b]);c=JSON.stringify(g);c=null!=c&&1E3>c.length?Graph.compress(c):+DrawioFile.prototype.checksumError=function(b,g,l,d,q,y,x,D){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var J=this.getCurrentUser(),K=null!=J?J.id:"unknown",L=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",P=JSON.stringify(g).length,c=null;if(null!=g&&1E3>P){for(b=0;b<g.length;b++)this.ui.anonymizePatch(g[b]);c=JSON.stringify(g);c=null!=c&&1E3>c.length?Graph.compress(c):null}this.getLatestVersion(mxUtils.bind(this,function(e){try{var f=null!=c?"report":"error",p=this.ui.getHashValueForPages(e.getShadowPages()),n="unknown",t="unknown",z="unknown";try{var E=null!=e.initialData&&0<e.initialData.length?mxUtils.parseXml(e.initialData).documentElement:null;null!=E&&(null!=E.getAttribute("version")&&(n=E.getAttribute("version")),null!=E.getAttribute("agent")&&(t=E.getAttribute("agent")),null!=E.getAttribute("type")&&(z=E.getAttribute("type")))}catch(C){}EditorUi.logError("Checksum "+-f+" in "+q,null,this.getMode()+"."+L,"user_"+K+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+Q+"-patches_"+g.length+(null!=c?"-json_"+c:"")+"-size_"+this.getSize()+(null!=y?"-expected_"+y:"")+(null!=x?"-current_"+x:"")+(null!=D?"-rev_"+this.ui.hashValue(D):"")+(null!=p?"-latest_"+p:"")+"-latestRev_"+this.ui.hashValue(e.getCurrentRevisionId())+("-latestVersion_"+n)+("-latestAgent_"+t)+("-latestType_"+z));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+L,action:q,label:"user_"+-K+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+Q+"-patches_"+g.length+"-size_"+this.getSize()})}catch(C){}}),function(){})}catch(e){}};-DrawioFile.prototype.sendErrorReport=function(b,g,l,d){try{var q=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),y=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),x=this.getCurrentUser(),D=null!=x?this.ui.hashValue(x.id):"unknown",J=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",K=this.getTitle(),L=K.lastIndexOf(".");x="xml";0<L&&(x=K.substring(L));var Q=null!=l?l.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()++f+" in "+q,null,this.getMode()+"."+L,"user_"+K+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+P+"-patches_"+g.length+(null!=c?"-json_"+c:"")+"-size_"+this.getSize()+(null!=y?"-expected_"+y:"")+(null!=x?"-current_"+x:"")+(null!=D?"-rev_"+this.ui.hashValue(D):"")+(null!=p?"-latest_"+p:"")+"-latestRev_"+this.ui.hashValue(e.getCurrentRevisionId())+("-latestVersion_"+n)+("-latestAgent_"+t)+("-latestType_"+z));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+L,action:q,label:"user_"++K+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+P+"-patches_"+g.length+"-size_"+this.getSize()})}catch(C){}}),function(){})}catch(e){}};+DrawioFile.prototype.sendErrorReport=function(b,g,l,d){try{var q=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),y=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),x=this.getCurrentUser(),D=null!=x?this.ui.hashValue(x.id):"unknown",J=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",K=this.getTitle(),L=K.lastIndexOf(".");x="xml";0<L&&(x=K.substring(L));var P=null!=l?l.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+x+")\nUser="+D+J+"\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!=g?"\n\n"+g:-"")+(null!=l?"\n\nError: "+l.message:"")+"\n\nStack:\n"+Q+"\n\nShadow:\n"+q+"\n\nData:\n"+y,d)}catch(c){}};+"")+(null!=l?"\n\nError: "+l.message:"")+"\n\nStack:\n"+P+"\n\nShadow:\n"+q+"\n\nData:\n"+y,d)}catch(c){}};DrawioFile.prototype.reloadFile=function(b,g){try{this.stats.fileReloaded++;var l=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),d=this.ui.editor.graph,q=d.getSelectionCells(),y=d.getViewState(),x=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(D){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[l],"viewState",[y],"latestFile",D);null!=D?(this.ui.replaceFileData(D.getData(),[l]),this.ui.restoreViewState(x,y,q),this.setDescriptor(D.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var J=this.ui.getCurrentFile();null!=J&&(J.stats=this.stats,J.patch([l]),J.fileChanged());this.ui.restoreViewState(x,y,q);null!=b&&b()}else null!=g&&g(this.ui.fileLoadedError)}),!0))}),g)}catch(D){null!=g&&g(D)}};DrawioFile.prototype.copyFile=function(b,g){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var g=!0;if(null!=b)for(var l=0;l<b.length&&g;l++)g=g&&mxUtils.isEmptyObject(b[l]);return g};-DrawioFile.prototype.patch=function(b,g,l,d){if(null!=b){var q=this.ui.editor.undoManager,y=q.history.slice(),x=q.indexOfNextAdd,D=this.ui.editor.graph;D.container.style.visibility="hidden";var J=this.changeListenerEnabled;this.changeListenerEnabled=l;var K=D.foldingEnabled,L=D.mathEnabled,Q=D.cellRenderer.redraw;D.cellRenderer.redraw=function(t){t.view.graph.isEditing(t.cell)&&(t.view.graph.scrollCellToVisible(t.cell),t.view.graph.cellEditor.resize());Q.apply(this,arguments)};D.model.beginUpdate();+DrawioFile.prototype.patch=function(b,g,l,d){if(null!=b){var q=this.ui.editor.undoManager,y=q.history.slice(),x=q.indexOfNextAdd,D=this.ui.editor.graph;D.container.style.visibility="hidden";var J=this.changeListenerEnabled;this.changeListenerEnabled=l;var K=D.foldingEnabled,L=D.mathEnabled,P=D.cellRenderer.redraw;D.cellRenderer.redraw=function(t){t.view.graph.isEditing(t.cell)&&(t.view.graph.scrollCellToVisible(t.cell),t.view.graph.cellEditor.resize());P.apply(this,arguments)};D.model.beginUpdate();try{if(l){for(var c=this.ui.pages.slice(),e=this.ui.currentPage,f=this.ui.applyPatches(this.ui.pages,b,!0,g,this.isModified()),p=0;p<f.length;p++){var n=mxUtils.indexOf(this.ui.pages,f[p]);0>n?this.ui.insertPage(f[p],Math.min(p,this.ui.pages.length)):this.ui.movePage(n,p)}for(p=0;p<c.length;p++)0>mxUtils.indexOf(f,c[p])&&this.ui.removePage(c[p]);0<=mxUtils.indexOf(this.ui.pages,e)&&this.ui.selectPage(e,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,g,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);D.checkDefaultParent()}finally{D.container.style.visibility="";D.model.endUpdate();D.cellRenderer.redraw=Q;this.changeListenerEnabled=J;l||(q.history=y,q.indexOfNextAdd=x,q.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)L!=D.mathEnabled?(this.ui.editor.updateGraphComponents(),D.refresh()):(K!=D.foldingEnabled?+this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);D.checkDefaultParent()}finally{D.container.style.visibility="";D.model.endUpdate();D.cellRenderer.redraw=P;this.changeListenerEnabled=J;l||(q.history=y,q.indexOfNextAdd=x,q.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)L!=D.mathEnabled?(this.ui.editor.updateGraphComponents(),D.refresh()):(K!=D.foldingEnabled?D.view.revalidate():D.view.validate(),D.sizeDidChange());null!=this.sync&&this.isRealtime()&&!d&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",g,"undoable",l)}return b};DrawioFile.prototype.save=function(b,g,l,d,q,y){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",d,"overwrite",q,"manual",y,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!q&&this.invalidChecksum)if(null!=l)l({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=g&&g();else if(null!=l)l({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(x){if(null!=l)l(x);else throw x;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var g=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=g&&(g.viewState=this.ui.editor.graph.getViewState(),g.needsUpdate=!0)}g=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return g};@@ -12249,10 +12249,10 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(thisDrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,g){b([])};DrawioFile.prototype.addComment=function(b,g,l){g(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,g){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,g)};LocalFile=function(b,g,l,d,q,y,x){DrawioFile.call(this,b,g);this.title=l;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=q;this.desc=y;this.editable=x};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,g,l,d,q){this.saveAs(this.title,g,l,d,q)};LocalFile.prototype.saveAs=function(b,g,l,d,q){this.saveFile(b,!1,g,l,null,d,q)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,g){null==this.fileHandle?null!=g&&g({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,g)};-LocalFile.prototype.saveFile=function(b,g,l,d,q,y,x){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;q||this.updateFileData();var D=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var J=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()}),L=mxUtils.bind(this,function(Q){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=-!0;var c=mxUtils.bind(this,function(f){this.savingFile=!1;null!=d&&d({error:f})});this.saveDraft(J);this.fileHandle.createWritable().then(mxUtils.bind(this,function(f){this.fileHandle.getFile().then(mxUtils.bind(this,function(p){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[p],"conflict",this.desc.lastModified!=p.lastModified);x||this.desc.lastModified==p.lastModified?f.write(D?this.ui.base64ToBlob(Q,"image/png"):Q).then(mxUtils.bind(this,function(){f.close().then(mxUtils.bind(this,-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(n){try{var t=this.desc;this.savingFile=!1;this.desc=n;this.fileSaved(J,t,K,c);this.removeDraft()}catch(z){c(z)}}),c)}),c)}),c):(this.inConflictState=!0,c())}),mxUtils.bind(this,function(p){this.invalidFileHandle=!0;c(p)}))}),c)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(Q,b,D?"image/png":"text/xml",D);else if(Q.length<MAX_REQUEST_SIZE){var e=b.lastIndexOf(".");e=0<e?b.substring(e+1):"xml";-(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(Q)+"&filename="+encodeURIComponent(b)+(D?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Q)}));K()}});D?(g=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(Q){L(Q)}),d,this.ui.getCurrentFile()!=this?J:null,g.scale,g.border)):L(J)};+LocalFile.prototype.saveFile=function(b,g,l,d,q,y,x){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;q||this.updateFileData();var D=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var J=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()}),L=mxUtils.bind(this,function(P){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=+!0;var c=mxUtils.bind(this,function(f){this.savingFile=!1;null!=d&&d({error:f})});this.saveDraft(J);this.fileHandle.createWritable().then(mxUtils.bind(this,function(f){this.fileHandle.getFile().then(mxUtils.bind(this,function(p){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[p],"conflict",this.desc.lastModified!=p.lastModified);x||this.desc.lastModified==p.lastModified?f.write(D?this.ui.base64ToBlob(P,"image/png"):P).then(mxUtils.bind(this,function(){f.close().then(mxUtils.bind(this,+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(n){try{var t=this.desc;this.savingFile=!1;this.desc=n;this.fileSaved(J,t,K,c);this.removeDraft()}catch(z){c(z)}}),c)}),c)}),c):(this.inConflictState=!0,c())}),mxUtils.bind(this,function(p){this.invalidFileHandle=!0;c(p)}))}),c)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(P,b,D?"image/png":"text/xml",D);else if(P.length<MAX_REQUEST_SIZE){var e=b.lastIndexOf(".");e=0<e?b.substring(e+1):"xml";+(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(P)+"&filename="+encodeURIComponent(b)+(D?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(P)}));K()}});D?(g=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(P){L(P)}),d,this.ui.getCurrentFile()!=this?J:null,g.scale,g.border)):L(J)};LocalFile.prototype.rename=function(b,g,l){this.title=b;this.descriptorChanged();null!=g&&g()};LocalLibrary=function(b,g,l){LocalFile.call(this,b,g,l)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,g,l){this.saveFile(b,!1,g,l)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,g,l){DrawioFile.call(this,b,g);this.title=l;this.etag=this.getEtag(g)};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.getEtag=function(b){return this.ui.hashValue(null!=b?b:"")};StorageFile.prototype.autosaveDelay=500;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.maxRetries=5;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isSyncSupported=function(){return!0};StorageFile.prototype.isPolling=function(){return this.isSyncSupported()};StorageFile.prototype.getPollingInterval=function(){return 1E4};StorageFile.prototype.loadDescriptor=function(b,g){this.getLatestVersionId(b,g)};StorageFile.prototype.getLatestVersionId=function(b,g){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(l){b(this.getEtag(l))}),g)};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.getDescriptor=function(){return this.etag};StorageFile.prototype.setDescriptor=function(b){this.etag=b};StorageFile.prototype.getDescriptorEtag=function(b){return b};StorageFile.prototype.save=function(b,g,l){this.saveAs(this.getTitle(),g,l)};@@ -12271,15 +12271,15 @@ StorageFile.listFiles=function(b,g,l,d){b.getDatabaseItems(function(q){var y=[];StorageLibrary.prototype.isRenamable=function(b,g,l){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,g,l){DrawioFile.call(this,b,g);this.title=l;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,g,l){RemoteFile.call(this,b,g,l.title);this.libObj=l};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,g,l){};RemoteLibrary.prototype.saveAs=function(b,g,l){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,g,l){StorageFile.call(this,b,g,l);b=l;g=b.lastIndexOf("/");0<=g&&(b=b.substring(g+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,g,l){return!1};UrlLibrary.prototype.saveAs=function(b,g,l){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,g,l){DrawioFile.call(this,b,g);this.desc=l||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*mxClient.IS_IOS || */-var StorageDialog=function(b,g,l){function d(Q,c,e,f,p,n){function t(){mxEvent.addListener(z,"click",null!=n?n:function(){e==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(e,!0);g()})):e==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(e,!0);g()}),function(U){b.spinner.stop();b.handleError(U)}):+var StorageDialog=function(b,g,l){function d(P,c,e,f,p,n){function t(){mxEvent.addListener(z,"click",null!=n?n:function(){e==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(e,!0);g()})):e==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(e,!0);g()}),function(U){b.spinner.stop();b.handleError(U)}):(b.setMode(e,!0),g())})}D++;++x>l&&(mxUtils.br(J),x=1);var z=document.createElement("a");z.style.overflow="hidden";z.style.display="inline-block";z.className="geBaseButton";z.style.boxSizing="border-box";z.style.fontSize="11px";z.style.position="relative";z.style.margin="4px";z.style.marginTop="8px";z.style.marginBottom="0px";z.style.padding="8px 10px 8px 10px";z.style.width="88px";z.style.height="100px";z.style.whiteSpace="nowrap";z.setAttribute("title",c);var E=document.createElement("div");E.style.textOverflow=-"ellipsis";E.style.overflow="hidden";E.style.position="absolute";E.style.bottom="8px";E.style.left="0px";E.style.right="0px";mxUtils.write(E,c);z.appendChild(E);if(null!=Q){var C=document.createElement("img");C.setAttribute("src",Q);C.setAttribute("border","0");C.setAttribute("align","absmiddle");C.style.width="60px";C.style.height="60px";C.style.paddingBottom="6px";z.appendChild(C)}else E.style.paddingTop="5px",E.style.whiteSpace="normal",mxClient.IS_IOS?(z.style.padding="0px 10px 20px 10px",z.style.top=-"6px"):mxClient.IS_FF&&(E.style.paddingTop="0px",E.style.marginTop="-2px");if(null!=p)for(Q=0;Q<p.length;Q++)mxUtils.br(E),mxUtils.write(E,p[Q]);if(null!=f&&null==b[f]){C.style.visibility="hidden";mxUtils.setOpacity(E,10);var F=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});F.spin(z);var R=window.setTimeout(function(){null==b[f]&&(F.stop(),z.style.display="none")},3E4);b.addListener("clientLoaded",-mxUtils.bind(this,function(U,P){null!=b[f]&&P.getProperty("client")==b[f]&&(window.clearTimeout(R),mxUtils.setOpacity(E,100),C.style.visibility="",F.stop(),t(),"drive"==f&&null!=K.parentNode&&K.parentNode.removeChild(K))}))}else t();J.appendChild(z)}l=null!=l?l:2;var q=document.createElement("div");q.style.textAlign="center";q.style.whiteSpace="nowrap";q.style.paddingTop="0px";q.style.paddingBottom="20px";var y=document.createElement("div");y.style.border="1px solid #d3d3d3";y.style.borderWidth="1px 0px 1px 0px";+"ellipsis";E.style.overflow="hidden";E.style.position="absolute";E.style.bottom="8px";E.style.left="0px";E.style.right="0px";mxUtils.write(E,c);z.appendChild(E);if(null!=P){var C=document.createElement("img");C.setAttribute("src",P);C.setAttribute("border","0");C.setAttribute("align","absmiddle");C.style.width="60px";C.style.height="60px";C.style.paddingBottom="6px";z.appendChild(C)}else E.style.paddingTop="5px",E.style.whiteSpace="normal",mxClient.IS_IOS?(z.style.padding="0px 10px 20px 10px",z.style.top=+"6px"):mxClient.IS_FF&&(E.style.paddingTop="0px",E.style.marginTop="-2px");if(null!=p)for(P=0;P<p.length;P++)mxUtils.br(E),mxUtils.write(E,p[P]);if(null!=f&&null==b[f]){C.style.visibility="hidden";mxUtils.setOpacity(E,10);var F=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});F.spin(z);var S=window.setTimeout(function(){null==b[f]&&(F.stop(),z.style.display="none")},3E4);b.addListener("clientLoaded",+mxUtils.bind(this,function(U,O){null!=b[f]&&O.getProperty("client")==b[f]&&(window.clearTimeout(S),mxUtils.setOpacity(E,100),C.style.visibility="",F.stop(),t(),"drive"==f&&null!=K.parentNode&&K.parentNode.removeChild(K))}))}else t();J.appendChild(z)}l=null!=l?l:2;var q=document.createElement("div");q.style.textAlign="center";q.style.whiteSpace="nowrap";q.style.paddingTop="0px";q.style.paddingBottom="20px";var y=document.createElement("div");y.style.border="1px solid #d3d3d3";y.style.borderWidth="1px 0px 1px 0px";y.style.padding="10px 0px 20px 0px";var x=0,D=0,J=document.createElement("div");J.style.paddingTop="2px";y.appendChild(J);var K=document.createElement("p"),L=document.createElement("p");L.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(L,mxResources.get("saveDiagramsTo")+":");q.appendChild(L);q.appendChild(y);x=0;"function"===typeof window.DriveClient&&d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&d(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||d(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");y=document.createElement("span");y.style.position="absolute";y.style.cursor="pointer";y.style.bottom="27px";y.style.color="gray";y.style.userSelect="none";y.style.textAlign="center";y.style.left="50%";mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,0)");mxUtils.write(y,mxResources.get("decideLater"));-q.appendChild(y);mxEvent.addListener(y,"click",function(){b.hideDialog();var Q=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=Q});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(K.style.padding="7px",K.style.fontSize="9pt",K.style.marginTop="-14px",K.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://www.drawio.com/doc/faq/google-drive-connection-problems" target="_blank"><img border="0" src="'++q.appendChild(y);mxEvent.addListener(y,"click",function(){b.hideDialog();var P=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=P});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(K.style.padding="7px",K.style.fontSize="9pt",K.style.marginTop="-14px",K.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://www.drawio.com/doc/faq/google-drive-connection-problems" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",q.appendChild(K))},5E3);this.container=q},SplashDialog=function(b){var g=document.createElement("div");g.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var l=b.addLanguageMenu(g,!1,"28px");null!=l&&(l.style.bottom="24px")}var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width="32px";d.style.height="32px";d.style.marginRight="8px";d.style.marginTop="-4px";var q=document.createElement("div");q.style.margin="8px 0px 0px 0px";q.style.padding="18px 0px 24px 0px";l="";b.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",l=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(d.src=IMAGE_PATH+"/dropbox-logo.svg",l=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(d.src=IMAGE_PATH+"/onedrive-logo.svg",l=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?(d.src=IMAGE_PATH+"/github-logo.svg",l=mxResources.get("github")):b.mode==App.MODE_GITLAB?(d.src=IMAGE_PATH+"/gitlab-logo.svg",l=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",l=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(d.src=IMAGE_PATH+"/trello-logo.svg",l=mxResources.get("trello")):(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",q.style.paddingBottom="10px",q.style.paddingTop="30px",l=mxResources.get("device"));var y=document.createElement("button");@@ -12288,261 +12288,261 @@ y.className="geBigButton";y.style.marginBottom="8px";y.style.fontSize="18px";y.smxResources.get("changeStorage"));mxEvent.addListener(l,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});g.appendChild(l)}mxUtils.write(y,mxResources.get("createNewDiagram"));mxEvent.addListener(y,"click",function(){b.hideDialog();b.actions.get("new").funct()});q.appendChild(y);mxUtils.br(q);y=document.createElement("button");y.className="geBigButton";y.style.marginBottom="22px";y.style.fontSize="18px";y.style.padding="10px";y.style.width="340px";mxUtils.write(y,mxResources.get("openExistingDiagram"));mxEvent.addListener(y,"click",function(){b.actions.get("open").funct()});q.appendChild(y);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(l=function(e){y.style.marginBottom="24px";var f=document.createElement("a");f.style.display="inline-block";f.style.color="gray";f.style.cursor="pointer";f.style.marginTop="6px";mxUtils.write(f,mxResources.get("signOut"));y.style.marginBottom="16px";q.style.paddingBottom="18px";mxEvent.addListener(f,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){e()})});q.appendChild(f)},b.mode==App.MODE_GOOGLE&&-null!=b.drive){var Q=b.drive.getUsersList();if(0<Q.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");y.style.marginBottom="16px";q.style.paddingBottom="18px";q.appendChild(d);var c=document.createElement("select");c.style.marginLeft="4px";c.style.width="140px";for(l=0;l<Q.length;l++)x=document.createElement("option"),mxUtils.write(x,Q[l].displayName),x.value=l,c.appendChild(x),x=document.createElement("option"),x.innerHTML=" ",-mxUtils.write(x,"<"+Q[l].email+">"),x.setAttribute("disabled","disabled"),c.appendChild(x);x=document.createElement("option");mxUtils.write(x,mxResources.get("addAccount"));x.value=Q.length;c.appendChild(x);mxEvent.addListener(c,"change",function(){var e=c.value,f=Q.length!=e;f&&b.drive.setUser(Q[e]);b.drive.authorize(f,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(p){b.handleError(p,null,function(){b.hideDialog();b.showSplash()})},!0)});q.appendChild(c)}else l(function(){b.drive.logout()})}else b.mode!=+null!=b.drive){var P=b.drive.getUsersList();if(0<P.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");y.style.marginBottom="16px";q.style.paddingBottom="18px";q.appendChild(d);var c=document.createElement("select");c.style.marginLeft="4px";c.style.width="140px";for(l=0;l<P.length;l++)x=document.createElement("option"),mxUtils.write(x,P[l].displayName),x.value=l,c.appendChild(x),x=document.createElement("option"),x.innerHTML=" ",+mxUtils.write(x,"<"+P[l].email+">"),x.setAttribute("disabled","disabled"),c.appendChild(x);x=document.createElement("option");mxUtils.write(x,mxResources.get("addAccount"));x.value=P.length;c.appendChild(x);mxEvent.addListener(c,"change",function(){var e=c.value,f=P.length!=e;f&&b.drive.setUser(P[e]);b.drive.authorize(f,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(p){b.handleError(p,null,function(){b.hideDialog();b.showSplash()})},!0)});q.appendChild(c)}else l(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?l(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?l(function(){b.gitLab.logout();var e=document.createElement("form");e.setAttribute("method","post");e.setAttribute("action",DRAWIO_GITLAB_URL+"/users/sign_out");e.setAttribute("target","_blank");document.body.appendChild(e);e.submit();e.parentNode.removeChild(e)}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&l(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&l(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):l(function(){b.oneDrive.logout()});g.appendChild(q);this.container=g},EmbedDialog=function(b,g,l,d,q,y,x,D,J){x=null!=x?x:"Check out the diagram I made using @drawio";d=document.createElement("div");var K=/^https?:\/\//.test(g)||/^mailto:\/\//.test(g);null!=y?mxUtils.write(d,y):mxUtils.write(d,mxResources.get(5E5>g.length?K?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);y=document.createElement("div");y.style.position="absolute";y.style.top="30px";y.style.right="30px";y.style.color="gray";mxUtils.write(y,b.formatFileSize(g.length));d.appendChild(y);var L=document.createElement("textarea");L.setAttribute("autocomplete","off");L.setAttribute("autocorrect","off");L.setAttribute("autocapitalize","off");L.setAttribute("spellcheck","false");L.style.fontFamily="monospace";L.style.wordBreak="break-all";L.style.marginTop="10px";L.style.resize="none";L.style.height="150px";L.style.width="440px";L.style.border="1px solid gray";L.value=mxResources.get("updatingDocument");d.appendChild(L);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>g.length?(L.value=g,L.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null)):(L.setAttribute("readonly","true"),L.value=mxResources.get("tooLargeUseDownload"))},0)};y=document.createElement("div");y.style.position=-"absolute";y.style.bottom="36px";y.style.right="32px";var Q=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!K||navigator.standalone||!(K||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(Q=mxUtils.button(null!=D?D:mxResources.get(5E5>g.length?"preview":"openInNewWindow"),function(){var e=5E5>g.length?L.value:g;if(null!=q)q(e);else if(K)try{var f=b.openLink(e);null!=f&&(null==l||0<l)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=f&&null!=+"absolute";y.style.bottom="36px";y.style.right="32px";var P=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!K||navigator.standalone||!(K||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(P=mxUtils.button(null!=D?D:mxResources.get(5E5>g.length?"preview":"openInNewWindow"),function(){var e=5E5>g.length?L.value:g;if(null!=q)q(e);else if(K)try{var f=b.openLink(e);null!=f&&(null==l||0<l)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=e.substring(0,8)&&(f.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(n){}}),l||500)}catch(n){b.handleError({message:n.message||mxResources.get("drawingTooLarge")})}else{var p=window.open();p=null!=p?p.document:null;null!=p?(p.writeln("<html><head><title>"+mxUtils.htmlEntities(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+("<iframe"==g.substring(0,7)?g:mxUtils.htmlEntities(g))+"</body></html>"),-p.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),Q.className="geBtn",y.appendChild(Q));if(!K||7500<g.length)D=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=J?J:"embed.txt","txt",g,"text/plain")}),D.className="geBtn",y.appendChild(D);if(K&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>g.length){var c=mxUtils.button("",function(){try{var e="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(L.value);+p.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),P.className="geBtn",y.appendChild(P));if(!K||7500<g.length)D=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=J?J:"embed.txt","txt",g,"text/plain")}),D.className="geBtn",y.appendChild(D);if(K&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>g.length){var c=mxUtils.button("",function(){try{var e="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(L.value);b.openLink(e)}catch(f){b.handleError({message:f.message||mxResources.get("drawingTooLarge")})}});D=document.createElement("img");D.setAttribute("src",Editor.facebookImage);D.setAttribute("width","18");D.setAttribute("height","18");D.setAttribute("border","0");c.appendChild(D);c.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");c.style.verticalAlign="bottom";c.style.paddingTop="4px";c.style.minWidth="46px";c.className="geBtn";y.appendChild(c)}7168>g.length&&(c=mxUtils.button("",function(){try{var e="https://twitter.com/intent/tweet?text="+encodeURIComponent(x)+"&url="+encodeURIComponent(L.value);b.openLink(e)}catch(f){b.handleError({message:f.message||mxResources.get("drawingTooLarge")})}}),D=document.createElement("img"),D.setAttribute("src",Editor.tweetImage),D.setAttribute("width","18"),D.setAttribute("height","18"),D.setAttribute("border","0"),D.style.marginBottom="5px",c.appendChild(D),c.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),c.style.verticalAlign="bottom",c.style.paddingTop="4px",c.style.minWidth="46px",c.className="geBtn",y.appendChild(c))}!b.isOffline()&&5E5>g.length&&(c=mxUtils.button("",function(){try{var e="mailto:?subject="+encodeURIComponent(J||b.defaultFilename)+"&body="+encodeURIComponent(L.value);b.openLink(e)}catch(f){b.handleError({message:f.message||mxResources.get("drawingTooLarge")})}}),D=document.createElement("img"),D.className="geAdaptiveAsset",D.setAttribute("src",Editor.mailImage),D.setAttribute("width","18"),D.setAttribute("height","18"),D.setAttribute("border","0"),D.style.marginBottom="5px",c.appendChild(D),c.style.verticalAlign="bottom",c.style.paddingTop="4px",c.style.minWidth="46px",c.className="geBtn",y.appendChild(c));D=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});y.appendChild(D);c=mxUtils.button(mxResources.get("copy"),function(){L.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");-b.alert(mxResources.get("copiedToClipboard"))});5E5>g.length?mxClient.IS_SF||null!=document.documentMode?D.className="geBtn gePrimaryBtn":(y.appendChild(c),c.className="geBtn gePrimaryBtn",D.className="geBtn"):null!=Q&&(y.appendChild(Q),D.className="geBtn",Q.className="geBtn gePrimaryBtn");d.appendChild(y);this.container=d};EmbedDialog.showPreviewOption=!0;-var GoogleSitesDialog=function(b,g){function l(){var U=null!=R&&null!=R.getTitle()?R.getTitle():this.defaultFilename;if(C.checked&&""!=c.value){var P="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(c.value));null!=U&&(P+="&title="+encodeURIComponent(U));0<F.length&&(P+="&s="+F);""!=e.value&&"0"!=e.value&&(P+="&border="+e.value);""!=Q.value&&(P+="&height="+Q.value);P+="&pan="+(f.checked?"1":"0");P+="&zoom="+(p.checked?"1":"0");P+="&fit="+(E.checked?"1":"0");-P+="&resize="+(z.checked?"1":"0");P+="&x0="+Number(L.value);P+="&y0="+J;q.mathEnabled&&(P+="&math=1");t.checked?P+="&edit=_blank":n.checked&&(P+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));K.value=P}else R.constructor==DriveFile||R.constructor==DropboxFile?(P="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=c.value?P+=encodeURIComponent(mxUtils.htmlEntities(c.value))+"&type=3":(P+=R.getHash().substring(1),P=R.constructor==DropboxFile?P+"&type=2":P+"&type=1"),null!=-U&&(P+="&title="+encodeURIComponent(U)),""!=Q.value&&(U=parseInt(Q.value)+parseInt(L.value),P+="&height="+U),K.value=P):K.value=""}var d=document.createElement("div"),q=b.editor.graph,y=q.getGraphBounds(),x=q.view.scale,D=Math.floor(y.x/x-q.view.translate.x),J=Math.floor(y.y/x-q.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var K=document.createElement("input");K.setAttribute("type","text");K.style.marginBottom="8px";K.style.marginTop="2px";K.style.width="410px";-d.appendChild(K);mxUtils.br(d);this.init=function(){K.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var L=document.createElement("input");L.setAttribute("type","text");L.setAttribute("size","4");L.style.marginRight="16px";L.style.marginLeft="4px";L.value=D;d.appendChild(L);mxUtils.write(d,mxResources.get("height")+":");var Q=document.createElement("input");Q.setAttribute("type","text");-Q.setAttribute("size","4");Q.style.marginLeft="4px";Q.value=Math.ceil(y.height/x);d.appendChild(Q);mxUtils.br(d);y=document.createElement("hr");y.setAttribute("size","1");y.style.marginBottom="16px";y.style.marginTop="16px";d.appendChild(y);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var c=document.createElement("input");c.setAttribute("type","text");c.setAttribute("size","28");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px";c.value=g||"";d.appendChild(c);+b.alert(mxResources.get("copiedToClipboard"))});5E5>g.length?mxClient.IS_SF||null!=document.documentMode?D.className="geBtn gePrimaryBtn":(y.appendChild(c),c.className="geBtn gePrimaryBtn",D.className="geBtn"):null!=P&&(y.appendChild(P),D.className="geBtn",P.className="geBtn gePrimaryBtn");d.appendChild(y);this.container=d};EmbedDialog.showPreviewOption=!0;+var GoogleSitesDialog=function(b,g){function l(){var U=null!=S&&null!=S.getTitle()?S.getTitle():this.defaultFilename;if(C.checked&&""!=c.value){var O="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(c.value));null!=U&&(O+="&title="+encodeURIComponent(U));0<F.length&&(O+="&s="+F);""!=e.value&&"0"!=e.value&&(O+="&border="+e.value);""!=P.value&&(O+="&height="+P.value);O+="&pan="+(f.checked?"1":"0");O+="&zoom="+(p.checked?"1":"0");O+="&fit="+(E.checked?"1":"0");+O+="&resize="+(z.checked?"1":"0");O+="&x0="+Number(L.value);O+="&y0="+J;q.mathEnabled&&(O+="&math=1");t.checked?O+="&edit=_blank":n.checked&&(O+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));K.value=O}else S.constructor==DriveFile||S.constructor==DropboxFile?(O="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=c.value?O+=encodeURIComponent(mxUtils.htmlEntities(c.value))+"&type=3":(O+=S.getHash().substring(1),O=S.constructor==DropboxFile?O+"&type=2":O+"&type=1"),null!=+U&&(O+="&title="+encodeURIComponent(U)),""!=P.value&&(U=parseInt(P.value)+parseInt(L.value),O+="&height="+U),K.value=O):K.value=""}var d=document.createElement("div"),q=b.editor.graph,y=q.getGraphBounds(),x=q.view.scale,D=Math.floor(y.x/x-q.view.translate.x),J=Math.floor(y.y/x-q.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var K=document.createElement("input");K.setAttribute("type","text");K.style.marginBottom="8px";K.style.marginTop="2px";K.style.width="410px";+d.appendChild(K);mxUtils.br(d);this.init=function(){K.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var L=document.createElement("input");L.setAttribute("type","text");L.setAttribute("size","4");L.style.marginRight="16px";L.style.marginLeft="4px";L.value=D;d.appendChild(L);mxUtils.write(d,mxResources.get("height")+":");var P=document.createElement("input");P.setAttribute("type","text");+P.setAttribute("size","4");P.style.marginLeft="4px";P.value=Math.ceil(y.height/x);d.appendChild(P);mxUtils.br(d);y=document.createElement("hr");y.setAttribute("size","1");y.style.marginBottom="16px";y.style.marginTop="16px";d.appendChild(y);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var c=document.createElement("input");c.setAttribute("type","text");c.setAttribute("size","28");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px";c.value=g||"";d.appendChild(c);mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","3");e.style.marginBottom="8px";e.style.marginLeft="4px";e.value="0";d.appendChild(e);mxUtils.br(d);var f=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("checked","checked");f.defaultChecked=!0;f.style.marginLeft="16px";d.appendChild(f);mxUtils.write(d,mxResources.get("pan")+" ");var p=document.createElement("input");p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="8px";d.appendChild(p);mxUtils.write(d,mxResources.get("zoom")+" ");var n=document.createElement("input");n.setAttribute("type","checkbox");n.style.marginLeft="8px";n.setAttribute("title",window.location.href);d.appendChild(n);mxUtils.write(d,mxResources.get("edit")+" ");var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="8px";d.appendChild(t);mxUtils.write(d,mxResources.get("asNew")+" ");mxUtils.br(d);var z=document.createElement("input");z.setAttribute("type","checkbox");z.setAttribute("checked","checked");z.defaultChecked=!0;z.style.marginLeft="16px";d.appendChild(z);mxUtils.write(d,mxResources.get("resize")+" ");var E=document.createElement("input");E.setAttribute("type","checkbox");E.style.marginLeft="8px";d.appendChild(E);mxUtils.write(d,mxResources.get("fit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft=-"8px";d.appendChild(C);mxUtils.write(d,mxResources.get("embed")+" ");var F=b.getBasenames().join(";"),R=b.getCurrentFile();mxEvent.addListener(f,"change",l);mxEvent.addListener(p,"change",l);mxEvent.addListener(z,"change",l);mxEvent.addListener(E,"change",l);mxEvent.addListener(n,"change",l);mxEvent.addListener(t,"change",l);mxEvent.addListener(C,"change",l);mxEvent.addListener(Q,"change",l);mxEvent.addListener(L,"change",l);mxEvent.addListener(e,"change",l);mxEvent.addListener(c,"change",l);l();+"8px";d.appendChild(C);mxUtils.write(d,mxResources.get("embed")+" ");var F=b.getBasenames().join(";"),S=b.getCurrentFile();mxEvent.addListener(f,"change",l);mxEvent.addListener(p,"change",l);mxEvent.addListener(z,"change",l);mxEvent.addListener(E,"change",l);mxEvent.addListener(n,"change",l);mxEvent.addListener(t,"change",l);mxEvent.addListener(C,"change",l);mxEvent.addListener(P,"change",l);mxEvent.addListener(L,"change",l);mxEvent.addListener(e,"change",l);mxEvent.addListener(c,"change",l);l();mxEvent.addListener(K,"click",function(){K.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null)});g=document.createElement("div");g.style.paddingTop="12px";g.style.textAlign="right";y=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});y.className="geBtn gePrimaryBtn";g.appendChild(y);d.appendChild(g);this.container=d},CreateGraphDialog=function(b,g,l){var d=document.createElement("div");d.style.textAlign="right";this.init=function(){var q=document.createElement("div");q.style.position="relative";q.style.border="1px solid gray";q.style.boxSizing="border-box";q.style.width="100%";q.style.height="360px";q.style.overflow="hidden";q.style.marginBottom="16px";mxEvent.disableContextMenu(q);d.appendChild(q);var y=new Graph(q);y.setCellsCloneable(!0);y.setPanning(!0);y.setAllowDanglingEdges(!1);y.connectionHandler.select=!1;y.view.setTranslate(20,20);y.border=20;y.panningHandler.useLeftButtonForPanning=!0;mxClient.IS_SVG&&null!=y.view.getDrawPane()&&(q=y.view.getDrawPane().ownerSVGElement,null!=q&&(q.style.position="absolute"));var x="curved=1;";y.cellRenderer.installCellOverlayListeners=function(f,p,n){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(n.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(t){p.fireEvent(new mxEventObject("pointerdown","event",t,"state",f))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(n.node,"touchstart",function(t){p.fireEvent(new mxEventObject("pointerdown","event",t,"state",f))})};y.getAllConnectionConstraints=function(){return null};y.connectionHandler.marker.highlight.keepOnTop=!1;y.connectionHandler.createEdgeState=function(f){f=y.createEdge(null,null,null,null,null,x);return new mxCellState(this.graph.view,f,this.graph.getCellStyle(f))};var D=y.getDefaultParent(),J=mxUtils.bind(this,function(f){var p=new mxCellOverlay(this.connectImage,"Add outgoing");p.cursor="hand";p.addListener(mxEvent.CLICK,function(n,t){y.connectionHandler.reset();y.clearSelection();-var z=y.getCellGeometry(f),E;Q(function(){E=y.insertVertex(D,null,"Entry",z.x,z.y,80,30,"rounded=1;");J(E);y.view.refresh(E);y.insertEdge(D,null,"",f,E,x)},function(){y.scrollCellToVisible(E)})});p.addListener("pointerdown",function(n,t){n=t.getProperty("event");t=t.getProperty("state");y.popupMenuHandler.hideMenu();y.stopEditing(!1);var z=mxUtils.convertPoint(y.container,mxEvent.getClientX(n),mxEvent.getClientY(n));y.connectionHandler.start(t,z.x,z.y);y.isMouseDown=!0;y.isMouseTrigger=mxEvent.isMouseEvent(n);+var z=y.getCellGeometry(f),E;P(function(){E=y.insertVertex(D,null,"Entry",z.x,z.y,80,30,"rounded=1;");J(E);y.view.refresh(E);y.insertEdge(D,null,"",f,E,x)},function(){y.scrollCellToVisible(E)})});p.addListener("pointerdown",function(n,t){n=t.getProperty("event");t=t.getProperty("state");y.popupMenuHandler.hideMenu();y.stopEditing(!1);var z=mxUtils.convertPoint(y.container,mxEvent.getClientX(n),mxEvent.getClientY(n));y.connectionHandler.start(t,z.x,z.y);y.isMouseDown=!0;y.isMouseTrigger=mxEvent.isMouseEvent(n);mxEvent.consume(n)});y.addCellOverlay(f,p)});y.getModel().beginUpdate();try{var K=y.insertVertex(D,null,"Start",0,0,80,30,"ellipse");J(K)}finally{y.getModel().endUpdate()}if("horizontalTree"==l){var L=new mxCompactTreeLayout(y);L.edgeRouting=!1;L.levelDistance=30;L.sortEdges=!0;x="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==l?(L=new mxCompactTreeLayout(y,!1),L.edgeRouting=!1,L.levelDistance=30,L.sortEdges=!0,x="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==l?(L=new mxRadialTreeLayout(y,-!1),L.edgeRouting=!1,L.levelDistance=80):"verticalFlow"==l?L=new mxHierarchicalLayout(y,mxConstants.DIRECTION_NORTH):"horizontalFlow"==l?L=new mxHierarchicalLayout(y,mxConstants.DIRECTION_WEST):"circle"==l?L=new mxCircleLayout(y):(L=new mxFastOrganicLayout(y,!1),L.forceConstant=80);if(null!=L){var Q=function(f,p){y.getModel().beginUpdate();try{null!=f&&f(),L.execute(y.getDefaultParent(),K)}catch(n){throw n;}finally{f=new mxMorphing(y),f.addListener(mxEvent.DONE,mxUtils.bind(this,function(){y.getModel().endUpdate();-null!=p&&p()})),f.startAnimation()}},c=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(f,p,n,t,z){c.apply(this,arguments);Q()};y.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);Q()};y.connectionHandler.addListener(mxEvent.CONNECT,function(){Q()})}q=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});q.className="geBtn";b.editor.cancelFirst&&d.appendChild(q);var e=mxUtils.button(mxResources.get("insert"),+!1),L.edgeRouting=!1,L.levelDistance=80):"verticalFlow"==l?L=new mxHierarchicalLayout(y,mxConstants.DIRECTION_NORTH):"horizontalFlow"==l?L=new mxHierarchicalLayout(y,mxConstants.DIRECTION_WEST):"circle"==l?L=new mxCircleLayout(y):(L=new mxFastOrganicLayout(y,!1),L.forceConstant=80);if(null!=L){var P=function(f,p){y.getModel().beginUpdate();try{null!=f&&f(),L.execute(y.getDefaultParent(),K)}catch(n){throw n;}finally{f=new mxMorphing(y),f.addListener(mxEvent.DONE,mxUtils.bind(this,function(){y.getModel().endUpdate();+null!=p&&p()})),f.startAnimation()}},c=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(f,p,n,t,z){c.apply(this,arguments);P()};y.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);P()};y.connectionHandler.addListener(mxEvent.CONNECT,function(){P()})}q=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});q.className="geBtn";b.editor.cancelFirst&&d.appendChild(q);var e=mxUtils.button(mxResources.get("insert"),function(f){y.clearCellOverlays();var p=y.getModel().getChildren(y.getDefaultParent());f=mxEvent.isAltDown(f)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(y.getBoundingBoxFromGeometry(p,!0));p=b.editor.graph.importCells(p,f.x,f.y);f=b.editor.graph.view;var n=f.getBounds(p);null!=n&&(n.x-=f.translate.x,n.y-=f.translate.y,b.editor.graph.scrollRectToVisible(n),b.editor.graph.setSelectionCells(p));b.hideDialog()});d.appendChild(e);e.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(q);this.graph=y};this.container=d};CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+"/handle-connect.png",26,26);-var BackgroundImageDialog=function(b,g,l,d,q){function y(){null==m||m==mxConstants.NONE?(O.style.display="none",U.checked=!1):(O.style.backgroundColor=m,O.style.display="",U.checked=!0)}var x=b.editor.graph,D=document.createElement("div");D.style.whiteSpace="nowrap";var J=document.createElement("h2");mxUtils.write(J,mxResources.get("background"));J.style.marginTop="0px";D.appendChild(J);var K=null!=l&&null!=l.originalSrc;J=!1;var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-bottom:8px;";-L.setAttribute("value","url");L.setAttribute("type","radio");L.setAttribute("name","geBackgroundImageDialogOption");var Q=document.createElement("input");Q.style.cssText="margin-right:8px;margin-bottom:8px;";Q.setAttribute("value","url");Q.setAttribute("type","radio");Q.setAttribute("name","geBackgroundImageDialogOption");var c=document.createElement("input");c.setAttribute("type","text");c.style.marginBottom="8px";c.style.width="360px";c.value=K||null==l?"":l.src;var e=document.createElement("select");-e.style.width="360px";if(null!=b.pages)for(var f=0;f<b.pages.length;f++){var p=document.createElement("option");mxUtils.write(p,b.pages[f].getName()||mxResources.get("pageWithNumber",[f+1]));p.setAttribute("value","data:page/id,"+b.pages[f].getId());b.pages[f]==b.currentPage&&p.setAttribute("disabled","disabled");null!=l&&l.originalSrc==p.getAttribute("value")&&(p.setAttribute("selected","selected"),J=!0);e.appendChild(p)}K||null!=b.pages&&1!=b.pages.length||(L.style.display="none",Q.style.display=-"none",e.style.display="none");var n=document.createElement("option"),t=!1,z=!1,E=function(A,B){t||null!=A&&z||(Q.checked?null!=B&&B(n.selected?null:e.value):""==c.value||b.isOffline()?(F.value="",R.value="",null!=B&&B("")):(c.value=mxUtils.trim(c.value),b.loadImage(c.value,function(H){F.value=H.width;R.value=H.height;null!=B&&B(c.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));F.value="";R.value="";null!=B&&B(null)})))},C=mxUtils.bind(this,-function(A){b.importFiles(A,0,0,b.maxBackgroundSize,function(B,H,T,k,v,G){c.value=B;E();c.focus()},function(){},function(B){return"image/"==B.type.substring(0,6)},function(B){for(var H=0;H<B.length;H++)B[H]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){K?e.focus():c.focus();mxEvent.addListener(e,"focus",function(){L.removeAttribute("checked");Q.setAttribute("checked","checked");Q.checked=!0});mxEvent.addListener(c,"focus",function(){Q.removeAttribute("checked");L.setAttribute("checked",+var BackgroundImageDialog=function(b,g,l,d,q){function y(){null==m||m==mxConstants.NONE?(N.style.display="none",U.checked=!1):(N.style.backgroundColor=m,N.style.display="",U.checked=!0)}var x=b.editor.graph,D=document.createElement("div");D.style.whiteSpace="nowrap";var J=document.createElement("h2");mxUtils.write(J,mxResources.get("background"));J.style.marginTop="0px";D.appendChild(J);var K=null!=l&&null!=l.originalSrc;J=!1;var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-bottom:8px;";+L.setAttribute("value","url");L.setAttribute("type","radio");L.setAttribute("name","geBackgroundImageDialogOption");var P=document.createElement("input");P.style.cssText="margin-right:8px;margin-bottom:8px;";P.setAttribute("value","url");P.setAttribute("type","radio");P.setAttribute("name","geBackgroundImageDialogOption");var c=document.createElement("input");c.setAttribute("type","text");c.style.marginBottom="8px";c.style.width="360px";c.value=K||null==l?"":l.src;var e=document.createElement("select");+e.style.width="360px";if(null!=b.pages)for(var f=0;f<b.pages.length;f++){var p=document.createElement("option");mxUtils.write(p,b.pages[f].getName()||mxResources.get("pageWithNumber",[f+1]));p.setAttribute("value","data:page/id,"+b.pages[f].getId());b.pages[f]==b.currentPage&&p.setAttribute("disabled","disabled");null!=l&&l.originalSrc==p.getAttribute("value")&&(p.setAttribute("selected","selected"),J=!0);e.appendChild(p)}K||null!=b.pages&&1!=b.pages.length||(L.style.display="none",P.style.display=+"none",e.style.display="none");var n=document.createElement("option"),t=!1,z=!1,E=function(A,B){t||null!=A&&z||(P.checked?null!=B&&B(n.selected?null:e.value):""==c.value||b.isOffline()?(F.value="",S.value="",null!=B&&B("")):(c.value=mxUtils.trim(c.value),b.loadImage(c.value,function(H){F.value=H.width;S.value=H.height;null!=B&&B(c.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));F.value="";S.value="";null!=B&&B(null)})))},C=mxUtils.bind(this,+function(A){b.importFiles(A,0,0,b.maxBackgroundSize,function(B,H,T,k,v,G){c.value=B;E();c.focus()},function(){},function(B){return"image/"==B.type.substring(0,6)},function(B){for(var H=0;H<B.length;H++)B[H]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){K?e.focus():c.focus();mxEvent.addListener(e,"focus",function(){L.removeAttribute("checked");P.setAttribute("checked","checked");P.checked=!0});mxEvent.addListener(c,"focus",function(){P.removeAttribute("checked");L.setAttribute("checked","checked");L.checked=!0});if(Graph.fileSupport){c.setAttribute("placeholder",mxResources.get("dragImagesHere"));var A=D.parentNode,B=null;mxEvent.addListener(A,"dragleave",function(H){null!=B&&(B.parentNode.removeChild(B),B=null);H.stopPropagation();H.preventDefault()});mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(H){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=b.highlightElement(A));H.stopPropagation();H.preventDefault()}));mxEvent.addListener(A,"drop",mxUtils.bind(this,function(H){null!=B&&(B.parentNode.removeChild(B),B=null);if(0<H.dataTransfer.files.length)C(H.dataTransfer.files);else if(0<=mxUtils.indexOf(H.dataTransfer.types,"text/uri-list")){var T=H.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)&&(c.value=decodeURIComponent(T),E())}H.stopPropagation();H.preventDefault()}),!1)}};D.appendChild(L);D.appendChild(c);mxUtils.br(D);f=document.createElement("span");f.style.marginLeft="30px";mxUtils.write(f,mxResources.get("width")+-":");D.appendChild(f);var F=document.createElement("input");F.setAttribute("type","text");F.style.width="60px";F.style.marginLeft="8px";F.style.marginRight="16px";F.value=null==l||K?"":l.width;D.appendChild(F);mxUtils.write(D,mxResources.get("height")+":");var R=document.createElement("input");R.setAttribute("type","text");R.style.width="60px";R.style.marginLeft="8px";R.style.marginRight="16px";R.value=null==l||K?"":l.height;D.appendChild(R);mxUtils.br(D);mxUtils.br(D);mxEvent.addListener(c,"change",-E);ImageDialog.filePicked=function(A){A.action==google.picker.Action.PICKED&&null!=A.docs[0].thumbnails&&(A=A.docs[0].thumbnails[A.docs[0].thumbnails.length-1],null!=A&&(c.value=A.url,E()));c.focus()};D.appendChild(Q);D.appendChild(e);mxUtils.br(D);mxUtils.br(D);K?(Q.setAttribute("checked","checked"),Q.checked=!0):(L.setAttribute("checked","checked"),L.checked=!0);!J&&Q.checked&&(mxUtils.write(n,mxResources.get("pageNotFound")),n.setAttribute("disabled","disabled"),n.setAttribute("selected","selected"),+":");D.appendChild(f);var F=document.createElement("input");F.setAttribute("type","text");F.style.width="60px";F.style.marginLeft="8px";F.style.marginRight="16px";F.value=null==l||K?"":l.width;D.appendChild(F);mxUtils.write(D,mxResources.get("height")+":");var S=document.createElement("input");S.setAttribute("type","text");S.style.width="60px";S.style.marginLeft="8px";S.style.marginRight="16px";S.value=null==l||K?"":l.height;D.appendChild(S);mxUtils.br(D);mxUtils.br(D);mxEvent.addListener(c,"change",+E);ImageDialog.filePicked=function(A){A.action==google.picker.Action.PICKED&&null!=A.docs[0].thumbnails&&(A=A.docs[0].thumbnails[A.docs[0].thumbnails.length-1],null!=A&&(c.value=A.url,E()));c.focus()};D.appendChild(P);D.appendChild(e);mxUtils.br(D);mxUtils.br(D);K?(P.setAttribute("checked","checked"),P.checked=!0):(L.setAttribute("checked","checked"),L.checked=!0);!J&&P.checked&&(mxUtils.write(n,mxResources.get("pageNotFound")),n.setAttribute("disabled","disabled"),n.setAttribute("selected","selected"),n.setAttribute("value","pageNotFound"),e.appendChild(n),mxEvent.addListener(e,"change",function(){null==n.parentNode||n.selected||n.parentNode.removeChild(n)}));l=document.createElement("div");l.style.display=q?"inline-flex":"none";l.style.alignItems="center";l.style.cursor="default";l.style.minWidth="40%";l.style.height="20px";var U=document.createElement("input");U.setAttribute("type","checkbox");U.style.margin="0px 10px 0px 4px";U.style.verticalAlign="bottom";U.defaultChecked=d!=mxConstants.NONE&&-null!=d;U.checked=U.defaultChecked;l.appendChild(U);mxUtils.write(l,mxResources.get("fillColor"));q=l.cloneNode(!1);var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.margin="0px 10px 0px 30px";P.style.verticalAlign="bottom";P.defaultChecked=x.shadowVisible;P.checked=P.defaultChecked;q.appendChild(P);mxUtils.write(q,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||P.setAttribute("disabled","disabled");mxEvent.addListener(q,"click",function(A){mxEvent.getSource(A)!=-P&&(P.checked=!P.checked)});var O=document.createElement("button");O.style.width="36px";O.style.height="18px";O.style.cursor="pointer";O.style.marginLeft="10px";O.style.backgroundPosition="center center";O.style.backgroundRepeat="no-repeat";O.style.verticalAlign="bottom";O.className="geColorBtn";var m=d;y();mxEvent.addListener(l,"click",function(A){mxEvent.getSource(A)!=U&&(U.checked=!U.checked);m=U.checked?"#ffffff":null;y()});mxEvent.addListener(O,"click",function(A){b.pickColor(m||"none",function(B){m=-B;y()});mxEvent.consume(A)});l.appendChild(O);D.appendChild(l);D.appendChild(q);mxUtils.br(D);d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";x=mxUtils.button(mxResources.get("cancel"),function(){t=!0;b.hideDialog()});x.className="geBtn";b.editor.cancelFirst&&d.appendChild(x);q=mxUtils.button(mxResources.get("reset"),function(){c.value="";F.value="";R.value="";L.checked=!0;m=mxConstants.NONE;y();t=!1});mxEvent.addGestureListeners(q,function(){t=!0});q.className=+null!=d;U.checked=U.defaultChecked;l.appendChild(U);mxUtils.write(l,mxResources.get("fillColor"));q=l.cloneNode(!1);var O=document.createElement("input");O.setAttribute("type","checkbox");O.style.margin="0px 10px 0px 30px";O.style.verticalAlign="bottom";O.defaultChecked=x.shadowVisible;O.checked=O.defaultChecked;q.appendChild(O);mxUtils.write(q,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||O.setAttribute("disabled","disabled");mxEvent.addListener(q,"click",function(A){mxEvent.getSource(A)!=+O&&(O.checked=!O.checked)});var N=document.createElement("button");N.style.width="36px";N.style.height="18px";N.style.cursor="pointer";N.style.marginLeft="10px";N.style.backgroundPosition="center center";N.style.backgroundRepeat="no-repeat";N.style.verticalAlign="bottom";N.className="geColorBtn";var m=d;y();mxEvent.addListener(l,"click",function(A){mxEvent.getSource(A)!=U&&(U.checked=!U.checked);m=U.checked?"#ffffff":null;y()});mxEvent.addListener(N,"click",function(A){b.pickColor(m||"none",function(B){m=+B;y()});mxEvent.consume(A)});l.appendChild(N);D.appendChild(l);D.appendChild(q);mxUtils.br(D);d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";x=mxUtils.button(mxResources.get("cancel"),function(){t=!0;b.hideDialog()});x.className="geBtn";b.editor.cancelFirst&&d.appendChild(x);q=mxUtils.button(mxResources.get("reset"),function(){c.value="";F.value="";S.value="";L.checked=!0;m=mxConstants.NONE;y();t=!1});mxEvent.addGestureListeners(q,function(){t=!0});q.className="geBtn";q.width="100";d.appendChild(q);if(Graph.fileSupport){var u=document.createElement("input");u.setAttribute("multiple","multiple");u.setAttribute("type","file");mxEvent.addListener(u,"change",function(A){null!=u.files&&(C(u.files),u.type="",u.type="file",u.value="")});u.style.display="none";D.appendChild(u);q=mxUtils.button(mxResources.get("open"),function(){u.click()});q.className="geBtn";d.appendChild(q)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();E(null,function(A){g(""!=-A&&null!=A?new mxImage(A,F.value,R.value):null,null==A,m,!mxClient.IS_SVG||mxClient.IS_SF?null:P.checked)})});mxEvent.addGestureListeners(applyBtn,function(){z=!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(x);D.appendChild(d);this.container=D},ParseDialog=function(b,g,l){function d(e,f,p){var n=e.split("\n");if("plantUmlPng"==f||"plantUmlSvg"==f||"plantUmlTxt"==f){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var t=function(T,+A&&null!=A?new mxImage(A,F.value,S.value):null,null==A,m,!mxClient.IS_SVG||mxClient.IS_SF?null:O.checked)})});mxEvent.addGestureListeners(applyBtn,function(){z=!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(x);D.appendChild(d);this.container=D},ParseDialog=function(b,g,l){function d(e,f,p){var n=e.split("\n");if("plantUmlPng"==f||"plantUmlSvg"==f||"plantUmlTxt"==f){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var t=function(T,k,v,G,I){y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(new mxRectangle(0,0,G,I));var M=null;z.getModel().beginUpdate();try{M="txt"==k?b.insertAsPreText(v,y.x,y.y):z.insertVertex(null,null,null,y.x,y.y,G,I,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(v)+";"),z.setAttributeForCell(M,"plantUmlData",JSON.stringify({data:T,format:k},null,2))}finally{z.getModel().endUpdate()}null!=M&&(z.setSelectionCell(M),z.scrollCellToVisible(M))},z=b.editor.graph,E="plantUmlTxt"==f?"txt":"plantUmlPng"==f?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==e&&"svg"==E?window.setTimeout(function(){b.spinner.stop();t(e,E,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",295,212)},200):b.generatePlantUmlImage(e,E,function(T,k,v){b.spinner.stop();t(e,E,T,k,v)},function(T){b.handleError(T)})}}else if("mermaid"==f||"mermaid2drawio"==f){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var C=0;C<n.length&&(0==n[C].trim().length||"%%"==n[C].substring(0,2));)C++;if("---"==n[C].trim()){do C++;while(C<n.length&&"---"!=n[C].trim());C++}C=n[C].trim().toLowerCase();n=C.indexOf(" ");C=C.substring(0,0<n?n:C.length);var F="undefined"!==typeof mxMermaidToDrawio&&"mermaid2drawio"==f&&("graph"==C||"flowchart"==C||"sequencediagram"==C||"classdiagram"==C||"statediagram-v2"==C||"statediagram"==C||"erdiagram"==C||"requirementdiagram"==C||"gitgraph"==C||"mindmap"==C||"journey"==C);z=b.editor.graph;F&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(T){b.spinner.stop();z.setSelectionCells(b.importXml(T,Math.max(y.x,20),Math.max(y.y,20),!0,null,null,!0));z.scrollCellToVisible(z.getSelectionCell())}));b.generateMermaidImage(e,null,function(T,k,v){if(!F){y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(new mxRectangle(0,0,k,v));b.spinner.stop();var G=null;z.getModel().beginUpdate();try{G=z.insertVertex(null,null,null,y.x,y.y,k,v,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+T+";"),z.setAttributeForCell(G,"mermaidData",JSON.stringify({data:e},null,2))}finally{z.getModel().endUpdate()}null!=G&&(z.setSelectionCell(G),z.scrollCellToVisible(G))}},function(T){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(T)})}}else if("table"==-f){f=null;var R=[],U=0,P={};for(C=0;C<n.length;C++){var O=mxUtils.trim(n[C]);if("primary key"==O.substring(0,11).toLowerCase()){var m=O.match(/\((.+)\)/);m&&m[1]&&(P[m[1]]=!0);n.splice(C,1)}else 0<O.toLowerCase().indexOf("primary key")&&(P[O.split(" ")[0]]=!0,n[C]=mxUtils.trim(O.replace(/primary key/i,"")))}for(C=0;C<n.length;C++)if(O=mxUtils.trim(n[C]),"create table"==O.substring(0,12).toLowerCase())O=mxUtils.trim(O.substring(12)),"("==O.charAt(O.length-1)&&(O=mxUtils.trim(O.substring(0,O.length--1))),f=new mxCell(O,new mxGeometry(U,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),f.vertex=!0,R.push(f),O=b.editor.graph.getPreferredSizeForCell(u),null!=O&&(f.geometry.width=O.width+10);else if(null!=f&&")"==O.charAt(0))U+=f.geometry.width+40,f=null;else if("("!=O&&null!=f){O=O.substring(0,","==O.charAt(O.length-1)?O.length-1:O.length);m=P[O.split(" ")[0]];var u=new mxCell("",new mxGeometry(0,-0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(m?"1":"0")+";");u.vertex=!0;var A=new mxCell(m?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(m?"fontStyle=1;":""));A.vertex=!0;u.insert(A);O=new mxCell(O,new mxGeometry(30,-0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(m?"fontStyle=5;":""));O.vertex=!0;u.insert(O);O=b.editor.graph.getPreferredSizeForCell(O);null!=O&&f.geometry.width<O.width+30&&(f.geometry.width=Math.min(320,Math.max(f.geometry.width,O.width+30)));f.insert(u,m?0:null);f.geometry.height+=30}0<R.length&&(z=b.editor.graph,y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(z.getBoundingBoxFromGeometry(R,-!0)),z.setSelectionCells(z.importCells(R,y.x,y.y)),z.scrollCellToVisible(z.getSelectionCell()))}else if("list"==f){if(0<n.length){z=b.editor.graph;f=null;R=[];for(C=u=0;C<n.length;C++)";"!=n[C].charAt(0)&&(0==n[C].length?f=null:null==f?(f=new mxCell(n[C],new mxGeometry(u,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),f.vertex=!0,R.push(f),O=z.getPreferredSizeForCell(f),-null!=O&&f.geometry.width<O.width+10&&(f.geometry.width=O.width+10),u+=f.geometry.width+40):"--"==n[C]?(O=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;"),O.vertex=!0,f.geometry.height+=O.geometry.height,f.insert(O)):0<n[C].length&&(U=new mxCell(n[C],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),-U.vertex=!0,O=z.getPreferredSizeForCell(U),null!=O&&U.geometry.width<O.width&&(U.geometry.width=O.width),f.geometry.width=Math.max(f.geometry.width,U.geometry.width),f.geometry.height+=U.geometry.height,f.insert(U)));if(0<R.length){y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(z.getBoundingBoxFromGeometry(R,!0));z.getModel().beginUpdate();try{R=z.importCells(R,y.x,y.y);O=[];for(C=0;C<R.length;C++)O.push(R[C]),O=O.concat(R[C].children);z.fireEvent(new mxEventObject("cellsInserted","cells",O))}finally{z.getModel().endUpdate()}z.setSelectionCells(R);-z.scrollCellToVisible(z.getSelectionCell())}}}else{u=function(T){var k=B[T];null==k&&(k=new mxCell(T,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),k.vertex=!0,B[T]=k,R.push(k));return k};var B={};R=[];for(C=0;C<n.length;C++)if(";"!=n[C].charAt(0)){var H=n[C].split("->");2<=H.length&&(m=u(H[0]),A=u(H[H.length-1]),H=new mxCell(2<H.length?H[1]:"",new mxGeometry),H.edge=!0,H.geometry.relative=!0,m.insertEdge(H,!0),A.insertEdge(H,!1),R.push(H))}if(0<R.length){n=document.createElement("div");n.style.visibility=-"hidden";document.body.appendChild(n);z=new Graph(n);z.getModel().beginUpdate();try{R=z.importCells(R);for(C=0;C<R.length;C++)z.getModel().isVertex(R[C])&&(O=z.getPreferredSizeForCell(R[C]),R[C].geometry.width=Math.max(R[C].geometry.width,O.width),R[C].geometry.height=Math.max(R[C].geometry.height,O.height));C=!0;"horizontalFlow"==f||"verticalFlow"==f?((new mxHierarchicalLayout(z,"horizontalFlow"==f?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(z.getDefaultParent(),R),C=!1):"circle"==-f?(new mxCircleLayout(z)).execute(z.getDefaultParent()):(U=new mxFastOrganicLayout(z),U.disableEdgeStyle=!1,U.forceConstant=180,U.execute(z.getDefaultParent()));C&&(P=new mxParallelEdgeLayout(z),P.spacing=30,P.execute(z.getDefaultParent()))}finally{z.getModel().endUpdate()}z.clearCellOverlays();O=[];b.editor.graph.getModel().beginUpdate();try{R=z.getModel().getChildren(z.getDefaultParent()),y=mxEvent.isAltDown(p)?y:b.editor.graph.getCenterInsertPoint(z.getBoundingBoxFromGeometry(R,!0)),O=b.editor.graph.importCells(R,-y.x,y.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",O))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(O);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());z.destroy();n.parentNode.removeChild(n)}}}function q(){return"list"==D.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==D.value||+f){f=null;var S=[],U=0,O={};for(C=0;C<n.length;C++){var N=mxUtils.trim(n[C]);if("primary key"==N.substring(0,11).toLowerCase()){var m=N.match(/\((.+)\)/);m&&m[1]&&(O[m[1]]=!0);n.splice(C,1)}else 0<N.toLowerCase().indexOf("primary key")&&(O[N.split(" ")[0]]=!0,n[C]=mxUtils.trim(N.replace(/primary key/i,"")))}for(C=0;C<n.length;C++)if(N=mxUtils.trim(n[C]),"create table"==N.substring(0,12).toLowerCase())N=mxUtils.trim(N.substring(12)),"("==N.charAt(N.length-1)&&(N=mxUtils.trim(N.substring(0,N.length-+1))),f=new mxCell(N,new mxGeometry(U,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),f.vertex=!0,S.push(f),N=b.editor.graph.getPreferredSizeForCell(u),null!=N&&(f.geometry.width=N.width+10);else if(null!=f&&")"==N.charAt(0))U+=f.geometry.width+40,f=null;else if("("!=N&&null!=f){N=N.substring(0,","==N.charAt(N.length-1)?N.length-1:N.length);m=O[N.split(" ")[0]];var u=new mxCell("",new mxGeometry(0,+0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(m?"1":"0")+";");u.vertex=!0;var A=new mxCell(m?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(m?"fontStyle=1;":""));A.vertex=!0;u.insert(A);N=new mxCell(N,new mxGeometry(30,+0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(m?"fontStyle=5;":""));N.vertex=!0;u.insert(N);N=b.editor.graph.getPreferredSizeForCell(N);null!=N&&f.geometry.width<N.width+30&&(f.geometry.width=Math.min(320,Math.max(f.geometry.width,N.width+30)));f.insert(u,m?0:null);f.geometry.height+=30}0<S.length&&(z=b.editor.graph,y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(z.getBoundingBoxFromGeometry(S,+!0)),z.setSelectionCells(z.importCells(S,y.x,y.y)),z.scrollCellToVisible(z.getSelectionCell()))}else if("list"==f){if(0<n.length){z=b.editor.graph;f=null;S=[];for(C=u=0;C<n.length;C++)";"!=n[C].charAt(0)&&(0==n[C].length?f=null:null==f?(f=new mxCell(n[C],new mxGeometry(u,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),f.vertex=!0,S.push(f),N=z.getPreferredSizeForCell(f),+null!=N&&f.geometry.width<N.width+10&&(f.geometry.width=N.width+10),u+=f.geometry.width+40):"--"==n[C]?(N=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;"),N.vertex=!0,f.geometry.height+=N.geometry.height,f.insert(N)):0<n[C].length&&(U=new mxCell(n[C],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),+U.vertex=!0,N=z.getPreferredSizeForCell(U),null!=N&&U.geometry.width<N.width&&(U.geometry.width=N.width),f.geometry.width=Math.max(f.geometry.width,U.geometry.width),f.geometry.height+=U.geometry.height,f.insert(U)));if(0<S.length){y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(z.getBoundingBoxFromGeometry(S,!0));z.getModel().beginUpdate();try{S=z.importCells(S,y.x,y.y);N=[];for(C=0;C<S.length;C++)N.push(S[C]),N=N.concat(S[C].children);z.fireEvent(new mxEventObject("cellsInserted","cells",N))}finally{z.getModel().endUpdate()}z.setSelectionCells(S);+z.scrollCellToVisible(z.getSelectionCell())}}}else{u=function(T){var k=B[T];null==k&&(k=new mxCell(T,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),k.vertex=!0,B[T]=k,S.push(k));return k};var B={};S=[];for(C=0;C<n.length;C++)if(";"!=n[C].charAt(0)){var H=n[C].split("->");2<=H.length&&(m=u(H[0]),A=u(H[H.length-1]),H=new mxCell(2<H.length?H[1]:"",new mxGeometry),H.edge=!0,H.geometry.relative=!0,m.insertEdge(H,!0),A.insertEdge(H,!1),S.push(H))}if(0<S.length){n=document.createElement("div");n.style.visibility=+"hidden";document.body.appendChild(n);z=new Graph(n);z.getModel().beginUpdate();try{S=z.importCells(S);for(C=0;C<S.length;C++)z.getModel().isVertex(S[C])&&(N=z.getPreferredSizeForCell(S[C]),S[C].geometry.width=Math.max(S[C].geometry.width,N.width),S[C].geometry.height=Math.max(S[C].geometry.height,N.height));C=!0;"horizontalFlow"==f||"verticalFlow"==f?((new mxHierarchicalLayout(z,"horizontalFlow"==f?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(z.getDefaultParent(),S),C=!1):"circle"==+f?(new mxCircleLayout(z)).execute(z.getDefaultParent()):(U=new mxFastOrganicLayout(z),U.disableEdgeStyle=!1,U.forceConstant=180,U.execute(z.getDefaultParent()));C&&(O=new mxParallelEdgeLayout(z),O.spacing=30,O.execute(z.getDefaultParent()))}finally{z.getModel().endUpdate()}z.clearCellOverlays();N=[];b.editor.graph.getModel().beginUpdate();try{S=z.getModel().getChildren(z.getDefaultParent()),y=mxEvent.isAltDown(p)?y:b.editor.graph.getCenterInsertPoint(z.getBoundingBoxFromGeometry(S,!0)),N=b.editor.graph.importCells(S,+y.x,y.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",N))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(N);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());z.destroy();n.parentNode.removeChild(n)}}}function q(){return"list"==D.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==D.value||"mermaid2drawio"==D.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==D.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==D.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":"plantUmlSvg"==D.value||"plantUmlTxt"==D.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var y=b.editor.graph.getFreeInsertPoint();g=document.createElement("div");g.style.textAlign="right";var x=document.createElement("textarea");x.style.boxSizing="border-box";x.style.resize="none";x.style.width="100%";x.style.height="354px";x.style.marginBottom="16px";var D=document.createElement("select");D.className="geBtn";if("formatSql"==l||"mermaid"==l&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())D.style.display="none";var J=document.createElement("option");J.setAttribute("value","list");mxUtils.write(J,mxResources.get("list"));"plantUml"!=l&&"mermaid"!=l&&D.appendChild(J);null!=l&&"fromText"!=l||J.setAttribute("selected","selected");J=document.createElement("option");J.setAttribute("value","table");mxUtils.write(J,mxResources.get("formatSql"));"formatSql"==l&&(D.appendChild(J),J.setAttribute("selected","selected"));J=document.createElement("option");J.setAttribute("value","mermaid");mxUtils.write(J,mxResources.get("image"));if("mermaid"==l)if("undefined"!==typeof mxMermaidToDrawio){var K=document.createElement("option");K.setAttribute("value","mermaid2drawio");K.setAttribute("selected","selected");mxUtils.write(K,mxResources.get("diagram"));D.appendChild(K)}else D.style.display=-"none";D.appendChild(J);J=document.createElement("option");J.setAttribute("value","diagram");mxUtils.write(J,mxResources.get("diagram"));K=document.createElement("option");K.setAttribute("value","circle");mxUtils.write(K,mxResources.get("circle"));var L=document.createElement("option");L.setAttribute("value","horizontalFlow");mxUtils.write(L,mxResources.get("horizontalFlow"));var Q=document.createElement("option");Q.setAttribute("value","verticalFlow");mxUtils.write(Q,mxResources.get("verticalFlow"));-"plantUml"!=l&&"mermaid"!=l&&(D.appendChild(J),D.appendChild(K),D.appendChild(L),D.appendChild(Q));J=document.createElement("option");J.setAttribute("value","plantUmlSvg");mxUtils.write(J,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==l&&J.setAttribute("selected","selected");K=document.createElement("option");K.setAttribute("value","plantUmlPng");mxUtils.write(K,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");L=document.createElement("option");L.setAttribute("value",+"none";D.appendChild(J);J=document.createElement("option");J.setAttribute("value","diagram");mxUtils.write(J,mxResources.get("diagram"));K=document.createElement("option");K.setAttribute("value","circle");mxUtils.write(K,mxResources.get("circle"));var L=document.createElement("option");L.setAttribute("value","horizontalFlow");mxUtils.write(L,mxResources.get("horizontalFlow"));var P=document.createElement("option");P.setAttribute("value","verticalFlow");mxUtils.write(P,mxResources.get("verticalFlow"));+"plantUml"!=l&&"mermaid"!=l&&(D.appendChild(J),D.appendChild(K),D.appendChild(L),D.appendChild(P));J=document.createElement("option");J.setAttribute("value","plantUmlSvg");mxUtils.write(J,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==l&&J.setAttribute("selected","selected");K=document.createElement("option");K.setAttribute("value","plantUmlPng");mxUtils.write(K,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");L=document.createElement("option");L.setAttribute("value","plantUmlTxt");mxUtils.write(L,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==l&&(D.appendChild(J),D.appendChild(K),D.appendChild(L));var c=q();x.value=c;g.appendChild(x);this.init=function(){x.focus()};Graph.fileSupport&&(x.addEventListener("dragover",function(e){e.stopPropagation();e.preventDefault()},!1),x.addEventListener("drop",function(e){e.stopPropagation();e.preventDefault();if(0<e.dataTransfer.files.length){e=e.dataTransfer.files[0];var f=new FileReader;f.onload=function(p){x.value=p.target.result};f.readAsText(e)}},!1));g.appendChild(D);mxEvent.addListener(D,"change",function(){var e=q();if(0==x.value.length||x.value==c)c=e,x.value=c});b.isOffline()||"mermaid"!=l&&"plantUml"!=l||(J=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==l?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),J.className="geBtn",g.appendChild(J));J=mxUtils.button(mxResources.get("close"),-function(){x.value==c?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});J.className="geBtn";b.editor.cancelFirst&&g.appendChild(J);K=mxUtils.button(mxResources.get("insert"),function(e){try{b.hideDialog(),d(x.value,D.value,e)}catch(f){b.handleError(f)}});K.className="geBtn gePrimaryBtn";g.appendChild(K);b.editor.cancelFirst||g.appendChild(J);this.container=g},NewDialog=function(b,g,l,d,q,y,x,D,J,K,L,Q,c,e,f,p,n,t){function z(ka){null!=ka&&(ma=Aa=ka?135:140);ka=!0;-if(null!=Ua)for(;k<Ua.length&&(ka||0!=mxUtils.mod(k,30));){var ta=Ua[k++];ta=m(ta.url,ta.libs,ta.title,ta.tooltip?ta.tooltip:ta.title,ta.select,ta.imgUrl,ta.info,ta.onClick,ta.preview,ta.noImg,ta.clibs,ta.type);ka&&ta.click();ka=!1}}function E(ka,ta,ra,la,qa,ya){if(null!=ka&&mxUtils.isAncestorNode(document.body,la)){ka=mxUtils.parseXml(ka);ka=Editor.parseDiagramNode(ka.documentElement,null,!0);var Ea=new mxCodec(ka.ownerDocument),Ha=new mxGraphModel;Ea.decode(ka,Ha);b.sidebar.createTooltip(la,Ha.root.children,-Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=qa?mxResources.get(qa):null,!0,new mxPoint(ta,ra),!0,function(){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=ya&&R(la,null,null,ya,infoObj,clibs)},!0,!1)}}function C(){var ka=document.createElement("div");ka.style.position="absolute";ka.style.overflow="visible";+function(){x.value==c?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});J.className="geBtn";b.editor.cancelFirst&&g.appendChild(J);K=mxUtils.button(mxResources.get("insert"),function(e){try{b.hideDialog(),d(x.value,D.value,e)}catch(f){b.handleError(f)}});K.className="geBtn gePrimaryBtn";g.appendChild(K);b.editor.cancelFirst||g.appendChild(J);this.container=g},NewDialog=function(b,g,l,d,q,y,x,D,J,K,L,P,c,e,f,p,n,t){function z(ka){null!=ka&&(la=Ea=ka?135:140);ka=!0;+if(null!=Ua)for(;k<Ua.length&&(ka||0!=mxUtils.mod(k,30));){var ta=Ua[k++];ta=m(ta.url,ta.libs,ta.title,ta.tooltip?ta.tooltip:ta.title,ta.select,ta.imgUrl,ta.info,ta.onClick,ta.preview,ta.noImg,ta.clibs,ta.type);ka&&ta.click();ka=!1}}function E(ka,ta,ra,ma,pa,ya){if(null!=ka&&mxUtils.isAncestorNode(document.body,ma)){ka=mxUtils.parseXml(ka);ka=Editor.parseDiagramNode(ka.documentElement,null,!0);var Fa=new mxCodec(ka.ownerDocument),Ha=new mxGraphModel;Fa.decode(ka,Ha);b.sidebar.createTooltip(ma,Ha.root.children,+Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=pa?mxResources.get(pa):null,!0,new mxPoint(ta,ra),!0,function(){Q=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=ya&&S(ma,null,null,ya,infoObj,clibs)},!0,!1)}}function C(){var ka=document.createElement("div");ka.style.position="absolute";ka.style.overflow="visible";ka.style.left="8px";ka.style.right="8px";ka.style.bottom="8px";ka.style.top="8px";mxUtils.write(ka,mxResources.get("describeYourDiagram")+":");mxUtils.br(ka);var ta=document.createElement("input");ta.setAttribute("type","text");ta.setAttribute("placeholder",mxResources.get("processForHiringNewEmployee"));ta.style.width="100%";ta.style.marginTop="6px";ta.style.marginBottom="4px";ta.style.boxSizing="border-box";ka.appendChild(ta);ka.init=function(){ta.focus()};mxUtils.br(ka);var ra=document.createElement("div");-ra.style.top="86px";ra.style.left="2px";ra.style.right="2px";ra.style.bottom="2px";ra.style.position="absolute";ra.style.border="1px solid #424242";var la=document.createElement("div");la.style.boxSizing="border-box";la.style.position="relative";la.style.textAlign="center";la.style.top="50%";mxUtils.write(la,mxResources.get("blankDiagram"));ra.appendChild(la);var qa=document.createElement("select");qa.className="geBtn";qa.style.maxWidth="160px";qa.style.marginLeft="0px";la=document.createElement("option");-mxUtils.write(la,mxResources.get("diagramType"));la.setAttribute("value","");qa.appendChild(la);for(var ya=0;ya<EditorUi.mermaidDiagramTypes.length;ya++){la=document.createElement("option");var Ea=EditorUi.mermaidDiagramTypes[ya],Ha=Ea;Ea==urlParams["smart-template-type"]&&la.setAttribute("selected","selected");"erDiagram"==Ha&&(Ha="entityRelationshipDiagram");Ha=mxResources.get(Ha,null,Ha.charAt(0).toUpperCase()+Ha.substring(1).replace(/[A-Z]/g," $&"));la.setAttribute("value",Ea);mxUtils.write(la,-Ha);qa.appendChild(la)}var Pa=mxUtils.button(mxResources.get("generate"),function(){var Ka=ta.value,Na=qa.value.replace(/([A-Z])/g," $1").toLowerCase();Ka="Write the declaration code for a detailed and complex "+(""!=Na?Na:"graph")+' that shows "'+(""!=Ka?Ka:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Na=""!=qa.value?" ("+mxUtils.trim(mxUtils.getTextContent(qa.options[qa.selectedIndex]))+")":"";var Va="gantt"==qa.value||"pie"==qa.value||-"timeline"==qa.value||"quadrantchart"==qa.value||"c4context"==qa.value,Ma=ta.value+Na;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(Qa){Va||(ia=aa=Qa,wa="Smart Template: "+Ma)}));b.spinner.spin(document.body,mxResources.get("loading"))&&b.generateOpenAiMermaidDiagram(Ka,function(Qa,Ya,Ga,fb){b.spinner.stop();ra.innerHTML="";var Ta=document.createElement("img");Ta.setAttribute("title",Ma);Ta.src="data:image/svg+xml;base64,"+Ya.substring(Ya.indexOf(",")+-1);Ta.style.cursor="pointer";Ta.style.width="100%";Ta.style.height="100%";ra.appendChild(Ta);Qa=b.createMermaidXml(Qa,EditorUi.defaultMermaidConfig,Ya,Ga,fb,Ma);var ib="<mxfile><diagram>"+Graph.compress(Qa)+"</diagram></mxfile>";if(Va||"undefined"===typeof mxMermaidToDrawio)ia=aa=Qa;Qa=I.cloneNode(!0);ra.appendChild(Qa);Ya=function(gb){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Ga=function(gb){S||E(ib,mxEvent.getClientX(gb),mxEvent.getClientY(gb),Ta,Ma)};mxEvent.addGestureListeners(Ta,-Ya,null,Ga);mxEvent.addGestureListeners(Qa,Ya,null,Ga)},function(Qa){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();b.handleError(Qa)})});Pa.setAttribute("disabled","disabled");Pa.className="geBtn gePrimaryBtn";la=function(){window.setTimeout(function(){""!=ta.value?Pa.removeAttribute("disabled"):Pa.setAttribute("disabled","disabled")},0)};ya=urlParams["smart-template"];null!=ya&&"1"!=ya&&(ta.value=decodeURIComponent(ya),la(),"1"==urlParams["smart-template-generate"]&&-window.setTimeout(function(){Pa.click()},0));mxEvent.addListener(ta,"change",la);mxEvent.addListener(ta,"keydown",la);mxEvent.addListener(ta,"cut",la);mxEvent.addListener(ta,"paste",la);mxEvent.addListener(ta,"keydown",function(Ka){13==Ka.keyCode&&Pa.click()});la=document.createElement("div");la.style.height="40px";la.style.marginTop="4px";la.style.marginBottom="4px";la.style.whiteSpace="nowrap";la.style.overflowX="auto";la.style.overflowY="hidden";la.appendChild(qa);la.appendChild(Pa);ka.appendChild(la);-ka.appendChild(ra);return ka}function F(){null!=aa&&aa==ia&&EditorUi.logEvent({category:"OPENAI-DIAGRAM",action:"templateGenerated",label:wa});if(ha&&null!=e)l||b.hideDialog(),e(ha,na,T.value);else if(d)l||b.hideDialog(),d(aa,T.value,pa,ca);else{var ka=T.value;if(null!=ka&&0<ka.length){var ta=function(la,qa,ya){b.createFile(ya,aa,null!=ca&&0<ca.length?ca:null,la,function(){b.hideDialog()},null,qa,null,null!=fa&&0<fa.length?fa:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var ra=new SaveDialog(b,-ka,mxUtils.bind(this,function(la,qa,ya){ta(qa,ya,la.value)}),null,null,null,null,b.mode);b.showDialog(ra.container,420,150,!0,!1);ra.init()}else b.pickFolder(b.mode,function(la){ta(b.mode,la,ka)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function R(ka,ta,ra,la,qa,ya,Ea){return da!=ka?(null!=da&&(da.style.backgroundColor="transparent",da.style.border="2px solid transparent",0<da.getElementsByTagName("table").length&&(da.getElementsByTagName("table")[0].style.visibility=-"visible"),da==sa&&(sa.style.backgroundImage=Ia,sa.style.backgroundPosition="center center",sa.style.backgroundRepeat="no-repeat",sa.style.backgroundSize="contain",xa.style.visibility="hidden",Ba.style.visibility="hidden",Da.style.visibility="hidden",za.style.visibility="hidden",Fa.style.visibility=null!=ia?"visible":"hidden",sa.getElementsByTagName("table")[0].style.visibility="visible")),""!=ka.style.backgroundImage&&0<ka.getElementsByTagName("table").length&&(ka.getElementsByTagName("table")[0].style.visibility=-"hidden"),ka==sa&&(ta=ia,null!=ta?(Fa.style.visibility="visible",Fa.style.visibility=null!=ia?"visible":"hidden",za.style.visibility="visible"):(xa.style.visibility="visible",Ba.style.visibility="visible",Da.style.visibility="visible",za.style.visibility="hidden",Fa.style.visibility="hidden")),G.removeAttribute("disabled"),aa=ta,ca=ra,fa=ya,da=ka,ha=la,pa=Ea,na=qa,da.style.border=J,!0):!1}function U(){sa.style.backgroundImage="";sa.getElementsByTagName("table")[0].style.visibility="hidden";xa.style.visibility=-"visible";Ba.style.visibility="visible";Da.style.visibility="visible";za.style.visibility="hidden";Fa.style.visibility="hidden";xa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?xa.select():document.execCommand("selectAll",!1,null)}function P(){xa.style.visibility="hidden";Ba.style.visibility="hidden";Da.style.visibility="hidden";sa.style.backgroundImage=Ia;sa.style.backgroundSize="contain";za.style.visibility="visible";Fa.style.visibility="visible"}function O(ka){var ta=mxUtils.trim(xa.value);-if(ka||""==ta)null!=wa&&(xa.value=wa,P());else{xa.style.visibility="hidden";Ba.style.visibility="hidden";Da.style.visibility="hidden";var ra=!1;ka='Write a detailed and complex MermaidJS declaration for "'+(""!=ta?ta:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(la){la!=b.emptyDiagramXml&&(ra=!0,aa=la)}));sa.style.backgroundImage="url("+Editor.spinImage+-")";sa.style.backgroundSize="12px 12px";b.generateOpenAiMermaidDiagram(ka,function(la,qa,ya,Ea){da==sa&&"hidden"==xa.style.visibility&&(Ia="url(data:image/svg+xml;base64,"+qa.substring(qa.indexOf(",")+1)+")",sa.setAttribute("title",ta),ia=aa=la=ra?aa:b.createMermaidXml(la,EditorUi.defaultMermaidConfig,qa,ya,Ea,ta),wa=ta,P())},function(la){da==sa&&(xa.style.visibility="visible",Ba.style.visibility="visible",Da.style.visibility="visible",za.style.visibility="visible",Fa.style.visibility="visible",b.handleError(la))})}}-function m(ka,ta,ra,la,qa,ya,Ea,Ha,Pa,Ka,Na,Va){function Ma(Oa,bb){null==fb?(Ta=Oa,Ta=/^https?:\/\//.test(Ta)?b.editor.isCorsEnabledForUrl(Ta)?Ta:PROXY_URL+"?url="+encodeURIComponent(Ta):TEMPLATE_PATH+"/"+Ta,mxUtils.get(Ta,mxUtils.bind(this,function(cb){200<=cb.getStatus()&&299>=cb.getStatus()&&(fb=cb.getText());bb(fb,Ta)}))):bb(fb,Ta)}function Qa(Oa,bb){if(null==ka||M||b.sidebar.currentElt==Ga)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=N){var cb="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+-N.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+N.naturalWidth+'" height="'+N.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";E(cb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),ra,ka)}else b.sidebar.currentElt=Ga,M=!0,Ma(ka,function(hb){if(M&&b.sidebar.currentElt==Ga)try{E(hb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),Ga,bb)}catch(Za){b.sidebar.currentElt=null,b.handleError(Za)}M=!1})}function Ya(){var Oa=document.createElement("table");+ra.style.top="86px";ra.style.left="2px";ra.style.right="2px";ra.style.bottom="2px";ra.style.position="absolute";ra.style.border="1px solid #424242";var ma=document.createElement("div");ma.style.boxSizing="border-box";ma.style.position="relative";ma.style.textAlign="center";ma.style.top="50%";mxUtils.write(ma,mxResources.get("blankDiagram"));ra.appendChild(ma);var pa=document.createElement("select");pa.className="geBtn";pa.style.maxWidth="160px";pa.style.marginLeft="0px";ma=document.createElement("option");+mxUtils.write(ma,mxResources.get("diagramType"));ma.setAttribute("value","");pa.appendChild(ma);for(var ya=0;ya<EditorUi.mermaidDiagramTypes.length;ya++){ma=document.createElement("option");var Fa=EditorUi.mermaidDiagramTypes[ya],Ha=Fa;Fa==urlParams["smart-template-type"]&&ma.setAttribute("selected","selected");"erDiagram"==Ha&&(Ha="entityRelationshipDiagram");Ha=mxResources.get(Ha,null,Ha.charAt(0).toUpperCase()+Ha.substring(1).replace(/[A-Z]/g," $&"));ma.setAttribute("value",Fa);mxUtils.write(ma,+Ha);pa.appendChild(ma)}var Pa=mxUtils.button(mxResources.get("generate"),function(){var La=ta.value,Na=pa.value.replace(/([A-Z])/g," $1").toLowerCase();La="Write the declaration code for a detailed and complex "+(""!=Na?Na:"graph")+' that shows "'+(""!=La?La:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Na=""!=pa.value?" ("+mxUtils.trim(mxUtils.getTextContent(pa.options[pa.selectedIndex]))+")":"";var Va="gantt"==pa.value||"pie"==pa.value||+"timeline"==pa.value||"quadrantchart"==pa.value||"c4context"==pa.value,Ma=ta.value+Na;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(Qa){Va||(ia=aa=Qa,va="Smart Template: "+Ma)}));b.spinner.spin(document.body,mxResources.get("loading"))&&b.generateOpenAiMermaidDiagram(La,function(Qa,Ya,Ga,fb){b.spinner.stop();ra.innerHTML="";var Ta=document.createElement("img");Ta.setAttribute("title",Ma);Ta.src="data:image/svg+xml;base64,"+Ya.substring(Ya.indexOf(",")++1);Ta.style.cursor="pointer";Ta.style.width="100%";Ta.style.height="100%";ra.appendChild(Ta);Qa=b.createMermaidXml(Qa,EditorUi.defaultMermaidConfig,Ya,Ga,fb,Ma);var ib="<mxfile><diagram>"+Graph.compress(Qa)+"</diagram></mxfile>";if(Va||"undefined"===typeof mxMermaidToDrawio)ia=aa=Qa;Qa=I.cloneNode(!0);ra.appendChild(Qa);Ya=function(gb){Q=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Ga=function(gb){Q||E(ib,mxEvent.getClientX(gb),mxEvent.getClientY(gb),Ta,Ma)};mxEvent.addGestureListeners(Ta,+Ya,null,Ga);mxEvent.addGestureListeners(Qa,Ya,null,Ga)},function(Qa){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();b.handleError(Qa)})});Pa.setAttribute("disabled","disabled");Pa.className="geBtn gePrimaryBtn";ma=function(){window.setTimeout(function(){""!=ta.value?Pa.removeAttribute("disabled"):Pa.setAttribute("disabled","disabled")},0)};ya=urlParams["smart-template"];null!=ya&&"1"!=ya&&(ta.value=decodeURIComponent(ya),ma(),"1"==urlParams["smart-template-generate"]&&+window.setTimeout(function(){Pa.click()},0));mxEvent.addListener(ta,"change",ma);mxEvent.addListener(ta,"keydown",ma);mxEvent.addListener(ta,"cut",ma);mxEvent.addListener(ta,"paste",ma);mxEvent.addListener(ta,"keydown",function(La){13==La.keyCode&&Pa.click()});ma=document.createElement("div");ma.style.height="40px";ma.style.marginTop="4px";ma.style.marginBottom="4px";ma.style.whiteSpace="nowrap";ma.style.overflowX="auto";ma.style.overflowY="hidden";ma.appendChild(pa);ma.appendChild(Pa);ka.appendChild(ma);+ka.appendChild(ra);return ka}function F(){null!=aa&&aa==ia&&EditorUi.logEvent({category:"OPENAI-DIAGRAM",action:"templateGenerated",label:va});if(ha&&null!=e)l||b.hideDialog(),e(ha,oa,T.value);else if(d)l||b.hideDialog(),d(aa,T.value,na,ca);else{var ka=T.value;if(null!=ka&&0<ka.length){var ta=function(ma,pa,ya){b.createFile(ya,aa,null!=ca&&0<ca.length?ca:null,ma,function(){b.hideDialog()},null,pa,null,null!=fa&&0<fa.length?fa:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var ra=new SaveDialog(b,+ka,mxUtils.bind(this,function(ma,pa,ya){ta(pa,ya,ma.value)}),null,null,null,null,b.mode);b.showDialog(ra.container,420,150,!0,!1);ra.init()}else b.pickFolder(b.mode,function(ma){ta(b.mode,ma,ka)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function S(ka,ta,ra,ma,pa,ya,Fa){return da!=ka?(null!=da&&(da.style.backgroundColor="transparent",da.style.border="2px solid transparent",0<da.getElementsByTagName("table").length&&(da.getElementsByTagName("table")[0].style.visibility=+"visible"),da==sa&&(sa.style.backgroundImage=Ia,sa.style.backgroundPosition="center center",sa.style.backgroundRepeat="no-repeat",sa.style.backgroundSize="contain",xa.style.visibility="hidden",Ca.style.visibility="hidden",Aa.style.visibility="hidden",Ja.style.visibility="hidden",Da.style.visibility=null!=ia?"visible":"hidden",sa.getElementsByTagName("table")[0].style.visibility="visible")),""!=ka.style.backgroundImage&&0<ka.getElementsByTagName("table").length&&(ka.getElementsByTagName("table")[0].style.visibility=+"hidden"),ka==sa&&(ta=ia,null!=ta?(Da.style.visibility="visible",Da.style.visibility=null!=ia?"visible":"hidden",Ja.style.visibility="visible"):(xa.style.visibility="visible",Ca.style.visibility="visible",Aa.style.visibility="visible",Ja.style.visibility="hidden",Da.style.visibility="hidden")),G.removeAttribute("disabled"),aa=ta,ca=ra,fa=ya,da=ka,ha=ma,na=Fa,oa=pa,da.style.border=J,!0):!1}function U(){sa.style.backgroundImage="";sa.getElementsByTagName("table")[0].style.visibility="hidden";xa.style.visibility=+"visible";Ca.style.visibility="visible";Aa.style.visibility="visible";Ja.style.visibility="hidden";Da.style.visibility="hidden";xa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?xa.select():document.execCommand("selectAll",!1,null)}function O(){xa.style.visibility="hidden";Ca.style.visibility="hidden";Aa.style.visibility="hidden";sa.style.backgroundImage=Ia;sa.style.backgroundSize="contain";Ja.style.visibility="visible";Da.style.visibility="visible"}function N(ka){var ta=mxUtils.trim(xa.value);+if(ka||""==ta)null!=va&&(xa.value=va,O());else{xa.style.visibility="hidden";Ca.style.visibility="hidden";Aa.style.visibility="hidden";var ra=!1;ka='Write a detailed and complex MermaidJS declaration for "'+(""!=ta?ta:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ma){ma!=b.emptyDiagramXml&&(ra=!0,aa=ma)}));sa.style.backgroundImage="url("+Editor.spinImage++")";sa.style.backgroundSize="12px 12px";b.generateOpenAiMermaidDiagram(ka,function(ma,pa,ya,Fa){da==sa&&"hidden"==xa.style.visibility&&(Ia="url(data:image/svg+xml;base64,"+pa.substring(pa.indexOf(",")+1)+")",sa.setAttribute("title",ta),ia=aa=ma=ra?aa:b.createMermaidXml(ma,EditorUi.defaultMermaidConfig,pa,ya,Fa,ta),va=ta,O())},function(ma){da==sa&&(xa.style.visibility="visible",Ca.style.visibility="visible",Aa.style.visibility="visible",Ja.style.visibility="visible",Da.style.visibility="visible",b.handleError(ma))})}}+function m(ka,ta,ra,ma,pa,ya,Fa,Ha,Pa,La,Na,Va){function Ma(Oa,bb){null==fb?(Ta=Oa,Ta=/^https?:\/\//.test(Ta)?b.editor.isCorsEnabledForUrl(Ta)?Ta:PROXY_URL+"?url="+encodeURIComponent(Ta):TEMPLATE_PATH+"/"+Ta,mxUtils.get(Ta,mxUtils.bind(this,function(cb){200<=cb.getStatus()&&299>=cb.getStatus()&&(fb=cb.getText());bb(fb,Ta)}))):bb(fb,Ta)}function Qa(Oa,bb){if(null==ka||M||b.sidebar.currentElt==Ga)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=R){var cb="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='++R.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+R.naturalWidth+'" height="'+R.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";E(cb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),ra,ka)}else b.sidebar.currentElt=Ga,M=!0,Ma(ka,function(hb){if(M&&b.sidebar.currentElt==Ga)try{E(hb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),Ga,bb)}catch(Za){b.sidebar.currentElt=null,b.handleError(Za)}M=!1})}function Ya(){var Oa=document.createElement("table");Oa.setAttribute("width","100%");Oa.setAttribute("height","100%");Oa.style.background="light-dark(rgba(255,255,255,0.85), transparent)";Oa.style.lineHeight="1.3em";Oa.style.border="none";var bb=document.createElement("tbody"),cb=document.createElement("tr"),hb=document.createElement("td");hb.setAttribute("align","center");hb.setAttribute("valign","middle");var Za=document.createElement("span");Za.style.display="inline-block";Za.style.padding="2px 8px";Za.style.userSelect="none";Za.style.borderRadius=-"8px";Za.style.background="rgba(255,255,255,0.7)";Za.style.overflow="hidden";Za.style.textOverflow="ellipsis";Za.style.maxWidth=ma-34+"px";mxUtils.write(Za,mxResources.get(ra,null,ra));hb.appendChild(Za);cb.appendChild(hb);bb.appendChild(cb);Oa.appendChild(bb);return Oa}var Ga=null;if("generative"!=Va||null==sa){Ga=document.createElement("div");Ga.className="geTemplate geAdaptiveAsset";Ga.style.backgroundOrigin="content-box";Ga.style.backgroundPosition="center center";Ga.style.backgroundRepeat="no-repeat";-Ga.style.backgroundSize="contain";Ga.style.boxSizing="border-box";Ga.style.borderRadius="12px";Ga.style.position="relative";Ga.style.height=ma+"px";Ga.style.width=Aa+"px";Ga.style.padding="4px";Ga.style.border="2px solid transparent";var fb=null,Ta=ka;null!=ra?Ga.setAttribute("title",mxResources.get(ra,null,ra)):null!=la&&0<la.length&&Ga.setAttribute("title",la)}else Ga=sa;if(null!=ya){Ga.style.display="inline-flex";Ga.style.justifyContent="center";Ga.style.alignItems="center";qa=document.createElement("img");-qa.setAttribute("src",ya);qa.setAttribute("alt",la);qa.style.maxWidth=ma+"px";qa.style.maxHeight=Aa+"px";N=qa;var ib=ya.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ga.appendChild(qa);qa.onerror=function(){this.src!=ib?this.src=ib:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ga,mxUtils.bind(this,function(Oa){R(Ga,null,null,ka,Ea,Na)}),null,null);mxEvent.addListener(Ga,"dblclick",function(Oa){F();mxEvent.consume(Oa)})}else if(!Ka&&null!=ka&&0<ka.length){var gb=-function(Oa){v.spin(ua)&&Ma(ka,function(bb,cb){v.stop();null!=bb&&(R(Ga,bb,ta,null,null,Na,cb),Oa&&F())})};ya=Pa||TEMPLATE_PATH+"/"+ka.substring(0,ka.length-4)+".png";Ga.style.backgroundImage="url("+ya+")";null!=ra&&Ga.appendChild(Ya());mxEvent.addGestureListeners(Ga,mxUtils.bind(this,function(Oa){gb()}),null,null);mxEvent.addListener(Ga,"dblclick",function(Oa){gb(!0);mxEvent.consume(Oa)})}else Ga.appendChild(Ya()),"generative"==Va&&null==sa&&(Ga.style.backgroundImage=Ia,Ga.style.overflow="visible",-Ga.appendChild(Fa),Ga.appendChild(za),Ga.appendChild(xa),Ga.appendChild(Ba),Ga.appendChild(Da),sa=Ga),qa&&R(Ga),null!=Ha?(mxEvent.addGestureListeners(Ga,null,null,mxUtils.bind(this,function(Oa){R(Ga,null,null,ka,Ea)})),mxEvent.addListener(Ga,"click",Ha)):(mxEvent.addListener(Ga,"click",function(Oa){R(Ga,null,null,ka,Ea)&&"generative"==Va&&null==ia&&U()}),mxEvent.addListener(Ga,"dblclick",function(Oa){"generative"!=Va?F():"hidden"==xa.style.visibility&&U();mxEvent.consume(Oa)}));null!=ka&&(ya=I.cloneNode(!0),-Ga.appendChild(ya),mxEvent.addGestureListeners(ya,mxUtils.bind(this,function(Oa){S=b.sidebar.currentElt==Ga}),null,null),mxEvent.addListener(ya,"click",mxUtils.bind(this,function(Oa){S||Qa(Oa,null!=ra?ra:la);mxEvent.consume(Oa)})));ua.appendChild(Ga);return Ga}function u(){function ka(Ma,Qa){Ma=mxResources.get(Ma,null,Ma.substring(0,1).toUpperCase()+Ma.substring(1));18<Ma.length&&(Ma=Ma.substring(0,18)+"…");return Ma+(null!=Qa?" ("+Qa.length+")":"")}function ta(Ma,Qa,Ya){mxEvent.addListener(Qa,-"click",function(){Wa!=Qa&&(null!=Wa&&(Wa.style.backgroundColor=""),Wa=Qa,Wa.style.backgroundColor=x,ua.scrollTop=0,ua.innerText="",k=0,null!=Ja[Ma].content?(ua.appendChild(Ja[Ma].content),aa=ia,Ua=null,null!=Ja[Ma].content.init&&Ja[Ma].content.init()):(Ua=Ya?Ra[Ma][Ya]:Ja[Ma],W=null,z(!1)))});null!=urlParams["smart-template"]&&"smartTemplate"==Ma&&Qa.click()}db&&(db=!1,mxEvent.addListener(ua,"scroll",function(Ma){ua.scrollTop+ua.clientHeight>=ua.scrollHeight&&(z(),mxEvent.consume(Ma))}));if(0<ab){var ra=-document.createElement("div");ra.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ra,mxResources.get("custom"));oa.appendChild(ra);for(var la in Sa){var qa=document.createElement("div");ra=la;var ya=Sa[la];18<ra.length&&(ra=ra.substring(0,18)+"…");qa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";qa.setAttribute("title",ra+" ("+-ya.length+")");mxUtils.write(qa,qa.getAttribute("title"));null!=K&&(qa.style.padding=K);oa.appendChild(qa);(function(Ma,Qa){mxEvent.addListener(qa,"click",function(){Wa!=Qa&&(Wa.style.backgroundColor="",Wa=Qa,Wa.style.backgroundColor=x,ua.scrollTop=0,ua.innerText="",k=0,Ua=Sa[Ma],W=null,z(!1))})})(la,qa)}ra=document.createElement("div");ra.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ra,"draw.io");oa.appendChild(ra)}for(la in Ja){ra=-ya=null;if(null!=Ja[la].content)qa=document.createElement(Ea?"ul":"div"),ra=ka(la),qa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",qa.setAttribute("title",ra),mxUtils.write(qa,ra),oa.appendChild(qa),ra=qa;else{var Ea=Ra[la];ra=qa=document.createElement(Ea?"ul":"div");ya=Ja[la];var Ha=ka(la,ya);if(null!=Ea){ya=document.createElement("li");var Pa=document.createElement("div");-Pa.className="geTempTreeCaret";Pa.setAttribute("title",Ha);mxUtils.write(Pa,Ha);ra=Pa;ya.appendChild(Pa);Ha=document.createElement("ul");Ha.className="geTempTreeNested";Ha.style.visibility="hidden";for(var Ka in Ea){var Na=document.createElement("li"),Va=ka(Ka,Ea[Ka]);Na.setAttribute("title",Va);mxUtils.write(Na,Va);ta(la,Na,Ka);Ha.appendChild(Na)}ya.appendChild(Ha);qa.className="geTempTree";qa.appendChild(ya);(function(Ma,Qa){mxEvent.addListener(Qa,"click",function(){Ma.style.visibility="visible";-Ma.classList.toggle("geTempTreeActive");Ma.classList.toggle("geTempTreeNested")&&setTimeout(function(){Ma.style.visibility="hidden"},550);Qa.classList.toggle("geTempTreeCaret-down")})})(Ha,Pa)}else qa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",qa.setAttribute("title",Ha),mxUtils.write(qa,Ha);null!=K&&(qa.style.padding=K);oa.appendChild(qa)}ta(la,ra);null==Wa&&ra.click()}z(!1)}+"8px";Za.style.background="rgba(255,255,255,0.7)";Za.style.overflow="hidden";Za.style.textOverflow="ellipsis";Za.style.maxWidth=la-34+"px";mxUtils.write(Za,mxResources.get(ra,null,ra));hb.appendChild(Za);cb.appendChild(hb);bb.appendChild(cb);Oa.appendChild(bb);return Oa}var Ga=null;if("generative"!=Va||null==sa){Ga=document.createElement("div");Ga.className="geTemplate geAdaptiveAsset";Ga.style.backgroundOrigin="content-box";Ga.style.backgroundPosition="center center";Ga.style.backgroundRepeat="no-repeat";+Ga.style.backgroundSize="contain";Ga.style.boxSizing="border-box";Ga.style.borderRadius="12px";Ga.style.position="relative";Ga.style.height=la+"px";Ga.style.width=Ea+"px";Ga.style.padding="4px";Ga.style.border="2px solid transparent";var fb=null,Ta=ka;null!=ra?Ga.setAttribute("title",mxResources.get(ra,null,ra)):null!=ma&&0<ma.length&&Ga.setAttribute("title",ma)}else Ga=sa;if(null!=ya){Ga.style.display="inline-flex";Ga.style.justifyContent="center";Ga.style.alignItems="center";pa=document.createElement("img");+pa.setAttribute("src",ya);pa.setAttribute("alt",ma);pa.style.maxWidth=la+"px";pa.style.maxHeight=Ea+"px";R=pa;var ib=ya.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ga.appendChild(pa);pa.onerror=function(){this.src!=ib?this.src=ib:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ga,mxUtils.bind(this,function(Oa){S(Ga,null,null,ka,Fa,Na)}),null,null);mxEvent.addListener(Ga,"dblclick",function(Oa){F();mxEvent.consume(Oa)})}else if(!La&&null!=ka&&0<ka.length){var gb=+function(Oa){v.spin(ua)&&Ma(ka,function(bb,cb){v.stop();null!=bb&&(S(Ga,bb,ta,null,null,Na,cb),Oa&&F())})};ya=Pa||TEMPLATE_PATH+"/"+ka.substring(0,ka.length-4)+".png";Ga.style.backgroundImage="url("+ya+")";null!=ra&&Ga.appendChild(Ya());mxEvent.addGestureListeners(Ga,mxUtils.bind(this,function(Oa){gb()}),null,null);mxEvent.addListener(Ga,"dblclick",function(Oa){gb(!0);mxEvent.consume(Oa)})}else Ga.appendChild(Ya()),"generative"==Va&&null==sa&&(Ga.style.backgroundImage=Ia,Ga.style.overflow="visible",+Ga.appendChild(Da),Ga.appendChild(Ja),Ga.appendChild(xa),Ga.appendChild(Ca),Ga.appendChild(Aa),sa=Ga),pa&&S(Ga),null!=Ha?(mxEvent.addGestureListeners(Ga,null,null,mxUtils.bind(this,function(Oa){S(Ga,null,null,ka,Fa)})),mxEvent.addListener(Ga,"click",Ha)):(mxEvent.addListener(Ga,"click",function(Oa){S(Ga,null,null,ka,Fa)&&"generative"==Va&&null==ia&&U()}),mxEvent.addListener(Ga,"dblclick",function(Oa){"generative"!=Va?F():"hidden"==xa.style.visibility&&U();mxEvent.consume(Oa)}));null!=ka&&(ya=I.cloneNode(!0),+Ga.appendChild(ya),mxEvent.addGestureListeners(ya,mxUtils.bind(this,function(Oa){Q=b.sidebar.currentElt==Ga}),null,null),mxEvent.addListener(ya,"click",mxUtils.bind(this,function(Oa){Q||Qa(Oa,null!=ra?ra:ma);mxEvent.consume(Oa)})));ua.appendChild(Ga);return Ga}function u(){function ka(Ma,Qa){Ma=mxResources.get(Ma,null,Ma.substring(0,1).toUpperCase()+Ma.substring(1));18<Ma.length&&(Ma=Ma.substring(0,18)+"…");return Ma+(null!=Qa?" ("+Qa.length+")":"")}function ta(Ma,Qa,Ya){mxEvent.addListener(Qa,+"click",function(){Wa!=Qa&&(null!=Wa&&(Wa.style.backgroundColor=""),Wa=Qa,Wa.style.backgroundColor=x,ua.scrollTop=0,ua.innerText="",k=0,null!=za[Ma].content?(ua.appendChild(za[Ma].content),aa=ia,Ua=null,null!=za[Ma].content.init&&za[Ma].content.init()):(Ua=Ya?Ra[Ma][Ya]:za[Ma],V=null,z(!1)))});null!=urlParams["smart-template"]&&"smartTemplate"==Ma&&Qa.click()}db&&(db=!1,mxEvent.addListener(ua,"scroll",function(Ma){ua.scrollTop+ua.clientHeight>=ua.scrollHeight&&(z(),mxEvent.consume(Ma))}));if(0<ab){var ra=+document.createElement("div");ra.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ra,mxResources.get("custom"));qa.appendChild(ra);for(var ma in Sa){var pa=document.createElement("div");ra=ma;var ya=Sa[ma];18<ra.length&&(ra=ra.substring(0,18)+"…");pa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";pa.setAttribute("title",ra+" ("++ya.length+")");mxUtils.write(pa,pa.getAttribute("title"));null!=K&&(pa.style.padding=K);qa.appendChild(pa);(function(Ma,Qa){mxEvent.addListener(pa,"click",function(){Wa!=Qa&&(Wa.style.backgroundColor="",Wa=Qa,Wa.style.backgroundColor=x,ua.scrollTop=0,ua.innerText="",k=0,Ua=Sa[Ma],V=null,z(!1))})})(ma,pa)}ra=document.createElement("div");ra.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ra,"draw.io");qa.appendChild(ra)}for(ma in za){ra=+ya=null;if(null!=za[ma].content)pa=document.createElement(Fa?"ul":"div"),ra=ka(ma),pa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",pa.setAttribute("title",ra),mxUtils.write(pa,ra),qa.appendChild(pa),ra=pa;else{var Fa=Ra[ma];ra=pa=document.createElement(Fa?"ul":"div");ya=za[ma];var Ha=ka(ma,ya);if(null!=Fa){ya=document.createElement("li");var Pa=document.createElement("div");+Pa.className="geTempTreeCaret";Pa.setAttribute("title",Ha);mxUtils.write(Pa,Ha);ra=Pa;ya.appendChild(Pa);Ha=document.createElement("ul");Ha.className="geTempTreeNested";Ha.style.visibility="hidden";for(var La in Fa){var Na=document.createElement("li"),Va=ka(La,Fa[La]);Na.setAttribute("title",Va);mxUtils.write(Na,Va);ta(ma,Na,La);Ha.appendChild(Na)}ya.appendChild(Ha);pa.className="geTempTree";pa.appendChild(ya);(function(Ma,Qa){mxEvent.addListener(Qa,"click",function(){Ma.style.visibility="visible";+Ma.classList.toggle("geTempTreeActive");Ma.classList.toggle("geTempTreeNested")&&setTimeout(function(){Ma.style.visibility="hidden"},550);Qa.classList.toggle("geTempTreeCaret-down")})})(Ha,Pa)}else pa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",pa.setAttribute("title",Ha),mxUtils.write(pa,Ha);null!=K&&(pa.style.padding=K);qa.appendChild(pa)}ta(ma,ra);null==Wa&&ra.click()}z(!1)}D=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);l=null!=l?l:!0;q=null!=q?q:!1;x=null!=x?x:"light-dark(#ebf2f9, "+Editor.darkColor+")";J=null!=J?J:"2px dashed light-dark(#29b6f2, #00a8ff)";L=null!=L?L:EditorUi.templateFile;var A=document.createElement("div");A.style.userSelect="none";A.style.height="100%";var B=document.createElement("div");B.style.whiteSpace="nowrap";B.style.height="46px";l&&A.appendChild(B);var H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("align","absmiddle");H.style.width="40px";H.style.height="40px";H.style.marginRight="10px";H.style.paddingBottom="4px";H.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";g||D||!l||B.appendChild(H);l&&mxUtils.write(B,(D?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");H=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?H=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?H=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?H=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?H=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?H=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(H=b.trello.extension);var T=document.createElement("input");T.setAttribute("value",b.defaultFilename+H);T.style.marginLeft="10px";T.style.width=g||D?"144px":"244px";this.init=function(){l&&Editor.selectFilename(T);null!=ua.parentNode&&null!=ua.parentNode.parentNode&&mxEvent.addGestureListeners(ua.parentNode.parentNode,mxUtils.bind(this,function(ka){null!=b.sidebar&&b.sidebar.hideTooltip()}),null,null)};l&&(B.appendChild(T),t?T.style.width=g||D?"350px":"450px":null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,T,b.editor.diagramFileTypes),t.style.marginLeft="6px",t.style.width=g||D?"80px":"180px",B.appendChild(t)));t=!1;var k=0,v=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),G=mxUtils.button(p||mxResources.get("create"),function(){G.setAttribute("disabled",-"disabled");F();G.removeAttribute("disabled")});G.className="geBtn gePrimaryBtn";var I=document.createElement("img");I.setAttribute("src",Editor.magnifyImage);I.setAttribute("title",mxResources.get("preview"));I.className="geAdaptiveAsset geActiveButton";I.style.position="absolute";I.style.borderRadius="16px";I.style.background="white";I.style.cursor="default";I.style.padding="2px";I.style.opacity="0.8";I.style.height="16px";I.style.right="2px";I.style.top="2px";var M=!1,N=null,S=!1;if(Q||c){var V=-[],W=null,X=null,Z=null,Y=function(ka){G.setAttribute("disabled","disabled");for(var ta=0;ta<V.length;ta++)V[ta].className=ta==ka?"geBtn gePrimaryBtn":"geBtn"};t=!0;p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="30px";A.appendChild(p);D=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){oa.style.display="";va.style.display="";ua.style.left="160px";Y(0);ua.scrollTop=0;ua.innerText="";k=0;W!=Ua&&(Ua=W,Ja=X,ab=Z,oa.innerText="",u(),W=null)});V.push(D);-p.appendChild(D);var ba=function(ka){oa.style.display="none";va.style.display="none";ua.style.left="30px";Y(ka?-1:1);null==W&&(W=Ua);ua.scrollTop=0;ua.innerText="";v.spin(ua);var ta=function(ra,la,qa){k=0;v.stop();Ua=ra;qa=qa||{};var ya=0,Ea;for(Ea in qa)ya+=qa[Ea].length;if(la)ua.innerText=la;else if(0==ra.length&&0==ya)ua.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ua.innerText="",0<ya){oa.style.display="";ua.style.left="160px";oa.innerText="";ab=0;Ja={"draw.io":ra};-for(Ea in qa)Ja[Ea]=qa[Ea];u()}else z(!0)};ka?c(ea.value,ta):Q(ta)};Q&&(D=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ba()}),p.appendChild(D),V.push(D));if(c){D=document.createElement("span");D.style.marginLeft="10px";D.innerText=mxResources.get("search")+":";p.appendChild(D);var ea=document.createElement("input");ea.style.marginRight="10px";ea.style.marginLeft="10px";ea.style.width="220px";mxEvent.addListener(ea,"keypress",function(ka){13==ka.keyCode&&ba(!0)});p.appendChild(ea);-D=mxUtils.button(mxResources.get("search"),function(){ba(!0)});D.className="geBtn";p.appendChild(D)}Y(0)}var ca=null,fa=null,aa=null,da=null,ha=null,pa=null,na=null,ia=null,wa=null,ua=document.createElement("div");ua.style.border="1px solid #d3d3d3";ua.style.position="absolute";ua.style.left="160px";ua.style.right="34px";p=(l?72:40)+(t?30:0);ua.style.top=p+"px";ua.style.bottom="68px";ua.style.margin="6px 0 0 -1px";ua.style.padding="6px";ua.style.overflow="auto";var va=document.createElement("div");-va.style.cssText="position:absolute;left:30px;width:128px;top:"+p+"px;height:22px;margin-top: 6px;white-space: nowrap;";var Ca=document.createElement("input");Ca.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";Ca.setAttribute("placeholder",mxResources.get("search"));Ca.setAttribute("type","text");va.appendChild(Ca);var ja=document.createElement("img");ja.setAttribute("src",Editor.magnifyImage);ja.setAttribute("title",mxResources.get("search"));-ja.className="geAdaptiveAsset";ja.style.position="relative";ja.style.cursor="pointer";ja.style.opacity="0.5";ja.style.height="16px";ja.style.left="-20px";ja.style.top="4px";ja.style.background="url('"+b.editor.transparentImage+"')";va.appendChild(ja);mxEvent.addListener(ja,"click",function(){ja.getAttribute("src")!=Editor.magnifyImage&&(ja.setAttribute("src",Editor.magnifyImage),ja.setAttribute("title",mxResources.get("search")),Ca.value="",null!=Xa&&(Xa.click(),Xa=null));Ca.focus()});mxEvent.addListener(Ca,-"keydown",mxUtils.bind(this,function(ka){if(13==ka.keyCode){var ta=Ca.value;if(""==ta)null!=Xa&&(Xa.click(),Xa=null);else{if(null==NewDialog.tagsList[L]){var ra={};for(Na in Ja)if(null==Ja[Na].content)for(var la=Ja[Na],qa=0;qa<la.length;qa++){var ya=la[qa];if(null!=ya.tags)for(var Ea=ya.tags.toLowerCase().split(";"),Ha=0;Ha<Ea.length;Ha++)null==ra[Ea[Ha]]&&(ra[Ea[Ha]]=[]),ra[Ea[Ha]].push(ya)}NewDialog.tagsList[L]=ra}var Pa=ta.toLowerCase().split(" ");ra=NewDialog.tagsList[L];if(0<ab&&null==ra.__tagsList__){for(Na in Sa)for(la=-Sa[Na],qa=0;qa<la.length;qa++)for(ya=la[qa],Ea=ya.title.split(" "),Ea.push(Na),Ha=0;Ha<Ea.length;Ha++){var Ka=Ea[Ha].toLowerCase();null==ra[Ka]&&(ra[Ka]=[]);ra[Ka].push(ya)}ra.__tagsList__=!0}var Na=[];la={};for(qa=Ea=0;qa<Pa.length;qa++)if(0<Pa[qa].length){Ka=ra[Pa[qa]];var Va={};Na=[];if(null!=Ka)for(Ha=0;Ha<Ka.length;Ha++)ya=Ka[Ha],0==Ea==(null==la[ya.url])&&(Va[ya.url]=!0,Na.push(ya));la=Va;Ea++}ua.scrollTop=0;ua.innerText="";k=0;ra=document.createElement("div");ra.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";-mxUtils.write(ra,mxResources.get(0==Na.length?"noResultsFor":"resultsFor",[ta]));ua.appendChild(ra);null!=Wa&&null==Xa&&(Wa.style.backgroundColor="",Xa=Wa,Wa=ra);Ua=Na;W=null;z(!1)}mxEvent.consume(ka)}}));mxEvent.addListener(Ca,"keyup",mxUtils.bind(this,function(ka){""==Ca.value?(ja.setAttribute("src",Editor.magnifyImage),ja.setAttribute("title",mxResources.get("search"))):(ja.setAttribute("src",Editor.crossImage),ja.setAttribute("title",mxResources.get("reset")))}));p+=23;var oa=document.createElement("div");-oa.style.cssText="position:absolute;left:30px;width:128px;top:"+p+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(ua,"scroll",function(){b.sidebar.hideTooltip()});var ma=140,Aa=ma,sa=null,Ia="url("+Editor.sparklesImage+")",xa=document.createElement("textarea");xa.setAttribute("placeholder",mxResources.get("describeYourDiagram"));xa.style.position="absolute";xa.style.fontFamily="sans-serif";xa.style.outline="none";xa.style.left="0px";xa.style.right="0px";-xa.style.top="0px";xa.style.bottom="38px";xa.style.resize="none";xa.style.boxSizing="border-box";xa.style.fontSize="12px";xa.style.border="none";xa.style.margin="8px";var Ba=document.createElement("button");Ba.className="geBtn gePrimaryBtn";Ba.style.position="absolute";Ba.style.bottom="0px";Ba.style.height="30px";Ba.style.right="0px";Ba.style.left="0px";Ba.style.margin="8px";Ba.style.fontSize="14px";Ba.style.borderRadius="4px";Ba.setAttribute("disabled","disabled");Ba.setAttribute("title",mxResources.get("ok"));-mxUtils.write(Ba,mxResources.get("ok"));var Fa=I.cloneNode(!0),La=!1;mxEvent.addGestureListeners(Fa,function(ka){La=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(ka){if(!La&&null!=ia){var ta="<mxfile><diagram>"+Graph.compress(ia)+"</diagram></mxfile>";E(ta,mxEvent.getClientX(ka),mxEvent.getClientY(ka),sa,wa)}});var za=I.cloneNode(!0);za.setAttribute("src",Editor.editImage);za.setAttribute("title",mxResources.get("edit"));za.style.right="";za.style.left="2px";var Da=-I.cloneNode(!0);Da.setAttribute("src",Editor.helpImage);Da.setAttribute("title",mxResources.get("help"));Da.style.opacity="1";Da.style.right="-8px";Da.style.top="-8px";mxEvent.addListener(Da,"click",function(ka){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(ka)});xa.style.visibility="hidden";Ba.style.visibility="hidden";za.style.visibility="hidden";Da.style.visibility="hidden";Fa.style.visibility="hidden";mxEvent.addListener(za,"click",U);mxEvent.addListener(xa,-"input",function(){""!=xa.value?Ba.removeAttribute("disabled"):Ba.setAttribute("disabled","disabled")});mxEvent.addListener(Ba,"click",function(){O()});mxEvent.addListener(xa,"keydown",function(ka){13!=ka.keyCode||mxEvent.isShiftDown(ka)?27==ka.keyCode&&(O(!0),mxEvent.consume(ka)):(O(),mxEvent.consume(ka))});var Ja={},Ra={},Sa={},ab=0,db=!0,Wa=null,Xa=null;Ja.basic=[{title:"blankDiagram"}];var Ua=Ja.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==-typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ja.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(Ja.smartTemplate={content:C()});if(!g){var eb=function(){mxUtils.get($a,function(ka){if(!jb){jb=!0;ka=ka.getXml().documentElement.firstChild;for(var ta={};null!=ka;){if("undefined"!==typeof ka.getAttribute)if("parsererror"==ka.nodeName)null!=window.console&&-console.log("Parser error in "+L+": "+ka.textContent);else if("clibs"==ka.nodeName){for(var ra=ka.getAttribute("name"),la=ka.getElementsByTagName("add"),qa=[],ya=0;ya<la.length;ya++)qa.push(encodeURIComponent(mxUtils.getTextContent(la[ya])));null!=ra&&0<qa.length&&(ta[ra]=qa.join(";"))}else if(qa=ka.getAttribute("url"),null!=qa){la=ka.getAttribute("section");ra=ka.getAttribute("subsection");if(null==la&&(ya=qa.indexOf("/"),la=qa.substring(0,ya),null==ra)){var Ea=qa.indexOf("/",ya+1);-1<Ea&&(ra=qa.substring(ya+-1,Ea))}ya=Ja[la];null==ya&&(ya=[],Ja[la]=ya);qa=ka.getAttribute("clibs");null!=ta[qa]&&(qa=ta[qa]);qa={url:ka.getAttribute("url"),libs:ka.getAttribute("libs"),title:ka.getAttribute("title"),tooltip:ka.getAttribute("name")||ka.getAttribute("url"),preview:ka.getAttribute("preview"),clibs:qa,tags:ka.getAttribute("tags")};ya.push(qa);null!=ra&&(ya=Ra[la],null==ya&&(ya={},Ra[la]=ya),la=ya[ra],null==la&&(la=[],ya[ra]=la),la.push(qa))}ka=ka.nextSibling}v.stop();u()}})};A.appendChild(va);A.appendChild(oa);-A.appendChild(ua);var jb=!1,$a=L;/^https?:\/\//.test($a)&&!b.editor.isCorsEnabledForUrl($a)&&($a=PROXY_URL+"?url="+encodeURIComponent($a));v.spin(ua);null!=n?n(function(ka,ta){Sa=ka;Z=ab=ta;eb()},eb):eb();X=Ja}mxEvent.addListener(T,"keypress",function(ka){b.dialog.container.firstChild==A&&13==ka.keyCode&&F()});n=document.createElement("div");n.style.marginTop=g?"4px":"16px";n.style.textAlign="right";n.style.position="absolute";n.style.left="40px";n.style.bottom="24px";n.style.right="40px";p=mxUtils.button(mxResources.get("cancel"),+"disabled");F();G.removeAttribute("disabled")});G.className="geBtn gePrimaryBtn";var I=document.createElement("img");I.setAttribute("src",Editor.magnifyImage);I.setAttribute("title",mxResources.get("preview"));I.className="geAdaptiveAsset geActiveButton";I.style.position="absolute";I.style.borderRadius="16px";I.style.background="white";I.style.cursor="default";I.style.padding="2px";I.style.opacity="0.8";I.style.height="16px";I.style.right="2px";I.style.top="2px";var M=!1,R=null,Q=!1;if(P||c){var W=+[],V=null,X=null,Z=null,Y=function(ka){G.setAttribute("disabled","disabled");for(var ta=0;ta<W.length;ta++)W[ta].className=ta==ka?"geBtn gePrimaryBtn":"geBtn"};t=!0;p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="30px";A.appendChild(p);D=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){qa.style.display="";wa.style.display="";ua.style.left="160px";Y(0);ua.scrollTop=0;ua.innerText="";k=0;V!=Ua&&(Ua=V,za=X,ab=Z,qa.innerText="",u(),V=null)});W.push(D);+p.appendChild(D);var ba=function(ka){qa.style.display="none";wa.style.display="none";ua.style.left="30px";Y(ka?-1:1);null==V&&(V=Ua);ua.scrollTop=0;ua.innerText="";v.spin(ua);var ta=function(ra,ma,pa){k=0;v.stop();Ua=ra;pa=pa||{};var ya=0,Fa;for(Fa in pa)ya+=pa[Fa].length;if(ma)ua.innerText=ma;else if(0==ra.length&&0==ya)ua.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ua.innerText="",0<ya){qa.style.display="";ua.style.left="160px";qa.innerText="";ab=0;za={"draw.io":ra};+for(Fa in pa)za[Fa]=pa[Fa];u()}else z(!0)};ka?c(ea.value,ta):P(ta)};P&&(D=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ba()}),p.appendChild(D),W.push(D));if(c){D=document.createElement("span");D.style.marginLeft="10px";D.innerText=mxResources.get("search")+":";p.appendChild(D);var ea=document.createElement("input");ea.style.marginRight="10px";ea.style.marginLeft="10px";ea.style.width="220px";mxEvent.addListener(ea,"keypress",function(ka){13==ka.keyCode&&ba(!0)});p.appendChild(ea);+D=mxUtils.button(mxResources.get("search"),function(){ba(!0)});D.className="geBtn";p.appendChild(D)}Y(0)}var ca=null,fa=null,aa=null,da=null,ha=null,na=null,oa=null,ia=null,va=null,ua=document.createElement("div");ua.style.border="1px solid #d3d3d3";ua.style.position="absolute";ua.style.left="160px";ua.style.right="34px";p=(l?72:40)+(t?30:0);ua.style.top=p+"px";ua.style.bottom="68px";ua.style.margin="6px 0 0 -1px";ua.style.padding="6px";ua.style.overflow="auto";var wa=document.createElement("div");+wa.style.cssText="position:absolute;left:30px;width:128px;top:"+p+"px;height:22px;margin-top: 6px;white-space: nowrap;";var Ba=document.createElement("input");Ba.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";Ba.setAttribute("placeholder",mxResources.get("search"));Ba.setAttribute("type","text");wa.appendChild(Ba);var ja=document.createElement("img");ja.setAttribute("src",Editor.magnifyImage);ja.setAttribute("title",mxResources.get("search"));+ja.className="geAdaptiveAsset";ja.style.position="relative";ja.style.cursor="pointer";ja.style.opacity="0.5";ja.style.height="16px";ja.style.left="-20px";ja.style.top="4px";ja.style.background="url('"+b.editor.transparentImage+"')";wa.appendChild(ja);mxEvent.addListener(ja,"click",function(){ja.getAttribute("src")!=Editor.magnifyImage&&(ja.setAttribute("src",Editor.magnifyImage),ja.setAttribute("title",mxResources.get("search")),Ba.value="",null!=Xa&&(Xa.click(),Xa=null));Ba.focus()});mxEvent.addListener(Ba,+"keydown",mxUtils.bind(this,function(ka){if(13==ka.keyCode){var ta=Ba.value;if(""==ta)null!=Xa&&(Xa.click(),Xa=null);else{if(null==NewDialog.tagsList[L]){var ra={};for(Na in za)if(null==za[Na].content)for(var ma=za[Na],pa=0;pa<ma.length;pa++){var ya=ma[pa];if(null!=ya.tags)for(var Fa=ya.tags.toLowerCase().split(";"),Ha=0;Ha<Fa.length;Ha++)null==ra[Fa[Ha]]&&(ra[Fa[Ha]]=[]),ra[Fa[Ha]].push(ya)}NewDialog.tagsList[L]=ra}var Pa=ta.toLowerCase().split(" ");ra=NewDialog.tagsList[L];if(0<ab&&null==ra.__tagsList__){for(Na in Sa)for(ma=+Sa[Na],pa=0;pa<ma.length;pa++)for(ya=ma[pa],Fa=ya.title.split(" "),Fa.push(Na),Ha=0;Ha<Fa.length;Ha++){var La=Fa[Ha].toLowerCase();null==ra[La]&&(ra[La]=[]);ra[La].push(ya)}ra.__tagsList__=!0}var Na=[];ma={};for(pa=Fa=0;pa<Pa.length;pa++)if(0<Pa[pa].length){La=ra[Pa[pa]];var Va={};Na=[];if(null!=La)for(Ha=0;Ha<La.length;Ha++)ya=La[Ha],0==Fa==(null==ma[ya.url])&&(Va[ya.url]=!0,Na.push(ya));ma=Va;Fa++}ua.scrollTop=0;ua.innerText="";k=0;ra=document.createElement("div");ra.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";+mxUtils.write(ra,mxResources.get(0==Na.length?"noResultsFor":"resultsFor",[ta]));ua.appendChild(ra);null!=Wa&&null==Xa&&(Wa.style.backgroundColor="",Xa=Wa,Wa=ra);Ua=Na;V=null;z(!1)}mxEvent.consume(ka)}}));mxEvent.addListener(Ba,"keyup",mxUtils.bind(this,function(ka){""==Ba.value?(ja.setAttribute("src",Editor.magnifyImage),ja.setAttribute("title",mxResources.get("search"))):(ja.setAttribute("src",Editor.crossImage),ja.setAttribute("title",mxResources.get("reset")))}));p+=23;var qa=document.createElement("div");+qa.style.cssText="position:absolute;left:30px;width:128px;top:"+p+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(ua,"scroll",function(){b.sidebar.hideTooltip()});var la=140,Ea=la,sa=null,Ia="url("+Editor.sparklesImage+")",xa=document.createElement("textarea");xa.setAttribute("placeholder",mxResources.get("describeYourDiagram"));xa.style.position="absolute";xa.style.fontFamily="sans-serif";xa.style.outline="none";xa.style.left="0px";xa.style.right="0px";+xa.style.top="0px";xa.style.bottom="38px";xa.style.resize="none";xa.style.boxSizing="border-box";xa.style.fontSize="12px";xa.style.border="none";xa.style.margin="8px";var Ca=document.createElement("button");Ca.className="geBtn gePrimaryBtn";Ca.style.position="absolute";Ca.style.bottom="0px";Ca.style.height="30px";Ca.style.right="0px";Ca.style.left="0px";Ca.style.margin="8px";Ca.style.fontSize="14px";Ca.style.borderRadius="4px";Ca.setAttribute("disabled","disabled");Ca.setAttribute("title",mxResources.get("ok"));+mxUtils.write(Ca,mxResources.get("ok"));var Da=I.cloneNode(!0),Ka=!1;mxEvent.addGestureListeners(Da,function(ka){Ka=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(ka){if(!Ka&&null!=ia){var ta="<mxfile><diagram>"+Graph.compress(ia)+"</diagram></mxfile>";E(ta,mxEvent.getClientX(ka),mxEvent.getClientY(ka),sa,va)}});var Ja=I.cloneNode(!0);Ja.setAttribute("src",Editor.editImage);Ja.setAttribute("title",mxResources.get("edit"));Ja.style.right="";Ja.style.left="2px";var Aa=+I.cloneNode(!0);Aa.setAttribute("src",Editor.helpImage);Aa.setAttribute("title",mxResources.get("help"));Aa.style.opacity="1";Aa.style.right="-8px";Aa.style.top="-8px";mxEvent.addListener(Aa,"click",function(ka){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(ka)});xa.style.visibility="hidden";Ca.style.visibility="hidden";Ja.style.visibility="hidden";Aa.style.visibility="hidden";Da.style.visibility="hidden";mxEvent.addListener(Ja,"click",U);mxEvent.addListener(xa,+"input",function(){""!=xa.value?Ca.removeAttribute("disabled"):Ca.setAttribute("disabled","disabled")});mxEvent.addListener(Ca,"click",function(){N()});mxEvent.addListener(xa,"keydown",function(ka){13!=ka.keyCode||mxEvent.isShiftDown(ka)?27==ka.keyCode&&(N(!0),mxEvent.consume(ka)):(N(),mxEvent.consume(ka))});var za={},Ra={},Sa={},ab=0,db=!0,Wa=null,Xa=null;za.basic=[{title:"blankDiagram"}];var Ua=za.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==+typeof mxMermaidToDrawio&&window.isMermaidEnabled&&za.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(za.smartTemplate={content:C()});if(!g){var eb=function(){mxUtils.get($a,function(ka){if(!jb){jb=!0;ka=ka.getXml().documentElement.firstChild;for(var ta={};null!=ka;){if("undefined"!==typeof ka.getAttribute)if("parsererror"==ka.nodeName)null!=window.console&&+console.log("Parser error in "+L+": "+ka.textContent);else if("clibs"==ka.nodeName){for(var ra=ka.getAttribute("name"),ma=ka.getElementsByTagName("add"),pa=[],ya=0;ya<ma.length;ya++)pa.push(encodeURIComponent(mxUtils.getTextContent(ma[ya])));null!=ra&&0<pa.length&&(ta[ra]=pa.join(";"))}else if(pa=ka.getAttribute("url"),null!=pa){ma=ka.getAttribute("section");ra=ka.getAttribute("subsection");if(null==ma&&(ya=pa.indexOf("/"),ma=pa.substring(0,ya),null==ra)){var Fa=pa.indexOf("/",ya+1);-1<Fa&&(ra=pa.substring(ya++1,Fa))}ya=za[ma];null==ya&&(ya=[],za[ma]=ya);pa=ka.getAttribute("clibs");null!=ta[pa]&&(pa=ta[pa]);pa={url:ka.getAttribute("url"),libs:ka.getAttribute("libs"),title:ka.getAttribute("title"),tooltip:ka.getAttribute("name")||ka.getAttribute("url"),preview:ka.getAttribute("preview"),clibs:pa,tags:ka.getAttribute("tags")};ya.push(pa);null!=ra&&(ya=Ra[ma],null==ya&&(ya={},Ra[ma]=ya),ma=ya[ra],null==ma&&(ma=[],ya[ra]=ma),ma.push(pa))}ka=ka.nextSibling}v.stop();u()}})};A.appendChild(wa);A.appendChild(qa);+A.appendChild(ua);var jb=!1,$a=L;/^https?:\/\//.test($a)&&!b.editor.isCorsEnabledForUrl($a)&&($a=PROXY_URL+"?url="+encodeURIComponent($a));v.spin(ua);null!=n?n(function(ka,ta){Sa=ka;Z=ab=ta;eb()},eb):eb();X=za}mxEvent.addListener(T,"keypress",function(ka){b.dialog.container.firstChild==A&&13==ka.keyCode&&F()});n=document.createElement("div");n.style.marginTop=g?"4px":"16px";n.style.textAlign="right";n.style.position="absolute";n.style.left="40px";n.style.bottom="24px";n.style.right="40px";p=mxUtils.button(mxResources.get("cancel"),function(){null!=y&&y();b.hideDialog(!0)});p.className="geBtn";!b.editor.cancelFirst||q&&null==y||n.appendChild(p);g||"1"==urlParams.embed||q||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(g=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ka=new FilenameDialog(b,"",mxResources.get("create"),function(ta){null!=ta&&0<ta.length&&b.editor.loadUrl(b.editor.getProxiedUrl(ta),function(ra){aa=ra;ca=null;templateRealURl=ta;b.hideDialog();F()},function(ra){b.handleError(ra)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ka.container,300,80,!0,!0);ka.init()}),g.className="geBtn",n.appendChild(g));Graph.fileSupport&&f&&(f=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ka=document.createElement("input");ka.setAttribute("multiple","multiple");ka.setAttribute("type","file");mxEvent.addListener(ka,"change",function(ta){b.openFiles(ka.files,!0);ka.value=""});ka.style.display="none";document.body.appendChild(ka);b.newDlgFileInputElt=ka}b.newDlgFileInputElt.click()}),f.className="geBtn",n.appendChild(f));n.appendChild(G);b.editor.cancelFirst||null!=d||q&&null==y||n.appendChild(p);A.appendChild(n);this.container=A};NewDialog.tagsList={};var SaveDialog=function(b,g,l,d,q,y,x,D){function J(A,B,H,T,k,v){var G=null;if(null==d||0>mxUtils.indexOf(d,A))if(k=null!=k?k:b.getTitleForService(A),0<=mxUtils.indexOf(U,A)||null!=b.getServiceForName(A)){G=document.createElement("option");if("pick"==v)G.innerHTML=mxUtils.htmlEntities(k)+" – "+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"...",G.setAttribute("value","pickFolder-"+A),G.setAttribute("title",k+" - "+mxResources.get("pickFolder")+"...");else{var I=A+-(null!=H?"-"+H:""),M=m[I];null!=M&&null!=M.option&&M.option.parentNode.removeChild(M.option);M=null;if(null!=B){"/"==B.charAt(B.length-1)&&(B=B.substring(0,B.length-1));"/"==B.charAt(0)&&(B=B.substring(1));M=B;if(A!=App.MODE_GITHUB&&A==App.MODE_GITLAB){var N=M.lastIndexOf("/");0<=N&&(M=M.substring(N+1))}40<M.length&&(M=M.substring(0,20)+"..."+M.substring(M.length-20))}G.innerHTML=mxUtils.htmlEntities(k)+(null!=M?" – "+mxUtils.htmlEntities(M):"");G.setAttribute("title",k++(null!=H?"-"+H:""),M=m[I];null!=M&&null!=M.option&&M.option.parentNode.removeChild(M.option);M=null;if(null!=B){"/"==B.charAt(B.length-1)&&(B=B.substring(0,B.length-1));"/"==B.charAt(0)&&(B=B.substring(1));M=B;if(A!=App.MODE_GITHUB&&A==App.MODE_GITLAB){var R=M.lastIndexOf("/");0<=R&&(M=M.substring(R+1))}40<M.length&&(M=M.substring(0,20)+"..."+M.substring(M.length-20))}G.innerHTML=mxUtils.htmlEntities(k)+(null!=M?" – "+mxUtils.htmlEntities(M):"");G.setAttribute("title",k+(null!=B?" ("+B+")":"")+(null!=H&&decodeURIComponent(H)!=B?" ["+H+"]":""));G.setAttribute("value",I);m[I]={option:G,mode:A,path:B,id:H};SaveDialog.lastValue==I&&null==D?T=!0:null==T&&("root"==v?T=null==D&&b.mode==A||null!=A&&A==D:"pickFolder-"==F.value.substring(0,11)&&(T=!0));T&&G.setAttribute("selected","selected")}F.appendChild(G)}return G}function K(A){b.pickFolder(A,function(B){var H=null;A==App.MODE_GOOGLE&&null!=B.docs&&0<B.docs.length?H={mode:A,path:B.docs[0].name,id:B.docs[0].id}:A==App.MODE_ONEDRIVE&&-null!=B.value&&0<B.value.length?H={mode:A,path:B.value[0].name,id:OneDriveFile.prototype.getIdOf(B.value[0])}:(A==App.MODE_GITHUB||A==App.MODE_GITLAB)&&null!=B&&0<B.length&&(H={mode:A,path:decodeURIComponent(B),id:B});null!=H&&(R.style.display="",b.addRecent(H,"Folders",5),B=J(H.mode,H.path,H.id,!0),F.innerHTML="",m={},L(),H=F.selectedIndex,F.value=B.value,0>F.selectedIndex&&(F.selectedIndex=H))},!0,!0,!0,!0)}function L(){var A=b.getRecent("Folders"),B=0;if(null!=A&&0<A.length){for(var H=0;H<A.length;H++)null!=-J(A[H].mode,A[H].path,A[H].id)&&B++;0<B&&F.appendChild(P.cloneNode(!0))}J(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");J(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(J(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),J(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&J(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);J(App.MODE_GITHUB,null,null,null,null,"pick");J(App.MODE_GITLAB,null,-null,null,null,"pick");J(App.MODE_TRELLO);A=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&A&&J(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=d&&0<=mxUtils.indexOf(d,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&J(App.MODE_BROWSER);A&&J("download");Editor.popupsAllowed&&J("_blank",null,null,null,mxResources.get("openInNewWindow"));0<B&&(F.appendChild(P.cloneNode(!0)),B=F.value,F.appendChild(R),-F.value=B);if("pickFolder-"==F.value.substring(0,11)||"reset"==F.value)B=document.createElement("option"),B.setAttribute("value",""),B.setAttribute("selected","selected"),mxUtils.write(B,mxResources.get("pickFolder")+"..."),F.insertBefore(B,F.firstChild);O=F.value}function Q(){if("reset"==F.value)b.resetRecent("Folders"),F.innerHTML="",F.value="",pickFolderOption=null,m={},L();else if("pickFolder-"==F.value.substring(0,11)){var A=F.value.substring(11);F.value=O;K(A)}else if(null!=C&&null!=m[F.value]&&+null!=B.value&&0<B.value.length?H={mode:A,path:B.value[0].name,id:OneDriveFile.prototype.getIdOf(B.value[0])}:(A==App.MODE_GITHUB||A==App.MODE_GITLAB)&&null!=B&&0<B.length&&(H={mode:A,path:decodeURIComponent(B),id:B});null!=H&&(S.style.display="",b.addRecent(H,"Folders",5),B=J(H.mode,H.path,H.id,!0),F.innerHTML="",m={},L(),H=F.selectedIndex,F.value=B.value,0>F.selectedIndex&&(F.selectedIndex=H))},!0,!0,!0,!0)}function L(){var A=b.getRecent("Folders"),B=0;if(null!=A&&0<A.length){for(var H=0;H<A.length;H++)null!=+J(A[H].mode,A[H].path,A[H].id)&&B++;0<B&&F.appendChild(O.cloneNode(!0))}J(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");J(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(J(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),J(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&J(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);J(App.MODE_GITHUB,null,null,null,null,"pick");J(App.MODE_GITLAB,null,+null,null,null,"pick");J(App.MODE_TRELLO);A=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&A&&J(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=d&&0<=mxUtils.indexOf(d,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&J(App.MODE_BROWSER);A&&J("download");Editor.popupsAllowed&&J("_blank",null,null,null,mxResources.get("openInNewWindow"));0<B&&(F.appendChild(O.cloneNode(!0)),B=F.value,F.appendChild(S),+F.value=B);if("pickFolder-"==F.value.substring(0,11)||"reset"==F.value)B=document.createElement("option"),B.setAttribute("value",""),B.setAttribute("selected","selected"),mxUtils.write(B,mxResources.get("pickFolder")+"..."),F.insertBefore(B,F.firstChild);N=F.value}function P(){if("reset"==F.value)b.resetRecent("Folders"),F.innerHTML="",F.value="",pickFolderOption=null,m={},L();else if("pickFolder-"==F.value.substring(0,11)){var A=F.value.substring(11);F.value=N;K(A)}else if(null!=C&&null!=m[F.value]&&null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[C.value].extension){A=b.getExtensionForService(m[F.value].mode);var B=E.value;null!=A&&0>g.indexOf(".")&&0>B.indexOf(".")&&(E.value=B+A)}u.innerHTML="";mxUtils.write(u,mxResources.get("download"==F.value||"_blank"==F.value?"ok":"save"));""==F.value?u.setAttribute("disabled","disabled"):u.removeAttribute("disabled")}var c=document.createElement("div");c.style.display="flex";c.style.flexWrap="wrap";c.style.whiteSpace="nowrap";var e=document.createElement("div");e.style.display="grid";e.style.gap="5px 8px";e.style.gridAutoRows="auto auto 44px";e.style.gridAutoColumns="0fr minmax(0,1fr)";e.style.width="100%";var f=null,p=null;if(null!=q&&null!=y&&"image/"==y.substring(0,6)&&("image/svg"!=y.substring(0,9)||mxClient.IS_SVG)){e.style.display="inline-grid";e.style.flexBasis="75%";f=document.createElement("div");f.style.display="inline-block";f.style.height="auto";f.style.maxWidth="25%";f.style.margin="auto";var n=document.createElement("img"),t=x?q:btoa(unescape(encodeURIComponent(q)));n.setAttribute("src","data:"+y+";base64,"+t);n.style.boxSizing="border-box";n.style.maxHeight="50px";n.style.maxWidth="100%";n.style.paddingLeft="10px";f.appendChild(n);mxClient.IS_FF||"image/png"!=y||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(p=mxUtils.button(mxResources.get("copy"),function(){var A=b.base64ToBlob(t,"image/png");A=new ClipboardItem({"image/png":A,"text/html":new Blob(['<img src="data:'+y+";base64,"+t+'">'],{type:"text/html"})});navigator.clipboard.write([A]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(B){b.handleError(B)}))},null,"geBtn"));Editor.popupsAllowed&&(null==d||0>mxUtils.indexOf(d,"_blank"))?(f.setAttribute("title",mxResources.get("openInNewWindow")),f.style.cursor="pointer",mxEvent.addGestureListeners(f,null,null,function(A){mxEvent.isPopupTrigger(A)||b.openInNewWindow(q,y,x)})):f.setAttribute("title",mxResources.get("preview"))}n=document.createElement("div");n.style.display="flex";n.style.padding="1px";n.style.alignItems="center";n.style.justifyContent="flex-end";n.style.gridColumn="1";n.style.whiteSpace="nowrap";var z=document.createElement("div");z.style.display="grid";z.style.padding="1px";z.style.alignItems="center";z.style.gridColumn="2";z.style.gridAutoColumns="minmax(0,1fr) auto";z.style.gap="6px";mxUtils.write(n,mxResources.get("saveAs")+":");var E=document.createElement("input");E.setAttribute("type","text");E.setAttribute("value",g);E.style.boxSizing="border-box";E.style.width="100%";z.appendChild(E);e.appendChild(n);e.appendChild(z);var C=null;null!=b.editor.diagramFileTypes&&null==y&&(n=n.cloneNode(!1),z=z.cloneNode(!1),mxUtils.write(n,mxResources.get("type")+":"),C=FilenameDialog.createFileTypes(b,E,b.editor.diagramFileTypes),C.style.boxSizing="border-box",C.style.width="100%",z.appendChild(C),e.appendChild(n),e.appendChild(z));n=n.cloneNode(!1);z=z.cloneNode(!1);mxUtils.write(n,mxResources.get("where")+":");var F=document.createElement("select");-F.style.textOverflow="ellipsis";F.style.gridColumn="1";var R=document.createElement("option");mxUtils.write(R,mxResources.get("reset"));R.setAttribute("value","reset");var U=["browser","device","download","_blank"],P=document.createElement("option");P.setAttribute("disabled","disabled");P.innerHTML="-----------------";var O=null,m={},u=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=F.value;var A=m[SaveDialog.lastValue];null!=A&&l(E,A.mode,A.id)},null,"geBtn gePrimaryBtn");-mxEvent.addListener(E,"keypress",function(A){13==A.keyCode&&u.click()});mxEvent.addListener(F,"change",Q);L();Q();z.appendChild(F);null!=SaveDialog.lastValue&&null!=m[SaveDialog.lastValue]&&(F.value=SaveDialog.lastValue);e.appendChild(n);e.appendChild(z);c.appendChild(e);null!=f&&c.appendChild(f);e=document.createElement("div");e.style.flexBasis="100%";e.style.textAlign="right";e.style.marginTop=null!=y?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||e.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));-f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&e.appendChild(f);null!=p&&e.appendChild(p);e.appendChild(u);b.editor.cancelFirst||e.appendChild(f);c.appendChild(e);this.init=function(){Editor.selectFilename(E)};this.container=c},CreateDialog=function(b,g,l,d,q,y,x,D,J,K,L,Q,c,e,f,p,n){function t(O,m,u,A){function B(){mxEvent.addListener(H,"click",function(){var I=u;if(x){var M=C.value,N=M.lastIndexOf(".");if(0>g.lastIndexOf(".")&&0>N){I=null!=-I?I:P.value;var S="";I==App.MODE_GOOGLE?S=b.drive.extension:I==App.MODE_GITHUB?S=b.gitHub.extension:I==App.MODE_GITLAB?S=b.gitLab.extension:I==App.MODE_TRELLO?S=b.trello.extension:I==App.MODE_DROPBOX?S=b.dropbox.extension:I==App.MODE_ONEDRIVE?S=b.oneDrive.extension:I==App.MODE_DEVICE&&(S=".drawio");0<=N&&(M=M.substring(0,N));C.value=M+S}}z(u)})}var H=document.createElement("a");H.style.overflow="hidden";var T=document.createElement("img");T.src=O;T.setAttribute("border","0");T.setAttribute("align",+F.style.textOverflow="ellipsis";F.style.gridColumn="1";var S=document.createElement("option");mxUtils.write(S,mxResources.get("reset"));S.setAttribute("value","reset");var U=["browser","device","download","_blank"],O=document.createElement("option");O.setAttribute("disabled","disabled");O.innerHTML="-----------------";var N=null,m={},u=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=F.value;var A=m[SaveDialog.lastValue];null!=A&&l(E,A.mode,A.id)},null,"geBtn gePrimaryBtn");+mxEvent.addListener(E,"keypress",function(A){13==A.keyCode&&u.click()});mxEvent.addListener(F,"change",P);L();P();z.appendChild(F);null!=SaveDialog.lastValue&&null!=m[SaveDialog.lastValue]&&(F.value=SaveDialog.lastValue);e.appendChild(n);e.appendChild(z);c.appendChild(e);null!=f&&c.appendChild(f);e=document.createElement("div");e.style.flexBasis="100%";e.style.textAlign="right";e.style.marginTop=null!=y?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||e.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));+f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&e.appendChild(f);null!=p&&e.appendChild(p);e.appendChild(u);b.editor.cancelFirst||e.appendChild(f);c.appendChild(e);this.init=function(){Editor.selectFilename(E)};this.container=c},CreateDialog=function(b,g,l,d,q,y,x,D,J,K,L,P,c,e,f,p,n){function t(N,m,u,A){function B(){mxEvent.addListener(H,"click",function(){var I=u;if(x){var M=C.value,R=M.lastIndexOf(".");if(0>g.lastIndexOf(".")&&0>R){I=null!=+I?I:O.value;var Q="";I==App.MODE_GOOGLE?Q=b.drive.extension:I==App.MODE_GITHUB?Q=b.gitHub.extension:I==App.MODE_GITLAB?Q=b.gitLab.extension:I==App.MODE_TRELLO?Q=b.trello.extension:I==App.MODE_DROPBOX?Q=b.dropbox.extension:I==App.MODE_ONEDRIVE?Q=b.oneDrive.extension:I==App.MODE_DEVICE&&(Q=".drawio");0<=R&&(M=M.substring(0,R));C.value=M+Q}}z(u)})}var H=document.createElement("a");H.style.overflow="hidden";var T=document.createElement("img");T.src=N;T.setAttribute("border","0");T.setAttribute("align","absmiddle");T.style.width="60px";T.style.height="60px";T.style.paddingBottom="6px";H.style.display="inline-block";H.className="geBaseButton";H.style.position="relative";H.style.margin="4px";H.style.padding="8px 8px 10px 8px";H.style.whiteSpace="nowrap";H.appendChild(T);H.style.color="gray";H.style.fontSize="11px";var k=document.createElement("div");H.appendChild(k);mxUtils.write(k,m);if(null!=A&&null==b[A]){T.style.visibility="hidden";mxUtils.setOpacity(k,10);var v=new Spinner({lines:12,length:12,-width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(H);var G=window.setTimeout(function(){null==b[A]&&(v.stop(),H.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[A]&&(window.clearTimeout(G),mxUtils.setOpacity(k,100),T.style.visibility="",v.stop(),B())}))}else B();R.appendChild(H);++U==Q&&(mxUtils.br(R),U=0)}function z(O){var m=C.value;if(null==O||null!=m&&0<m.length)n&&b.hideDialog(),-l(m,O,C)}L="1"==urlParams.noDevice?!1:L;x=null!=x?x:!0;D=null!=D?D:!0;Q=null!=Q?Q:4;n=null!=n?n:!0;y=document.createElement("div");y.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(y);var E=document.createElement("h2");mxUtils.write(E,q||mxResources.get("create"));E.style.marginTop="0px";E.style.marginBottom="24px";y.appendChild(E);q=document.createElement("span");mxUtils.write(q,mxResources.get("filename")+":");q.style.maxWidth="106px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";+width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(H);var G=window.setTimeout(function(){null==b[A]&&(v.stop(),H.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[A]&&(window.clearTimeout(G),mxUtils.setOpacity(k,100),T.style.visibility="",v.stop(),B())}))}else B();S.appendChild(H);++U==P&&(mxUtils.br(S),U=0)}function z(N){var m=C.value;if(null==N||null!=m&&0<m.length)n&&b.hideDialog(),+l(m,N,C)}L="1"==urlParams.noDevice?!1:L;x=null!=x?x:!0;D=null!=D?D:!0;P=null!=P?P:4;n=null!=n?n:!0;y=document.createElement("div");y.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(y);var E=document.createElement("h2");mxUtils.write(E,q||mxResources.get("create"));E.style.marginTop="0px";E.style.marginBottom="24px";y.appendChild(E);q=document.createElement("span");mxUtils.write(q,mxResources.get("filename")+":");q.style.maxWidth="106px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";q.style.display="inline-block";y.appendChild(q);var C=document.createElement("input");C.setAttribute("value",g);C.style.width="180px";C.style.marginLeft="10px";C.style.marginBottom="20px";C.style.maxWidth="70%";this.init=function(){Editor.selectFilename(C)};y.appendChild(C);null!=p&&null!=b.editor.diagramFileTypes&&(p=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),p.style.marginLeft="6px",p.style.width="90px",y.appendChild(p));p=null;if("1"!=urlParams.noDevice&&null!=c&&null!=e&&"image/"==e.substring(0,6)&&("image/svg"!=e.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";q=document.createElement("img");var F=f?c:btoa(unescape(encodeURIComponent(c)));q.setAttribute("src","data:"+e+";base64,"+F);q.style.position="absolute";q.style.top="70px";q.style.right="100px";q.style.maxWidth="120px";q.style.maxHeight="80px";mxUtils.setPrefixedStyle(q.style,"transform","translate(50%,-50%)");y.appendChild(q);mxClient.IS_FF||"image/png"!=e||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||-(p=mxUtils.button(mxResources.get("copy"),function(O){O=b.base64ToBlob(F,"image/png");O=new ClipboardItem({"image/png":O,"text/html":new Blob(['<img src="data:'+e+";base64,"+F+'">'],{type:"text/html"})});navigator.clipboard.write([O]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(m){b.handleError(m)}))}),p.style.marginTop="6px",p.className="geBtn");J&&Editor.popupsAllowed&&(q.style.cursor="pointer",mxEvent.addGestureListeners(q,-null,null,function(O){mxEvent.isPopupTrigger(O)||z("_blank")}))}mxUtils.br(y);var R=document.createElement("div");R.style.textAlign="center";var U=0;R.style.marginTop="6px";y.appendChild(R);var P=document.createElement("select");P.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(c,mxResources.get("googleDrive")),P.appendChild(c),t(IMAGE_PATH+"/google-drive-logo.svg",-mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(c,mxResources.get("oneDrive")),P.appendChild(c),b.mode==App.MODE_ONEDRIVE&&c.setAttribute("selected","selected"),t(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_DROPBOX),-mxUtils.write(c,mxResources.get("dropbox")),P.appendChild(c),b.mode==App.MODE_DROPBOX&&c.setAttribute("selected","selected"),t(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_GITHUB),mxUtils.write(c,mxResources.get("github")),P.appendChild(c),t(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(c=document.createElement("option"),-c.setAttribute("value",App.MODE_GITLAB),mxUtils.write(c,mxResources.get("gitlab")),P.appendChild(c),t(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_TRELLO),mxUtils.write(c,mxResources.get("trello")),P.appendChild(c),t(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||-null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)c=document.createElement("option"),c.setAttribute("value",App.MODE_DEVICE),mxUtils.write(c,mxResources.get("device")),P.appendChild(c),b.mode!=App.MODE_DEVICE&&D||c.setAttribute("selected","selected"),L&&t(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);D&&isLocalStorage&&"0"!=urlParams.browser&&(D=document.createElement("option"),D.setAttribute("value",App.MODE_BROWSER),mxUtils.write(D,mxResources.get("browser")),P.appendChild(D),+(p=mxUtils.button(mxResources.get("copy"),function(N){N=b.base64ToBlob(F,"image/png");N=new ClipboardItem({"image/png":N,"text/html":new Blob(['<img src="data:'+e+";base64,"+F+'">'],{type:"text/html"})});navigator.clipboard.write([N]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(m){b.handleError(m)}))}),p.style.marginTop="6px",p.className="geBtn");J&&Editor.popupsAllowed&&(q.style.cursor="pointer",mxEvent.addGestureListeners(q,+null,null,function(N){mxEvent.isPopupTrigger(N)||z("_blank")}))}mxUtils.br(y);var S=document.createElement("div");S.style.textAlign="center";var U=0;S.style.marginTop="6px";y.appendChild(S);var O=document.createElement("select");O.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(c,mxResources.get("googleDrive")),O.appendChild(c),t(IMAGE_PATH+"/google-drive-logo.svg",+mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(c,mxResources.get("oneDrive")),O.appendChild(c),b.mode==App.MODE_ONEDRIVE&&c.setAttribute("selected","selected"),t(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_DROPBOX),+mxUtils.write(c,mxResources.get("dropbox")),O.appendChild(c),b.mode==App.MODE_DROPBOX&&c.setAttribute("selected","selected"),t(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_GITHUB),mxUtils.write(c,mxResources.get("github")),O.appendChild(c),t(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(c=document.createElement("option"),+c.setAttribute("value",App.MODE_GITLAB),mxUtils.write(c,mxResources.get("gitlab")),O.appendChild(c),t(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_TRELLO),mxUtils.write(c,mxResources.get("trello")),O.appendChild(c),t(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||+null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)c=document.createElement("option"),c.setAttribute("value",App.MODE_DEVICE),mxUtils.write(c,mxResources.get("device")),O.appendChild(c),b.mode!=App.MODE_DEVICE&&D||c.setAttribute("selected","selected"),L&&t(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);D&&isLocalStorage&&"0"!=urlParams.browser&&(D=document.createElement("option"),D.setAttribute("value",App.MODE_BROWSER),mxUtils.write(D,mxResources.get("browser")),O.appendChild(D),b.mode==App.MODE_BROWSER&&D.setAttribute("selected","selected"),t(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));D=document.createElement("div");D.style.marginTop="26px";D.style.textAlign="center";null!=K&&(L=mxUtils.button(mxResources.get("help"),function(){b.openLink(K)}),L.className="geBtn",D.appendChild(L));L=mxUtils.button(mxResources.get(null!=d?"close":"cancel"),function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});L.className="geBtn";b.editor.cancelFirst&&null==d&&D.appendChild(L);null==d&&(c=mxUtils.button(mxResources.get("decideLater"),function(){z(null)}),c.className="geBtn",D.appendChild(c));J&&Editor.popupsAllowed&&(J=mxUtils.button(mxResources.get("openInNewWindow"),function(){z("_blank")}),J.className="geBtn",D.appendChild(J));CreateDialog.showDownloadButton&&(J=mxUtils.button(mxResources.get("download"),function(){z("download")}),J.className="geBtn",D.appendChild(J),null!=p&&(J.style.marginTop="6px",-D.style.marginTop="6px"));null!=p&&(mxUtils.br(D),D.appendChild(p));b.editor.cancelFirst&&null==d||D.appendChild(L);mxEvent.addListener(C,"keypress",function(O){13==O.keyCode?z(App.MODE_DEVICE):27==O.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});y.appendChild(D);this.container=y};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;+D.style.marginTop="6px"));null!=p&&(mxUtils.br(D),D.appendChild(p));b.editor.cancelFirst&&null==d||D.appendChild(L);mxEvent.addListener(C,"keypress",function(N){13==N.keyCode?z(App.MODE_DEVICE):27==N.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});y.appendChild(D);this.container=y};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;var PopupDialog=function(b,g,l,d,q){q=null!=q?q:!0;var y=document.createElement("div");y.style.textAlign="left";y.style.height="100%";mxUtils.write(y,mxResources.get("fileOpenLocation"));mxUtils.br(y);mxUtils.br(y);var x=mxUtils.button(mxResources.get("openInThisWindow"),function(){q&&b.hideDialog();null!=d&&d()});x.className="geBtn";x.style.marginBottom="8px";x.style.width="280px";y.appendChild(x);mxUtils.br(y);var D=mxUtils.button(mxResources.get("openInNewWindow"),function(){q&&b.hideDialog();-null!=l&&l();b.openLink(g,null,!0)});D.className="geBtn gePrimaryBtn";D.style.width=x.style.width;y.appendChild(D);mxUtils.br(y);mxUtils.br(y);mxUtils.write(y,mxResources.get("allowPopups"));this.container=y},ImageDialog=function(b,g,l,d,q,y,x,D){function J(){0<Q.value.length?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled");"data:"!=Q.value.substring(0,5)?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")}y=null!=y?y:!0;var K=b.editor.graph,L=document.createElement("div");-mxUtils.write(L,g);g=document.createElement("div");g.className="geTitle";g.style.backgroundColor="transparent";g.style.borderColor="transparent";g.style.whiteSpace="nowrap";g.style.textOverflow="clip";g.style.cursor="default";g.style.paddingRight="20px";var Q=document.createElement("input");Q.setAttribute("value",l);Q.setAttribute("type","text");Q.setAttribute("spellcheck","false");Q.setAttribute("autocorrect","off");Q.setAttribute("autocomplete","off");Q.setAttribute("autocapitalize","off");Q.style.marginTop=-"6px";Q.style.width=(Graph.fileSupport?460:340)-20+"px";Q.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";Q.style.backgroundRepeat="no-repeat";Q.style.backgroundPosition="100% 50%";Q.style.paddingRight="14px";l=document.createElement("div");l.setAttribute("title",mxResources.get("reset"));l.style.position="relative";l.style.left="-16px";l.style.width="12px";l.style.height="14px";l.style.cursor="pointer";l.style.display="inline-block";l.style.top="3px";l.style.background="url('"+b.editor.transparentImage+-"')";mxEvent.addListener(l,"click",function(){Q.value="";Q.focus()});g.appendChild(Q);g.appendChild(l);L.appendChild(g);var c=D,e,f,p=function(C,F,R,U){var P="data:"==C.substring(0,5);!b.isOffline()||P&&"undefined"===typeof chrome?0<C.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(C,function(O){b.spinner.stop();b.hideDialog();var m=!1===U?1:null!=F&&null!=R?Math.max(F/O.width,R/O.height):Math.min(1,Math.min(520/O.width,520/O.height));y&&(C=b.convertDataUri(C));d(C,-Math.round(Number(O.width)*m),Math.round(Number(O.height)*m),c,e,f)},function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(C,null,null,c,e,f)):(C=b.convertDataUri(C),F=null==F?120:F,R=null==R?100:R,b.hideDialog(),d(C,F,R,c,e,f))},n=function(C,F){if(null!=C){var R=q?null:K.getModel().getGeometry(K.getSelectionCell());null!=R?p(C,R.width,R.height,F):p(C,null,null,F)}else b.hideDialog(),d(null)};this.init=function(){Q.focus();-if(Graph.fileSupport){Q.setAttribute("placeholder",mxResources.get("dragImagesHere"));var C=L.parentNode,F=null;mxEvent.addListener(C,"dragleave",function(R){null!=F&&(F.parentNode.removeChild(F),F=null);R.stopPropagation();R.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(R){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=b.highlightElement(C));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(R){null!=F&&(F.parentNode.removeChild(F),-F=null);if(0<R.dataTransfer.files.length)b.importFiles(R.dataTransfer.files,0,0,b.maxImageSize,function(P,O,m,u,A,B,H,T){n(P,T)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var O=0;O<P.length;O++)P[O]()},!mxEvent.isControlDown(R),null,null,!0);else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var U=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(U)&&n(decodeURIComponent(U))}R.stopPropagation();R.preventDefault()}),-!1)}};D=document.createElement("div");D.style.marginTop="14px";D.style.textAlign="center";l=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&D.appendChild(l);ImageDialog.filePicked=function(C){C.action==google.picker.Action.PICKED&&null!=C.docs[0].thumbnails&&(C=C.docs[0].thumbnails[C.docs[0].thumbnails.length-1],null!=C&&(Q.value=C.url));Q.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var t=document.createElement("input");-t.setAttribute("multiple","multiple");t.setAttribute("type","file");mxEvent.addListener(t,"change",function(C){null!=t.files&&(b.importFiles(t.files,0,0,b.maxImageSize,function(F,R,U,P,O,m){n(F)},function(){},function(F){return"image/"==F.type.substring(0,6)},function(F){for(var R=0;R<F.length;R++)F[R]()},!0),t.type="",t.type="file",t.value="")});t.style.display="none";document.body.appendChild(t);b.imgDlgFileInputElt=t}g=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});-g.className="geBtn";D.appendChild(g)}mxEvent.addListener(Q,"keypress",function(C){13==C.keyCode&&n(Q.value)});var z=mxUtils.button(mxResources.get("crop"),function(){var C=new CropImageDialog(b,Q.value,c,function(F,R,U){c=F;e=R;f=U});b.showDialog(C.container,300,390,!0,!0)});x&&(z.className="geBtn",D.appendChild(z));var E=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=Q.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var C=b.editor.createImageUrlConverter().convert(Q.value),-F=new Image;F.onload=function(){b.editor.convertImageToDataUri(C,function(R){b.confirmImageResize(function(U){b.resizeImage(F,R,mxUtils.bind(this,function(P,O,m){b.spinner.stop();null!=P&&P.length<b.maxImageBytes?(Q.value=P,J()):b.handleError({message:mxResources.get("imageTooBig")})}),U,b.maxImageSize)},F.width>b.maxImageSize||F.height>b.maxImageSize||R.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};F.onerror=function(){b.spinner.stop();-b.handleError({message:mxResources.get("fileNotFound")})};F.src=C}});E.className="geBtn";mxEvent.addListener(Q,"change",function(C){c=null;J()});J();D.appendChild(E);x=mxUtils.button(mxResources.get("apply"),function(){n(Q.value)});x.className="geBtn gePrimaryBtn";D.appendChild(x);b.editor.cancelFirst||D.appendChild(l);Graph.fileSupport&&(D.style.marginTop="120px",L.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",L.style.backgroundPosition="center 65%",L.style.backgroundRepeat="no-repeat",-x=document.createElement("div"),x.style.position="absolute",x.style.width="420px",x.style.top="58%",x.style.textAlign="center",x.style.fontSize="18px",x.style.color="#a0c3ff",mxUtils.write(x,mxResources.get("dragImagesHere")),L.appendChild(x));L.appendChild(D);this.container=L},LinkDialog=function(b,g,l,d,q,y,x){function D(C,F){var R=document.createElement("option");mxUtils.write(R,mxResources.get(C));R.value=C;z.appendChild(R);E[C]=F}var J=document.createElement("div");J.style.height="100%";mxUtils.write(J,+null!=l&&l();b.openLink(g,null,!0)});D.className="geBtn gePrimaryBtn";D.style.width=x.style.width;y.appendChild(D);mxUtils.br(y);mxUtils.br(y);mxUtils.write(y,mxResources.get("allowPopups"));this.container=y},ImageDialog=function(b,g,l,d,q,y,x,D){function J(){0<P.value.length?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled");"data:"!=P.value.substring(0,5)?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")}y=null!=y?y:!0;var K=b.editor.graph,L=document.createElement("div");+mxUtils.write(L,g);g=document.createElement("div");g.className="geTitle";g.style.backgroundColor="transparent";g.style.borderColor="transparent";g.style.whiteSpace="nowrap";g.style.textOverflow="clip";g.style.cursor="default";g.style.paddingRight="20px";var P=document.createElement("input");P.setAttribute("value",l);P.setAttribute("type","text");P.setAttribute("spellcheck","false");P.setAttribute("autocorrect","off");P.setAttribute("autocomplete","off");P.setAttribute("autocapitalize","off");P.style.marginTop=+"6px";P.style.width=(Graph.fileSupport?460:340)-20+"px";P.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";P.style.backgroundRepeat="no-repeat";P.style.backgroundPosition="100% 50%";P.style.paddingRight="14px";l=document.createElement("div");l.setAttribute("title",mxResources.get("reset"));l.style.position="relative";l.style.left="-16px";l.style.width="12px";l.style.height="14px";l.style.cursor="pointer";l.style.display="inline-block";l.style.top="3px";l.style.background="url('"+b.editor.transparentImage++"')";mxEvent.addListener(l,"click",function(){P.value="";P.focus()});g.appendChild(P);g.appendChild(l);L.appendChild(g);var c=D,e,f,p=function(C,F,S,U){var O="data:"==C.substring(0,5);!b.isOffline()||O&&"undefined"===typeof chrome?0<C.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(C,function(N){b.spinner.stop();b.hideDialog();var m=!1===U?1:null!=F&&null!=S?Math.max(F/N.width,S/N.height):Math.min(1,Math.min(520/N.width,520/N.height));y&&(C=b.convertDataUri(C));d(C,+Math.round(Number(N.width)*m),Math.round(Number(N.height)*m),c,e,f)},function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(C,null,null,c,e,f)):(C=b.convertDataUri(C),F=null==F?120:F,S=null==S?100:S,b.hideDialog(),d(C,F,S,c,e,f))},n=function(C,F){if(null!=C){var S=q?null:K.getModel().getGeometry(K.getSelectionCell());null!=S?p(C,S.width,S.height,F):p(C,null,null,F)}else b.hideDialog(),d(null)};this.init=function(){P.focus();+if(Graph.fileSupport){P.setAttribute("placeholder",mxResources.get("dragImagesHere"));var C=L.parentNode,F=null;mxEvent.addListener(C,"dragleave",function(S){null!=F&&(F.parentNode.removeChild(F),F=null);S.stopPropagation();S.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(S){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=b.highlightElement(C));S.stopPropagation();S.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(S){null!=F&&(F.parentNode.removeChild(F),+F=null);if(0<S.dataTransfer.files.length)b.importFiles(S.dataTransfer.files,0,0,b.maxImageSize,function(O,N,m,u,A,B,H,T){n(O,T)},function(){},function(O){return"image/"==O.type.substring(0,6)},function(O){for(var N=0;N<O.length;N++)O[N]()},!mxEvent.isControlDown(S),null,null,!0);else if(0<=mxUtils.indexOf(S.dataTransfer.types,"text/uri-list")){var U=S.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(U)&&n(decodeURIComponent(U))}S.stopPropagation();S.preventDefault()}),+!1)}};D=document.createElement("div");D.style.marginTop="14px";D.style.textAlign="center";l=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&D.appendChild(l);ImageDialog.filePicked=function(C){C.action==google.picker.Action.PICKED&&null!=C.docs[0].thumbnails&&(C=C.docs[0].thumbnails[C.docs[0].thumbnails.length-1],null!=C&&(P.value=C.url));P.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var t=document.createElement("input");+t.setAttribute("multiple","multiple");t.setAttribute("type","file");mxEvent.addListener(t,"change",function(C){null!=t.files&&(b.importFiles(t.files,0,0,b.maxImageSize,function(F,S,U,O,N,m){n(F)},function(){},function(F){return"image/"==F.type.substring(0,6)},function(F){for(var S=0;S<F.length;S++)F[S]()},!0),t.type="",t.type="file",t.value="")});t.style.display="none";document.body.appendChild(t);b.imgDlgFileInputElt=t}g=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});+g.className="geBtn";D.appendChild(g)}mxEvent.addListener(P,"keypress",function(C){13==C.keyCode&&n(P.value)});var z=mxUtils.button(mxResources.get("crop"),function(){var C=new CropImageDialog(b,P.value,c,function(F,S,U){c=F;e=S;f=U});b.showDialog(C.container,300,390,!0,!0)});x&&(z.className="geBtn",D.appendChild(z));var E=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=P.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var C=b.editor.createImageUrlConverter().convert(P.value),+F=new Image;F.onload=function(){b.editor.convertImageToDataUri(C,function(S){b.confirmImageResize(function(U){b.resizeImage(F,S,mxUtils.bind(this,function(O,N,m){b.spinner.stop();null!=O&&O.length<b.maxImageBytes?(P.value=O,J()):b.handleError({message:mxResources.get("imageTooBig")})}),U,b.maxImageSize)},F.width>b.maxImageSize||F.height>b.maxImageSize||S.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};F.onerror=function(){b.spinner.stop();+b.handleError({message:mxResources.get("fileNotFound")})};F.src=C}});E.className="geBtn";mxEvent.addListener(P,"change",function(C){c=null;J()});J();D.appendChild(E);x=mxUtils.button(mxResources.get("apply"),function(){n(P.value)});x.className="geBtn gePrimaryBtn";D.appendChild(x);b.editor.cancelFirst||D.appendChild(l);Graph.fileSupport&&(D.style.marginTop="120px",L.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",L.style.backgroundPosition="center 65%",L.style.backgroundRepeat="no-repeat",+x=document.createElement("div"),x.style.position="absolute",x.style.width="420px",x.style.top="58%",x.style.textAlign="center",x.style.fontSize="18px",x.style.color="#a0c3ff",mxUtils.write(x,mxResources.get("dragImagesHere")),L.appendChild(x));L.appendChild(D);this.container=L},LinkDialog=function(b,g,l,d,q,y,x){function D(C,F){var S=document.createElement("option");mxUtils.write(S,mxResources.get(C));S.value=C;z.appendChild(S);E[C]=F}var J=document.createElement("div");J.style.height="100%";mxUtils.write(J,mxResources.get("editLink")+":");var K=document.createElement("div");K.className="geTitle";K.style.backgroundColor="transparent";K.style.borderColor="transparent";K.style.whiteSpace="nowrap";K.style.textOverflow="clip";K.style.cursor="default";var L=document.createElement("input");L.setAttribute("placeholder",mxResources.get("dragUrlsHere"));L.setAttribute("type","text");L.style.marginTop="6px";L.style.width="414px";L.style.boxSizing="border-box";L.style.backgroundImage="url('"+Dialog.prototype.clearImage+-"')";L.style.backgroundRepeat="no-repeat";L.style.backgroundPosition="100% 50%";L.style.paddingRight="14px";L.style.marginBottom="4px";var Q=document.createElement("div");Q.setAttribute("title",mxResources.get("reset"));Q.style.position="relative";Q.style.left="-16px";Q.style.width="12px";Q.style.height="14px";Q.style.cursor="pointer";Q.style.display="inline-block";Q.style.top="3px";Q.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(Q,"click",function(){L.value="";L.focus()});+"')";L.style.backgroundRepeat="no-repeat";L.style.backgroundPosition="100% 50%";L.style.paddingRight="14px";L.style.marginBottom="4px";var P=document.createElement("div");P.setAttribute("title",mxResources.get("reset"));P.style.position="relative";P.style.left="-16px";P.style.width="12px";P.style.height="14px";P.style.cursor="pointer";P.style.display="inline-block";P.style.top="3px";P.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(P,"click",function(){L.value="";L.focus()});var c=document.createElement("input");c.style.cssText="margin-right:8px;margin-bottom:8px;";c.setAttribute("value","url");c.setAttribute("type","radio");c.setAttribute("name","geLinkDialogOption");var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","url");e.setAttribute("type","radio");e.setAttribute("name","geLinkDialogOption");var f=document.createElement("select");f.style.width="414px";var p=document.createElement("input");p.setAttribute("type",-"checkbox");p.style.margin="0 6p 0 6px";null!=x&&(p.setAttribute("checked","checked"),p.defaultChecked=!0);x=null!=x?x:"_blank";p.setAttribute("title",x);y&&(L.style.width="200px");if(q&&null!=b.pages){null!=g&&Graph.isPageLink(g)?(e.setAttribute("checked","checked"),e.defaultChecked=!0):(L.setAttribute("value",g),c.setAttribute("checked","checked"),c.defaultChecked=!0);K.appendChild(c);K.appendChild(L);K.appendChild(Q);y&&(K.appendChild(p),mxUtils.write(K,mxResources.get("openInNewWindow")));mxUtils.br(K);-K.appendChild(e);q=!1;for(y=0;y<b.pages.length;y++)Q=document.createElement("option"),mxUtils.write(Q,b.pages[y].getName()||mxResources.get("pageWithNumber",[y+1])),Q.setAttribute("value","data:page/id,"+b.pages[y].getId()),g==Q.getAttribute("value")&&(Q.setAttribute("selected","selected"),q=!0),f.appendChild(Q);if(!q&&e.checked){var n=document.createElement("option");mxUtils.write(n,mxResources.get("pageNotFound"));n.setAttribute("disabled","disabled");n.setAttribute("selected","selected");n.setAttribute("value",-"pageNotFound");f.appendChild(n);mxEvent.addListener(f,"change",function(){null==n.parentNode||n.selected||n.parentNode.removeChild(n)})}K.appendChild(f)}else L.setAttribute("value",g),K.appendChild(L),K.appendChild(Q);J.appendChild(K);var t=mxUtils.button(l,function(){b.hideDialog();d(e.checked?"pageNotFound"!==f.value?f.value:g:L.value,LinkDialog.selectedDocs,p.checked?x:null)});t.style.verticalAlign="middle";t.className="geBtn gePrimaryBtn";this.init=function(){e.checked?f.focus():(L.focus(),mxClient.IS_GC||-mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(f,"focus",function(){c.removeAttribute("checked");e.setAttribute("checked","checked");e.checked=!0});mxEvent.addListener(L,"focus",function(){e.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});if(Graph.fileSupport){var C=J.parentNode,F=null;mxEvent.addListener(C,"dragleave",function(R){null!=F&&(F.parentNode.removeChild(F),F=null);R.stopPropagation();R.preventDefault()});-mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(R){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=b.highlightElement(C));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(R){try{null!=F&&(F.parentNode.removeChild(F),F=null),0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")&&(L.value=decodeURIComponent(R.dataTransfer.getData("text/uri-list")),c.setAttribute("checked","checked"),c.checked=!0,t.click())}catch(U){b.handleError(U)}R.stopPropagation();-R.preventDefault()}),!1)}};l=document.createElement("div");l.style.marginTop="16px";l.style.textAlign="right";b.isOffline()||l.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));K=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});K.style.verticalAlign="middle";K.className="geBtn";b.editor.cancelFirst&&l.appendChild(K);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(C){if(C.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=C.docs;+"checkbox");p.style.margin="0 6p 0 6px";null!=x&&(p.setAttribute("checked","checked"),p.defaultChecked=!0);x=null!=x?x:"_blank";p.setAttribute("title",x);y&&(L.style.width="200px");if(q&&null!=b.pages){null!=g&&Graph.isPageLink(g)?(e.setAttribute("checked","checked"),e.defaultChecked=!0):(L.setAttribute("value",g),c.setAttribute("checked","checked"),c.defaultChecked=!0);K.appendChild(c);K.appendChild(L);K.appendChild(P);y&&(K.appendChild(p),mxUtils.write(K,mxResources.get("openInNewWindow")));mxUtils.br(K);+K.appendChild(e);q=!1;for(y=0;y<b.pages.length;y++)P=document.createElement("option"),mxUtils.write(P,b.pages[y].getName()||mxResources.get("pageWithNumber",[y+1])),P.setAttribute("value","data:page/id,"+b.pages[y].getId()),g==P.getAttribute("value")&&(P.setAttribute("selected","selected"),q=!0),f.appendChild(P);if(!q&&e.checked){var n=document.createElement("option");mxUtils.write(n,mxResources.get("pageNotFound"));n.setAttribute("disabled","disabled");n.setAttribute("selected","selected");n.setAttribute("value",+"pageNotFound");f.appendChild(n);mxEvent.addListener(f,"change",function(){null==n.parentNode||n.selected||n.parentNode.removeChild(n)})}K.appendChild(f)}else L.setAttribute("value",g),K.appendChild(L),K.appendChild(P);J.appendChild(K);var t=mxUtils.button(l,function(){b.hideDialog();d(e.checked?"pageNotFound"!==f.value?f.value:g:L.value,LinkDialog.selectedDocs,p.checked?x:null)});t.style.verticalAlign="middle";t.className="geBtn gePrimaryBtn";this.init=function(){e.checked?f.focus():(L.focus(),mxClient.IS_GC||+mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(f,"focus",function(){c.removeAttribute("checked");e.setAttribute("checked","checked");e.checked=!0});mxEvent.addListener(L,"focus",function(){e.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});if(Graph.fileSupport){var C=J.parentNode,F=null;mxEvent.addListener(C,"dragleave",function(S){null!=F&&(F.parentNode.removeChild(F),F=null);S.stopPropagation();S.preventDefault()});+mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(S){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=b.highlightElement(C));S.stopPropagation();S.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(S){try{null!=F&&(F.parentNode.removeChild(F),F=null),0<=mxUtils.indexOf(S.dataTransfer.types,"text/uri-list")&&(L.value=decodeURIComponent(S.dataTransfer.getData("text/uri-list")),c.setAttribute("checked","checked"),c.checked=!0,t.click())}catch(U){b.handleError(U)}S.stopPropagation();+S.preventDefault()}),!1)}};l=document.createElement("div");l.style.marginTop="16px";l.style.textAlign="right";b.isOffline()||l.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));K=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});K.style.verticalAlign="middle";K.className="geBtn";b.editor.cancelFirst&&l.appendChild(K);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(C){if(C.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=C.docs;var F=C.docs[0].url;"application/mxe"==C.docs[0].mimeType||null!=C.docs[0].mimeType&&"application/vnd.jgraph."==C.docs[0].mimeType.substring(0,23)?F="https://www.draw.io/#G"+C.docs[0].id:"application/vnd.google-apps.folder"==C.docs[0].mimeType&&(F="https://drive.google.com/#folders/"+C.docs[0].id);L.value=F;L.focus()}else LinkDialog.selectedDocs=null;L.focus()};var z=document.createElement("select");z.className="geBtn";z.style.position="relative";z.style.top="1px";z.style.maxWidth="120px";var E={};q=document.createElement("option");mxUtils.write(q,mxResources.get("select")+"...");q.value="";z.appendChild(q);"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&D("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var C=b.drive.createLinkPicker();b.linkPicker=C.setCallback(function(F){LinkDialog.filePicked(F)}).build()}b.linkPicker.setVisible(!0)}))});-"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&D("dropbox",function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(C){L.value=C[0].link;L.focus()}})});null!=b.oneDrive&&D("oneDrive",function(){b.oneDrive.pickFile(function(C,F){null!=F&&null!=F.value&&0<F.value.length&&(L.value=F.value[0].webUrl,L.focus())},!0)});null!=b.gitHub&&D("github",function(){b.gitHub.pickFile(function(C){if(null!=C){C=C.split("/");var F=C[0],R=C[1],U=C[2];C=C.slice(3,C.length).join("/");-L.value="https://github.com/"+F+"/"+R+"/blob/"+U+"/"+C;L.focus()}})});null!=b.gitLab&&D("gitlab",function(){b.gitLab.pickFile(function(C){if(null!=C){C=C.split("/");var F=C[0],R=C[1],U=C[2];C=C.slice(3,C.length).join("/");L.value=DRAWIO_GITLAB_URL+"/"+F+"/"+R+"/blob/"+U+"/"+C;L.focus()}})});1<z.children.length&&(l.appendChild(z),mxEvent.addListener(z,"change",function(C){null!=E[z.value]&&(E[z.value](),z.value="")}));mxEvent.addListener(L,"keypress",function(C){13==C.keyCode&&t.click()});l.appendChild(t);+"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&D("dropbox",function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(C){L.value=C[0].link;L.focus()}})});null!=b.oneDrive&&D("oneDrive",function(){b.oneDrive.pickFile(function(C,F){null!=F&&null!=F.value&&0<F.value.length&&(L.value=F.value[0].webUrl,L.focus())},!0)});null!=b.gitHub&&D("github",function(){b.gitHub.pickFile(function(C){if(null!=C){C=C.split("/");var F=C[0],S=C[1],U=C[2];C=C.slice(3,C.length).join("/");+L.value="https://github.com/"+F+"/"+S+"/blob/"+U+"/"+C;L.focus()}})});null!=b.gitLab&&D("gitlab",function(){b.gitLab.pickFile(function(C){if(null!=C){C=C.split("/");var F=C[0],S=C[1],U=C[2];C=C.slice(3,C.length).join("/");L.value=DRAWIO_GITLAB_URL+"/"+F+"/"+S+"/blob/"+U+"/"+C;L.focus()}})});1<z.children.length&&(l.appendChild(z),mxEvent.addListener(z,"change",function(C){null!=E[z.value]&&(E[z.value](),z.value="")}));mxEvent.addListener(L,"keypress",function(C){13==C.keyCode&&t.click()});l.appendChild(t);b.editor.cancelFirst||l.appendChild(K);J.appendChild(l);this.container=J},FeedbackDialog=function(b,g,l,d){var q=document.createElement("div"),y=document.createElement("div");mxUtils.write(y,mxResources.get("sendYourFeedback"));y.style.fontSize="18px";y.style.marginBottom="18px";q.appendChild(y);y=document.createElement("div");mxUtils.write(y,mxResources.get("yourEmailAddress")+(l?"":" ("+mxResources.get("required")+")"));q.appendChild(y);var x=document.createElement("input");x.setAttribute("type",-"text");x.style.marginTop="6px";x.style.width="600px";var D=mxUtils.button(mxResources.get("sendMessage"),function(){var Q=L.value+(K.checked?"\nDiagram:\n"+(null!=d?d:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;Q.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=-FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(x.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=g?g:"Feedback")+":\n"+Q),function(c){b.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});D.className=+"text");x.style.marginTop="6px";x.style.width="600px";var D=mxUtils.button(mxResources.get("sendMessage"),function(){var P=L.value+(K.checked?"\nDiagram:\n"+(null!=d?d:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;P.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=+FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(x.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=g?g:"Feedback")+":\n"+P),function(c){b.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});D.className="geBtn gePrimaryBtn";if(!l){D.setAttribute("disabled","disabled");var J=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(x,"change",function(){0<x.value.length&&0<J.test(x.value)?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")});mxEvent.addListener(x,"keyup",function(){0<x.value.length&&J.test(x.value)?D.removeAttribute("disabled"):D.setAttribute("disabled",-"disabled")})}q.appendChild(x);this.init=function(){x.focus()};var K=document.createElement("input");K.setAttribute("type","checkbox");K.setAttribute("checked","checked");K.defaultChecked=!0;l=document.createElement("p");l.style.marginTop="14px";l.appendChild(K);y=document.createElement("span");mxUtils.write(y," "+mxResources.get("includeCopyOfMyDiagram"));l.appendChild(y);mxEvent.addListener(y,"click",function(Q){K.checked=!K.checked;mxEvent.consume(Q)});q.appendChild(l);y=document.createElement("div");+"disabled")})}q.appendChild(x);this.init=function(){x.focus()};var K=document.createElement("input");K.setAttribute("type","checkbox");K.setAttribute("checked","checked");K.defaultChecked=!0;l=document.createElement("p");l.style.marginTop="14px";l.appendChild(K);y=document.createElement("span");mxUtils.write(y," "+mxResources.get("includeCopyOfMyDiagram"));l.appendChild(y);mxEvent.addListener(y,"click",function(P){K.checked=!K.checked;mxEvent.consume(P)});q.appendChild(l);y=document.createElement("div");mxUtils.write(y,mxResources.get("feedback"));q.appendChild(y);var L=document.createElement("textarea");L.style.resize="none";L.style.width="600px";L.style.height="140px";L.style.marginTop="6px";L.setAttribute("placeholder",mxResources.get("comments"));q.appendChild(L);l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right";y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className="geBtn";b.editor.cancelFirst?(l.appendChild(y),l.appendChild(D)):(l.appendChild(D),l.appendChild(y));q.appendChild(l);this.container=q};FeedbackDialog.maxAttachmentSize=1E6;var RevisionDialog=function(b,g,l){var d=document.createElement("div"),q=document.createElement("h3");q.style.marginTop="3px";mxUtils.write(q,mxResources.get("revisionHistory"));d.appendChild(q);q=document.createElement("div");q.style.position="absolute";q.style.overflow="auto";q.style.width="170px";q.style.height="378px";d.appendChild(q);var y=document.createElement("div");y.style.position="absolute";y.style.left="200px";y.style.width="470px";y.style.height="376px";y.style.overflow="hidden";y.style.borderWidth="1px";y.style.borderStyle="solid";var x=document.createElement("div");x.style.position="absolute";x.style.display="none";x.style.textAlign="center";x.style.padding="8px";x.style.borderRadius="8px";x.style.left="50%";x.style.top="50%";x.style.whiteSpace="nowrap";x.style.transform="translate(-50%, -50%)";x.style.background="inherit";x.style.border="1px solid";y.appendChild(x);mxEvent.disableContextMenu(y);d.appendChild(y);var D=new Graph(y);D.setTooltips(!1);D.setEnabled(!1);D.setPanning(!0);D.panningHandler.ignoreCell=-!0;D.panningHandler.useLeftButtonForPanning=!0;D.minFitScale=null;D.maxFitScale=null;D.centerZoom=!0;var J=0,K=null,L=0,Q=D.getGlobalVariable;D.getGlobalVariable=function(X){return"page"==X&&null!=K&&null!=K[L]?K[L].getAttribute("name"):"pagenumber"==X?L+1:"pagecount"==X?null!=K?K.length:1:Q.apply(this,arguments)};D.getLinkForCell=function(){return null};for(var c=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,-shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),e=b.getCurrentFile(),f=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),p={},n=0;n<f.length;n++)p[f[n].getAttribute("id")]=f[n];var t=null,z=null,E=null,C=null,F=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=E&&D.zoomIn()},20);F.setAttribute("disabled","disabled");var R=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=E&&D.zoomOut()},20);R.setAttribute("disabled",-"disabled");var U=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=E&&(1==D.view.scale?(D.maxFitScale=8,D.fit(8)):D.zoomActual(),D.center())},20);U.setAttribute("disabled","disabled");var P=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"),null,20);P.setAttribute("disabled","disabled");var O=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"),null,20);O.setAttribute("disabled","disabled");var m=y.cloneNode(!1);m.style.pointerEvent=+!0;D.panningHandler.useLeftButtonForPanning=!0;D.minFitScale=null;D.maxFitScale=null;D.centerZoom=!0;var J=0,K=null,L=0,P=D.getGlobalVariable;D.getGlobalVariable=function(X){return"page"==X&&null!=K&&null!=K[L]?K[L].getAttribute("name"):"pagenumber"==X?L+1:"pagecount"==X?null!=K?K.length:1:P.apply(this,arguments)};D.getLinkForCell=function(){return null};for(var c=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,+shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),e=b.getCurrentFile(),f=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),p={},n=0;n<f.length;n++)p[f[n].getAttribute("id")]=f[n];var t=null,z=null,E=null,C=null,F=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=E&&D.zoomIn()},20);F.setAttribute("disabled","disabled");var S=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=E&&D.zoomOut()},20);S.setAttribute("disabled",+"disabled");var U=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=E&&(1==D.view.scale?(D.maxFitScale=8,D.fit(8)):D.zoomActual(),D.center())},20);U.setAttribute("disabled","disabled");var O=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"),null,20);O.setAttribute("disabled","disabled");var N=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"),null,20);N.setAttribute("disabled","disabled");var m=y.cloneNode(!1);m.style.pointerEvent="none";y.parentNode.appendChild(m);var u=new Graph(m);u.setTooltips(!1);u.setEnabled(!1);u.setPanning(!0);u.panningHandler.ignoreCell=!0;u.panningHandler.useLeftButtonForPanning=!0;u.minFitScale=null;u.maxFitScale=null;u.centerZoom=!0;var A=document.createElement("div");A.style.textAlign="left";A.style.color="gray";A.style.backgroundColor="transparent";A.style.overflow="hidden";A.style.textOverflow="ellipsis";A.style.whiteSpace="nowrap";A.style.cursor="default";A.style.height="100%";A.style.display=-"inline-flex";A.style.alignItems="center";A.style.flexGrow="1";mxEvent.addListener(A,"click",function(){var X=mxUtils.getTextContent(A);""!=X&&b.alert(X)});var B=null;mxEvent.addGestureListeners(P,function(X){try{var Z=null!=K[J]?p[K[J].getAttribute("id")]:null;mxUtils.setOpacity(P,20);x.innerText="";if(null==Z)x.style.display="inline-block",mxUtils.write(x,mxResources.get("pageNotFound"));else{B=A.innerHTML;A.innerHTML=mxResources.get("current");y.style.display="none";m.style.display="";m.style.backgroundColor=-y.style.backgroundColor;var Y=Editor.parseDiagramNode(Z);(new mxCodec(Y.ownerDocument)).decode(Y,u.getModel());u.view.scaleAndTranslate(D.view.scale,D.view.translate.x,D.view.translate.y);u.mathEnabled="1"==Y.getAttribute("math");u.setAdaptiveColors(Y.getAttribute("adaptiveColors"));Editor.MathJaxRender&&u.mathEnabled&&Editor.MathJaxRender(u.container)}}catch(ba){x.style.display="inline-block",x.innerText="",mxUtils.write(x,mxResources.get("pageNotFound")+": "+ba.message)}},null,function(){mxUtils.setOpacity(P,-60);x.style.display="none";x.innerText="";"none"==y.style.display&&(y.style.display="",A.innerHTML=B,m.style.display="none")});mxEvent.addListener(O,"click",mxUtils.bind(this,function(X){null!=E&&(X=b.getPagesForNode(E.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(X,null,2),function(Z){try{if(0<Z.length&&b.editor.graph.isEnabled()){var Y=[JSON.parse(Z)];b.confirm(mxResources.get("areYouSure"),function(){try{e.patch(Y,null,!0,!0),b.hideDialog(),+"inline-flex";A.style.alignItems="center";A.style.flexGrow="1";mxEvent.addListener(A,"click",function(){var X=mxUtils.getTextContent(A);""!=X&&b.alert(X)});var B=null;mxEvent.addGestureListeners(O,function(X){try{var Z=null!=K[J]?p[K[J].getAttribute("id")]:null;mxUtils.setOpacity(O,20);x.innerText="";if(null==Z)x.style.display="inline-block",mxUtils.write(x,mxResources.get("pageNotFound"));else{B=A.innerHTML;A.innerHTML=mxResources.get("current");y.style.display="none";m.style.display="";m.style.backgroundColor=+y.style.backgroundColor;var Y=Editor.parseDiagramNode(Z);(new mxCodec(Y.ownerDocument)).decode(Y,u.getModel());u.view.scaleAndTranslate(D.view.scale,D.view.translate.x,D.view.translate.y);u.mathEnabled="1"==Y.getAttribute("math");u.setAdaptiveColors(Y.getAttribute("adaptiveColors"));Editor.MathJaxRender&&u.mathEnabled&&Editor.MathJaxRender(u.container)}}catch(ba){x.style.display="inline-block",x.innerText="",mxUtils.write(x,mxResources.get("pageNotFound")+": "+ba.message)}},null,function(){mxUtils.setOpacity(O,+60);x.style.display="none";x.innerText="";"none"==y.style.display&&(y.style.display="",A.innerHTML=B,m.style.display="none")});mxEvent.addListener(N,"click",mxUtils.bind(this,function(X){null!=E&&(X=b.getPagesForNode(E.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(X,null,2),function(Z){try{if(0<Z.length&&b.editor.graph.isEnabled()){var Y=[JSON.parse(Z)];b.confirm(mxResources.get("areYouSure"),function(){try{e.patch(Y,null,!0,!0),b.hideDialog(),b.hideDialog()}catch(ba){b.handleError(ba)}})}else b.hideDialog()}catch(ba){b.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close")),b.showDialog(X.container,620,460,!0,!0),X.init())}));var H=mxUtils.button(mxResources.get("restore"),function(X){null!=E&&null!=C&&b.confirm(mxResources.get("areYouSure"),function(){null!=l?l(C):b.spinner.spin(document.body,mxResources.get("restoring"))&&(H.setAttribute("disabled","disabled"),e.save(!0,function(Z){b.spinner.stop();H.removeAttribute("disabled");b.replaceFileData(C);b.hideDialog()},function(Z){b.spinner.stop();H.removeAttribute("disabled");b.editor.setStatus("");b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)}))})});H.className="geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");var T=document.createElement("select");T.setAttribute("disabled","disabled");T.style.userSelect="none";T.style.maxWidth="100px";T.style.marginLeft="10px";T.style.display="none";var k=null;mxEvent.addListener(T,"change",function(X){null!=k&&(k(X),mxEvent.consume(X))});var v=mxUtils.button(mxResources.get("open"),function(){null!=E&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(E.documentElement)),b.openLink(b.getUrl(),null,!0))});v.className="geBtn";v.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});G.className="geBtn";G.setAttribute("disabled","disabled");null!=l&&(v.style.display="none");f=document.createElement("div");f.style.position="absolute";f.style.top="482px";f.style.right="28px";f.style.left="32px";f.style.justifyContent="end";f.style.display="flex";var I=document.createElement("div");I.className="geToolbarContainer";I.style.backgroundColor="transparent";I.style.display="flex";I.style.alignItems="center";I.style.justifyContent="stretch";I.style.left="32px";I.style.right="32px";I.style.border="none";I.style.top="440px";I.style.height="28px";var M=-null;if(null!=g&&0<g.length){y.style.cursor="move";var N=document.createElement("table");N.style.borderWidth="1px";N.style.borderStyle="solid";N.style.borderCollapse="collapse";N.style.borderSpacing="0px";N.style.width="100%";var S=document.createElement("tbody"),V=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(J=mxUtils.indexOf(b.pages,b.currentPage));for(n=g.length-1;0<=n;n--){var W=function(X){var Z=new Date(X.modifiedDate),Y=null;if(0<=Z.getTime()){var ba=function(ca){c.stop();-x.innerText="";var fa=mxUtils.parseXml(ca),aa=b.editor.extractGraphModel(fa.documentElement,!0);if(null!=aa){var da=function(wa){null!=wa&&(wa=ha(Editor.parseDiagramNode(wa)));return wa},ha=function(wa){var ua=wa.getAttribute("background");if(null==ua||""==ua||ua==mxConstants.NONE)ua=D.defaultPageBackgroundColor;y.style.backgroundColor=mxUtils.getLightDarkColor(ua);(new mxCodec(wa.ownerDocument)).decode(wa,D.getModel());D.maxFitScale=1;D.fit(8);D.center();D.mathEnabled="1"==wa.getAttribute("math");-D.setAdaptiveColors(wa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&D.mathEnabled&&Editor.MathJaxRender(D.container);return wa};T.style.display="none";T.innerText="";E=fa;C=ca;K=parseSelectFunction=null;L=0;if("mxfile"==aa.nodeName){fa=aa.getElementsByTagName("diagram");K=[];for(ca=0;ca<fa.length;ca++)K.push(fa[ca]);L=Math.min(J,K.length-1);0<K.length&&da(K[L]);if(1<K.length)for(T.removeAttribute("disabled"),T.style.display="",ca=0;ca<K.length;ca++){fa=document.createElement("option");fa.setAttribute("title",-pa+" ("+K[ca].getAttribute("id")+")");fa.setAttribute("value",ca);var pa=K[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);aa=b.getPageById(K[ca].getAttribute("id"));var na="";if(null!=aa){var ia=new DiagramPage(K[ca]);b.getHashValueForPages([aa])!=b.getHashValueForPages([ia])&&(na=" (M)")}else na=" (X)";mxUtils.write(fa,pa+na);ca==L&&fa.setAttribute("selected","selected");T.appendChild(fa)}k=function(){try{var wa=parseInt(T.value);L=J=wa;da(K[wa])}catch(ua){T.value=J,b.handleError(ua)}}}else ha(aa);-pa=X.lastModifyingUserName;null!=pa&&20<pa.length&&(pa=pa.substring(0,20)+"...");A.innerText="";mxUtils.write(A,(null!=pa?pa+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());A.setAttribute("title",Y.getAttribute("title"));F.removeAttribute("disabled");R.removeAttribute("disabled");U.removeAttribute("disabled");P.removeAttribute("disabled");O.removeAttribute("disabled");null!=e&&e.isRestricted()||(b.editor.graph.isEnabled()&&H.removeAttribute("disabled"),v.removeAttribute("disabled"),G.removeAttribute("disabled"));-mxUtils.setOpacity(F,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(P,60);mxUtils.setOpacity(O,60)}else T.style.display="none",T.innerText="",A.innerText="",x.innerText="",mxUtils.write(A,mxResources.get("errorLoadingFile")),mxUtils.write(x,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottomWidth="1px";Y.style.borderBottomStyle="solid";Y.style.fontSize="12px";Y.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding=-"6px";ea.style.whiteSpace="nowrap";X==g[g.length-1]?mxUtils.write(ea,mxResources.get("current")):Z.toDateString()===V?mxUtils.write(ea,Z.toLocaleTimeString()):mxUtils.write(ea,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());Y.appendChild(ea);Y.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ca){z!=X&&(c.stop(),-null!=t&&(t.style.backgroundColor=""),z=X,t=Y,t.style.backgroundColor="light-dark(#ebf2f9, #000000)",C=E=null,A.removeAttribute("title"),A.innerText=mxResources.get("loading")+"...",y.style.backgroundColor=D.defaultPageBackgroundColor,x.innerText="",D.getModel().clear(),H.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),v.setAttribute("disabled",-"disabled"),T.setAttribute("disabled","disabled"),mxUtils.setOpacity(F,20),mxUtils.setOpacity(R,20),mxUtils.setOpacity(U,20),mxUtils.setOpacity(P,20),mxUtils.setOpacity(O,20),c.spin(y),X.getXml(function(fa){if(z==X)try{ba(fa)}catch(aa){A.innerText=mxResources.get("error")+": "+aa.message}},function(fa){c.stop();T.style.display="none";T.innerText="";A.innerText="";mxUtils.write(A,mxResources.get("errorLoadingFile"));mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(Y,-"dblclick",function(ca){v.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);S.appendChild(Y)}return Y}(g[n]);null!=W&&n==g.length-1&&(M=W)}N.appendChild(S);q.appendChild(N)}else null==e||null==b.drive&&e.constructor==window.DriveFile||null==b.dropbox&&e.constructor==window.DropboxFile?(y.style.display="none",I.style.display="none",mxUtils.write(q,mxResources.get("notAvailable"))):(y.style.display="none",I.style.display=-"none",mxUtils.write(q,mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";I.appendChild(A);I.appendChild(P);I.appendChild(R);I.appendChild(U);I.appendChild(F);I.appendChild(T);I.appendChild(O);b.editor.cancelFirst&&f.appendChild(q);f.appendChild(v);null!=e&&e.constructor==DriveFile&&f.appendChild(G);f.appendChild(H);b.editor.cancelFirst||f.appendChild(q);d.appendChild(f);d.appendChild(I);-this.container=d},DraftDialog=function(b,g,l,d,q,y,x,D,J){var K=document.createElement("div"),L=document.createElement("div");L.style.marginTop="0px";L.style.whiteSpace="nowrap";L.style.overflow="auto";L.style.lineHeight="normal";mxUtils.write(L,g);K.appendChild(L);var Q=document.createElement("select"),c=mxUtils.bind(this,function(){"-1"==Q.value?(Q.value=Q.options[0].value,c(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var P=this,O;return $jscomp.asyncExecutePromiseGeneratorProgram(function(m){for(O=-0;O<J.length;O++)q.apply(P,[O,mxUtils.bind(P,function(){})]);b.hideDialog(!0);m.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(z=mxUtils.parseXml(J[Q.value].data),E=b.editor.extractGraphModel(z.documentElement,!0),C=0,this.init())});if(null!=J){Q.style.marginLeft="4px";for(g=0;g<J.length;g++){var e=document.createElement("option");e.setAttribute("value",g);var f=new Date(J[g].created),p=new Date(J[g].modified);mxUtils.write(e,f.toLocaleDateString()+" "+f.toLocaleTimeString()+" - "+-(f.toDateString(),p.toDateString(),p.toLocaleDateString())+" "+p.toLocaleTimeString());Q.appendChild(e)}e=document.createElement("option");e.setAttribute("value","-1");mxUtils.write(e,mxResources.get("deleteAll"));Q.appendChild(e);L.appendChild(Q);mxEvent.addListener(Q,"change",c)}null==l&&(l=J[0].data);var n=document.createElement("div");n.style.position="absolute";n.style.border="1px solid lightGray";n.style.marginTop="10px";n.style.left="40px";n.style.right="40px";n.style.top="46px";n.style.bottom=-"74px";n.style.overflow="hidden";mxEvent.disableContextMenu(n);K.appendChild(n);var t=new Graph(n);t.setEnabled(!1);t.setPanning(!0);t.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";t.panningHandler.ignoreCell=!0;t.panningHandler.useLeftButtonForPanning=!0;t.minFitScale=null;t.maxFitScale=null;t.centerZoom=!0;var z=mxUtils.parseXml(l),E=b.editor.extractGraphModel(z.documentElement,!0),C=0,F=null,R=t.getGlobalVariable;t.getGlobalVariable=function(P){return"page"==P&&null!=F&&null!=F[C]?F[C].getAttribute("name"):-"pagenumber"==P?C+1:"pagecount"==P?null!=F?F.length:1:R.apply(this,arguments)};t.getLinkForCell=function(){return null};l=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){t.zoomIn()},20);L=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){t.zoomOut()},20);g=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==t.view.scale?(t.maxFitScale=8,t.fit(8)):t.zoomActual();t.center()},20);x=mxUtils.button(x||mxResources.get("discard"),-function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var P=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(O){q.apply(P,[Q.value,mxUtils.bind(P,function(){null!=Q.parentNode&&(Q.options[Q.selectedIndex].parentNode.removeChild(Q.options[Q.selectedIndex]),1<Q.options.length?(Q.value=Q.options[0].value,c()):b.hideDialog(!0))})]);O.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});x.className="geBtn";var U=document.createElement("select");-U.style.maxWidth="80px";U.style.position="relative";U.style.top="-2px";U.style.verticalAlign="bottom";U.style.marginRight="6px";U.style.display="none";y=mxUtils.button(y||mxResources.get("edit"),function(){d.apply(this,[Q.value])});y.className="geBtn gePrimaryBtn";e=document.createElement("div");e.style.position="absolute";e.style.bottom="30px";e.style.right="40px";e.style.textAlign="right";f=document.createElement("div");f.className="geToolbarContainer";f.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";-this.init=function(){function P(A){if(null!=A){var B=A.getAttribute("background");if(null==B||""==B||B==mxConstants.NONE)B="light-dark(#ffffff, transparent)";n.style.backgroundColor=B;(new mxCodec(A.ownerDocument)).decode(A,t.getModel());t.maxFitScale=1;t.fit(8);t.center()}return A}function O(A){null!=A&&(A=P(Editor.parseDiagramNode(A)));return A}mxEvent.addListener(U,"change",function(A){C=parseInt(U.value);O(F[C]);mxEvent.consume(A)});if("mxfile"==E.nodeName){var m=E.getElementsByTagName("diagram");-F=[];for(var u=0;u<m.length;u++)F.push(m[u]);0<F.length&&O(F[C]);U.innerText="";if(1<F.length)for(U.style.display="",u=0;u<F.length;u++)m=document.createElement("option"),mxUtils.write(m,F[u].getAttribute("name")||mxResources.get("pageWithNumber",[u+1])),m.setAttribute("value",u),u==C&&m.setAttribute("selected","selected"),U.appendChild(m);else U.style.display="none"}else P(E)};f.appendChild(U);f.appendChild(l);f.appendChild(L);f.appendChild(g);l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});+null;if(null!=g&&0<g.length){y.style.cursor="move";var R=document.createElement("table");R.style.borderWidth="1px";R.style.borderStyle="solid";R.style.borderCollapse="collapse";R.style.borderSpacing="0px";R.style.width="100%";var Q=document.createElement("tbody"),W=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(J=mxUtils.indexOf(b.pages,b.currentPage));for(n=g.length-1;0<=n;n--){var V=function(X){var Z=new Date(X.modifiedDate),Y=null;if(0<=Z.getTime()){var ba=function(ca){c.stop();+x.innerText="";var fa=mxUtils.parseXml(ca),aa=b.editor.extractGraphModel(fa.documentElement,!0);if(null!=aa){var da=function(va){null!=va&&(va=ha(Editor.parseDiagramNode(va)));return va},ha=function(va){var ua=va.getAttribute("background");if(null==ua||""==ua||ua==mxConstants.NONE)ua=D.defaultPageBackgroundColor;y.style.backgroundColor=mxUtils.getLightDarkColor(ua);(new mxCodec(va.ownerDocument)).decode(va,D.getModel());D.maxFitScale=1;D.fit(8);D.center();D.mathEnabled="1"==va.getAttribute("math");+D.setAdaptiveColors(va.getAttribute("adaptiveColors"));Editor.MathJaxRender&&D.mathEnabled&&Editor.MathJaxRender(D.container);return va};T.style.display="none";T.innerText="";E=fa;C=ca;K=parseSelectFunction=null;L=0;if("mxfile"==aa.nodeName){fa=aa.getElementsByTagName("diagram");K=[];for(ca=0;ca<fa.length;ca++)K.push(fa[ca]);L=Math.min(J,K.length-1);0<K.length&&da(K[L]);if(1<K.length)for(T.removeAttribute("disabled"),T.style.display="",ca=0;ca<K.length;ca++){fa=document.createElement("option");fa.setAttribute("title",+na+" ("+K[ca].getAttribute("id")+")");fa.setAttribute("value",ca);var na=K[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);aa=b.getPageById(K[ca].getAttribute("id"));var oa="";if(null!=aa){var ia=new DiagramPage(K[ca]);b.getHashValueForPages([aa])!=b.getHashValueForPages([ia])&&(oa=" (M)")}else oa=" (X)";mxUtils.write(fa,na+oa);ca==L&&fa.setAttribute("selected","selected");T.appendChild(fa)}k=function(){try{var va=parseInt(T.value);L=J=va;da(K[va])}catch(ua){T.value=J,b.handleError(ua)}}}else ha(aa);+na=X.lastModifyingUserName;null!=na&&20<na.length&&(na=na.substring(0,20)+"...");A.innerText="";mxUtils.write(A,(null!=na?na+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());A.setAttribute("title",Y.getAttribute("title"));F.removeAttribute("disabled");S.removeAttribute("disabled");U.removeAttribute("disabled");O.removeAttribute("disabled");N.removeAttribute("disabled");null!=e&&e.isRestricted()||(b.editor.graph.isEnabled()&&H.removeAttribute("disabled"),v.removeAttribute("disabled"),G.removeAttribute("disabled"));+mxUtils.setOpacity(F,60);mxUtils.setOpacity(S,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(O,60);mxUtils.setOpacity(N,60)}else T.style.display="none",T.innerText="",A.innerText="",x.innerText="",mxUtils.write(A,mxResources.get("errorLoadingFile")),mxUtils.write(x,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottomWidth="1px";Y.style.borderBottomStyle="solid";Y.style.fontSize="12px";Y.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding=+"6px";ea.style.whiteSpace="nowrap";X==g[g.length-1]?mxUtils.write(ea,mxResources.get("current")):Z.toDateString()===W?mxUtils.write(ea,Z.toLocaleTimeString()):mxUtils.write(ea,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());Y.appendChild(ea);Y.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ca){z!=X&&(c.stop(),+null!=t&&(t.style.backgroundColor=""),z=X,t=Y,t.style.backgroundColor="light-dark(#ebf2f9, #000000)",C=E=null,A.removeAttribute("title"),A.innerText=mxResources.get("loading")+"...",y.style.backgroundColor=D.defaultPageBackgroundColor,x.innerText="",D.getModel().clear(),H.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),v.setAttribute("disabled",+"disabled"),T.setAttribute("disabled","disabled"),mxUtils.setOpacity(F,20),mxUtils.setOpacity(S,20),mxUtils.setOpacity(U,20),mxUtils.setOpacity(O,20),mxUtils.setOpacity(N,20),c.spin(y),X.getXml(function(fa){if(z==X)try{ba(fa)}catch(aa){A.innerText=mxResources.get("error")+": "+aa.message}},function(fa){c.stop();T.style.display="none";T.innerText="";A.innerText="";mxUtils.write(A,mxResources.get("errorLoadingFile"));mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(Y,+"dblclick",function(ca){v.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);Q.appendChild(Y)}return Y}(g[n]);null!=V&&n==g.length-1&&(M=V)}R.appendChild(Q);q.appendChild(R)}else null==e||null==b.drive&&e.constructor==window.DriveFile||null==b.dropbox&&e.constructor==window.DropboxFile?(y.style.display="none",I.style.display="none",mxUtils.write(q,mxResources.get("notAvailable"))):(y.style.display="none",I.style.display=+"none",mxUtils.write(q,mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";I.appendChild(A);I.appendChild(O);I.appendChild(S);I.appendChild(U);I.appendChild(F);I.appendChild(T);I.appendChild(N);b.editor.cancelFirst&&f.appendChild(q);f.appendChild(v);null!=e&&e.constructor==DriveFile&&f.appendChild(G);f.appendChild(H);b.editor.cancelFirst||f.appendChild(q);d.appendChild(f);d.appendChild(I);+this.container=d},DraftDialog=function(b,g,l,d,q,y,x,D,J){var K=document.createElement("div"),L=document.createElement("div");L.style.marginTop="0px";L.style.whiteSpace="nowrap";L.style.overflow="auto";L.style.lineHeight="normal";mxUtils.write(L,g);K.appendChild(L);var P=document.createElement("select"),c=mxUtils.bind(this,function(){"-1"==P.value?(P.value=P.options[0].value,c(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var O=this,N;return $jscomp.asyncExecutePromiseGeneratorProgram(function(m){for(N=+0;N<J.length;N++)q.apply(O,[N,mxUtils.bind(O,function(){})]);b.hideDialog(!0);m.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(z=mxUtils.parseXml(J[P.value].data),E=b.editor.extractGraphModel(z.documentElement,!0),C=0,this.init())});if(null!=J){P.style.marginLeft="4px";for(g=0;g<J.length;g++){var e=document.createElement("option");e.setAttribute("value",g);var f=new Date(J[g].created),p=new Date(J[g].modified);mxUtils.write(e,f.toLocaleDateString()+" "+f.toLocaleTimeString()+" - "++(f.toDateString(),p.toDateString(),p.toLocaleDateString())+" "+p.toLocaleTimeString());P.appendChild(e)}e=document.createElement("option");e.setAttribute("value","-1");mxUtils.write(e,mxResources.get("deleteAll"));P.appendChild(e);L.appendChild(P);mxEvent.addListener(P,"change",c)}null==l&&(l=J[0].data);var n=document.createElement("div");n.style.position="absolute";n.style.border="1px solid lightGray";n.style.marginTop="10px";n.style.left="40px";n.style.right="40px";n.style.top="46px";n.style.bottom=+"74px";n.style.overflow="hidden";mxEvent.disableContextMenu(n);K.appendChild(n);var t=new Graph(n);t.setEnabled(!1);t.setPanning(!0);t.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";t.panningHandler.ignoreCell=!0;t.panningHandler.useLeftButtonForPanning=!0;t.minFitScale=null;t.maxFitScale=null;t.centerZoom=!0;var z=mxUtils.parseXml(l),E=b.editor.extractGraphModel(z.documentElement,!0),C=0,F=null,S=t.getGlobalVariable;t.getGlobalVariable=function(O){return"page"==O&&null!=F&&null!=F[C]?F[C].getAttribute("name"):+"pagenumber"==O?C+1:"pagecount"==O?null!=F?F.length:1:S.apply(this,arguments)};t.getLinkForCell=function(){return null};l=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){t.zoomIn()},20);L=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){t.zoomOut()},20);g=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==t.view.scale?(t.maxFitScale=8,t.fit(8)):t.zoomActual();t.center()},20);x=mxUtils.button(x||mxResources.get("discard"),+function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var O=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(N){q.apply(O,[P.value,mxUtils.bind(O,function(){null!=P.parentNode&&(P.options[P.selectedIndex].parentNode.removeChild(P.options[P.selectedIndex]),1<P.options.length?(P.value=P.options[0].value,c()):b.hideDialog(!0))})]);N.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});x.className="geBtn";var U=document.createElement("select");+U.style.maxWidth="80px";U.style.position="relative";U.style.top="-2px";U.style.verticalAlign="bottom";U.style.marginRight="6px";U.style.display="none";y=mxUtils.button(y||mxResources.get("edit"),function(){d.apply(this,[P.value])});y.className="geBtn gePrimaryBtn";e=document.createElement("div");e.style.position="absolute";e.style.bottom="30px";e.style.right="40px";e.style.textAlign="right";f=document.createElement("div");f.className="geToolbarContainer";f.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";+this.init=function(){function O(A){if(null!=A){var B=A.getAttribute("background");if(null==B||""==B||B==mxConstants.NONE)B="light-dark(#ffffff, transparent)";n.style.backgroundColor=B;(new mxCodec(A.ownerDocument)).decode(A,t.getModel());t.maxFitScale=1;t.fit(8);t.center()}return A}function N(A){null!=A&&(A=O(Editor.parseDiagramNode(A)));return A}mxEvent.addListener(U,"change",function(A){C=parseInt(U.value);N(F[C]);mxEvent.consume(A)});if("mxfile"==E.nodeName){var m=E.getElementsByTagName("diagram");+F=[];for(var u=0;u<m.length;u++)F.push(m[u]);0<F.length&&N(F[C]);U.innerText="";if(1<F.length)for(U.style.display="",u=0;u<F.length;u++)m=document.createElement("option"),mxUtils.write(m,F[u].getAttribute("name")||mxResources.get("pageWithNumber",[u+1])),m.setAttribute("value",u),u==C&&m.setAttribute("selected","selected"),U.appendChild(m);else U.style.display="none"}else O(E)};f.appendChild(U);f.appendChild(l);f.appendChild(L);f.appendChild(g);l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});l.className="geBtn";D=null!=D?mxUtils.button(mxResources.get("ignore"),D):null;null!=D&&(D.className="geBtn");b.editor.cancelFirst?(e.appendChild(l),null!=D&&e.appendChild(D),e.appendChild(x),e.appendChild(y)):(e.appendChild(y),e.appendChild(x),null!=D&&e.appendChild(D),e.appendChild(l));K.appendChild(e);K.appendChild(f);this.container=K},FindWindow=function(b,g,l,d,q,y){function x(k,v,G){if("object"===typeof v.value&&null!=v.value.attributes){v=v.value.attributes;for(var I=0;I<v.length;I++)if("label"!=v[I].nodeName){var M=mxUtils.trim(v[I].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==k&&0<=M.indexOf(G)||null!=k&&k.test(M))return!0}}return!1}function D(){e?(B.removeAttribute("disabled"),H.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));C.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled")}function J(k,v,G){u.innerText="";var I=L.model.getDescendants(L.model.getRoot()),M=C.value.toLowerCase(),-N=R.checked?new RegExp(M):null,S=null;p=null;Q!=M&&(Q=M,c=null,f=!1);var V=null==c;if(0<M.length){if(f){f=!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}k=(W+1)%b.pages.length;c=null;do f=!1,I=b.pages[k],L=b.createTemporaryGraph(L.getStylesheet()),b.updatePageRoot(I),L.model.setRoot(I.root),k=(k+1)%b.pages.length;while(!J(!0,v,G)&&k!=W);c&&(c=null,G?b.editor.graph.model.execute(new SelectPage(b,I)):b.selectPage(I));f=!1;L=b.editor.graph;return J(!0,v,G)}for(X=0;X<I.length;X++){W=-L.view.getState(I[X]);v&&(V=V||W==c);if(null!=W&&null!=W.cell.value&&(V||null==S)&&(L.model.isVertex(W.cell)||L.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(P.innerHTML=L.sanitizeHtml(L.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([P])):label=L.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;v&&y&&W==c&&(label=label.substr(n),Z=n);var Y=""==F.value;if(null==N&&(0<=label.indexOf(M)||Y&&x(N,W.cell,M))||null!=N&&(N.test(label)||-Y&&x(N,W.cell,M)))if(y&&(null!=N?(Y=label.match(N),null!=Y&&0<Y.length&&(p=Y[0].toLowerCase(),n=Z+Y.index+p.length)):(p=M,n=Z+label.indexOf(M)+p.length)),V){S=W;break}else null==S&&(S=W)}V=V||W==c}}if(null!=S){if(X==I.length&&U.checked)return c=null,f=!0,J(!0,v,G);c=S;L.scrollCellToVisible(c.cell);L.isEnabled()&&!L.isCellLocked(c.cell)?G||L.getSelectionCell()==c.cell&&1==L.getSelectionCount()||L.setSelectionCell(c.cell):L.highlightCell(c.cell)}else{if(!k&&U.checked)return f=!0,J(!0,v,G);L.isEnabled()&&-!G&&L.clearSelection()}e=null!=S;y&&!k&&D();return 0==M.length||null!=S}var K=b.actions.get("findReplace"),L=b.editor.graph,Q=null,c=null,e=!1,f=!1,p=null,n=0,t=1,z=document.createElement("div");z.style.userSelect="none";z.style.overflow="hidden";z.style.padding="10px";z.style.height="100%";var E=y?"260px":"200px",C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";C.style.marginBottom="6px";C.style.width=E;-C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";z.appendChild(C);mxUtils.br(z);if(y){var F=document.createElement("input");F.setAttribute("placeholder",mxResources.get("replaceWith"));F.setAttribute("type","text");F.style.marginTop="4px";F.style.marginBottom="6px";F.style.width=E;F.style.fontSize="12px";F.style.borderRadius="4px";F.style.padding="6px";z.appendChild(F);mxUtils.br(z);mxEvent.addListener(F,"input",D)}var R=document.createElement("input");R.setAttribute("id",-"geFindWinRegExChck");R.setAttribute("type","checkbox");R.style.marginRight="4px";z.appendChild(R);E=document.createElement("label");E.setAttribute("for","geFindWinRegExChck");z.appendChild(E);mxUtils.write(E,mxResources.get("regularExpression"));z.appendChild(E);E=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");E.style.position="relative";E.style.marginLeft="6px";E.style.top="3px";z.appendChild(E);mxUtils.br(z);var U=document.createElement("input");U.setAttribute("id","geFindWinAllPagesChck");-U.setAttribute("type","checkbox");U.style.marginRight="4px";z.appendChild(U);E=document.createElement("label");E.setAttribute("for","geFindWinAllPagesChck");z.appendChild(E);mxUtils.write(E,mxResources.get("allPages"));z.appendChild(E);var P=document.createElement("div");mxUtils.br(z);E=document.createElement("div");E.style.left="0px";E.style.right="0px";E.style.marginTop="6px";E.style.padding="0 6px 0 6px";E.style.textAlign="center";z.appendChild(E);var O=mxUtils.button(mxResources.get("reset"),-function(){u.innerText="";C.value="";C.style.backgroundColor="";y&&(F.value="",D());Q=c=null;f=!1;C.focus()});O.setAttribute("title",mxResources.get("reset"));O.style.float="none";O.style.width="120px";O.style.marginTop="6px";O.style.marginLeft="8px";O.style.overflow="hidden";O.style.textOverflow="ellipsis";O.className="geBtn";y||E.appendChild(O);var m=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=J()?"":"light-dark(#ffcfcf, #ff0000)"}catch(k){b.handleError(k)}});m.setAttribute("title",-mxResources.get("find")+" (Enter)");m.style.float="none";m.style.width="120px";m.style.marginTop="6px";m.style.marginLeft="8px";m.style.overflow="hidden";m.style.textOverflow="ellipsis";m.className="geBtn gePrimaryBtn";E.appendChild(m);var u=document.createElement("div");u.style.marginTop="10px";if(y){var A=function(k,v,G,I,M){if(null==M||"1"!=M.html)return I=k.toLowerCase().indexOf(v,I),0>I?k:k.substr(0,I)+G+k.substr(I+v.length);var N=k;v=mxUtils.htmlEntities(v,!1,!1,!1);M=[];var S=-1;for(k=k.replace(/<br>/ig,-"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(S=k.indexOf("<",S+1));)M.push(S);S=k.match(/<[^>]*>/g);k=k.replace(/<[^>]*>/g,"");I=k.toLowerCase().indexOf(v,I);if(0>I)return N;N=I+v.length;G=mxUtils.htmlEntities(G);k=k.substr(0,I)+G+k.substr(N);for(var V=0,W=0;W<M.length;W++){if(M[W]-V<I)k=k.substr(0,M[W])+S[W]+k.substr(M[W]);else{var X=M[W]-V<N?I+V:M[W]+(G.length-v.length);k=k.substr(0,X)+S[W]+k.substr(X)}V+=S[W].length}return k.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,+R=S.checked?new RegExp(M):null,Q=null;p=null;P!=M&&(P=M,c=null,f=!1);var W=null==c;if(0<M.length){if(f){f=!1;for(var V,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){V=X;break}k=(V+1)%b.pages.length;c=null;do f=!1,I=b.pages[k],L=b.createTemporaryGraph(L.getStylesheet()),b.updatePageRoot(I),L.model.setRoot(I.root),k=(k+1)%b.pages.length;while(!J(!0,v,G)&&k!=V);c&&(c=null,G?b.editor.graph.model.execute(new SelectPage(b,I)):b.selectPage(I));f=!1;L=b.editor.graph;return J(!0,v,G)}for(X=0;X<I.length;X++){V=+L.view.getState(I[X]);v&&(W=W||V==c);if(null!=V&&null!=V.cell.value&&(W||null==Q)&&(L.model.isVertex(V.cell)||L.model.isEdge(V.cell))){null!=V.style&&"1"==V.style.html?(O.innerHTML=L.sanitizeHtml(L.getLabel(V.cell)),label=mxUtils.extractTextWithWhitespace([O])):label=L.getLabel(V.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;v&&y&&V==c&&(label=label.substr(n),Z=n);var Y=""==F.value;if(null==R&&(0<=label.indexOf(M)||Y&&x(R,V.cell,M))||null!=R&&(R.test(label)||+Y&&x(R,V.cell,M)))if(y&&(null!=R?(Y=label.match(R),null!=Y&&0<Y.length&&(p=Y[0].toLowerCase(),n=Z+Y.index+p.length)):(p=M,n=Z+label.indexOf(M)+p.length)),W){Q=V;break}else null==Q&&(Q=V)}W=W||V==c}}if(null!=Q){if(X==I.length&&U.checked)return c=null,f=!0,J(!0,v,G);c=Q;L.scrollCellToVisible(c.cell);L.isEnabled()&&!L.isCellLocked(c.cell)?G||L.getSelectionCell()==c.cell&&1==L.getSelectionCount()||L.setSelectionCell(c.cell):L.highlightCell(c.cell)}else{if(!k&&U.checked)return f=!0,J(!0,v,G);L.isEnabled()&&+!G&&L.clearSelection()}e=null!=Q;y&&!k&&D();return 0==M.length||null!=Q}var K=b.actions.get("findReplace"),L=b.editor.graph,P=null,c=null,e=!1,f=!1,p=null,n=0,t=1,z=document.createElement("div");z.style.userSelect="none";z.style.overflow="hidden";z.style.padding="10px";z.style.height="100%";var E=y?"260px":"200px",C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";C.style.marginBottom="6px";C.style.width=E;+C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";z.appendChild(C);mxUtils.br(z);if(y){var F=document.createElement("input");F.setAttribute("placeholder",mxResources.get("replaceWith"));F.setAttribute("type","text");F.style.marginTop="4px";F.style.marginBottom="6px";F.style.width=E;F.style.fontSize="12px";F.style.borderRadius="4px";F.style.padding="6px";z.appendChild(F);mxUtils.br(z);mxEvent.addListener(F,"input",D)}var S=document.createElement("input");S.setAttribute("id",+"geFindWinRegExChck");S.setAttribute("type","checkbox");S.style.marginRight="4px";z.appendChild(S);E=document.createElement("label");E.setAttribute("for","geFindWinRegExChck");z.appendChild(E);mxUtils.write(E,mxResources.get("regularExpression"));z.appendChild(E);E=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");E.style.position="relative";E.style.marginLeft="6px";E.style.top="3px";z.appendChild(E);mxUtils.br(z);var U=document.createElement("input");U.setAttribute("id","geFindWinAllPagesChck");+U.setAttribute("type","checkbox");U.style.marginRight="4px";z.appendChild(U);E=document.createElement("label");E.setAttribute("for","geFindWinAllPagesChck");z.appendChild(E);mxUtils.write(E,mxResources.get("allPages"));z.appendChild(E);var O=document.createElement("div");mxUtils.br(z);E=document.createElement("div");E.style.left="0px";E.style.right="0px";E.style.marginTop="6px";E.style.padding="0 6px 0 6px";E.style.textAlign="center";z.appendChild(E);var N=mxUtils.button(mxResources.get("reset"),+function(){u.innerText="";C.value="";C.style.backgroundColor="";y&&(F.value="",D());P=c=null;f=!1;C.focus()});N.setAttribute("title",mxResources.get("reset"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow="ellipsis";N.className="geBtn";y||E.appendChild(N);var m=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=J()?"":"light-dark(#ffcfcf, #ff0000)"}catch(k){b.handleError(k)}});m.setAttribute("title",+mxResources.get("find")+" (Enter)");m.style.float="none";m.style.width="120px";m.style.marginTop="6px";m.style.marginLeft="8px";m.style.overflow="hidden";m.style.textOverflow="ellipsis";m.className="geBtn gePrimaryBtn";E.appendChild(m);var u=document.createElement("div");u.style.marginTop="10px";if(y){var A=function(k,v,G,I,M){if(null==M||"1"!=M.html)return I=k.toLowerCase().indexOf(v,I),0>I?k:k.substr(0,I)+G+k.substr(I+v.length);var R=k;v=mxUtils.htmlEntities(v,!1,!1,!1);M=[];var Q=-1;for(k=k.replace(/<br>/ig,+"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(Q=k.indexOf("<",Q+1));)M.push(Q);Q=k.match(/<[^>]*>/g);k=k.replace(/<[^>]*>/g,"");I=k.toLowerCase().indexOf(v,I);if(0>I)return R;R=I+v.length;G=mxUtils.htmlEntities(G);k=k.substr(0,I)+G+k.substr(R);for(var W=0,V=0;V<M.length;V++){if(M[V]-W<I)k=k.substr(0,M[V])+Q[V]+k.substr(M[V]);else{var X=M[V]-W<R?I+W:M[V]+(G.length-v.length);k=k.substr(0,X)+Q[V]+k.substr(X)}W+=Q[V].length}return k.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1").replace(/\n/g,"<br>")},B=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=p&&null!=c){var k=c.cell,v=L.getLabel(k);L.isCellEditable(k)&&L.model.setValue(k,A(v,p,F.value,n-p.length,L.getCurrentCellStyle(k)));C.style.backgroundColor=J(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(G){b.handleError(G)}});B.setAttribute("title",mxResources.get("replFind"));B.style.float="none";B.style.width="120px";B.style.marginTop="6px";B.style.marginLeft="8px";B.style.overflow="hidden";B.style.textOverflow="ellipsis";B.className="geBtn gePrimaryBtn";B.setAttribute("disabled","disabled");E.appendChild(B);mxUtils.br(E);var H=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=p&&null!=c){var k=c.cell,v=L.getLabel(k);L.model.setValue(k,A(v,p,F.value,n-p.length,L.getCurrentCellStyle(k)));B.setAttribute("disabled","disabled");H.setAttribute("disabled","disabled")}}catch(G){b.handleError(G)}});H.setAttribute("title",mxResources.get("replace"));H.style.float="none";H.style.width="120px";H.style.marginTop=-"6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");E.appendChild(H);var T=mxUtils.button(mxResources.get("replaceAll"),function(){u.innerText="";Q=null;var k=b.currentPage,v=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;L.getModel().beginUpdate();try{for(var G=0,I={};J(!1,!0,!0)&&100>G;){var M=c.cell,N=L.getLabel(M),S=I[M.id];if(S&&S.replAllMrk==t&&S.replAllPos>=n)break;I[M.id]=-{replAllMrk:t,replAllPos:n};L.isCellEditable(M)&&(L.model.setValue(M,A(N,p,F.value,n-p.length,L.getCurrentCellStyle(M))),G++)}k!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,k));mxUtils.write(u,mxResources.get("matchesRepl",[G]))}catch(V){b.handleError(V)}finally{L.getModel().endUpdate(),b.editor.graph.setSelectionCells(v),b.editor.graph.rendering=!0}t++});T.setAttribute("title",mxResources.get("replaceAll"));T.style.float="none";T.style.width="120px";T.style.marginTop="6px";T.style.marginLeft=-"8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");E.appendChild(T);mxUtils.br(E);E.appendChild(O);O=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));O.setAttribute("title",mxResources.get("close"));O.style.float="none";O.style.width="120px";O.style.marginTop="6px";O.style.marginLeft="8px";O.style.overflow="hidden";O.style.textOverflow="ellipsis";O.className="geBtn";-E.appendChild(O);mxUtils.br(E);E.appendChild(u)}else O.style.width="90px",m.style.width="90px";mxEvent.addListener(C,"keyup",function(k){if(91==k.keyCode||93==k.keyCode||17==k.keyCode)mxEvent.consume(k);else if(27==k.keyCode)K.funct();else if(Q!=C.value.toLowerCase()||13==k.keyCode)try{C.style.backgroundColor=J()?"":"light-dark(#ffcfcf, #ff0000)"}catch(v){C.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(z,"keydown",function(k){70==k.keyCode&&b.keyHandler.isControlDown(k)&&+"6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");E.appendChild(H);var T=mxUtils.button(mxResources.get("replaceAll"),function(){u.innerText="";P=null;var k=b.currentPage,v=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;L.getModel().beginUpdate();try{for(var G=0,I={};J(!1,!0,!0)&&100>G;){var M=c.cell,R=L.getLabel(M),Q=I[M.id];if(Q&&Q.replAllMrk==t&&Q.replAllPos>=n)break;I[M.id]=+{replAllMrk:t,replAllPos:n};L.isCellEditable(M)&&(L.model.setValue(M,A(R,p,F.value,n-p.length,L.getCurrentCellStyle(M))),G++)}k!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,k));mxUtils.write(u,mxResources.get("matchesRepl",[G]))}catch(W){b.handleError(W)}finally{L.getModel().endUpdate(),b.editor.graph.setSelectionCells(v),b.editor.graph.rendering=!0}t++});T.setAttribute("title",mxResources.get("replaceAll"));T.style.float="none";T.style.width="120px";T.style.marginTop="6px";T.style.marginLeft=+"8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");E.appendChild(T);mxUtils.br(E);E.appendChild(N);N=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));N.setAttribute("title",mxResources.get("close"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow="ellipsis";N.className="geBtn";+E.appendChild(N);mxUtils.br(E);E.appendChild(u)}else N.style.width="90px",m.style.width="90px";mxEvent.addListener(C,"keyup",function(k){if(91==k.keyCode||93==k.keyCode||17==k.keyCode)mxEvent.consume(k);else if(27==k.keyCode)K.funct();else if(P!=C.value.toLowerCase()||13==k.keyCode)try{C.style.backgroundColor=J()?"":"light-dark(#ffcfcf, #ff0000)"}catch(v){C.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(z,"keydown",function(k){70==k.keyCode&&b.keyHandler.isControlDown(k)&&!mxEvent.isShiftDown(k)&&(K.funct(),mxEvent.consume(k))});this.window=new mxWindow(mxResources.get("find")+(y?"/"+mxResources.get("replace"):""),z,g,l,d,q,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?U.removeAttribute("disabled"):(U.checked=!1,U.setAttribute("disabled","disabled"))):L.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,g,l,d,q,y){var x=b.editor.graph,D=document.createElement("div");D.style.textAlign="center";D.style.userSelect="none";D.style.overflow="hidden";D.style.height="100%";if(y){var J=function(){var f=x.freehand.getStrokeColor(!0);null!=f&&f!=mxConstants.NONE&&1<f.length&&"string"===typeof f&&("default"==f?f=-mxResources.get("useBlackAndWhite"):(f="#"==f.charAt(0)?f.substring(1).toUpperCase():f,f=ColorDialog.prototype.colorNames[f]),null!=f&&Q.setAttribute("title",f))},K=document.createElement("input");K.setAttribute("id","geFreehandBrush");K.setAttribute("type","checkbox");K.checked=x.freehand.isPerfectFreehandMode();K.style.margin="10px 5px 0px 10px";K.style.float="left";D.appendChild(K);x.freehand.setPerfectFreehandMode(K.checked);var L=document.createElement("label");L.setAttribute("for","geFreehandBrush");-L.style.float="left";L.style.marginTop="10px";D.appendChild(L);mxUtils.write(L,mxResources.get("brush"));D.appendChild(L);var Q=document.createElement("tempDiv");Q.style.display="block";Q.style.width="100%";Q.style.height="100%";Q.style.borderRadius="2px";Q.style.boxSizing="border-box";Q.style.border="1px solid black";Q.style.backgroundColor=x.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){Q.style.backgroundColor=x.freehand.getStrokeColor()});J();L=mxUtils.button("",mxUtils.bind(this,-function(f){b.pickColor(x.freehand.getStrokeColor(!0),function(p){x.freehand.setStrokeColor(p);Q.style.backgroundColor=x.freehand.getStrokeColor();J()},"default");mxEvent.consume(f)}));L.style.position="absolute";L.style.boxSizing="border-box";L.style.padding="2px";L.style.top="8px";L.style.right="8px";L.style.width="28px";L.style.height="18px";L.className="geColorBtn";L.innerText="";L.appendChild(Q);D.appendChild(L);L=document.createElement("img");L.setAttribute("title",mxResources.get("settings"));+mxResources.get("useBlackAndWhite"):(f="#"==f.charAt(0)?f.substring(1).toUpperCase():f,f=ColorDialog.prototype.colorNames[f]),null!=f&&P.setAttribute("title",f))},K=document.createElement("input");K.setAttribute("id","geFreehandBrush");K.setAttribute("type","checkbox");K.checked=x.freehand.isPerfectFreehandMode();K.style.margin="10px 5px 0px 10px";K.style.float="left";D.appendChild(K);x.freehand.setPerfectFreehandMode(K.checked);var L=document.createElement("label");L.setAttribute("for","geFreehandBrush");+L.style.float="left";L.style.marginTop="10px";D.appendChild(L);mxUtils.write(L,mxResources.get("brush"));D.appendChild(L);var P=document.createElement("tempDiv");P.style.display="block";P.style.width="100%";P.style.height="100%";P.style.borderRadius="2px";P.style.boxSizing="border-box";P.style.border="1px solid black";P.style.backgroundColor=x.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){P.style.backgroundColor=x.freehand.getStrokeColor()});J();L=mxUtils.button("",mxUtils.bind(this,+function(f){b.pickColor(x.freehand.getStrokeColor(!0),function(p){x.freehand.setStrokeColor(p);P.style.backgroundColor=x.freehand.getStrokeColor();J()},"default");mxEvent.consume(f)}));L.style.position="absolute";L.style.boxSizing="border-box";L.style.padding="2px";L.style.top="8px";L.style.right="8px";L.style.width="28px";L.style.height="18px";L.className="geColorBtn";L.innerText="";L.appendChild(P);D.appendChild(L);L=document.createElement("img");L.setAttribute("title",mxResources.get("settings"));L.setAttribute("src",Editor.gearImage);L.className="geToolbarButton geAdaptiveAsset";L.style.position="absolute";L.style.boxSizing="border-box";L.style.padding="2px";L.style.top="8px";L.style.right="38px";L.style.width="18px";L.style.height="18px";L.style.opacity="0.6";D.appendChild(L);mxEvent.addListener(L,"click",mxUtils.bind(this,function(f){f=x.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",f,function(p){!isNaN(p)&&0<p&&20>=p&&x.freehand.setSmoothing(parseInt(p))})}));mxUtils.br(D);var c=document.createElement("input");c.setAttribute("type","range");c.setAttribute("min","2");c.setAttribute("max","30");c.setAttribute("value",x.freehand.getBrushSize());c.style.width="90%";c.style.visibility="hidden";D.appendChild(c);mxUtils.br(D);L=function(){x.freehand.setPerfectFreehandMode(K.checked);c.style.visibility=K.checked?"visible":"hidden"};mxEvent.addListener(K,"change",L);L();mxEvent.addListener(c,"change",function(){x.freehand.setBrushSize(parseInt(this.value))})}var e=mxUtils.button(mxResources.get("startDrawing"),function(){x.freehand.isDrawing()?x.freehand.stopDrawing():x.freehand.startDrawing()});e.setAttribute("title",mxResources.get("startDrawing")+" (X)");e.style.margin=y?"5px 0 0 0":"10px 0 0 0";e.style.width="90%";e.style.boxSizing="border-box";e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.textAlign="center";e.className="geBtn gePrimaryBtn";D.appendChild(e);this.window=new mxWindow(mxResources.get("freehand"),D,g,l,d,q,!0,!0);this.window.destroyOnClose=@@ -12550,116 +12550,116 @@ mxUtils.button(mxResources.get("startDrawing"),function(){x.freehand.isDrawing()" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){x.freehand.isDrawing()&&x.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,g,l,d,q){var y=b.editor.graph,x=document.createElement("div");x.style.userSelect="none";x.style.overflow="hidden";x.style.height="100%";var D=document.createElement("div");D.style.display="flex";D.style.alignItems="center";D.style.justifyContent="center";D.style.paddingTop="20px";var J=document.createElement("input");J.setAttribute("type","checkbox");J.style.marginRight="4px";J.checked=!0;var K=document.createElement("input");K.setAttribute("type","checkbox");K.style.marginRight="4px";K.checked=!0;var L=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(y.isSelectionEmpty()?y.getVerticesAndEdges():y.getSelectionCells(),J.checked,K.checked)}));L.setAttribute("title","Convert Colors");L.className="geBtn gePrimaryBtn";D.appendChild(L);x.appendChild(D);D=D.cloneNode(!1);D.appendChild(K);D.style.paddingTop="8px";mxUtils.write(D,mxResources.get("background"));x.appendChild(D);D=D.cloneNode(!1);D.appendChild(J);D.style.paddingTop="8px";mxUtils.write(D,mxResources.get("labels"));x.appendChild(D);this.window=new mxWindow(mxResources.get("adaptiveColors"),x,g,l,d,q,!0,!0);this.window.destroyOnClose=!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);-this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,g,l,d,q){function y(){O=!0;n.value=m;Q.isSelectionEmpty()?(z.setAttribute("disabled","disabled"),"selectionOnly"==n.value&&(n.value="includeCopyOfMyDiagram")):z.removeAttribute("disabled");b.isDiagramEmpty()?(t.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==n.value&&(n.value="help")):t.removeAttribute("disabled");-O=!1}function x(A,B,H){var T=document.createElement("button");T.className="geBtn gePrimaryBtn";T.style.padding="4px";T.style.height="auto";T.style.position="relative";"flex"==H?(T.style.overflow="hidden",T.style.textOverflow="ellipsis",T.style.whiteSpace="nowrap",T.style.margin="0px",T.style.flexGrow="1"):(T.style.display="block",T.style.margin="8px",T.style.left="50%",T.style.transform="translateX(-50%)");mxUtils.write(T,A);T.setAttribute("title",A);mxEvent.addListener(T,"click",B);return T}function D(A){var B=+this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,g,l,d,q){function y(){N=!0;n.value=m;P.isSelectionEmpty()?(z.setAttribute("disabled","disabled"),"selectionOnly"==n.value&&(n.value="includeCopyOfMyDiagram")):z.removeAttribute("disabled");b.isDiagramEmpty()?(t.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==n.value&&(n.value="help")):t.removeAttribute("disabled");+N=!1}function x(A,B,H){var T=document.createElement("button");T.className="geBtn gePrimaryBtn";T.style.padding="4px";T.style.height="auto";T.style.position="relative";"flex"==H?(T.style.overflow="hidden",T.style.textOverflow="ellipsis",T.style.whiteSpace="nowrap",T.style.margin="0px",T.style.flexGrow="1"):(T.style.display="block",T.style.margin="8px",T.style.left="50%",T.style.transform="translateX(-50%)");mxUtils.write(T,A);T.setAttribute("title",A);mxEvent.addListener(T,"click",B);return T}function D(A){var B=document.createElement("div");B.style.display="block";B.style.position="relative";B.style.backgroundColor="#e0e0e0";B.style.borderRadius="4px";B.style.wordWrap="break-word";B.style.textAlign="left";B.style.padding="6px";B.style.margin="12px";B.style.left="0px";B.style.right="0px";mxUtils.write(B,A);e.appendChild(B);return B}function J(A){var B=A.indexOf("<mxGraphModel "),H=A.indexOf("</mxGraphModel>");0>B&&(B=A.indexOf("<mxGraphModel>"));if(0<=B&&H>B){var T=mxUtils,k=T.trim,v=A.substring(0,B),G=v.indexOf("```");-0<=G&&(v=v.substring(v,0,G+6));T=k.call(T,v);B=A.substring(B,H+15);k=mxUtils;v=k.trim;A=A.substring(H+15);H=A.lastIndexOf("```");0<=H&&(A=A.substring(H+3));return[T,B,v.call(k,A)]}return null}function K(A){var B=D(A);B.style.cursor="pointer";B.style.marginBottom="2px";B.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(B,"click",function(V){P.value=A;P.focus()});var H=D("");H.style.marginTop="2px";var T=b.currentPage,k=A,v=[],G=null;if("includeCopyOfMyDiagram"==n.value||"selectionOnly"==-n.value){var I=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==n.value&&(I.isObjectIgnored=function(V){return V.constructor==mxCell&&!Q.model.isRoot(V)&&!Q.model.isLayer(V)&&!Q.isCellSelected(V)&&!Q.isAncestorSelected(V)});G=I.encode(Q.getModel());I.document.appendChild(G);v.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+mxUtils.getXml(G)})}else"create"==+0<=G&&(v=v.substring(v,0,G+6));T=k.call(T,v);B=A.substring(B,H+15);k=mxUtils;v=k.trim;A=A.substring(H+15);H=A.lastIndexOf("```");0<=H&&(A=A.substring(H+3));return[T,B,v.call(k,A)]}return null}function K(A){var B=D(A);B.style.cursor="pointer";B.style.marginBottom="2px";B.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(B,"click",function(W){O.value=A;O.focus()});var H=D("");H.style.marginTop="2px";var T=b.currentPage,k=A,v=[],G=null;if("includeCopyOfMyDiagram"==n.value||"selectionOnly"==+n.value){var I=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==n.value&&(I.isObjectIgnored=function(W){return W.constructor==mxCell&&!P.model.isRoot(W)&&!P.model.isLayer(W)&&!P.isCellSelected(W)&&!P.isAncestorSelected(W)});G=I.encode(P.getModel());I.document.appendChild(G);v.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+mxUtils.getXml(G)})}else"create"==n.value?(k=C.value.replace(/([A-Z])/g," $1").toLowerCase(),k="Write the declaration code for a "+(""!=k?k:"graph")+' that shows "'+(""!=A?A:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.'):v.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});v.push({role:"user",content:k});var M={model:Editor.gptModel,-messages:v},N=0;for(v=0;v<M.messages.length;v++)N+=M.messages[v].content.match(/\b\w+\b|[^\w\s]|=/g).length;var S=mxUtils.bind(this,function(){H.innerHTML="";mxUtils.write(H,mxResources.get("loading")+"...");var V=document.createElement("img");V.setAttribute("title","Processing "+N+" tokens");V.setAttribute("src",IMAGE_PATH+"/spin.gif");V.style.marginLeft="6px";H.appendChild(V);H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,function(W){var X=-new mxXmlRequest(Editor.gptUrl,JSON.stringify(M),"POST");X.setRequestHeaders=mxUtils.bind(this,function(ba,ea){ba.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);ba.setRequestHeader("Content-Type","application/json")});var Z=mxUtils.bind(this,function(ba){W.clear();H.innerHTML="";mxUtils.write(H,ba.message);H.appendChild(x(mxResources.get("tryAgain"),S));H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(ba)}),Y=mxUtils.bind(this,function(ba){var ea=-J(ba),ca=null!=ea?b.stringToCells(ea[1]):null;if(null!=ca&&0<ca.length){ba=document.createElement("div");ba.style.display="inline-block";ba.style.position="relative";ba.style.transform="translateX(-50%)";ba.style.padding="6px";ba.style.left="50%";var fa=mxUtils.parseXml(ea[1]),aa=new mxCodec(fa),da=new mxGraphModel;aa.decode(fa.documentElement,da);var ha=null;null!=G&&(fa=new mxCodec(G.ownerDocument),ha=new mxGraphModel,fa.decode(G,ha));fa=mxUtils.bind(this,function(pa){Q.model.beginUpdate();try{if(null!=-ha&&null!=b.getPageIndex(T)){b.selectPage(T);var na=b.diffCells(ha.root,da.root);b.patchPage(T,na,null,!0)}else{var ia=da.getChildren(da.getChildAt(da.getRoot(),0));Q.setSelectionCells(Q.importCells(ia))}}finally{Q.model.endUpdate()}mxEvent.consume(pa)});aa=Q.getBoundingBoxFromGeometry(ca);null!=aa?(ba.style.cursor="move",ba.appendChild(b.sidebar.createVertexTemplateFromCells(ca,aa.width,aa.height,"",!0,null,!0,!0,fa,160,120))):(ba.style.padding="14px",mxUtils.write(ba,mxResources.get("noPreview")));-H.innerHTML="";B=H;0<ea[0].length&&(mxUtils.write(B,ea[0]),mxUtils.br(B));B.appendChild(ba);ca=document.createElement("div");ca.style.display="flex";ca.style.gap="6px";ca.style.margin="6px";ca.appendChild(x(mxResources.get("tryAgain"),S,"flex"));ca.appendChild(x(mxResources.get(null!=G?"apply":"insert"),fa,"flex"));H.appendChild(ca);0<ea[2].length&&(mxUtils.br(B),mxUtils.write(B,ea[2]));B.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else H.innerHTML="",B=H,mxUtils.write(B,ba),-H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});X.send(mxUtils.bind(this,function(ba){if(W.clear())try{if(200<=ba.getStatus()&&299>=ba.getStatus()){var ea=JSON.parse(ba.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",M,"response:",ea);var ca=mxUtils.trim(ea.choices[0].message.content);if("create"==n.value){var fa=b.extractMermaidDeclaration(ca);null!=fa?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ha){Y(ha)})),b.generateMermaidImage(fa,null,function(){},-function(ha){mxMermaidToDrawio.resetListeners();Z(ha)})):(Y(ca),H.appendChild(x(mxResources.get("tryAgain"),S)))}else Y(ca)}else{var aa="Error: "+ba.getStatus();try{var da=JSON.parse(ba.getText());null!=da&&null!=da.error&&null!=da.error.message&&(aa=da.error.message)}catch(ha){}H.innerHTML="";mxUtils.write(H,aa);H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ha){Z(ha)}}),Z)}),function(W){H.innerHTML="";mxUtils.write(H,W.message);H.appendChild(x(mxResources.get("tryAgain"),-S));H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});S()}function L(){""!=mxUtils.trim(P.value)&&(K(P.value),P.value="")}var Q=b.editor.graph,c=document.createElement("div");c.style.textAlign="center";c.style.overflow="hidden";c.style.height="100%";var e=document.createElement("div");e.style.position="absolute";e.style.overflow="auto";e.style.top="0px";e.style.left="0px";e.style.right="0px";e.style.bottom="104px";c.appendChild(e);var f=document.createElement("div");f.style.position=+messages:v},R=0;for(v=0;v<M.messages.length;v++)R+=M.messages[v].content.match(/\b\w+\b|[^\w\s]|=/g).length;var Q=mxUtils.bind(this,function(){H.innerHTML="";mxUtils.write(H,mxResources.get("loading")+"...");var W=document.createElement("img");W.setAttribute("title","Processing "+R+" tokens");W.setAttribute("src",IMAGE_PATH+"/spin.gif");W.style.marginLeft="6px";H.appendChild(W);H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,function(V){var X=+new mxXmlRequest(Editor.gptUrl,JSON.stringify(M),"POST");X.setRequestHeaders=mxUtils.bind(this,function(ba,ea){ba.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);ba.setRequestHeader("Content-Type","application/json")});var Z=mxUtils.bind(this,function(ba){V.clear();H.innerHTML="";mxUtils.write(H,ba.message);H.appendChild(x(mxResources.get("tryAgain"),Q));H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(ba)}),Y=mxUtils.bind(this,function(ba){var ea=+J(ba),ca=null!=ea?b.stringToCells(ea[1]):null;if(null!=ca&&0<ca.length){ba=document.createElement("div");ba.style.display="inline-block";ba.style.position="relative";ba.style.transform="translateX(-50%)";ba.style.padding="6px";ba.style.left="50%";var fa=mxUtils.parseXml(ea[1]),aa=new mxCodec(fa),da=new mxGraphModel;aa.decode(fa.documentElement,da);var ha=null;null!=G&&(fa=new mxCodec(G.ownerDocument),ha=new mxGraphModel,fa.decode(G,ha));fa=mxUtils.bind(this,function(na){P.model.beginUpdate();try{if(null!=+ha&&null!=b.getPageIndex(T)){b.selectPage(T);var oa=b.diffCells(ha.root,da.root);b.patchPage(T,oa,null,!0)}else{var ia=da.getChildren(da.getChildAt(da.getRoot(),0));P.setSelectionCells(P.importCells(ia))}}finally{P.model.endUpdate()}mxEvent.consume(na)});aa=P.getBoundingBoxFromGeometry(ca);null!=aa?(ba.style.cursor="move",ba.appendChild(b.sidebar.createVertexTemplateFromCells(ca,aa.width,aa.height,"",!0,null,!0,!0,fa,160,120))):(ba.style.padding="14px",mxUtils.write(ba,mxResources.get("noPreview")));+H.innerHTML="";B=H;0<ea[0].length&&(mxUtils.write(B,ea[0]),mxUtils.br(B));B.appendChild(ba);ca=document.createElement("div");ca.style.display="flex";ca.style.gap="6px";ca.style.margin="6px";ca.appendChild(x(mxResources.get("tryAgain"),Q,"flex"));ca.appendChild(x(mxResources.get(null!=G?"apply":"insert"),fa,"flex"));H.appendChild(ca);0<ea[2].length&&(mxUtils.br(B),mxUtils.write(B,ea[2]));B.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else H.innerHTML="",B=H,mxUtils.write(B,ba),+H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});X.send(mxUtils.bind(this,function(ba){if(V.clear())try{if(200<=ba.getStatus()&&299>=ba.getStatus()){var ea=JSON.parse(ba.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",M,"response:",ea);var ca=mxUtils.trim(ea.choices[0].message.content);if("create"==n.value){var fa=b.extractMermaidDeclaration(ca);null!=fa?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ha){Y(ha)})),b.generateMermaidImage(fa,null,function(){},+function(ha){mxMermaidToDrawio.resetListeners();Z(ha)})):(Y(ca),H.appendChild(x(mxResources.get("tryAgain"),Q)))}else Y(ca)}else{var aa="Error: "+ba.getStatus();try{var da=JSON.parse(ba.getText());null!=da&&null!=da.error&&null!=da.error.message&&(aa=da.error.message)}catch(ha){}H.innerHTML="";mxUtils.write(H,aa);H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ha){Z(ha)}}),Z)}),function(V){H.innerHTML="";mxUtils.write(H,V.message);H.appendChild(x(mxResources.get("tryAgain"),+Q));H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});Q()}function L(){""!=mxUtils.trim(O.value)&&(K(O.value),O.value="")}var P=b.editor.graph,c=document.createElement("div");c.style.textAlign="center";c.style.overflow="hidden";c.style.height="100%";var e=document.createElement("div");e.style.position="absolute";e.style.overflow="auto";e.style.top="0px";e.style.left="0px";e.style.right="0px";e.style.bottom="104px";c.appendChild(e);var f=document.createElement("div");f.style.position="absolute";f.style.boxSizing="border-box";f.style.borderRadius="4px";f.style.border="1px solid lightgray";f.style.margin="8px 8px 16px 8px";f.style.padding="8px";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.padding="6px";f.style.height="80px";var p=document.createElement("div");p.style.display="flex";p.style.gap="6px";p.style.marginBottom="6px";var n=document.createElement("select");n.style.textOverflow="ellipsis";n.style.flexGrow="1";n.style.padding="4px";n.style.minWidth="0";f.appendChild(p);var t=document.createElement("option");t.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(t,mxResources.get("includeCopyOfMyDiagram"));n.appendChild(t);var z=document.createElement("option");z.setAttribute("value","selectionOnly");mxUtils.write(z,mxResources.get("selectionOnly"));n.appendChild(z);p.appendChild(n);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var E=document.createElement("option");E.setAttribute("value","create");mxUtils.write(E,mxResources.get("create"));n.appendChild(E)}E=document.createElement("option");E.setAttribute("value","help");mxUtils.write(E,mxResources.get("help"));n.appendChild(E);E=document.createElement("option");E.setAttribute("value","reset");mxUtils.write(E,mxResources.get("reset"));n.appendChild(E);var C=document.createElement("select");C.style.textOverflow="ellipsis";C.style.flexGrow="1";C.style.padding="4px";C.style.minWidth="0";for(E=0;E<EditorUi.mermaidDiagramTypes.length;E++){var F=document.createElement("option"),-R=EditorUi.mermaidDiagramTypes[E],U=R;"erDiagram"==U&&(U="entityRelationshipDiagram");U=mxResources.get(U,null,U.charAt(0).toUpperCase()+U.substring(1).replace(/[A-Z]/g," $&"));F.setAttribute("value",R);mxUtils.write(F,U);C.appendChild(F)}p.appendChild(C);p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.textOverflow="clip";p.style.cursor="default";var P=document.createElement("input");P.setAttribute("type","text");P.style.width="100%";P.style.outline="none";P.style.border="none";-P.style.background="transparent";P.style.padding="8px 26px 8px 8px";P.style.boxSizing="border-box";p.appendChild(P);E=document.createElement("img");E.setAttribute("src",Editor.sendImage);E.setAttribute("title",mxResources.get("sendMessage"));E.className="geAdaptiveAsset";E.style.position="relative";E.style.cursor="pointer";E.style.opacity="0.5";E.style.height="19px";E.style.left="-24px";E.style.top="5px";E.style.background="url('"+b.editor.transparentImage+"')";p.appendChild(E);f.appendChild(p);Q.isSelectionEmpty()?-b.isDiagramEmpty()?n.value="help":n.value="includeCopyOfMyDiagram":n.value="selectionOnly";var O=!1,m=n.value,u=function(){P.setAttribute("placeholder",mxResources.get("create"==n.value?"describeYourDiagram":"askMeAnything"));"create"==n.value?(n.style.width="",C.style.display=""):(n.style.width="100%",C.style.display="none")};u();mxEvent.addListener(n,"change",function(){O||("reset"==n.value?(n.value=m,e.innerHTML=""):m=n.value,u())});Q.selectionModel.addListener(mxEvent.CHANGE,y);Q.getModel().addListener(mxEvent.CHANGE,-y);y();mxEvent.addListener(E,"click",L);mxEvent.addListener(P,"keydown",function(A){13!=A.keyCode||mxEvent.isShiftDown(A)||L()});c.appendChild(f);this.window=new mxWindow(mxResources.get("chatWindowTitle"),c,g,l,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){Q.getModel().removeListener(y)}));this.window.addListener("show",-mxUtils.bind(this,function(){this.window.fit();P.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,g,l,d,q){var y=b.editor.graph,x=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)x=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var D=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(J,K){if(y.isEnabled()){var L=new FilenameDialog(b,"",mxResources.get("add"),function(Q){b.hideDialog();if(null!=Q&&0<Q.length){Q=-Q.split(" ");for(var c=[],e=[],f=0;f<Q.length;f++){var p=mxUtils.trim(Q[f]);""!=p&&(e.push(p),0>mxUtils.indexOf(J,p)&&c.push(p))}y.isSelectionEmpty()?K(J.concat(c)):y.addTagsForCells(y.getSelectionCells(),e)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(L.container,320,80,!0,!0);L.init()}},x);x=D.div;this.window=new mxWindow(mxResources.get("tags"),x,g,l,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;+S=EditorUi.mermaidDiagramTypes[E],U=S;"erDiagram"==U&&(U="entityRelationshipDiagram");U=mxResources.get(U,null,U.charAt(0).toUpperCase()+U.substring(1).replace(/[A-Z]/g," $&"));F.setAttribute("value",S);mxUtils.write(F,U);C.appendChild(F)}p.appendChild(C);p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.textOverflow="clip";p.style.cursor="default";var O=document.createElement("input");O.setAttribute("type","text");O.style.width="100%";O.style.outline="none";O.style.border="none";+O.style.background="transparent";O.style.padding="8px 26px 8px 8px";O.style.boxSizing="border-box";p.appendChild(O);E=document.createElement("img");E.setAttribute("src",Editor.sendImage);E.setAttribute("title",mxResources.get("sendMessage"));E.className="geAdaptiveAsset";E.style.position="relative";E.style.cursor="pointer";E.style.opacity="0.5";E.style.height="19px";E.style.left="-24px";E.style.top="5px";E.style.background="url('"+b.editor.transparentImage+"')";p.appendChild(E);f.appendChild(p);P.isSelectionEmpty()?+b.isDiagramEmpty()?n.value="help":n.value="includeCopyOfMyDiagram":n.value="selectionOnly";var N=!1,m=n.value,u=function(){O.setAttribute("placeholder",mxResources.get("create"==n.value?"describeYourDiagram":"askMeAnything"));"create"==n.value?(n.style.width="",C.style.display=""):(n.style.width="100%",C.style.display="none")};u();mxEvent.addListener(n,"change",function(){N||("reset"==n.value?(n.value=m,e.innerHTML=""):m=n.value,u())});P.selectionModel.addListener(mxEvent.CHANGE,y);P.getModel().addListener(mxEvent.CHANGE,+y);y();mxEvent.addListener(E,"click",L);mxEvent.addListener(O,"keydown",function(A){13!=A.keyCode||mxEvent.isShiftDown(A)||L()});c.appendChild(f);this.window=new mxWindow(mxResources.get("chatWindowTitle"),c,g,l,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){P.getModel().removeListener(y)}));this.window.addListener("show",+mxUtils.bind(this,function(){this.window.fit();O.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,g,l,d,q){var y=b.editor.graph,x=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)x=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var D=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(J,K){if(y.isEnabled()){var L=new FilenameDialog(b,"",mxResources.get("add"),function(P){b.hideDialog();if(null!=P&&0<P.length){P=+P.split(" ");for(var c=[],e=[],f=0;f<P.length;f++){var p=mxUtils.trim(P[f]);""!=p&&(e.push(p),0>mxUtils.indexOf(J,p)&&c.push(p))}y.isSelectionEmpty()?K(J.concat(c)):y.addTagsForCells(y.getSelectionCells(),e)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(L.container,320,80,!0,!0);L.init()}},x);x=D.div;this.window=new mxWindow(mxResources.get("tags"),x,g,l,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){D.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,g,l,d){var q=document.createElement("div");q.style.textAlign="center";var y=document.createElement("p");y.style.fontSize="16pt";y.style.padding="0px";y.style.margin="0px";y.style.color="gray";mxUtils.write(y,mxResources.get("authorizationRequired"));var x="Unknown",D=document.createElement("img");D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.marginRight="10px";g==b.drive?(x=mxResources.get("googleDrive"),D.src=IMAGE_PATH+"/google-drive-logo-white.svg"):g==b.dropbox?(x=mxResources.get("dropbox"),D.src=IMAGE_PATH+"/dropbox-logo-white.svg"):g==b.oneDrive?(x=mxResources.get("oneDrive"),D.src=IMAGE_PATH+"/onedrive-logo-white.svg"):g==b.gitHub?(x=mxResources.get("github"),D.src=IMAGE_PATH+"/github-logo-white.svg"):g==b.gitLab?(x=mxResources.get("gitlab"),D.src=IMAGE_PATH+"/gitlab-logo.svg",D.style.width="32px"):g==b.trello&&(x=mxResources.get("trello"),D.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[x]));var J=document.createElement("input");J.setAttribute("type","checkbox");x=mxUtils.button(mxResources.get("authorize"),function(){d(J.checked)});x.insertBefore(D,x.firstChild);x.style.marginTop="6px";x.className="geBigButton";x.style.fontSize="18px";x.style.padding="14px";q.appendChild(y);q.appendChild(b);q.appendChild(x);l&&(l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(J),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberMe")),l.appendChild(y),q.appendChild(l),J.checked=!0,J.defaultChecked=!0,mxEvent.addListener(y,"click",function(K){J.checked=!J.checked;mxEvent.consume(K)}));this.container=q},MoreShapesDialog=function(b,g,l){l=null!=l?l:b.sidebar.entries;var d=document.createElement("div"),q=[];if(null!=b.sidebar.customEntries)for(var y=0;y<b.sidebar.customEntries.length;y++){for(var x=b.sidebar.customEntries[y]||{},D={title:b.getResource(x.title),entries:[]},J=0;null!=x.entries&&J<x.entries.length;J++){var K=x.entries[J];D.entries.push({id:K.id,title:b.getResource(K.title),desc:b.getResource(K.desc),image:K.preview})}0<D.entries.length&&q.push(D)}for(y=0;y<l.length;y++)if(null==b.sidebar.enabledLibraries)q.push(l[y]);else{D={title:l[y].title,entries:[]};for(J=0;J<l[y].entries.length;J++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,-l[y].entries[J].id)&&D.entries.push(l[y].entries[J]);0<D.entries.length&&q.push(D)}l=q;if(g){y=mxUtils.bind(this,function(R){for(var U=0;U<R.length;U++)(function(P){var O=f.cloneNode(!1);O.style.fontWeight="bold";O.style.backgroundColor="light-dark(#e5e5e5, #505759)";O.style.padding="6px 0px 6px 20px";mxUtils.write(O,P.title);L.appendChild(O);for(var m=0;m<P.entries.length;m++)(function(u){var A=f.cloneNode(!1);A.style.cursor="pointer";A.style.padding="4px 0px 4px 20px";A.style.whiteSpace="nowrap";-A.style.overflow="hidden";A.style.textOverflow="ellipsis";A.setAttribute("title",u.title+" ("+u.id+")");var B=document.createElement("input");B.setAttribute("type","checkbox");B.checked=b.sidebar.isEntryVisible(u.id);B.defaultChecked=B.checked;A.appendChild(B);mxUtils.write(A," "+u.title);L.appendChild(A);var H=function(T){if(null==T||"INPUT"!=mxEvent.getSource(T).nodeName){Q.style.textAlign="center";Q.style.padding="0px";Q.style.color="";Q.innerText="";if(null!=u.desc){var k=document.createElement("pre");-k.style.boxSizing="border-box";k.style.fontFamily="inherit";k.style.margin="20px";k.style.right="0px";k.style.textAlign="left";mxUtils.write(k,u.desc);Q.appendChild(k)}null!=u.imageCallback?u.imageCallback(Q):null!=u.image?(k=document.createElement("img"),k.setAttribute("border","0"),k.style.maxWidth="100%",k.setAttribute("src",u.image),Q.appendChild(k)):null==u.desc&&(Q.style.padding="20px",Q.style.color="rgb(179, 179, 179)",mxUtils.write(Q,mxResources.get("noPreview")));null!=c&&(c.style.backgroundColor=-"");c=A;c.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=T&&mxEvent.consume(T)}};mxEvent.addListener(A,"click",H);mxEvent.addListener(A,"dblclick",function(T){B.checked=!B.checked;mxEvent.consume(T)});e.push(function(){return B.checked?u.id:null});0==U&&0==m&&H()})(P.entries[m])})(R[U])});J=document.createElement("div");J.className="geDialogTitle";mxUtils.write(J,mxResources.get("shapes"));J.style.position="absolute";J.style.top="0px";J.style.left="0px";J.style.lineHeight="40px";J.style.height=-"40px";J.style.right="0px";var L=document.createElement("div"),Q=document.createElement("div");L.style.position="absolute";L.style.top="40px";L.style.left="0px";L.style.width="202px";L.style.bottom="60px";L.style.overflow="auto";Q.style.position="absolute";Q.style.left="202px";Q.style.right="0px";Q.style.top="40px";Q.style.bottom="60px";Q.style.overflow="auto";Q.style.borderLeftStyle="solid";Q.style.borderLeftWidth="1px";Q.style.textAlign="center";var c=null,e=[],f=document.createElement("div");f.style.position=-"relative";f.style.left="0px";f.style.right="0px";y(l);d.style.padding="30px";d.appendChild(J);d.appendChild(L);d.appendChild(Q);l=document.createElement("div");l.className="geDialogFooter";l.style.position="absolute";l.style.paddingRight="16px";l.style.left="0px";l.style.right="0px";l.style.bottom="0px";l.style.height="60px";l.style.lineHeight="52px";var p=document.createElement("input");p.setAttribute("type","checkbox");p.style.position="relative";p.style.top="1px";p.checked=b.sidebar.sidebarTitles;-p.defaultChecked=p.checked;l.appendChild(p);y=document.createElement("span");mxUtils.write(y," "+mxResources.get("labels"));y.style.paddingRight="20px";l.appendChild(y);mxEvent.addListener(y,"click",function(R){p.checked=!p.checked;mxEvent.consume(R)});var n=document.createElement("input");n.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)y=document.createElement("span"),y.style.paddingRight="20px",y.appendChild(n),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),-n.style.position="relative",n.style.top="1px",n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(y,"click",function(R){mxEvent.getSource(R)!=n&&(n.checked=!n.checked,mxEvent.consume(R))}),l.appendChild(y);y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className="geBtn";J=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var R=[],U=0;U<e.length;U++){var P=e[U].apply(this,arguments);null!=P&&R.push(P)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&-"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(U=mxUtils.indexOf(R,".scratchpad"),null!=b.scratchpad!=(0<=U&&0<R.splice(U,1).length)&&b.toggleScratchpad(),U=mxUtils.indexOf(R,"search"),mxSettings.settings.search=0<=U&&0<R.splice(U,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),n.checked&&mxSettings.save());b.sidebar.showEntries(R.join(";"),n.checked,!0);b.setSidebarTitles(p.checked,n.checked)});J.className="geBtn gePrimaryBtn"}else{var t=document.createElement("table");-y=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";J=document.createElement("tr");t.style.width="100%";g=document.createElement("td");q=document.createElement("td");x=document.createElement("td");var z=mxUtils.bind(this,function(R,U,P){var O=document.createElement("input");O.type="checkbox";t.appendChild(O);O.checked=b.sidebar.isEntryVisible(P);var m=document.createElement("span");mxUtils.write(m,U);U=document.createElement("div");U.style.display="block";U.appendChild(O);-U.appendChild(m);mxEvent.addListener(m,"click",function(u){O.checked=!O.checked;mxEvent.consume(u)});R.appendChild(U);return function(){return O.checked?P:null}});J.appendChild(g);J.appendChild(q);J.appendChild(x);y.appendChild(J);t.appendChild(y);e=[];var E=0;for(y=0;y<l.length;y++)for(J=0;J<l[y].entries.length;J++)E++;var C=[g,q,x],F=0;for(y=0;y<l.length;y++)(function(R){for(var U=0;U<R.entries.length;U++){var P=R.entries[U];e.push(z(C[Math.floor(F/(E/3))],P.title,P.id));F++}})(l[y]);d.appendChild(t);-l=document.createElement("div");l.style.marginTop="18px";l.style.textAlign="center";n=document.createElement("input");isLocalStorage&&(n.setAttribute("type","checkbox"),n.checked=!0,n.defaultChecked=!0,l.appendChild(n),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),l.appendChild(y),mxEvent.addListener(y,"click",function(R){n.checked=!n.checked;mxEvent.consume(R)}));d.appendChild(l);y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});-y.className="geBtn";J=mxUtils.button(mxResources.get("apply"),function(){for(var R=["search"],U=0;U<e.length;U++){var P=e[U].apply(this,arguments);null!=P&&R.push(P)}b.sidebar.showEntries(0<R.length?R.join(";"):"",n.checked);b.hideDialog()});J.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right"}b.editor.cancelFirst?(l.appendChild(y),l.appendChild(J)):(l.appendChild(J),l.appendChild(y));d.appendChild(l);this.container=d},PluginsDialog=function(b,+l[y].entries[J].id)&&D.entries.push(l[y].entries[J]);0<D.entries.length&&q.push(D)}l=q;if(g){y=mxUtils.bind(this,function(S){for(var U=0;U<S.length;U++)(function(O){var N=f.cloneNode(!1);N.style.fontWeight="bold";N.style.backgroundColor="light-dark(#e5e5e5, #505759)";N.style.padding="6px 0px 6px 20px";mxUtils.write(N,O.title);L.appendChild(N);for(var m=0;m<O.entries.length;m++)(function(u){var A=f.cloneNode(!1);A.style.cursor="pointer";A.style.padding="4px 0px 4px 20px";A.style.whiteSpace="nowrap";+A.style.overflow="hidden";A.style.textOverflow="ellipsis";A.setAttribute("title",u.title+" ("+u.id+")");var B=document.createElement("input");B.setAttribute("type","checkbox");B.checked=b.sidebar.isEntryVisible(u.id);B.defaultChecked=B.checked;A.appendChild(B);mxUtils.write(A," "+u.title);L.appendChild(A);var H=function(T){if(null==T||"INPUT"!=mxEvent.getSource(T).nodeName){P.style.textAlign="center";P.style.padding="0px";P.style.color="";P.innerText="";if(null!=u.desc){var k=document.createElement("pre");+k.style.boxSizing="border-box";k.style.fontFamily="inherit";k.style.margin="20px";k.style.right="0px";k.style.textAlign="left";mxUtils.write(k,u.desc);P.appendChild(k)}null!=u.imageCallback?u.imageCallback(P):null!=u.image?(k=document.createElement("img"),k.setAttribute("border","0"),k.style.maxWidth="100%",k.setAttribute("src",u.image),P.appendChild(k)):null==u.desc&&(P.style.padding="20px",P.style.color="rgb(179, 179, 179)",mxUtils.write(P,mxResources.get("noPreview")));null!=c&&(c.style.backgroundColor=+"");c=A;c.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=T&&mxEvent.consume(T)}};mxEvent.addListener(A,"click",H);mxEvent.addListener(A,"dblclick",function(T){B.checked=!B.checked;mxEvent.consume(T)});e.push(function(){return B.checked?u.id:null});0==U&&0==m&&H()})(O.entries[m])})(S[U])});J=document.createElement("div");J.className="geDialogTitle";mxUtils.write(J,mxResources.get("shapes"));J.style.position="absolute";J.style.top="0px";J.style.left="0px";J.style.lineHeight="40px";J.style.height=+"40px";J.style.right="0px";var L=document.createElement("div"),P=document.createElement("div");L.style.position="absolute";L.style.top="40px";L.style.left="0px";L.style.width="202px";L.style.bottom="60px";L.style.overflow="auto";P.style.position="absolute";P.style.left="202px";P.style.right="0px";P.style.top="40px";P.style.bottom="60px";P.style.overflow="auto";P.style.borderLeftStyle="solid";P.style.borderLeftWidth="1px";P.style.textAlign="center";var c=null,e=[],f=document.createElement("div");f.style.position=+"relative";f.style.left="0px";f.style.right="0px";y(l);d.style.padding="30px";d.appendChild(J);d.appendChild(L);d.appendChild(P);l=document.createElement("div");l.className="geDialogFooter";l.style.position="absolute";l.style.paddingRight="16px";l.style.left="0px";l.style.right="0px";l.style.bottom="0px";l.style.height="60px";l.style.lineHeight="52px";var p=document.createElement("input");p.setAttribute("type","checkbox");p.style.position="relative";p.style.top="1px";p.checked=b.sidebar.sidebarTitles;+p.defaultChecked=p.checked;l.appendChild(p);y=document.createElement("span");mxUtils.write(y," "+mxResources.get("labels"));y.style.paddingRight="20px";l.appendChild(y);mxEvent.addListener(y,"click",function(S){p.checked=!p.checked;mxEvent.consume(S)});var n=document.createElement("input");n.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)y=document.createElement("span"),y.style.paddingRight="20px",y.appendChild(n),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),+n.style.position="relative",n.style.top="1px",n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(y,"click",function(S){mxEvent.getSource(S)!=n&&(n.checked=!n.checked,mxEvent.consume(S))}),l.appendChild(y);y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className="geBtn";J=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var S=[],U=0;U<e.length;U++){var O=e[U].apply(this,arguments);null!=O&&S.push(O)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&+"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(U=mxUtils.indexOf(S,".scratchpad"),null!=b.scratchpad!=(0<=U&&0<S.splice(U,1).length)&&b.toggleScratchpad(),U=mxUtils.indexOf(S,"search"),mxSettings.settings.search=0<=U&&0<S.splice(U,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),n.checked&&mxSettings.save());b.sidebar.showEntries(S.join(";"),n.checked,!0);b.setSidebarTitles(p.checked,n.checked)});J.className="geBtn gePrimaryBtn"}else{var t=document.createElement("table");+y=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";J=document.createElement("tr");t.style.width="100%";g=document.createElement("td");q=document.createElement("td");x=document.createElement("td");var z=mxUtils.bind(this,function(S,U,O){var N=document.createElement("input");N.type="checkbox";t.appendChild(N);N.checked=b.sidebar.isEntryVisible(O);var m=document.createElement("span");mxUtils.write(m,U);U=document.createElement("div");U.style.display="block";U.appendChild(N);+U.appendChild(m);mxEvent.addListener(m,"click",function(u){N.checked=!N.checked;mxEvent.consume(u)});S.appendChild(U);return function(){return N.checked?O:null}});J.appendChild(g);J.appendChild(q);J.appendChild(x);y.appendChild(J);t.appendChild(y);e=[];var E=0;for(y=0;y<l.length;y++)for(J=0;J<l[y].entries.length;J++)E++;var C=[g,q,x],F=0;for(y=0;y<l.length;y++)(function(S){for(var U=0;U<S.entries.length;U++){var O=S.entries[U];e.push(z(C[Math.floor(F/(E/3))],O.title,O.id));F++}})(l[y]);d.appendChild(t);+l=document.createElement("div");l.style.marginTop="18px";l.style.textAlign="center";n=document.createElement("input");isLocalStorage&&(n.setAttribute("type","checkbox"),n.checked=!0,n.defaultChecked=!0,l.appendChild(n),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),l.appendChild(y),mxEvent.addListener(y,"click",function(S){n.checked=!n.checked;mxEvent.consume(S)}));d.appendChild(l);y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});+y.className="geBtn";J=mxUtils.button(mxResources.get("apply"),function(){for(var S=["search"],U=0;U<e.length;U++){var O=e[U].apply(this,arguments);null!=O&&S.push(O)}b.sidebar.showEntries(0<S.length?S.join(";"):"",n.checked);b.hideDialog()});J.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right"}b.editor.cancelFirst?(l.appendChild(y),l.appendChild(J)):(l.appendChild(J),l.appendChild(y));d.appendChild(l);this.container=d},PluginsDialog=function(b,g,l,d){function q(){J=!0;if(0==D.length)x.innerText=mxResources.get("noPlugins");else{x.innerText="";for(var e=0;e<D.length;e++){var f=document.createElement("span");f.style.display="flex";f.style.alignItems="center";f.style.whiteSpace="nowrap";var p=document.createElement("img");p.src=Editor.trashImage;p.style.position="relative";p.style.cursor="pointer";p.style.marginRight="4px";p.style.display="inline-block";p.style.width="18px";p.setAttribute("title",mxResources.get("delete"));f.appendChild(p);mxUtils.write(f,D[e]);x.appendChild(f);mxUtils.br(x);mxEvent.addListener(p,"click",function(n){return function(){b.confirm(mxResources.get("delete")+' "'+D[n]+'"?',function(){null!=l&&l(D[n]);D.splice(n,1);q()})}}(e))}}}var y=document.createElement("div"),x=document.createElement("div");x.style.height="180px";x.style.overflow="auto";var D=mxSettings.getPlugins().slice(),J=!1;y.appendChild(x);q();J=!1;var K=mxUtils.button(mxResources.get("add"),null!=g?function(){g(function(e){e&&0>mxUtils.indexOf(D,e)&&D.push(e);q()})}:function(){var e=document.createElement("div"),f=document.createElement("span");f.style.marginTop="6px";mxUtils.write(f,mxResources.get("builtinPlugins")+": ");e.appendChild(f);var p=document.createElement("select");p.style.width="150px";for(f=0;f<App.publicPlugin.length;f++){var n=document.createElement("option");mxUtils.write(n,App.publicPlugin[f]);n.value=App.publicPlugin[f];p.appendChild(n)}e.appendChild(p);mxUtils.br(e);mxUtils.br(e);f=mxUtils.button(mxResources.get("custom")+"...",function(){var t=new FilenameDialog(b,"",mxResources.get("add"),function(z){b.hideDialog();if(null!=z&&0<z.length){z=z.split(";");for(var E=0;E<z.length;E++){var C=z[E],F=App.pluginRegistry[C];null!=F&&(C=F);0<C.length&&0>mxUtils.indexOf(D,C)&&D.push(C)}q()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(t.container,300,80,!0,!0);t.init()});f.className="geBtn";ALLOW_CUSTOM_PLUGINS||(f.style.display="none");e=new CustomDialog(b,e,mxUtils.bind(this,function(){var t=-App.pluginRegistry[p.value];0>mxUtils.indexOf(D,t)&&(D.push(t),q())}),null,null,null,f);b.showDialog(e.container,360,100,!0,!0)});K.className="geBtn";var L=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});L.className="geBtn";var Q=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){J?(mxSettings.setPlugins(D),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});Q.className="geBtn gePrimaryBtn";var c=document.createElement("div");-c.style.marginTop="14px";c.style.textAlign="right";b.isOffline()||c.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(d||c.appendChild(L),c.appendChild(K),c.appendChild(Q)):(c.appendChild(K),c.appendChild(Q),d||c.appendChild(L));y.appendChild(c);this.container=y},CropImageDialog=function(b,g,l,d){function q(){var R=n.checked,U=t.checked,P=e.geometry,O=J.width,m=J.height,u=(300-O)/2,A=(300-m)/2;P.x<u?(P.width-=u-P.x,P.x=u):P.x+P.width>u+O&&(P.width=u+O-P.x,-P.x=Math.min(P.x,u+O));P.y<A?(P.height-=A-P.y,P.y=A):P.y+P.height>A+m&&(P.height=A+m-P.y,P.y=Math.min(P.y,A+m));var B=(P.x-u)/O*100;O=100-(P.x+P.width-u)/O*100;u=(P.y-A)/m*100;P=100-(P.y+P.height-A)/m*100;return"inset("+mxUtils.format(u)+"% "+mxUtils.format(O)+"% "+mxUtils.format(P)+"% "+mxUtils.format(B)+"%"+(R?" round "+c+"%":U?" round 50%":"")+")"}function y(R){null!=L&&(!0!==R&&(L.model.setGeometry(e,Q.clone()),c=5,E.value=c),L.model.setStyle(e,f+q()),L.selectAll(),z.style.visibility=n.checked?-"visible":"hidden")}var x=document.createElement("div"),D=document.createElement("div");D.style.height="300px";D.style.width="300px";D.style.display="inline-flex";D.style.justifyContent="center";D.style.alignItems="center";D.style.position="absolute";var J=document.createElement("img");J.onload=function(){function R(){L.model.setStyle(e,f+q())}L=new Graph(K);L.autoExtend=!1;L.autoScroll=!1;L.setGridEnabled(!1);L.setEnabled(!0);L.setPanning(!1);L.setConnectable(!1);L.getRubberband().setEnabled(!1);-L.graphHandler.allowLivePreview=!1;var U=L.createVertexHandler;L.createVertexHandler=function(){var N=U.apply(this,arguments);N.livePreview=!1;return N};if(null!=l)try{if("inset"==l.substring(0,5)){var P=e.geometry,O=J.width,m=J.height,u=(300-O)/2,A=(300-m)/2,B=l.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),H=parseFloat(B[0]),T=parseFloat(B[1]),k=parseFloat(B[2]),v=parseFloat(B[3]);isFinite(H)&&isFinite(T)&&isFinite(k)&&isFinite(v)?(P.x=v/100*O+u,P.y=H/100*m+A,P.width=(100-T)/100*O+u-P.x,P.height=(100--k)/100*m+A-P.y,"round"==B[4]?"50%"==B[5]?t.setAttribute("checked","checked"):(c=parseInt(B[5]),E.value=c,n.setAttribute("checked","checked"),z.style.visibility="visible"):p.setAttribute("checked","checked")):l=null}else l=null}catch(N){}e.style=f+(l?l:q());e.vertex=!0;L.addCell(e,null,null,null,null);L.selectAll();L.addListener(mxEvent.CELLS_MOVED,R);L.addListener(mxEvent.CELLS_RESIZED,R);var G=L.graphHandler.mouseUp,I=L.graphHandler.mouseDown;L.graphHandler.mouseUp=function(){G.apply(this,arguments);+App.pluginRegistry[p.value];0>mxUtils.indexOf(D,t)&&(D.push(t),q())}),null,null,null,f);b.showDialog(e.container,360,100,!0,!0)});K.className="geBtn";var L=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});L.className="geBtn";var P=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){J?(mxSettings.setPlugins(D),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});P.className="geBtn gePrimaryBtn";var c=document.createElement("div");+c.style.marginTop="14px";c.style.textAlign="right";b.isOffline()||c.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(d||c.appendChild(L),c.appendChild(K),c.appendChild(P)):(c.appendChild(K),c.appendChild(P),d||c.appendChild(L));y.appendChild(c);this.container=y},CropImageDialog=function(b,g,l,d){function q(){var S=n.checked,U=t.checked,O=e.geometry,N=J.width,m=J.height,u=(300-N)/2,A=(300-m)/2;O.x<u?(O.width-=u-O.x,O.x=u):O.x+O.width>u+N&&(O.width=u+N-O.x,+O.x=Math.min(O.x,u+N));O.y<A?(O.height-=A-O.y,O.y=A):O.y+O.height>A+m&&(O.height=A+m-O.y,O.y=Math.min(O.y,A+m));var B=(O.x-u)/N*100;N=100-(O.x+O.width-u)/N*100;u=(O.y-A)/m*100;O=100-(O.y+O.height-A)/m*100;return"inset("+mxUtils.format(u)+"% "+mxUtils.format(N)+"% "+mxUtils.format(O)+"% "+mxUtils.format(B)+"%"+(S?" round "+c+"%":U?" round 50%":"")+")"}function y(S){null!=L&&(!0!==S&&(L.model.setGeometry(e,P.clone()),c=5,E.value=c),L.model.setStyle(e,f+q()),L.selectAll(),z.style.visibility=n.checked?+"visible":"hidden")}var x=document.createElement("div"),D=document.createElement("div");D.style.height="300px";D.style.width="300px";D.style.display="inline-flex";D.style.justifyContent="center";D.style.alignItems="center";D.style.position="absolute";var J=document.createElement("img");J.onload=function(){function S(){L.model.setStyle(e,f+q())}L=new Graph(K);L.autoExtend=!1;L.autoScroll=!1;L.setGridEnabled(!1);L.setEnabled(!0);L.setPanning(!1);L.setConnectable(!1);L.getRubberband().setEnabled(!1);+L.graphHandler.allowLivePreview=!1;var U=L.createVertexHandler;L.createVertexHandler=function(){var R=U.apply(this,arguments);R.livePreview=!1;return R};if(null!=l)try{if("inset"==l.substring(0,5)){var O=e.geometry,N=J.width,m=J.height,u=(300-N)/2,A=(300-m)/2,B=l.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),H=parseFloat(B[0]),T=parseFloat(B[1]),k=parseFloat(B[2]),v=parseFloat(B[3]);isFinite(H)&&isFinite(T)&&isFinite(k)&&isFinite(v)?(O.x=v/100*N+u,O.y=H/100*m+A,O.width=(100-T)/100*N+u-O.x,O.height=(100-+k)/100*m+A-O.y,"round"==B[4]?"50%"==B[5]?t.setAttribute("checked","checked"):(c=parseInt(B[5]),E.value=c,n.setAttribute("checked","checked"),z.style.visibility="visible"):p.setAttribute("checked","checked")):l=null}else l=null}catch(R){}e.style=f+(l?l:q());e.vertex=!0;L.addCell(e,null,null,null,null);L.selectAll();L.addListener(mxEvent.CELLS_MOVED,S);L.addListener(mxEvent.CELLS_RESIZED,S);var G=L.graphHandler.mouseUp,I=L.graphHandler.mouseDown;L.graphHandler.mouseUp=function(){G.apply(this,arguments);K.style.backgroundColor="#fff9"};L.graphHandler.mouseDown=function(){I.apply(this,arguments);K.style.backgroundColor=""};L.dblClick=function(){};var M=L.getSelectionModel().changeSelection;L.getSelectionModel().changeSelection=function(){M.call(this,[e],[e])}};J.onerror=function(){J.onload=null;J.src=Editor.errorImage};J.setAttribute("src",g);J.style.maxWidth="300px";J.style.maxHeight="300px";D.appendChild(J);x.appendChild(D);var K=document.createElement("div");K.style.width="300px";K.style.height=-"300px";K.style.overflow="hidden";K.style.backgroundColor="#fff9";x.appendChild(K);var L=null,Q=new mxGeometry(100,100,100,100),c=5,e=new mxCell("",Q.clone(),""),f="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+g.replace(";base64","")+";clipPath=",p=document.createElement("input");p.setAttribute("type","radio");p.setAttribute("id","croppingRect");p.setAttribute("name","croppingShape");p.setAttribute("checked","checked");p.style.margin="5px";x.appendChild(p);g=document.createElement("label");+"300px";K.style.overflow="hidden";K.style.backgroundColor="#fff9";x.appendChild(K);var L=null,P=new mxGeometry(100,100,100,100),c=5,e=new mxCell("",P.clone(),""),f="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+g.replace(";base64","")+";clipPath=",p=document.createElement("input");p.setAttribute("type","radio");p.setAttribute("id","croppingRect");p.setAttribute("name","croppingShape");p.setAttribute("checked","checked");p.style.margin="5px";x.appendChild(p);g=document.createElement("label");g.setAttribute("for","croppingRect");mxUtils.write(g,mxResources.get("rectangle"));x.appendChild(g);var n=document.createElement("input");n.setAttribute("type","radio");n.setAttribute("id","croppingRounded");n.setAttribute("name","croppingShape");n.style.margin="5px";x.appendChild(n);g=document.createElement("label");g.setAttribute("for","croppingRounded");mxUtils.write(g,mxResources.get("rounded"));x.appendChild(g);var t=document.createElement("input");t.setAttribute("type","radio");t.setAttribute("id","croppingEllipse");t.setAttribute("name","croppingShape");t.style.margin="5px";x.appendChild(t);g=document.createElement("label");g.setAttribute("for","croppingEllipse");mxUtils.write(g,mxResources.get("ellipse"));x.appendChild(g);mxEvent.addListener(p,"change",y);mxEvent.addListener(n,"change",y);mxEvent.addListener(t,"change",y);var z=document.createElement("div");z.style.textAlign="center";z.style.visibility="hidden";var E=document.createElement("input");E.setAttribute("type","range");E.setAttribute("min","1");E.setAttribute("max","49");E.setAttribute("value",c);E.setAttribute("title",mxResources.get("arcSize"));z.appendChild(E);x.appendChild(z);mxEvent.addListener(E,"change",function(){c=this.value;y(!0)});g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";D=mxUtils.button(mxResources.get("apply"),function(){d(q(),e.geometry.width,e.geometry.height);b.hideDialog()});D.className="geBtn gePrimaryBtn";var C=mxUtils.button(mxResources.get("reset"),function(){d(null,J.width,J.height);b.hideDialog()});C.className="geBtn";var F=document.createElement("div");F.style.marginTop="10px";F.style.textAlign="right";b.editor.cancelFirst?(F.appendChild(g),F.appendChild(C),F.appendChild(D)):(F.appendChild(C),F.appendChild(D),F.appendChild(g));x.appendChild(F);this.container=x},EditGeometryDialog=function(b,g){var l=b.editor.graph,d=1==g.length?l.getCellGeometry(g[0]):null,q=document.createElement("div"),y=document.createElement("table"),x=document.createElement("tbody"),D=document.createElement("tr"),J=document.createElement("td"),K=document.createElement("td");y.style.paddingLeft="6px";mxUtils.write(J,mxResources.get("relative")+":");var L=document.createElement("input");L.setAttribute("type","checkbox");null!=d&&d.relative&&(L.setAttribute("checked","checked"),L.defaultChecked=!0);this.init=function(){L.focus()};K.appendChild(L);D.appendChild(J);D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");-mxUtils.write(J,mxResources.get("left")+":");var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.width="100px";Q.value=null!=d?d.x:"";K.appendChild(Q);D.appendChild(J);D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");mxUtils.write(J,mxResources.get("top")+":");var c=document.createElement("input");c.setAttribute("type","text");c.style.width="100px";c.value=null!=d?d.y:"";K.appendChild(c);D.appendChild(J);+mxUtils.write(J,mxResources.get("left")+":");var P=document.createElement("input");P.setAttribute("type","text");P.style.width="100px";P.value=null!=d?d.x:"";K.appendChild(P);D.appendChild(J);D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");mxUtils.write(J,mxResources.get("top")+":");var c=document.createElement("input");c.setAttribute("type","text");c.style.width="100px";c.value=null!=d?d.y:"";K.appendChild(c);D.appendChild(J);D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");mxUtils.write(J,mxResources.get("dx")+":");var e=document.createElement("input");e.setAttribute("type","text");e.style.width="100px";e.value=null!=d&&null!=d.offset?d.offset.x:"";K.appendChild(e);D.appendChild(J);D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");mxUtils.write(J,mxResources.get("dy")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value=null!=d&&null!=d.offset?d.offset.y:"";K.appendChild(f);D.appendChild(J);D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");mxUtils.write(J,mxResources.get("width")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.width:"";K.appendChild(p);D.appendChild(J);D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");mxUtils.write(J,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=d?d.height:"";K.appendChild(n);D.appendChild(J);D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");mxUtils.write(J,mxResources.get("rotation")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=1==g.length?mxUtils.getValue(l.getCellStyle(g[0]),mxConstants.STYLE_ROTATION,0):"";K.appendChild(t);D.appendChild(J);D.appendChild(K);x.appendChild(D);y.appendChild(x);q.appendChild(y);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var z=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();l.getModel().beginUpdate();try{for(var E=0;E<g.length;E++){var C=l.getCellGeometry(g[E]);null!=-C&&(C=C.clone(),l.isCellMovable(g[E])&&(C.relative=L.checked,0<mxUtils.trim(Q.value).length&&(C.x=Number(Q.value)),0<mxUtils.trim(c.value).length&&(C.y=Number(c.value)),0<mxUtils.trim(e.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.x=Number(e.value)),0<mxUtils.trim(f.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.y=Number(f.value))),l.isCellResizable(g[E])&&(0<mxUtils.trim(p.value).length&&(C.width=Number(p.value)),0<mxUtils.trim(n.value).length&&(C.height=Number(n.value))),+C&&(C=C.clone(),l.isCellMovable(g[E])&&(C.relative=L.checked,0<mxUtils.trim(P.value).length&&(C.x=Number(P.value)),0<mxUtils.trim(c.value).length&&(C.y=Number(c.value)),0<mxUtils.trim(e.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.x=Number(e.value)),0<mxUtils.trim(f.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.y=Number(f.value))),l.isCellResizable(g[E])&&(0<mxUtils.trim(p.value).length&&(C.width=Number(p.value)),0<mxUtils.trim(n.value).length&&(C.height=Number(n.value))),l.getModel().setGeometry(g[E],C));0<mxUtils.trim(t.value).length&&l.setCellStyles(mxConstants.STYLE_ROTATION,Number(t.value),[g[E]])}}finally{l.getModel().endUpdate()}});z.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",function(E){13==E.keyCode&&z.click()});y=document.createElement("div");y.style.marginTop="20px";y.style.textAlign="right";b.editor.cancelFirst?(y.appendChild(d),y.appendChild(z)):(y.appendChild(z),y.appendChild(d));q.appendChild(y);this.container=q},LibraryDialog=function(b,-g,l,d,q,y,x){function D(P){for(P=document.elementFromPoint(P.clientX,P.clientY);null!=P&&P.parentNode!=f;)P=P.parentNode;var O=null;if(null!=P){var m=f.firstChild;for(O=0;null!=m&&m!=P;)m=m.nextSibling,O++}return O}function J(P,O,m,u,A,B,H,T,k){try{if(b.spinner.stop(),null==O||"image/"==O.substring(0,6))if(null==P&&null!=H||null==n[P]){var v=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0<Z.title.length?-Z.title:mxResources.get("untitled"));X.style.color=null==Z.title||0==Z.title.length?"#d0d0d0":""};f.style.backgroundImage="";p.style.display="none";var G=A,I=B;if(A>b.maxImageSize||B>b.maxImageSize){var M=Math.min(1,Math.min(b.maxImageSize/Math.max(1,A)),b.maxImageSize/Math.max(1,B));A*=M;B*=M}G>I?(I=Math.round(100*I/G),G=100):(G=Math.round(100*G/I),I=100);var N=document.createElement("div");N.setAttribute("draggable","true");N.style.display="inline-block";N.style.position="relative";N.style.padding=-"0 12px";N.style.cursor="move";mxUtils.setPrefixedStyle(N.style,"transition","transform .1s ease-in-out");if(null!=P){var S=document.createElement("img");S.setAttribute("src",C.convert(P));S.style.width=G+"px";S.style.height=I+"px";S.style.margin="10px";S.style.paddingBottom=Math.floor((100-I)/2)+"px";S.style.paddingLeft=Math.floor((100-G)/2)+"px";N.appendChild(S)}else if(null!=H){var V=b.stringToCells("<"==H.xml.charAt(0)?H.xml:Graph.decompress(H.xml));0<V.length&&(b.sidebar.createThumb(V,100,100,-N,null,!0,!1,null,null,Editor.isDarkMode()?"#2a252f":"#ffffff"),N.firstChild.style.display="inline-block",N.firstChild.style.cursor="")}var W=document.createElement("img");W.setAttribute("src",Editor.closeBlackImage);W.setAttribute("border","0");W.setAttribute("title",mxResources.get("delete"));W.setAttribute("align","top");W.style.paddingTop="4px";W.style.position="absolute";W.style.marginLeft="-12px";W.style.zIndex="1";W.style.cursor="pointer";mxEvent.addListener(W,"dragstart",function(fa){mxEvent.consume(fa)});-(function(fa,aa,da){mxEvent.addListener(W,"click",function(ha){n[aa]=null;for(var pa=0;pa<Q.length;pa++)if(null!=Q[pa].data&&Q[pa].data==aa||null!=Q[pa].xml&&null!=da&&Q[pa].xml==da.xml){Q.splice(pa,1);break}N.parentNode.removeChild(fa);0==Q.length&&(f.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(ha)});mxEvent.addListener(W,"dblclick",function(ha){mxEvent.consume(ha)})})(N,P,H);N.appendChild(W);N.style.marginBottom="30px";var X=document.createElement("div");-X.style.position="absolute";X.style.boxSizing="border-box";X.style.bottom="-18px";X.style.left="10px";X.style.right="10px";X.style.backgroundColor="light-dark(#ffffff, transparent)";X.style.overflow="hidden";X.style.textAlign="center";X.setAttribute("title",mxResources.get("rename"));var Z=null;null!=P?(Z={data:P,w:A,h:B,title:k},null!=T&&(Z.aspect=T),n[P]=S,Q.push(Z)):null!=H&&(H.aspect="fixed",Q.push(H),Z=H);mxEvent.addListener(X,"keydown",function(fa){13==fa.keyCode&&null!=E&&(E(),E=null,mxEvent.consume(fa))});-v();N.appendChild(X);mxEvent.addListener(X,"mousedown",function(fa){"true"!=X.getAttribute("contentEditable")&&mxEvent.consume(fa)});V=function(fa){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var aa=new FilenameDialog(b,Z.title||"",mxResources.get("ok"),function(da){null!=da&&(Z.title=da,v())},mxResources.get("enterValue"));b.showDialog(aa.container,300,80,!0,!0);aa.init();mxEvent.consume(fa)}else if("true"!=X.getAttribute("contentEditable")){null!=-E&&(E(),E=null);if(null==Z.title||0==Z.title.length)X.innerText="";X.style.textOverflow="";X.style.whiteSpace="";X.style.cursor="text";X.style.color="";X.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(X.style,"user-select","text");X.focus();document.execCommand("selectAll",!1,null);E=function(){X.removeAttribute("contentEditable");X.style.cursor="pointer";Z.title=mxUtils.getTextContent(X);v()};mxEvent.consume(fa)}};mxEvent.addListener(X,"click",V);mxEvent.addListener(N,"dblclick",-V);f.appendChild(N);mxEvent.addListener(N,"dragstart",function(fa){null==E&&(null==P&&null!=H&&(W.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=H.xml&&fa.dataTransfer.setData("Text",H.xml),t=D(fa),mxClient.IS_GC&&(N.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(N.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(N,30);W.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(N,"dragend",function(fa){"hidden"==W.style.visibility&&-(W.style.visibility="",X.style.visibility="");t=null;mxUtils.setOpacity(N,100);mxUtils.setPrefixedStyle(N.style,"transform",null)})}else F||(F=!0,b.handleError({message:mxResources.get("fileExists")}));else{A=!1;try{if(G=mxUtils.parseXml(P),"mxlibrary"==G.documentElement.nodeName){I=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=I&&0<I.length)for(var Y=0;Y<I.length;Y++)null!=I[Y].xml?J(null,null,0,0,0,0,I[Y]):J(I[Y].data,null,0,0,I[Y].w,I[Y].h,null,"fixed",I[Y].title);A=!0}else if("mxfile"==-G.documentElement.nodeName){var ba=G.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=Editor.getDiagramNodeXml(ba[Y]);V=b.stringToCells(ea);if(0<V.length){var ca=b.editor.graph.getBoundingBoxFromGeometry(V);null!=ca&&J(null,null,0,0,0,0,{xml:ea,w:ca.width,h:ca.height})}}A=!0}}catch(fa){null!=window.console&&console.error("Error in library dialog: "+fa)}A||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(fa){null!=window.console&&-console.log("Error in library dialog: "+fa)}return null}function K(P){P.dataTransfer.dropEffect=null!=t?"move":"copy";P.stopPropagation();P.preventDefault()}function L(P){P.stopPropagation();P.preventDefault();F=!1;z=D(P);if(null!=t)null!=z&&z<f.children.length?(Q.splice(z>t?z-1:z,0,Q.splice(t,1)[0]),f.insertBefore(f.children[t],f.children[z])):(Q.push(Q.splice(t,1)[0]),f.appendChild(f.children[t]));else if(0<P.dataTransfer.files.length)b.importFiles(P.dataTransfer.files,0,0,b.maxImageSize,R(P));-else if(0<=mxUtils.indexOf(P.dataTransfer.types,"text/uri-list")){var O=decodeURIComponent(P.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(O)||/(\.png)($|\?)/i.test(O)||/(\.gif)($|\?)/i.test(O)||/(\.svg)($|\?)/i.test(O))&&b.loadImage(O,function(m){J(O,null,0,0,m.width,m.height);f.scrollTop=f.scrollHeight})}P.stopPropagation();P.preventDefault()}var Q=[];l=document.createElement("div");l.style.height="100%";var c=document.createElement("div");c.style.whiteSpace="nowrap";c.style.height=+g,l,d,q,y,x){function D(O){for(O=document.elementFromPoint(O.clientX,O.clientY);null!=O&&O.parentNode!=f;)O=O.parentNode;var N=null;if(null!=O){var m=f.firstChild;for(N=0;null!=m&&m!=O;)m=m.nextSibling,N++}return N}function J(O,N,m,u,A,B,H,T,k){try{if(b.spinner.stop(),null==N||"image/"==N.substring(0,6))if(null==O&&null!=H||null==n[O]){var v=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0<Z.title.length?+Z.title:mxResources.get("untitled"));X.style.color=null==Z.title||0==Z.title.length?"#d0d0d0":""};f.style.backgroundImage="";p.style.display="none";var G=A,I=B;if(A>b.maxImageSize||B>b.maxImageSize){var M=Math.min(1,Math.min(b.maxImageSize/Math.max(1,A)),b.maxImageSize/Math.max(1,B));A*=M;B*=M}G>I?(I=Math.round(100*I/G),G=100):(G=Math.round(100*G/I),I=100);var R=document.createElement("div");R.setAttribute("draggable","true");R.style.display="inline-block";R.style.position="relative";R.style.padding=+"0 12px";R.style.cursor="move";mxUtils.setPrefixedStyle(R.style,"transition","transform .1s ease-in-out");if(null!=O){var Q=document.createElement("img");Q.setAttribute("src",C.convert(O));Q.style.width=G+"px";Q.style.height=I+"px";Q.style.margin="10px";Q.style.paddingBottom=Math.floor((100-I)/2)+"px";Q.style.paddingLeft=Math.floor((100-G)/2)+"px";R.appendChild(Q)}else if(null!=H){var W=b.stringToCells("<"==H.xml.charAt(0)?H.xml:Graph.decompress(H.xml));0<W.length&&(b.sidebar.createThumb(W,100,100,+R,null,!0,!1,null,null,Editor.isDarkMode()?"#2a252f":"#ffffff"),R.firstChild.style.display="inline-block",R.firstChild.style.cursor="")}var V=document.createElement("img");V.setAttribute("src",Editor.closeBlackImage);V.setAttribute("border","0");V.setAttribute("title",mxResources.get("delete"));V.setAttribute("align","top");V.style.paddingTop="4px";V.style.position="absolute";V.style.marginLeft="-12px";V.style.zIndex="1";V.style.cursor="pointer";mxEvent.addListener(V,"dragstart",function(fa){mxEvent.consume(fa)});+(function(fa,aa,da){mxEvent.addListener(V,"click",function(ha){n[aa]=null;for(var na=0;na<P.length;na++)if(null!=P[na].data&&P[na].data==aa||null!=P[na].xml&&null!=da&&P[na].xml==da.xml){P.splice(na,1);break}R.parentNode.removeChild(fa);0==P.length&&(f.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(ha)});mxEvent.addListener(V,"dblclick",function(ha){mxEvent.consume(ha)})})(R,O,H);R.appendChild(V);R.style.marginBottom="30px";var X=document.createElement("div");+X.style.position="absolute";X.style.boxSizing="border-box";X.style.bottom="-18px";X.style.left="10px";X.style.right="10px";X.style.backgroundColor="light-dark(#ffffff, transparent)";X.style.overflow="hidden";X.style.textAlign="center";X.setAttribute("title",mxResources.get("rename"));var Z=null;null!=O?(Z={data:O,w:A,h:B,title:k},null!=T&&(Z.aspect=T),n[O]=Q,P.push(Z)):null!=H&&(H.aspect="fixed",P.push(H),Z=H);mxEvent.addListener(X,"keydown",function(fa){13==fa.keyCode&&null!=E&&(E(),E=null,mxEvent.consume(fa))});+v();R.appendChild(X);mxEvent.addListener(X,"mousedown",function(fa){"true"!=X.getAttribute("contentEditable")&&mxEvent.consume(fa)});W=function(fa){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var aa=new FilenameDialog(b,Z.title||"",mxResources.get("ok"),function(da){null!=da&&(Z.title=da,v())},mxResources.get("enterValue"));b.showDialog(aa.container,300,80,!0,!0);aa.init();mxEvent.consume(fa)}else if("true"!=X.getAttribute("contentEditable")){null!=+E&&(E(),E=null);if(null==Z.title||0==Z.title.length)X.innerText="";X.style.textOverflow="";X.style.whiteSpace="";X.style.cursor="text";X.style.color="";X.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(X.style,"user-select","text");X.focus();document.execCommand("selectAll",!1,null);E=function(){X.removeAttribute("contentEditable");X.style.cursor="pointer";Z.title=mxUtils.getTextContent(X);v()};mxEvent.consume(fa)}};mxEvent.addListener(X,"click",W);mxEvent.addListener(R,"dblclick",+W);f.appendChild(R);mxEvent.addListener(R,"dragstart",function(fa){null==E&&(null==O&&null!=H&&(V.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=H.xml&&fa.dataTransfer.setData("Text",H.xml),t=D(fa),mxClient.IS_GC&&(R.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(R.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(R,30);V.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(R,"dragend",function(fa){"hidden"==V.style.visibility&&+(V.style.visibility="",X.style.visibility="");t=null;mxUtils.setOpacity(R,100);mxUtils.setPrefixedStyle(R.style,"transform",null)})}else F||(F=!0,b.handleError({message:mxResources.get("fileExists")}));else{A=!1;try{if(G=mxUtils.parseXml(O),"mxlibrary"==G.documentElement.nodeName){I=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=I&&0<I.length)for(var Y=0;Y<I.length;Y++)null!=I[Y].xml?J(null,null,0,0,0,0,I[Y]):J(I[Y].data,null,0,0,I[Y].w,I[Y].h,null,"fixed",I[Y].title);A=!0}else if("mxfile"==+G.documentElement.nodeName){var ba=G.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=Editor.getDiagramNodeXml(ba[Y]);W=b.stringToCells(ea);if(0<W.length){var ca=b.editor.graph.getBoundingBoxFromGeometry(W);null!=ca&&J(null,null,0,0,0,0,{xml:ea,w:ca.width,h:ca.height})}}A=!0}}catch(fa){null!=window.console&&console.error("Error in library dialog: "+fa)}A||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(fa){null!=window.console&&+console.log("Error in library dialog: "+fa)}return null}function K(O){O.dataTransfer.dropEffect=null!=t?"move":"copy";O.stopPropagation();O.preventDefault()}function L(O){O.stopPropagation();O.preventDefault();F=!1;z=D(O);if(null!=t)null!=z&&z<f.children.length?(P.splice(z>t?z-1:z,0,P.splice(t,1)[0]),f.insertBefore(f.children[t],f.children[z])):(P.push(P.splice(t,1)[0]),f.appendChild(f.children[t]));else if(0<O.dataTransfer.files.length)b.importFiles(O.dataTransfer.files,0,0,b.maxImageSize,S(O));+else if(0<=mxUtils.indexOf(O.dataTransfer.types,"text/uri-list")){var N=decodeURIComponent(O.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(N)||/(\.png)($|\?)/i.test(N)||/(\.gif)($|\?)/i.test(N)||/(\.svg)($|\?)/i.test(N))&&b.loadImage(N,function(m){J(N,null,0,0,m.width,m.height);f.scrollTop=f.scrollHeight})}O.stopPropagation();O.preventDefault()}var P=[];l=document.createElement("div");l.style.height="100%";var c=document.createElement("div");c.style.whiteSpace="nowrap";c.style.height="40px";l.appendChild(c);mxUtils.write(c,mxResources.get("filename")+":");null==g&&(g=b.defaultLibraryName+".xml");var e=document.createElement("input");e.setAttribute("value",g);e.style.marginRight="20px";e.style.marginLeft="10px";e.style.width="500px";null==q||q.isRenamable()||e.setAttribute("disabled","true");this.init=function(){if(null==q||q.isRenamable())e.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null)};c.appendChild(e);Editor.enableUncompressedLibraries&&-(e.style.width="420px",g=document.createElement("input"),g.setAttribute("type","checkbox"),g.style.marginRight="10px",c.appendChild(g),mxUtils.write(c,mxResources.get("compressed")));var f=document.createElement("div");f.style.borderWidth="1px 0px 1px 0px";f.style.borderColor="#d3d3d3";f.style.borderStyle="solid";f.style.marginTop="6px";f.style.overflow="auto";f.style.height="340px";f.style.backgroundPosition="center center";f.style.backgroundRepeat="no-repeat";0==Q.length&&Graph.fileSupport&&(f.style.backgroundImage=-"url('"+IMAGE_PATH+"/droptarget.png')");var p=document.createElement("div");p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));l.appendChild(p);var n={},t=null,z=null,E=null;c=function(P){"true"!=mxEvent.getSource(P).getAttribute("contentEditable")&&null!=E&&(E(),E=null,mxEvent.consume(P))};mxEvent.addListener(f,"mousedown",c);mxEvent.addListener(f,"pointerdown",-c);mxEvent.addListener(f,"touchstart",c);var C=new mxUrlConverter,F=!1;if(null!=d)for(c=0;c<d.length;c++)g=d[c],J(g.data,null,0,0,g.w,g.h,g,g.aspect,g.title);mxEvent.addListener(f,"dragleave",function(P){p.style.cursor="";for(var O=mxEvent.getSource(P);null!=O;){if(O==f||O==p){P.stopPropagation();P.preventDefault();break}O=O.parentNode}});var R=function(P){return function(O,m,u,A,B,H,T,k,v){null!=v&&EditorUi.isVisioFilename(v.name)?b.importVisio(v,mxUtils.bind(this,function(G){J(G,m,u,A,B,H,T,"fixed",-mxEvent.isAltDown(P)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," "))})):null!=v&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(O,v.name)?b.isExternalDataComms()?b.parseFile(v,mxUtils.bind(this,function(G){4==G.readyState&&(b.spinner.stop(),200<=G.status&&299>=G.status&&(J(G.responseText,m,u,A,B,H,T,"fixed",mxEvent.isAltDown(P)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),f.scrollTop=f.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):-(J(O,m,u,A,B,H,T,"fixed",mxEvent.isAltDown(P)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),f.scrollTop=f.scrollHeight)}};mxEvent.addListener(f,"dragover",K);mxEvent.addListener(f,"drop",L);mxEvent.addListener(p,"dragover",K);mxEvent.addListener(p,"drop",L);l.appendChild(f);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";b.editor.cancelFirst&&-d.appendChild(c);"draw.io"!=b.getServiceName()||null==q||q.constructor!=DriveLibrary&&q.constructor!=GitHubLibrary||(g=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(q,function(P){if(null!=P){var O=b.getSearch("create title mode url drive splash state clibs ui".split(" "));O+=(0==O.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(P);P=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+O,null,null,null,null,"Check out the library I made using @drawio");-b.showDialog(P.container,450,240,!0);P.init()}else q.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(q.getId(),q)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),g.className="geBtn",d.appendChild(g));g=mxUtils.button(mxResources.get("export"),function(){var P=b.createLibraryDataFromImages(Q),-O=e.value;/(\.xml)$/i.test(O)||(O+=".xml");b.isLocalFileSave()?b.saveLocalFile(P,O,"text/xml",null,null,null!=x?x:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(O)+"&format=xml&xml="+encodeURIComponent(P))).simulate(document,"_blank")});g.setAttribute("id","btnDownload");g.className="geBtn";d.appendChild(g);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var U=document.createElement("input");U.setAttribute("multiple","multiple");U.setAttribute("type","file");mxEvent.addListener(U,-"change",function(P){F=!1;b.importFiles(U.files,0,0,b.maxImageSize,function(O,m,u,A,B,H,T,k,v){null!=U.files&&(R(P)(O,m,u,A,B,H,T,k,v),U.type="",U.type="file",U.value="")});f.scrollTop=f.scrollHeight});U.style.display="none";document.body.appendChild(U);b.libDlgFileInputElt=U}g=mxUtils.button(mxResources.get("import"),function(){null!=E&&(E(),E=null);b.libDlgFileInputElt.click()});g.setAttribute("id","btnAddImage");g.className="geBtn";d.appendChild(g)}g=mxUtils.button(mxResources.get("addImages"),-function(){null!=E&&(E(),E=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(P,O,m){F=!1;if(null!=P){if("data:image/"==P.substring(0,11)){var u=P.indexOf(",");0<u&&(P=P.substring(0,u)+";base64,"+P.substring(u+1))}J(P,null,0,0,O,m);f.scrollTop=f.scrollHeight}})});g.setAttribute("id","btnAddImageUrl");g.className="geBtn";d.appendChild(g);this.saveBtnClickHandler=function(P,O,m,u){b.saveLibrary(P,O,m,u)};g=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=E&&-(E(),E=null);this.saveBtnClickHandler(e.value,Q,q,y)}));g.setAttribute("id","btnSave");g.className="geBtn gePrimaryBtn";d.appendChild(g);b.editor.cancelFirst||d.appendChild(c);l.appendChild(d);this.container=l},EditShapeDialog=function(b,g,l,d,q){d=null!=d?d:300;q=null!=q?q:120;var y=document.createElement("table"),x=document.createElement("tbody");y.style.cellPadding="4px";var D=document.createElement("tr");var J=document.createElement("td");J.setAttribute("colspan","2");J.style.fontSize="10pt";+(e.style.width="420px",g=document.createElement("input"),g.setAttribute("type","checkbox"),g.style.marginRight="10px",c.appendChild(g),mxUtils.write(c,mxResources.get("compressed")));var f=document.createElement("div");f.style.borderWidth="1px 0px 1px 0px";f.style.borderColor="#d3d3d3";f.style.borderStyle="solid";f.style.marginTop="6px";f.style.overflow="auto";f.style.height="340px";f.style.backgroundPosition="center center";f.style.backgroundRepeat="no-repeat";0==P.length&&Graph.fileSupport&&(f.style.backgroundImage=+"url('"+IMAGE_PATH+"/droptarget.png')");var p=document.createElement("div");p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));l.appendChild(p);var n={},t=null,z=null,E=null;c=function(O){"true"!=mxEvent.getSource(O).getAttribute("contentEditable")&&null!=E&&(E(),E=null,mxEvent.consume(O))};mxEvent.addListener(f,"mousedown",c);mxEvent.addListener(f,"pointerdown",+c);mxEvent.addListener(f,"touchstart",c);var C=new mxUrlConverter,F=!1;if(null!=d)for(c=0;c<d.length;c++)g=d[c],J(g.data,null,0,0,g.w,g.h,g,g.aspect,g.title);mxEvent.addListener(f,"dragleave",function(O){p.style.cursor="";for(var N=mxEvent.getSource(O);null!=N;){if(N==f||N==p){O.stopPropagation();O.preventDefault();break}N=N.parentNode}});var S=function(O){return function(N,m,u,A,B,H,T,k,v){null!=v&&EditorUi.isVisioFilename(v.name)?b.importVisio(v,mxUtils.bind(this,function(G){J(G,m,u,A,B,H,T,"fixed",+mxEvent.isAltDown(O)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," "))})):null!=v&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(N,v.name)?b.isExternalDataComms()?b.parseFile(v,mxUtils.bind(this,function(G){4==G.readyState&&(b.spinner.stop(),200<=G.status&&299>=G.status&&(J(G.responseText,m,u,A,B,H,T,"fixed",mxEvent.isAltDown(O)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),f.scrollTop=f.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):+(J(N,m,u,A,B,H,T,"fixed",mxEvent.isAltDown(O)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),f.scrollTop=f.scrollHeight)}};mxEvent.addListener(f,"dragover",K);mxEvent.addListener(f,"drop",L);mxEvent.addListener(p,"dragover",K);mxEvent.addListener(p,"drop",L);l.appendChild(f);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";b.editor.cancelFirst&&+d.appendChild(c);"draw.io"!=b.getServiceName()||null==q||q.constructor!=DriveLibrary&&q.constructor!=GitHubLibrary||(g=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(q,function(O){if(null!=O){var N=b.getSearch("create title mode url drive splash state clibs ui".split(" "));N+=(0==N.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(O);O=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+N,null,null,null,null,"Check out the library I made using @drawio");+b.showDialog(O.container,450,240,!0);O.init()}else q.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(q.getId(),q)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),g.className="geBtn",d.appendChild(g));g=mxUtils.button(mxResources.get("export"),function(){var O=b.createLibraryDataFromImages(P),+N=e.value;/(\.xml)$/i.test(N)||(N+=".xml");b.isLocalFileSave()?b.saveLocalFile(O,N,"text/xml",null,null,null!=x?x:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(N)+"&format=xml&xml="+encodeURIComponent(O))).simulate(document,"_blank")});g.setAttribute("id","btnDownload");g.className="geBtn";d.appendChild(g);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var U=document.createElement("input");U.setAttribute("multiple","multiple");U.setAttribute("type","file");mxEvent.addListener(U,+"change",function(O){F=!1;b.importFiles(U.files,0,0,b.maxImageSize,function(N,m,u,A,B,H,T,k,v){null!=U.files&&(S(O)(N,m,u,A,B,H,T,k,v),U.type="",U.type="file",U.value="")});f.scrollTop=f.scrollHeight});U.style.display="none";document.body.appendChild(U);b.libDlgFileInputElt=U}g=mxUtils.button(mxResources.get("import"),function(){null!=E&&(E(),E=null);b.libDlgFileInputElt.click()});g.setAttribute("id","btnAddImage");g.className="geBtn";d.appendChild(g)}g=mxUtils.button(mxResources.get("addImages"),+function(){null!=E&&(E(),E=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(O,N,m){F=!1;if(null!=O){if("data:image/"==O.substring(0,11)){var u=O.indexOf(",");0<u&&(O=O.substring(0,u)+";base64,"+O.substring(u+1))}J(O,null,0,0,N,m);f.scrollTop=f.scrollHeight}})});g.setAttribute("id","btnAddImageUrl");g.className="geBtn";d.appendChild(g);this.saveBtnClickHandler=function(O,N,m,u){b.saveLibrary(O,N,m,u)};g=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=E&&+(E(),E=null);this.saveBtnClickHandler(e.value,P,q,y)}));g.setAttribute("id","btnSave");g.className="geBtn gePrimaryBtn";d.appendChild(g);b.editor.cancelFirst||d.appendChild(c);l.appendChild(d);this.container=l},EditShapeDialog=function(b,g,l,d,q){d=null!=d?d:300;q=null!=q?q:120;var y=document.createElement("table"),x=document.createElement("tbody");y.style.cellPadding="4px";var D=document.createElement("tr");var J=document.createElement("td");J.setAttribute("colspan","2");J.style.fontSize="10pt";mxUtils.write(J,l);D.appendChild(J);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");var K=document.createElement("textarea");K.style.outline="none";K.style.resize="none";K.style.width=d-200+"px";K.style.height=q+"px";this.textarea=K;this.init=function(){K.focus();K.scrollTop=0};J.appendChild(K);D.appendChild(J);J=document.createElement("td");l=document.createElement("div");l.style.position="relative";l.style.border="1px solid gray";l.style.top="6px";l.style.width="200px";-l.style.height=q+4+"px";l.style.overflow="hidden";l.style.marginBottom="16px";mxEvent.disableContextMenu(l);J.appendChild(l);var L=new Graph(l);L.setEnabled(!1);var Q=b.editor.graph.cloneCell(g);L.addCells([Q]);l=L.view.getState(Q);var c="";null!=l.shape&&null!=l.shape.stencil&&(c=mxUtils.getPrettyXml(l.shape.stencil.desc));mxUtils.write(K,c||"");l=L.getGraphBounds();q=Math.min(160/l.width,(q-40)/l.height);L.view.scaleAndTranslate(q,20/q-l.x,20/q-l.y);D.appendChild(J);x.appendChild(D);D=document.createElement("tr");+l.style.height=q+4+"px";l.style.overflow="hidden";l.style.marginBottom="16px";mxEvent.disableContextMenu(l);J.appendChild(l);var L=new Graph(l);L.setEnabled(!1);var P=b.editor.graph.cloneCell(g);L.addCells([P]);l=L.view.getState(P);var c="";null!=l.shape&&null!=l.shape.stencil&&(c=mxUtils.getPrettyXml(l.shape.stencil.desc));mxUtils.write(K,c||"");l=L.getGraphBounds();q=Math.min(160/l.width,(q-40)/l.height);L.view.scaleAndTranslate(q,20/q-l.x,20/q-l.y);D.appendChild(J);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");J.setAttribute("colspan","2");J.style.paddingTop="2px";J.style.whiteSpace="nowrap";J.setAttribute("align","right");b.isOffline()||(q=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),q.className="geBtn",J.appendChild(q));q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";b.editor.cancelFirst&&J.appendChild(q);var e=function(f,p,n){var t=K.value,z=mxUtils.parseXml(t);t=mxUtils.getPrettyXml(z.documentElement);z=z.documentElement.getElementsByTagName("parsererror");if(null!=z&&0<z.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(n&&b.hideDialog(),z=!f.model.contains(p),!n||z||t!=c){t=Graph.compress(t);f.getModel().beginUpdate();try{if(z){var E=b.editor.graph.getFreeInsertPoint();p.geometry.x=E.x;p.geometry.y=E.y;f.addCell(p)}f.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+t+")",[p])}catch(C){throw C;-}finally{f.getModel().endUpdate()}z&&(f.setSelectionCell(p),f.scrollCellToVisible(p))}};l=mxUtils.button(mxResources.get("preview"),function(){e(L,Q,!1)});l.className="geBtn";J.appendChild(l);l=mxUtils.button(mxResources.get("apply"),function(){e(b.editor.graph,g,!0)});l.className="geBtn gePrimaryBtn";J.appendChild(l);b.editor.cancelFirst||J.appendChild(q);D.appendChild(J);x.appendChild(D);y.appendChild(x);this.container=y},CustomDialog=function(b,g,l,d,q,y,x,D,J,K,L,Q){var c=document.createElement("div");-c.appendChild(g);var e=document.createElement("div");e.style.marginTop=null!=Q?Q:"30px";e.style.textAlign="right";null!=x&&e.appendChild(x);b.isOffline()||null==y||e.appendChild(b.createHelpIcon(y));g=mxUtils.button(J||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});g.className="geBtn";D&&(g.style.display="none");b.editor.cancelFirst&&e.appendChild(g);q=mxUtils.button(q||mxResources.get("ok"),mxUtils.bind(this,function(){K||b.hideDialog(null,null,this.container);if(null!=l){var f=+}finally{f.getModel().endUpdate()}z&&(f.setSelectionCell(p),f.scrollCellToVisible(p))}};l=mxUtils.button(mxResources.get("preview"),function(){e(L,P,!1)});l.className="geBtn";J.appendChild(l);l=mxUtils.button(mxResources.get("apply"),function(){e(b.editor.graph,g,!0)});l.className="geBtn gePrimaryBtn";J.appendChild(l);b.editor.cancelFirst||J.appendChild(q);D.appendChild(J);x.appendChild(D);y.appendChild(x);this.container=y},CustomDialog=function(b,g,l,d,q,y,x,D,J,K,L,P){var c=document.createElement("div");+c.appendChild(g);var e=document.createElement("div");e.style.marginTop=null!=P?P:"30px";e.style.textAlign="right";null!=x&&e.appendChild(x);b.isOffline()||null==y||e.appendChild(b.createHelpIcon(y));g=mxUtils.button(J||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});g.className="geBtn";D&&(g.style.display="none");b.editor.cancelFirst&&e.appendChild(g);q=mxUtils.button(q||mxResources.get("ok"),mxUtils.bind(this,function(){K||b.hideDialog(null,null,this.container);if(null!=l){var f=l();if("string"===typeof f){b.showError(mxResources.get("error"),f);return}}K&&b.hideDialog(null,null,this.container)}));e.appendChild(q);q.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(g);if(null!=L)for(D=0;D<L.length;D++)(function(f,p,n){f=mxUtils.button(f,function(t){p(t)});null!=n&&f.setAttribute("title",n);f.className="geBtn";e.appendChild(f)})(L[D][0],L[D][1],L[D][2]);c.appendChild(e);this.cancelBtn=g;this.okButton=q;this.container=c},BtnDialog=function(b,g,l,d){var q=document.createElement("div");q.style.textAlign="center";var y=document.createElement("p");y.style.fontSize="16pt";y.style.padding="0px";y.style.margin="0px";y.style.color="gray";mxUtils.write(y,mxResources.get("done"));var x="Unknown",D=document.createElement("img");D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.marginRight="10px";g==b.drive?(x=mxResources.get("googleDrive"),D.src=IMAGE_PATH+"/google-drive-logo-white.svg"):g==b.dropbox?(x=mxResources.get("dropbox"),D.src=IMAGE_PATH+"/dropbox-logo-white.svg"):g==b.oneDrive?(x=mxResources.get("oneDrive"),D.src=IMAGE_PATH+"/onedrive-logo-white.svg"):g==b.gitHub?(x=mxResources.get("github"),D.src=IMAGE_PATH+"/github-logo-white.svg"):g==b.gitLab?(x=mxResources.get("gitlab"),D.src=IMAGE_PATH+"/gitlab-logo.svg"):g==b.trello&&(x=mxResources.get("trello"),D.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[x],"You are now authorized in {1}"));l=mxUtils.button(l,d);l.insertBefore(D,l.firstChild);l.style.marginTop="6px";l.className="geBigButton";l.style.fontSize="18px";l.style.padding="14px";q.appendChild(y);q.appendChild(b);q.appendChild(l);this.container=q},FontDialog=function(b,g,l,d,q){function y(E){this.style.border="";13==E.keyCode&&z.click()}var x=document.createElement("table"),D=document.createElement("tbody");x.style.marginTop="8px";var J=document.createElement("tr");var K=document.createElement("td");K.colSpan=2;K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.fontWeight=-"bold";var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-bottom:8px;";L.setAttribute("value","sysfonts");L.setAttribute("type","radio");L.setAttribute("name","current-fontdialog");L.setAttribute("id","fontdialog-sysfonts");K.appendChild(L);var Q=document.createElement("label");Q.setAttribute("for","fontdialog-sysfonts");mxUtils.write(Q,mxResources.get("sysFonts",null,"System Fonts"));K.appendChild(Q);J.appendChild(K);D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");+"bold";var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-bottom:8px;";L.setAttribute("value","sysfonts");L.setAttribute("type","radio");L.setAttribute("name","current-fontdialog");L.setAttribute("id","fontdialog-sysfonts");K.appendChild(L);var P=document.createElement("label");P.setAttribute("for","fontdialog-sysfonts");mxUtils.write(P,mxResources.get("sysFonts",null,"System Fonts"));K.appendChild(P);J.appendChild(K);D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");J.appendChild(K);var c=document.createElement("input");"s"==d&&c.setAttribute("value",g);c.style.marginLeft="4px";c.style.width="250px";c.className="dlg_fontName_s";K=document.createElement("td");K.appendChild(c);J.appendChild(K);D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.whiteSpace=-"nowrap";K.style.fontSize="10pt";K.style.fontWeight="bold";var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","googlefonts");e.setAttribute("type","radio");e.setAttribute("name","current-fontdialog");e.setAttribute("id","fontdialog-googlefonts");K.appendChild(e);Q=document.createElement("label");Q.setAttribute("for","fontdialog-googlefonts");mxUtils.write(Q,mxResources.get("googleFonts",null,"Google Fonts"));K.appendChild(Q);if(!b.isOffline()||-EditorUi.isElectronApp)Q=b.createHelpIcon("https://fonts.google.com/"),K.appendChild(Q);J.appendChild(K);"0"!=urlParams.isGoogleFontsEnabled&&D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");J.appendChild(K);var f=document.createElement("input");"g"==d&&f.setAttribute("value",g);f.style.marginLeft="4px";+"nowrap";K.style.fontSize="10pt";K.style.fontWeight="bold";var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","googlefonts");e.setAttribute("type","radio");e.setAttribute("name","current-fontdialog");e.setAttribute("id","fontdialog-googlefonts");K.appendChild(e);P=document.createElement("label");P.setAttribute("for","fontdialog-googlefonts");mxUtils.write(P,mxResources.get("googleFonts",null,"Google Fonts"));K.appendChild(P);if(!b.isOffline()||+EditorUi.isElectronApp)P=b.createHelpIcon("https://fonts.google.com/"),K.appendChild(P);J.appendChild(K);"0"!=urlParams.isGoogleFontsEnabled&&D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");J.appendChild(K);var f=document.createElement("input");"g"==d&&f.setAttribute("value",g);f.style.marginLeft="4px";f.style.width="250px";f.className="dlg_fontName_g";K=document.createElement("td");K.appendChild(f);J.appendChild(K);"0"!=urlParams.isGoogleFontsEnabled&&D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.fontWeight="bold";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","webfonts");p.setAttribute("type","radio");p.setAttribute("name",-"current-fontdialog");p.setAttribute("id","fontdialog-webfonts");K.appendChild(p);Q=document.createElement("label");Q.setAttribute("for","fontdialog-webfonts");mxUtils.write(Q,mxResources.get("webfonts",null,"Web Fonts"));K.appendChild(Q);J.appendChild(K);Editor.enableWebFonts&&D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontname",+"current-fontdialog");p.setAttribute("id","fontdialog-webfonts");K.appendChild(p);P=document.createElement("label");P.setAttribute("for","fontdialog-webfonts");mxUtils.write(P,mxResources.get("webfonts",null,"Web Fonts"));K.appendChild(P);J.appendChild(K);Editor.enableWebFonts&&D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");J.appendChild(K);var n=document.createElement("input");"w"==d&&(Editor.enableWebFonts?n.setAttribute("value",g):c.setAttribute("value",g));n.style.marginLeft="4px";n.style.width="250px";n.className="dlg_fontName_w";K=document.createElement("td");K.appendChild(n);J.appendChild(K);Editor.enableWebFonts&&D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontUrl",null,"Font URL")+":");J.appendChild(K);var t=document.createElement("input");t.setAttribute("value",l||"");t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontUrl";K=document.createElement("td");K.appendChild(t);J.appendChild(K);Editor.enableWebFonts&&D.appendChild(J);this.init=function(){var E=c;"g"==d?E=f:"w"==d&&Editor.enableWebFonts&&(E=n);E.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null)};J=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.paddingTop="20px";K.style.whiteSpace="nowrap";K.setAttribute("align","right");b.isOffline()||K.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();q()});g.className="geBtn";b.editor.cancelFirst&&K.appendChild(g);var z=mxUtils.button(mxResources.get("apply"),function(){if(L.checked){var E=c.value;var C="s"}else if(e.checked){E=-f.value;var F=Editor.GOOGLE_FONTS+encodeURIComponent(E).replace(/%20/g,"+");C="g"}else p.checked&&(E=n.value,F=t.value,C="w");var R=E;var U=F,P=C,O=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,m=x.querySelector(".dlg_fontName_"+P);null==m||null!=R&&0!=R.length?(m=x.querySelector(".dlg_fontUrl"),null==m||"w"!=P||O.test(U)?R=!0:(m.style.border="1px solid red",R=!1)):(m.style.border="1px solid red",R=!1);R&&(q(E,F,C),b.hideDialog())});z.className="geBtn gePrimaryBtn";+f.value;var F=Editor.GOOGLE_FONTS+encodeURIComponent(E).replace(/%20/g,"+");C="g"}else p.checked&&(E=n.value,F=t.value,C="w");var S=E;var U=F,O=C,N=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,m=x.querySelector(".dlg_fontName_"+O);null==m||null!=S&&0!=S.length?(m=x.querySelector(".dlg_fontUrl"),null==m||"w"!=O||N.test(U)?S=!0:(m.style.border="1px solid red",S=!1)):(m.style.border="1px solid red",S=!1);S&&(q(E,F,C),b.hideDialog())});z.className="geBtn gePrimaryBtn";mxEvent.addListener(c,"keypress",y);mxEvent.addListener(f,"keypress",y);mxEvent.addListener(n,"keypress",y);mxEvent.addListener(t,"keypress",y);mxEvent.addListener(c,"focus",function(){L.setAttribute("checked","checked");L.checked=!0});mxEvent.addListener(f,"focus",function(){e.setAttribute("checked","checked");e.checked=!0});mxEvent.addListener(n,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(t,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});K.appendChild(z);b.editor.cancelFirst||K.appendChild(g);J.appendChild(K);D.appendChild(J);x.appendChild(D);this.container=x};function AspectDialog(b,g,l,d,q){this.aspect={pageId:g||(b.pages?b.pages[0].getId():null),layerIds:l||[]};g=document.createElement("div");var y=document.createElement("h5");y.style.margin="0 0 10px";mxUtils.write(y,mxResources.get("pages"));g.appendChild(y);l=document.createElement("div");l.className="geAspectDlgList";g.appendChild(l);y=document.createElement("h5");y.style.margin="0 0 10px";mxUtils.write(y,mxResources.get("layers"));g.appendChild(y);y=document.createElement("div");y.className="geAspectDlgList";@@ -12671,32 +12671,32 @@ AspectDialog.prototype.createPageItem=function(b,g,l){var d=document.createElemethis.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var y=q.model;y=y.getChildCells(y.getRoot());for(var x=0;x<y.length;x++)this.createLayerItem(y[x],b,q,l)});mxEvent.addListener(d,"click",g);this.aspect.pageId==b&&g()};AspectDialog.prototype.createLayerItem=function(b,g,l,d){g=l.convertValueToString(b)||mxResources.get("background")||"Background";var q=document.createElement("div");q.setAttribute("data-layer-id",b.id);q.className="geAspectDlgListItem";q.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(g)+"</div>";this.layersContainer.appendChild(q);this.createViewer(q.childNodes[0],d,b.id);d=mxUtils.bind(this,function(){0<=q.className.indexOf("geAspectDlgListItemSelected")?(q.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(q.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(q,"click",d);-1!=this.aspect.layerIds.indexOf(b.id)&&d()};-var FilePropertiesDialog=function(b,g){function l(C){var F=K;K=function(R,U){try{C(function(){F(R,U)},U)}catch(P){U(P)}}}var d=document.createElement("table"),q=document.createElement("tbody");d.style.width="100%";d.style.marginTop="8px";d.style.tableLayout="fixed";var y=b.getCurrentFile(),x=null!=y&&null!=y.getTitle()?y.getTitle():b.defaultFilename,D=/(\.png)$/i.test(x),J=/(\.svg)$/i.test(x),K=function(C,F){C()},L=null!=y?y.isLocked():!1;var Q=document.createElement("tr");var c=document.createElement("td");-c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("locked")+":");Q.appendChild(c);var e=document.createElement("input");e.setAttribute("type","checkbox");L&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(e);Q.appendChild(c);q.appendChild(Q);this.init=function(){e.focus()};l(function(C,F){null!=b.fileNode&&L!=e.checked?window.setTimeout(function(){null!=-y&&y.setLocked(e.checked);C()},0):C()});if(D||J){x=1;D=0;Q=b.fileNode;null!=Q&&(Q.hasAttribute("scale")&&(x=parseFloat(Q.getAttribute("scale"))),Q.hasAttribute("border")&&(D=parseInt(Q.getAttribute("border"))));Q=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("zoom")+":");Q.appendChild(c);var f=document.createElement("input");f.setAttribute("value",100*x+"%");f.style.marginLeft="4px";f.style.width="100%";-c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(f);Q.appendChild(c);q.appendChild(Q);Q=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("borderWidth")+":");Q.appendChild(c);var p=document.createElement("input");p.setAttribute("value",D);p.style.marginLeft="4px";p.style.width="100%";c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(p);Q.appendChild(c);q.appendChild(Q);-this.init=this.init||function(){f.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?f.select():document.execCommand("selectAll",!1,null)};l(function(C,F){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(f.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(p.value))),null!=y&&y.fileChanged());C()})}else if(!/(\.html)$/i.test(x)&&!/(\.svg)$/i.test(x)){var n=null!=y?y.isCompressed():Editor.defaultCompressed;Q=document.createElement("tr");c=document.createElement("td");-c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("compressed")+":");Q.appendChild(c);var t=document.createElement("input");t.setAttribute("type","checkbox");n&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(t);Q.appendChild(c);q.appendChild(Q);this.init=this.init||function(){t.focus()};l(function(C,F){null!=b.fileNode&&n!=-t.checked?window.setTimeout(function(){b.fileNode.setAttribute("compressed",t.checked?"true":"false");null!=y&&(y.compressionChanged(t.checked),y.fileChanged());C()},0):C()})}if(null!=y&&y.isRealtimeOptional()){Q=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("realtimeCollaboration")+":");Q.appendChild(c);var z=document.createElement("input");z.setAttribute("type",-"checkbox");var E=y.isRealtimeEnabled();if(E="disabled"!=b.drive.getCustomProperty(y.desc,"collaboration"))z.setAttribute("checked","checked"),z.defaultChecked=!0;l(function(C,F){z.checked!=E?y.setRealtimeEnabled(z.checked,C,F):C()});this.init=null!=this.init?this.init:function(){z.focus()};c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(z);c.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));Q.appendChild(c);q.appendChild(Q)}null!=y&&-"draw.io"==b.getServiceName()&&0<y.getSize()&&"1"!=urlParams.embed&&(Q=document.createElement("tr"),c=document.createElement("td"),c.style.whiteSpace="nowrap",c.style.overflow="hidden",c.style.textOverflow="ellipsis",c.style.fontSize="10pt",mxUtils.write(c,mxResources.get("size")+":"),Q.appendChild(c),c=b.formatFileSize(y.getSize()),x=document.createElement("input"),x.setAttribute("title",c),x.setAttribute("value",c),x.setAttribute("disabled","disabled"),x.style.marginLeft="4px",x.style.width="100%",-c=document.createElement("td"),c.style.whiteSpace="nowrap",c.appendChild(x),Q.appendChild(c),q.appendChild(Q));null!=g&&(Q=document.createElement("tr"),c=document.createElement("td"),c.style.whiteSpace="nowrap",c.style.overflow="hidden",c.style.textOverflow="ellipsis",c.style.fontSize="10pt",mxUtils.write(c,mxResources.get("publicDiagramUrl")+":"),Q.appendChild(c),x=document.createElement("a"),x.setAttribute("href",g),x.setAttribute("title",g),x.style.whiteSpace="nowrap",x.style.overflow="hidden",-x.style.textOverflow="ellipsis",x.style.display="block",x.style.margin="2px 0px 2px 8px",x.style.fontSize="10pt",mxUtils.write(x,g),mxEvent.addListener(x,"click",function(C){b.openLink(g);mxEvent.consume(C)}),c=document.createElement("td"),c.appendChild(x),Q.appendChild(c),q.appendChild(Q));null!=y&&null!=y.fileObject&&null!=y.fileObject.path&&(Q=document.createElement("tr"),c=document.createElement("td"),c.style.whiteSpace="nowrap",c.style.overflow="hidden",c.style.textOverflow="ellipsis",c.style.fontSize=-"10pt",mxUtils.write(c,mxResources.get("pathFilename")+":"),Q.appendChild(c),x=document.createElement("input"),x.setAttribute("title",y.fileObject.path),x.setAttribute("value",y.fileObject.path),x.setAttribute("disabled","disabled"),x.style.marginLeft="4px",x.style.width="100%",c=document.createElement("td"),c.appendChild(x),Q.appendChild(c),q.appendChild(Q));this.init=null!=this.init?this.init:function(){};x=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&-K(function(){b.spinner.stop();b.hideDialog()},function(C){b.spinner.stop();b.handleError(C,mxResources.get("error"))})});x.className="geBtn gePrimaryBtn";Q=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.paddingTop="20px";c.style.whiteSpace="nowrap";c.setAttribute("align","right");D=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});D.className="geBtn";b.editor.cancelFirst&&c.appendChild(D);c.appendChild(x);b.editor.cancelFirst||c.appendChild(D);Q.appendChild(c);-q.appendChild(Q);d.appendChild(q);this.container=d},ConnectionPointsDialog=function(b,g){function l(){null!=q&&q.destroy()}var d=document.createElement("div");d.style.userSelect="none";var q=null;this.init=function(){function y(A,B,H){A=new mxCell("",new mxGeometry(A,B,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");A.vertex=!0;A.cp=!0;A.constObj=H;return Q.addCell(A)}function x(A){A=Q.getSelectionCells();Q.deleteCells(A)}-function D(){var A=parseInt(P.value)||0;A=0>A?0:100<A?100:A;P.value=A;var B=parseInt(m.value)||0;B=0>B?0:100<B?100:B;m.value=B;var H=parseInt(O.value)||0,T=parseInt(u.value)||0;H=new mxConnectionConstraint(new mxPoint(A/100,B/100),!1,null,H,T);A=Q.getConnectionPoint(f,H);B=Q.getSelectionCell();if(null!=B){B.constObj=H;H=B.geometry.clone();T=Q.view.scale;var k=Q.view.translate;H.x=(A.x-3*T)/T-k.x;H.y=(A.y-3*T)/T-k.y;Q.model.setGeometry(B,H)}}function J(A){if(A.constObj)return{x:A.constObj.point.x,-y:A.constObj.point.y,dx:A.constObj.dx,dy:A.constObj.dy};var B=0,H=0,T=c.geometry,k=mxUtils.format((A.geometry.x+3-T.x)/T.width);A=mxUtils.format((A.geometry.y+3-T.y)/T.height);0>k?(B=k*T.width,k=0):1<k&&(B=(k-1)*T.width,k=1);0>A?(H=A*T.height,A=0):1<A&&(H=(A-1)*T.height,A=1);return{x:k,y:A,dx:parseInt(B),dy:parseInt(H)}}function K(A){if(1==Q.getSelectionCount()){var B=Q.getSelectionCell();A&&(B.constObj=null);A=J(B);P.value=100*A.x;m.value=100*A.y;O.value=A.dx;u.value=A.dy;U.style.visibility=""}else U.style.visibility=-"hidden"}var L=document.createElement("div");L.style.width="350px";L.style.height="350px";L.style.overflow="hidden";L.style.border="1px solid lightGray";L.style.boxSizing="border-box";mxEvent.disableContextMenu(L);d.appendChild(L);var Q=new Graph(L);Q.transparentBackground=!1;Q.autoExtend=!1;Q.autoScroll=!1;Q.setGridEnabled(!1);Q.setEnabled(!0);Q.setPanning(!0);Q.setConnectable(!1);Q.setTooltips(!1);Q.minFitScale=null;Q.maxFitScale=null;Q.centerZoom=!0;Q.maxFitScale=2;L=g.geometry;var c=new mxCell(g.value,-new mxGeometry(0,0,L.width,L.height),g.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;fillColor=none;");c.vertex=!0;Q.addCell(c);Q.dblClick=function(A,B){if(null!=B&&B!=c)Q.setSelectionCell(B);else{B=mxUtils.convertPoint(Q.container,mxEvent.getClientX(A),mxEvent.getClientY(A));mxEvent.consume(A);A=Q.view.scale;var H=Q.view.translate;Q.setSelectionCell(y((B.x-3*A)/A-H.x,(B.y-3*A)/A-H.y))}};q=new mxKeyHandler(Q);q.bindKey(46,x);q.bindKey(8,x);Q.getRubberband().isForceRubberbandEvent=-function(A){return 0==A.evt.button&&(null==A.getCell()||A.getCell()==c)};Q.panningHandler.isForcePanningEvent=function(A){return 2==A.evt.button};var e=Q.isCellSelectable;Q.isCellSelectable=function(A){return A==c?!1:e.apply(this,arguments)};Q.getLinkForCell=function(){return null};var f=Q.view.getState(c);L=Q.getAllConnectionConstraints(f);for(var p=0;null!=L&&p<L.length;p++){var n=Q.getConnectionPoint(f,L[p]);y(n.x-3,n.y-3,L[p])}Q.fit(8);Q.center();p=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),-function(){Q.zoomIn()},20);n=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){Q.zoomOut()},20);var t=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==Q.view.scale?(Q.maxFitScale=8,Q.fit(8)):Q.zoomActual();Q.center()},20),z=function(){b.prompt(mxResources.get("gridSize"),Q.gridSize,function(A){!isNaN(A)&&0<A&&(Q.setGridSize(A),Q.setGridEnabled(!0),Q.refresh())})},E=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(A){mxEvent.isShiftDown(A)?-z():(Q.setGridEnabled(!Q.isGridEnabled()),Q.refresh())},20);mxEvent.addListener(E,"dblclick",z);var C=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),x,20);mxUtils.setOpacity(C,10);L=document.createElement("div");L.style.display="flex";L.style.alignItems="center";L.style.paddingTop="6px";L.appendChild(p);L.appendChild(n);L.appendChild(t);L.appendChild(E);L.appendChild(C);d.appendChild(L);var F=document.createElement("input");F.setAttribute("type","number");F.setAttribute("min","1");-F.setAttribute("value","1");F.style.width="45px";F.style.position="relative";F.style.margin="0 4px 0 4px";var R=document.createElement("select");R.style.position="relative";n=["left","right","top","bottom"];for(p=0;p<n.length;p++)t=n[p],E=document.createElement("option"),mxUtils.write(E,mxResources.get(t)),E.value=t,R.appendChild(E);p=mxUtils.button(mxResources.get("add"),function(){var A=parseInt(F.value);A=1>A?1:100<A?100:A;F.value=A;for(var B=R.value,H=c.geometry,T=[],k=0;k<A;k++){switch(B){case "left":var v=-H.x;var G=H.y+(k+1)*H.height/(A+1);break;case "right":v=H.x+H.width;G=H.y+(k+1)*H.height/(A+1);break;case "top":v=H.x+(k+1)*H.width/(A+1);G=H.y;break;case "bottom":v=H.x+(k+1)*H.width/(A+1),G=H.y+H.height}T.push(y(v-3,G-3))}Q.setSelectionCells(T)});p.style.marginLeft="auto";L.appendChild(p);L.appendChild(F);L.appendChild(R);var U=document.createElement("div");U.style.margin="4px 0px 8px 0px";U.style.whiteSpace="nowrap";U.style.height="24px";L=document.createElement("span");mxUtils.write(L,mxResources.get("dx"));-U.appendChild(L);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("min","0");P.setAttribute("max","100");P.style.width="45px";P.style.margin="0 4px 0 4px";U.appendChild(P);mxUtils.write(U,"%");var O=document.createElement("input");O.setAttribute("type","number");O.style.width="45px";O.style.margin="0 4px 0 4px";U.appendChild(O);mxUtils.write(U,"pt");L=document.createElement("span");mxUtils.write(L,mxResources.get("dy"));L.style.marginLeft="12px";U.appendChild(L);-var m=document.createElement("input");m.setAttribute("type","number");m.setAttribute("min","0");m.setAttribute("max","100");m.style.width="45px";m.style.margin="0 4px 0 4px";U.appendChild(m);mxUtils.write(U,"%");var u=document.createElement("input");u.setAttribute("type","number");u.style.width="45px";u.style.margin="0 4px 0 4px";U.appendChild(u);mxUtils.write(U,"pt");d.appendChild(U);K();Q.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<Q.getSelectionCount()?mxUtils.setOpacity(C,60):-mxUtils.setOpacity(C,10);K()});Q.addListener(mxEvent.CELLS_MOVED,K);mxEvent.addListener(P,"change",D);mxEvent.addListener(m,"change",D);mxEvent.addListener(O,"change",D);mxEvent.addListener(u,"change",D);L=mxUtils.button(mxResources.get("cancel"),function(){l();b.hideDialog()});L.className="geBtn";p=mxUtils.button(mxResources.get("apply"),function(){var A=Q.model.cells,B=[],H=[],T;for(T in A){var k=A[T];k.cp&&H.push(J(k))}H.sort(function(v,G){return v.x!=G.x?v.x-G.x:v.y!=G.y?v.y-G.y:v.dx!=G.dx?v.dx-+var FilePropertiesDialog=function(b,g){function l(C){var F=K;K=function(S,U){try{C(function(){F(S,U)},U)}catch(O){U(O)}}}var d=document.createElement("table"),q=document.createElement("tbody");d.style.width="100%";d.style.marginTop="8px";d.style.tableLayout="fixed";var y=b.getCurrentFile(),x=null!=y&&null!=y.getTitle()?y.getTitle():b.defaultFilename,D=/(\.png)$/i.test(x),J=/(\.svg)$/i.test(x),K=function(C,F){C()},L=null!=y?y.isLocked():!1;var P=document.createElement("tr");var c=document.createElement("td");+c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("locked")+":");P.appendChild(c);var e=document.createElement("input");e.setAttribute("type","checkbox");L&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(e);P.appendChild(c);q.appendChild(P);this.init=function(){e.focus()};l(function(C,F){null!=b.fileNode&&L!=e.checked?window.setTimeout(function(){null!=+y&&y.setLocked(e.checked);C()},0):C()});if(D||J){x=1;D=0;P=b.fileNode;null!=P&&(P.hasAttribute("scale")&&(x=parseFloat(P.getAttribute("scale"))),P.hasAttribute("border")&&(D=parseInt(P.getAttribute("border"))));P=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("zoom")+":");P.appendChild(c);var f=document.createElement("input");f.setAttribute("value",100*x+"%");f.style.marginLeft="4px";f.style.width="100%";+c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(f);P.appendChild(c);q.appendChild(P);P=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("borderWidth")+":");P.appendChild(c);var p=document.createElement("input");p.setAttribute("value",D);p.style.marginLeft="4px";p.style.width="100%";c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(p);P.appendChild(c);q.appendChild(P);+this.init=this.init||function(){f.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?f.select():document.execCommand("selectAll",!1,null)};l(function(C,F){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(f.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(p.value))),null!=y&&y.fileChanged());C()})}else if(!/(\.html)$/i.test(x)&&!/(\.svg)$/i.test(x)){var n=null!=y?y.isCompressed():Editor.defaultCompressed;P=document.createElement("tr");c=document.createElement("td");+c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("compressed")+":");P.appendChild(c);var t=document.createElement("input");t.setAttribute("type","checkbox");n&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(t);P.appendChild(c);q.appendChild(P);this.init=this.init||function(){t.focus()};l(function(C,F){null!=b.fileNode&&n!=+t.checked?window.setTimeout(function(){b.fileNode.setAttribute("compressed",t.checked?"true":"false");null!=y&&(y.compressionChanged(t.checked),y.fileChanged());C()},0):C()})}if(null!=y&&y.isRealtimeOptional()){P=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("realtimeCollaboration")+":");P.appendChild(c);var z=document.createElement("input");z.setAttribute("type",+"checkbox");var E=y.isRealtimeEnabled();if(E="disabled"!=b.drive.getCustomProperty(y.desc,"collaboration"))z.setAttribute("checked","checked"),z.defaultChecked=!0;l(function(C,F){z.checked!=E?y.setRealtimeEnabled(z.checked,C,F):C()});this.init=null!=this.init?this.init:function(){z.focus()};c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(z);c.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));P.appendChild(c);q.appendChild(P)}null!=y&&+"draw.io"==b.getServiceName()&&0<y.getSize()&&"1"!=urlParams.embed&&(P=document.createElement("tr"),c=document.createElement("td"),c.style.whiteSpace="nowrap",c.style.overflow="hidden",c.style.textOverflow="ellipsis",c.style.fontSize="10pt",mxUtils.write(c,mxResources.get("size")+":"),P.appendChild(c),c=b.formatFileSize(y.getSize()),x=document.createElement("input"),x.setAttribute("title",c),x.setAttribute("value",c),x.setAttribute("disabled","disabled"),x.style.marginLeft="4px",x.style.width="100%",+c=document.createElement("td"),c.style.whiteSpace="nowrap",c.appendChild(x),P.appendChild(c),q.appendChild(P));null!=g&&(P=document.createElement("tr"),c=document.createElement("td"),c.style.whiteSpace="nowrap",c.style.overflow="hidden",c.style.textOverflow="ellipsis",c.style.fontSize="10pt",mxUtils.write(c,mxResources.get("publicDiagramUrl")+":"),P.appendChild(c),x=document.createElement("a"),x.setAttribute("href",g),x.setAttribute("title",g),x.style.whiteSpace="nowrap",x.style.overflow="hidden",+x.style.textOverflow="ellipsis",x.style.display="block",x.style.margin="2px 0px 2px 8px",x.style.fontSize="10pt",mxUtils.write(x,g),mxEvent.addListener(x,"click",function(C){b.openLink(g);mxEvent.consume(C)}),c=document.createElement("td"),c.appendChild(x),P.appendChild(c),q.appendChild(P));null!=y&&null!=y.fileObject&&null!=y.fileObject.path&&(P=document.createElement("tr"),c=document.createElement("td"),c.style.whiteSpace="nowrap",c.style.overflow="hidden",c.style.textOverflow="ellipsis",c.style.fontSize=+"10pt",mxUtils.write(c,mxResources.get("pathFilename")+":"),P.appendChild(c),x=document.createElement("input"),x.setAttribute("title",y.fileObject.path),x.setAttribute("value",y.fileObject.path),x.setAttribute("disabled","disabled"),x.style.marginLeft="4px",x.style.width="100%",c=document.createElement("td"),c.appendChild(x),P.appendChild(c),q.appendChild(P));this.init=null!=this.init?this.init:function(){};x=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&+K(function(){b.spinner.stop();b.hideDialog()},function(C){b.spinner.stop();b.handleError(C,mxResources.get("error"))})});x.className="geBtn gePrimaryBtn";P=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.paddingTop="20px";c.style.whiteSpace="nowrap";c.setAttribute("align","right");D=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});D.className="geBtn";b.editor.cancelFirst&&c.appendChild(D);c.appendChild(x);b.editor.cancelFirst||c.appendChild(D);P.appendChild(c);+q.appendChild(P);d.appendChild(q);this.container=d},ConnectionPointsDialog=function(b,g){function l(){null!=q&&q.destroy()}var d=document.createElement("div");d.style.userSelect="none";var q=null;this.init=function(){function y(A,B,H){A=new mxCell("",new mxGeometry(A,B,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");A.vertex=!0;A.cp=!0;A.constObj=H;return P.addCell(A)}function x(A){A=P.getSelectionCells();P.deleteCells(A)}+function D(){var A=parseInt(O.value)||0;A=0>A?0:100<A?100:A;O.value=A;var B=parseInt(m.value)||0;B=0>B?0:100<B?100:B;m.value=B;var H=parseInt(N.value)||0,T=parseInt(u.value)||0;H=new mxConnectionConstraint(new mxPoint(A/100,B/100),!1,null,H,T);A=P.getConnectionPoint(f,H);B=P.getSelectionCell();if(null!=B){B.constObj=H;H=B.geometry.clone();T=P.view.scale;var k=P.view.translate;H.x=(A.x-3*T)/T-k.x;H.y=(A.y-3*T)/T-k.y;P.model.setGeometry(B,H)}}function J(A){if(A.constObj)return{x:A.constObj.point.x,+y:A.constObj.point.y,dx:A.constObj.dx,dy:A.constObj.dy};var B=0,H=0,T=c.geometry,k=mxUtils.format((A.geometry.x+3-T.x)/T.width);A=mxUtils.format((A.geometry.y+3-T.y)/T.height);0>k?(B=k*T.width,k=0):1<k&&(B=(k-1)*T.width,k=1);0>A?(H=A*T.height,A=0):1<A&&(H=(A-1)*T.height,A=1);return{x:k,y:A,dx:parseInt(B),dy:parseInt(H)}}function K(A){if(1==P.getSelectionCount()){var B=P.getSelectionCell();A&&(B.constObj=null);A=J(B);O.value=100*A.x;m.value=100*A.y;N.value=A.dx;u.value=A.dy;U.style.visibility=""}else U.style.visibility=+"hidden"}var L=document.createElement("div");L.style.width="350px";L.style.height="350px";L.style.overflow="hidden";L.style.border="1px solid lightGray";L.style.boxSizing="border-box";mxEvent.disableContextMenu(L);d.appendChild(L);var P=new Graph(L);P.transparentBackground=!1;P.autoExtend=!1;P.autoScroll=!1;P.setGridEnabled(!1);P.setEnabled(!0);P.setPanning(!0);P.setConnectable(!1);P.setTooltips(!1);P.minFitScale=null;P.maxFitScale=null;P.centerZoom=!0;P.maxFitScale=2;L=g.geometry;var c=new mxCell(g.value,+new mxGeometry(0,0,L.width,L.height),g.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;fillColor=none;");c.vertex=!0;P.addCell(c);P.dblClick=function(A,B){if(null!=B&&B!=c)P.setSelectionCell(B);else{B=mxUtils.convertPoint(P.container,mxEvent.getClientX(A),mxEvent.getClientY(A));mxEvent.consume(A);A=P.view.scale;var H=P.view.translate;P.setSelectionCell(y((B.x-3*A)/A-H.x,(B.y-3*A)/A-H.y))}};q=new mxKeyHandler(P);q.bindKey(46,x);q.bindKey(8,x);P.getRubberband().isForceRubberbandEvent=+function(A){return 0==A.evt.button&&(null==A.getCell()||A.getCell()==c)};P.panningHandler.isForcePanningEvent=function(A){return 2==A.evt.button};var e=P.isCellSelectable;P.isCellSelectable=function(A){return A==c?!1:e.apply(this,arguments)};P.getLinkForCell=function(){return null};var f=P.view.getState(c);L=P.getAllConnectionConstraints(f);for(var p=0;null!=L&&p<L.length;p++){var n=P.getConnectionPoint(f,L[p]);y(n.x-3,n.y-3,L[p])}P.fit(8);P.center();p=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),+function(){P.zoomIn()},20);n=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){P.zoomOut()},20);var t=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==P.view.scale?(P.maxFitScale=8,P.fit(8)):P.zoomActual();P.center()},20),z=function(){b.prompt(mxResources.get("gridSize"),P.gridSize,function(A){!isNaN(A)&&0<A&&(P.setGridSize(A),P.setGridEnabled(!0),P.refresh())})},E=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(A){mxEvent.isShiftDown(A)?+z():(P.setGridEnabled(!P.isGridEnabled()),P.refresh())},20);mxEvent.addListener(E,"dblclick",z);var C=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),x,20);mxUtils.setOpacity(C,10);L=document.createElement("div");L.style.display="flex";L.style.alignItems="center";L.style.paddingTop="6px";L.appendChild(p);L.appendChild(n);L.appendChild(t);L.appendChild(E);L.appendChild(C);d.appendChild(L);var F=document.createElement("input");F.setAttribute("type","number");F.setAttribute("min","1");+F.setAttribute("value","1");F.style.width="45px";F.style.position="relative";F.style.margin="0 4px 0 4px";var S=document.createElement("select");S.style.position="relative";n=["left","right","top","bottom"];for(p=0;p<n.length;p++)t=n[p],E=document.createElement("option"),mxUtils.write(E,mxResources.get(t)),E.value=t,S.appendChild(E);p=mxUtils.button(mxResources.get("add"),function(){var A=parseInt(F.value);A=1>A?1:100<A?100:A;F.value=A;for(var B=S.value,H=c.geometry,T=[],k=0;k<A;k++){switch(B){case "left":var v=+H.x;var G=H.y+(k+1)*H.height/(A+1);break;case "right":v=H.x+H.width;G=H.y+(k+1)*H.height/(A+1);break;case "top":v=H.x+(k+1)*H.width/(A+1);G=H.y;break;case "bottom":v=H.x+(k+1)*H.width/(A+1),G=H.y+H.height}T.push(y(v-3,G-3))}P.setSelectionCells(T)});p.style.marginLeft="auto";L.appendChild(p);L.appendChild(F);L.appendChild(S);var U=document.createElement("div");U.style.margin="4px 0px 8px 0px";U.style.whiteSpace="nowrap";U.style.height="24px";L=document.createElement("span");mxUtils.write(L,mxResources.get("dx"));+U.appendChild(L);var O=document.createElement("input");O.setAttribute("type","number");O.setAttribute("min","0");O.setAttribute("max","100");O.style.width="45px";O.style.margin="0 4px 0 4px";U.appendChild(O);mxUtils.write(U,"%");var N=document.createElement("input");N.setAttribute("type","number");N.style.width="45px";N.style.margin="0 4px 0 4px";U.appendChild(N);mxUtils.write(U,"pt");L=document.createElement("span");mxUtils.write(L,mxResources.get("dy"));L.style.marginLeft="12px";U.appendChild(L);+var m=document.createElement("input");m.setAttribute("type","number");m.setAttribute("min","0");m.setAttribute("max","100");m.style.width="45px";m.style.margin="0 4px 0 4px";U.appendChild(m);mxUtils.write(U,"%");var u=document.createElement("input");u.setAttribute("type","number");u.style.width="45px";u.style.margin="0 4px 0 4px";U.appendChild(u);mxUtils.write(U,"pt");d.appendChild(U);K();P.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<P.getSelectionCount()?mxUtils.setOpacity(C,60):+mxUtils.setOpacity(C,10);K()});P.addListener(mxEvent.CELLS_MOVED,K);mxEvent.addListener(O,"change",D);mxEvent.addListener(m,"change",D);mxEvent.addListener(N,"change",D);mxEvent.addListener(u,"change",D);L=mxUtils.button(mxResources.get("cancel"),function(){l();b.hideDialog()});L.className="geBtn";p=mxUtils.button(mxResources.get("apply"),function(){var A=P.model.cells,B=[],H=[],T;for(T in A){var k=A[T];k.cp&&H.push(J(k))}H.sort(function(v,G){return v.x!=G.x?v.x-G.x:v.y!=G.y?v.y-G.y:v.dx!=G.dx?v.dx-G.dx:v.dy-G.dy});for(A=0;A<H.length;A++)0<A&&H[A].x==H[A-1].x&&H[A].y==H[A-1].y&&H[A].dx==H[A-1].dx&&H[A].dy==H[A-1].dy||B.push("["+H[A].x+","+H[A].y+",0,"+H[A].dx+","+H[A].dy+"]");b.editor.graph.setCellStyles("points","["+B.join(",")+"]",[g]);l();b.hideDialog()});p.className="geBtn gePrimaryBtn";n=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[g]);l();b.hideDialog()});n.className="geBtn";t=document.createElement("div");t.style.marginTop="10px";t.style.textAlign="right";b.isOffline()||t.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&t.appendChild(L);t.appendChild(n);t.appendChild(p);b.editor.cancelFirst||t.appendChild(L);d.appendChild(t)};this.destroy=l;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";@@ -12778,33 +12778,33 @@ type:"bool",defVal:!1,isVisible:function(k,v){v=v.editorUi.editor.graph.model;redefVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(k,v){var G=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||v.editorUi.editor.graph.isSwimlane(k.vertices[0])||null==G||G==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(k,v){return 0<k.vertices.length&&v.editorUi.editor.graph.isContainer(k.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## An optional data object can be specified to define the metadata for the connector.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto, width or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,[email protected],default,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';-Editor.createRoughCanvas=function(k){var v=rough.canvas({getContext:function(){return k}});v.draw=function(G){var I=G.sets||[];G=G.options||this.getDefaultOptions();for(var M=0;M<I.length;M++){var N=I[M];switch(N.type){case "path":null!=G.stroke&&this._drawToContext(k,N,G);break;case "fillPath":this._drawToContext(k,N,G);break;case "fillSketch":this.fillSketch(k,N,G)}}};v.fillSketch=function(G,I,M){var N=k.state.strokeColor,S=k.state.strokeWidth,V=k.state.strokeAlpha,W=k.state.dashed,X=M.fillWeight;-0>X&&(X=M.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(M.fill||"");k.setStrokeWidth(X);k.setDashed(!1);this._drawToContext(G,I,M);k.setDashed(W);k.setStrokeWidth(S);k.setStrokeColor(N);k.setStrokeAlpha(V)};v._drawToContext=function(G,I,M){G.begin();for(var N=0;N<I.ops.length;N++){var S=I.ops[N],V=S.data;switch(S.op){case "move":G.moveTo(V[0],V[1]);break;case "bcurveTo":G.curveTo(V[0],V[1],V[2],V[3],V[4],V[5]);break;case "lineTo":G.lineTo(V[0],V[1])}}G.end();"fillPath"===I.type&&-M.filled?G.fill():G.stroke()};return v};(function(){function k(N,S,V){this.canvas=N;this.rc=S;this.shape=V;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=+Editor.createRoughCanvas=function(k){var v=rough.canvas({getContext:function(){return k}});v.draw=function(G){var I=G.sets||[];G=G.options||this.getDefaultOptions();for(var M=0;M<I.length;M++){var R=I[M];switch(R.type){case "path":null!=G.stroke&&this._drawToContext(k,R,G);break;case "fillPath":this._drawToContext(k,R,G);break;case "fillSketch":this.fillSketch(k,R,G)}}};v.fillSketch=function(G,I,M){var R=k.state.strokeColor,Q=k.state.strokeWidth,W=k.state.strokeAlpha,V=k.state.dashed,X=M.fillWeight;+0>X&&(X=M.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(M.fill||"");k.setStrokeWidth(X);k.setDashed(!1);this._drawToContext(G,I,M);k.setDashed(V);k.setStrokeWidth(Q);k.setStrokeColor(R);k.setStrokeAlpha(W)};v._drawToContext=function(G,I,M){G.begin();for(var R=0;R<I.ops.length;R++){var Q=I.ops[R],W=Q.data;switch(Q.op){case "move":G.moveTo(W[0],W[1]);break;case "bcurveTo":G.curveTo(W[0],W[1],W[2],W[3],W[4],W[5]);break;case "lineTo":G.lineTo(W[0],W[1])}}G.end();"fillPath"===I.type&&+M.filled?G.fill():G.stroke()};return v};(function(){function k(R,Q,W){this.canvas=R;this.rc=Q;this.shape=W;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,k.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,k.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,k.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,k.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,k.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,k.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,k.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,k.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,k.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,k.prototype.fillAndStroke);-this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(N,S){var V=1;if(null!=this.shape.state){var W=this.shape.state.cell.id;if(null!=W)for(var X=0;X<W.length;X++)V=(V<<5)-V+W.charCodeAt(X)<<0}V={strokeWidth:this.canvas.state.strokeWidth,seed:V,preserveVertices:!0};W=this.rc.getDefaultOptions();V.stroke=N?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:-mxConstants.NONE;N=null;(V.filled=S)?(V.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,N=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):V.fill="";V.bowing=mxUtils.getValue(this.shape.style,"bowing",W.bowing);V.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",W.hachureAngle);V.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",W.curveFitting);V.roughness=mxUtils.getValue(this.shape.style,"jiggle",-W.roughness);V.simplification=mxUtils.getValue(this.shape.style,"simplification",W.simplification);V.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",W.disableMultiStroke);V.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",W.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);V.hachureGap="auto"==S?-1:S;V.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);V.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",-S);V.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);V.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==S&&(S="auto");"auto"==S&&(S=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&S.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&S.push(mxUtils.hex2rgb(Editor.darkColor)),S=null!=V.fill&&(null!=N||0<=mxUtils.indexOf(S,mxUtils.hex2rgb(V.fill)))?-"solid":W.fillStyle);V.fillStyle=S;return V};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var N=2;N<arguments.length;N+=2)this.lastX=arguments[N-1],this.lastY=arguments[N],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};-k.prototype.lineTo=function(N,S){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,N,S),this.lastX=N,this.lastY=S)};k.prototype.moveTo=function(N,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,N,S),this.lastX=N,this.lastY=S,this.firstX=N,this.firstY=S)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(N,S,V,W){this.passThrough?-this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,N,S,V,W),this.lastX=V,this.lastY=W)};k.prototype.curveTo=function(N,S,V,W,X,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,N,S,V,W,X,Z),this.lastX=X,this.lastY=Z)};k.prototype.arcTo=function(N,S,V,W,X,Z,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ba=mxUtils.arcToCurves(this.lastX,this.lastY,N,S,V,W,X,Z,Y);if(null!=ba)for(var ea=0;ea<ba.length;ea+=-6)this.curveTo(ba[ea],ba[ea+1],ba[ea+2],ba[ea+3],ba[ea+4],ba[ea+5]);this.lastX=Z;this.lastY=Y}};k.prototype.rect=function(N,S,V,W){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(N,S,V,W,this.getStyle(!0,!0)))};k.prototype.ellipse=function(N,S,V,W){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(N+V/2,S+W/2,V,W,this.getStyle(!0,!0)))};k.prototype.roundrect=-function(N,S,V,W,X,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(N+X,S),this.lineTo(N+V-X,S),this.quadTo(N+V,S,N+V,S+Z),this.lineTo(N+V,S+W-Z),this.quadTo(N+V,S+W,N+V-X,S+W),this.lineTo(N+X,S+W),this.quadTo(N,S+W,N,S+W-Z),this.lineTo(N,S+Z),this.quadTo(N,S,N+X,S))};k.prototype.drawPath=function(N){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),N)}catch(V){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in N)this.nextShape.options[S]=-N[S];N.stroke!=mxConstants.NONE&&null!=N.stroke||delete this.nextShape.options.stroke;N.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?+this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(R,Q){var W=1;if(null!=this.shape.state){var V=this.shape.state.cell.id;if(null!=V)for(var X=0;X<V.length;X++)W=(W<<5)-W+V.charCodeAt(X)<<0}W={strokeWidth:this.canvas.state.strokeWidth,seed:W,preserveVertices:!0};V=this.rc.getDefaultOptions();W.stroke=R?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:+mxConstants.NONE;R=null;(W.filled=Q)?(W.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,R=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):W.fill="";W.bowing=mxUtils.getValue(this.shape.style,"bowing",V.bowing);W.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",V.hachureAngle);W.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",V.curveFitting);W.roughness=mxUtils.getValue(this.shape.style,"jiggle",+V.roughness);W.simplification=mxUtils.getValue(this.shape.style,"simplification",V.simplification);W.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",V.disableMultiStroke);W.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",V.disableMultiStrokeFill);Q=mxUtils.getValue(this.shape.style,"hachureGap",-1);W.hachureGap="auto"==Q?-1:Q;W.dashGap=mxUtils.getValue(this.shape.style,"dashGap",Q);W.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",+Q);W.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",Q);Q=mxUtils.getValue(this.shape.style,"fillWeight",-1);W.fillWeight="auto"==Q?-1:Q;Q=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==Q&&(Q="auto");"auto"==Q&&(Q=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&Q.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&Q.push(mxUtils.hex2rgb(Editor.darkColor)),Q=null!=W.fill&&(null!=R||0<=mxUtils.indexOf(Q,mxUtils.hex2rgb(W.fill)))?+"solid":V.fillStyle);W.fillStyle=Q;return W};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var R=2;R<arguments.length;R+=2)this.lastX=arguments[R-1],this.lastY=arguments[R],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};+k.prototype.lineTo=function(R,Q){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,R,Q),this.lastX=R,this.lastY=Q)};k.prototype.moveTo=function(R,Q){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,R,Q),this.lastX=R,this.lastY=Q,this.firstX=R,this.firstY=Q)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(R,Q,W,V){this.passThrough?+this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,R,Q,W,V),this.lastX=W,this.lastY=V)};k.prototype.curveTo=function(R,Q,W,V,X,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,R,Q,W,V,X,Z),this.lastX=X,this.lastY=Z)};k.prototype.arcTo=function(R,Q,W,V,X,Z,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ba=mxUtils.arcToCurves(this.lastX,this.lastY,R,Q,W,V,X,Z,Y);if(null!=ba)for(var ea=0;ea<ba.length;ea+=+6)this.curveTo(ba[ea],ba[ea+1],ba[ea+2],ba[ea+3],ba[ea+4],ba[ea+5]);this.lastX=Z;this.lastY=Y}};k.prototype.rect=function(R,Q,W,V){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(R,Q,W,V,this.getStyle(!0,!0)))};k.prototype.ellipse=function(R,Q,W,V){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(R+W/2,Q+V/2,W,V,this.getStyle(!0,!0)))};k.prototype.roundrect=+function(R,Q,W,V,X,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(R+X,Q),this.lineTo(R+W-X,Q),this.quadTo(R+W,Q,R+W,Q+Z),this.lineTo(R+W,Q+V-Z),this.quadTo(R+W,Q+V,R+W-X,Q+V),this.lineTo(R+X,Q+V),this.quadTo(R,Q+V,R,Q+V-Z),this.lineTo(R,Q+Z),this.quadTo(R,Q,R+X,Q))};k.prototype.drawPath=function(R){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),R)}catch(W){}this.passThrough=!1}else if(null!=this.nextShape){for(var Q in R)this.nextShape.options[Q]=+R[Q];R.stroke!=mxConstants.NONE&&null!=R.stroke||delete this.nextShape.options.stroke;R.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};k.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;-this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(N){return new k(N,Editor.createRoughCanvas(N),this)};var v=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(N){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?v.apply(this,arguments):"comic"==mxUtils.getValue(this.style,-"sketchStyle","rough")?this.createComicCanvas(N):this.createRoughCanvas(N)};var G=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(N,S,V,W,X){null!=N.handJiggle&&N.handJiggle.passThrough||G.apply(this,arguments)};var I=mxShape.prototype.paint;mxShape.prototype.paint=function(N){var S=N.addTolerance,V=!0;null!=this.style&&(V="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=N.handJiggle&&N.handJiggle.constructor==k&&!this.outline){N.save();-var W=this.fill,X=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,Y=N.setStrokeColor;N.setStrokeColor=function(){};var ba=N.setFillColor;N.setFillColor=function(){};V||null==W||(this.configurePointerEvents=function(){});N.handJiggle.passThrough=!0;I.apply(this,arguments);N.handJiggle.passThrough=!1;N.setFillColor=ba;N.setStrokeColor=Y;this.configurePointerEvents=Z;this.stroke=X;this.fill=W;N.restore();V&&null!=W&&(N.addTolerance=function(){})}I.apply(this,arguments);N.addTolerance=-S};var M=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(N,S,V,W,X,Z){null!=N.handJiggle&&N.handJiggle.constructor==k?(N.handJiggle.passThrough=!0,M.apply(this,arguments),N.handJiggle.passThrough=!1):M.apply(this,arguments)}})();Editor.fastCompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),-{to:"string"})};Editor.extractGraphModel=function(k,v,G){if(null!=k&&"undefined"!==typeof pako){var I=k.ownerDocument.getElementsByTagName("div"),M=[];if(null!=I&&0<I.length)for(var N=0;N<I.length;N++)if("mxgraph"==I[N].getAttribute("class")){M.push(I[N]);break}0<M.length&&(I=M[0].getAttribute("data-mxgraph"),null!=I?(M=JSON.parse(I),null!=M&&null!=M.xml&&(k=mxUtils.parseXml(M.xml),k=k.documentElement)):(M=M[0].getElementsByTagName("div"),0<M.length&&(I=mxUtils.getTextContent(M[0]),I=Graph.decompress(I,+this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(R){return new k(R,Editor.createRoughCanvas(R),this)};var v=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(R){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?v.apply(this,arguments):"comic"==mxUtils.getValue(this.style,+"sketchStyle","rough")?this.createComicCanvas(R):this.createRoughCanvas(R)};var G=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(R,Q,W,V,X){null!=R.handJiggle&&R.handJiggle.passThrough||G.apply(this,arguments)};var I=mxShape.prototype.paint;mxShape.prototype.paint=function(R){var Q=R.addTolerance,W=!0;null!=this.style&&(W="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=R.handJiggle&&R.handJiggle.constructor==k&&!this.outline){R.save();+var V=this.fill,X=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,Y=R.setStrokeColor;R.setStrokeColor=function(){};var ba=R.setFillColor;R.setFillColor=function(){};W||null==V||(this.configurePointerEvents=function(){});R.handJiggle.passThrough=!0;I.apply(this,arguments);R.handJiggle.passThrough=!1;R.setFillColor=ba;R.setStrokeColor=Y;this.configurePointerEvents=Z;this.stroke=X;this.fill=V;R.restore();W&&null!=V&&(R.addTolerance=function(){})}I.apply(this,arguments);R.addTolerance=+Q};var M=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(R,Q,W,V,X,Z){null!=R.handJiggle&&R.handJiggle.constructor==k?(R.handJiggle.passThrough=!0,M.apply(this,arguments),R.handJiggle.passThrough=!1):M.apply(this,arguments)}})();Editor.fastCompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),+{to:"string"})};Editor.extractGraphModel=function(k,v,G){if(null!=k&&"undefined"!==typeof pako){var I=k.ownerDocument.getElementsByTagName("div"),M=[];if(null!=I&&0<I.length)for(var R=0;R<I.length;R++)if("mxgraph"==I[R].getAttribute("class")){M.push(I[R]);break}0<M.length&&(I=M[0].getAttribute("data-mxgraph"),null!=I?(M=JSON.parse(I),null!=M&&null!=M.xml&&(k=mxUtils.parseXml(M.xml),k=k.documentElement)):(M=M[0].getElementsByTagName("div"),0<M.length&&(I=mxUtils.getTextContent(M[0]),I=Graph.decompress(I,null,G),0<I.length&&(k=mxUtils.parseXml(I),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(I=k.getAttribute("content"),null!=I&&"<"!=I.charAt(0)&&"%"!=I.charAt(0)&&(I=unescape(window.atob?atob(I):Base64.decode(cont,I))),null!=I&&"%"==I.charAt(0)&&(I=decodeURIComponent(I)),null!=I&&0<I.length)k=mxUtils.parseXml(I).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||v||(M=null,"diagram"==k.nodeName?M=k:"mxfile"==k.nodeName&&(I=k.getElementsByTagName("diagram"),0<I.length&&(M=I[Math.max(0,Math.min(I.length-1,urlParams.page||0))])),null!=M&&(k=Editor.parseDiagramNode(M,G)));null==k||"mxGraphModel"==k.nodeName||v&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,v,G){Editor.validateDiagramNode(k);var I=mxUtils.trim(mxUtils.getTextContent(k)),M=null;0<I.length?(v=Graph.decompress(I,null,v),null!=v&&0<v.length&&(M=mxUtils.parseXml(v).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(M=k[0],G&&(M=Editor.parseDiagramNode(M,v,!1)),v=mxUtils.createXmlDocument(),v.appendChild(v.importNode(M,!0)),M=v.documentElement));return M};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var v=mxUtils.getNodeValue(k),G=null;0<v.length?G=Graph.decompress(v):(k=k.getElementsByTagName("mxGraphModel"),null!=k&&0<k.length&&(G=mxUtils.getXml(k[0])));return G};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var v=new mxCodec,G=new mxGraphModel;k.appendChild(v.encode(G))}return k};Editor.extractGraphModelFromPdf=function(k){var v=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var G=k.indexOf("EmbeddedFile");if(-1<G){var I=k.indexOf("stream",G)+9;if(0<k.substring(G,I).indexOf("application#2Fvnd.jgraph.mxfile")){var M=k.indexOf("endstream",I-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(I,M)),{to:"string"})}}for(G=k.indexOf("/ObjStm");0<G;){I=-k.indexOf("stream",G)+9;M=k.indexOf("endstream",I-1);I=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(I,M)),{to:"string"});M=I.indexOf("/Subject <");if(0<M){G=I.substring(M+14,I.indexOf(">",M));if(null!=G){v=G;G=[];for(I=0;I<v.length;I+=2)M=v.substr(I,2),"00"!=M&&G.push(String.fromCharCode(parseInt(M,16)));v=G.join("")}break}G=k.indexOf("/ObjStm",G+1)}}if(null==v&&"%PDF-1.4"==k.substring(0,8)){G="";M=I=0;for(var N=[],S=null;M<k.length;){var V=k.charCodeAt(M);M+=1;10!=V&&(G+=String.fromCharCode(V));-V=="/Subject (%3Cmxfile".charCodeAt(I)?I++:I=0;if(19==I){var W=k.indexOf("%3C%2Fmxfile%3E",M)+15;M-=9;if(W>M){v=k.substring(M,W);break}}10==V&&("endobj"==G?S=null:"obj"==G.substring(G.length-3,G.length)||"xref"==G||"trailer"==G?(S=[],N[G.split(" ")[0]]=S):null!=S&&S.push(G),G="")}}null==v&&null!=N&&(v=Editor.extractGraphModelFromXref(N));null!=v&&(v=decodeURIComponent(v.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return v};Editor.extractGraphModelFromXref=function(k){var v=k.trailer,G=null;null!=+k.indexOf("stream",G)+9;M=k.indexOf("endstream",I-1);I=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(I,M)),{to:"string"});M=I.indexOf("/Subject <");if(0<M){G=I.substring(M+14,I.indexOf(">",M));if(null!=G){v=G;G=[];for(I=0;I<v.length;I+=2)M=v.substr(I,2),"00"!=M&&G.push(String.fromCharCode(parseInt(M,16)));v=G.join("")}break}G=k.indexOf("/ObjStm",G+1)}}if(null==v&&"%PDF-1.4"==k.substring(0,8)){G="";M=I=0;for(var R=[],Q=null;M<k.length;){var W=k.charCodeAt(M);M+=1;10!=W&&(G+=String.fromCharCode(W));+W=="/Subject (%3Cmxfile".charCodeAt(I)?I++:I=0;if(19==I){var V=k.indexOf("%3C%2Fmxfile%3E",M)+15;M-=9;if(V>M){v=k.substring(M,V);break}}10==W&&("endobj"==G?Q=null:"obj"==G.substring(G.length-3,G.length)||"xref"==G||"trailer"==G?(Q=[],R[G.split(" ")[0]]=Q):null!=Q&&Q.push(G),G="")}}null==v&&null!=R&&(v=Editor.extractGraphModelFromXref(R));null!=v&&(v=decodeURIComponent(v.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return v};Editor.extractGraphModelFromXref=function(k){var v=k.trailer,G=null;null!=v&&(v=/.* \/Info (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(v=k[v[1]],null!=v&&(v=/.* \/Subject (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(k=k[v[1]],null!=k&&(k=k.join("\n"),G=k.substring(1,k.length-1))))));return G};Editor.extractParserError=function(k,v){var G=null;k=null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(G=v||mxResources.get("invalidChars"),v=k[0].getElementsByTagName("div"),0<v.length&&(G=mxUtils.getTextContent(v[0])));return null!=G?mxUtils.trim(G):G};Editor.addRetryToError=function(k,v){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=v))};Editor.mermaidToDrawio=function(k,v,G){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,v,G)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=k.version;k.debug&&(urlParams.test="1");null!=k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);null!=k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);null!=k.selectParentLayer&&(Graph.selectParentLayer=k.selectParentLayer);null!=k.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=k.autosaveDelay);null!=k.templateFile&&(EditorUi.templateFile=@@ -12831,41 +12831,41 @@ M.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.gv);null!=I&&G.setAttribute("backgroundImage",JSON.stringify(I));G.setAttribute("math",this.graph.mathEnabled?"1":"0");G.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?G.setAttribute("adaptiveColors",this.graph.adaptiveColors):G.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(I=this.graph.extFonts.map(function(M){return M.name+"^"+M.url}),G.setAttribute("extFonts",I.join("|")));return G};Editor.prototype.isDataSvg=function(k){try{var v=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=v&&(null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(cont,v))),null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v)),null!=v&&0<v.length)){var G=mxUtils.parseXml(v).documentElement;return"mxfile"==G.nodeName||"mxGraphModel"==G.nodeName}}catch(I){}return!1};Editor.prototype.extractGraphModel=function(k,v,G){return Editor.extractGraphModel.apply(this,arguments)};var l=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();l.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);this.graph.useCssTransforms=-!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,v){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var G=function(){I=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var I=null;Editor.doMathJaxRender=function(S){try{null==I?(MathJax.typesetClear([S]),-MathJax.typeset([S]),G()):I!=S&&Editor.mathJaxQueue.push(S)}catch(V){MathJax.typesetClear([S]),null!=V.retry?(I=S,V.retry.then(function(){MathJax.typesetPromise([S]).then(G)["catch"](function(W){console.log("Error in MathJax.typesetPromise: "+W.toString());G()})})["catch"](function(W){console.log("Error in MathJax.retry: "+W.toString());G()})):null!=window.console&&console.log("Error in MathJax.typeset: "+V.toString())}};window.MathJax=null!=v?v:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},-loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var S=0;S<Editor.mathJaxQueue.length;S++)Editor.doMathJaxRender(Editor.mathJaxQueue[S])}}};Editor.MathJaxRender=function(S){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(S):Editor.mathJaxQueue.push(S)};Editor.onMathJaxDone=function(){};var M=Editor.prototype.init;Editor.prototype.init=function(){M.apply(this,-arguments);var S=mxUtils.bind(this,function(V,W){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,S);this.graph.addListener(mxEvent.REFRESH,S)};v=document.getElementsByTagName("script");if(null!=v&&0<v.length){var N=document.createElement("script");N.setAttribute("type","text/javascript");N.setAttribute("src",k);v[0].parentNode.appendChild(N)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var v=-"",G=[""],I=0,M=!0,N;k=$jscomp.makeIterator(k);for(N=k.next();!N.done;N=k.next())N=N.value,'"'===N?(M&&N===v&&(G[I]+=N),M=!M):","===N&&M?N=G[++I]="":G[I]+=N,v=N;return G}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var v=EditorUi.isVisioFilename(k);v=/\.png$/i.test(k)||/\.pdf$/i.test(k)||v;var G="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)++!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,v){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var G=function(){I=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var I=null;Editor.doMathJaxRender=function(Q){try{null==I?(MathJax.typesetClear([Q]),+MathJax.typeset([Q]),G()):I!=Q&&Editor.mathJaxQueue.push(Q)}catch(W){MathJax.typesetClear([Q]),null!=W.retry?(I=Q,W.retry.then(function(){MathJax.typesetPromise([Q]).then(G)["catch"](function(V){console.log("Error in MathJax.typesetPromise: "+V.toString());G()})})["catch"](function(V){console.log("Error in MathJax.retry: "+V.toString());G()})):null!=window.console&&console.log("Error in MathJax.typeset: "+W.toString())}};window.MathJax=null!=v?v:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},+loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var Q=0;Q<Editor.mathJaxQueue.length;Q++)Editor.doMathJaxRender(Editor.mathJaxQueue[Q])}}};Editor.MathJaxRender=function(Q){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(Q):Editor.mathJaxQueue.push(Q)};Editor.onMathJaxDone=function(){};var M=Editor.prototype.init;Editor.prototype.init=function(){M.apply(this,+arguments);var Q=mxUtils.bind(this,function(W,V){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,Q);this.graph.addListener(mxEvent.REFRESH,Q)};v=document.getElementsByTagName("script");if(null!=v&&0<v.length){var R=document.createElement("script");R.setAttribute("type","text/javascript");R.setAttribute("src",k);v[0].parentNode.appendChild(R)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var v=+"",G=[""],I=0,M=!0,R;k=$jscomp.makeIterator(k);for(R=k.next();!R.done;R=k.next())R=R.value,'"'===R?(M&&R===v&&(G[I]+=R),M=!M):","===R&&M?R=G[++I]="":G[I]+=R,v=R;return G}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var v=EditorUi.isVisioFilename(k);v=/\.png$/i.test(k)||/\.pdf$/i.test(k)||v;var G="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+G+(v?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var v=k.convert,G=this;k.convert=function(I){null!=I&&navigator.onLine&&("http://"!=I.substring(0,7)&&"https://"!=I.substring(0,8)||I.substring(0,k.baseUrl.length)==k.baseUrl||G.crossOriginImages&&G.isCorsEnabledForUrl(I)?"chrome-extension://"!=I.substring(0,19)&&(I=v.apply(this,arguments)):I=PROXY_URL+"?url="+encodeURIComponent(I));return I};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+-btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,v,G,I,M){try{var N=!0,S=window.setTimeout(mxUtils.bind(this,function(){N=!1;v(k)}),this.timeout),V=mxUtils.bind(this,function(){null!=I?this.convertImageToDataUri(k,v,G,I,!0):v(k)});if(/(\.svg)$/i.test(k)&&!M)mxUtils.get(k,mxUtils.bind(this,function(X){window.clearTimeout(S);N&&(200>X.getStatus()||299<X.getStatus()?V():v(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(S);-N&&V()}));else{var W=new Image;this.crossOriginImages&&(W.crossOrigin="anonymous");W.onload=function(){window.clearTimeout(S);if(N)try{I=null!=I&&M?I:1;var X=document.createElement("canvas"),Z=X.getContext("2d");Z.scale(I,I);X.height=W.height*I;X.width=W.width*I;Z.drawImage(W,0,0);v(X.toDataURL())}catch(Y){v(k)}};W.onerror=function(){window.clearTimeout(S);N&&(null!=G?G():v(k))};W.src=k}}catch(X){null!=G?G():v(k)}};Editor.prototype.convertImages=function(k,v,G,I){function M(){0<N.length?N.shift()():-v(k)}null==I&&(I=this.createImageUrlConverter());var N=[],S=G||{};G=mxUtils.bind(this,function(V,W){V=k.getElementsByTagName(V);for(var X=0;X<V.length;X++)mxUtils.bind(this,function(Z){N.push(mxUtils.bind(this,function(){try{if(null!=Z){var Y=I.convert(Z.getAttribute(W));if(null!=Y&&"data:"!=Y.substring(0,5)){var ba=S[Y];null==ba?this.convertImageToDataUri(Y,function(ea){null!=ea&&(S[Y]=ea,Z.setAttribute(W,ea));M()},null,Editor.svgRasterScale):(Z.setAttribute(W,ba),M())}else null!=Y&&Z.setAttribute(W,-Y),M()}}catch(ea){M()}}))})(V[X])});G("image","xlink:href");G("img","src");M()};Editor.base64Encode=function(k){for(var v="",G=0,I=k.length,M,N,S;G<I;){M=k.charCodeAt(G++)&255;if(G==I){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4);v+="==";break}N=k.charCodeAt(G++);if(G==I){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&-3)<<4|(N&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&15)<<2);v+="=";break}S=k.charCodeAt(G++);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4|(N&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&15)<<2|(S&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return v};-Editor.prototype.loadUrl=function(k,v,G,I,M,N,S,V){try{var W=!S&&(I||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));M=null!=M?M:!0;var X=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=v){var Y=Z.getText();if(W){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();-Y=Array(Z.length);for(var ba=0;ba<Z.length;ba++)Y[ba]=String.fromCharCode(Z[ba]);Y=Y.join("")}N=null!=N?N:"data:image/png;base64,";Y=N+Editor.base64Encode(Y)}v(Y)}}else null!=G&&(0==Z.getStatus()?G({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?G({message:mxResources.get("fileNotFound"),code:Z.getStatus()},Z):G({message:this.getErrorMessage(Z)},Z))}),function(Z){null!=G&&G({message:mxResources.get("error")+" "+Z.getStatus()})},W,this.timeout,function(){M&&null!=G&&G({code:App.ERROR_TIMEOUT,-retry:X})},V)});X()}catch(Z){null!=G&&G(Z)}};Editor.prototype.getErrorMessage=function(k){var v=mxResources.get("error")+" "+k.getStatus();try{var G=k.getText(),I=JSON.parse(G);null!=I&&null!=I.error&&null!=I.error.message&&(v=I.error.message+" ("+v+")")}catch(M){}return v};Editor.prototype.absoluteCssFonts=function(k){var v=null;if(null!=k){var G=k.split("url(");if(0<G.length){v=[G[0]];k=window.location.pathname;var I=null!=k?k.lastIndexOf("/"):-1;0<=I&&(k=k.substring(0,I+1));I=document.getElementsByTagName("base");-var M=null;null!=I&&0<I.length&&(M=I[0].getAttribute("href"));for(var N=1;N<G.length;N++)if(I=G[N].indexOf(")"),0<I){var S=Editor.trimCssUrl(G[N].substring(0,I));this.graph.isRelativeUrl(S)&&(S=null!=M?M+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":k)+S);v.push('url("'+S+'"'+G[N].substring(I))}else v.push(G[N])}else v=[k]}return null!=v?v.join(""):null};Editor.prototype.mapFontUrl=function(k,v,G){/^https?:\/\//.test(v)&&!this.isCorsEnabledForUrl(v)&&(v=PROXY_URL+"?url="+-encodeURIComponent(v));G(k,v)};Editor.prototype.embedCssFonts=function(k,v){var G=k.split("url("),I=0;null==this.cachedFonts&&(this.cachedFonts={});var M=mxUtils.bind(this,function(){if(0==I){for(var W=[G[0]],X=1;X<G.length;X++){var Z=G[X].indexOf(")");W.push('url("');W.push(this.cachedFonts[Editor.trimCssUrl(G[X].substring(0,Z))]);W.push('"'+G[X].substring(Z))}v(W.join(""))}});if(0<G.length){for(k=1;k<G.length;k++){var N=G[k].indexOf(")"),S=null,V=G[k].indexOf("format(",N);0<V&&(S=Editor.trimCssUrl(G[k].substring(V+-7,G[k].indexOf(")",V))));mxUtils.bind(this,function(W){if(null==this.cachedFonts[W]){this.cachedFonts[W]=W;I++;var X="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(W))X="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(W))X="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(W))X="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(W))X="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(W))X="application/vnd.ms-fontobject";-else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(W))X="application/font-sfnt";this.mapFontUrl(X,W,mxUtils.bind(this,function(Z,Y){this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedFonts[W]=ba;I--;M()}),mxUtils.bind(this,function(ba){I--;M()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(G[k].substring(0,N)),S)}M()}else v(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(v){this.resolvedFontCss=-v;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},v;for(v in Graph.fontMapping)Graph.isCssFontUrl(v)&&(k[v]=Graph.fontMapping[v]);return k};Editor.prototype.embedExtFonts=function(k){var v=this.graph.getCustomFonts();if(0<v.length){var G=[],I=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var M=mxUtils.bind(this,function(){0==I&&this.embedCssFonts(G.join(""),k)}),N=0;N<v.length;N++)mxUtils.bind(this,function(S,V){Graph.isCssFontUrl(V)?-null==this.cachedGoogleFonts[V]?(I++,this.loadUrl(Graph.rewriteGoogleFontUrl(V),mxUtils.bind(this,function(W){this.cachedGoogleFonts[V]=W;G.push(W+"\n");I--;M()}),mxUtils.bind(this,function(W){I--;G.push("@import url("+V+");\n");M()}))):G.push(this.cachedGoogleFonts[V]+"\n"):G.push('@font-face {font-family: "'+S+'";src: url("'+V+'")}\n')})(v[N].name,v[N].url);M()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),-G=0;G<v.length;G++){var I=mxUtils.getTextContent(v[G]);0>I.indexOf("mxPageSelector")&&0<I.indexOf("MathJax")&&k[0].appendChild(v[G].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,v){v=null!=v?v:this.absoluteCssFonts(this.fontCss);if(null!=v){var G=mxUtils.getSvgDefs(k),I=v.split("\n");v=[];for(var M=[],N=0;N<I.length;N++)"@import"==I[N].substring(0,7)?v.push(I[N]):M.push(I[N]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");-k.setAttribute("type","text/css");0<v.length&&(mxUtils.setTextContent(k,v.join("\n")),G.appendChild(k));0<M.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,M.join("\n")),G.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,v,G){var I=mxClient.IS_FF?8192:16384;return Math.min(G,Math.min(I/k,I/v))};Editor.prototype.exportToCanvas=function(k,v,G,I,M,N,S,V,W,X,Z,Y,ba,ea,ca,fa,aa,da){try{N=-null!=N?N:!0;S=null!=S?S:!0;Y=null!=Y?Y:this.graph;ba=null!=ba?ba:0;var ha=W?null:Y.background;ha==mxConstants.NONE&&(ha=null);null==ha&&(ha=I);null==ha&&0==W&&(ha="dark"==fa&&"none"!=Y.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(Y.getSvg(null,null,ba,ea,null,S,null,null,null,X,null,fa,aa,da),mxUtils.bind(this,function(pa){try{var na=new Image;na.onload=mxUtils.bind(this,function(){try{var wa=function(){mxClient.IS_SF?window.setTimeout(function(){ja.drawImage(na,0,0);k(ua,pa)},-0):(ja.drawImage(na,0,0),k(ua,pa))},ua=document.createElement("canvas"),va=parseInt(pa.getAttribute("width")),Ca=parseInt(pa.getAttribute("height"));V=null!=V?V:1;null!=v&&(V=N?Math.min(1,Math.min(3*v/(4*Ca),v/va)):v/va);V=this.getMaxCanvasScale(va,Ca,V);va=Math.ceil(V*va);Ca=Math.ceil(V*Ca);ua.setAttribute("width",va);ua.setAttribute("height",Ca);var ja=ua.getContext("2d");null!=ha&&(ja.beginPath(),ja.rect(0,0,va,Ca),ja.fillStyle=ha,ja.fill());1!=V&&ja.scale(V,V);if(ca){var oa=Y.view,ma=oa.scale;-oa.scale=1;var Aa=btoa(unescape(encodeURIComponent(oa.createSvgGrid(oa.gridColor))));oa.scale=ma;Aa="data:image/svg+xml;base64,"+Aa;var sa=Y.gridSize*oa.gridSteps*V,Ia=Y.getGraphBounds(),xa=oa.translate.x*ma,Ba=oa.translate.y*ma,Fa=xa+(Ia.x-xa)/ma-ba,La=Ba+(Ia.y-Ba)/ma-ba,za=new Image;za.onload=function(){try{for(var Da=-Math.round(sa-mxUtils.mod((xa-Fa)*V,sa)),Ja=-Math.round(sa-mxUtils.mod((Ba-La)*V,sa));Da<va;Da+=sa)for(var Ra=Ja;Ra<Ca;Ra+=sa)ja.drawImage(za,Da/V,Ra/V);wa()}catch(Sa){null!=M&&M(Sa)}};-za.onerror=function(Da){null!=M&&M(Da)};za.src=Aa}else wa()}catch(Da){null!=M&&M(Da)}});na.onerror=function(wa){null!=M&&M(wa)};X&&this.graph.addSvgShadow(pa);this.graph.mathEnabled&&this.addMathCss(pa);var ia=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(pa,this.resolvedFontCss),na.src=Editor.createSvgDataUri(mxUtils.getXml(pa))}catch(wa){null!=M&&M(wa)}});this.embedExtFonts(mxUtils.bind(this,function(wa){try{null!=wa&&this.addFontCss(pa,wa),this.loadFonts(ia)}catch(ua){null!=-M&&M(ua)}}))}catch(wa){null!=M&&M(wa)}}),G,Z)}catch(pa){null!=M&&M(pa)}};Editor.crcTable=[];for(var q=0;256>q;q++)for(var y=q,x=0;8>x;x++)y=1==(y&1)?3988292384^y>>>1:y>>>1,Editor.crcTable[q]=y;Editor.updateCRC=function(k,v,G,I){for(var M=0;M<I;M++)k=Editor.crcTable[(k^v.charCodeAt(G+M))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,G=0;G<k.length;G++)v=v>>>8^Editor.crcTable[(v^k.charCodeAt(G))&255];return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,G,I,M){function N(Z,Y){var ba=-W;W+=Y;return Z.substring(ba,W)}function S(Z){Z=N(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function V(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var W=0;if(N(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=M&&M();else if(N(k,4),"IHDR"!=N(k,4))null!=M&&M();else{N(k,17);M=k.substring(0,W);do{var X=S(k);if("IDAT"==N(k,4)){M=k.substring(0,-W-8);"pHYs"==v&&"dpi"==G?(G=Math.round(I/.0254),G=V(G)+V(G)+String.fromCharCode(1)):G=G+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+I;I=4294967295;I=Editor.updateCRC(I,v,0,4);I=Editor.updateCRC(I,G,0,G.length);M+=V(G.length)+v+G+V(I^4294967295);M+=k.substring(W-8,k.length);break}M+=k.substring(W-8,W-4+X);N(k,X);N(k,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(M):Base64.encode(M,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,v,G,I,M){try{var R=!0,Q=window.setTimeout(mxUtils.bind(this,function(){R=!1;v(k)}),this.timeout),W=mxUtils.bind(this,function(){null!=I?this.convertImageToDataUri(k,v,G,I,!0):v(k)});if(/(\.svg)$/i.test(k)&&!M)mxUtils.get(k,mxUtils.bind(this,function(X){window.clearTimeout(Q);R&&(200>X.getStatus()||299<X.getStatus()?W():v(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(Q);+R&&W()}));else{var V=new Image;this.crossOriginImages&&(V.crossOrigin="anonymous");V.onload=function(){window.clearTimeout(Q);if(R)try{I=null!=I&&M?I:1;var X=document.createElement("canvas"),Z=X.getContext("2d");Z.scale(I,I);X.height=V.height*I;X.width=V.width*I;Z.drawImage(V,0,0);v(X.toDataURL())}catch(Y){v(k)}};V.onerror=function(){window.clearTimeout(Q);R&&(null!=G?G():v(k))};V.src=k}}catch(X){null!=G?G():v(k)}};Editor.prototype.convertImages=function(k,v,G,I){function M(){0<R.length?R.shift()():+v(k)}null==I&&(I=this.createImageUrlConverter());var R=[],Q=G||{};G=mxUtils.bind(this,function(W,V){W=k.getElementsByTagName(W);for(var X=0;X<W.length;X++)mxUtils.bind(this,function(Z){R.push(mxUtils.bind(this,function(){try{if(null!=Z){var Y=I.convert(Z.getAttribute(V));if(null!=Y&&"data:"!=Y.substring(0,5)){var ba=Q[Y];null==ba?this.convertImageToDataUri(Y,function(ea){null!=ea&&(Q[Y]=ea,Z.setAttribute(V,ea));M()},null,Editor.svgRasterScale):(Z.setAttribute(V,ba),M())}else null!=Y&&Z.setAttribute(V,+Y),M()}}catch(ea){M()}}))})(W[X])});G("image","xlink:href");G("img","src");M()};Editor.base64Encode=function(k){for(var v="",G=0,I=k.length,M,R,Q;G<I;){M=k.charCodeAt(G++)&255;if(G==I){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4);v+="==";break}R=k.charCodeAt(G++);if(G==I){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&+3)<<4|(R&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&15)<<2);v+="=";break}Q=k.charCodeAt(G++);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4|(R&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&15)<<2|(Q&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Q&63)}return v};+Editor.prototype.loadUrl=function(k,v,G,I,M,R,Q,W){try{var V=!Q&&(I||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));M=null!=M?M:!0;var X=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=v){var Y=Z.getText();if(V){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();+Y=Array(Z.length);for(var ba=0;ba<Z.length;ba++)Y[ba]=String.fromCharCode(Z[ba]);Y=Y.join("")}R=null!=R?R:"data:image/png;base64,";Y=R+Editor.base64Encode(Y)}v(Y)}}else null!=G&&(0==Z.getStatus()?G({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?G({message:mxResources.get("fileNotFound"),code:Z.getStatus()},Z):G({message:this.getErrorMessage(Z)},Z))}),function(Z){null!=G&&G({message:mxResources.get("error")+" "+Z.getStatus()})},V,this.timeout,function(){M&&null!=G&&G({code:App.ERROR_TIMEOUT,+retry:X})},W)});X()}catch(Z){null!=G&&G(Z)}};Editor.prototype.getErrorMessage=function(k){var v=mxResources.get("error")+" "+k.getStatus();try{var G=k.getText(),I=JSON.parse(G);null!=I&&null!=I.error&&null!=I.error.message&&(v=I.error.message+" ("+v+")")}catch(M){}return v};Editor.prototype.absoluteCssFonts=function(k){var v=null;if(null!=k){var G=k.split("url(");if(0<G.length){v=[G[0]];k=window.location.pathname;var I=null!=k?k.lastIndexOf("/"):-1;0<=I&&(k=k.substring(0,I+1));I=document.getElementsByTagName("base");+var M=null;null!=I&&0<I.length&&(M=I[0].getAttribute("href"));for(var R=1;R<G.length;R++)if(I=G[R].indexOf(")"),0<I){var Q=Editor.trimCssUrl(G[R].substring(0,I));this.graph.isRelativeUrl(Q)&&(Q=null!=M?M+Q:window.location.protocol+"//"+window.location.hostname+("/"==Q.charAt(0)?"":k)+Q);v.push('url("'+Q+'"'+G[R].substring(I))}else v.push(G[R])}else v=[k]}return null!=v?v.join(""):null};Editor.prototype.mapFontUrl=function(k,v,G){/^https?:\/\//.test(v)&&!this.isCorsEnabledForUrl(v)&&(v=PROXY_URL+"?url="++encodeURIComponent(v));G(k,v)};Editor.prototype.embedCssFonts=function(k,v){var G=k.split("url("),I=0;null==this.cachedFonts&&(this.cachedFonts={});var M=mxUtils.bind(this,function(){if(0==I){for(var V=[G[0]],X=1;X<G.length;X++){var Z=G[X].indexOf(")");V.push('url("');V.push(this.cachedFonts[Editor.trimCssUrl(G[X].substring(0,Z))]);V.push('"'+G[X].substring(Z))}v(V.join(""))}});if(0<G.length){for(k=1;k<G.length;k++){var R=G[k].indexOf(")"),Q=null,W=G[k].indexOf("format(",R);0<W&&(Q=Editor.trimCssUrl(G[k].substring(W++7,G[k].indexOf(")",W))));mxUtils.bind(this,function(V){if(null==this.cachedFonts[V]){this.cachedFonts[V]=V;I++;var X="application/x-font-ttf";if("svg"==Q||/(\.svg)($|\?)/i.test(V))X="image/svg+xml";else if("otf"==Q||"embedded-opentype"==Q||/(\.otf)($|\?)/i.test(V))X="application/x-font-opentype";else if("woff"==Q||/(\.woff)($|\?)/i.test(V))X="application/font-woff";else if("woff2"==Q||/(\.woff2)($|\?)/i.test(V))X="application/font-woff2";else if("eot"==Q||/(\.eot)($|\?)/i.test(V))X="application/vnd.ms-fontobject";+else if("sfnt"==Q||/(\.sfnt)($|\?)/i.test(V))X="application/font-sfnt";this.mapFontUrl(X,V,mxUtils.bind(this,function(Z,Y){this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedFonts[V]=ba;I--;M()}),mxUtils.bind(this,function(ba){I--;M()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(G[k].substring(0,R)),Q)}M()}else v(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(v){this.resolvedFontCss=+v;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},v;for(v in Graph.fontMapping)Graph.isCssFontUrl(v)&&(k[v]=Graph.fontMapping[v]);return k};Editor.prototype.embedExtFonts=function(k){var v=this.graph.getCustomFonts();if(0<v.length){var G=[],I=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var M=mxUtils.bind(this,function(){0==I&&this.embedCssFonts(G.join(""),k)}),R=0;R<v.length;R++)mxUtils.bind(this,function(Q,W){Graph.isCssFontUrl(W)?+null==this.cachedGoogleFonts[W]?(I++,this.loadUrl(Graph.rewriteGoogleFontUrl(W),mxUtils.bind(this,function(V){this.cachedGoogleFonts[W]=V;G.push(V+"\n");I--;M()}),mxUtils.bind(this,function(V){I--;G.push("@import url("+W+");\n");M()}))):G.push(this.cachedGoogleFonts[W]+"\n"):G.push('@font-face {font-family: "'+Q+'";src: url("'+W+'")}\n')})(v[R].name,v[R].url);M()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),+G=0;G<v.length;G++){var I=mxUtils.getTextContent(v[G]);0>I.indexOf("mxPageSelector")&&0<I.indexOf("MathJax")&&k[0].appendChild(v[G].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,v){v=null!=v?v:this.absoluteCssFonts(this.fontCss);if(null!=v){var G=mxUtils.getSvgDefs(k),I=v.split("\n");v=[];for(var M=[],R=0;R<I.length;R++)"@import"==I[R].substring(0,7)?v.push(I[R]):M.push(I[R]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");+k.setAttribute("type","text/css");0<v.length&&(mxUtils.setTextContent(k,v.join("\n")),G.appendChild(k));0<M.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,M.join("\n")),G.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,v,G){var I=mxClient.IS_FF?8192:16384;return Math.min(G,Math.min(I/k,I/v))};Editor.prototype.exportToCanvas=function(k,v,G,I,M,R,Q,W,V,X,Z,Y,ba,ea,ca,fa,aa,da){try{R=+null!=R?R:!0;Q=null!=Q?Q:!0;Y=null!=Y?Y:this.graph;ba=null!=ba?ba:0;var ha=V?null:Y.background;ha==mxConstants.NONE&&(ha=null);null==ha&&(ha=I);null==ha&&0==V&&(ha="dark"==fa&&"none"!=Y.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(Y.getSvg(null,null,ba,ea,null,Q,null,null,null,X,null,fa,aa,da),mxUtils.bind(this,function(na){try{var oa=new Image;oa.onload=mxUtils.bind(this,function(){try{var va=function(){mxClient.IS_SF?window.setTimeout(function(){ja.drawImage(oa,0,0);k(ua,na)},+0):(ja.drawImage(oa,0,0),k(ua,na))},ua=document.createElement("canvas"),wa=parseInt(na.getAttribute("width")),Ba=parseInt(na.getAttribute("height"));W=null!=W?W:1;null!=v&&(W=R?Math.min(1,Math.min(3*v/(4*Ba),v/wa)):v/wa);W=this.getMaxCanvasScale(wa,Ba,W);wa=Math.ceil(W*wa);Ba=Math.ceil(W*Ba);ua.setAttribute("width",wa);ua.setAttribute("height",Ba);var ja=ua.getContext("2d");null!=ha&&(ja.beginPath(),ja.rect(0,0,wa,Ba),ja.fillStyle=ha,ja.fill());1!=W&&ja.scale(W,W);if(ca){var qa=Y.view,la=qa.scale;+qa.scale=1;var Ea=btoa(unescape(encodeURIComponent(qa.createSvgGrid(qa.gridColor))));qa.scale=la;Ea="data:image/svg+xml;base64,"+Ea;var sa=Y.gridSize*qa.gridSteps*W,Ia=Y.getGraphBounds(),xa=qa.translate.x*la,Ca=qa.translate.y*la,Da=xa+(Ia.x-xa)/la-ba,Ka=Ca+(Ia.y-Ca)/la-ba,Ja=new Image;Ja.onload=function(){try{for(var Aa=-Math.round(sa-mxUtils.mod((xa-Da)*W,sa)),za=-Math.round(sa-mxUtils.mod((Ca-Ka)*W,sa));Aa<wa;Aa+=sa)for(var Ra=za;Ra<Ba;Ra+=sa)ja.drawImage(Ja,Aa/W,Ra/W);va()}catch(Sa){null!=M&&M(Sa)}};+Ja.onerror=function(Aa){null!=M&&M(Aa)};Ja.src=Ea}else va()}catch(Aa){null!=M&&M(Aa)}});oa.onerror=function(va){null!=M&&M(va)};X&&this.graph.addSvgShadow(na);this.graph.mathEnabled&&this.addMathCss(na);var ia=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(na,this.resolvedFontCss),oa.src=Editor.createSvgDataUri(mxUtils.getXml(na))}catch(va){null!=M&&M(va)}});this.embedExtFonts(mxUtils.bind(this,function(va){try{null!=va&&this.addFontCss(na,va),this.loadFonts(ia)}catch(ua){null!=+M&&M(ua)}}))}catch(va){null!=M&&M(va)}}),G,Z)}catch(na){null!=M&&M(na)}};Editor.crcTable=[];for(var q=0;256>q;q++)for(var y=q,x=0;8>x;x++)y=1==(y&1)?3988292384^y>>>1:y>>>1,Editor.crcTable[q]=y;Editor.updateCRC=function(k,v,G,I){for(var M=0;M<I;M++)k=Editor.crcTable[(k^v.charCodeAt(G+M))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,G=0;G<k.length;G++)v=v>>>8^Editor.crcTable[(v^k.charCodeAt(G))&255];return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,G,I,M){function R(Z,Y){var ba=+V;V+=Y;return Z.substring(ba,V)}function Q(Z){Z=R(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function W(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var V=0;if(R(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=M&&M();else if(R(k,4),"IHDR"!=R(k,4))null!=M&&M();else{R(k,17);M=k.substring(0,V);do{var X=Q(k);if("IDAT"==R(k,4)){M=k.substring(0,+V-8);"pHYs"==v&&"dpi"==G?(G=Math.round(I/.0254),G=W(G)+W(G)+String.fromCharCode(1)):G=G+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+I;I=4294967295;I=Editor.updateCRC(I,v,0,4);I=Editor.updateCRC(I,G,0,G.length);M+=W(G.length)+v+G+W(I^4294967295);M+=k.substring(V-8,k.length);break}M+=k.substring(V-8,V-4+X);R(k,X);R(k,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(M):Base64.encode(M,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var D=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,v){D.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var J=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){J.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,v){var G=null;null!=k.editor.graph.getModel().getParent(v)?G=v.getId():null!=k.currentPage&&(G=k.currentPage.getId());return G});if(null!=window.StyleFormatPanel){var K=Format.prototype.init;Format.prototype.init=function(){K.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var L=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?L.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==-Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var Q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=Q.apply(this,arguments);var v=this.editorUi,G=v.editor.graph;if(G.isEnabled()){var I=v.getCurrentFile();null!=I&&I.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return v.editor.autosave},function(S){v.editor.setAutosave(S);v.editor.autosave&&I.isModified()&&I.fileChanged()},-{install:function(S){this.listener=function(){S(v.editor.autosave)};v.editor.addListener("autosaveChanged",this.listener)},destroy:function(){v.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&G.isEnabled()&&"undefined"!==typeof MathJax){var M=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return G.mathEnabled},function(S){v.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=function(){S(G.mathEnabled)};v.addListener("mathEnabledChanged",-this.listener)},destroy:function(){v.removeListener(this.listener)}});k.appendChild(M);if(!v.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var N=v.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");N.style.position="absolute";N.style.left="85%";M.appendChild(N)}}return k};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",+Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var P=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=P.apply(this,arguments);var v=this.editorUi,G=v.editor.graph;if(G.isEnabled()){var I=v.getCurrentFile();null!=I&&I.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return v.editor.autosave},function(Q){v.editor.setAutosave(Q);v.editor.autosave&&I.isModified()&&I.fileChanged()},+{install:function(Q){this.listener=function(){Q(v.editor.autosave)};v.editor.addListener("autosaveChanged",this.listener)},destroy:function(){v.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&G.isEnabled()&&"undefined"!==typeof MathJax){var M=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return G.mathEnabled},function(Q){v.actions.get("mathematicalTypesetting").funct()},{install:function(Q){this.listener=function(){Q(G.mathEnabled)};v.addListener("mathEnabledChanged",+this.listener)},destroy:function(){v.removeListener(this.listener)}});k.appendChild(M);if(!v.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var R=v.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");R.style.position="absolute";R.style.left="85%";M.appendChild(R)}}return k};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize",@@ -12889,93 +12889,93 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispNamestroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=-function(k,v,G,I){if(null!=v){var M=mxUtils.bind(this,function(S){if(null!=S)if(G)for(var V=0;V<S.length;V++){if("function"!==typeof S[V].isVisible||S[V].isVisible(I,this))v[S[V].name]=S[V]}else for(var W in v){var X=!1;for(V=0;V<S.length;V++)if(S[V].name==W&&S[V].type==v[W].type){X=!0;break}X||delete v[W]}}),N=this.editorUi.editor.graph.view.getState(k);null!=N&&null!=N.shape&&(N.shape.commonCustomPropAdded||(N.shape.commonCustomPropAdded=!0,N.shape.customProperties=N.shape.customProperties||[],-N.cell.vertex?Array.prototype.push.apply(N.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(N.shape.customProperties,Editor.commonEdgeProperties)),M(N.shape.customProperties));k=k.getAttribute("customProperties");if(null!=k)try{M(JSON.parse(k))}catch(S){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&+function(k,v,G,I){if(null!=v){var M=mxUtils.bind(this,function(Q){if(null!=Q)if(G)for(var W=0;W<Q.length;W++){if("function"!==typeof Q[W].isVisible||Q[W].isVisible(I,this))v[Q[W].name]=Q[W]}else for(var V in v){var X=!1;for(W=0;W<Q.length;W++)if(Q[W].name==V&&Q[W].type==v[V].type){X=!0;break}X||delete v[V]}}),R=this.editorUi.editor.graph.view.getState(k);null!=R&&null!=R.shape&&(R.shape.commonCustomPropAdded||(R.shape.commonCustomPropAdded=!0,R.shape.customProperties=R.shape.customProperties||[],+R.cell.vertex?Array.prototype.push.apply(R.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(R.shape.customProperties,Editor.commonEdgeProperties)),M(R.shape.customProperties));k=k.getAttribute("customProperties");if(null!=k)try{M(JSON.parse(k))}catch(Q){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var v={},G=k.vertices,I=k.edges,M=0;M<G.length;M++)this.findCommonProperties(G[M],v,0==M,k);for(M=0;M<I.length;M++)this.findCommonProperties(I[M],v,0==G.length&&0==M,k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(v).length&&this.container.appendChild(this.addProperties(this.createPanel(),v,k))}};var e=StyleFormatPanel.prototype.addStyleOps;-StyleFormatPanel.prototype.addStyleOps=function(k){var v=this.editorUi.getSelectionState();1==v.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=v.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);e.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,v,G,I){function M(ja,oa,ma,Aa,sa){if(null!=ma.valueChanged)ma.valueChanged(oa,sa);else{ba.getModel().beginUpdate();try{sa=[];var Ia=[];if(null!=ma.index){for(var xa=-[],Ba=ma.parentRow.nextSibling;Ba&&Ba.getAttribute("data-pName")==ja;)xa.push(Ba.getAttribute("data-pValue")),Ba=Ba.nextSibling;ma.index<xa.length?null!=Aa?xa.splice(Aa,1):xa[ma.index]=oa:xa.push(oa);null!=ma.size&&xa.length>ma.size&&(xa=xa.slice(0,ma.size));oa=xa.join(",");null!=ma.countProperty&&(ba.setCellStyles(ma.countProperty,xa.length,ba.getSelectionCells()),sa.push(ma.countProperty),Ia.push(xa.length))}ba.setCellStyles(ja,oa,ba.getSelectionCells());sa.push(ja);Ia.push(oa);if(null!=ma.dependentProps)for(ja=-0;ja<ma.dependentProps.length;ja++){var Fa=ma.dependentPropsDefVal[ja],La=ma.dependentPropsVals[ja];if(La.length>oa)La=La.slice(0,oa);else for(var za=La.length;za<oa;za++)La.push(Fa);La=La.join(",");ba.setCellStyles(ma.dependentProps[ja],La,ba.getSelectionCells());sa.push(ma.dependentProps[ja]);Ia.push(La)}if("function"==typeof ma.onChange)ma.onChange(ba,oa);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",Ia,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}}-function N(ja,oa,ma){var Aa=mxUtils.getOffset(k,!0),sa=mxUtils.getOffset(ja,!0);oa.style.position="absolute";oa.style.left=sa.x-Aa.x+"px";oa.style.top=sa.y-Aa.y+"px";oa.style.width=ja.offsetWidth+"px";oa.style.height=ja.offsetHeight-(ma?4:0)+"px";oa.style.zIndex=5}function S(ja,oa,ma){function Aa(Ia){if(null==Ia||Ia==mxConstants.NONE)sa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==Ia)sa.style.background="";else{var xa=mxUtils.getLightDarkColor(Ia);mxUtils.isLightDarkColor(Ia)&&-xa.light!=xa.dark?sa.style.background="linear-gradient(to right bottom, "+xa.cssText+" 50%, "+mxUtils.invertLightDarkColor(xa).cssText+" 50.3%)":sa.style.background=Ia}}var sa=document.createElement("div");sa.style.width="32px";sa.style.height="8px";sa.style.margin="2px";sa.style.borderStyle="solid";sa.style.borderWidth="1px";Aa(oa);btn=mxUtils.button("",mxUtils.bind(Y,function(Ia){this.editorUi.pickColor(oa,function(xa){M(ja,xa,ma);Aa(xa)});mxEvent.consume(Ia)}));btn.style.height="18px";btn.style.width=-"40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(sa);return btn}function V(ja,oa,ma,Aa,sa,Ia,xa){null!=oa&&(oa=oa.split(","),ea.push({name:ja,values:oa,type:ma,defVal:Aa,countProperty:sa,parentRow:Ia,isDeletable:!0,flipBkg:xa}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Ba){for(var Fa=Ia,La=0;null!=Fa.nextSibling;)if(Fa.nextSibling.getAttribute("data-pName")==ja)Fa=Fa.nextSibling,La++;else break;var za={type:ma,parentRow:Ia,index:La,isDeletable:!0,-defVal:Aa,countProperty:sa};La=Z(ja,"",za,0==La%2,xa);M(ja,Aa,za);Fa.parentNode.insertBefore(La,Fa.nextSibling);mxEvent.consume(Ba)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function W(ja,oa,ma,Aa,sa,Ia,xa){if(0<sa){var Ba=Array(sa);oa=null!=oa?oa.split(","):[];for(var Fa=0;Fa<sa;Fa++)Ba[Fa]=null!=oa[Fa]?oa[Fa]:null!=Aa?Aa:"";ea.push({name:ja,values:Ba,type:ma,defVal:Aa,parentRow:Ia,flipBkg:xa,size:sa})}return document.createElement("div")}function X(ja,-oa,ma){var Aa=document.createElement("input");Aa.type="checkbox";Aa.checked="1"==oa;mxEvent.addListener(Aa,"change",function(){M(ja,Aa.checked?"1":"0",ma)});return Aa}function Z(ja,oa,ma,Aa,sa){var Ia=ma.dispName,xa=ma.type,Ba=document.createElement("tr");Ba.className="gePropRow"+(sa?"Dark":"")+(Aa?"Alt":"")+" gePropNonHeaderRow";Ba.setAttribute("data-pName",ja);Ba.setAttribute("data-pValue",oa);Aa=!1;null!=ma.index&&(Ba.setAttribute("data-index",ma.index),Ia=(null!=Ia?Ia:"")+"["+ma.index+"]",Aa=-!0);var Fa=document.createElement("td");Fa.className="gePropRowCell";Ia=mxResources.get(Ia,null,Ia);mxUtils.write(Fa,Ia);Fa.setAttribute("title",Ia);Aa&&(Fa.style.textAlign="right");Ba.appendChild(Fa);Fa=document.createElement("td");Fa.className="gePropRowCell";Fa.setAttribute("title",null!=oa?oa:mxResources.get("none"));if("color"==xa)Fa.appendChild(S(ja,oa,ma));else if("bool"==xa||"boolean"==xa)Fa.appendChild(X(ja,oa,ma));else if("enum"==xa){var La=ma.enumList;for(sa=0;sa<La.length;sa++)if(Ia=La[sa],-Ia.val==oa){mxUtils.write(Fa,mxResources.get(Ia.dispName,null,Ia.dispName));break}mxEvent.addListener(Fa,"click",mxUtils.bind(Y,function(){var za=document.createElement("select"),Da=null;N(Fa,za);for(var Ja=0;Ja<La.length;Ja++){var Ra=La[Ja],Sa=document.createElement("option");Sa.value=mxUtils.htmlEntities(Ra.val);mxUtils.write(Sa,mxResources.get(Ra.dispName,null,Ra.dispName));za.appendChild(Sa);null==Ra.val&&(Sa.value="null",Da=Sa)}za.value=null==oa&&null!=Da?"null":oa;k.appendChild(za);mxEvent.addListener(za,-"change",function(){var ab=mxUtils.htmlEntities(za.value);if(za[za.selectedIndex]==Da||"null"==ab.value)ab=null;M(ja,ab,ma)});za.focus();mxEvent.addListener(za,"blur",function(){k.removeChild(za)})}))}else"dynamicArr"==xa?Fa.appendChild(V(ja,oa,ma.subType,ma.subDefVal,ma.countProperty,Ba,sa)):"staticArr"==xa?Fa.appendChild(W(ja,oa,ma.subType,ma.subDefVal,ma.size,Ba,sa)):"readOnly"==xa?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=oa,sa.style.borderWidth="0px","id"==ja?-(sa.style.width="190px",sa.style.position="relative",sa.style.right="6px",sa.style.float="right",sa.style.background="none",sa.style.textAlign="right",Ba.firstChild.setAttribute("colspan","2"),sa.setAttribute("title",oa),Ba.firstChild.appendChild(sa)):(sa.style.width="96px",Fa.appendChild(sa))):(Fa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(oa)),mxEvent.addListener(Fa,"click",mxUtils.bind(Y,function(){function za(){var Ja=Da.value;Ja=0==Ja.length&&"string"!=xa&&"numbers"!=xa?0:Ja;ma.allowAuto&&-(null!=Ja.trim&&"auto"==Ja.trim().toLowerCase()?(Ja="auto",xa="string"):(Ja=parseFloat(Ja),Ja=isNaN(Ja)?0:Ja));null!=ma.min&&Ja<ma.min?Ja=ma.min:null!=ma.max&&Ja>ma.max&&(Ja=ma.max);var Ra=null;try{Ra="numbers"==xa?Ja.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==xa?parseInt(Ja):Ja)+"")}catch(Sa){}M(ja,Ra,ma,null,Da)}var Da=document.createElement("input");N(Fa,Da,!0);Da.value=decodeURIComponent(oa);Da.className="gePropEditor";"int"!=xa&&"float"!=xa||ma.allowAuto||(Da.type="number",-Da.step="int"==xa?"1":"any",null!=ma.min&&(Da.min=parseFloat(ma.min)),null!=ma.max&&(Da.max=parseFloat(ma.max)));k.appendChild(Da);mxEvent.addListener(Da,"keypress",function(Ja){13==Ja.keyCode&&za()});Da.focus();mxEvent.addListener(Da,"blur",function(){za()})})));ma.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(Y,function(za){M(ja,"",ma,ma.index);mxEvent.consume(za)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",Fa.appendChild(sa));Ba.appendChild(Fa);-return Ba}var Y=this,ba=this.editorUi.editor.graph,ea=[];k.style.position="relative";k.style.padding="0";var ca=document.createElement("table");ca.className="geProperties";ca.style.whiteSpace="nowrap";ca.style.width="100%";var fa=document.createElement("tr");fa.className="gePropHeader";var aa=document.createElement("th");aa.className="gePropHeaderCell";aa.style.paddingLeft="16px";aa.style.backgroundRepeat="no-repeat";aa.style.backgroundPosition="-2px 50%";aa.style.backgroundSize="20px";mxUtils.write(aa,-mxResources.get("property"));fa.style.cursor="pointer";var da=function(){var ja=ca.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){aa.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var oa="none";for(var ma=k.childNodes.length-1;0<=ma;ma--)try{var Aa=k.childNodes[ma],sa=Aa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||k.removeChild(Aa)}catch(Ia){}}else aa.style.backgroundImage="url('"+Editor.arrowDownImage+"')",oa="";for(ma=0;ma<ja.length;ma++)ja[ma].style.display=-oa};mxEvent.addListener(fa,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;da()});fa.appendChild(aa);var ha=document.createElement("th");ha.className="gePropHeaderCell";ha.style.paddingLeft="4px";mxUtils.write(ha,mxResources.get("value"));fa.appendChild(ha);ca.appendChild(fa);var pa=ha=!1;fa=null;1==G.vertices.length&&0==G.edges.length?fa=G.vertices[0].id:0==G.vertices.length&&1==G.edges.length&&(fa=G.edges[0].id);null==fa||I||ca.appendChild(Z("id",mxUtils.htmlEntities(fa),-{dispName:"id",type:"readOnly"},!0,!1));for(var na in v)if(I=v[na],"function"!=typeof I.isVisible||I.isVisible(G,this)){var ia=null!=I.getValue?I.getValue():null!=G.style[na]?mxUtils.htmlEntities(G.style[na]+""):null!=I.getDefaultValue?I.getDefaultValue(G,this):I.defVal;if("separator"==I.type)pa=!pa;else{if("staticArr"==I.type)I.size=parseInt(G.style[I.sizeProperty]||v[I.sizeProperty].defVal)||0;else if(null!=I.dependentProps){var wa=I.dependentProps,ua=[],va=[];for(fa=0;fa<wa.length;fa++){var Ca=-G.style[wa[fa]];va.push(v[wa[fa]].subDefVal);ua.push(null!=Ca?Ca.split(","):[])}I.dependentPropsDefVal=va;I.dependentPropsVals=ua}ca.appendChild(Z(na,ia,I,ha,pa));ha=!ha}}for(fa=0;fa<ea.length;fa++)for(I=ea[fa],v=I.parentRow,G=0;G<I.values.length;G++)na=Z(I.name,I.values[G],{type:I.type,parentRow:I.parentRow,isDeletable:I.isDeletable,index:G,defVal:I.defVal,countProperty:I.countProperty,size:I.size},0==G%2,I.flipBkg),v.parentNode.insertBefore(na,v.nextSibling),v=na;k.appendChild(ca);da();return k};-StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var v=function(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})},G=this.editorUi,I=G.editor.graph,M=document.createElement("div");M.style.whiteSpace="nowrap";M.style.paddingLeft="24px";M.style.paddingRight="20px";k.style.paddingLeft="16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(M);var N=document.createElement("div");-N.style.whiteSpace="nowrap";N.style.position="relative";N.style.textAlign="center";N.style.width="210px";for(var S=[],V=0;V<this.defaultColorSchemes.length;V++){var W=document.createElement("div");W.style.display="inline-block";W.style.width="6px";W.style.height="6px";W.style.marginLeft="4px";W.style.marginRight="3px";W.style.borderRadius="3px";W.style.cursor="pointer";W.style.background="transparent";W.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ea){mxEvent.addListener(W,"click",-mxUtils.bind(this,function(){X(ea)}))})(V);S.push(W);N.appendChild(W)}var X=mxUtils.bind(this,function(ea){null!=S[ea]&&(null!=this.format.currentScheme&&null!=S[this.format.currentScheme]&&(S[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ea,Z(this.defaultColorSchemes[this.format.currentScheme]),S[this.format.currentScheme].style.background="#84d7ff")}),Z=mxUtils.bind(this,function(ea){var ca=mxUtils.clone(I.defaultVertexStyle);ca[mxConstants.STYLE_STROKECOLOR]=-null!=ca[mxConstants.STYLE_STROKECOLOR]?ca[mxConstants.STYLE_STROKECOLOR]:"default";ca[mxConstants.STYLE_FILLCOLOR]=null!=ca[mxConstants.STYLE_FILLCOLOR]?ca[mxConstants.STYLE_FILLCOLOR]:"default";ca[mxConstants.STYLE_FONTCOLOR]=null!=ca[mxConstants.STYLE_FONTCOLOR]?ca[mxConstants.STYLE_FONTCOLOR]:"default";I.replaceDefaultColors(new mxCell,ca);var fa=mxUtils.bind(this,function(da){var ha=mxUtils.button("",mxUtils.bind(this,function(ia){I.getModel().beginUpdate();try{for(var wa=G.getSelectionState().cells,-ua=0;ua<wa.length;ua++){var va=I.getModel().getStyle(wa[ua]);null!=da?(mxEvent.isShiftDown(ia)||(va=""==da.fill||null==da.fill?mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,da.fill),va=""==da.gradient||null==da.gradient?mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,da.gradient),mxEvent.isControlDown(ia)||mxClient.IS_MAC&&mxEvent.isMetaDown(ia)||!I.getModel().isVertex(wa[ua])||(va=-""==da.font||null==da.font?mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,da.font))),mxEvent.isAltDown(ia)||(va=""==da.stroke||null==da.fill?mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,da.stroke))):(va=mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,null),va=mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,null),va=mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,null),I.getModel().isVertex(wa[ua])&&-(va=mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,null)));I.getModel().setStyle(wa[ua],va)}}finally{I.getModel().endUpdate()}}));ha.className="geStyleButton";ha.style.width="36px";ha.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ha.style.margin="0px 6px 6px 0px";if(null!=da){var pa="1px solid";null!=da.border&&(pa=da.border);if(null!=da.gradient)ha.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(da.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(da.gradient).cssText+-" 100%)";else if(da.fill==mxConstants.NONE)ha.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==da.fill||""==da.fill)ha.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var na=mxUtils.getLightDarkColor(da.fill);ha.style.backgroundImage="linear-gradient(to right bottom, "+na.cssText+" 50%, "+na.light+" 50.3%)"}null==da.stroke||da.stroke==mxConstants.NONE?ha.style.border=pa+" transparent":""==da.stroke?ha.style.border=-"1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(na=mxUtils.getLightDarkColor(da.stroke),ha.style.border=pa+" "+na.cssText,ha.style.borderRightColor=na.light,ha.style.borderBottomColor=ha.style.borderRightColor);null!=da.title&&ha.setAttribute("title",da.title)}else pa=mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff"),na=mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000"),ha.style.backgroundColor=pa,ha.style.border="1px solid "+-na;ha.style.borderRadius="0";M.appendChild(ha);null!=da&&null!=da.gradient&&(pa=ha.cloneNode(!1),pa.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(da.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(da.gradient).light+") 100%)",pa.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",pa.style.backgroundColor="transparent",M.appendChild(pa),pa.style.marginLeft="-42px",mxEvent.addListener(pa,"click",function(){ha.click()}))});M.innerText=-"";if(null!=ea)for(var aa=0;aa<ea.length;aa++)0<aa&&0==mxUtils.mod(aa,4)&&mxUtils.br(M),fa(ea[aa])});null==this.format.currentScheme?X(Math.min(S.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):X(this.format.currentScheme);V=10>=this.defaultColorSchemes.length?28:8;var Y=document.createElement("div");Y.style.cssText="position:absolute;left:10px;top:8px;bottom:"+V+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";-mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ba=document.createElement("div");ba.style.cssText="position:absolute;left:202px;top:8px;bottom:"+V+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";-1<this.defaultColorSchemes.length&&(k.appendChild(Y),k.appendChild(ba));mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));v(Y);v(ba);Z(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(N)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};+StyleFormatPanel.prototype.addStyleOps=function(k){var v=this.editorUi.getSelectionState();1==v.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=v.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);e.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,v,G,I){function M(ja,qa,la,Ea,sa){if(null!=la.valueChanged)la.valueChanged(qa,sa);else{ba.getModel().beginUpdate();try{sa=[];var Ia=[];if(null!=la.index){for(var xa=+[],Ca=la.parentRow.nextSibling;Ca&&Ca.getAttribute("data-pName")==ja;)xa.push(Ca.getAttribute("data-pValue")),Ca=Ca.nextSibling;la.index<xa.length?null!=Ea?xa.splice(Ea,1):xa[la.index]=qa:xa.push(qa);null!=la.size&&xa.length>la.size&&(xa=xa.slice(0,la.size));qa=xa.join(",");null!=la.countProperty&&(ba.setCellStyles(la.countProperty,xa.length,ba.getSelectionCells()),sa.push(la.countProperty),Ia.push(xa.length))}ba.setCellStyles(ja,qa,ba.getSelectionCells());sa.push(ja);Ia.push(qa);if(null!=la.dependentProps)for(ja=+0;ja<la.dependentProps.length;ja++){var Da=la.dependentPropsDefVal[ja],Ka=la.dependentPropsVals[ja];if(Ka.length>qa)Ka=Ka.slice(0,qa);else for(var Ja=Ka.length;Ja<qa;Ja++)Ka.push(Da);Ka=Ka.join(",");ba.setCellStyles(la.dependentProps[ja],Ka,ba.getSelectionCells());sa.push(la.dependentProps[ja]);Ia.push(Ka)}if("function"==typeof la.onChange)la.onChange(ba,qa);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",Ia,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}}+function R(ja,qa,la){var Ea=mxUtils.getOffset(k,!0),sa=mxUtils.getOffset(ja,!0);qa.style.position="absolute";qa.style.left=sa.x-Ea.x+"px";qa.style.top=sa.y-Ea.y+"px";qa.style.width=ja.offsetWidth+"px";qa.style.height=ja.offsetHeight-(la?4:0)+"px";qa.style.zIndex=5}function Q(ja,qa,la){function Ea(Ia){if(null==Ia||Ia==mxConstants.NONE)sa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==Ia)sa.style.background="";else{var xa=mxUtils.getLightDarkColor(Ia);mxUtils.isLightDarkColor(Ia)&&+xa.light!=xa.dark?sa.style.background="linear-gradient(to right bottom, "+xa.cssText+" 50%, "+mxUtils.invertLightDarkColor(xa).cssText+" 50.3%)":sa.style.background=Ia}}var sa=document.createElement("div");sa.style.width="32px";sa.style.height="8px";sa.style.margin="2px";sa.style.borderStyle="solid";sa.style.borderWidth="1px";Ea(qa);btn=mxUtils.button("",mxUtils.bind(Y,function(Ia){this.editorUi.pickColor(qa,function(xa){M(ja,xa,la);Ea(xa)});mxEvent.consume(Ia)}));btn.style.height="18px";btn.style.width=+"40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(sa);return btn}function W(ja,qa,la,Ea,sa,Ia,xa){null!=qa&&(qa=qa.split(","),ea.push({name:ja,values:qa,type:la,defVal:Ea,countProperty:sa,parentRow:Ia,isDeletable:!0,flipBkg:xa}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Ca){for(var Da=Ia,Ka=0;null!=Da.nextSibling;)if(Da.nextSibling.getAttribute("data-pName")==ja)Da=Da.nextSibling,Ka++;else break;var Ja={type:la,parentRow:Ia,index:Ka,isDeletable:!0,+defVal:Ea,countProperty:sa};Ka=Z(ja,"",Ja,0==Ka%2,xa);M(ja,Ea,Ja);Da.parentNode.insertBefore(Ka,Da.nextSibling);mxEvent.consume(Ca)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function V(ja,qa,la,Ea,sa,Ia,xa){if(0<sa){var Ca=Array(sa);qa=null!=qa?qa.split(","):[];for(var Da=0;Da<sa;Da++)Ca[Da]=null!=qa[Da]?qa[Da]:null!=Ea?Ea:"";ea.push({name:ja,values:Ca,type:la,defVal:Ea,parentRow:Ia,flipBkg:xa,size:sa})}return document.createElement("div")}function X(ja,+qa,la){var Ea=document.createElement("input");Ea.type="checkbox";Ea.checked="1"==qa;mxEvent.addListener(Ea,"change",function(){M(ja,Ea.checked?"1":"0",la)});return Ea}function Z(ja,qa,la,Ea,sa){var Ia=la.dispName,xa=la.type,Ca=document.createElement("tr");Ca.className="gePropRow"+(sa?"Dark":"")+(Ea?"Alt":"")+" gePropNonHeaderRow";Ca.setAttribute("data-pName",ja);Ca.setAttribute("data-pValue",qa);Ea=!1;null!=la.index&&(Ca.setAttribute("data-index",la.index),Ia=(null!=Ia?Ia:"")+"["+la.index+"]",Ea=+!0);var Da=document.createElement("td");Da.className="gePropRowCell";Ia=mxResources.get(Ia,null,Ia);mxUtils.write(Da,Ia);Da.setAttribute("title",Ia);Ea&&(Da.style.textAlign="right");Ca.appendChild(Da);Da=document.createElement("td");Da.className="gePropRowCell";Da.setAttribute("title",null!=qa?qa:mxResources.get("none"));if("color"==xa)Da.appendChild(Q(ja,qa,la));else if("bool"==xa||"boolean"==xa)Da.appendChild(X(ja,qa,la));else if("enum"==xa){var Ka=la.enumList;for(sa=0;sa<Ka.length;sa++)if(Ia=Ka[sa],+Ia.val==qa){mxUtils.write(Da,mxResources.get(Ia.dispName,null,Ia.dispName));break}mxEvent.addListener(Da,"click",mxUtils.bind(Y,function(){var Ja=document.createElement("select"),Aa=null;R(Da,Ja);for(var za=0;za<Ka.length;za++){var Ra=Ka[za],Sa=document.createElement("option");Sa.value=mxUtils.htmlEntities(Ra.val);mxUtils.write(Sa,mxResources.get(Ra.dispName,null,Ra.dispName));Ja.appendChild(Sa);null==Ra.val&&(Sa.value="null",Aa=Sa)}Ja.value=null==qa&&null!=Aa?"null":qa;k.appendChild(Ja);mxEvent.addListener(Ja,+"change",function(){var ab=mxUtils.htmlEntities(Ja.value);if(Ja[Ja.selectedIndex]==Aa||"null"==ab.value)ab=null;M(ja,ab,la)});Ja.focus();mxEvent.addListener(Ja,"blur",function(){k.removeChild(Ja)})}))}else"dynamicArr"==xa?Da.appendChild(W(ja,qa,la.subType,la.subDefVal,la.countProperty,Ca,sa)):"staticArr"==xa?Da.appendChild(V(ja,qa,la.subType,la.subDefVal,la.size,Ca,sa)):"readOnly"==xa?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=qa,sa.style.borderWidth="0px","id"==ja?+(sa.style.width="190px",sa.style.position="relative",sa.style.right="6px",sa.style.float="right",sa.style.background="none",sa.style.textAlign="right",Ca.firstChild.setAttribute("colspan","2"),sa.setAttribute("title",qa),Ca.firstChild.appendChild(sa)):(sa.style.width="96px",Da.appendChild(sa))):(Da.innerHTML=mxUtils.htmlEntities(decodeURIComponent(qa)),mxEvent.addListener(Da,"click",mxUtils.bind(Y,function(){function Ja(){var za=Aa.value;za=0==za.length&&"string"!=xa&&"numbers"!=xa?0:za;la.allowAuto&&+(null!=za.trim&&"auto"==za.trim().toLowerCase()?(za="auto",xa="string"):(za=parseFloat(za),za=isNaN(za)?0:za));null!=la.min&&za<la.min?za=la.min:null!=la.max&&za>la.max&&(za=la.max);var Ra=null;try{Ra="numbers"==xa?za.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==xa?parseInt(za):za)+"")}catch(Sa){}M(ja,Ra,la,null,Aa)}var Aa=document.createElement("input");R(Da,Aa,!0);Aa.value=decodeURIComponent(qa);Aa.className="gePropEditor";"int"!=xa&&"float"!=xa||la.allowAuto||(Aa.type="number",+Aa.step="int"==xa?"1":"any",null!=la.min&&(Aa.min=parseFloat(la.min)),null!=la.max&&(Aa.max=parseFloat(la.max)));k.appendChild(Aa);mxEvent.addListener(Aa,"keypress",function(za){13==za.keyCode&&Ja()});Aa.focus();mxEvent.addListener(Aa,"blur",function(){Ja()})})));la.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(Y,function(Ja){M(ja,"",la,la.index);mxEvent.consume(Ja)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",Da.appendChild(sa));Ca.appendChild(Da);+return Ca}var Y=this,ba=this.editorUi.editor.graph,ea=[];k.style.position="relative";k.style.padding="0";var ca=document.createElement("table");ca.className="geProperties";ca.style.whiteSpace="nowrap";ca.style.width="100%";var fa=document.createElement("tr");fa.className="gePropHeader";var aa=document.createElement("th");aa.className="gePropHeaderCell";aa.style.paddingLeft="16px";aa.style.backgroundRepeat="no-repeat";aa.style.backgroundPosition="-2px 50%";aa.style.backgroundSize="20px";mxUtils.write(aa,+mxResources.get("property"));fa.style.cursor="pointer";var da=function(){var ja=ca.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){aa.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var qa="none";for(var la=k.childNodes.length-1;0<=la;la--)try{var Ea=k.childNodes[la],sa=Ea.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||k.removeChild(Ea)}catch(Ia){}}else aa.style.backgroundImage="url('"+Editor.arrowDownImage+"')",qa="";for(la=0;la<ja.length;la++)ja[la].style.display=+qa};mxEvent.addListener(fa,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;da()});fa.appendChild(aa);var ha=document.createElement("th");ha.className="gePropHeaderCell";ha.style.paddingLeft="4px";mxUtils.write(ha,mxResources.get("value"));fa.appendChild(ha);ca.appendChild(fa);var na=ha=!1;fa=null;1==G.vertices.length&&0==G.edges.length?fa=G.vertices[0].id:0==G.vertices.length&&1==G.edges.length&&(fa=G.edges[0].id);null==fa||I||ca.appendChild(Z("id",mxUtils.htmlEntities(fa),+{dispName:"id",type:"readOnly"},!0,!1));for(var oa in v)if(I=v[oa],"function"!=typeof I.isVisible||I.isVisible(G,this)){var ia=null!=I.getValue?I.getValue():null!=G.style[oa]?mxUtils.htmlEntities(G.style[oa]+""):null!=I.getDefaultValue?I.getDefaultValue(G,this):I.defVal;if("separator"==I.type)na=!na;else{if("staticArr"==I.type)I.size=parseInt(G.style[I.sizeProperty]||v[I.sizeProperty].defVal)||0;else if(null!=I.dependentProps){var va=I.dependentProps,ua=[],wa=[];for(fa=0;fa<va.length;fa++){var Ba=+G.style[va[fa]];wa.push(v[va[fa]].subDefVal);ua.push(null!=Ba?Ba.split(","):[])}I.dependentPropsDefVal=wa;I.dependentPropsVals=ua}ca.appendChild(Z(oa,ia,I,ha,na));ha=!ha}}for(fa=0;fa<ea.length;fa++)for(I=ea[fa],v=I.parentRow,G=0;G<I.values.length;G++)oa=Z(I.name,I.values[G],{type:I.type,parentRow:I.parentRow,isDeletable:I.isDeletable,index:G,defVal:I.defVal,countProperty:I.countProperty,size:I.size},0==G%2,I.flipBkg),v.parentNode.insertBefore(oa,v.nextSibling),v=oa;k.appendChild(ca);da();return k};+StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var v=function(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})},G=this.editorUi,I=G.editor.graph,M=document.createElement("div");M.style.whiteSpace="nowrap";M.style.paddingLeft="24px";M.style.paddingRight="20px";k.style.paddingLeft="16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(M);var R=document.createElement("div");+R.style.whiteSpace="nowrap";R.style.position="relative";R.style.textAlign="center";R.style.width="210px";for(var Q=[],W=0;W<this.defaultColorSchemes.length;W++){var V=document.createElement("div");V.style.display="inline-block";V.style.width="6px";V.style.height="6px";V.style.marginLeft="4px";V.style.marginRight="3px";V.style.borderRadius="3px";V.style.cursor="pointer";V.style.background="transparent";V.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ea){mxEvent.addListener(V,"click",+mxUtils.bind(this,function(){X(ea)}))})(W);Q.push(V);R.appendChild(V)}var X=mxUtils.bind(this,function(ea){null!=Q[ea]&&(null!=this.format.currentScheme&&null!=Q[this.format.currentScheme]&&(Q[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ea,Z(this.defaultColorSchemes[this.format.currentScheme]),Q[this.format.currentScheme].style.background="#84d7ff")}),Z=mxUtils.bind(this,function(ea){var ca=mxUtils.clone(I.defaultVertexStyle);ca[mxConstants.STYLE_STROKECOLOR]=+null!=ca[mxConstants.STYLE_STROKECOLOR]?ca[mxConstants.STYLE_STROKECOLOR]:"default";ca[mxConstants.STYLE_FILLCOLOR]=null!=ca[mxConstants.STYLE_FILLCOLOR]?ca[mxConstants.STYLE_FILLCOLOR]:"default";ca[mxConstants.STYLE_FONTCOLOR]=null!=ca[mxConstants.STYLE_FONTCOLOR]?ca[mxConstants.STYLE_FONTCOLOR]:"default";I.replaceDefaultColors(new mxCell,ca);var fa=mxUtils.bind(this,function(da){var ha=mxUtils.button("",mxUtils.bind(this,function(ia){I.getModel().beginUpdate();try{for(var va=G.getSelectionState().cells,+ua=0;ua<va.length;ua++){var wa=I.getModel().getStyle(va[ua]);null!=da?(mxEvent.isShiftDown(ia)||(wa=""==da.fill||null==da.fill?mxUtils.setStyle(wa,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(wa,mxConstants.STYLE_FILLCOLOR,da.fill),wa=""==da.gradient||null==da.gradient?mxUtils.setStyle(wa,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(wa,mxConstants.STYLE_GRADIENTCOLOR,da.gradient),mxEvent.isControlDown(ia)||mxClient.IS_MAC&&mxEvent.isMetaDown(ia)||!I.getModel().isVertex(va[ua])||(wa=+""==da.font||null==da.font?mxUtils.setStyle(wa,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(wa,mxConstants.STYLE_FONTCOLOR,da.font))),mxEvent.isAltDown(ia)||(wa=""==da.stroke||null==da.fill?mxUtils.setStyle(wa,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(wa,mxConstants.STYLE_STROKECOLOR,da.stroke))):(wa=mxUtils.setStyle(wa,mxConstants.STYLE_FILLCOLOR,null),wa=mxUtils.setStyle(wa,mxConstants.STYLE_STROKECOLOR,null),wa=mxUtils.setStyle(wa,mxConstants.STYLE_GRADIENTCOLOR,null),I.getModel().isVertex(va[ua])&&+(wa=mxUtils.setStyle(wa,mxConstants.STYLE_FONTCOLOR,null)));I.getModel().setStyle(va[ua],wa)}}finally{I.getModel().endUpdate()}}));ha.className="geStyleButton";ha.style.width="36px";ha.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ha.style.margin="0px 6px 6px 0px";if(null!=da){var na="1px solid";null!=da.border&&(na=da.border);if(null!=da.gradient)ha.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(da.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(da.gradient).cssText++" 100%)";else if(da.fill==mxConstants.NONE)ha.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==da.fill||""==da.fill)ha.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var oa=mxUtils.getLightDarkColor(da.fill);ha.style.backgroundImage="linear-gradient(to right bottom, "+oa.cssText+" 50%, "+oa.light+" 50.3%)"}null==da.stroke||da.stroke==mxConstants.NONE?ha.style.border=na+" transparent":""==da.stroke?ha.style.border=+"1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(oa=mxUtils.getLightDarkColor(da.stroke),ha.style.border=na+" "+oa.cssText,ha.style.borderRightColor=oa.light,ha.style.borderBottomColor=ha.style.borderRightColor);null!=da.title&&ha.setAttribute("title",da.title)}else na=mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff"),oa=mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000"),ha.style.backgroundColor=na,ha.style.border="1px solid "++oa;ha.style.borderRadius="0";M.appendChild(ha);null!=da&&null!=da.gradient&&(na=ha.cloneNode(!1),na.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(da.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(da.gradient).light+") 100%)",na.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",na.style.backgroundColor="transparent",M.appendChild(na),na.style.marginLeft="-42px",mxEvent.addListener(na,"click",function(){ha.click()}))});M.innerText=+"";if(null!=ea)for(var aa=0;aa<ea.length;aa++)0<aa&&0==mxUtils.mod(aa,4)&&mxUtils.br(M),fa(ea[aa])});null==this.format.currentScheme?X(Math.min(Q.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):X(this.format.currentScheme);W=10>=this.defaultColorSchemes.length?28:8;var Y=document.createElement("div");Y.style.cssText="position:absolute;left:10px;top:8px;bottom:"+W+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";+mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ba=document.createElement("div");ba.style.cssText="position:absolute;left:202px;top:8px;bottom:"+W+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";+1<this.defaultColorSchemes.length&&(k.appendChild(Y),k.appendChild(ba));mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));v(Y);v(ba);Z(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(R)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.isGoogleFontUrl=function(k){return k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return k};Graph.createFontElement=function(k,v){var G=Graph.fontMapping[v];null==G&&Graph.isCssFontUrl(v)?(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(v))):(null==G&&(G='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+v+'");\n}'),k=document.createElement("style"),mxUtils.write(k,G));return k};Graph.addRecentCustomFont=function(k,v){};Graph.addFont=function(k,v,G){if(null!=k&&0<k.length&&null!=v&&0<v.length){var I=k.toLowerCase();if("helvetica"!=I&&"arial"!=k&&"sans-serif"!=I){var M=Graph.customFontElements[I];null!=M&&M.url!=v&&(M.elt.parentNode.removeChild(M.elt),M=null);null==M?(M=v,"http:"==v.substring(0,5)&&(M=PROXY_URL+"?url="+encodeURIComponent(v)),M={name:k,url:v,elt:Graph.createFontElement(k,M)},Graph.customFontElements[I]=M,v=document.getElementsByTagName("head")[0],null!=G&&("link"==M.elt.nodeName.toLowerCase()?(M.elt.onload=G,M.elt.onerror=G):G()),null!=v&&v.appendChild(M.elt)):null!=G&&G()}else null!=G&&G()}else null!=G&&G();return k};Graph.getFontUrl=function(k,v){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(v=k.url);return v};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var v=0;v<k.length;v++){var G=k[v].getAttribute("data-font-src");if(null!=G){var I="FONT"==k[v].nodeName?k[v].getAttribute("face"):k[v].style.fontFamily;null!=I&&Graph.addFont(I,G)}}};Graph.processFontStyle=function(k){if(null!=k){var v=mxUtils.getValue(k,"fontSource",null);if(null!=v){var G=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=G)try{Graph.addFont(G,decodeURIComponent(v))}catch(I){}}}return k};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var f=Graph.prototype.init;Graph.prototype.init=function(){function k(M){v=M}f.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var v=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(M){v=null});this.isMouseInsertPoint=function(){return null!=-v};var G=this.getInsertPoint;this.getInsertPoint=function(){return null!=v?this.getPointForEvent(v):G.apply(this,arguments)};var I=this.layoutManager.getLayout;this.layoutManager.getLayout=function(M){var N=this.graph.getCellStyle(M);if(null!=N&&"rack"==N.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=N.rackUnitSize?parseFloat(N.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=N.marginLeft||0;S.marginRight=N.marginRight||0;S.marginTop=-N.marginTop||0;S.marginBottom=N.marginBottom||0;S.allowGaps=N.allowGaps||0;S.horizontal="1"==mxUtils.getValue(N,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return I.apply(this,arguments)};this.updateGlobalUrlVariables()};var p=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(p.apply(this,arguments))};var n=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,G,I,M,N,S,V,W,X,-Z,Y){n.apply(this,arguments);Graph.processFontAttributes(Y)};var t=mxText.prototype.redraw;mxText.prototype.redraw=function(){t.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,v,G,I){function M(){for(var fa=V.getSelectionCells(),aa=[],da=0;da<fa.length;da++)V.isCellVisible(fa[da])&&aa.push(fa[da]);V.setSelectionCells(aa)}function N(fa){V.setHiddenTags(fa?[]:W.slice());M();V.refresh()}function S(fa,-aa){Z.innerText="";if(0<fa.length){var da=document.createElement("table");da.setAttribute("cellpadding","2");da.style.boxSizing="border-box";da.style.tableLayout="fixed";da.style.width="100%";var ha=document.createElement("tbody");if(null!=fa&&0<fa.length)for(var pa=0;pa<fa.length;pa++)(function(na){function ia(){var oa=V.getCellsForTags([na],null,null,!0);V.isEnabled()?V.setSelectionCells(oa):V.highlightCells(oa,null,null,70)}var wa=0>mxUtils.indexOf(V.hiddenTags,na),ua=document.createElement("tr"),-va=document.createElement("td");va.style.align="center";va.style.width="16px";var Ca=document.createElement("img");Ca.setAttribute("src",wa?Editor.visibleImage:Editor.hiddenImage);Ca.setAttribute("title",mxResources.get(wa?"hideIt":"show",[na]));mxUtils.setOpacity(Ca,wa?75:25);Ca.className="geAdaptiveAsset";Ca.style.verticalAlign="middle";Ca.style.cursor="pointer";Ca.style.width="16px";if(v||Editor.isDarkMode())Ca.style.filter="invert(100%)";va.appendChild(Ca);mxEvent.addListener(Ca,"click",function(oa){mxEvent.isShiftDown(oa)?-N(0<=mxUtils.indexOf(V.hiddenTags,na)):(V.toggleHiddenTag(na),M(),V.refresh());mxEvent.consume(oa)});ua.appendChild(va);va=document.createElement("td");va.style.align="center";va.style.width="16px";Ca=document.createElement("img");Ca.setAttribute("src",Editor.selectImage);Ca.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Ca,wa?75:25);Ca.className="geAdaptiveAsset";Ca.style.verticalAlign="middle";Ca.style.cursor="pointer";Ca.style.width="16px";if(v||Editor.isDarkMode())Ca.style.filter=-"invert(100%)";mxEvent.addListener(Ca,"click",function(oa){N(!0);ia();mxEvent.consume(oa)});va.appendChild(Ca);ua.appendChild(va);va=document.createElement("td");va.style.overflow="hidden";va.style.whiteSpace="nowrap";va.style.textOverflow="ellipsis";va.style.verticalAlign="middle";va.style.cursor="pointer";va.setAttribute("title",na);a=document.createElement("a");mxUtils.write(a,na);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,wa?100:40);va.appendChild(a);mxEvent.addListener(va,-"click",function(oa){if(mxEvent.isShiftDown(oa))N(!0),ia();else if(wa&&0<V.hiddenTags.length)N(!0);else{var ma=W.slice(),Aa=mxUtils.indexOf(ma,na);ma.splice(Aa,1);V.setHiddenTags(ma);M();V.refresh()}mxEvent.consume(oa)});ua.appendChild(va);if(V.isEnabled()){va=document.createElement("td");va.style.verticalAlign="middle";va.style.textAlign="center";va.style.width="18px";if(null==aa){va.style.align="center";va.style.width="16px";Ca=document.createElement("img");Ca.setAttribute("src",Editor.trashImage);-Ca.setAttribute("title",mxResources.get("removeIt",[na]));mxUtils.setOpacity(Ca,wa?75:25);Ca.className="geAdaptiveAsset";Ca.style.verticalAlign="middle";Ca.style.cursor="pointer";Ca.style.width="16px";if(v||Editor.isDarkMode())Ca.style.filter="invert(100%)";mxEvent.addListener(Ca,"click",function(oa){var ma=mxUtils.indexOf(W,na);0<=ma&&W.splice(ma,1);V.removeTagsForCells(V.model.getDescendants(V.model.getRoot()),[na]);V.refresh();mxEvent.consume(oa)});va.appendChild(Ca)}else{var ja=document.createElement("input");-ja.setAttribute("type","checkbox");ja.style.margin="0px";ja.defaultChecked=null!=aa&&0<=mxUtils.indexOf(aa,na);ja.checked=ja.defaultChecked;ja.style.background="transparent";ja.setAttribute("title",mxResources.get(ja.defaultChecked?"removeIt":"add",[na]));mxEvent.addListener(ja,"change",function(oa){ja.checked?V.addTagsForCells(V.getSelectionCells(),[na]):V.removeTagsForCells(V.getSelectionCells(),[na]);mxEvent.consume(oa)});va.appendChild(ja)}ua.appendChild(va)}ha.appendChild(ua)})(fa[pa]);da.appendChild(ha);-Z.appendChild(da)}}var V=this,W=V.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var Z=document.createElement("div");Z.style.position="absolute";Z.style.boxSizing="border-box";Z.style.userSelect="none";Z.style.overflow="auto";Z.style.padding="3px";Z.style.left="0px";Z.style.right="0px";Z.style.top="0px";Z.style.bottom="0px";X.appendChild(Z);V.addListener(mxEvent.ROOT,function(){W=V.hiddenTags.slice()});-var Y=mxUtils.bind(this,function(fa,aa){if(k()){fa=V.getAllTags();for(aa=0;aa<fa.length;aa++)0>mxUtils.indexOf(W,fa[aa])&&W.push(fa[aa]);W.sort();V.isSelectionEmpty()?S(W):S(W,V.getCommonTagsForCells(V.getSelectionCells()))}});V.selectionModel.addListener(mxEvent.CHANGE,Y);V.model.addListener(mxEvent.CHANGE,Y);V.addListener(mxEvent.REFRESH,Y);var ba=document.createElement("div");ba.className="geToolbarContainer";ba.style.position="absolute";ba.style.display="flex";ba.style.bottom="0px";ba.style.left=-"0px";ba.style.right="0px";ba.style.height="26px";ba.style.overflow="hidden";ba.style.padding="3px 4px 4px 4px";ba.style.borderWidth="1px 0px 0px 0px";ba.style.borderStyle="solid";ba.style.whiteSpace="nowrap";if(V.isEnabled()){Z.style.bottom="34px";var ea=document.createElement("a");ea.className="geToolbarButton geAdaptiveAsset geToggleItem";ea.style.width="16px";ea.style.height="18px";ea.style.backgroundPosition="center center";ea.style.backgroundRepeat="no-repeat";ea.style.backgroundSize="20px";-ea.style.margin="0 2px";ea.style.display="inline-block";ea.style.cursor="pointer";var ca=ea.cloneNode(!1);ca.style.backgroundImage="url("+Editor.visibleImage+")";ca.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(ca,"click",function(fa){V.setHiddenTags([]);mxEvent.isShiftDown(fa)||(W=V.hiddenTags.slice());M();V.refresh();mxEvent.consume(fa)});ba.appendChild(ca);null!=G&&(ea=ea.cloneNode(!1),ea.style.backgroundImage="url("+Editor.plusImage+")",ea.setAttribute("title",mxResources.get("add")),-mxEvent.addListener(ea,"click",function(fa){G(W,function(aa){W=aa;Y()});mxEvent.consume(fa)}),ba.appendChild(ea));X.appendChild(ba)}null!=I&&ba.appendChild(I);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var v in Graph.customFontElements){var G=Graph.customFontElements[v];k.push({name:G.name,url:G.url})}return k};Graph.prototype.setFont=function(k,v){Graph.addFont(k,v);var G=Editor.guid();document.execCommand("fontname",!1,G);for(var I=-this.cellEditor.textarea.getElementsByTagName("font"),M=!1,N=0;N<I.length;N++)I[N].getAttribute("face")==G&&(M=!0,I[N].setAttribute("face",k),null!=v?I[N].setAttribute("data-font-src",v):I[N].removeAttribute("data-font-src"));M||document.execCommand("fontname",!1,k)};var z=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return z.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;+v};var G=this.getInsertPoint;this.getInsertPoint=function(){return null!=v?this.getPointForEvent(v):G.apply(this,arguments)};var I=this.layoutManager.getLayout;this.layoutManager.getLayout=function(M){var R=this.graph.getCellStyle(M);if(null!=R&&"rack"==R.childLayout){var Q=new mxStackLayout(this.graph,!1);Q.gridSize=null!=R.rackUnitSize?parseFloat(R.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;Q.marginLeft=R.marginLeft||0;Q.marginRight=R.marginRight||0;Q.marginTop=+R.marginTop||0;Q.marginBottom=R.marginBottom||0;Q.allowGaps=R.allowGaps||0;Q.horizontal="1"==mxUtils.getValue(R,"horizontalRack","0");Q.resizeParent=!1;Q.fill=!0;return Q}return I.apply(this,arguments)};this.updateGlobalUrlVariables()};var p=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(p.apply(this,arguments))};var n=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,G,I,M,R,Q,W,V,X,+Z,Y){n.apply(this,arguments);Graph.processFontAttributes(Y)};var t=mxText.prototype.redraw;mxText.prototype.redraw=function(){t.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,v,G,I){function M(){for(var fa=W.getSelectionCells(),aa=[],da=0;da<fa.length;da++)W.isCellVisible(fa[da])&&aa.push(fa[da]);W.setSelectionCells(aa)}function R(fa){W.setHiddenTags(fa?[]:V.slice());M();W.refresh()}function Q(fa,+aa){Z.innerText="";if(0<fa.length){var da=document.createElement("table");da.setAttribute("cellpadding","2");da.style.boxSizing="border-box";da.style.tableLayout="fixed";da.style.width="100%";var ha=document.createElement("tbody");if(null!=fa&&0<fa.length)for(var na=0;na<fa.length;na++)(function(oa){function ia(){var qa=W.getCellsForTags([oa],null,null,!0);W.isEnabled()?W.setSelectionCells(qa):W.highlightCells(qa,null,null,70)}var va=0>mxUtils.indexOf(W.hiddenTags,oa),ua=document.createElement("tr"),+wa=document.createElement("td");wa.style.align="center";wa.style.width="16px";var Ba=document.createElement("img");Ba.setAttribute("src",va?Editor.visibleImage:Editor.hiddenImage);Ba.setAttribute("title",mxResources.get(va?"hideIt":"show",[oa]));mxUtils.setOpacity(Ba,va?75:25);Ba.className="geAdaptiveAsset";Ba.style.verticalAlign="middle";Ba.style.cursor="pointer";Ba.style.width="16px";if(v||Editor.isDarkMode())Ba.style.filter="invert(100%)";wa.appendChild(Ba);mxEvent.addListener(Ba,"click",function(qa){mxEvent.isShiftDown(qa)?+R(0<=mxUtils.indexOf(W.hiddenTags,oa)):(W.toggleHiddenTag(oa),M(),W.refresh());mxEvent.consume(qa)});ua.appendChild(wa);wa=document.createElement("td");wa.style.align="center";wa.style.width="16px";Ba=document.createElement("img");Ba.setAttribute("src",Editor.selectImage);Ba.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Ba,va?75:25);Ba.className="geAdaptiveAsset";Ba.style.verticalAlign="middle";Ba.style.cursor="pointer";Ba.style.width="16px";if(v||Editor.isDarkMode())Ba.style.filter=+"invert(100%)";mxEvent.addListener(Ba,"click",function(qa){R(!0);ia();mxEvent.consume(qa)});wa.appendChild(Ba);ua.appendChild(wa);wa=document.createElement("td");wa.style.overflow="hidden";wa.style.whiteSpace="nowrap";wa.style.textOverflow="ellipsis";wa.style.verticalAlign="middle";wa.style.cursor="pointer";wa.setAttribute("title",oa);a=document.createElement("a");mxUtils.write(a,oa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,va?100:40);wa.appendChild(a);mxEvent.addListener(wa,+"click",function(qa){if(mxEvent.isShiftDown(qa))R(!0),ia();else if(va&&0<W.hiddenTags.length)R(!0);else{var la=V.slice(),Ea=mxUtils.indexOf(la,oa);la.splice(Ea,1);W.setHiddenTags(la);M();W.refresh()}mxEvent.consume(qa)});ua.appendChild(wa);if(W.isEnabled()){wa=document.createElement("td");wa.style.verticalAlign="middle";wa.style.textAlign="center";wa.style.width="18px";if(null==aa){wa.style.align="center";wa.style.width="16px";Ba=document.createElement("img");Ba.setAttribute("src",Editor.trashImage);+Ba.setAttribute("title",mxResources.get("removeIt",[oa]));mxUtils.setOpacity(Ba,va?75:25);Ba.className="geAdaptiveAsset";Ba.style.verticalAlign="middle";Ba.style.cursor="pointer";Ba.style.width="16px";if(v||Editor.isDarkMode())Ba.style.filter="invert(100%)";mxEvent.addListener(Ba,"click",function(qa){var la=mxUtils.indexOf(V,oa);0<=la&&V.splice(la,1);W.removeTagsForCells(W.model.getDescendants(W.model.getRoot()),[oa]);W.refresh();mxEvent.consume(qa)});wa.appendChild(Ba)}else{var ja=document.createElement("input");+ja.setAttribute("type","checkbox");ja.style.margin="0px";ja.defaultChecked=null!=aa&&0<=mxUtils.indexOf(aa,oa);ja.checked=ja.defaultChecked;ja.style.background="transparent";ja.setAttribute("title",mxResources.get(ja.defaultChecked?"removeIt":"add",[oa]));mxEvent.addListener(ja,"change",function(qa){ja.checked?W.addTagsForCells(W.getSelectionCells(),[oa]):W.removeTagsForCells(W.getSelectionCells(),[oa]);mxEvent.consume(qa)});wa.appendChild(ja)}ua.appendChild(wa)}ha.appendChild(ua)})(fa[na]);da.appendChild(ha);+Z.appendChild(da)}}var W=this,V=W.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var Z=document.createElement("div");Z.style.position="absolute";Z.style.boxSizing="border-box";Z.style.userSelect="none";Z.style.overflow="auto";Z.style.padding="3px";Z.style.left="0px";Z.style.right="0px";Z.style.top="0px";Z.style.bottom="0px";X.appendChild(Z);W.addListener(mxEvent.ROOT,function(){V=W.hiddenTags.slice()});+var Y=mxUtils.bind(this,function(fa,aa){if(k()){fa=W.getAllTags();for(aa=0;aa<fa.length;aa++)0>mxUtils.indexOf(V,fa[aa])&&V.push(fa[aa]);V.sort();W.isSelectionEmpty()?Q(V):Q(V,W.getCommonTagsForCells(W.getSelectionCells()))}});W.selectionModel.addListener(mxEvent.CHANGE,Y);W.model.addListener(mxEvent.CHANGE,Y);W.addListener(mxEvent.REFRESH,Y);var ba=document.createElement("div");ba.className="geToolbarContainer";ba.style.position="absolute";ba.style.display="flex";ba.style.bottom="0px";ba.style.left=+"0px";ba.style.right="0px";ba.style.height="26px";ba.style.overflow="hidden";ba.style.padding="3px 4px 4px 4px";ba.style.borderWidth="1px 0px 0px 0px";ba.style.borderStyle="solid";ba.style.whiteSpace="nowrap";if(W.isEnabled()){Z.style.bottom="34px";var ea=document.createElement("a");ea.className="geToolbarButton geAdaptiveAsset geToggleItem";ea.style.width="16px";ea.style.height="18px";ea.style.backgroundPosition="center center";ea.style.backgroundRepeat="no-repeat";ea.style.backgroundSize="20px";+ea.style.margin="0 2px";ea.style.display="inline-block";ea.style.cursor="pointer";var ca=ea.cloneNode(!1);ca.style.backgroundImage="url("+Editor.visibleImage+")";ca.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(ca,"click",function(fa){W.setHiddenTags([]);mxEvent.isShiftDown(fa)||(V=W.hiddenTags.slice());M();W.refresh();mxEvent.consume(fa)});ba.appendChild(ca);null!=G&&(ea=ea.cloneNode(!1),ea.style.backgroundImage="url("+Editor.plusImage+")",ea.setAttribute("title",mxResources.get("add")),+mxEvent.addListener(ea,"click",function(fa){G(V,function(aa){V=aa;Y()});mxEvent.consume(fa)}),ba.appendChild(ea));X.appendChild(ba)}null!=I&&ba.appendChild(I);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var v in Graph.customFontElements){var G=Graph.customFontElements[v];k.push({name:G.name,url:G.url})}return k};Graph.prototype.setFont=function(k,v){Graph.addFont(k,v);var G=Editor.guid();document.execCommand("fontname",!1,G);for(var I=+this.cellEditor.textarea.getElementsByTagName("font"),M=!1,R=0;R<I.length;R++)I[R].getAttribute("face")==G&&(M=!0,I[R].setAttribute("face",k),null!=v?I[R].setAttribute("data-font-src",v):I[R].removeAttribute("data-font-src"));M||document.execCommand("fontname",!1,k)};var z=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return z.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 k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var v in k)this.globalVars[v]=k[v]}catch(G){null!=window.console&&console.log("Error in vars URL parameter: "+G)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var E=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(k){var v=E.apply(this,arguments);-null==v&&null!=this.globalVars&&(v=this.globalVars[k]);return v};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var C=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,v,G,I,M,N,S,V,W,X,Z,Y,ba,ea,ca,fa){var aa=C.apply(this,arguments);if(null!=Y){var da=aa.getAttribute("style");-null==da&&(da="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;aa.setAttribute("style",da+(" color-scheme: "+Y+";"))}var ha=this.getCustomFonts();if(Z&&0<ha.length){var pa=aa.ownerDocument;da=null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"style"):pa.createElement("style");null!=pa.setAttributeNS?da.setAttributeNS("type","text/css"):da.setAttribute("type","text/css");for(var na="",ia="",wa=0;wa<ha.length;wa++){var ua=ha[wa].name,-va=ha[wa].url;Graph.isCssFontUrl(va)?na+="@import url("+Graph.rewriteGoogleFontUrl(va)+");\n":ia+='@font-face {\nfont-family: "'+ua+'";\nsrc: url("'+va+'");\n}\n'}da.appendChild(pa.createTextNode(na+ia));aa.getElementsByTagName("defs")[0].appendChild(da)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(aa);this.mathEnabled&&(document.body.appendChild(aa),Editor.MathJaxRender(aa),aa.parentNode.removeChild(aa),da=aa.ownerDocument.getElementById("MJX-SVG-styles"),-null!=da&&aa.getElementsByTagName("defs")[0].appendChild(da.cloneNode(!0)));return aa};var F=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){F.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var R=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){R.apply(this,arguments);this.enumerationState=+null==v&&null!=this.globalVars&&(v=this.globalVars[k]);return v};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var C=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,v,G,I,M,R,Q,W,V,X,Z,Y,ba,ea,ca,fa){var aa=C.apply(this,arguments);if(null!=Y){var da=aa.getAttribute("style");+null==da&&(da="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;aa.setAttribute("style",da+(" color-scheme: "+Y+";"))}var ha=this.getCustomFonts();if(Z&&0<ha.length){var na=aa.ownerDocument;da=null!=na.createElementNS?na.createElementNS(mxConstants.NS_SVG,"style"):na.createElement("style");null!=na.setAttributeNS?da.setAttributeNS("type","text/css"):da.setAttribute("type","text/css");for(var oa="",ia="",va=0;va<ha.length;va++){var ua=ha[va].name,+wa=ha[va].url;Graph.isCssFontUrl(wa)?oa+="@import url("+Graph.rewriteGoogleFontUrl(wa)+");\n":ia+='@font-face {\nfont-family: "'+ua+'";\nsrc: url("'+wa+'");\n}\n'}da.appendChild(na.createTextNode(oa+ia));aa.getElementsByTagName("defs")[0].appendChild(da)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(aa);this.mathEnabled&&(document.body.appendChild(aa),Editor.MathJaxRender(aa),aa.parentNode.removeChild(aa),da=aa.ownerDocument.getElementById("MJX-SVG-styles"),+null!=da&&aa.getElementsByTagName("defs")[0].appendChild(da.cloneNode(!0)));return aa};var F=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){F.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var S=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){S.apply(this,arguments);this.enumerationState=0};var U=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return U.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(k){var v="1"==mxUtils.getValue(k.style,"enumerate",0);v&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):v||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);v=k.secondLabel;if(null!=v){var G=k.view.scale,I=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?-new mxRectangle(k.x+k.width-4*G,k.y+4*G,0,0):mxRectangle.fromPoint(k.view.getPoint(k));v.bounds.equals(k)&&v.value==I&&v.scale==G||(v.bounds=k,v.value=I,v.scale=G,v.redraw())}};var P=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();P.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var O=-Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){O.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,v){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,v))};Graph.prototype.executeCustomActions=function(k,v,G){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),-null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var I=!1,M=0,N=0,S=mxUtils.bind(this,function(){I||(I=!0,this.model.beginUpdate())}),V=mxUtils.bind(this,function(){I&&(I=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<M&&M--;0==M&&X()}),X=mxUtils.bind(this,function(){if(N<k.length){var Z=this.stoppingCustomActions,Y=k[N++],ba=[];if(null!=Y.open)if(V(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,-G))return}else this.openLink(Y.open);null==Y.wait||Z||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;W()}),M++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=Y.wait?parseInt(Y.wait):1E3),V());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(M++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,-!0)),0,1,W,Z?0:Y.fadeIn.delay));null!=Y.fadeOut&&(M++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,W,Z?0:Y.fadeOut.delay));null!=Y.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,!0),!0)));null!=Y.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(S(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){S();var ea=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ea),-1);this.setCellsVisible(ea,!0)}null!=Y.hide&&(S(),ea=this.getCellsForAction(Y.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ea),0),this.setCellsVisible(ea,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&&(S(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&null!=Y.style.key&&(S(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));ea=[];null!=+new mxRectangle(k.x+k.width-4*G,k.y+4*G,0,0):mxRectangle.fromPoint(k.view.getPoint(k));v.bounds.equals(k)&&v.value==I&&v.scale==G||(v.bounds=k,v.value=I,v.scale=G,v.redraw())}};var O=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();O.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var N=+Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){N.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,v){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,v))};Graph.prototype.executeCustomActions=function(k,v,G){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),+null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var I=!1,M=0,R=0,Q=mxUtils.bind(this,function(){I||(I=!0,this.model.beginUpdate())}),W=mxUtils.bind(this,function(){I&&(I=!1,this.model.endUpdate())}),V=mxUtils.bind(this,function(){0<M&&M--;0==M&&X()}),X=mxUtils.bind(this,function(){if(R<k.length){var Z=this.stoppingCustomActions,Y=k[R++],ba=[];if(null!=Y.open)if(W(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,+G))return}else this.openLink(Y.open);null==Y.wait||Z||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;V()}),M++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=Y.wait?parseInt(Y.wait):1E3),W());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(M++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,+!0)),0,1,V,Z?0:Y.fadeIn.delay));null!=Y.fadeOut&&(M++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,V,Z?0:Y.fadeOut.delay));null!=Y.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,!0),!0)));null!=Y.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(Q(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){Q();var ea=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ea),+1);this.setCellsVisible(ea,!0)}null!=Y.hide&&(Q(),ea=this.getCellsForAction(Y.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ea),0),this.setCellsVisible(ea,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&&(Q(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&null!=Y.style.key&&(Q(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));ea=[];null!=Y.select&&this.isEnabled()&&(ea=this.getCellsForAction(Y.select),this.setSelectionCells(ea));null!=Y.highlight&&(ea=this.getCellsForAction(Y.highlight),this.highlightCells(ea,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity));null!=Y.scroll&&(ea=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<ea.length&&this.scrollCellToVisible(ea[0]);null!=G&&null!=Y.explore&&Graph.exploreFromCell(this,G,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var ca=-Y.tags.toggle;0==ca.length&&(ca=this.getAllTags());for(ea=0;ea<ca.length;ea++)this.toggleHiddenTag(ca[ea])}ca=null;null!=Y.tags.hidden&&(null==ca&&(ca=[]),ca=ca.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==ca&&(ca=[]);var fa=this.getAllTags();for(ea=0;ea<fa.length;ea++)0>mxUtils.indexOf(Y.tags.visible,fa[ea])&&0>mxUtils.indexOf(ca,fa[ea])&&ca.push(fa[ea])}null!=ca&&this.setHiddenTags(ca);this.refresh()}0<ba.length&&(M++,this.executeAnimations(ba,W,Z?1:Y.steps,Z?0:Y.delay));0==M?X():V()}else this.stoppingCustomActions=-this.executingCustomActions=!1,V(),null!=v&&v()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,v){var G=this.getLinkForCell(v);null!=G&&"data:action/json,"==G.substring(0,17)&&this.setLinkForCell(v,this.updateCustomLink(k,G));if(this.isHtmlLabel(v)){var I=document.createElement("div");I.innerHTML=Graph.sanitizeHtml(this.getLabel(v));for(var M=I.getElementsByTagName("a"),N=!1,S=0;S<M.length;S++)G=M[S].getAttribute("href"),null!=G&&"data:action/json,"==G.substring(0,17)&&(M[S].setAttribute("href",-this.updateCustomLink(k,G)),N=!0);N&&this.labelChanged(v,I.innerHTML)}};Graph.prototype.updateCustomLink=function(k,v){if("data:action/json,"==v.substring(0,17))try{var G=JSON.parse(v.substring(17));null!=G.actions&&(this.updateCustomLinkActions(k,G.actions),v="data:action/json,"+JSON.stringify(G))}catch(I){}return v};Graph.prototype.updateCustomLinkActions=function(k,v){for(var G=0;G<v.length;G++){var I=v[G],M;for(M in I)this.updateCustomLinkAction(k,I[M],"cells"),this.updateCustomLinkAction(k,I[M],-"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,v,G){if(null!=v&&null!=v[G]){for(var I=[],M=0;M<v[G].length;M++)if("*"==v[G][M])I.push(v[G][M]);else{var N=k[v[G][M]];null!=N?""!=N&&I.push(N):I.push(v[G][M])}v[G]=I}};Graph.prototype.getCellsForAction=function(k,v){v=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,null,v));if(null!=k.excludeCells){for(var G=[],I=0;I<v.length;I++)0>k.excludeCells.indexOf(v[I].id)&&G.push(v[I]);v=G}return v};Graph.prototype.getCellsById=-function(k){var v=[];if(null!=k)for(var G=0;G<k.length;G++)if("*"==k[G]){var I=this.model.getRoot();v=v.concat(this.model.filterDescendants(function(N){return N!=I},I))}else{var M=this.model.getCell(k[G]);null!=M&&v.push(M)}return v};var m=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return m.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};+Y.tags.toggle;0==ca.length&&(ca=this.getAllTags());for(ea=0;ea<ca.length;ea++)this.toggleHiddenTag(ca[ea])}ca=null;null!=Y.tags.hidden&&(null==ca&&(ca=[]),ca=ca.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==ca&&(ca=[]);var fa=this.getAllTags();for(ea=0;ea<fa.length;ea++)0>mxUtils.indexOf(Y.tags.visible,fa[ea])&&0>mxUtils.indexOf(ca,fa[ea])&&ca.push(fa[ea])}null!=ca&&this.setHiddenTags(ca);this.refresh()}0<ba.length&&(M++,this.executeAnimations(ba,V,Z?1:Y.steps,Z?0:Y.delay));0==M?X():W()}else this.stoppingCustomActions=+this.executingCustomActions=!1,W(),null!=v&&v()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,v){var G=this.getLinkForCell(v);null!=G&&"data:action/json,"==G.substring(0,17)&&this.setLinkForCell(v,this.updateCustomLink(k,G));if(this.isHtmlLabel(v)){var I=document.createElement("div");I.innerHTML=Graph.sanitizeHtml(this.getLabel(v));for(var M=I.getElementsByTagName("a"),R=!1,Q=0;Q<M.length;Q++)G=M[Q].getAttribute("href"),null!=G&&"data:action/json,"==G.substring(0,17)&&(M[Q].setAttribute("href",+this.updateCustomLink(k,G)),R=!0);R&&this.labelChanged(v,I.innerHTML)}};Graph.prototype.updateCustomLink=function(k,v){if("data:action/json,"==v.substring(0,17))try{var G=JSON.parse(v.substring(17));null!=G.actions&&(this.updateCustomLinkActions(k,G.actions),v="data:action/json,"+JSON.stringify(G))}catch(I){}return v};Graph.prototype.updateCustomLinkActions=function(k,v){for(var G=0;G<v.length;G++){var I=v[G],M;for(M in I)this.updateCustomLinkAction(k,I[M],"cells"),this.updateCustomLinkAction(k,I[M],+"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,v,G){if(null!=v&&null!=v[G]){for(var I=[],M=0;M<v[G].length;M++)if("*"==v[G][M])I.push(v[G][M]);else{var R=k[v[G][M]];null!=R?""!=R&&I.push(R):I.push(v[G][M])}v[G]=I}};Graph.prototype.getCellsForAction=function(k,v){v=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,null,v));if(null!=k.excludeCells){for(var G=[],I=0;I<v.length;I++)0>k.excludeCells.indexOf(v[I].id)&&G.push(v[I]);v=G}return v};Graph.prototype.getCellsById=+function(k){var v=[];if(null!=k)for(var G=0;G<k.length;G++)if("*"==k[G]){var I=this.model.getRoot();v=v.concat(this.model.filterDescendants(function(R){return R!=I},I))}else{var M=this.model.getCell(k[G]);null!=M&&v.push(M)}return v};var m=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return m.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var v=mxUtils.indexOf(this.hiddenTags,k);0>v?this.hiddenTags.push(k):0<=v&&this.hiddenTags.splice(v,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;for(var v=0;v<k.length;v++)if(0>mxUtils.indexOf(this.hiddenTags,k[v]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,v,G,-I){var M=[];if(null!=k){v=null!=v?v:this.model.getDescendants(this.model.getRoot());for(var N=0,S={},V=0;V<k.length;V++)0<k[V].length&&(S[k[V]]=!0,N++);for(V=0;V<v.length;V++)if(G&&this.model.getParent(v[V])==this.model.root||this.model.isVertex(v[V])||this.model.isEdge(v[V])){var W=this.getTagsForCell(v[V]),X=!1;if(0<W.length&&(W=W.split(" "),W.length>=k.length)){for(var Z=X=0;Z<W.length&&X<N;Z++)null!=S[W[Z]]&&X++;X=X==N}X&&(1!=I||this.isCellVisible(v[V]))&&M.push(v[V])}}return M};Graph.prototype.getAllTags=-function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var v=null,G=[],I=0;I<k.length;I++){var M=this.getTagsForCell(k[I]);G=[];if(0<M.length){M=M.split(" ");for(var N={},S=0;S<M.length;S++)if(null==v||null!=v[M[S]])N[M[S]]=!0,G.push(M[S]);v=N}else return[]}return G};Graph.prototype.getTagsForCells=function(k){for(var v=[],G={},I=0;I<k.length;I++){var M=this.getTagsForCell(k[I]);if(0<M.length){M=M.split(" ");for(var N=-0;N<M.length;N++)null==G[M[N]]&&(G[M[N]]=!0,v.push(M[N]))}}return v};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var G=0;G<k.length;G++){for(var I=this.getTagsForCell(k[G]),M=I.split(" "),N=!1,S=0;S<v.length;S++){var V=mxUtils.trim(v[S]);""!=V&&0>mxUtils.indexOf(M,V)&&(I=0<I.length?I+" "+V:V,N=!0)}N&&this.setAttributeForCell(k[G],"tags",I)}}finally{this.model.endUpdate()}}};-Graph.prototype.removeTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var G=0;G<k.length;G++){var I=this.getTagsForCell(k[G]);if(0<I.length){for(var M=I.split(" "),N=!1,S=0;S<v.length;S++){var V=mxUtils.indexOf(M,v[S]);0<=V&&(M.splice(V,1),N=!0)}N&&this.setAttributeForCell(k[G],"tags",M.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var v=0;v<k.length;v++)this.model.setVisible(k[v],!this.model.isVisible(k[v]))}finally{this.model.endUpdate()}};-Graph.prototype.setCellsVisible=function(k,v){this.model.beginUpdate();try{for(var G=0;G<k.length;G++)this.model.setVisible(k[G],v)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,v,G,I){for(var M=0;M<k.length;M++)this.highlightCell(k[M],v,G,I)};Graph.prototype.highlightCell=function(k,v,G,I,M){v=null!=v?v:mxConstants.DEFAULT_VALID_COLOR;G=null!=G?G:1E3;k=this.view.getState(k);var N=null;null!=k&&(M=null!=M?M:4,M=Math.max(M+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,-1)+M),N=new mxCellHighlight(this,v,M,!1),null!=I&&(N.opacity=I),N.highlight(k),window.setTimeout(function(){null!=N.shape&&(mxUtils.setPrefixedStyle(N.shape.node.style,"transition","all 1200ms ease-in-out"),N.shape.node.style.opacity=0);window.setTimeout(function(){N.destroy()},1200)},G));return N};Graph.prototype.addSvgShadow=function(k,v,G,I){G=null!=G?G:!1;I=null!=I?I:!0;var M=k.ownerDocument,N=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"filter"):M.createElement("filter");N.setAttribute("id",-this.shadowId);var S=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):M.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");N.appendChild(S);S=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feOffset"):M.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result",-"offsetBlur");N.appendChild(S);S=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feFlood"):M.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");N.appendChild(S);S=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feComposite"):M.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");-S.setAttribute("result","offsetBlur");N.appendChild(S);S=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feBlend"):M.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");N.appendChild(S);S=k.getElementsByTagName("defs");0==S.length?(M=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"defs"):M.createElement("defs"),null!=k.firstChild?k.insertBefore(M,k.firstChild):k.appendChild(M)):M=S[0];M.appendChild(N);G||(v=null!=v?v:k.getElementsByTagName("g")[0],-null!=v&&(v.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&I&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),v=k.getAttribute("viewBox"),null!=v&&0<v.length&&(v=v.split(" "),3<v.length&&(w=parseFloat(v[2])+6,h=parseFloat(v[3])+6,k.setAttribute("viewBox",v[0]+" "+v[1]+" "+w+" "+h))))));return N};Graph.prototype.setShadowVisible=function(k,v){mxClient.IS_SVG&&!mxClient.IS_SF&&(v=+I){var M=[];if(null!=k){v=null!=v?v:this.model.getDescendants(this.model.getRoot());for(var R=0,Q={},W=0;W<k.length;W++)0<k[W].length&&(Q[k[W]]=!0,R++);for(W=0;W<v.length;W++)if(G&&this.model.getParent(v[W])==this.model.root||this.model.isVertex(v[W])||this.model.isEdge(v[W])){var V=this.getTagsForCell(v[W]),X=!1;if(0<V.length&&(V=V.split(" "),V.length>=k.length)){for(var Z=X=0;Z<V.length&&X<R;Z++)null!=Q[V[Z]]&&X++;X=X==R}X&&(1!=I||this.isCellVisible(v[W]))&&M.push(v[W])}}return M};Graph.prototype.getAllTags=+function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var v=null,G=[],I=0;I<k.length;I++){var M=this.getTagsForCell(k[I]);G=[];if(0<M.length){M=M.split(" ");for(var R={},Q=0;Q<M.length;Q++)if(null==v||null!=v[M[Q]])R[M[Q]]=!0,G.push(M[Q]);v=R}else return[]}return G};Graph.prototype.getTagsForCells=function(k){for(var v=[],G={},I=0;I<k.length;I++){var M=this.getTagsForCell(k[I]);if(0<M.length){M=M.split(" ");for(var R=+0;R<M.length;R++)null==G[M[R]]&&(G[M[R]]=!0,v.push(M[R]))}}return v};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var G=0;G<k.length;G++){for(var I=this.getTagsForCell(k[G]),M=I.split(" "),R=!1,Q=0;Q<v.length;Q++){var W=mxUtils.trim(v[Q]);""!=W&&0>mxUtils.indexOf(M,W)&&(I=0<I.length?I+" "+W:W,R=!0)}R&&this.setAttributeForCell(k[G],"tags",I)}}finally{this.model.endUpdate()}}};+Graph.prototype.removeTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var G=0;G<k.length;G++){var I=this.getTagsForCell(k[G]);if(0<I.length){for(var M=I.split(" "),R=!1,Q=0;Q<v.length;Q++){var W=mxUtils.indexOf(M,v[Q]);0<=W&&(M.splice(W,1),R=!0)}R&&this.setAttributeForCell(k[G],"tags",M.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var v=0;v<k.length;v++)this.model.setVisible(k[v],!this.model.isVisible(k[v]))}finally{this.model.endUpdate()}};+Graph.prototype.setCellsVisible=function(k,v){this.model.beginUpdate();try{for(var G=0;G<k.length;G++)this.model.setVisible(k[G],v)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,v,G,I){for(var M=0;M<k.length;M++)this.highlightCell(k[M],v,G,I)};Graph.prototype.highlightCell=function(k,v,G,I,M){v=null!=v?v:mxConstants.DEFAULT_VALID_COLOR;G=null!=G?G:1E3;k=this.view.getState(k);var R=null;null!=k&&(M=null!=M?M:4,M=Math.max(M+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,+1)+M),R=new mxCellHighlight(this,v,M,!1),null!=I&&(R.opacity=I),R.highlight(k),window.setTimeout(function(){null!=R.shape&&(mxUtils.setPrefixedStyle(R.shape.node.style,"transition","all 1200ms ease-in-out"),R.shape.node.style.opacity=0);window.setTimeout(function(){R.destroy()},1200)},G));return R};Graph.prototype.addSvgShadow=function(k,v,G,I){G=null!=G?G:!1;I=null!=I?I:!0;var M=k.ownerDocument,R=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"filter"):M.createElement("filter");R.setAttribute("id",+this.shadowId);var Q=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):M.createElement("feGaussianBlur");Q.setAttribute("in","SourceAlpha");Q.setAttribute("stdDeviation",this.svgShadowBlur);Q.setAttribute("result","blur");R.appendChild(Q);Q=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feOffset"):M.createElement("feOffset");Q.setAttribute("in","blur");Q.setAttribute("dx",this.svgShadowSize);Q.setAttribute("dy",this.svgShadowSize);Q.setAttribute("result",+"offsetBlur");R.appendChild(Q);Q=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feFlood"):M.createElement("feFlood");Q.setAttribute("flood-color",this.svgShadowColor);Q.setAttribute("flood-opacity",this.svgShadowOpacity);Q.setAttribute("result","offsetColor");R.appendChild(Q);Q=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feComposite"):M.createElement("feComposite");Q.setAttribute("in","offsetColor");Q.setAttribute("in2","offsetBlur");Q.setAttribute("operator","in");+Q.setAttribute("result","offsetBlur");R.appendChild(Q);Q=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feBlend"):M.createElement("feBlend");Q.setAttribute("in","SourceGraphic");Q.setAttribute("in2","offsetBlur");R.appendChild(Q);Q=k.getElementsByTagName("defs");0==Q.length?(M=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"defs"):M.createElement("defs"),null!=k.firstChild?k.insertBefore(M,k.firstChild):k.appendChild(M)):M=Q[0];M.appendChild(R);G||(v=null!=v?v:k.getElementsByTagName("g")[0],+null!=v&&(v.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&I&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),v=k.getAttribute("viewBox"),null!=v&&0<v.length&&(v=v.split(" "),3<v.length&&(w=parseFloat(v[2])+6,h=parseFloat(v[3])+6,k.setAttribute("viewBox",v[0]+" "+v[1]+" "+w+" "+h))))));return R};Graph.prototype.setShadowVisible=function(k,v){mxClient.IS_SVG&&!mxClient.IS_SF&&(v=null!=v?v:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),v&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=this.model.getChildCount(this.model.root),v=0;do var G=this.model.getChildAt(this.model.root,v);while(v++<k&&"1"==mxUtils.getValue(this.getCellStyle(G),"locked","0"));null!=G&&this.setDefaultParent(G)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+@@ -12989,33 +12989,33 @@ STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PAT[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=-[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var v=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?v="mxgraph.er":"sysML"==k.substring(0,5)&&(v="mxgraph.sysml"));return v};var u=mxMarker.createMarker;mxMarker.createMarker=function(k,v,G,I,M,N,S,V,W,X){if(null!=G&&null==mxMarker.markers[G]){var Z=this.getPackageForType(G);null!=Z&&mxStencilRegistry.getStencil(Z)}return u.apply(this,arguments)};var A=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,-v,G,I,M,N){"1"==mxUtils.getValue(v.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(v.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return A.apply(this,arguments)};PrintDialog.prototype.create=function(k,v,G){function I(){ea.value=Math.max(1,Math.min(X,Math.max(parseInt(ea.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(X,Math.min(parseInt(ea.value),parseInt(ba.value))))}function M(za){k.lastPrintPagesRadioChecked=Y.checked;k.lastPrintSelectionOnlyChecked=fa.checked;k.lastPrintCropRadioChecked=-da.checked;k.lastPrintFitRadioChecked=ha.checked;Y.checked&&ba.value<ea.value?(k.lastPrintPagesFromInput=ba.value,k.lastPrintPagesToInput=ea.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);sa.value=Math.max(1,Math.min(1600,parseInt(sa.value)))+"%";k.lastPrintZoom=sa.value;k.lastPrintBorder=Aa.value;k.lastPrintGrid=Ia.checked;k.lastPrintTransparent=xa.checked;k.lastPrintInclude=Ba.checked;k.lastPrintSheetsAcross=oa.value;k.lastPrintSheetsDown=ma.value;var Da={};Da.border=parseInt(Aa.value);-Da.scale=parseInt(sa.value)/100;Da.grid=Ia.checked;Da.transparent=xa.checked;Da.includeCopy=Ba.checked;Da.sheetsAcross=parseInt(oa.value);Da.sheetsDown=parseInt(ma.value);Da.pagesFrom=parseInt(ba.value);Da.pagesTo=parseInt(ea.value);Da.allPages=Z.checked;Da.selection=fa.checked;Da.pageView=aa.checked;Da.crop=da.checked;Da.fit=ha.checked;return null!=G?G(!za,Da):k.print(!za,Da)}var N=k.editor.graph,S=document.createElement("div"),V=document.createElement("h3");V.style.width="100%";V.style.textAlign=-"center";V.style.marginTop="0px";mxUtils.write(V,v||mxResources.get("print"));S.appendChild(V);var W=1,X=1;V=document.createElement("div");V.style.whiteSpace="nowrap";var Z=document.createElement("input");Z.style.marginRight="8px";Z.style.marginBottom="8px";Z.setAttribute("type","radio");Z.setAttribute("name","pages-printdialog");V.appendChild(Z);v=document.createElement("span");mxUtils.write(v,mxResources.get("allPages"));mxEvent.addListener(v,"click",function(){Z.checked=!0});V.appendChild(v);mxUtils.br(V);-var Y=Z.cloneNode(!0);V.appendChild(Y);v=document.createElement("span");mxUtils.write(v,mxResources.get("pages")+":");V.appendChild(v);mxEvent.addListener(v,"click",function(){Y.checked=!0});var ba=document.createElement("input");ba.style.margin="0 4px";ba.setAttribute("value","1");ba.setAttribute("type","number");ba.setAttribute("min","1");ba.style.width="40px";V.appendChild(ba);v=document.createElement("span");mxUtils.write(v,mxResources.get("to"));V.appendChild(v);var ea=ba.cloneNode(!0);V.appendChild(ea);-mxEvent.addListener(ba,"focus",function(){Y.checked=!0});mxEvent.addListener(ea,"focus",function(){Y.checked=!0});mxEvent.addListener(ba,"change",I);mxEvent.addListener(ea,"change",I);if(null!=k.pages&&(X=k.pages.length,null!=k.currentPage))for(var ca=0;ca<X;ca++)if(k.currentPage==k.pages[ca]){W=ca+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(ba.value=Math.min(X,Math.max(1,k.lastPrintPagesFromInput)),ea.value=Math.min(X,Math.max(1,k.lastPrintPagesToInput))):(ba.value=W,-ea.value=W);ba.setAttribute("max",X);ea.setAttribute("max",X);ca=mxUtils.button(mxResources.get("currentPage"),function(za){ba.value=W;ea.value=W;Y.checked=!0});ca.setAttribute("title",mxResources.get("currentPage"));ca.style.marginLeft="4px";ca.style.maxWidth="100px";ca.style.overflow="hidden";ca.style.textOverflow="ellipsis";ca.style.whiteSpace="nowrap";V.appendChild(ca);1<X&&S.appendChild(V);V=document.createElement("div");V.style.borderBottom="1px solid lightGray";V.style.paddingBottom="12px";-V.style.marginBottom="12px";V.style.whiteSpace="nowrap";var fa=document.createElement("input");fa.setAttribute("name","pages-printdialog");fa.setAttribute("type",1==X?"checkbox":"radio");fa.style.marginRight="8px";N.isSelectionEmpty()&&fa.setAttribute("disabled","disabled");N.isEnabled()&&(V.appendChild(fa),v=document.createElement("span"),mxUtils.write(v,mxResources.get("selectionOnly")),V.appendChild(v));(N.isEnabled()||1<X)&&S.appendChild(V);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?Y.checked=-!0:!N.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?fa.checked=!0:Z.checked=!0;N.isSelectionEmpty()||mxEvent.addListener(v,"click",function(){fa.checked=!fa.checked});N=document.createElement("div");N.style.whiteSpace="nowrap";var aa=document.createElement("input");aa.style.marginBottom="8px";aa.style.marginRight="8px";aa.setAttribute("type","radio");aa.setAttribute("name","printSize");N.appendChild(aa);v=document.createElement("span");mxUtils.write(v,mxResources.get("pageView"));N.appendChild(v);-mxEvent.addListener(N,"click",function(){aa.checked=!0});S.appendChild(N);N=document.createElement("div");N.style.whiteSpace="nowrap";var da=document.createElement("input");da.style.marginBottom="8px";da.style.marginRight="8px";da.setAttribute("type","radio");da.setAttribute("name","printSize");N.appendChild(da);v=document.createElement("span");mxUtils.write(v,mxResources.get("crop"));N.appendChild(v);mxEvent.addListener(N,"click",function(){da.checked=!0});S.appendChild(N);N=document.createElement("div");-N.style.whiteSpace="nowrap";var ha=document.createElement("input");ha.style.marginBottom="8px";ha.style.marginRight="8px";ha.setAttribute("type","radio");ha.setAttribute("name","printSize");v=document.createElement("div");v.style.display="inline-block";v.style.verticalAlign="top";v.style.paddingTop="2px";v.appendChild(ha);N.appendChild(v);V=document.createElement("table");V.style.display="inline-block";V.style.borderSpacing="0";ca=document.createElement("tbody");var pa=document.createElement("tr"),-na=pa.cloneNode(!0),ia=document.createElement("td"),wa=ia.cloneNode(!0),ua=ia.cloneNode(!0),va=ia.cloneNode(!0),Ca=ia.cloneNode(!0),ja=ia.cloneNode(!0);ia.style.textAlign="right";va.style.textAlign="right";mxUtils.write(ia,mxResources.get("fitTo"));mxEvent.addListener(N,"click",function(za){mxEvent.getSource(za)!=ha&&(ha.checked=!ha.checked)});var oa=document.createElement("input");oa.style.margin="0 2px";oa.style.boxSizing="border-box";oa.setAttribute("value",k.lastPrintSheetsAcross||"1");oa.setAttribute("min",-"1");oa.setAttribute("type","number");oa.style.width="40px";wa.appendChild(oa);v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsAcross"));ua.appendChild(v);mxUtils.write(va,mxResources.get("fitToBy"));var ma=oa.cloneNode(!0);ma.setAttribute("value",k.lastPrintSheetsDown||"1");Ca.appendChild(ma);mxEvent.addListener(oa,"click",function(za){ha.checked=!0;mxEvent.consume(za)});mxEvent.addListener(ma,"click",function(za){ha.checked=!0;mxEvent.consume(za)});k.lastPrintCropRadioChecked?-da.checked=!0:k.lastPrintFitRadioChecked?ha.checked=!0:aa.checked=!0;v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsDown"));ja.appendChild(v);pa.appendChild(ia);pa.appendChild(wa);pa.appendChild(ua);na.appendChild(va);na.appendChild(Ca);na.appendChild(ja);ca.appendChild(pa);ca.appendChild(na);V.appendChild(ca);N.appendChild(V);S.appendChild(N);N=document.createElement("div");N.style.borderTop="1px solid lightGray";N.style.whiteSpace="nowrap";N.style.paddingTop="12px";-N.style.marginTop="12px";N.style.paddingLeft="8px";mxUtils.write(N,mxResources.get("borderWidth")+":");var Aa=document.createElement("input");Aa.setAttribute("type","number");Aa.setAttribute("min","0");Aa.style.width="40px";Aa.style.marginLeft="4px";Aa.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;N.appendChild(Aa);v=document.createElement("span");v.style.marginLeft="8px";mxUtils.write(v,mxResources.get("zoom")+":");N.appendChild(v);var sa=document.createElement("input");-sa.style.width="60px";sa.style.marginLeft="4px";sa.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";N.appendChild(sa);mxUtils.br(N);var Ia=document.createElement("input");Ia.setAttribute("type","checkbox");Ia.style.marginTop="12px";Ia.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;N.appendChild(Ia);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("grid"));N.appendChild(v);mxEvent.addListener(v,"click",function(za){Ia.checked=!0;-mxEvent.consume(za)});var xa=document.createElement("input");xa.setAttribute("type","checkbox");xa.style.marginTop="10px";xa.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=G&&(N.appendChild(xa),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("transparentBackground")),N.appendChild(v),mxEvent.addListener(v,"click",function(za){xa.checked=!0;mxEvent.consume(za)}));var Ba=document.createElement("input");Ba.setAttribute("type","checkbox");-Ba.style.marginTop="10px";Ba.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==G||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(N),N.appendChild(Ba),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram")),N.appendChild(v),mxEvent.addListener(v,"click",function(za){Ba.checked=!0;mxEvent.consume(za)}));S.appendChild(N);v=document.createElement("div");v.style.marginTop="40px";v.style.textAlign=-"right";v.style.whiteSpace="nowrap";k.isOffline()||null!=G||v.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));N=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});N.className="geBtn";k.editor.cancelFirst&&v.appendChild(N);PrintDialog.previewEnabled&&null==G&&(V=mxUtils.button(mxResources.get("preview"),function(){try{k.hideDialog(),M(!1)}catch(za){k.handleError(za)}}),V.className="geBtn",v.appendChild(V));V=mxUtils.button(mxResources.get(null!=G?"export":-PrintDialog.previewEnabled?"print":"ok"),function(){try{k.hideDialog(),M(!0)}catch(za){k.handleError(za)}});V.className="geBtn gePrimaryBtn";v.appendChild(V);k.editor.cancelFirst||v.appendChild(N);S.appendChild(v);if(k.editor.isChromelessView()){var Fa=function(){Editor.isDarkMode()?(S.classList.add("geDarkMode"),S.style.colorScheme="dark"):(S.classList.remove("geDarkMode"),S.style.colorScheme="light")};k.addListener("darkModeChanged",Fa);Fa();var La=function(za,Da){za=Da.getProperty("dialog");S.parentNode==-za.container&&(k.editor.removeListener(La),k.removeListener(Fa))};k.editor.addListener("hideDialog",La)}this.container=S};var B=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=-k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else B.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&-this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),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 H=document.createElement("canvas"),T=new Image;T.onload=function(){try{H.getContext("2d").drawImage(T,+[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var v=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?v="mxgraph.er":"sysML"==k.substring(0,5)&&(v="mxgraph.sysml"));return v};var u=mxMarker.createMarker;mxMarker.createMarker=function(k,v,G,I,M,R,Q,W,V,X){if(null!=G&&null==mxMarker.markers[G]){var Z=this.getPackageForType(G);null!=Z&&mxStencilRegistry.getStencil(Z)}return u.apply(this,arguments)};var A=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,+v,G,I,M,R){"1"==mxUtils.getValue(v.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(v.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return A.apply(this,arguments)};PrintDialog.prototype.create=function(k,v,G,I){function M(){ca.value=Math.max(1,Math.min(Z,Math.max(parseInt(ca.value),parseInt(ea.value))));ea.value=Math.max(1,Math.min(Z,Math.min(parseInt(ca.value),parseInt(ea.value))))}function R(Aa){k.lastPrintPagesRadioChecked=ba.checked;k.lastPrintSelectionOnlyChecked=aa.checked;k.lastPrintCropRadioChecked=+ha.checked;k.lastPrintFitRadioChecked=na.checked;ba.checked&&ea.value<ca.value?(k.lastPrintPagesFromInput=ea.value,k.lastPrintPagesToInput=ca.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);Ia.value=Math.max(1,Math.min(1600,parseInt(Ia.value)))+"%";k.lastPrintZoom=Ia.value;k.lastPrintBorder=sa.value;k.lastPrintGrid=xa.checked;k.lastPrintTransparent=Ca.checked;k.lastPrintInclude=Da.checked;k.lastPrintSheetsAcross=la.value;k.lastPrintSheetsDown=Ea.value;var za={};za.border=parseInt(sa.value);+za.scale=parseInt(Ia.value)/100;za.grid=xa.checked;za.transparent=Ca.checked;za.includeCopy=Da.checked;za.sheetsAcross=parseInt(la.value);za.sheetsDown=parseInt(Ea.value);za.pagesFrom=parseInt(ea.value);za.pagesTo=parseInt(ca.value);za.allPages=Y.checked;za.selection=aa.checked;za.pageView=da.checked;za.crop=ha.checked;za.fit=na.checked;return null!=G?G(!Aa,za):k.print(!Aa,za)}var Q=k.editor.graph,W=document.createElement("div"),V=document.createElement("h3");V.style.width="100%";V.style.textAlign=+"center";V.style.marginTop="0px";mxUtils.write(V,v||mxResources.get("print"));W.appendChild(V);var X=1,Z=1;V=document.createElement("div");V.style.whiteSpace="nowrap";var Y=document.createElement("input");Y.style.marginRight="8px";Y.style.marginBottom="8px";Y.setAttribute("type","radio");Y.setAttribute("name","pages-printdialog");V.appendChild(Y);v=document.createElement("span");mxUtils.write(v,mxResources.get("allPages"));mxEvent.addListener(v,"click",function(){Y.checked=!0});V.appendChild(v);mxUtils.br(V);+var ba=Y.cloneNode(!0);V.appendChild(ba);v=document.createElement("span");mxUtils.write(v,mxResources.get("pages")+":");V.appendChild(v);mxEvent.addListener(v,"click",function(){ba.checked=!0});var ea=document.createElement("input");ea.style.margin="0 4px";ea.setAttribute("value","1");ea.setAttribute("type","number");ea.setAttribute("min","1");ea.style.width="40px";V.appendChild(ea);v=document.createElement("span");mxUtils.write(v,mxResources.get("to"));V.appendChild(v);var ca=ea.cloneNode(!0);V.appendChild(ca);+mxEvent.addListener(ea,"focus",function(){ba.checked=!0});mxEvent.addListener(ca,"focus",function(){ba.checked=!0});mxEvent.addListener(ea,"change",M);mxEvent.addListener(ca,"change",M);if(null!=k.pages&&(Z=k.pages.length,null!=k.currentPage))for(var fa=0;fa<Z;fa++)if(k.currentPage==k.pages[fa]){X=fa+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(ea.value=Math.min(Z,Math.max(1,k.lastPrintPagesFromInput)),ca.value=Math.min(Z,Math.max(1,k.lastPrintPagesToInput))):(ea.value=+X,ca.value=X);ea.setAttribute("max",Z);ca.setAttribute("max",Z);fa=mxUtils.button(mxResources.get("currentPage"),function(Aa){ea.value=X;ca.value=X;ba.checked=!0});fa.setAttribute("title",mxResources.get("currentPage"));fa.style.marginLeft="4px";fa.style.maxWidth="100px";fa.style.overflow="hidden";fa.style.textOverflow="ellipsis";fa.style.whiteSpace="nowrap";V.appendChild(fa);1<Z&&W.appendChild(V);V=document.createElement("div");V.style.borderBottom="1px solid lightGray";V.style.paddingBottom="12px";+V.style.marginBottom="12px";V.style.whiteSpace="nowrap";var aa=document.createElement("input");aa.setAttribute("name","pages-printdialog");aa.setAttribute("type",1==Z?"checkbox":"radio");aa.style.marginRight="8px";Q.isSelectionEmpty()&&aa.setAttribute("disabled","disabled");Q.isEnabled()&&(V.appendChild(aa),v=document.createElement("span"),mxUtils.write(v,mxResources.get("selectionOnly")),V.appendChild(v));(Q.isEnabled()||1<Z)&&W.appendChild(V);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?ba.checked=+!0:!Q.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?aa.checked=!0:Y.checked=!0;Q.isSelectionEmpty()||mxEvent.addListener(v,"click",function(){aa.checked=!aa.checked});Q=document.createElement("div");Q.style.whiteSpace="nowrap";var da=document.createElement("input");da.style.marginBottom="8px";da.style.marginRight="8px";da.setAttribute("type","radio");da.setAttribute("name","printSize");Q.appendChild(da);v=document.createElement("span");mxUtils.write(v,mxResources.get("pageView"));Q.appendChild(v);+mxEvent.addListener(Q,"click",function(){da.checked=!0});W.appendChild(Q);Q=document.createElement("div");Q.style.whiteSpace="nowrap";var ha=document.createElement("input");ha.style.marginBottom="8px";ha.style.marginRight="8px";ha.setAttribute("type","radio");ha.setAttribute("name","printSize");Q.appendChild(ha);v=document.createElement("span");mxUtils.write(v,mxResources.get("crop"));Q.appendChild(v);mxEvent.addListener(Q,"click",function(){ha.checked=!0});W.appendChild(Q);Q=document.createElement("div");+Q.style.whiteSpace="nowrap";var na=document.createElement("input");na.style.marginBottom="8px";na.style.marginRight="8px";na.setAttribute("type","radio");na.setAttribute("name","printSize");v=document.createElement("div");v.style.display="inline-block";v.style.verticalAlign="top";v.style.paddingTop="2px";v.appendChild(na);Q.appendChild(v);V=document.createElement("table");V.style.display="inline-block";V.style.borderSpacing="0";fa=document.createElement("tbody");var oa=document.createElement("tr"),+ia=oa.cloneNode(!0),va=document.createElement("td"),ua=va.cloneNode(!0),wa=va.cloneNode(!0),Ba=va.cloneNode(!0),ja=va.cloneNode(!0),qa=va.cloneNode(!0);va.style.textAlign="right";Ba.style.textAlign="right";mxUtils.write(va,mxResources.get("fitTo"));mxEvent.addListener(Q,"click",function(Aa){mxEvent.getSource(Aa)!=na&&(na.checked=!na.checked)});var la=document.createElement("input");la.style.margin="0 2px";la.style.boxSizing="border-box";la.setAttribute("value",k.lastPrintSheetsAcross||"1");la.setAttribute("min",+"1");la.setAttribute("type","number");la.style.width="40px";ua.appendChild(la);v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsAcross"));wa.appendChild(v);mxUtils.write(Ba,mxResources.get("fitToBy"));var Ea=la.cloneNode(!0);Ea.setAttribute("value",k.lastPrintSheetsDown||"1");ja.appendChild(Ea);mxEvent.addListener(la,"click",function(Aa){na.checked=!0;mxEvent.consume(Aa)});mxEvent.addListener(Ea,"click",function(Aa){na.checked=!0;mxEvent.consume(Aa)});k.lastPrintCropRadioChecked?+ha.checked=!0:k.lastPrintFitRadioChecked?na.checked=!0:da.checked=!0;v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsDown"));qa.appendChild(v);oa.appendChild(va);oa.appendChild(ua);oa.appendChild(wa);ia.appendChild(Ba);ia.appendChild(ja);ia.appendChild(qa);fa.appendChild(oa);fa.appendChild(ia);V.appendChild(fa);Q.appendChild(V);W.appendChild(Q);Q=document.createElement("div");Q.style.borderTop="1px solid lightGray";Q.style.whiteSpace="nowrap";Q.style.paddingTop="12px";+Q.style.marginTop="12px";Q.style.paddingLeft="8px";mxUtils.write(Q,mxResources.get("borderWidth")+":");var sa=document.createElement("input");sa.setAttribute("type","number");sa.setAttribute("min","0");sa.style.width="40px";sa.style.marginLeft="4px";sa.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;Q.appendChild(sa);v=document.createElement("span");v.style.marginLeft="8px";mxUtils.write(v,mxResources.get("zoom")+":");Q.appendChild(v);var Ia=document.createElement("input");+Ia.style.width="60px";Ia.style.marginLeft="4px";Ia.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";Q.appendChild(Ia);mxUtils.br(Q);var xa=document.createElement("input");xa.setAttribute("type","checkbox");xa.style.marginTop="12px";xa.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;Q.appendChild(xa);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("grid"));Q.appendChild(v);mxEvent.addListener(v,"click",function(Aa){xa.checked=!0;+mxEvent.consume(Aa)});var Ca=document.createElement("input");Ca.setAttribute("type","checkbox");Ca.style.marginTop="10px";Ca.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=G&&(Q.appendChild(Ca),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("transparentBackground")),Q.appendChild(v),mxEvent.addListener(v,"click",function(Aa){Ca.checked=!0;mxEvent.consume(Aa)}));var Da=document.createElement("input");Da.setAttribute("type","checkbox");+Da.style.marginTop="10px";Da.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==G||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(Q),Q.appendChild(Da),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram")),Q.appendChild(v),mxEvent.addListener(v,"click",function(Aa){Da.checked=!0;mxEvent.consume(Aa)}));W.appendChild(Q);v=document.createElement("div");v.style.marginTop="40px";v.style.textAlign=+"right";v.style.whiteSpace="nowrap";k.isOffline()||null!=G||v.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));Q=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});Q.className="geBtn";k.editor.cancelFirst&&v.appendChild(Q);PrintDialog.previewEnabled&&null==G&&(V=mxUtils.button(mxResources.get("preview"),function(){try{k.hideDialog(),R(!1)}catch(Aa){k.handleError(Aa)}}),V.className="geBtn",v.appendChild(V));I=null!=I?I:null!=G?"export":PrintDialog.previewEnabled?+"print":"ok";I=mxUtils.button(mxResources.get(I),function(){try{k.hideDialog(),R(!0)}catch(Aa){k.handleError(Aa)}});I.className="geBtn gePrimaryBtn";v.appendChild(I);k.editor.cancelFirst||v.appendChild(Q);W.appendChild(v);if(k.editor.isChromelessView()){var Ka=function(){Editor.isDarkMode()?(W.classList.add("geDarkMode"),W.style.colorScheme="dark"):(W.classList.remove("geDarkMode"),W.style.colorScheme="light")};k.addListener("darkModeChanged",Ka);Ka();var Ja=function(Aa,za){Aa=za.getProperty("dialog");+W.parentNode==Aa.container&&(k.editor.removeListener(Ja),k.removeListener(Ka))};k.editor.addListener("hideDialog",Ja)}this.container=W};var B=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});+this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else B.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),+null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),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 H=document.createElement("canvas"),T=new Image;T.onload=function(){try{H.getContext("2d").drawImage(T,0,0);var k=H.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=k&&6<k.length}catch(v){}};T.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(k){}Editor.prototype.useCanvasForExport=!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(g,l,d){d.ui=g.ui;return l};b.afterDecode=function(g,l,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;d.previousAdaptiveColors=d.adaptiveColors;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(b)})();-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(g,l,d){d.ui=g.ui;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.16";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(g,l,d){d.ui=g.ui;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.1.0";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");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"}};@@ -13025,7 +13025,7 @@ function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi."version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(f){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],e=0;e<arguments.length;e++)c.push(arguments[e]);console.log.apply(console,c)}}catch(f){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");for(var e=[],f=0;f<c.length;f++)e.push(c[f]);for(f=0;f<e.length;f++)EditorUi.replaceSvgImage(e[f])};EditorUi.replaceSvgImage=function(c){try{var e=null;e=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var f=EditorUi.getSvgSubtree(e);if(null!=f&&"svg"==f.nodeName){f.setAttribute("x",c.getAttribute("x"));f.setAttribute("y",c.getAttribute("y"));f.setAttribute("width",c.getAttribute("width"));f.setAttribute("height",c.getAttribute("height"));f.style.fontFamily="initial";var p=mxUtils.createElementNs(f.ownerDocument,mxConstants.NS_SVG,"g");p.appendChild(f);c.hasAttribute("transform")&&p.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(p,c)}}catch(n){}};EditorUi.getSvgSubtree=function(c){var e=Graph.getSvgFromDataUri(c);c=null;if(null!=e){c=Graph.sanitizeNode(mxUtils.parseXml(e).documentElement);e=c.getElementsByTagName("style");if(0<e.length){var f="svg-image-"+Editor.guid();c.setAttribute("id",f);for(var p=document.implementation.createHTMLDocument(""),-n=document.createElement("style"),t=0;t<e.length;t++){n.textContent=e[t].textContent;p.body.appendChild(n);for(var z="",E=0;E<n.sheet.cssRules.length;E++){var C=n.sheet.cssRules[E];if(null!=C.selectorText){for(var F=C.selectorText.split(","),R=0;R<F.length;R++)F[R]="#"+f+" "+F[R];C.selectorText=F.join(",")}z+=C.cssText+"\n"}e[t].textContent=z}}e=c.getElementsByTagName("*");for(f=0;f<e.length;f++)e[f].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';+n=document.createElement("style"),t=0;t<e.length;t++){n.textContent=e[t].textContent;p.body.appendChild(n);for(var z="",E=0;E<n.sheet.cssRules.length;E++){var C=n.sheet.cssRules[E];if(null!=C.selectorText){for(var F=C.selectorText.split(","),S=0;S<F.length;S++)F[S]="#"+f+" "+F[S];C.selectorText=F.join(",")}z+=C.cssText+"\n"}e[t].textContent=z}}e=c.getElementsByTagName("*");for(f=0;f<e.length;f++)e[f].removeAttribute("data-cell-id")}return c};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.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;EditorUi.prototype.webpSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(n){}try{var e=document.createElement("canvas"),@@ -13035,10 +13035,10 @@ e,f)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalDatEditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var e=this.editor.graph;e.mathEnabled=c;null!=e.view.backgroundImage&&(e.view.backgroundImage.destroy(),e.view.backgroundImage=null);this.editor.updateGraphComponents();e.refresh();e.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,e,f){var p=null==c||null==e;f=null!=f?f:24;var n=new Spinner({lines:12,length:f,width:Math.round(f/3),radius:Math.round(f/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",-speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),t=this.timeout,z=n.spin,E=null,C=null,F=mxUtils.bind(this,function(U){null!=U&&U()});n.spin=function(U,P,O,m){m=null!=m?m:t;var u=!1;if(!this.active){var A=Date.now();null!=O&&(E=window.setTimeout(function(){n.stop();E=null;O({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:C})},m));z.call(this,U);this.active=!0;null!=P&&(p&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/+speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),t=this.timeout,z=n.spin,E=null,C=null,F=mxUtils.bind(this,function(U){null!=U&&U()});n.spin=function(U,O,N,m){m=null!=m?m:t;var u=!1;if(!this.active){var A=Date.now();null!=N&&(E=window.setTimeout(function(){n.stop();E=null;N({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:C})},m));z.call(this,U);this.active=!0;null!=O&&(p&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),u=document.createElement("div"),u.className="geSpinnerStatus",u.style.position="absolute",u.style.whiteSpace="nowrap",u.style.background="#4B4243",u.style.color="white",u.style.fontFamily=Editor.defaultHtmlFont,u.style.fontSize="9pt",u.style.padding="6px",u.style.paddingLeft="10px",u.style.paddingRight="10px",u.style.zIndex=2E9,u.style.left=Math.max(0,c)+"px",u.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(u.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(u.style,"transform",-"translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(u.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=P.substring(P.length-3,P.length)&&"!"!=P.charAt(P.length-1)&&(P+="..."),u.innerHTML=mxUtils.htmlEntities(P),U.appendChild(u),n.status=u);this.pause=mxUtils.bind(this,function(){var B=F;this.active&&(m=Math.max(0,m-(Date.now()-A)),B=mxUtils.bind(this,function(H){this.spin(U,P,O,m);if(null!=H)try{H(),C=mxUtils.bind(this,function(){this.spin(U,P,O,m);try{H()}catch(T){null!=O&&O(T)}})}catch(T){null!=-O&&O(T)}}));this.stop();return B});u=!0}return u};var R=n.stop;n.stop=function(){R.call(this);this.active&&(this.active=!1,null!=E&&(window.clearTimeout(E),E=null),null!=n.status&&null!=n.status.parentNode&&n.status.parentNode.removeChild(n.status),n.status=null)};n.pause=function(){return F};return n};EditorUi.prototype.isCompatibleString=function(c){try{var e=mxUtils.parseXml(c),f=this.editor.extractGraphModel(e.documentElement,!0);return null!=f&&0==f.getElementsByTagName("parsererror").length}catch(p){}return!1};+"translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(u.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=O.substring(O.length-3,O.length)&&"!"!=O.charAt(O.length-1)&&(O+="..."),u.innerHTML=mxUtils.htmlEntities(O),U.appendChild(u),n.status=u);this.pause=mxUtils.bind(this,function(){var B=F;this.active&&(m=Math.max(0,m-(Date.now()-A)),B=mxUtils.bind(this,function(H){this.spin(U,O,N,m);if(null!=H)try{H(),C=mxUtils.bind(this,function(){this.spin(U,O,N,m);try{H()}catch(T){null!=N&&N(T)}})}catch(T){null!=+N&&N(T)}}));this.stop();return B});u=!0}return u};var S=n.stop;n.stop=function(){S.call(this);this.active&&(this.active=!1,null!=E&&(window.clearTimeout(E),E=null),null!=n.status&&null!=n.status.parentNode&&n.status.parentNode.removeChild(n.status),n.status=null)};n.pause=function(){return F};return n};EditorUi.prototype.isCompatibleString=function(c){try{var e=mxUtils.parseXml(c),f=this.editor.extractGraphModel(e.documentElement,!0);return null!=f&&0==f.getElementsByTagName("parsererror").length}catch(p){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var e=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var f=e.getFunction,p=this.editor.graph,n=this;e.getFunction=function(t){if(p.isSelectionEmpty()&&null!=n.pages&&0<n.pages.length){var z=n.getSelectedPageIndex();if(mxEvent.isShiftDown(t)){if(37==t.keyCode)return function(){0<z&&n.movePage(z,z-1)};if(38==t.keyCode)return function(){0<z&&n.movePage(z,0)};if(39==t.keyCode)return function(){z<n.pages.length-1&&n.movePage(z,z+1)};if(40==t.keyCode)return function(){z<n.pages.length-1&&n.movePage(z,n.pages.length-1)}}else if(mxEvent.isControlDown(t)||mxClient.IS_MAC&&@@ -13047,12 +13047,12 @@ arguments):null}}return e};var g=EditorUi.prototype.extractGraphModelFromHtml;Ede=null!=t?mxUtils.getXml(t):""}}catch(z){}return e};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var e=c.indexOf('<meta charset="utf-8">');0<=e&&(c=c.slice(0,e)+'<meta charset="utf-8"/>'+c.slice(e+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,e){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",e);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var f=null!=c?this.editor.extractGraphModel(c,!0):null;null!=f&&(c=f);if(null!=c){f=this.editor.graph;f.model.beginUpdate();try{var p=null!=this.pages?this.pages.slice():null,n=c.getElementsByTagName("diagram");if(1<n.length||1==n.length&&n[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var t=n.length-1;0<=t;t--){var z=this.updatePageRoot(new DiagramPage(n[t]));null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[t+1]));f.model.execute(new ChangePage(this,z,0==t?z:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=p)for(t=0;t<p.length;t++)f.model.execute(new ChangePage(this,-p[t],null));var E=this.getCurrentFile();null!=E&&E.fileReplaced(e)}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,e,f,p,n,t,z,E,C,F,R,U,P){e=null!=e?e:this.editor.graph;n=null!=n?n:!1;C=null!=C?C:!0;R=null!=R?R:!Editor.defaultCompressed;var O=null;if(null==f||f.getMode()==App.MODE_DEVICE||f.getMode()==App.MODE_BROWSER)var m="_blank";else O=m=p;if(null==c)return"";var u=c;if("mxfile"!=u.nodeName.toLowerCase()){if(R){var A=c.ownerDocument.createElement("diagram");A.setAttribute("name",+p[t],null));var E=this.getCurrentFile();null!=E&&E.fileReplaced(e)}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,e,f,p,n,t,z,E,C,F,S,U,O){e=null!=e?e:this.editor.graph;n=null!=n?n:!1;C=null!=C?C:!0;S=null!=S?S:!Editor.defaultCompressed;var N=null;if(null==f||f.getMode()==App.MODE_DEVICE||f.getMode()==App.MODE_BROWSER)var m="_blank";else N=m=p;if(null==c)return"";var u=c;if("mxfile"!=u.nodeName.toLowerCase()){if(S){var A=c.ownerDocument.createElement("diagram");A.setAttribute("name",mxResources.get("pageWithNumber",[1]));A.setAttribute("id",Editor.guid());A.appendChild(c)}else{A=Graph.zapGremlins(mxUtils.getXml(c));u=Graph.compress(A);if(Graph.decompress(u)!=A)return A;A=c.ownerDocument.createElement("diagram");A.setAttribute("name",mxResources.get("pageWithNumber",[1]));A.setAttribute("id",Editor.guid());mxUtils.setTextContent(A,u)}u=c.ownerDocument.createElement("mxfile");u.appendChild(A)}F?(u=u.cloneNode(!0),u.removeAttribute("modified"),u.removeAttribute("host"),u.removeAttribute("agent"),u.removeAttribute("etag"),u.removeAttribute("userAgent"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("type")):(u.removeAttribute("userAgent"),u.removeAttribute("modified"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("pages"),u.removeAttribute("type"),u.removeAttribute("etag"),mxClient.IS_CHROMEAPP?u.setAttribute("host","Chrome"):EditorUi.isElectronApp?u.setAttribute("host","Electron"):u.setAttribute("host",window.location.hostname),u.setAttribute("agent",-null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),u.setAttribute("version",EditorUi.VERSION),1<u.getElementsByTagName("diagram").length&&null!=this.pages&&u.setAttribute("pages",this.pages.length));null!=U&&(u=u.cloneNode(!0),u.setAttribute("scale",U));null!=P&&(u=u.cloneNode(!0),u.setAttribute("border",P));c=R?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!t&&!n&&(z||null!=f&&/(\.html)$/i.test(f.getTitle())))c=this.getHtml2(mxUtils.getXml(u),e,null!=f?f.getTitle():null,m,O);else if(t||-!n&&null!=f&&/(\.svg)$/i.test(f.getTitle()))null==f||f.getMode()!=App.MODE_DEVICE&&f.getMode()!=App.MODE_BROWSER||(p=null),f=this.getSvgFileProperties(u),c=this.getEmbeddedSvg(c,e,p,null,E,C,O,null,null,f.scale,f.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,e,f,p){c=null!=c?c:!0;e=null!=e?e:!1;f=null!=f?f:!Editor.defaultCompressed;var n=this.editor.getGraphXml(c,p);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(C){var F=C.getElementsByTagName("mxGraphModel"),-R=0<F.length?F[0]:null;F=C;null==R&&f?(R=mxUtils.getNodeValue(C),0<R.length&&(R=Graph.decompress(R),null!=R&&0<R.length&&(F=C.cloneNode(!1),F.appendChild(mxUtils.parseXml(R).documentElement)))):null==R||f?F=C.cloneNode(!0):(F=C.cloneNode(!1),mxUtils.setTextContent(F,Graph.compressNode(R)));n.appendChild(F)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(n),n=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var t=this.pages[e],+null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),u.setAttribute("version",EditorUi.VERSION),1<u.getElementsByTagName("diagram").length&&null!=this.pages&&u.setAttribute("pages",this.pages.length));null!=U&&(u=u.cloneNode(!0),u.setAttribute("scale",U));null!=O&&(u=u.cloneNode(!0),u.setAttribute("border",O));c=S?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!t&&!n&&(z||null!=f&&/(\.html)$/i.test(f.getTitle())))c=this.getHtml2(mxUtils.getXml(u),e,null!=f?f.getTitle():null,m,N);else if(t||+!n&&null!=f&&/(\.svg)$/i.test(f.getTitle()))null==f||f.getMode()!=App.MODE_DEVICE&&f.getMode()!=App.MODE_BROWSER||(p=null),f=this.getSvgFileProperties(u),c=this.getEmbeddedSvg(c,e,p,null,E,C,N,null,null,f.scale,f.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,e,f,p){c=null!=c?c:!0;e=null!=e?e:!1;f=null!=f?f:!Editor.defaultCompressed;var n=this.editor.getGraphXml(c,p);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(C){var F=C.getElementsByTagName("mxGraphModel"),+S=0<F.length?F[0]:null;F=C;null==S&&f?(S=mxUtils.getNodeValue(C),0<S.length&&(S=Graph.decompress(S),null!=S&&0<S.length&&(F=C.cloneNode(!1),F.appendChild(mxUtils.parseXml(S).documentElement)))):null==S||f?F=C.cloneNode(!0):(F=C.cloneNode(!1),mxUtils.setTextContent(F,Graph.compressNode(S)));n.appendChild(F)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(n),n=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var t=this.pages[e],z=t.node;if(t!=this.currentPage)if(t.needsUpdate){var E=new mxCodec(mxUtils.createXmlDocument());E=E.encode(new mxGraphModel(t.root));this.editor.graph.saveViewState(t.viewState,E,null,p);EditorUi.removeChildNodes(z);z.appendChild(E);delete t.needsUpdate}else p&&(this.updatePageRoot(t),null!=t.viewState.backgroundImage&&(null!=t.viewState.backgroundImage.originalSrc?t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.originalSrc,t):Graph.isPageLink(t.viewState.backgroundImage.src)&&(t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.src,t))),null!=t.viewState.backgroundImage&&null!=t.viewState.backgroundImage.originalSrc&&(E=new mxCodec(mxUtils.createXmlDocument()),E=E.encode(new mxGraphModel(t.root)),this.editor.graph.saveViewState(t.viewState,E,null,p),z=z.cloneNode(!1),z.appendChild(E)));c(z)}return n};EditorUi.prototype.anonymizeString=function(c,e){for(var f=[],p=0;p<c.length;p++){var n=c.charAt(p);0<=EditorUi.ignoredAnonymizedChars.indexOf(n)?f.push(n):isNaN(parseInt(n))?n.toLowerCase()!=n?f.push(String.fromCharCode(65+Math.round(25*Math.random()))):n.toUpperCase()!=n?f.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(n)?f.push(" "):f.push("?"):f.push(e?"0":Math.round(9*Math.random()))}return f.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSERT].length;e++)try{var f=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][e].data).documentElement.cloneNode(!1);@@ -13061,9 +13061,9 @@ null!=z[E].xmlValue&&(z[E].xmlValue="["+z[E].xmlValue.length+"]"),null!=z[E].stye){if(null!=c.attributes)for(var f=0;f<c.attributes.length;f++)"as"!=c.attributes[f].name&&c.setAttribute(c.attributes[f].name,this.anonymizeString(c.attributes[f].value,e));if(null!=c.childNodes)for(f=0;f<c.childNodes.length;f++)this.anonymizeAttributes(c.childNodes[f],e)};EditorUi.prototype.anonymizeNode=function(c,e){e=c.getElementsByTagName("mxCell");for(var f=0;f<e.length;f++)null!=e[f].getAttribute("value")&&e[f].setAttribute("value","["+e[f].getAttribute("value").length+"]"),null!=e[f].getAttribute("xmlValue")&&e[f].setAttribute("xmlValue","["+e[f].getAttribute("xmlValue").length+"]"),null!=e[f].getAttribute("style")&&e[f].setAttribute("style","["+e[f].getAttribute("style").length+"]"),null!=e[f].parentNode&&"root"!=e[f].parentNode.nodeName&&null!=e[f].parentNode.parentNode&&(e[f].setAttribute("id",e[f].parentNode.getAttribute("id")),e[f].parentNode.parentNode.replaceChild(e[f],e[f].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var e=this.getCurrentFile();null!=e&&(e.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&e.invalidChecksum?e.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(e.clearAutosave(),this.editor.setStatus(""),c?e.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(f){this.spinner.stop();e.handleFileError(f,!0)})):e.synchronizeFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),-mxUtils.bind(this,function(f){e.handleFileError(f,!0)}))))};EditorUi.prototype.getFileData=function(c,e,f,p,n,t,z,E,C,F,R,U,P){n=null!=n?n:!0;t=null!=t?t:!1;F=null!=F?F:!Editor.defaultCompressed;var O=this.editor.graph;if((e||!c&&null!=C&&/(\.svg)$/i.test(C.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var m=O.getGlobalVariable;O=this.createTemporaryGraph(O.getStylesheet());O.setBackgroundImage=this.editor.graph.setBackgroundImage;O.background=this.editor.graph.background;var u=-null!=this.pages?this.pages[0]:null;null==u||this.currentPage==u?O.setBackgroundImage(this.editor.graph.backgroundImage):null!=u.viewState&&null!=u.viewState&&O.setBackgroundImage(u.viewState.backgroundImage);O.getGlobalVariable=function(A){return"page"==A&&null!=u?u.getName():"pagenumber"==A?1:m.apply(this,arguments)};document.body.appendChild(O.container);null!=u&&O.model.setRoot(u.root)}z=null!=z?z:this.getXmlFileData(n,t,F,R);C=null!=C?C:this.getCurrentFile();c=this.createFileData(z,O,C,window.location.href,-c,e,f,p,n,E,F,U,P);O!=this.editor.graph&&O.container.parentNode.removeChild(O.container);return c};EditorUi.prototype.getHtml=function(c,e,f,p,n,t){t=null!=t?t:!0;var z=null,E=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){z=t?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var C=e.view.scale;t=Math.floor(z.x/C-e.view.translate.x);C=Math.floor(z.y/C-e.view.translate.y);z=e.background;null==n&&(e=this.getBasenames().join(";"),0<e.length&&(E=EditorUi.drawHost+"/embed.js?s="+e));+mxUtils.bind(this,function(f){e.handleFileError(f,!0)}))))};EditorUi.prototype.getFileData=function(c,e,f,p,n,t,z,E,C,F,S,U,O){n=null!=n?n:!0;t=null!=t?t:!1;F=null!=F?F:!Editor.defaultCompressed;var N=this.editor.graph;if((e||!c&&null!=C&&/(\.svg)$/i.test(C.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var m=N.getGlobalVariable;N=this.createTemporaryGraph(N.getStylesheet());N.setBackgroundImage=this.editor.graph.setBackgroundImage;N.background=this.editor.graph.background;var u=+null!=this.pages?this.pages[0]:null;null==u||this.currentPage==u?N.setBackgroundImage(this.editor.graph.backgroundImage):null!=u.viewState&&null!=u.viewState&&N.setBackgroundImage(u.viewState.backgroundImage);N.getGlobalVariable=function(A){return"page"==A&&null!=u?u.getName():"pagenumber"==A?1:m.apply(this,arguments)};document.body.appendChild(N.container);null!=u&&N.model.setRoot(u.root)}z=null!=z?z:this.getXmlFileData(n,t,F,S);C=null!=C?C:this.getCurrentFile();c=this.createFileData(z,N,C,window.location.href,+c,e,f,p,n,E,F,U,O);N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);return c};EditorUi.prototype.getHtml=function(c,e,f,p,n,t){t=null!=t?t:!0;var z=null,E=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){z=t?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var C=e.view.scale;t=Math.floor(z.x/C-e.view.translate.x);C=Math.floor(z.y/C-e.view.translate.y);z=e.background;null==n&&(e=this.getBasenames().join(";"),0<e.length&&(E=EditorUi.drawHost+"/embed.js?s="+e));c.setAttribute("x0",t);c.setAttribute("y0",C)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=p&&c.setAttribute("edit",p));null!=n&&(n=n.replace(/&/g,"&"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";p=Graph.compress(c);Graph.decompress(p)!=c&&(p=encodeURIComponent(c));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!=f?"<title>"+mxUtils.htmlEntities(f)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&null!=z&&z!=mxConstants.NONE?' style="background-color:'+z+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+p+"</div>\n</div>\n"+(null==n?'<script type="text/javascript" src="'+E+'">\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(c,e,f,p,n){e=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=n&&(n=n.replace(/&/g,"&"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,@@ -13072,21 +13072,21 @@ n+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph"function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var e=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,f=Editor.extractParserError(e,mxResources.get("invalidOrMissingFile"));if(f)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[e],"cause",[f]),Error(mxResources.get("notADiagramFile")+" ("+f+")");c=null!=e?this.editor.extractGraphModel(e,!0):null;null!=c&&(e=c);if(null!=e&&"mxfile"==e.nodeName&&(c=e.getElementsByTagName("diagram"),f={},0<c.length)){var p=this.getHashObject(),n=null;this.fileNode=e;this.pages=[];for(var t=0;t<c.length;t++){null==c[t].getAttribute("id")&&c[t].setAttribute("id",t);e=new DiagramPage(c[t]);null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[t+1]));this.pages.push(e);if(null==p.pageId&&null!=urlParams["page-id"]&&e.getId()==urlParams["page-id"]||null!=p.pageId&&e.getId()==p.pageId)n=e;if(null==f[e.getId()])f[e.getId()]=e;else throw Error(e.getId()+": Duplicate page ID");}this.currentPage=null!=n?n:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];e=this.currentPage.node}null==this.fileNode&&null!=e&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(e);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),-this.scrollToPage());if(null!=urlParams["layer-ids"])try{var z=decodeURIComponent(urlParams["layer-ids"]).split(" ");e={};for(t=0;t<z.length;t++)e[z[t]]=!0;var E=this.editor.graph.getModel(),C=E.getChildren(E.root);for(t=0;t<C.length;t++){var F=C[t];E.setVisible(F,e[F.id]||!1)}}catch(R){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=-e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,f,p,n,t,z,E,C,F,R,U,P,O,m,u){try{p=null!=p?p:this.editor.graph.isSelectionEmpty();var A=this.getBaseFilename(!n),B=A+("xml"==c||"pdf"==c&&R?".drawio":"")+"."+c;-if("xml"==c){var H=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,p,n,null,null,null,e);this.saveData(B,c,H,"text/xml")}else if("html"==c)H=this.getHtml2(this.getFileData(!0),this.editor.graph,A),this.saveData(B,c,H,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==c?B=A+".png":"jpeg"==c&&(B=A+".jpg"),this.saveRequest(B,c,mxUtils.bind(this,function(I,M){try{return this.createDownloadRequest(I,c,p,M,z,n,E,C,F,R,U,void 0,-void 0,!t,P,O,m,u)}catch(N){this.handleError(N)}}));else{var T=null,k=mxUtils.bind(this,function(I){I.length<=MAX_REQUEST_SIZE?this.saveData(B,"svg",I,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});if("svg"==c){var v=this.editor.graph.background;if(z||v==mxConstants.NONE)v=null;var G=this.editor.graph.getSvg(v,null,null,null,null,p);f&&this.editor.graph.addSvgShadow(G);this.editor.convertImages(G,-mxUtils.bind(this,mxUtils.bind(this,function(I){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(I))})))}else B=A+".svg",T=this.getFileData(!1,!0,null,mxUtils.bind(this,function(I){this.spinner.stop();k(I)}),p)}}catch(I){this.handleError(I)}};EditorUi.prototype.createDownloadRequest=function(c,e,f,p,n,t,z,E,C,F,R,U,P,O,m,u,A,B){c=this.downloadRequestBuilder(c,e,f,p,n,t,z,E,C,F,R,U,P,O,m,u,A,B);e="";for(var H in c)f=c[H],null!=f&&(e+=H+"="+encodeURIComponent(f)+-"&");return new mxXmlRequest(EXPORT_URL,e)};EditorUi.prototype.downloadRequestBuilder=function(c,e,f,p,n,t,z,E,C,F,R,U,P,O,m,u,A,B){var H=this.editor.graph,T=H.getGraphBounds();f=this.getFileData(!0,null,null,null,f,0==t?!1:"xmlpng"!=e,null,null,null,!Editor.defaultCompressed,"pdf"==e);var k=null,v=null,G=null;if(!EditorUi.isElectronApp&&(T.width*T.height>MAX_AREA||f.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};F=F?"1":"0";"pdf"==e&&(null!=R?(k=R.from,v=R.to):0==t&&(G=+this.scrollToPage());if(null!=urlParams["layer-ids"])try{var z=decodeURIComponent(urlParams["layer-ids"]).split(" ");e={};for(t=0;t<z.length;t++)e[z[t]]=!0;var E=this.editor.graph.getModel(),C=E.getChildren(E.root);for(t=0;t<C.length;t++){var F=C[t];E.setVisible(F,e[F.id]||!1)}}catch(S){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=+e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,f,p,n,t,z,E,C,F,S,U,O,N,m,u){try{p=null!=p?p:this.editor.graph.isSelectionEmpty();var A=this.getBaseFilename(!n),B=A+("xml"==c||"pdf"==c&&S?".drawio":"")+"."+c;+if("xml"==c){var H=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,p,n,null,null,null,e);this.saveData(B,c,H,"text/xml")}else if("html"==c)H=this.getHtml2(this.getFileData(!0),this.editor.graph,A),this.saveData(B,c,H,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==c?B=A+".png":"jpeg"==c&&(B=A+".jpg"),this.saveRequest(B,c,mxUtils.bind(this,function(I,M){try{return this.createDownloadRequest(I,c,p,M,z,n,E,C,F,S,U,void 0,+void 0,!t,O,N,m,u)}catch(R){this.handleError(R)}}));else{var T=null,k=mxUtils.bind(this,function(I){I.length<=MAX_REQUEST_SIZE?this.saveData(B,"svg",I,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});if("svg"==c){var v=this.editor.graph.background;if(z||v==mxConstants.NONE)v=null;var G=this.editor.graph.getSvg(v,null,null,null,null,p);f&&this.editor.graph.addSvgShadow(G);this.editor.convertImages(G,+mxUtils.bind(this,mxUtils.bind(this,function(I){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(I))})))}else B=A+".svg",T=this.getFileData(!1,!0,null,mxUtils.bind(this,function(I){this.spinner.stop();k(I)}),p)}}catch(I){this.handleError(I)}};EditorUi.prototype.createDownloadRequest=function(c,e,f,p,n,t,z,E,C,F,S,U,O,N,m,u,A,B){c=this.downloadRequestBuilder(c,e,f,p,n,t,z,E,C,F,S,U,O,N,m,u,A,B);e="";for(var H in c)f=c[H],null!=f&&(e+=H+"="+encodeURIComponent(f)++"&");return new mxXmlRequest(EXPORT_URL,e)};EditorUi.prototype.downloadRequestBuilder=function(c,e,f,p,n,t,z,E,C,F,S,U,O,N,m,u,A,B){var H=this.editor.graph,T=H.getGraphBounds();f=this.getFileData(!0,null,null,null,f,0==t?!1:"xmlpng"!=e,null,null,null,!Editor.defaultCompressed,"pdf"==e);var k=null,v=null,G=null;if(!EditorUi.isElectronApp&&(T.width*T.height>MAX_AREA||f.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};F=F?"1":"0";"pdf"==e&&(null!=S?(k=S.from,v=S.to):0==t&&(G="1"));"xmlpng"==e&&(F="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(t=0;t<this.pages.length;t++)if(this.pages[t]==this.currentPage){k=t;break}t=H.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!n?n||null!=t&&t!=mxConstants.NONE||(t="#ffffff"):t=mxConstants.NONE;n={globalVars:H.getExportVariables()};C&&(n.grid={size:H.gridSize,steps:H.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==e?mxGraphView.prototype.defaultGridColor:H.view.gridColor});Graph.translateDiagram&&-(n.diagramLanguage=Graph.diagramLanguage);return{format:e,from:k,to:v,allPages:G,bg:null!=t?t:mxConstants.NONE,base64:p,embedXml:F,xml:f,filename:null!=c?c:"",extras:JSON.stringify(n),scale:z,border:E,pageMargin:m,w:U&&isFinite(U)?U:null,h:P&&isFinite(P)?P:null,crop:null!=O&&O?"1":"0",fit:null!=u&&u?"1":"0",sheetsAcross:A,sheetsDown:B}};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));+(n.diagramLanguage=Graph.diagramLanguage);return{format:e,from:k,to:v,allPages:G,bg:null!=t?t:mxConstants.NONE,base64:p,embedXml:F,xml:f,filename:null!=c?c:"",extras:JSON.stringify(n),scale:z,border:E,pageMargin:m,w:U&&isFinite(U)?U:null,h:O&&isFinite(O)?O:null,crop:null!=N&&N?"1":"0",fit:null!=u&&u?"1":"0",sheetsAcross:A,sheetsDown:B}};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var e=c.indexOf("#");0<=e&&(c=c.substring(0,e))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,e={};if(null!=c&&0<c.length){var f=c.lastIndexOf("#");if(0<f){c=decodeURIComponent(c.substring(f+1));try{e=JSON.parse(c)}catch(p){}}}return e};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var e=window.location.hash;if(null==e||""==e)e="#";var f=e.lastIndexOf("#");0<f&&(e=e.substring(0,f));try{null==c||mxUtils.isEmptyObject(c)||(e=e+"#"+encodeURIComponent(JSON.stringify(c)))}catch(p){}0<f&&0<e.lastIndexOf("#")?window.location.hash=e:window.location.replace(e)}};EditorUi.prototype.loadDescriptor=function(c,e,f){var p=window.location.hash,n=mxUtils.bind(this,function(z){var E=null!=c.data?c.data:"";null!=z&&0<z.length&&-(0<E.length&&(E+="\n"),E+=z);z=new LocalFile(this,"csv"!=c.format&&0<E.length?E:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);z.getHash=function(){return p};this.fileLoaded(z);"csv"==c.format&&this.importCsv(E,mxUtils.bind(this,function(P){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var C=null!=c.interval?parseInt(c.interval):6E4,F=null,R=mxUtils.bind(this,function(){var P=this.currentPage;-mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(O){P===this.currentPage&&(200<=O.getStatus()&&300>=O.getStatus()?(this.updateDiagram(O.getText()),U()):this.handleError({message:mxResources.get("error")+" "+O.getStatus()}))}),mxUtils.bind(this,function(O){this.handleError(O)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(F);F=window.setTimeout(R,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();-R()}));U();R()}null!=e&&e()});if(null!=c.url&&0<c.url.length){var t=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(t,mxUtils.bind(this,function(z){n(z)}),mxUtils.bind(this,function(z){null!=f&&f(z)}))}else n("")};EditorUi.prototype.updateDiagram=function(c){function e(T){var k=new mxCellOverlay(T.image||n.warningImage,T.tooltip,T.align,T.valign,T.offset);k.addListener(mxEvent.CLICK,function(v,G){p.alert(T.tooltip)});return k}var f=null,p=this;if(null!=c&&0<c.length&&(f=mxUtils.parseXml(c),c=-null!=f?f.documentElement:null,null!=c&&"updates"==c.nodeName)){var n=this.editor.graph,t=n.getModel();t.beginUpdate();var z=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var E=t.getCell(c.getAttribute("id"));if(null!=E){try{var C=c.getAttribute("value");if(null!=C){var F=mxUtils.parseXml(C).documentElement;if(null!=F)if("1"==F.getAttribute("replace-value"))t.setValue(E,F);else for(var R=F.attributes,U=0;U<R.length;U++)n.setAttributeForCell(E,R[U].nodeName,0<R[U].nodeValue.length?-R[U].nodeValue:null)}}catch(T){null!=window.console&&console.log("Error in value for "+E.id+": "+T)}try{var P=c.getAttribute("style");null!=P&&n.model.setStyle(E,P)}catch(T){null!=window.console&&console.log("Error in style for "+E.id+": "+T)}try{var O=c.getAttribute("icon");if(null!=O){var m=0<O.length?JSON.parse(O):null;null!=m&&m.append||n.removeCellOverlays(E);null!=m&&n.addCellOverlay(E,e(m))}}catch(T){null!=window.console&&console.log("Error in icon for "+E.id+": "+T)}try{var u=c.getAttribute("geometry");+(0<E.length&&(E+="\n"),E+=z);z=new LocalFile(this,"csv"!=c.format&&0<E.length?E:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);z.getHash=function(){return p};this.fileLoaded(z);"csv"==c.format&&this.importCsv(E,mxUtils.bind(this,function(O){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var C=null!=c.interval?parseInt(c.interval):6E4,F=null,S=mxUtils.bind(this,function(){var O=this.currentPage;+mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(N){O===this.currentPage&&(200<=N.getStatus()&&300>=N.getStatus()?(this.updateDiagram(N.getText()),U()):this.handleError({message:mxResources.get("error")+" "+N.getStatus()}))}),mxUtils.bind(this,function(N){this.handleError(N)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(F);F=window.setTimeout(S,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();+S()}));U();S()}null!=e&&e()});if(null!=c.url&&0<c.url.length){var t=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(t,mxUtils.bind(this,function(z){n(z)}),mxUtils.bind(this,function(z){null!=f&&f(z)}))}else n("")};EditorUi.prototype.updateDiagram=function(c){function e(T){var k=new mxCellOverlay(T.image||n.warningImage,T.tooltip,T.align,T.valign,T.offset);k.addListener(mxEvent.CLICK,function(v,G){p.alert(T.tooltip)});return k}var f=null,p=this;if(null!=c&&0<c.length&&(f=mxUtils.parseXml(c),c=+null!=f?f.documentElement:null,null!=c&&"updates"==c.nodeName)){var n=this.editor.graph,t=n.getModel();t.beginUpdate();var z=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var E=t.getCell(c.getAttribute("id"));if(null!=E){try{var C=c.getAttribute("value");if(null!=C){var F=mxUtils.parseXml(C).documentElement;if(null!=F)if("1"==F.getAttribute("replace-value"))t.setValue(E,F);else for(var S=F.attributes,U=0;U<S.length;U++)n.setAttributeForCell(E,S[U].nodeName,0<S[U].nodeValue.length?+S[U].nodeValue:null)}}catch(T){null!=window.console&&console.log("Error in value for "+E.id+": "+T)}try{var O=c.getAttribute("style");null!=O&&n.model.setStyle(E,O)}catch(T){null!=window.console&&console.log("Error in style for "+E.id+": "+T)}try{var N=c.getAttribute("icon");if(null!=N){var m=0<N.length?JSON.parse(N):null;null!=m&&m.append||n.removeCellOverlays(E);null!=m&&n.addCellOverlay(E,e(m))}}catch(T){null!=window.console&&console.log("Error in icon for "+E.id+": "+T)}try{var u=c.getAttribute("geometry");if(null!=u){u=JSON.parse(u);var A=n.getCellGeometry(E);if(null!=A){A=A.clone();for(key in u){var B=parseFloat(u[key]);"dx"==key?A.x+=B:"dy"==key?A.y+=B:"dw"==key?A.width+=B:"dh"==key?A.height+=B:A[key]=parseFloat(u[key])}n.model.setGeometry(E,A)}}}catch(T){null!=window.console&&console.log("Error in icon for "+E.id+": "+T)}}}else if("model"==c.nodeName){for(var H=c.firstChild;null!=H&&H.nodeType!=mxConstants.NODETYPE_ELEMENT;)H=H.nextSibling;null!=H&&(new mxCodec(c.firstChild)).decode(H,t)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(n.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))n.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(z=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{t.endUpdate()}null!=z&&this.chromelessResize&&this.chromelessResize(!0,z)}return f};EditorUi.prototype.getCopyFilename=function(c,e){var f=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var p=f.lastIndexOf(".");0<=p&&(c=f.substring(p),f=f.substring(0,p));if(e){e=f;var n=new Date;f=n.getFullYear();p=n.getMonth()+1;var t=n.getDate(),z=n.getHours(),E=n.getMinutes();n=n.getSeconds();f=e+(" "+(f+"-"+p+"-"+t+"-"+z+"-"+E+"-"+n))}return f=mxResources.get("copyOf",[f])+c};EditorUi.prototype.logIfModified=function(c,e){try{null!=c&&e&&EditorUi.debug("File.closed",[c])}catch(f){}};EditorUi.prototype.fileLoaded=function(c,e,f){var p=@@ -13097,7 +13097,7 @@ this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDia[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(E){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(E){}}catch(E){this.fileLoadedError=E;if(null!=c)try{c.close()}catch(C){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=p?this.fileLoaded(p)||t():t()});e?c():(null!=E.fallbackFileData&&(E.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var C=new LocalFile(this,E.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(C)})}),this.handleError(E,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else t();return n};EditorUi.prototype.getHashValueForPages=function(c,e){var f=0,p=new mxGraphModel,n=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var t=0;t<c.length;t++){this.updatePageRoot(c[t]);var z=c[t].node.cloneNode(!1);z.removeAttribute("name");p.root=c[t].root;var E=n.encode(p);this.editor.graph.saveViewState(c[t].viewState,E,!0);E.removeAttribute("pageWidth");E.removeAttribute("pageHeight");z.appendChild(E);null!=e&&(e.eltCount+=z.getElementsByTagName("*").length,e.nodeCount+=z.getElementsByTagName("mxCell").length);f=(f<<5)-f+-this.hashValue(z,function(C,F,R,U){return!U||"mxGeometry"!=C.nodeName&&"mxPoint"!=C.nodeName||"x"!=F&&"y"!=F&&"width"!=F&&"height"!=F?U&&"mxCell"==C.nodeName&&"previous"==F?null:R:Math.round(R)},e)<<0}return f};EditorUi.prototype.hashValue=function(c,e,f){var p=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(p^=this.hashValue(c.nodeName,e,f));if(null!=c.attributes){null!=f&&(f.attrCount+=c.attributes.length);+this.hashValue(z,function(C,F,S,U){return!U||"mxGeometry"!=C.nodeName&&"mxPoint"!=C.nodeName||"x"!=F&&"y"!=F&&"width"!=F&&"height"!=F?U&&"mxCell"==C.nodeName&&"previous"==F?null:S:Math.round(S)},e)<<0}return f};EditorUi.prototype.hashValue=function(c,e,f){var p=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(p^=this.hashValue(c.nodeName,e,f));if(null!=c.attributes){null!=f&&(f.attrCount+=c.attributes.length);for(var n=0;n<c.attributes.length;n++){var t=c.attributes[n].name,z=null!=e?e(c,t,c.attributes[n].value,!0):c.attributes[n].value;null!=z&&(p^=this.hashValue(t,e,f)+this.hashValue(z,e,f))}}if(null!=c.childNodes)for(n=0;n<c.childNodes.length;n++)p=(p<<5)-p+this.hashValue(c.childNodes[n],e,f)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=f&&(f.byteCount+=c.length);for(n=0;n<c.length;n++)e=(e<<5)-e+c.charCodeAt(n)<<0;p^=e}return p};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,f,p,n,t,z){};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(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var e=0;e<c.length;e++)null!=c[e].xml&&"<"!=c[e].xml.charAt(0)&&(c[e].xml=mxUtils.trim(Graph.decompress(c[e].xml)));e=mxUtils.createXmlDocument();var f=e.createElement("mxlibrary");mxUtils.setTextContent(f,JSON.stringify(c,null,2));e.appendChild(f);return mxUtils.getXml(e,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),@@ -13106,19 +13106,19 @@ c=null!=c?c:f.firstChild.nextSibling.nextSibling;e=f.lastChild;var p=e.previousSfunction(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(c,e,f,p){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var n=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var t=0;t<this.openLibraries.length;t++)if(this.openLibraries[t].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[t],this.openLibraries);break}n={file:c,images:e,title:f,expand:p};this.openLibraries.push(n)}else this.scratchpad=c;t=this.sidebar.palettes[c.getHash()];t=null!=t?t[t.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var z=null,E=mxUtils.bind(this,function(B,H){0==B.length&&c.isEditable()?(null==z&&(z=document.createElement("div"),z.className="geDropTarget",mxUtils.write(z,mxResources.get("dragElementsHere"))),H.appendChild(z)):this.addLibraryEntries(B,H)});null!=this.sidebar&&null!=e&&this.sidebar.addEntries(e);null==f&&(f=c.getTitle(),null!=f&&/(\.xml)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf("."))));var C=this.sidebar.addPalette(c.getHash(),f,null!=p?p:!0,mxUtils.bind(this,function(B){E(e,B)}));null!=n&&(n.div=C);this.repositionLibrary(t,"L.scratchpad"!=c.getHash());p=C.parentNode.previousSibling;f=p.getAttribute("title");null!=f&&0<f.length&&".scratchpad"!=c.title&&p.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+f);var F=document.createElement("div");F.style.backgroundColor=-"inherit";p.style.position="relative";var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.crossImage);R.setAttribute("title",mxResources.get("close"));R.setAttribute("valign","absmiddle");R.setAttribute("border","0");R.style.position="relative";R.style.top="2px";R.style.width="14px";R.style.cursor="pointer";R.style.margin="0 3px";var U=null;if(".scratchpad"!=c.title||this.closableScratchpad)F.appendChild(R),mxEvent.addListener(R,"click",mxUtils.bind(this,-function(B){if(!mxEvent.isConsumed(B)){var H=mxUtils.bind(this,function(){null!=n&&mxUtils.remove(n,this.openLibraries);this.closeLibrary(c)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H();mxEvent.consume(B)}}));if(c.isEditable()){var P=this.editor.graph,O=null;f=mxUtils.bind(this,function(B){this.showLibraryDialog(c.getTitle(),C,e,c,c.getMode());mxEvent.consume(B)});var m=mxUtils.bind(this,function(B){c.setModified(!0);-c.isAutosave()?(null!=O&&null!=O.parentNode&&O.parentNode.removeChild(O),O=R.cloneNode(!1),O.setAttribute("src",Editor.spinImage),O.setAttribute("title",mxResources.get("saving")),O.style.cursor="default",O.style.marginRight="2px",O.style.marginTop="-2px",F.insertBefore(O,F.firstChild),this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=O&&null!=O.parentNode&&O.parentNode.removeChild(O)})):null==U&&(U=R.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),-F.insertBefore(U,F.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(H){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==U||c.isModified()||(U.parentNode.removeChild(U),U=null)});mxEvent.consume(H)})))}),u=mxUtils.bind(this,function(B,H,T,k){B=P.cloneCells(mxUtils.sortCells(P.model.getTopmostCells(B)));for(var v=0;v<B.length;v++){var G=P.getCellGeometry(B[v]);null!=G&&G.translate(-H.x,-H.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(B,-H.width,H.height,k||"",!0,null,!1));B=mxUtils.getXml(this.editor.graph.encodeCells(B));Editor.defaultCompressed&&(B=Graph.compress(B));H={xml:B,w:H.width,h:H.height};null!=k&&(H.title=k);e.push(H);m(T);null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),z=null)}),A=mxUtils.bind(this,function(B){if(P.isSelectionEmpty())P.getRubberband().isActive()?(P.getRubberband().execute(B),P.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),-mxResources.get("ok"));else{var H=P.getSelectionCells(),T=P.view.getBounds(H);if(null!=T&&0<T.width&&0<T.height){var k=P.view.scale;T.x/=k;T.y/=k;T.width/=k;T.height/=k;T.x-=P.view.translate.x;T.y-=P.view.translate.y;u(H,T)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(B)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(B){P.isMouseDown&&null!=P.panningManager&&null!=P.graphHandler.first&&(P.graphHandler.suspend(),-null!=P.graphHandler.hint&&(P.graphHandler.hint.style.visibility="hidden"),C.style.backgroundColor="light-dark(#fefefe, #000000)",C.style.cursor="copy",P.panningManager.stop(),P.autoScroll=!1,mxEvent.consume(B))}),mxUtils.bind(this,function(B){P.isMouseDown&&null!=P.panningManager&&null!=P.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,P.panningManager.stop(),P.graphHandler.reset(),P.isMouseDown=!1,P.autoScroll=!0,A(B),mxEvent.consume(B))}));mxEvent.addListener(C,-"mouseleave",mxUtils.bind(this,function(B){P.isMouseDown&&null!=P.graphHandler.first&&(P.graphHandler.resume(),null!=P.graphHandler.hint&&(P.graphHandler.hint.style.visibility="visible"),C.style.backgroundColor="",C.style.cursor="",P.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(B){C.style.backgroundColor="light-dark(#fefefe, #000000)";B.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();B.stopPropagation();B.preventDefault()})),-mxEvent.addListener(C,"drop",mxUtils.bind(this,function(B){C.style.cursor="";C.style.backgroundColor="";0<B.dataTransfer.files.length&&this.importFiles(B.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(H,T,k,v,G,I,M,N,S){if(null!=H&&"image/"==T.substring(0,6))H="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(H),H=[new mxCell("",new mxGeometry(0,0,G,I),H)],H[0].vertex=!0,u(H,new mxRectangle(0,0,G,I),B,mxEvent.isAltDown(B)?-null:M.substring(0,M.lastIndexOf(".")).replace(/_/g," ")),null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),z=null);else{var V=!1,W=mxUtils.bind(this,function(X,Z){null!=X&&"application/pdf"==Z&&(Z=Editor.extractGraphModelFromPdf(X),null!=Z&&0<Z.length&&(X=Z));if(null!=X)if(X=mxUtils.parseXml(X),"mxlibrary"==X.documentElement.nodeName)try{var Y=JSON.parse(mxUtils.getTextContent(X.documentElement));E(Y,C);e=e.concat(Y);m(B);this.spinner.stop();V=!0}catch(fa){}else if("mxfile"==-X.documentElement.nodeName)try{var ba=X.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=this.stringToCells(Editor.getDiagramNodeXml(ba[Y])),ca=this.editor.graph.getBoundingBoxFromGeometry(ea);null!=ca&&u(ea,new mxRectangle(0,0,ca.width,ca.height),B)}V=!0}catch(fa){null!=window.console&&console.log("error in drop handler:",fa)}V||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),-z=null)});null!=S&&null!=M&&EditorUi.isVisioFilename(M)?this.importVisio(S,function(X){W(X,"text/xml")},null,M):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,M)&&null!=S?this.isExternalDataComms()?this.parseFile(S,mxUtils.bind(this,function(X){4==X.readyState&&(this.spinner.stop(),200<=X.status&&299>=X.status?W(X.responseText,"text/xml"):this.handleError({message:mxResources.get(413==X.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),-this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):W(H,T)}}));B.stopPropagation();B.preventDefault()})),mxEvent.addListener(C,"dragleave",function(B){C.style.cursor="";C.style.backgroundColor="";B.stopPropagation();B.preventDefault()}));R=R.cloneNode(!1);R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("edit"));F.insertBefore(R,F.firstChild);mxEvent.addListener(R,"click",f);f=R.cloneNode(!1);f.setAttribute("src",Editor.plusImage);f.setAttribute("title",+"inherit";p.style.position="relative";var S=document.createElement("img");S.className="geAdaptiveAsset";S.setAttribute("src",Editor.crossImage);S.setAttribute("title",mxResources.get("close"));S.setAttribute("valign","absmiddle");S.setAttribute("border","0");S.style.position="relative";S.style.top="2px";S.style.width="14px";S.style.cursor="pointer";S.style.margin="0 3px";var U=null;if(".scratchpad"!=c.title||this.closableScratchpad)F.appendChild(S),mxEvent.addListener(S,"click",mxUtils.bind(this,+function(B){if(!mxEvent.isConsumed(B)){var H=mxUtils.bind(this,function(){null!=n&&mxUtils.remove(n,this.openLibraries);this.closeLibrary(c)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H();mxEvent.consume(B)}}));if(c.isEditable()){var O=this.editor.graph,N=null;f=mxUtils.bind(this,function(B){this.showLibraryDialog(c.getTitle(),C,e,c,c.getMode());mxEvent.consume(B)});var m=mxUtils.bind(this,function(B){c.setModified(!0);+c.isAutosave()?(null!=N&&null!=N.parentNode&&N.parentNode.removeChild(N),N=S.cloneNode(!1),N.setAttribute("src",Editor.spinImage),N.setAttribute("title",mxResources.get("saving")),N.style.cursor="default",N.style.marginRight="2px",N.style.marginTop="-2px",F.insertBefore(N,F.firstChild),this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=N&&null!=N.parentNode&&N.parentNode.removeChild(N)})):null==U&&(U=S.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),+F.insertBefore(U,F.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(H){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==U||c.isModified()||(U.parentNode.removeChild(U),U=null)});mxEvent.consume(H)})))}),u=mxUtils.bind(this,function(B,H,T,k){B=O.cloneCells(mxUtils.sortCells(O.model.getTopmostCells(B)));for(var v=0;v<B.length;v++){var G=O.getCellGeometry(B[v]);null!=G&&G.translate(-H.x,-H.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(B,+H.width,H.height,k||"",!0,null,!1));B=mxUtils.getXml(this.editor.graph.encodeCells(B));Editor.defaultCompressed&&(B=Graph.compress(B));H={xml:B,w:H.width,h:H.height};null!=k&&(H.title=k);e.push(H);m(T);null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),z=null)}),A=mxUtils.bind(this,function(B){if(O.isSelectionEmpty())O.getRubberband().isActive()?(O.getRubberband().execute(B),O.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),+mxResources.get("ok"));else{var H=O.getSelectionCells(),T=O.view.getBounds(H);if(null!=T&&0<T.width&&0<T.height){var k=O.view.scale;T.x/=k;T.y/=k;T.width/=k;T.height/=k;T.x-=O.view.translate.x;T.y-=O.view.translate.y;u(H,T)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(B)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(B){O.isMouseDown&&null!=O.panningManager&&null!=O.graphHandler.first&&(O.graphHandler.suspend(),+null!=O.graphHandler.hint&&(O.graphHandler.hint.style.visibility="hidden"),C.style.backgroundColor="light-dark(#fefefe, #000000)",C.style.cursor="copy",O.panningManager.stop(),O.autoScroll=!1,mxEvent.consume(B))}),mxUtils.bind(this,function(B){O.isMouseDown&&null!=O.panningManager&&null!=O.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,O.panningManager.stop(),O.graphHandler.reset(),O.isMouseDown=!1,O.autoScroll=!0,A(B),mxEvent.consume(B))}));mxEvent.addListener(C,+"mouseleave",mxUtils.bind(this,function(B){O.isMouseDown&&null!=O.graphHandler.first&&(O.graphHandler.resume(),null!=O.graphHandler.hint&&(O.graphHandler.hint.style.visibility="visible"),C.style.backgroundColor="",C.style.cursor="",O.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(B){C.style.backgroundColor="light-dark(#fefefe, #000000)";B.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();B.stopPropagation();B.preventDefault()})),+mxEvent.addListener(C,"drop",mxUtils.bind(this,function(B){C.style.cursor="";C.style.backgroundColor="";0<B.dataTransfer.files.length&&this.importFiles(B.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(H,T,k,v,G,I,M,R,Q){if(null!=H&&"image/"==T.substring(0,6))H="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(H),H=[new mxCell("",new mxGeometry(0,0,G,I),H)],H[0].vertex=!0,u(H,new mxRectangle(0,0,G,I),B,mxEvent.isAltDown(B)?+null:M.substring(0,M.lastIndexOf(".")).replace(/_/g," ")),null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),z=null);else{var W=!1,V=mxUtils.bind(this,function(X,Z){null!=X&&"application/pdf"==Z&&(Z=Editor.extractGraphModelFromPdf(X),null!=Z&&0<Z.length&&(X=Z));if(null!=X)if(X=mxUtils.parseXml(X),"mxlibrary"==X.documentElement.nodeName)try{var Y=JSON.parse(mxUtils.getTextContent(X.documentElement));E(Y,C);e=e.concat(Y);m(B);this.spinner.stop();W=!0}catch(fa){}else if("mxfile"==+X.documentElement.nodeName)try{var ba=X.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=this.stringToCells(Editor.getDiagramNodeXml(ba[Y])),ca=this.editor.graph.getBoundingBoxFromGeometry(ea);null!=ca&&u(ea,new mxRectangle(0,0,ca.width,ca.height),B)}W=!0}catch(fa){null!=window.console&&console.log("error in drop handler:",fa)}W||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),+z=null)});null!=Q&&null!=M&&EditorUi.isVisioFilename(M)?this.importVisio(Q,function(X){V(X,"text/xml")},null,M):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,M)&&null!=Q?this.isExternalDataComms()?this.parseFile(Q,mxUtils.bind(this,function(X){4==X.readyState&&(this.spinner.stop(),200<=X.status&&299>=X.status?V(X.responseText,"text/xml"):this.handleError({message:mxResources.get(413==X.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),+this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):V(H,T)}}));B.stopPropagation();B.preventDefault()})),mxEvent.addListener(C,"dragleave",function(B){C.style.cursor="";C.style.backgroundColor="";B.stopPropagation();B.preventDefault()}));S=S.cloneNode(!1);S.setAttribute("src",Editor.editImage);S.setAttribute("title",mxResources.get("edit"));F.insertBefore(S,F.firstChild);mxEvent.addListener(S,"click",f);f=S.cloneNode(!1);f.setAttribute("src",Editor.plusImage);f.setAttribute("title",mxResources.get("add"));F.insertBefore(f,F.firstChild);mxEvent.addListener(f,"click",A);".scratchpad"==c.title&&(this.addSelectionToScratchpad=A);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(f=this.createHelpIcon(EditorUi.scratchpadHelpLink),t=f.getElementsByTagName("img")[0],f.style.marginRight="1px",t.style.marginTop="-2px",t.style.opacity="",F.insertBefore(f,F.firstChild))}p.appendChild(F);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,e){for(var f=0;f<c.length;f++)try{var p=c[f],n=p.data;if(null!=n){n="data:"==n.substring(0,5)?this.convertDataUri(n):n;var t="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==p.aspect&&(t+="aspect=fixed;");t=t+"image="+n+";";null!=p.style&&(t+=p.style);e.appendChild(this.sidebar.createVertexTemplate(t,p.w,p.h,"",p.title||"",!1,null,!0))}else if(null!=p.xml){var z=this.stringToCells("<"==p.xml.charAt(0)?p.xml:Graph.decompress(p.xml)),E=0==z.length?mxResources.get("drawingEmpty"):null!=p.title?p.title:"";e.appendChild(this.sidebar.createVertexTemplateFromCells(z,p.w,p.h,E,!0,null,!0))}}catch(C){E=null!=C.message?mxResources.get("error")+": "+C.message:String(C),t=this.sidebar.createVertexTemplateFromCells(null,p.w,p.h,E,!0,null,!0),e.appendChild(t)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=@@ -13127,28 +13127,28 @@ function(){"atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(mxClient.lt(E),E==z)this.hideDialog();else{if(0<E.length){var C=JSON.parse(E);localStorage.setItem(e,JSON.stringify(C))}else localStorage.removeItem(e);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(F){this.handleError(F)}}),null,mxResources.get("close"),null,null,null,!0,null,null,n,f,p);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,e,f,p){c=null!=c?c:mxUtils.bind(this,function(n,t,z,E){t||(n=new ChangePageSetup(this,p?z:null,n),n.ignoreColor=!p,null!=E&&p&&(n.shadowVisible=E),this.editor.graph.model.execute(n))});c=new BackgroundImageDialog(this,c,e,f,p);this.showDialog(c.container,400,p?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,e,f,p,n){c=new LibraryDialog(this,c,e,f,p,n);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(t){t&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var e=l.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(f){this.editor.graph.isSelectionEmpty()&&e.refresh()}));return e};EditorUi.prototype.handleError=function(c,e,f,p,n,t,z){var E=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{z||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,-c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!z||null==window.console||console.error("EditorUi.handleError:",c)}catch(P){}if(null!=C||null!=e){z=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var F=mxResources.get("ok"),R=null;e=null!=e?e:mxResources.get("error");if(null!=C){null!=C.retry&&(F=mxResources.get("cancel"),R=function(){E();C.retry()});if(404==C.code||404==C.status||403==C.code){z=403==C.code?null!=C.message?mxUtils.htmlEntities(C.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),+c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!z||null==window.console||console.error("EditorUi.handleError:",c)}catch(O){}if(null!=C||null!=e){z=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var F=mxResources.get("ok"),S=null;e=null!=e?e:mxResources.get("error");if(null!=C){null!=C.retry&&(F=mxResources.get("cancel"),S=function(){E();C.retry()});if(404==C.code||404==C.status||403==C.code){z=403==C.code?null!=C.message?mxUtils.htmlEntities(C.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=n?n:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var U=null!=n?null:null!=t?t:window.location.hash;if(null!=U&&("#G"==U.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==U.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||-404==C.code||404==C.status)){U="#U"==U.substring(0,2)?U.substring(45,U.lastIndexOf("%26ex")):U.substring(2);this.showError(e,z,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+U);null!=p&&p()}),R,mxResources.get("changeUser"),mxUtils.bind(this,function(){function P(){A.innerText="";for(var B=0;B<O.length;B++){var H=document.createElement("option");mxUtils.write(H,O[B].displayName);H.value=B;A.appendChild(H);H=document.createElement("option");-H.innerHTML=" ";mxUtils.write(H,"<"+O[B].email+">");H.setAttribute("disabled","disabled");A.appendChild(H)}H=document.createElement("option");mxUtils.write(H,mxResources.get("addAccount"));H.value=O.length;A.appendChild(H)}var O=this.drive.getUsersList(),m=document.createElement("div"),u=document.createElement("div");u.style.marginBottom="6px";mxUtils.write(u,mxResources.get("changeUser")+": ");m.appendChild(u);var A=document.createElement("select");A.style.width="100%";P();mxEvent.addListener(A,-"change",mxUtils.bind(this,function(){var B=A.value,H=O.length!=B;H&&this.drive.setUser(O[B]);this.drive.authorize(H,mxUtils.bind(this,function(){H||(O=this.drive.getUsersList(),P())}),mxUtils.bind(this,function(T){this.handleError(T)}),!0)}));m.appendChild(A);m=new CustomDialog(this,m,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(m.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=f&&f()}),+404==C.code||404==C.status)){U="#U"==U.substring(0,2)?U.substring(45,U.lastIndexOf("%26ex")):U.substring(2);this.showError(e,z,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+U);null!=p&&p()}),S,mxResources.get("changeUser"),mxUtils.bind(this,function(){function O(){A.innerText="";for(var B=0;B<N.length;B++){var H=document.createElement("option");mxUtils.write(H,N[B].displayName);H.value=B;A.appendChild(H);H=document.createElement("option");+H.innerHTML=" ";mxUtils.write(H,"<"+N[B].email+">");H.setAttribute("disabled","disabled");A.appendChild(H)}H=document.createElement("option");mxUtils.write(H,mxResources.get("addAccount"));H.value=N.length;A.appendChild(H)}var N=this.drive.getUsersList(),m=document.createElement("div"),u=document.createElement("div");u.style.marginBottom="6px";mxUtils.write(u,mxResources.get("changeUser")+": ");m.appendChild(u);var A=document.createElement("select");A.style.width="100%";O();mxEvent.addListener(A,+"change",mxUtils.bind(this,function(){var B=A.value,H=N.length!=B;H&&this.drive.setUser(N[B]);this.drive.authorize(H,mxUtils.bind(this,function(){H||(N=this.drive.getUsersList(),O())}),mxUtils.bind(this,function(T){this.handleError(T)}),!0)}));m.appendChild(A);m=new CustomDialog(this,m,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(m.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=f&&f()}),520,150);return}}null!=C.message?z=""==C.message&&null!=C.name?mxUtils.htmlEntities(C.name,!1):mxUtils.htmlEntities(C.message,!1):null!=C.response&&null!=C.response.error?z=mxUtils.htmlEntities(C.response.error,!1):"undefined"!==typeof window.App&&(C.code==App.ERROR_TIMEOUT?z=mxUtils.htmlEntities(mxResources.get("timeout"),!1):C.code==App.ERROR_BUSY?z=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof C&&0<C.length&&(z=mxUtils.htmlEntities(C,!1)))}n=c=null;null!=C&&null!=C.helpLink?-(c=mxResources.get("help"),n=mxUtils.bind(this,function(){return this.editor.graph.openLink(C.helpLink)})):null!=C&&null!=C.ownerEmail?(c=mxResources.get("contactOwner"),z+=mxUtils.htmlEntities(" ("+c+": "+C.ownerEmail+")",!1),n=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(C.ownerEmail))})):null!=C&&null!=C.alternateAction&&(c=C.alternateAction.label,n=C.alternateAction.funct);this.showError(e,z,F,f,R,null,null,c,n,null,null,null,p?f:null)}else null!=f&&f()};EditorUi.prototype.alert=+(c=mxResources.get("help"),n=mxUtils.bind(this,function(){return this.editor.graph.openLink(C.helpLink)})):null!=C&&null!=C.ownerEmail?(c=mxResources.get("contactOwner"),z+=mxUtils.htmlEntities(" ("+c+": "+C.ownerEmail+")",!1),n=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(C.ownerEmail))})):null!=C&&null!=C.alternateAction&&(c=C.alternateAction.label,n=C.alternateAction.funct);this.showError(e,z,F,f,S,null,null,c,n,null,null,null,p?f:null)}else null!=f&&f()};EditorUi.prototype.alert=function(c,e,f){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,f||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,e,f,p,n,t){c=null!=c?c:"";var z=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},E=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){z();null!=e&&e()},function(){z();null!=f&&f()},p,n,null,null,null,null,E);this.showDialog(c.container,340,46+E,!0,t);c.init()};EditorUi.prototype.showBanner=-function(c,e,f,p,n,t,z,E,C){var F=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){t=null!=t?t:"bottom:10px;left:50%;";z=null!=z?z:"translate(-50%,120%)";E=null!=E?E:"translate(-50%,0%)";var R=n?500:1E3;F=n?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var U=document.createElement("div");U.style.cssText="position:absolute;"+-t+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";"+F;mxUtils.setPrefixedStyle(U.style,"transform",z);mxUtils.setPrefixedStyle(U.style,"transition","all "+R+"ms ease");U.className="geBtn gePrimaryBtn"+(n?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(U.style,"box-shadow","1px 1px 2px 0px #ddd");null!=C&&mxUtils.setPrefixedStyle(U.style,"transform-origin",C);if(!n){var P=document.createElement("img");P.setAttribute("src",IMAGE_PATH+"/logo.png");-P.setAttribute("border","0");P.setAttribute("align","absmiddle");P.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";U.appendChild(P);P=document.createElement("img");P.setAttribute("src",Dialog.prototype.closeImage);P.setAttribute("title",mxResources.get(p?"doNotShowAgain":"close"));P.setAttribute("border","0");P.style.cssText=(n?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";U.appendChild(P)}mxUtils.write(U,-e);document.body.appendChild(U);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var O=document.createElement("input");O.setAttribute("type","checkbox");O.setAttribute("id","geDoNotShowAgainCheckbox");O.style.marginRight="6px";if(!p){e.appendChild(O);var m=document.createElement("label");m.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(m,-mxResources.get("doNotShowAgain"));e.appendChild(m);U.style.paddingBottom=n?"16px":"30px";U.appendChild(e)}var u=mxUtils.bind(this,function(){null!=U.parentNode&&(U.parentNode.removeChild(U),this.bannerShowing=!1,O.checked||p)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=P&&mxEvent.addListener(P,"click",mxUtils.bind(this,function(B){mxEvent.consume(B);u()}));var A=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(U.style,-"transform",z);window.setTimeout(mxUtils.bind(this,function(){u()}),R)});mxEvent.addListener(U,"click",mxUtils.bind(this,function(B){var H=mxEvent.getSource(B);H!=O&&H!=m?(null!=f&&f(),u(),mxEvent.consume(B)):A()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(U.style,"transform",E)}),R/2);window.setTimeout(A,n?4E3:3E4);F=!0}return F};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};+function(c,e,f,p,n,t,z,E,C){var F=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){t=null!=t?t:"bottom:10px;left:50%;";z=null!=z?z:"translate(-50%,120%)";E=null!=E?E:"translate(-50%,0%)";var S=n?500:1E3;F=n?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var U=document.createElement("div");U.style.cssText="position:absolute;"++t+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";"+F;mxUtils.setPrefixedStyle(U.style,"transform",z);mxUtils.setPrefixedStyle(U.style,"transition","all "+S+"ms ease");U.className="geBtn gePrimaryBtn"+(n?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(U.style,"box-shadow","1px 1px 2px 0px #ddd");null!=C&&mxUtils.setPrefixedStyle(U.style,"transform-origin",C);if(!n){var O=document.createElement("img");O.setAttribute("src",IMAGE_PATH+"/logo.png");+O.setAttribute("border","0");O.setAttribute("align","absmiddle");O.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";U.appendChild(O);O=document.createElement("img");O.setAttribute("src",Dialog.prototype.closeImage);O.setAttribute("title",mxResources.get(p?"doNotShowAgain":"close"));O.setAttribute("border","0");O.style.cssText=(n?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";U.appendChild(O)}mxUtils.write(U,+e);document.body.appendChild(U);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var N=document.createElement("input");N.setAttribute("type","checkbox");N.setAttribute("id","geDoNotShowAgainCheckbox");N.style.marginRight="6px";if(!p){e.appendChild(N);var m=document.createElement("label");m.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(m,+mxResources.get("doNotShowAgain"));e.appendChild(m);U.style.paddingBottom=n?"16px":"30px";U.appendChild(e)}var u=mxUtils.bind(this,function(){null!=U.parentNode&&(U.parentNode.removeChild(U),this.bannerShowing=!1,N.checked||p)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=O&&mxEvent.addListener(O,"click",mxUtils.bind(this,function(B){mxEvent.consume(B);u()}));var A=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(U.style,+"transform",z);window.setTimeout(mxUtils.bind(this,function(){u()}),S)});mxEvent.addListener(U,"click",mxUtils.bind(this,function(B){var H=mxEvent.getSource(B);H!=N&&H!=m?(null!=f&&f(),u(),mxEvent.consume(B)):A()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(U.style,"transform",E)}),S/2);window.setTimeout(A,n?4E3:3E4);F=!0}return F};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,e,f,p){c=c.toDataURL("image/"+f);if(null!=c&&6<c.length)null!=e&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(e))),0<p&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",p));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,f,p,n){var t="jpeg"==f?"jpg":f;p=this.getBaseFilename(p)+(null!=e?".drawio":"")+"."+t;c=this.createImageDataUri(c,e,f,n);this.saveData(p,t,c.substring(c.lastIndexOf(",")+1),"image/"+f,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,f,p,n,t){"text/xml"!=f||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.html)$/i.test(e)||(e=e+"."+(null!=t?t:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=p?this.base64ToBlob(c,f):new Blob([c],{type:f}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)f=window.open("about:blank","_blank"),null==f?mxUtils.popup(c,!0):(f.document.write(c),f.document.close(),f.document.execCommand("SaveAs",!0,e),f.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==f||"image/"!=f.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,f,p);else{var z=document.createElement("a");t=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof z.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var E=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);t=65==(E?parseInt(E[2],10):!1)?!1:t}if(t||this.isOffline()){z.href=URL.createObjectURL(p?this.base64ToBlob(c,f):new Blob([c],{type:f}));t?z.download=e:z.setAttribute("target","_blank");document.body.appendChild(z);try{window.setTimeout(function(){URL.revokeObjectURL(z.href)},2E4),z.click(),z.parentNode.removeChild(z)}catch(C){}}else this.createEchoRequest(c,e,f,p,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,f,p,n,t){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,-c+(null!=f?"&mime="+f:"")+(null!=n?"&format="+n:"")+(null!=t?"&base64="+t:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(p?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,e,f,p,n,t,z,E){t=null!=t?t:!1;z=null!=z?z:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);var C=mxUtils.bind(this,function(R,U,P,O){try{if("_blank"==U)if(null!=f&&"image/"==f.substring(0,6))this.openInNewWindow(c,f,p);else if(null!=f&&"text/html"==f.substring(0,9)){var m=new EmbedDialog(this,c);this.showDialog(m.container,-450,240,!0,!0);m.init()}else{var u=window.open("about:blank");null==u?mxUtils.popup(c,!0):(u.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),u.document.close())}else if(U==App.MODE_DEVICE||"download"==U)this.doSaveLocalFile(c,R,f,p,null,E);else if(null!=R&&0<R.length){var A=mxUtils.bind(this,function(B){try{this.exportFile(c,R,f,p,U,B)}catch(H){this.handleError(H)}});null!=O?A(O):this.pickFolder(U,A)}}catch(B){this.handleError(B)}});n=[];t||n.push(App.MODE_BROWSER);z||n.push("_blank");-var F=new SaveDialog(this,e,mxUtils.bind(this,function(R,U,P){C(R.value,U,R,P);this.hideDialog(null,null,F.container)}),n,c,f,p);this.showDialog(F.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));F.init()};EditorUi.prototype.openInNewWindow=function(c,e,f){var p=window.open("about:blank");if(null==p||null==p.document)mxUtils.popup(c,!0);else{var n="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==e){var t=mxUtils.parseXml(c).documentElement.style.backgroundColor;+c+(null!=f?"&mime="+f:"")+(null!=n?"&format="+n:"")+(null!=t?"&base64="+t:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(p?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,e,f,p,n,t,z,E){t=null!=t?t:!1;z=null!=z?z:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);var C=mxUtils.bind(this,function(S,U,O,N){try{if("_blank"==U)if(null!=f&&"image/"==f.substring(0,6))this.openInNewWindow(c,f,p);else if(null!=f&&"text/html"==f.substring(0,9)){var m=new EmbedDialog(this,c);this.showDialog(m.container,+450,240,!0,!0);m.init()}else{var u=window.open("about:blank");null==u?mxUtils.popup(c,!0):(u.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),u.document.close())}else if(U==App.MODE_DEVICE||"download"==U)this.doSaveLocalFile(c,S,f,p,null,E);else if(null!=S&&0<S.length){var A=mxUtils.bind(this,function(B){try{this.exportFile(c,S,f,p,U,B)}catch(H){this.handleError(H)}});null!=N?A(N):this.pickFolder(U,A)}}catch(B){this.handleError(B)}});n=[];t||n.push(App.MODE_BROWSER);z||n.push("_blank");+var F=new SaveDialog(this,e,mxUtils.bind(this,function(S,U,O){C(S.value,U,S,O);this.hideDialog(null,null,F.container)}),n,c,f,p);this.showDialog(F.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));F.init()};EditorUi.prototype.openInNewWindow=function(c,e,f){var p=window.open("about:blank");if(null==p||null==p.document)mxUtils.popup(c,!0);else{var n="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==e){var t=mxUtils.parseXml(c).documentElement.style.backgroundColor;""!=t&&(n="background: "+t+";")}n='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+n+'">';"image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"!=e||f?(t=f?c:btoa(unescape(encodeURIComponent(c))),p.document.write(n+'<img style="max-width:100%;" src="data:'+e+";base64,"+t+'"/></body></html>')):p.document.write(n+c+"</body></html>"):p.document.write(n+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");p.document.close()}};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var e=c(mxUtils.bind(this,function(p){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=@@ -13162,18 +13162,18 @@ null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});z.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",n);this.editor.exportToCanvas(mxUtils.bind(this,function(E){z.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var C=this.createImageDataUri(E,null,"png");E=document.createElement("img");E.style.maxWidth="140px";E.style.maxHeight="140px";E.style.cursor="pointer";E.style.backgroundColor="white";E.setAttribute("title",mxResources.get("openInNewWindow"));E.setAttribute("border","0");E.setAttribute("src",C);this.exportDialog.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.openInNewWindow(C.substring(C.indexOf(",")+1),"image/png",!0);n.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(E){z.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(E)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(p)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,f,p,n){this.isLocalFileSave()?this.saveLocalFile(f,c,p,n,e):this.saveRequest(c,e,mxUtils.bind(this,function(t,z){return this.createEchoRequest(f,t,p,n,e,z)}),f,n,p)};EditorUi.prototype.saveRequest=function(c,e,f,p,n,t,z){z=null!=z?z:!mxClient.IS_IOS||!navigator.standalone;var E=mxUtils.bind(this,-function(F,R,U,P){if("_blank"==R||null!=F&&0<F.length){var O=f("_blank"==R?null:F,R==App.MODE_DEVICE||"download"==R||null==R||"_blank"==R?"0":"1");null!=O&&(R==App.MODE_DEVICE||"download"==R||"_blank"==R?O.simulate(document,"_blank"):(U=mxUtils.bind(this,function(m){t=null!=t?t:"pdf"==e?"application/pdf":"image/"+e;if(null!=p)try{this.exportFile(p,F,t,!0,R,m)}catch(u){this.handleError(u)}else this.spinner.spin(document.body,mxResources.get("saving"))&&O.send(mxUtils.bind(this,function(){this.spinner.stop();-if(200<=O.getStatus()&&299>=O.getStatus())try{this.exportFile(O.getText(),F,t,!0,R,m)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}))}),null!=P?U(P):this.pickFolder(R,U)))}});n=[App.MODE_BROWSER];z||n.push("_blank");var C=new SaveDialog(this,c,mxUtils.bind(this,function(F,R,U){E(F.value,R,F,U);this.hideDialog(null,null,C.container)}),n,null,"application/pdf");this.showDialog(C.container,+function(F,S,U,O){if("_blank"==S||null!=F&&0<F.length){var N=f("_blank"==S?null:F,S==App.MODE_DEVICE||"download"==S||null==S||"_blank"==S?"0":"1");null!=N&&(S==App.MODE_DEVICE||"download"==S||"_blank"==S?N.simulate(document,"_blank"):(U=mxUtils.bind(this,function(m){t=null!=t?t:"pdf"==e?"application/pdf":"image/"+e;if(null!=p)try{this.exportFile(p,F,t,!0,S,m)}catch(u){this.handleError(u)}else this.spinner.spin(document.body,mxResources.get("saving"))&&N.send(mxUtils.bind(this,function(){this.spinner.stop();+if(200<=N.getStatus()&&299>=N.getStatus())try{this.exportFile(N.getText(),F,t,!0,S,m)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}))}),null!=O?U(O):this.pickFolder(S,U)))}});n=[App.MODE_BROWSER];z||n.push("_blank");var C=new SaveDialog(this,c,mxUtils.bind(this,function(F,S,U){E(F.value,S,F,U);this.hideDialog(null,null,C.container)}),n,null,"application/pdf");this.showDialog(C.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));C.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,f,p,n,t){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,e,f){e(null)};EditorUi.prototype.exportSvg=function(c,e,f,p,n,t,-z,E,C,F,R,U,P,O){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(N){Editor.addRetryToError(N,mxUtils.bind(this,function(){this.exportSvg(c,e,f,p,n,t,z,E,C,F,R,U,P,O)}));this.handleError(N)})))try{var m=this.editor.graph.isSelectionEmpty();f=null!=f?f:m;var u=e?null:this.editor.graph.background;u==mxConstants.NONE&&(u=null);null==u&&0==e&&(u=this.editor.graph.shapeBackgroundColor);var A=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&-(this.editor.graph.addForeignObjectWarning=function(){});var B=mxUtils.lightDarkColorSupported,H=mxUtils.preferDarkColor;if("light"==R||"dark"==R)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==R;var T=this.editor.graph.createSvgImageExport(n),k=this.editor.graph.getSvg(u,c,z,E,null,f,null,T,"blank"==F?"_blank":"self"==F?"_top":null,null,!P,R,U);mxUtils.lightDarkColorSupported=B;mxUtils.preferDarkColor=H;this.editor.graph.addForeignObjectWarning=A;p&&this.editor.graph.addSvgShadow(k);-var v=this.getBaseFilename()+(n?".drawio":"")+".svg";O=null!=O?O:mxUtils.bind(this,function(N){this.isLocalFileSave()||N.length<=MAX_REQUEST_SIZE?this.saveData(v,"svg",N,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(N)}))});var G=mxUtils.bind(this,function(N){this.spinner.stop();n&&N.setAttribute("content",this.getFileData(!0,null,null,null,f,C,null,null,null,null,null,c,z));O(Graph.xmlDeclaration+-"\n"+(n?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(N))});this.editor.graph.mathEnabled&&this.editor.addMathCss(k);var I=mxUtils.bind(this,function(N){Editor.replaceSvgDataUris&&t&&EditorUi.embedSvgImages(N);Editor.foreignObjectImages&&P?this.replaceAlternateContent(N,R,G):G(N)}),M=mxUtils.bind(this,function(N){t&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(N,I,this.thumbImageCache)):I(N)});P?this.embedFonts(k,-M):(this.editor.addFontCss(k),M(k))}catch(N){this.handleError(N)}};EditorUi.prototype.replaceAlternateContent=function(c,e,f){function p(U,P,O,m,u){var A=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");A.setAttribute("x",P);A.setAttribute("y",O+.5);A.setAttribute("width",m.width);A.setAttribute("height",m.height);null==A.setAttributeNS?A.setAttribute("xlink:href",u):A.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",u);U.replaceChild(A,U.lastChild);E()}function n(){if(z<R.length)R[z++](n)}-var t="";e=c.getElementsByTagName("style");for(var z=0;z<e.length;z++)t+=e[z].innerHTML;e=c.getElementsByTagName("switch");counter=e.length;var E=mxUtils.bind(this,function(){counter--;0==counter&&f(c)}),C={},F={},R=[];for(z=0;z<e.length;z++)mxUtils.bind(this,function(U){var P=U.getElementsByTagName("div");if(0<P.length)try{var O=P[0].cloneNode(!0),m=parseInt(O.style.marginLeft),u=parseInt(O.style.paddingTop),A=O.getElementsByTagName("div")[1],B=P=!1,H=O.style.alignItems,T=O.style.justifyContent;-if(null!=O.style.writingMode){var k=O.style.writingMode;B="vertical-"==k.substring(0,9);P="-rl"==k.substring(k.length-3)}var v=!B&&"1px"==O.style.width||B&&"1px"==O.style.height;if(!B&&"1px"==O.style.height||B&&"1px"==O.style.width)O.style.alignItems=B&&P?"unsafe flex-end":"unsafe flex-start";v&&(O.style.justifyContent="unsafe flex-start");O.style.paddingTop="";O.style.marginLeft="";var G=O.outerHTML,I=C[G];null==I&&(O.style.position="absolute",O.style.visibility="hidden",document.body.appendChild(O),-k=1,k="1px"==O.style.width?A.offsetWidth:parseInt(O.style.width),v=1,v="1px"==O.style.height?A.offsetHeight:parseInt(O.style.height),document.body.removeChild(O),I=new mxRectangle(m,u,k,v),C[G]=I);"1px"==O.style.height&&("unsafe center"==H?u-=I.height/2:"unsafe flex-end"==H&&(u-=I.height));if("1px"==O.style.width)if(!B&&"unsafe center"==T||B&&"unsafe center"==H)m-=I.width/2;else if(!B&&"unsafe flex-end"==T||B&&(!P&&"unsafe flex-end"==H||P&&"unsafe flex-start"==H))m-=I.width;I=new mxRectangle(m,u,-I.width,I.height+parseInt(A.style.fontSize)/4);R.push(mxUtils.bind(this,function(M){var N=F[G];null==N?Graph.htmlToPng(G,I.width,I.height,mxUtils.bind(this,function(S){p(U,m,u,I,S);F[G]=S;M()}),t):(p(U,m,u,I,N),M())}))}catch(M){E()}else E()})(e[z]);0==counter&&f(c);z=0;n()};EditorUi.prototype.addRadiobox=function(c,e,f,p,n,t,z){return this.addCheckbox(c,f,p,n,t,z,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,f,p,n,t,z,E){t=null!=t?t:!0;var C=document.createElement("input");C.style.marginRight=+z,E,C,F,S,U,O,N){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(R){Editor.addRetryToError(R,mxUtils.bind(this,function(){this.exportSvg(c,e,f,p,n,t,z,E,C,F,S,U,O,N)}));this.handleError(R)})))try{var m=this.editor.graph.isSelectionEmpty();f=null!=f?f:m;var u=e?null:this.editor.graph.background;u==mxConstants.NONE&&(u=null);null==u&&0==e&&(u=this.editor.graph.shapeBackgroundColor);var A=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&+(this.editor.graph.addForeignObjectWarning=function(){});var B=mxUtils.lightDarkColorSupported,H=mxUtils.preferDarkColor;if("light"==S||"dark"==S)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==S;var T=this.editor.graph.createSvgImageExport(n),k=this.editor.graph.getSvg(u,c,z,E,null,f,null,T,"blank"==F?"_blank":"self"==F?"_top":null,null,!O,S,U);mxUtils.lightDarkColorSupported=B;mxUtils.preferDarkColor=H;this.editor.graph.addForeignObjectWarning=A;p&&this.editor.graph.addSvgShadow(k);+var v=this.getBaseFilename()+(n?".drawio":"")+".svg";N=null!=N?N:mxUtils.bind(this,function(R){this.isLocalFileSave()||R.length<=MAX_REQUEST_SIZE?this.saveData(v,"svg",R,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(R)}))});var G=mxUtils.bind(this,function(R){this.spinner.stop();n&&R.setAttribute("content",this.getFileData(!0,null,null,null,f,C,null,null,null,null,null,c,z));N(Graph.xmlDeclaration++"\n"+(n?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(R))});this.editor.graph.mathEnabled&&this.editor.addMathCss(k);var I=mxUtils.bind(this,function(R){Editor.replaceSvgDataUris&&t&&EditorUi.embedSvgImages(R);Editor.foreignObjectImages&&O?this.replaceAlternateContent(R,S,G):G(R)}),M=mxUtils.bind(this,function(R){t&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(R,I,this.thumbImageCache)):I(R)});O?this.embedFonts(k,+M):(this.editor.addFontCss(k),M(k))}catch(R){this.handleError(R)}};EditorUi.prototype.replaceAlternateContent=function(c,e,f){function p(U,O,N,m,u){var A=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");A.setAttribute("x",O);A.setAttribute("y",N+.5);A.setAttribute("width",m.width);A.setAttribute("height",m.height);null==A.setAttributeNS?A.setAttribute("xlink:href",u):A.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",u);U.replaceChild(A,U.lastChild);E()}function n(){if(z<S.length)S[z++](n)}+var t="";e=c.getElementsByTagName("style");for(var z=0;z<e.length;z++)t+=e[z].innerHTML;e=c.getElementsByTagName("switch");counter=e.length;var E=mxUtils.bind(this,function(){counter--;0==counter&&f(c)}),C={},F={},S=[];for(z=0;z<e.length;z++)mxUtils.bind(this,function(U){var O=U.getElementsByTagName("div");if(0<O.length)try{var N=O[0].cloneNode(!0),m=parseInt(N.style.marginLeft),u=parseInt(N.style.paddingTop),A=N.getElementsByTagName("div")[1],B=O=!1,H=N.style.alignItems,T=N.style.justifyContent;+if(null!=N.style.writingMode){var k=N.style.writingMode;B="vertical-"==k.substring(0,9);O="-rl"==k.substring(k.length-3)}var v=!B&&"1px"==N.style.width||B&&"1px"==N.style.height;if(!B&&"1px"==N.style.height||B&&"1px"==N.style.width)N.style.alignItems=B&&O?"unsafe flex-end":"unsafe flex-start";v&&(N.style.justifyContent="unsafe flex-start");N.style.paddingTop="";N.style.marginLeft="";var G=N.outerHTML,I=C[G];null==I&&(N.style.position="absolute",N.style.visibility="hidden",document.body.appendChild(N),+k=1,k="1px"==N.style.width?A.offsetWidth:parseInt(N.style.width),v=1,v="1px"==N.style.height?A.offsetHeight:parseInt(N.style.height),document.body.removeChild(N),I=new mxRectangle(m,u,k,v),C[G]=I);"1px"==N.style.height&&("unsafe center"==H?u-=I.height/2:"unsafe flex-end"==H&&(u-=I.height));if("1px"==N.style.width)if(!B&&"unsafe center"==T||B&&"unsafe center"==H)m-=I.width/2;else if(!B&&"unsafe flex-end"==T||B&&(!O&&"unsafe flex-end"==H||O&&"unsafe flex-start"==H))m-=I.width;I=new mxRectangle(m,u,+I.width,I.height+parseInt(A.style.fontSize)/4);S.push(mxUtils.bind(this,function(M){var R=F[G];null==R?Graph.htmlToPng(G,I.width,I.height,mxUtils.bind(this,function(Q){p(U,m,u,I,Q);F[G]=Q;M()}),t):(p(U,m,u,I,R),M())}))}catch(M){E()}else E()})(e[z]);0==counter&&f(c);z=0;n()};EditorUi.prototype.addRadiobox=function(c,e,f,p,n,t,z){return this.addCheckbox(c,f,p,n,t,z,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,f,p,n,t,z,E){t=null!=t?t:!0;var C=document.createElement("input");C.style.marginRight="8px";C.style.marginTop="16px";C.setAttribute("type",z?"radio":"checkbox");z="geCheckbox-"+Editor.guid();C.id=z;null!=E&&C.setAttribute("name",E);f&&(C.setAttribute("checked","checked"),C.defaultChecked=!0);p&&C.setAttribute("disabled","disabled");t&&(c.appendChild(C),f=document.createElement("label"),mxUtils.write(f,e),f.setAttribute("for",z),c.appendChild(f),n||mxUtils.br(c));return C};EditorUi.prototype.addEditButton=function(c,e){var f=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);f.style.marginLeft="24px";var p=this.getCurrentFile(),n="";null!=p&&p.getMode()!=App.MODE_DEVICE&&p.getMode()!=App.MODE_BROWSER&&(n=window.location.href);var t=document.createElement("select");t.style.maxWidth="200px";t.style.width="auto";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";p=document.createElement("option");p.setAttribute("value","blank");mxUtils.write(p,mxResources.get("makeCopy"));t.appendChild(p);var z=document.createElement("option");z.setAttribute("value","custom");mxUtils.write(z,mxResources.get("custom")+"...");t.appendChild(z);c.appendChild(t);mxEvent.addListener(t,"change",mxUtils.bind(this,function(){if("custom"==t.value){var E=new FilenameDialog(this,n,mxResources.get("ok"),function(C){null!=C?(n=C,z.setAttribute("title",C)):(t.value="blank",z.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){t.value="blank"});this.showDialog(E.container,300,80,!0,!1);E.init()}}));mxEvent.addListener(f,"change",mxUtils.bind(this,@@ -13181,161 +13181,161 @@ function(){f.checked&&(null==e||e.checked)?t.removeAttribute("disabled"):t.setAtE.style.backgroundColor=t):(E.style.backgroundPosition="center center",E.style.backgroundRepeat="no-repeat",E.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");z.innerText="";z.appendChild(E)}mxUtils.write(c,mxResources.get("links")+":");var p=document.createElement("select");p.style.width="100px";p.style.padding="0px";p.style.marginLeft="8px";p.style.marginRight="10px";p.className="geBtn";var n=document.createElement("option");n.setAttribute("value","auto");mxUtils.write(n,mxResources.get("automatic"));p.appendChild(n);n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("openInNewWindow"));p.appendChild(n);n=document.createElement("option");n.setAttribute("value","self");mxUtils.write(n,mxResources.get("openInThisWindow"));p.appendChild(n);e&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),p.appendChild(e));c.appendChild(p);mxUtils.write(c,mxResources.get("borderColor")+":");var t="#0000ff",z=null;z=mxUtils.button("",mxUtils.bind(this,function(E){this.pickColor(t||"none",function(C){t=C;f()});mxEvent.consume(E)}));f();z.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";z.style.marginLeft="4px";z.style.height="22px";z.style.width="22px";z.style.position="relative";z.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";z.className="geColorBtn";c.appendChild(z);mxUtils.br(c);return{getColor:function(){return t},getTarget:function(){return p.value},-focus:function(){p.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,f,p,n,t){t=null!=t?t:[];f&&(t.push("lightbox=1"),"auto"!=c&&t.push("target="+c),null!=e&&e!=mxConstants.NONE&&t.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=p&&0<p.length&&t.push("edit="+encodeURIComponent(p)),n&&t.push("layers=1"),this.editor.graph.foldingEnabled&&t.push("nav=1"));return t};EditorUi.prototype.createLink=function(c,e,f,p,n,t,z,E,C,F,R,U,P){var O=this.getCurrentFile();C=this.createUrlParameters(c,-e,p,n,t,C);c=!0;null!=z?f="#U"+encodeURIComponent(z):E||null==O||""==O.getHash()?f="#R"+encodeURIComponent(f?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(f="#"+O.getHash(),c=!1);c&&null!=O&&null!=O.getTitle()&&O.getTitle()!=this.defaultFilename&&C.push("title="+encodeURIComponent(O.getTitle()));F&&1<f.length&&(C.push("open="+f.substring(1)),f="");R&&null!=this.currentPage&&C.push("page-id="+this.currentPage.getId());U&&C.push("transparent=1");-null!=P&&C.push("dark="+P);return(p&&(null!=z||null!=O&&O.getMode()!=App.MODE_GITHUB&&O.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<C.length?"?"+C.join("&"):"")+f};EditorUi.prototype.createHtml=function(c,e,f,p,n,t,z,E,C,F,R,U,P){this.getBasenames();var O={};""!=n&&n!=mxConstants.NONE&&(O.highlight=n);"auto"!==p&&(O.target=p);F||(O.lightbox=-!1);O.nav=this.editor.graph.foldingEnabled;f=parseInt(f);isNaN(f)||100==f||(O.zoom=f/100);f=[];z&&(f.push("pages"),O.resize=!0,null!=this.pages&&null!=this.currentPage&&(O.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(f.push("zoom"),O.resize=!0);E&&f.push("layers");C&&f.push("tags");null!=P&&(O["dark-mode"]=P);0<f.length&&(F&&f.push("lightbox"),O.toolbar=f.join(" "));null!=R&&0<R.length&&(O.edit=R);null!=c?O.url=c:O.xml=this.getFileData(!0,null,null,null,null,!z);e='<div class="mxgraph" style="'+-(t?"max-width:100%;":"")+(""!=f?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(O))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";U(e,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")++focus:function(){p.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,f,p,n,t){t=null!=t?t:[];f&&(t.push("lightbox=1"),"auto"!=c&&t.push("target="+c),null!=e&&e!=mxConstants.NONE&&t.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=p&&0<p.length&&t.push("edit="+encodeURIComponent(p)),n&&t.push("layers=1"),this.editor.graph.foldingEnabled&&t.push("nav=1"));return t};EditorUi.prototype.createLink=function(c,e,f,p,n,t,z,E,C,F,S,U,O){var N=this.getCurrentFile();C=this.createUrlParameters(c,+e,p,n,t,C);c=!0;null!=z?f="#U"+encodeURIComponent(z):E||null==N||""==N.getHash()?f="#R"+encodeURIComponent(f?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(f="#"+N.getHash(),c=!1);c&&null!=N&&null!=N.getTitle()&&N.getTitle()!=this.defaultFilename&&C.push("title="+encodeURIComponent(N.getTitle()));F&&1<f.length&&(C.push("open="+f.substring(1)),f="");S&&null!=this.currentPage&&C.push("page-id="+this.currentPage.getId());U&&C.push("transparent=1");+null!=O&&C.push("dark="+O);return(p&&(null!=z||null!=N&&N.getMode()!=App.MODE_GITHUB&&N.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<C.length?"?"+C.join("&"):"")+f};EditorUi.prototype.createHtml=function(c,e,f,p,n,t,z,E,C,F,S,U,O){this.getBasenames();var N={};""!=n&&n!=mxConstants.NONE&&(N.highlight=n);"auto"!==p&&(N.target=p);F||(N.lightbox=+!1);N.nav=this.editor.graph.foldingEnabled;f=parseInt(f);isNaN(f)||100==f||(N.zoom=f/100);f=[];z&&(f.push("pages"),N.resize=!0,null!=this.pages&&null!=this.currentPage&&(N.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(f.push("zoom"),N.resize=!0);E&&f.push("layers");C&&f.push("tags");null!=O&&(N["dark-mode"]=O);0<f.length&&(F&&f.push("lightbox"),N.toolbar=f.join(" "));null!=S&&0<S.length&&(N.edit=S);null!=c?N.url=c:N.xml=this.getFileData(!0,null,null,null,null,!z);e='<div class="mxgraph" style="'++(t?"max-width:100%;":"")+(""!=f?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(N))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";U(e,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,f,p){var n=document.createElement("div");n.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,mxResources.get("html"));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";n.appendChild(t);var z=document.createElement("div");z.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","type-embedhtmldialog");t=E.cloneNode(!0);t.setAttribute("value","copy");z.appendChild(t);var C=document.createElement("span");mxUtils.write(C,mxResources.get("includeCopyOfMyDiagram"));z.appendChild(C);mxUtils.br(z);z.appendChild(E);C=document.createElement("span");mxUtils.write(C,mxResources.get("publicDiagramUrl"));z.appendChild(C);var F=this.getCurrentFile();null==f&&null!=F&&F.constructor==window.DriveFile&&(C=-document.createElement("a"),C.style.paddingLeft="12px",C.style.color="gray",C.style.cursor="pointer",mxUtils.write(C,mxResources.get("share")),z.appendChild(C),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(F.getId(),F)})));t.setAttribute("checked","checked");null==f&&E.setAttribute("disabled","disabled");n.appendChild(z);z=380;var R=this.addLinkSection(n),U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";+document.createElement("a"),C.style.paddingLeft="12px",C.style.color="gray",C.style.cursor="pointer",mxUtils.write(C,mxResources.get("share")),z.appendChild(C),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(F.getId(),F)})));t.setAttribute("checked","checked");null==f&&E.setAttribute("disabled","disabled");n.appendChild(z);z=380;var S=this.addLinkSection(n),U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginTop="16px";C=document.createElement("option");C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));U.appendChild(C);C=document.createElement("option");C.setAttribute("value","dark");mxUtils.write(C,mxResources.get("dark"));U.appendChild(C);C=document.createElement("option");C.setAttribute("value","auto");mxUtils.write(C,mxResources.get("automatic"));C.setAttribute("selected","selected");U.appendChild(C);C.setAttribute("selected","selected");mxUtils.write(n,mxResources.get("appearance")+-":");n.appendChild(U);mxUtils.br(n);z+=26;var P=this.addCheckbox(n,mxResources.get("zoom"),!0,null,!0);mxUtils.write(n,":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft="4px";O.style.marginRight="12px";O.value="100%";n.appendChild(O);var m=this.addCheckbox(n,mxResources.get("fit"),!0);C=null!=this.pages&&1<this.pages.length;var u=u=this.addCheckbox(n,mxResources.get("allPages"),C,!C),A=this.addCheckbox(n,mxResources.get("layers"),+":");n.appendChild(U);mxUtils.br(n);z+=26;var O=this.addCheckbox(n,mxResources.get("zoom"),!0,null,!0);mxUtils.write(n,":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.style.marginRight="12px";N.value="100%";n.appendChild(N);var m=this.addCheckbox(n,mxResources.get("fit"),!0);C=null!=this.pages&&1<this.pages.length;var u=u=this.addCheckbox(n,mxResources.get("allPages"),C,!C),A=this.addCheckbox(n,mxResources.get("layers"),!0),B=this.addCheckbox(n,mxResources.get("tags"),!0),H=this.addCheckbox(n,mxResources.get("lightbox"),!0),T=null;if(EditorUi.enableHtmlEditOption){T=this.addEditButton(n,H);var k=T.getEditInput();k.style.marginBottom="16px";z+=50;mxEvent.addListener(H,"change",function(){H.checked?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled");k.checked&&H.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,n,mxUtils.bind(this,-function(){p(E.checked?f:null,P.checked,O.value,R.getTarget(),R.getColor(),m.checked,u.checked,A.checked,B.checked,H.checked,null!=T?T.getLink():null,null!=U?U.value:null)}),null,c,e);this.showDialog(c.container,340,z,!0,!0);t.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,f,p,n,t,z,E,C,F,R){var U=document.createElement("div");U.style.whiteSpace="nowrap";var P=document.createElement("h3");mxUtils.write(P,c||mxResources.get("publish"));P.style.width="100%";P.style.textAlign="center";-P.style.marginTop="2px";P.style.marginBottom="20px";U.appendChild(P);var O=document.createElement("select");c=30;O.className="geBtn";O.style.marginBottom="8px";O.style.marginLeft="0px";O.style.width="100%";O.style.boxSizing="border-box";if(null==E||""==E.getHash())n=null!=n?n:"https://www.drawio.com/doc/faq/publish-diagram-as-link",P=document.createElement("option"),mxUtils.write(P,mxResources.get("makeCopy")),P.setAttribute("value","copy"),O.appendChild(P);P=document.createElement("option");mxUtils.write(P,-mxResources.get("authorizationRequired"));P.setAttribute("value","auth");O.appendChild(P);null!=E&&""!=E.getHash()||P.setAttribute("disabled","disabled");E=document.createElement("option");E.setAttribute("value","public");O.appendChild(E);null!=z?(mxUtils.write(E,mxResources.get("publicDiagramUrl")),E.setAttribute("title",z),O.value="public"):(mxUtils.write(E,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),E.setAttribute("disabled","disabled"));U.appendChild(O);-mxUtils.br(U);O.focus();var m=null,u=null;if(null!=e||null!=f)c+=30,mxUtils.write(U,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%",U.appendChild(m),mxUtils.write(U,mxResources.get("height")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom=+function(){p(E.checked?f:null,O.checked,N.value,S.getTarget(),S.getColor(),m.checked,u.checked,A.checked,B.checked,H.checked,null!=T?T.getLink():null,null!=U?U.value:null)}),null,c,e);this.showDialog(c.container,340,z,!0,!0);t.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,f,p,n,t,z,E,C,F,S){var U=document.createElement("div");U.style.whiteSpace="nowrap";var O=document.createElement("h3");mxUtils.write(O,c||mxResources.get("publish"));O.style.width="100%";O.style.textAlign="center";+O.style.marginTop="2px";O.style.marginBottom="20px";U.appendChild(O);var N=document.createElement("select");c=30;N.className="geBtn";N.style.marginBottom="8px";N.style.marginLeft="0px";N.style.width="100%";N.style.boxSizing="border-box";if(null==E||""==E.getHash())n=null!=n?n:"https://www.drawio.com/doc/faq/publish-diagram-as-link",O=document.createElement("option"),mxUtils.write(O,mxResources.get("makeCopy")),O.setAttribute("value","copy"),N.appendChild(O);O=document.createElement("option");mxUtils.write(O,+mxResources.get("authorizationRequired"));O.setAttribute("value","auth");N.appendChild(O);null!=E&&""!=E.getHash()||O.setAttribute("disabled","disabled");E=document.createElement("option");E.setAttribute("value","public");N.appendChild(E);null!=z?(mxUtils.write(E,mxResources.get("publicDiagramUrl")),E.setAttribute("title",z),N.value="public"):(mxUtils.write(E,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),E.setAttribute("disabled","disabled"));U.appendChild(N);+mxUtils.br(U);N.focus();var m=null,u=null;if(null!=e||null!=f)c+=30,mxUtils.write(U,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%",U.appendChild(m),mxUtils.write(U,mxResources.get("height")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom="10px",u.value=f+"px",U.appendChild(u),mxUtils.br(U);var A=this.addLinkSection(U,p),B=F?this.addCheckbox(U,mxResources.get("transparentBackground"),!1):null;null!=B&&(c+=20);var H=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,e=null!=this.currentPage?this.currentPage.getName():"",16<e.length&&(e=e.substring(0,16)+"..."),H=this.addCheckbox(U,mxResources.get("selectedPage")+": "+e));var T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft=-"8px";T.style.marginTop="16px";e=document.createElement("option");e.setAttribute("value","0");mxUtils.write(e,mxResources.get("light"));T.appendChild(e);e=document.createElement("option");e.setAttribute("value","1");mxUtils.write(e,mxResources.get("dark"));T.appendChild(e);e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));e.setAttribute("selected","selected");T.appendChild(e);R&&(mxUtils.write(U,mxResources.get("appearance")+":"),U.appendChild(T),+"8px";T.style.marginTop="16px";e=document.createElement("option");e.setAttribute("value","0");mxUtils.write(e,mxResources.get("light"));T.appendChild(e);e=document.createElement("option");e.setAttribute("value","1");mxUtils.write(e,mxResources.get("dark"));T.appendChild(e);e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));e.setAttribute("selected","selected");T.appendChild(e);S&&(mxUtils.write(U,mxResources.get("appearance")+":"),U.appendChild(T),mxUtils.br(U),c+=30);var k=this.addCheckbox(U,mxResources.get("lightbox"),!0,null,null,!p),v=this.addEditButton(U,k),G=v.getEditInput();p&&(G.style.marginLeft=k.style.marginLeft,k.style.display="none",c-=20);var I=this.addCheckbox(U,mxResources.get("layers"),!0);I.style.marginLeft=G.style.marginLeft;I.style.marginTop="8px";var M=this.addCheckbox(U,mxResources.get("tags"),!0);M.style.marginLeft=G.style.marginLeft;M.style.marginBottom="16px";M.style.marginTop="16px";mxEvent.addListener(k,"change",function(){k.checked?(I.removeAttribute("disabled"),G.removeAttribute("disabled"),M.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"));G.checked&&k.checked?v.getEditSelect().removeAttribute("disabled"):v.getEditSelect().setAttribute("disabled","disabled")});p=new CustomDialog(this,U,mxUtils.bind(this,function(){C(A.getTarget(),A.getColor(),null==H?!1:H.checked,k.checked,v.getLink(),I.checked,null!=m?m.value:null,null!=u?u.value:-null,M.checked,O.value,null!=B?B.checked:!1,T.value)}),null,mxResources.get("create"),n,t);this.showDialog(p.container,340,296+c,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)):null==O.parentNode;A.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,f,p,n){var t=document.createElement("div");t.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("image"));z.style.cssText=+null,M.checked,N.value,null!=B?B.checked:!1,T.value)}),null,mxResources.get("create"),n,t);this.showDialog(p.container,340,296+c,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)):null==N.parentNode;A.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,f,p,n){var t=document.createElement("div");t.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("image"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(n?"10":"4")+"px";t.appendChild(z);if(n){mxUtils.write(t,mxResources.get("zoom")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value=this.lastExportZoom||"100%";t.appendChild(E);mxUtils.write(t,mxResources.get("borderWidth")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight=-"16px";C.style.width="60px";C.style.marginLeft="4px";C.value=this.lastExportBorder||"0";t.appendChild(C);mxUtils.br(t)}var F=this.addCheckbox(t,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),R=p?null:this.addCheckbox(t,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);z=this.editor.graph;var U=p?null:this.addCheckbox(t,mxResources.get("transparentBackground"),z.background==mxConstants.NONE||null==z.background);null!=U&&(U.style.marginBottom="16px");-c=new CustomDialog(this,t,mxUtils.bind(this,function(){var P=parseInt(E.value)/100||1,O=parseInt(C.value)||0;f(!F.checked,null!=R?R.checked:!1,null!=U?U.checked:!1,P,O)}),null,c,e);this.showDialog(c.container,300,(n?25:0)+(p?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,f,p,n,t,z,E,C){z=null!=z?z:Editor.defaultIncludeDiagram;var F=document.createElement("div");F.style.whiteSpace="nowrap";var R=this.editor.graph,U="jpeg"==E||"webp"==E?220:320,P=document.createElement("h3");mxUtils.write(P,-c);P.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";F.appendChild(P);mxUtils.write(F,mxResources.get("zoom")+":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft="4px";O.style.marginRight="12px";O.value=this.lastExportZoom||"100%";F.appendChild(O);mxUtils.write(F,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight=-"16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";F.appendChild(m);mxUtils.br(F);var u=this.addCheckbox(F,mxResources.get("selectionOnly"),!1,R.isSelectionEmpty()),A=document.createElement("input");A.style.marginTop="16px";A.style.marginRight="8px";A.style.marginLeft="24px";A.setAttribute("disabled","disabled");A.setAttribute("type","checkbox");var B=document.createElement("select");B.style.marginTop="16px";B.style.marginLeft="8px";c=["selectionOnly","diagram",-"page"];for(P=0;P<c.length;P++)if(!R.isSelectionEmpty()||"selectionOnly"!=c[P]){var H=document.createElement("option");mxUtils.write(H,mxResources.get(c[P]));H.setAttribute("value",c[P]);B.appendChild(H)}C?(mxUtils.write(F,mxResources.get("size")+":"),F.appendChild(B),mxUtils.br(F),U+=26,mxEvent.addListener(B,"change",function(){"selectionOnly"==B.value&&(u.checked=!0)})):t&&(F.appendChild(A),mxUtils.write(F,mxResources.get("crop")),mxUtils.br(F),U+=30,mxEvent.addListener(u,"change",function(){u.checked?-A.removeAttribute("disabled"):A.setAttribute("disabled","disabled")}));R.isSelectionEmpty()?C&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",U-=30):(B.value="diagram",A.setAttribute("checked","checked"),A.defaultChecked=!0,mxEvent.addListener(u,"change",function(){B.value=u.checked?"selectionOnly":"diagram"}));var T=this.addCheckbox(F,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=E&&"webp"!=E),k=document.createElement("select");+"16px";C.style.width="60px";C.style.marginLeft="4px";C.value=this.lastExportBorder||"0";t.appendChild(C);mxUtils.br(t)}var F=this.addCheckbox(t,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),S=p?null:this.addCheckbox(t,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);z=this.editor.graph;var U=p?null:this.addCheckbox(t,mxResources.get("transparentBackground"),z.background==mxConstants.NONE||null==z.background);null!=U&&(U.style.marginBottom="16px");+c=new CustomDialog(this,t,mxUtils.bind(this,function(){var O=parseInt(E.value)/100||1,N=parseInt(C.value)||0;f(!F.checked,null!=S?S.checked:!1,null!=U?U.checked:!1,O,N)}),null,c,e);this.showDialog(c.container,300,(n?25:0)+(p?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,f,p,n,t,z,E,C){z=null!=z?z:Editor.defaultIncludeDiagram;var F=document.createElement("div");F.style.whiteSpace="nowrap";var S=this.editor.graph,U="jpeg"==E||"webp"==E?220:320,O=document.createElement("h3");mxUtils.write(O,+c);O.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";F.appendChild(O);mxUtils.write(F,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";F.appendChild(N);mxUtils.write(F,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight=+"16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";F.appendChild(m);mxUtils.br(F);var u=this.addCheckbox(F,mxResources.get("selectionOnly"),!1,S.isSelectionEmpty()),A=document.createElement("input");A.style.marginTop="16px";A.style.marginRight="8px";A.style.marginLeft="24px";A.setAttribute("disabled","disabled");A.setAttribute("type","checkbox");var B=document.createElement("select");B.style.marginTop="16px";B.style.marginLeft="8px";c=["selectionOnly","diagram",+"page"];for(O=0;O<c.length;O++)if(!S.isSelectionEmpty()||"selectionOnly"!=c[O]){var H=document.createElement("option");mxUtils.write(H,mxResources.get(c[O]));H.setAttribute("value",c[O]);B.appendChild(H)}C?(mxUtils.write(F,mxResources.get("size")+":"),F.appendChild(B),mxUtils.br(F),U+=26,mxEvent.addListener(B,"change",function(){"selectionOnly"==B.value&&(u.checked=!0)})):t&&(F.appendChild(A),mxUtils.write(F,mxResources.get("crop")),mxUtils.br(F),U+=30,mxEvent.addListener(u,"change",function(){u.checked?+A.removeAttribute("disabled"):A.setAttribute("disabled","disabled")}));S.isSelectionEmpty()?C&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",U-=30):(B.value="diagram",A.setAttribute("checked","checked"),A.defaultChecked=!0,mxEvent.addListener(u,"change",function(){B.value=u.checked?"selectionOnly":"diagram"}));var T=this.addCheckbox(F,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=E&&"webp"!=E),k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";t=document.createElement("option");t.setAttribute("value","light");mxUtils.write(t,mxResources.get("light"));k.appendChild(t);C=document.createElement("option");C.setAttribute("value","dark");mxUtils.write(C,mxResources.get("dark"));k.appendChild(C);"svg"==E&&mxUtils.lightDarkColorSupported?(t=document.createElement("option"),t.setAttribute("value","auto"),mxUtils.write(t,mxResources.get("automatic")),t.setAttribute("selected",-"selected"),k.appendChild(t)):Editor.isDarkMode()?C.setAttribute("selected","selected"):t.setAttribute("selected","selected");mxUtils.write(F,mxResources.get("appearance")+":");F.appendChild(k);mxUtils.br(F);U+=26;var v=this.addCheckbox(F,mxResources.get("shadow"),R.shadowVisible),G=null;if("png"==E||"jpeg"==E||"webp"==E)G=this.addCheckbox(F,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),U+=30;var I=this.addCheckbox(F,mxResources.get("includeCopyOfMyDiagram")+":",z,null,-null,"jpeg"!=E&&"webp"!=E),M=document.createElement("select");M.style.maxWidth="260px";M.style.marginLeft="28px";"png"==E||"svg"==E?(z=function(){I.checked?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")},R=document.createElement("option"),R.setAttribute("value","allPages"),mxUtils.write(R,mxResources.get("allPages")),M.appendChild(R),R=document.createElement("option"),R.setAttribute("value","currentPage"),mxUtils.write(R,mxResources.get("currentPage")),M.appendChild(R),I.style.marginBottom=-"12px",M.style.marginBottom="16px",F.appendChild(M),mxUtils.br(F),U+=20,null!=this.lastEmbedInclude&&(M.value=this.lastEmbedInclude),mxEvent.addListener(I,"change",z),z()):I.style.marginBottom="16px";var N=document.createElement("input");N.style.marginBottom="16px";N.style.marginRight="8px";N.setAttribute("type","checkbox");var S=document.createElement("input");S.style.marginBottom="16px";S.style.marginRight="8px";S.setAttribute("type","checkbox");e&&(N.checked=null!=this.lastEmbedImages?this.lastEmbedImages:-!0,F.appendChild(N),mxUtils.write(F,mxResources.get("embedImages")),mxUtils.br(F),S.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,F.appendChild(S),mxUtils.write(F,mxResources.get("embedFonts")),mxUtils.br(F),U+=50);var V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="8px";t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));V.appendChild(t);z=document.createElement("option");z.setAttribute("value",-"blank");mxUtils.write(z,mxResources.get("openInNewWindow"));V.appendChild(z);z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));V.appendChild(z);z=document.createElement("div");mxUtils.write(z,mxResources.get("LinksLost"));z.style.margin="7px";z.style.display="none";"svg"==E&&(mxUtils.write(F,mxResources.get("links")+":"),F.appendChild(V),F.appendChild(z),mxUtils.br(F),mxUtils.br(F),U+=50);f=new CustomDialog(this,F,mxUtils.bind(this,-function(){this.lastExportBorder=m.value;this.lastExportZoom=O.value;this.lastEmbedImages=N.checked;this.lastEmbedFonts=S.checked;this.lastEmbedInclude=M.value;n(O.value,T.checked,!u.checked,v.checked,I.checked,N.checked&&e,m.value,A.checked,("png"==E||"svg"==E)&&"currentPage"==M.value,V.value,null!=G?G.checked:null,null!=k?k.value:null,B.value,S.checked)}),null,f,p);this.showDialog(f.container,340,U,!0,!0,null,null,null,null,!0);O.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?-O.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,f,p,n){var t=document.createElement("div");t.style.whiteSpace="nowrap";var z=this.editor.graph;if(null!=e){var E=document.createElement("h3");mxUtils.write(E,e);E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(E)}var C=this.addCheckbox(t,mxResources.get("fit"),!0),F=this.addCheckbox(t,mxResources.get("shadow"),z.shadowVisible&&p,!p),R=this.addCheckbox(t,-f),U=this.addCheckbox(t,mxResources.get("lightbox"),!0),P=this.addEditButton(t,U),O=P.getEditInput(),m=1<z.model.getChildCount(z.model.getRoot()),u=this.addCheckbox(t,mxResources.get("layers"),m,!m);u.style.marginLeft=O.style.marginLeft;u.style.marginBottom="12px";u.style.marginTop="8px";mxEvent.addListener(U,"change",function(){U.checked?(m&&u.removeAttribute("disabled"),O.removeAttribute("disabled")):(u.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));O.checked&&U.checked?-P.getEditSelect().removeAttribute("disabled"):P.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,t,mxUtils.bind(this,function(){c(C.checked,F.checked,R.checked,U.checked,P.getLink(),u.checked)}),null,mxResources.get("embed"),n);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,f,p,n,t,z,E){function C(O){var m=" ",u="";p&&(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.lightboxHost+"/?client=1"+(null!=R?"&page="+R:"")+(n?"&edit=_blank":"")+(t?"&layers=1":"")+"');}})(this);\"",u+="cursor:pointer;");c&&(u+="max-width:100%;");var A="";f&&(A=' width="'+Math.round(F.width)+'" height="'+Math.round(F.height)+'"');z('<img src="'+O+'"'+A+(""!=u?' style="'+u+'"':"")+m+"/>")}var F=this.editor.graph.getGraphBounds(),R=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(O){var m=p?this.getFileData(!0):null;O=-this.createImageDataUri(O,m,"png");C(O)}),null,null,null,mxUtils.bind(this,function(O){E({message:mxResources.get("unknownError")})}),null,!0,f?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),F.width*F.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var U="";f&&(U="&w="+Math.round(2*F.width)+"&h="+Math.round(2*F.height));var P=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(p?"1":"0")+U+"&xml="+encodeURIComponent(e));P.send(mxUtils.bind(this,function(){200<=P.getStatus()&&-299>=P.getStatus()?C("data:image/png;base64,"+P.getText()):E({message:mxResources.get("unknownError")})}))}else E({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,f,p,n,t,z){var E=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!f,"auto"),C=E.getElementsByTagName("a");if(null!=C)for(var F=0;F<C.length;F++){var R=C[F].getAttribute("href");null!=R&&"#"==R.charAt(0)&&"_blank"==C[F].getAttribute("target")&&C[F].removeAttribute("target")}p&&-E.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(E);if(f){var U=" ",P="";p&&(U="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(n?"&edit=_blank":"")+(t?"&layers=1":-"")+"');}})(this);\"",P+="cursor:pointer;");c&&(P+="max-width:100%;");this.editor.convertImages(E,mxUtils.bind(this,function(O){z('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(O))+'"'+(""!=P?' style="'+P+'"':"")+U+"/>")}))}else P="",p&&(e=this.getSelectedPageIndex(),E.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+-EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(n?"&edit=_blank":"")+(t?"&layers=1":"")+"');}}})(this);"),P+="cursor:pointer;"),c&&(c=parseInt(E.getAttribute("width")),n=parseInt(E.getAttribute("height")),E.setAttribute("viewBox","-0.5 -0.5 "+c+" "+n),P+="max-width:100%;max-height:"+n+"px;",E.removeAttribute("height")),""!=P&&E.setAttribute("style",P),this.editor.addFontCss(E),this.editor.graph.mathEnabled&&this.editor.addMathCss(E),z(mxUtils.getXml(E))};EditorUi.prototype.timeSince=function(c){c=+"selected"),k.appendChild(t)):Editor.isDarkMode()?C.setAttribute("selected","selected"):t.setAttribute("selected","selected");mxUtils.write(F,mxResources.get("appearance")+":");F.appendChild(k);mxUtils.br(F);U+=26;var v=this.addCheckbox(F,mxResources.get("shadow"),S.shadowVisible),G=null;if("png"==E||"jpeg"==E||"webp"==E)G=this.addCheckbox(F,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),U+=30;var I=this.addCheckbox(F,mxResources.get("includeCopyOfMyDiagram")+":",z,null,+null,"jpeg"!=E&&"webp"!=E),M=document.createElement("select");M.style.maxWidth="260px";M.style.marginLeft="28px";"png"==E||"svg"==E?(z=function(){I.checked?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")},S=document.createElement("option"),S.setAttribute("value","allPages"),mxUtils.write(S,mxResources.get("allPages")),M.appendChild(S),S=document.createElement("option"),S.setAttribute("value","currentPage"),mxUtils.write(S,mxResources.get("currentPage")),M.appendChild(S),I.style.marginBottom=+"12px",M.style.marginBottom="16px",F.appendChild(M),mxUtils.br(F),U+=20,null!=this.lastEmbedInclude&&(M.value=this.lastEmbedInclude),mxEvent.addListener(I,"change",z),z()):I.style.marginBottom="16px";var R=document.createElement("input");R.style.marginBottom="16px";R.style.marginRight="8px";R.setAttribute("type","checkbox");var Q=document.createElement("input");Q.style.marginBottom="16px";Q.style.marginRight="8px";Q.setAttribute("type","checkbox");e&&(R.checked=null!=this.lastEmbedImages?this.lastEmbedImages:+!0,F.appendChild(R),mxUtils.write(F,mxResources.get("embedImages")),mxUtils.br(F),Q.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,F.appendChild(Q),mxUtils.write(F,mxResources.get("embedFonts")),mxUtils.br(F),U+=50);var W=document.createElement("select");W.style.maxWidth="260px";W.style.marginLeft="8px";t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));W.appendChild(t);z=document.createElement("option");z.setAttribute("value",+"blank");mxUtils.write(z,mxResources.get("openInNewWindow"));W.appendChild(z);z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));W.appendChild(z);z=document.createElement("div");mxUtils.write(z,mxResources.get("LinksLost"));z.style.margin="7px";z.style.display="none";"svg"==E&&(mxUtils.write(F,mxResources.get("links")+":"),F.appendChild(W),F.appendChild(z),mxUtils.br(F),mxUtils.br(F),U+=50);f=new CustomDialog(this,F,mxUtils.bind(this,+function(){this.lastExportBorder=m.value;this.lastExportZoom=N.value;this.lastEmbedImages=R.checked;this.lastEmbedFonts=Q.checked;this.lastEmbedInclude=M.value;n(N.value,T.checked,!u.checked,v.checked,I.checked,R.checked&&e,m.value,A.checked,("png"==E||"svg"==E)&&"currentPage"==M.value,W.value,null!=G?G.checked:null,null!=k?k.value:null,B.value,Q.checked)}),null,f,p);this.showDialog(f.container,340,U,!0,!0,null,null,null,null,!0);N.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?+N.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,f,p,n){var t=document.createElement("div");t.style.whiteSpace="nowrap";var z=this.editor.graph;if(null!=e){var E=document.createElement("h3");mxUtils.write(E,e);E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(E)}var C=this.addCheckbox(t,mxResources.get("fit"),!0),F=this.addCheckbox(t,mxResources.get("shadow"),z.shadowVisible&&p,!p),S=this.addCheckbox(t,+f),U=this.addCheckbox(t,mxResources.get("lightbox"),!0),O=this.addEditButton(t,U),N=O.getEditInput(),m=1<z.model.getChildCount(z.model.getRoot()),u=this.addCheckbox(t,mxResources.get("layers"),m,!m);u.style.marginLeft=N.style.marginLeft;u.style.marginBottom="12px";u.style.marginTop="8px";mxEvent.addListener(U,"change",function(){U.checked?(m&&u.removeAttribute("disabled"),N.removeAttribute("disabled")):(u.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));N.checked&&U.checked?+O.getEditSelect().removeAttribute("disabled"):O.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,t,mxUtils.bind(this,function(){c(C.checked,F.checked,S.checked,U.checked,O.getLink(),u.checked)}),null,mxResources.get("embed"),n);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,f,p,n,t,z,E){function C(N){var m=" ",u="";p&&(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.lightboxHost+"/?client=1"+(null!=S?"&page="+S:"")+(n?"&edit=_blank":"")+(t?"&layers=1":"")+"');}})(this);\"",u+="cursor:pointer;");c&&(u+="max-width:100%;");var A="";f&&(A=' width="'+Math.round(F.width)+'" height="'+Math.round(F.height)+'"');z('<img src="'+N+'"'+A+(""!=u?' style="'+u+'"':"")+m+"/>")}var F=this.editor.graph.getGraphBounds(),S=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(N){var m=p?this.getFileData(!0):null;N=+this.createImageDataUri(N,m,"png");C(N)}),null,null,null,mxUtils.bind(this,function(N){E({message:mxResources.get("unknownError")})}),null,!0,f?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),F.width*F.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var U="";f&&(U="&w="+Math.round(2*F.width)+"&h="+Math.round(2*F.height));var O=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(p?"1":"0")+U+"&xml="+encodeURIComponent(e));O.send(mxUtils.bind(this,function(){200<=O.getStatus()&&+299>=O.getStatus()?C("data:image/png;base64,"+O.getText()):E({message:mxResources.get("unknownError")})}))}else E({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,f,p,n,t,z){var E=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!f,"auto"),C=E.getElementsByTagName("a");if(null!=C)for(var F=0;F<C.length;F++){var S=C[F].getAttribute("href");null!=S&&"#"==S.charAt(0)&&"_blank"==C[F].getAttribute("target")&&C[F].removeAttribute("target")}p&&+E.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(E);if(f){var U=" ",O="";p&&(U="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(n?"&edit=_blank":"")+(t?"&layers=1":+"")+"');}})(this);\"",O+="cursor:pointer;");c&&(O+="max-width:100%;");this.editor.convertImages(E,mxUtils.bind(this,function(N){z('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(N))+'"'+(""!=O?' style="'+O+'"':"")+U+"/>")}))}else O="",p&&(e=this.getSelectedPageIndex(),E.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"++EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(n?"&edit=_blank":"")+(t?"&layers=1":"")+"');}}})(this);"),O+="cursor:pointer;"),c&&(c=parseInt(E.getAttribute("width")),n=parseInt(E.getAttribute("height")),E.setAttribute("viewBox","-0.5 -0.5 "+c+" "+n),O+="max-width:100%;max-height:"+n+"px;",E.removeAttribute("height")),""!=O&&E.setAttribute("style",O),this.editor.addFontCss(E),this.editor.graph.mathEnabled&&this.editor.addMathCss(E),z(mxUtils.getXml(E))};EditorUi.prototype.timeSince=function(c){c=Math.floor((new Date-c)/1E3);var e=Math.floor(c/31536E3);if(1<e)return e+" "+mxResources.get("years");e=Math.floor(c/2592E3);if(1<e)return e+" "+mxResources.get("months");e=Math.floor(c/86400);if(1<e)return e+" "+mxResources.get("days");e=Math.floor(c/3600);if(1<e)return e+" "+mxResources.get("hours");e=Math.floor(c/60);return 1<e?e+" "+mxResources.get("minutes"):1==e?e+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,e){if(null!=c){var f=null;if("diagram"==c.nodeName)f=c;else if("mxfile"==c.nodeName){var p=c.getElementsByTagName("diagram");if(0<p.length){f=p[0];var n=e.getGlobalVariable;e.getGlobalVariable=function(t){return"page"==t?f.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==t?1:n.apply(this,arguments)}}}null!=f&&(c=Editor.parseDiagramNode(f))}p=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(t){}finally{this.editor.graph=p}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};EditorUi.prototype.getPngFileProperties=function(c){var e=1,f=0;if(null!=c){if(c.hasAttribute("scale")){var p=parseFloat(c.getAttribute("scale"));!isNaN(p)&&0<p&&(e=p)}c.hasAttribute("border")&&(p=parseInt(c.getAttribute("border")),!isNaN(p)&&0<p&&(f=p))}return{scale:e,border:f}};EditorUi.prototype.getEmbeddedPng=function(c,e,f,p,n){try{var t=this.editor.graph,z=null;if(null!=f&&0<f.length)t=this.createTemporaryGraph(t.getStylesheet()),document.body.appendChild(t.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(f).documentElement,!0),t),z=f;else if(null!=this.pages&&this.currentPage!=this.pages[0]){t=this.createTemporaryGraph(t.getStylesheet());var E=t.getGlobalVariable;t.setBackgroundImage=this.editor.graph.setBackgroundImage;var C=this.pages[0];this.currentPage==C?t.setBackgroundImage(this.editor.graph.backgroundImage):null!=C.viewState&&null!=C.viewState&&t.setBackgroundImage(C.viewState.backgroundImage);t.getGlobalVariable=function(F){return"page"==F?C.getName():"pagenumber"==F?1:E.apply(this,arguments)};document.body.appendChild(t.container);-t.model.setRoot(C.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(F){try{null==z&&(z=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var R=F.toDataURL("image/png");R=Editor.writeGraphModelToPng(R,"tEXt","mxfile",encodeURIComponent(z));c(R.substring(R.lastIndexOf(",")+1));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container)}catch(U){null!=e&&e(U)}}),null,null,null,mxUtils.bind(this,function(F){null!=e&&e(F)}),null,null,p,null,t.shadowVisible,null,t,n,null,-null,null,"diagram",null)}catch(F){null!=e&&e(F)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,f,p,n,t,z,E,C,F,R,U,P){E=null!=E?E:!0;R=null!=R?R:0;z=null!=C?C:e.background;z==mxConstants.NONE&&(z=null);null==z&&"none"==e.getAdaptiveColors()&&(z="#ffffff");C=this.editor.graph.createSvgImageExport(null!=c);t=e.getSvg(z,F,R,null,null,t,null,C,null,e.shadowVisible||U,null,P,"diagram");(e.shadowVisible||U)&&e.addSvgShadow(t,null,null,0==R);null!=c&&t.setAttribute("content",c);null!=f&&t.setAttribute("resource",-f);var O=mxUtils.bind(this,function(m){m=(p?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(m);null!=n&&n(m);return m});e.mathEnabled&&this.editor.addMathCss(t);if(null!=n)this.embedFonts(t,mxUtils.bind(this,function(m){E?this.editor.convertImages(m,mxUtils.bind(this,function(u){O(u)})):O(m)}));else return O(t)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,-this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(f){try{null!=f&&this.editor.addFontCss(c,f),e(c)}catch(p){e(c)}}))}catch(f){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,f,p,n,t,z,E,C,F,R,U,P){C=null!=C?C:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(m){Editor.addRetryToError(m,mxUtils.bind(this,function(){this.exportImage(c,e,f,p,n,t,z,E,C,F,R,U,P)}));this.handleError(m)}))){var O=this.editor.graph.isSelectionEmpty();-f=null!=f?f:O;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(m){this.spinner.stop();try{this.saveCanvas(m,n?this.getFileData(!0,null,null,null,f,E,null,null,null,null,null,c,t):null,C,null==this.pages||0==this.pages.length,R)}catch(u){this.handleError(u)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,f,c||1,e,p,null,null,t,z,F,U,P)}catch(m){this.spinner.stop(),this.handleError(m)}}};-EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var e=0;e<this.pages.length;e++)c[this.pages[e].getId()]=this.pages[e].getId();return c};EditorUi.prototype.importXml=function(c,e,f,p,n,t,z){e=null!=e?e:0;f=null!=f?f:0;var E=[];try{var C=this.editor.graph;if(null!=c&&0<c.length){C.model.beginUpdate();try{var F=mxUtils.parseXml(c);c={};var R=this.editor.extractGraphModel(F.documentElement,-null!=this.pages);if(null!=R&&"mxfile"==R.nodeName&&null!=this.pages){var U=R.getElementsByTagName("diagram");if(1==U.length&&!t){if(R=Editor.parseDiagramNode(U[0]),null!=this.currentPage&&(c[U[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var P=U[0].getAttribute("name");null!=P&&""!=P&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,P))}}else if(0<U.length){t=[];var O=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[U[0].getAttribute("id")]=-this.pages[0].getId(),P=U[0].getAttribute("name"),null!=P&&""!=P&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],P)),R=Editor.parseDiagramNode(U[0]),p=!1,O=1);for(;O<U.length;O++){var m=U[O].getAttribute("id");U[O].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(U[O]));c[m]=U[O].getAttribute("id");var A=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[A+1]));C.model.execute(new ChangePage(this,u,u,A,!0));t.push(u)}this.updatePageLinks(c,-t)}}if(null!=R&&"mxGraphModel"===R.nodeName){E=C.importGraphModel(R,e,f,p);if(null!=E)for(this.addLocalPagesToMapping(c),O=0;O<E.length;O++)this.updatePageLinksForCell(c,E[O]);var B=C.parseBackgroundImage(R.getAttribute("backgroundImage"));if(null!=B&&null!=B.originalSrc){this.updateBackgroundPageLink(c,B);var H=new ChangePageSetup(this,null,B);H.ignoreColor=!0;C.model.execute(H)}}z&&C.pasteCellStyles(C.includeDescendants(E),C.defaultVertexStyle,C.defaultEdgeStyle)}finally{C.model.endUpdate()}}}catch(T){if(n)throw T;+t.model.setRoot(C.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(F){try{null==z&&(z=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var S=F.toDataURL("image/png");S=Editor.writeGraphModelToPng(S,"tEXt","mxfile",encodeURIComponent(z));c(S.substring(S.lastIndexOf(",")+1));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container)}catch(U){null!=e&&e(U)}}),null,null,null,mxUtils.bind(this,function(F){null!=e&&e(F)}),null,null,p,null,t.shadowVisible,null,t,n,null,+null,null,"diagram",null)}catch(F){null!=e&&e(F)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,f,p,n,t,z,E,C,F,S,U,O){E=null!=E?E:!0;S=null!=S?S:0;z=null!=C?C:e.background;z==mxConstants.NONE&&(z=null);null==z&&"none"==e.getAdaptiveColors()&&(z="#ffffff");C=this.editor.graph.createSvgImageExport(null!=c);t=e.getSvg(z,F,S,null,null,t,null,C,null,e.shadowVisible||U,null,O,"diagram");(e.shadowVisible||U)&&e.addSvgShadow(t,null,null,0==S);null!=c&&t.setAttribute("content",c);null!=f&&t.setAttribute("resource",+f);var N=mxUtils.bind(this,function(m){m=(p?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(m);null!=n&&n(m);return m});e.mathEnabled&&this.editor.addMathCss(t);if(null!=n)this.embedFonts(t,mxUtils.bind(this,function(m){E?this.editor.convertImages(m,mxUtils.bind(this,function(u){N(u)})):N(m)}));else return N(t)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(f){try{null!=f&&this.editor.addFontCss(c,f),e(c)}catch(p){e(c)}}))}catch(f){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,f,p,n,t,z,E,C,F,S,U,O){C=null!=C?C:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(m){Editor.addRetryToError(m,mxUtils.bind(this,function(){this.exportImage(c,e,f,p,n,t,z,E,C,F,S,U,O)}));this.handleError(m)}))){var N=this.editor.graph.isSelectionEmpty();+f=null!=f?f:N;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(m){this.spinner.stop();try{this.saveCanvas(m,n?this.getFileData(!0,null,null,null,f,E,null,null,null,null,null,c,t):null,C,null==this.pages||0==this.pages.length,S)}catch(u){this.handleError(u)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,f,c||1,e,p,null,null,t,z,F,U,O)}catch(m){this.spinner.stop(),this.handleError(m)}}};+EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var e=0;e<this.pages.length;e++)c[this.pages[e].getId()]=this.pages[e].getId();return c};EditorUi.prototype.importXml=function(c,e,f,p,n,t,z){e=null!=e?e:0;f=null!=f?f:0;var E=[];try{var C=this.editor.graph;if(null!=c&&0<c.length){C.model.beginUpdate();try{var F=mxUtils.parseXml(c);c={};var S=this.editor.extractGraphModel(F.documentElement,+null!=this.pages);if(null!=S&&"mxfile"==S.nodeName&&null!=this.pages){var U=S.getElementsByTagName("diagram");if(1==U.length&&!t){if(S=Editor.parseDiagramNode(U[0]),null!=this.currentPage&&(c[U[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var O=U[0].getAttribute("name");null!=O&&""!=O&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,O))}}else if(0<U.length){t=[];var N=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[U[0].getAttribute("id")]=+this.pages[0].getId(),O=U[0].getAttribute("name"),null!=O&&""!=O&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],O)),S=Editor.parseDiagramNode(U[0]),p=!1,N=1);for(;N<U.length;N++){var m=U[N].getAttribute("id");U[N].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(U[N]));c[m]=U[N].getAttribute("id");var A=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[A+1]));C.model.execute(new ChangePage(this,u,u,A,!0));t.push(u)}this.updatePageLinks(c,+t)}}if(null!=S&&"mxGraphModel"===S.nodeName){E=C.importGraphModel(S,e,f,p);if(null!=E)for(this.addLocalPagesToMapping(c),N=0;N<E.length;N++)this.updatePageLinksForCell(c,E[N]);var B=C.parseBackgroundImage(S.getAttribute("backgroundImage"));if(null!=B&&null!=B.originalSrc){this.updateBackgroundPageLink(c,B);var H=new ChangePageSetup(this,null,B);H.ignoreColor=!0;C.model.execute(H)}}z&&C.pasteCellStyles(C.includeDescendants(E),C.defaultVertexStyle,C.defaultEdgeStyle)}finally{C.model.endUpdate()}}}catch(T){if(n)throw T;this.handleError(T)}return E};EditorUi.prototype.updatePageLinks=function(c,e){for(var f=0;f<e.length;f++)this.updatePageLinksForCell(c,e[f].root),null!=e[f].viewState&&this.updateBackgroundPageLink(c,e[f].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var f=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=f&&(e.originalSrc="data:page/id,"+f)}}catch(p){}};EditorUi.prototype.updatePageLinksForCell=function(c,e){var f=document.createElement("div"),p=this.editor.graph,n=p.getLinkForCell(e);null!=n&&p.setLinkForCell(e,this.updatePageLink(c,n));if(p.isHtmlLabel(e)){f.innerHTML=Graph.sanitizeHtml(p.getLabel(e));for(var t=f.getElementsByTagName("a"),z=!1,E=0;E<t.length;E++)n=t[E].getAttribute("href"),null!=n&&(t[E].setAttribute("href",this.updatePageLink(c,n)),z=!0);z&&p.labelChanged(e,f.innerHTML)}for(E=0;E<p.model.getChildCount(e);E++)this.updatePageLinksForCell(c,p.model.getChildAt(e,E))};EditorUi.prototype.updatePageLink=function(c,e){if(Graph.isPageLink(e)){var f=c[e.substring(e.indexOf(",")+1)];e=null!=f?"data:page/id,"+f:null}else if("data:action/json,"==e.substring(0,17))try{var p=JSON.parse(e.substring(17));if(null!=p.actions){for(var n=0;n<p.actions.length;n++){var t=p.actions[n];if(null!=t.open&&Graph.isPageLink(t.open)){var z=t.open.substring(t.open.indexOf(",")+1);f=c[z];null!=f?t.open="data:page/id,"+f:null==this.getPageById(z)&&delete t.open}}e="data:action/json,"+JSON.stringify(p)}}catch(E){}return e};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,f,p,n){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=f?f(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){p=null!=p?p:c.name;var E=mxUtils.bind(this,function(F){z.clear()&&t(F)}),C=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var F=this.isRemoteVisioFormat(p);-try{var R=p.lastIndexOf(".");if(0<=R&&R<p.length)p.substring(R+1).toUpperCase();else{var U=p.lastIndexOf("/");0<=U&&U<p.length&&(p=p.substring(U+1))}}catch(O){}if(F)if(null==VSD_CONVERT_URL||this.isOffline())E({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{F=new FormData;F.append("file1",c,p);var P=new XMLHttpRequest;P.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(p)?"?stencil=1":""));P.responseType="blob";this.addRemoteServiceSecurityCheck(P);-null!=n&&P.setRequestHeader("x-convert-custom",n);P.onreadystatechange=mxUtils.bind(this,function(){if(4==P.readyState&&z.clear())if(200<=P.status&&299>=P.status)try{var O=P.response;if("text/xml"==O.type){var m=new FileReader;m.onload=mxUtils.bind(this,function(u){try{e(u.target.result)}catch(A){E({message:mxResources.get("errorLoadingFile")})}});m.readAsText(O)}else this.doImportVisio(O,e,E,p)}catch(u){E(u)}else try{""==P.responseType||"text"==P.responseType?E({message:P.responseText}):(m=new FileReader,-m.onload=function(){try{E({message:JSON.parse(m.result).Message})}catch(u){E(u)}},m.readAsText(P.response))}catch(u){E({})}});P.send(F)}else if(z.clear())try{this.doImportVisio(c,e,E,p)}catch(O){E(O)}}else E({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?C():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",C,null,null,null,E))}),t)};EditorUi.prototype.importGraphML=function(c,e,f){var p=+try{var S=p.lastIndexOf(".");if(0<=S&&S<p.length)p.substring(S+1).toUpperCase();else{var U=p.lastIndexOf("/");0<=U&&U<p.length&&(p=p.substring(U+1))}}catch(N){}if(F)if(null==VSD_CONVERT_URL||this.isOffline())E({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{F=new FormData;F.append("file1",c,p);var O=new XMLHttpRequest;O.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(p)?"?stencil=1":""));O.responseType="blob";this.addRemoteServiceSecurityCheck(O);+null!=n&&O.setRequestHeader("x-convert-custom",n);O.onreadystatechange=mxUtils.bind(this,function(){if(4==O.readyState&&z.clear())if(200<=O.status&&299>=O.status)try{var N=O.response;if("text/xml"==N.type){var m=new FileReader;m.onload=mxUtils.bind(this,function(u){try{e(u.target.result)}catch(A){E({message:mxResources.get("errorLoadingFile")})}});m.readAsText(N)}else this.doImportVisio(N,e,E,p)}catch(u){E(u)}else try{""==O.responseType||"text"==O.responseType?E({message:O.responseText}):(m=new FileReader,+m.onload=function(){try{E({message:JSON.parse(m.result).Message})}catch(u){E(u)}},m.readAsText(O.response))}catch(u){E({})}});O.send(F)}else if(z.clear())try{this.doImportVisio(c,e,E,p)}catch(N){E(N)}}else E({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?C():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",C,null,null,null,E))}),t)};EditorUi.prototype.importGraphML=function(c,e,f){var p=mxUtils.bind(this,function(n){this.loadingExtensions=!1;null!=f?f(n):this.handleError(n)});this.createTimeout(null,mxUtils.bind(this,function(n){var t=mxUtils.bind(this,function(E){n.clear()&&p(E)}),z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(n.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,e,p)}catch(E){t(E)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?z():(this.loadingExtensions=!0,-mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))}),p)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var e=mxUtils.bind(this,function(f){this.loadingExtensions=!1;this.handleError(f)});this.createTimeout(null,mxUtils.bind(this,function(f){var p=mxUtils.bind(this,function(t){f.clear()&&e(t)}),n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(f.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),-(new VsdxExport(this)).exportCurrentDiagrams(c)||p({message:mxResources.get("unknownError")})}catch(t){p(t)}else p({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(n,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",n,null,null,null,p))}),e)}};EditorUi.prototype.convertLucidChart=function(c,e,f){var p=mxUtils.bind(this,function(n){this.loadingExtensions=!1;-null!=f?f(n):this.handleError(n)});this.createTimeout(null,mxUtils.bind(this,function(n){var t=mxUtils.bind(this,function(E){n.clear()&&p(E)}),z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(n.clear())if("undefined"!==typeof window.LucidImporter)try{var E=JSON.parse(c);e(LucidImporter.importState(E));try{if(null!=window.console&&"1"==urlParams.test){var C=[(new Date).toISOString(),"convertLucidChart",E];null!=E.state&&C.push(JSON.parse(E.state));if(null!=E.svgThumbs)for(var F=0;F<E.svgThumbs.length;F++)C.push(Editor.createSvgDataUri(E.svgThumbs[F]));-null!=E.thumb&&C.push(E.thumb);console.log.apply(console,C)}}catch(R){}}catch(R){null!=window.console&&console.error(R),t(R)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",-function(){mxscript("js/orgchart/mxOrgChartLayout.js",z,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))}),p)};EditorUi.prototype.createMermaidXml=function(c,e,f,p,n,t){var z=new Graph(document.createElement("div"));f=z.insertVertex(null,null,null,0,0,p,n,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+f+";");z.setAttributeForCell(f,"mermaidData",JSON.stringify({data:c,-config:e},null,2));null!=t&&z.setAttributeForCell(f,"templatePrompt",t);c=(new mxCodec).encode(z.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,e,f){var p=0,n=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(t){var z=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),E=mxUtils.bind(this,function(C){t.clear()&&f(C)});z.send(mxUtils.bind(this,function(C){if(t.isAlive())if(200<=C.getStatus()&&299>=C.getStatus())this.tryAndHandle(mxUtils.bind(this,-function(){var R=mxUtils.trim(C.getText());this.generateMermaidImage(R,null,mxUtils.bind(this,function(U,P,O){this.tryAndHandle(mxUtils.bind(this,function(){t.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",R),e(R,U,P,O))}),E)}),E,mxUtils.bind(this,function(U){3>p++?t.clear()&&n():E(U)}))}),E);else{var F={message:mxResources.get("error")+" "+C.getStatus()};try{F=JSON.parse(C.getText()),F=F.error}catch(R){}E(F)}}),E)}),f)});n()};EditorUi.prototype.extractMermaidDeclaration=-function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var e=c.split("```");e=1<e.length?e:c.split("<pre>");e=1<e.length?e:c.split("~~~");e=1<e.length?e:c.split("%%");e=1<e.length?e:c.split("(Begins)");c=mxUtils.trim(1>=e.length?c:e[1]);e=c.split("\n");var f=1<e.length?e[1]:null;if(null!=f){var p=f.indexOf("-");0<p&&(f=f.substring(0,p))}if(0<e.length&&"mermaid"==mxUtils.trim(e[0])||null!=f&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,f))e.shift(),c=mxUtils.trim(e.join("\n")),-e=c.split("\n");f=e[0].split(" ")[0].replace(/:$/,"");p=f.indexOf("-");0<p&&(f=f.substring(0,p));try{"mindmap"==f&&2<e.length&&(c=extractMermaidMindmap(e))}catch(n){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,f)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,e,f,p,n){var t=mxUtils.bind(this,function(E){this.loadingMermaid=!1;null!=p?p(E):this.handleError(E)}),z=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig);-e.securityLevel="strict";e.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&e.flowchart&&0<=c.indexOf("$$")&&(e.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(e.theme="dark");var E=mxUtils.bind(this,function(C){try{if(mxClient.IS_IE||mxClient.IS_IE11)C=C.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var F=mxUtils.parseXml(C).getElementsByTagName("svg");if(0<F.length&&"error"!=-F[0].getAttribute("aria-roledescription")){var R=parseFloat(F[0].getAttribute("width")),U=parseFloat(F[0].getAttribute("height"));if(isNaN(R)||isNaN(U))try{var P=F[0].getAttribute("viewBox").split(/\s+/);R=parseFloat(P[2]);U=parseFloat(P[3])}catch(O){R=R||100,U=U||100}f(this.convertDataUri(Editor.createSvgDataUri(C)),R,U)}else null!=n?n():p({message:mxResources.get("invalidInput")})}catch(O){p(O)}});mermaid.mermaidAPI.initialize(e);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),-c).then(function(C){E(C.svg)}).catch(function(C){null!=n?n(C):p(C)})}catch(C){p(C)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(E){this.importXml(E,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",z,null,null,null,t)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))};-EditorUi.prototype.generatePlantUmlImage=function(c,e,f,p){function n(E,C,F){c1=E>>2;c2=(E&3)<<4|C>>4;c3=(C&15)<<2|F>>6;c4=F&63;r="";r+=t(c1&63);r+=t(c2&63);r+=t(c3&63);return r+=t(c4&63)}function t(E){if(10>E)return String.fromCharCode(48+E);E-=10;if(26>E)return String.fromCharCode(65+E);E-=26;if(26>E)return String.fromCharCode(97+E);E-=26;return 0==E?"-":1==E?"_":"?"}var z=new XMLHttpRequest;z.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(E){r="";-for(i=0;i<E.length;i+=3)r=i+2==E.length?r+n(E.charCodeAt(i),E.charCodeAt(i+1),0):i+1==E.length?r+n(E.charCodeAt(i),0,0):r+n(E.charCodeAt(i),E.charCodeAt(i+1),E.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(z.responseType="blob");z.onload=function(E){if(200<=this.status&&300>this.status)if("txt"==e)f(this.response);else{var C=new FileReader;C.readAsDataURL(this.response);C.onloadend=function(F){var R=new Image;R.onload=function(){try{var U=R.width,P=R.height;-if(0==U&&0==P){var O=C.result,m=O.indexOf(","),u=decodeURIComponent(escape(atob(O.substring(m+1)))),A=mxUtils.parseXml(u).getElementsByTagName("svg");0<A.length&&(U=parseFloat(A[0].getAttribute("width")),P=parseFloat(A[0].getAttribute("height")))}f(C.result,U,P)}catch(B){p(B)}};R.src=C.result};C.onerror=function(F){p(F)}}else p(E)};z.onerror=function(E){p(E)};z.send()};EditorUi.prototype.insertAsPreText=function(c,e,f){var p=this.editor.graph,n=null;p.getModel().beginUpdate();try{n=p.insertVertex(null,-null,"<pre>"+c+"</pre>",e,f,1,1,"text;html=1;align=left;verticalAlign=top;"),p.updateCellSize(n,!0)}finally{p.getModel().endUpdate()}return n};EditorUi.prototype.insertTextAt=function(c,e,f,p,n,t,z,E){t=null!=t?t:!0;z=null!=z?z:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(P){4==P.readyState&&200<=-P.status&&299>=P.status&&this.editor.graph.setSelectionCells(this.insertTextAt(P.responseText,e,f,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(n||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var C=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var F=Editor.extractGraphModelFromPdf(c);if(null!=F&&0<F.length)return this.importXml(F,e,f,t,!0,E)}if(Editor.isPngDataUrl(c)&&(F=Editor.extractGraphModelFromPng(c),null!=F&&0<F.length))return this.importXml(F,e,f,t,-!0,E);if("data:image/svg+xml;"==c.substring(0,19))try{F=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(F=c.substring(c.indexOf(",")+1),F=window.atob&&!mxClient.IS_SF?atob(F):Base64.decode(F,!0)):F=decodeURIComponent(c.substring(c.indexOf(",")+1));var R=this.importXml(F,e,f,t,!0,E);if(0<R.length)return R}catch(P){}this.loadImage(c,mxUtils.bind(this,function(P){if("data:"==c.substring(0,5))this.resizeImage(P,c,mxUtils.bind(this,function(u,A,B){C.setSelectionCell(C.insertVertex(null,null,"",C.snap(e),-C.snap(f),A,B,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(u)+";"))}),z,this.maxImageSize);else{var O=Math.min(1,Math.min(this.maxImageSize/P.width,this.maxImageSize/P.height)),m=Math.round(P.width*O);P=Math.round(P.height*O);C.setSelectionCell(C.insertVertex(null,null,"",C.snap(e),C.snap(f),m,P,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+-c+";"))}}),mxUtils.bind(this,function(){var P=null;C.getModel().beginUpdate();try{P=C.insertVertex(C.getDefaultParent(),null,c,C.snap(e),C.snap(f),1,1,"text;"+(p?"html=1;":"")),C.updateCellSize(P),C.fireEvent(new mxEventObject("textInserted","cells",[P]))}finally{C.getModel().endUpdate()}C.setSelectionCell(P)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,f,t,null,E);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,-function(P){this.editor.graph.setSelectionCells(this.importXml(P,e,f,t,null,E))}),mxUtils.bind(this,function(P){this.handleError(P)}));else{C=this.editor.graph;n=null;C.getModel().beginUpdate();try{n=C.insertVertex(C.getDefaultParent(),null,"",C.snap(e),C.snap(f),1,1,"text;whiteSpace=wrap;"+(p?"html=1;":""));C.fireEvent(new mxEventObject("textInserted","cells",[n]));p&&(c=C.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");n.value=c;C.updateCellSize(n);if(0<this.maxTextWidth&&+mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))}),p)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var e=mxUtils.bind(this,function(f){this.loadingExtensions=!1;this.handleError(f)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(f){var p=mxUtils.bind(this,function(t){f.clear()&&e(t)}),n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(f.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),+(new VsdxExport(this)).exportCurrentDiagrams(c)||p({message:mxResources.get("unknownError")})}catch(t){p(t)}else p({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(n,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",n,null,null,null,p))}),e):e({message:mxResources.get("serviceUnavailableOrBlocked")})}};EditorUi.prototype.convertLucidChart=function(c,e,f){var p=+mxUtils.bind(this,function(n){this.loadingExtensions=!1;null!=f?f(n):this.handleError(n)});this.createTimeout(null,mxUtils.bind(this,function(n){var t=mxUtils.bind(this,function(E){n.clear()&&p(E)}),z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(n.clear())if("undefined"!==typeof window.LucidImporter)try{var E=JSON.parse(c);e(LucidImporter.importState(E));try{if(null!=window.console&&"1"==urlParams.test){var C=[(new Date).toISOString(),"convertLucidChart",E];null!=E.state&&C.push(JSON.parse(E.state));+if(null!=E.svgThumbs)for(var F=0;F<E.svgThumbs.length;F++)C.push(Editor.createSvgDataUri(E.svgThumbs[F]));null!=E.thumb&&C.push(E.thumb);console.log.apply(console,C)}}catch(S){}}catch(S){null!=window.console&&console.error(S),t(S)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",+function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",z,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))}),p)};EditorUi.prototype.createMermaidXml=function(c,e,f,p,n,t){var z=new Graph(document.createElement("div"));f=z.insertVertex(null,null,null,0,0,p,n,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="++f+";");z.setAttributeForCell(f,"mermaidData",JSON.stringify({data:c,config:e},null,2));null!=t&&z.setAttributeForCell(f,"templatePrompt",t);c=(new mxCodec).encode(z.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,e,f){var p=0,n=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(t){var z=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),E=mxUtils.bind(this,function(C){t.clear()&&f(C)});z.send(mxUtils.bind(this,+function(C){if(t.isAlive())if(200<=C.getStatus()&&299>=C.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var S=mxUtils.trim(C.getText());this.generateMermaidImage(S,null,mxUtils.bind(this,function(U,O,N){this.tryAndHandle(mxUtils.bind(this,function(){t.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",S),e(S,U,O,N))}),E)}),E,mxUtils.bind(this,function(U){3>p++?t.clear()&&n():E(U)}))}),E);else{var F={message:mxResources.get("error")+" "+C.getStatus()};+try{F=JSON.parse(C.getText()),F=F.error}catch(S){}E(F)}}),E)}),f)});n()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var e=c.split("```");e=1<e.length?e:c.split("<pre>");e=1<e.length?e:c.split("~~~");e=1<e.length?e:c.split("%%");e=1<e.length?e:c.split("(Begins)");c=mxUtils.trim(1>=e.length?c:e[1]);e=c.split("\n");var f=1<e.length?e[1]:null;if(null!=f){var p=f.indexOf("-");0<p&&(f=f.substring(0,p))}if(0<e.length&&"mermaid"==+mxUtils.trim(e[0])||null!=f&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,f))e.shift(),c=mxUtils.trim(e.join("\n")),e=c.split("\n");f=e[0].split(" ")[0].replace(/:$/,"");p=f.indexOf("-");0<p&&(f=f.substring(0,p));try{"mindmap"==f&&2<e.length&&(c=extractMermaidMindmap(e))}catch(n){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,f)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,e,f,p,n){var t=mxUtils.bind(this,function(E){this.loadingMermaid=!1;null!=p?p(E):this.handleError(E)}),+z=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig);e.securityLevel="strict";e.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&e.flowchart&&0<=c.indexOf("$$")&&(e.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(e.theme="dark");var E=mxUtils.bind(this,function(C){try{if(mxClient.IS_IE||mxClient.IS_IE11)C=C.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,+' xml:space="preserve"');var F=mxUtils.parseXml(C).getElementsByTagName("svg");if(0<F.length&&"error"!=F[0].getAttribute("aria-roledescription")){var S=parseFloat(F[0].getAttribute("width")),U=parseFloat(F[0].getAttribute("height"));if(isNaN(S)||isNaN(U))try{var O=F[0].getAttribute("viewBox").split(/\s+/);S=parseFloat(O[2]);U=parseFloat(O[3])}catch(N){S=S||100,U=U||100}f(this.convertDataUri(Editor.createSvgDataUri(C)),S,U)}else null!=n?n():p({message:mxResources.get("invalidInput")})}catch(N){p(N)}});+mermaid.mermaidAPI.initialize(e);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(C){E(C.svg)}).catch(function(C){null!=n?n(C):p(C)})}catch(C){p(C)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(E){this.importXml(E,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",+z,null,null,null,t)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))};EditorUi.prototype.generatePlantUmlImage=function(c,e,f,p){function n(E,C,F){c1=E>>2;c2=(E&3)<<4|C>>4;c3=(C&15)<<2|F>>6;c4=F&63;r="";r+=t(c1&63);r+=t(c2&63);r+=t(c3&63);return r+=t(c4&63)}function t(E){if(10>E)return String.fromCharCode(48+E);E-=10;if(26>E)return String.fromCharCode(65+E);E-=26;if(26>E)return String.fromCharCode(97+E);E-=26;return 0==E?"-":1==E?"_":"?"}var z=new XMLHttpRequest;z.open("GET",+("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(E){r="";for(i=0;i<E.length;i+=3)r=i+2==E.length?r+n(E.charCodeAt(i),E.charCodeAt(i+1),0):i+1==E.length?r+n(E.charCodeAt(i),0,0):r+n(E.charCodeAt(i),E.charCodeAt(i+1),E.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(z.responseType="blob");z.onload=function(E){if(200<=this.status&&300>this.status)if("txt"==e)f(this.response);else{var C=new FileReader;C.readAsDataURL(this.response);+C.onloadend=function(F){var S=new Image;S.onload=function(){try{var U=S.width,O=S.height;if(0==U&&0==O){var N=C.result,m=N.indexOf(","),u=decodeURIComponent(escape(atob(N.substring(m+1)))),A=mxUtils.parseXml(u).getElementsByTagName("svg");0<A.length&&(U=parseFloat(A[0].getAttribute("width")),O=parseFloat(A[0].getAttribute("height")))}f(C.result,U,O)}catch(B){p(B)}};S.src=C.result};C.onerror=function(F){p(F)}}else p(E)};z.onerror=function(E){p(E)};z.send()};EditorUi.prototype.insertAsPreText=function(c,+e,f){var p=this.editor.graph,n=null;p.getModel().beginUpdate();try{n=p.insertVertex(null,null,"<pre>"+c+"</pre>",e,f,1,1,"text;html=1;align=left;verticalAlign=top;"),p.updateCellSize(n,!0)}finally{p.getModel().endUpdate()}return n};EditorUi.prototype.insertTextAt=function(c,e,f,p,n,t,z,E){t=null!=t?t:!0;z=null!=z?z:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g,+" "),mxUtils.bind(this,function(O){4==O.readyState&&200<=O.status&&299>=O.status&&this.editor.graph.setSelectionCells(this.insertTextAt(O.responseText,e,f,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(n||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var C=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var F=Editor.extractGraphModelFromPdf(c);if(null!=F&&0<F.length)return this.importXml(F,e,f,t,!0,E)}if(Editor.isPngDataUrl(c)&&(F=Editor.extractGraphModelFromPng(c),+null!=F&&0<F.length))return this.importXml(F,e,f,t,!0,E);if("data:image/svg+xml;"==c.substring(0,19))try{F=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(F=c.substring(c.indexOf(",")+1),F=window.atob&&!mxClient.IS_SF?atob(F):Base64.decode(F,!0)):F=decodeURIComponent(c.substring(c.indexOf(",")+1));var S=this.importXml(F,e,f,t,!0,E);if(0<S.length)return S}catch(O){}this.loadImage(c,mxUtils.bind(this,function(O){if("data:"==c.substring(0,5))this.resizeImage(O,c,mxUtils.bind(this,function(u,A,+B){C.setSelectionCell(C.insertVertex(null,null,"",C.snap(e),C.snap(f),A,B,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(u)+";"))}),z,this.maxImageSize);else{var N=Math.min(1,Math.min(this.maxImageSize/O.width,this.maxImageSize/O.height)),m=Math.round(O.width*N);O=Math.round(O.height*N);C.setSelectionCell(C.insertVertex(null,null,"",C.snap(e),C.snap(f),m,O,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="++c+";"))}}),mxUtils.bind(this,function(){var O=null;C.getModel().beginUpdate();try{O=C.insertVertex(C.getDefaultParent(),null,c,C.snap(e),C.snap(f),1,1,"text;"+(p?"html=1;":"")),C.updateCellSize(O),C.fireEvent(new mxEventObject("textInserted","cells",[O]))}finally{C.getModel().endUpdate()}C.setSelectionCell(O)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,f,t,null,E);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,+function(O){this.editor.graph.setSelectionCells(this.importXml(O,e,f,t,null,E))}),mxUtils.bind(this,function(O){this.handleError(O)}));else{C=this.editor.graph;n=null;C.getModel().beginUpdate();try{n=C.insertVertex(C.getDefaultParent(),null,"",C.snap(e),C.snap(f),1,1,"text;whiteSpace=wrap;"+(p?"html=1;":""));C.fireEvent(new mxEventObject("textInserted","cells",[n]));p&&(c=C.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");n.value=c;C.updateCellSize(n);if(0<this.maxTextWidth&&n.geometry.width>this.maxTextWidth){var U=C.getPreferredSizeForCell(n,this.maxTextWidth);n.geometry.width=U.width;n.geometry.height=U.height}Graph.isLink(n.value)&&C.setLinkForCell(n,n.value);n.geometry.width+=C.gridSize;n.geometry.height+=C.gridSize}finally{C.getModel().endUpdate()}return[n]}}return[]};EditorUi.prototype.formatFileSize=function(c){var e=-1;do c/=1024,e++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[e]};EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var e=c.indexOf(";");0<e&&(c=c.substring(0,e)+c.substring(c.indexOf(",",e+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,e){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,e){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var f=document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){null!=f.files&&(this.importFiles(f.files,null,null,this.maxImageSize),f.type="",f.type="file",f.value="")}));f.style.display="none";document.body.appendChild(f);this.importFileInputElt=f}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(z,E){StorageFile.listFiles(this,"F",z,E)});window.openBrowserFile=mxUtils.bind(this,function(z,E,C){StorageFile.getFileContent(this,z,E,C)});window.deleteBrowserFile=mxUtils.bind(this,function(z,E,C){StorageFile.deleteFile(this,z,E,C)});if(!e){var p=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(z){this.hideDialog(z)}));window.openFile.setConsumer(mxUtils.bind(this,function(z,E){null!=E&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(E)?(z=new Blob([z],{type:"application/octet-stream"}),this.importVisio(z,mxUtils.bind(this,function(C){this.importXml(C,0,0,!0)}),null,E)):this.editor.graph.setSelectionCells(this.importXml(z,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!e){var n=this.dialog,t=n.close;this.dialog.close=mxUtils.bind(this,function(z){Editor.useLocalStorage=p;t.apply(n,arguments);z&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=-function(c,e,f){var p=this,n=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(t){if(mxUtils.isEmptyObject(t.files))f();else{var z=0,E,C=!1;t.forEach(function(F,R){F=R.name.toLowerCase();"diagram/diagram.xml"==F?(C=!0,R.async("string").then(function(U){0==U.indexOf("<mxfile ")?e(U):f()})):0==F.indexOf("versions/")&&(F=parseInt(F.substr(9)),F>z&&(z=F,E=R))});0<z?E.async("string").then(function(F){(new XMLHttpRequest).upload&&p.isRemoteFileFormat(F,-c.name)?p.isOffline()?p.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,f):p.parseFileData(F,mxUtils.bind(this,function(R){4==R.readyState&&(200<=R.status&&299>=R.status?e(R.responseText):f())}),c.name):f()}):C||f()}},function(t){f(t)}):f()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",n,null,null,null,f))};EditorUi.prototype.importFile=function(c,e,f,p,n,t,z,-E,C,F,R,U){F=null!=F?F:!0;var P=!1,O=null,m=mxUtils.bind(this,function(u){var A=null;null!=u&&"<mxlibrary"==u.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,u,z)),this.showSidebar()):A=this.importXml(u,f,p,F,null,null!=U?mxEvent.isControlDown(U):null);null!=E&&E(A)});"image"==e.substring(0,5)?(C=!1,"image/png"==e.substring(0,9)&&(R=R?null:this.extractGraphModelFromPng(c),null!=R&&0<R.length&&(O=this.importXml(R,f,p,F,null,null!=U?mxEvent.isControlDown(U):null),C=!0)),C||(C=this.editor.graph,-R=c.indexOf(";"),0<R&&(c=c.substring(0,R)+c.substring(c.indexOf(",",R+1))),F&&C.isGridEnabled()&&(f=C.snap(f),p=C.snap(p)),R="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==e.substring(0,9)&&(R+="editableCssRules=.*;"),O=[C.insertVertex(null,null,"",f,p,n,t,R+"image="+c+";")])):/(\.*<graphml )/.test(c)?(P=!0,this.importGraphML(c,m)):null!=C&&null!=z&&EditorUi.isVisioFilename(z)?(P=!0,this.importVisio(C,m)):(new XMLHttpRequest).upload&&-this.isRemoteFileFormat(c,z)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(P=!0,e=mxUtils.bind(this,function(u){4==u.readyState&&(200<=u.status&&299>=u.status?m(u.responseText):null!=E&&(E(null),this.showError(mxResources.get("error"),413==u.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,e,z):this.parseFile(C,e,z)):0==c.indexOf("PK")&&null!=C?(P=!0,this.importZipFile(C,m,mxUtils.bind(this,function(){O=-this.insertTextAt(this.validateFileData(c),f,p,!0,null,F);E(O)}))):/(\.v(sd|dx))($|\?)/i.test(z)||/(\.vs(s|x))($|\?)/i.test(z)||(O=this.insertTextAt(this.validateFileData(c),f,p,!0,null,F,null,null!=U?mxEvent.isControlDown(U):null));P||null==E||E(O);return O};EditorUi.prototype.importFiles=function(c,e,f,p,n,t,z,E,C,F,R,U,P){p=null!=p?p:this.maxImageSize;F=null!=F?F:this.maxImageBytes;var O=null!=e&&null!=f,m=!0;e=null!=e?e:0;f=null!=f?f:0;var u=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var A=R||-this.resampleThreshold,B=0;B<c.length;B++)if("image/svg"!==c[B].type.substring(0,9)&&"image/"===c[B].type.substring(0,6)&&c[B].size>A){u=!0;break}var H=mxUtils.bind(this,function(){var T=this.editor.graph,k=T.gridSize;n=null!=n?n:mxUtils.bind(this,function(S,V,W,X,Z,Y,ba,ea,ca){try{if(null!=S&&"<mxlibrary"==S.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,S,ba)),this.showSidebar(),null;this.isCompatibleString(S)&&1==c.length&&null!=P&&"drop"==P.type&&this.isBlankFile()&&-!this.canUndo()&&(O=!1,X=W=0);return this.importFile(S,V,W,X,Z,Y,ba,ea,ca,O,U,P)}catch(fa){return this.handleError(fa),null}});t=null!=t?t:mxUtils.bind(this,function(S){T.setSelectionCells(S)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var v=c.length,G=v,I=[],M=mxUtils.bind(this,function(S,V){I[S]=V;if(0==--G){this.spinner.stop();if(null!=E)E(I);else{var W=[];T.getModel().beginUpdate();try{for(S=0;S<I.length;S++){var X=I[S]();null!=X&&(W=W.concat(X))}}finally{T.getModel().endUpdate()}}t(W)}}),-N=0;N<v;N++)mxUtils.bind(this,function(S){var V=c[S];if(null!=V){var W=new FileReader;W.onload=mxUtils.bind(this,function(X){if(null==z||z(V))try{if("image/"==V.type.substring(0,6))if("image/svg"==V.type.substring(0,9)){var Z=Graph.clipSvgDataUri(X.target.result),Y=Z.indexOf(","),ba=decodeURIComponent(escape(atob(Z.substring(Y+1)))),ea=mxUtils.parseXml(ba),ca=ea.getElementsByTagName("svg");if(0<ca.length){var fa=ca[0],aa=U?null:fa.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&-(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0,14)?M(S,mxUtils.bind(this,function(){try{if(null!=ea){var pa=ea.getElementsByTagName("svg");if(0<pa.length){var na=pa[0],ia=na.getAttribute("width"),wa=na.getAttribute("height");ia=null!=ia&&"%"!=ia.charAt(ia.length-1)?parseFloat(ia):NaN;wa=null!=wa&&"%"!=wa.charAt(wa.length-1)?parseFloat(wa):NaN;var ua=na.getAttribute("viewBox");-if(null==ua||0==ua.length)na.setAttribute("viewBox","0 0 "+ia+" "+wa);else if(isNaN(ia)||isNaN(wa)){var va=ua.split(" ");3<va.length&&(ia=parseFloat(va[2]),wa=parseFloat(va[3]))}Z=Editor.createSvgDataUri(mxUtils.getXml(na));var Ca=Math.min(1,Math.min(p/Math.max(1,ia)),p/Math.max(1,wa)),ja=n(Z,V.type,e+S*k,f+S*k,Math.max(1,Math.round(ia*Ca)),Math.max(1,Math.round(wa*Ca)),V.name);if(null!=ja&&(isNaN(ia)||isNaN(wa))){var oa=new Image;oa.onload=mxUtils.bind(this,function(){ia=Math.max(1,oa.width);wa=-Math.max(1,oa.height);ja[0].geometry.width=ia;ja[0].geometry.height=wa;na.setAttribute("viewBox","0 0 "+ia+" "+wa);Z=Editor.createSvgDataUri(mxUtils.getXml(na));var ma=Z.indexOf(";");0<ma&&(Z=Z.substring(0,ma)+Z.substring(Z.indexOf(",",ma+1)));T.setCellStyles("image",Z,[ja[0]])});oa.src=Editor.createSvgDataUri(mxUtils.getXml(na))}return ja}}}catch(ma){}return null})):M(S,mxUtils.bind(this,function(){return n(aa,"text/xml",e+S*k,f+S*k,0,0,V.name)}))}else M(S,mxUtils.bind(this,function(){return null}))}else{Y=-!1;if("image/png"==V.type){var da=U?null:this.extractGraphModelFromPng(X.target.result);if(null!=da&&0<da.length){var ha=new Image;ha.src=X.target.result;M(S,mxUtils.bind(this,function(){return n(da,"text/xml",e+S*k,f+S*k,ha.width,ha.height,V.name)}));Y=!0}}Y||(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(X.target.result,mxUtils.bind(this,function(pa){this.resizeImage(pa,X.target.result,mxUtils.bind(this,function(na,ia,wa){M(S,mxUtils.bind(this,function(){if(null!=na&&na.length<F){var ua=m&&this.isResampleImageSize(V.size,R)?Math.min(1,Math.min(p/ia,p/wa)):1;return n(na,V.type,e+S*k,f+S*k,Math.round(ia*ua),Math.round(wa*ua),V.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),m,p,R,V.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=-X.target.result,n(Z,V.type,e+S*k,f+S*k,240,160,V.name,function(pa){M(S,function(){return pa})},V)}catch(pa){M(S,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(pa,V)}else M(S,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(V.name)?n(null,V.type,e+S*k,f+S*k,240,160,V.name,function(X){M(S,function(){return X})},V):"image"==V.type.substring(0,5)||"application/pdf"==V.type?W.readAsDataURL(V):W.readAsText(V)}})(N)});if(u){u=[];for(B=0;B<c.length;B++)u.push(c[B]);+function(c,e,f){var p=this,n=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(t){if(mxUtils.isEmptyObject(t.files))f();else{var z=0,E,C=!1;t.forEach(function(F,S){F=S.name.toLowerCase();"diagram/diagram.xml"==F?(C=!0,S.async("string").then(function(U){0==U.indexOf("<mxfile ")?e(U):f()})):0==F.indexOf("versions/")&&(F=parseInt(F.substr(9)),F>z&&(z=F,E=S))});0<z?E.async("string").then(function(F){(new XMLHttpRequest).upload&&p.isRemoteFileFormat(F,+c.name)?p.isOffline()?p.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,f):p.parseFileData(F,mxUtils.bind(this,function(S){4==S.readyState&&(200<=S.status&&299>=S.status?e(S.responseText):f())}),c.name):f()}):C||f()}},function(t){f(t)}):f()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",n,null,null,null,f))};EditorUi.prototype.importFile=function(c,e,f,p,n,t,z,+E,C,F,S,U){F=null!=F?F:!0;var O=!1,N=null,m=mxUtils.bind(this,function(u){var A=null;null!=u&&"<mxlibrary"==u.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,u,z)),this.showSidebar()):A=this.importXml(u,f,p,F,null,null!=U?mxEvent.isControlDown(U):null);null!=E&&E(A)});"image"==e.substring(0,5)?(C=!1,"image/png"==e.substring(0,9)&&(S=S?null:this.extractGraphModelFromPng(c),null!=S&&0<S.length&&(N=this.importXml(S,f,p,F,null,null!=U?mxEvent.isControlDown(U):null),C=!0)),C||(C=this.editor.graph,+S=c.indexOf(";"),0<S&&(c=c.substring(0,S)+c.substring(c.indexOf(",",S+1))),F&&C.isGridEnabled()&&(f=C.snap(f),p=C.snap(p)),S="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==e.substring(0,9)&&(S+="editableCssRules=.*;"),N=[C.insertVertex(null,null,"",f,p,n,t,S+"image="+c+";")])):/(\.*<graphml )/.test(c)?(O=!0,this.importGraphML(c,m)):null!=C&&null!=z&&EditorUi.isVisioFilename(z)?(O=!0,this.importVisio(C,m)):(new XMLHttpRequest).upload&&+this.isRemoteFileFormat(c,z)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(O=!0,e=mxUtils.bind(this,function(u){4==u.readyState&&(200<=u.status&&299>=u.status?m(u.responseText):null!=E&&(E(null),this.showError(mxResources.get("error"),413==u.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,e,z):this.parseFile(C,e,z)):0==c.indexOf("PK")&&null!=C?(O=!0,this.importZipFile(C,m,mxUtils.bind(this,function(){N=+this.insertTextAt(this.validateFileData(c),f,p,!0,null,F);E(N)}))):/(\.v(sd|dx))($|\?)/i.test(z)||/(\.vs(s|x))($|\?)/i.test(z)||(N=this.insertTextAt(this.validateFileData(c),f,p,!0,null,F,null,null!=U?mxEvent.isControlDown(U):null));O||null==E||E(N);return N};EditorUi.prototype.importFiles=function(c,e,f,p,n,t,z,E,C,F,S,U,O){p=null!=p?p:this.maxImageSize;F=null!=F?F:this.maxImageBytes;var N=null!=e&&null!=f,m=!0;e=null!=e?e:0;f=null!=f?f:0;var u=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var A=S||+this.resampleThreshold,B=0;B<c.length;B++)if("image/svg"!==c[B].type.substring(0,9)&&"image/"===c[B].type.substring(0,6)&&c[B].size>A){u=!0;break}var H=mxUtils.bind(this,function(){var T=this.editor.graph,k=T.gridSize;n=null!=n?n:mxUtils.bind(this,function(Q,W,V,X,Z,Y,ba,ea,ca){try{if(null!=Q&&"<mxlibrary"==Q.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,Q,ba)),this.showSidebar(),null;this.isCompatibleString(Q)&&1==c.length&&null!=O&&"drop"==O.type&&this.isBlankFile()&&+!this.canUndo()&&(N=!1,X=V=0);return this.importFile(Q,W,V,X,Z,Y,ba,ea,ca,N,U,O)}catch(fa){return this.handleError(fa),null}});t=null!=t?t:mxUtils.bind(this,function(Q){T.setSelectionCells(Q)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var v=c.length,G=v,I=[],M=mxUtils.bind(this,function(Q,W){I[Q]=W;if(0==--G){this.spinner.stop();if(null!=E)E(I);else{var V=[];T.getModel().beginUpdate();try{for(Q=0;Q<I.length;Q++){var X=I[Q]();null!=X&&(V=V.concat(X))}}finally{T.getModel().endUpdate()}}t(V)}}),+R=0;R<v;R++)mxUtils.bind(this,function(Q){var W=c[Q];if(null!=W){var V=new FileReader;V.onload=mxUtils.bind(this,function(X){if(null==z||z(W))try{if("image/"==W.type.substring(0,6))if("image/svg"==W.type.substring(0,9)){var Z=Graph.clipSvgDataUri(X.target.result),Y=Z.indexOf(","),ba=decodeURIComponent(escape(atob(Z.substring(Y+1)))),ea=mxUtils.parseXml(ba),ca=ea.getElementsByTagName("svg");if(0<ca.length){var fa=ca[0],aa=U?null:fa.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&+(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0,14)?M(Q,mxUtils.bind(this,function(){try{if(null!=ea){var na=ea.getElementsByTagName("svg");if(0<na.length){var oa=na[0],ia=oa.getAttribute("width"),va=oa.getAttribute("height");ia=null!=ia&&"%"!=ia.charAt(ia.length-1)?parseFloat(ia):NaN;va=null!=va&&"%"!=va.charAt(va.length-1)?parseFloat(va):NaN;var ua=oa.getAttribute("viewBox");+if(null==ua||0==ua.length)oa.setAttribute("viewBox","0 0 "+ia+" "+va);else if(isNaN(ia)||isNaN(va)){var wa=ua.split(" ");3<wa.length&&(ia=parseFloat(wa[2]),va=parseFloat(wa[3]))}Z=Editor.createSvgDataUri(mxUtils.getXml(oa));var Ba=Math.min(1,Math.min(p/Math.max(1,ia)),p/Math.max(1,va)),ja=n(Z,W.type,e+Q*k,f+Q*k,Math.max(1,Math.round(ia*Ba)),Math.max(1,Math.round(va*Ba)),W.name);if(null!=ja&&(isNaN(ia)||isNaN(va))){var qa=new Image;qa.onload=mxUtils.bind(this,function(){ia=Math.max(1,qa.width);va=+Math.max(1,qa.height);ja[0].geometry.width=ia;ja[0].geometry.height=va;oa.setAttribute("viewBox","0 0 "+ia+" "+va);Z=Editor.createSvgDataUri(mxUtils.getXml(oa));var la=Z.indexOf(";");0<la&&(Z=Z.substring(0,la)+Z.substring(Z.indexOf(",",la+1)));T.setCellStyles("image",Z,[ja[0]])});qa.src=Editor.createSvgDataUri(mxUtils.getXml(oa))}return ja}}}catch(la){}return null})):M(Q,mxUtils.bind(this,function(){return n(aa,"text/xml",e+Q*k,f+Q*k,0,0,W.name)}))}else M(Q,mxUtils.bind(this,function(){return null}))}else{Y=+!1;if("image/png"==W.type){var da=U?null:this.extractGraphModelFromPng(X.target.result);if(null!=da&&0<da.length){var ha=new Image;ha.src=X.target.result;M(Q,mxUtils.bind(this,function(){return n(da,"text/xml",e+Q*k,f+Q*k,ha.width,ha.height,W.name)}));Y=!0}}Y||(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(X.target.result,mxUtils.bind(this,function(na){this.resizeImage(na,X.target.result,mxUtils.bind(this,function(oa,ia,va){M(Q,mxUtils.bind(this,function(){if(null!=oa&&oa.length<F){var ua=m&&this.isResampleImageSize(W.size,S)?Math.min(1,Math.min(p/ia,p/va)):1;return n(oa,W.type,e+Q*k,f+Q*k,Math.round(ia*ua),Math.round(va*ua),W.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),m,p,S,W.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=+X.target.result,n(Z,W.type,e+Q*k,f+Q*k,240,160,W.name,function(na){M(Q,function(){return na})},W)}catch(na){M(Q,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(na,W)}else M(Q,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(W.name)?n(null,W.type,e+Q*k,f+Q*k,240,160,W.name,function(X){M(Q,function(){return X})},W):"image"==W.type.substring(0,5)||"application/pdf"==W.type?V.readAsDataURL(W):V.readAsText(W)}})(R)});if(u){u=[];for(B=0;B<c.length;B++)u.push(c[B]);c=u;this.confirmImageResize(function(T){m=T;H()},C)}else H()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,e){e=null!=e?e:!1;var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},p=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,n=function(t,z){if(t||e)mxSettings.setResizeImages(t?z:null),mxSettings.save();f();c(z)};null==p||e?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(t){n(t,!0)},function(t){n(t,!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?226:200,!0,!0):n(!1,p)};EditorUi.prototype.parseFile=function(c,e,f){f=null!=f?f:c.name;var p=new FileReader;p.onload=mxUtils.bind(this,function(){this.parseFileData(p.result,e,f)});p.readAsText(c)};EditorUi.prototype.parseFileData=function(c,e,f){var p=new XMLHttpRequest;p.open("POST",OPEN_URL);p.setRequestHeader("Content-Type","application/x-www-form-urlencoded");p.onreadystatechange=function(){e(p)};p.send("format=xml&filename="+encodeURIComponent(f)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(n){}};-EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,f,p,n,t,z){n=null!=n?n:this.maxImageSize;var E=Math.max(1,c.width),C=Math.max(1,c.height),F=e;if(p&&this.isResampleImageSize(null!=z?z:e.length,t))try{var R=Math.max(E/n,C/n);if(1<R){var U=Math.round(E/R),P=Math.round(C/R),O=document.createElement("canvas");O.width=U;O.height=P;O.getContext("2d").drawImage(c,0,0,U,P);var m=O.toDataURL();if(m.length<e.length){var u=-document.createElement("canvas");u.width=U;u.height=P;var A=u.toDataURL();m!==A&&(e=m,E=U,C=P)}}}catch(B){}p&&F!=e&&n>this.maxImageSize/2&&e.length>this.maxImageBytes?this.resizeImage(c,e,f,p,n/1.5,t,z):f(e,E,C)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,f){try{var p=new Image;p.onload=function(){p.width=0<p.width?p.width:120;p.height=0<p.height?p.height:120;e(p)};null!=f&&(p.onerror=f);p.src=c}catch(n){if(null!=+EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,f,p,n,t,z){n=null!=n?n:this.maxImageSize;var E=Math.max(1,c.width),C=Math.max(1,c.height),F=e;if(p&&this.isResampleImageSize(null!=z?z:e.length,t))try{var S=Math.max(E/n,C/n);if(1<S){var U=Math.round(E/S),O=Math.round(C/S),N=document.createElement("canvas");N.width=U;N.height=O;N.getContext("2d").drawImage(c,0,0,U,O);var m=N.toDataURL();if(m.length<e.length){var u=+document.createElement("canvas");u.width=U;u.height=O;var A=u.toDataURL();m!==A&&(e=m,E=U,C=O)}}}catch(B){}p&&F!=e&&n>this.maxImageSize/2&&e.length>this.maxImageBytes?this.resizeImage(c,e,f,p,n/1.5,t,z):f(e,E,C)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,f){try{var p=new Image;p.onload=function(){p.width=0<p.width?p.width:120;p.height=0<p.height?p.height:120;e(p)};null!=f&&(p.onerror=f);p.src=c}catch(n){if(null!=f)f(n);else throw n;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var q=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());q.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var y=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,e=this.editor.graph,f=e.isEnabled;e.isEnabled=function(){return f.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(e.panningHandler.isPanningTrigger=function(k){var v=k.getEvent();return null==k.getState()&&!mxEvent.isMouseEvent(v)&&-!e.freehand.isDrawing()||mxEvent.isPopupTrigger(v)&&(null==k.getState()||mxEvent.isControlDown(v)||mxEvent.isShiftDown(v))});e.cellEditor.editPlantUmlData=function(k,v,G){var I=JSON.parse(G);v=new TextareaDialog(c,mxResources.get("plantUml")+":",I.data,function(M){null!=M&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(M,I.format,function(N,S,V){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==I.format)e.labelChanged(k,"<pre>"+N+"</pre>"),e.updateCellSize(k,-!0);else{e.setCellStyles("image",c.convertDataUri(N),[k]);var W=e.model.getGeometry(k);null!=W&&(W=W.clone(),W.width=S,W.height=V,e.cellsResized([k],[W],!1))}e.setAttributeForCell(k,"plantUmlData",JSON.stringify({data:M,format:I.format}))}finally{e.getModel().endUpdate()}},function(N){c.handleError(N)})},null,null,400,220);c.showDialog(v.container,420,300,!0,!0);v.init()};e.cellEditor.editMermaidData=function(k,v,G){var I=JSON.parse(G);v=new TextareaDialog(c,mxResources.get("mermaid")+":",I.data,-function(M){null!=M&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(M,I.config,function(N,S,V){c.spinner.stop();e.getModel().beginUpdate();try{e.setCellStyles("image",N,[k]);var W=e.model.getGeometry(k);null!=W&&(W=W.clone(),W.width=Math.max(W.width,S),W.height=Math.max(W.height,V),e.cellsResized([k],[W],!1));e.setAttributeForCell(k,"mermaidData",JSON.stringify({data:M,config:I.config},null,2))}finally{e.getModel().endUpdate()}},function(N){c.handleError(N)})},+!e.freehand.isDrawing()||mxEvent.isPopupTrigger(v)&&(null==k.getState()||mxEvent.isControlDown(v)||mxEvent.isShiftDown(v))});e.cellEditor.editPlantUmlData=function(k,v,G){var I=JSON.parse(G);v=new TextareaDialog(c,mxResources.get("plantUml")+":",I.data,function(M){null!=M&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(M,I.format,function(R,Q,W){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==I.format)e.labelChanged(k,"<pre>"+R+"</pre>"),e.updateCellSize(k,+!0);else{e.setCellStyles("image",c.convertDataUri(R),[k]);var V=e.model.getGeometry(k);null!=V&&(V=V.clone(),V.width=Q,V.height=W,e.cellsResized([k],[V],!1))}e.setAttributeForCell(k,"plantUmlData",JSON.stringify({data:M,format:I.format}))}finally{e.getModel().endUpdate()}},function(R){c.handleError(R)})},null,null,400,220);c.showDialog(v.container,420,300,!0,!0);v.init()};e.cellEditor.editMermaidData=function(k,v,G){var I=JSON.parse(G);v=new TextareaDialog(c,mxResources.get("mermaid")+":",I.data,+function(M){null!=M&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(M,I.config,function(R,Q,W){c.spinner.stop();e.getModel().beginUpdate();try{e.setCellStyles("image",R,[k]);var V=e.model.getGeometry(k);null!=V&&(V=V.clone(),V.width=Math.max(V.width,Q),V.height=Math.max(V.height,W),e.cellsResized([k],[V],!1));e.setAttributeForCell(k,"mermaidData",JSON.stringify({data:M,config:I.config},null,2))}finally{e.getModel().endUpdate()}},function(R){c.handleError(R)})},null,null,400,220);c.showDialog(v.container,420,300,!0,!0);v.init()};var p=e.cellEditor.startEditing;e.cellEditor.startEditing=function(k,v){try{var G=this.graph.getAttributeForCell(k,"plantUmlData");if(null!=G)this.editPlantUmlData(k,v,G);else if(G=this.graph.getAttributeForCell(k,"mermaidData"),null!=G&&window.isMermaidEnabled)this.editMermaidData(k,v,G);else{var I=e.getCellStyle(k);"1"==mxUtils.getValue(I,"metaEdit","0")?c.showDataDialog(k):p.apply(this,arguments)}}catch(M){c.handleError(M)}};e.getLinkTitle=function(k){return c.getLinkTitle(k)};e.customLinkClicked=function(k,v){var G=!1;try{var I=this.getGraphBounds();c.handleCustomLink(k,v);G=!0;c.chromelessResize&&!I.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(v))}catch(M){c.handleError(M)}return G};var n=e.parseBackgroundImage;e.parseBackgroundImage=function(k){var v=n.apply(this,arguments);null!=v&&null!=v.src&&Graph.isPageLink(v.src)&&(v={originalSrc:v.src});return v};var t=e.setBackgroundImage;e.setBackgroundImage=function(k){null!=k&&null!=k.originalSrc&&(k=c.createImageForPageLink(k.originalSrc,c.currentPage,this));t.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(k,v){k=null!=e.backgroundImage?e.backgroundImage.originalSrc:null;if(null!=k){var G=k.indexOf(",");if(0<G)for(k=k.substring(G+1),v=v.getProperty("patches"),G=0;G<v.length;G++)if(null!=v[G][EditorUi.DIFF_UPDATE]&&null!=v[G][EditorUi.DIFF_UPDATE][k]||null!=v[G][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(v[G][EditorUi.DIFF_REMOVE],k)){e.refreshBackgroundImage();break}}}));var z=e.getBackgroundImageObject;e.getBackgroundImageObject=function(k,v){var G=z.apply(this,arguments);null!=G&&null!=G.originalSrc&&(G=v?c.createImageForPageLink(G.originalSrc,null,null,!0):{src:G.originalSrc});return G};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var E=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(k){k=null!=k?k:"";"1"==urlParams.dev&&(k+=(0<k.length?"&":"?")+"dev=1");return E.apply(this,arguments)};var C=e.addClickHandler;e.addClickHandler=function(k,v,G){var I=v;v=-function(M,N,S){if(null==N){var V=mxEvent.getSource(M);"a"==V.nodeName.toLowerCase()&&(N=V.getAttribute("href"))}null!=N&&e.isCustomLink(N)&&(mxEvent.isTouchEvent(M)||!mxEvent.isPopupTrigger(M))&&e.customLinkClicked(N,S)&&mxEvent.consume(M);null!=I&&I(M,N,S)};C.call(this,k,v,G)};y.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var F=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,v,G){e.isSelectionEmpty()&&-"simple"==Editor.currentTheme&&this.addMenuItems(k,["zoomIn","zoomOut","-"],null,G);F.apply(this,arguments);e.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(k,["-","addToScratchpad"],null,G);e.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["-","exitGroup","home"],null,G)};var R=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(k,v,G){if(c.editor.graph.isSelectionEmpty())R.apply(this,arguments),c.menus.addMenuItems(k,["copyAsImage"],+function(M,R,Q){if(null==R){var W=mxEvent.getSource(M);"a"==W.nodeName.toLowerCase()&&(R=W.getAttribute("href"))}null!=R&&e.isCustomLink(R)&&(mxEvent.isTouchEvent(M)||!mxEvent.isPopupTrigger(M))&&e.customLinkClicked(R,Q)&&mxEvent.consume(M);null!=I&&I(M,R,Q)};C.call(this,k,v,G)};y.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var F=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,v,G){e.isSelectionEmpty()&&+"simple"==Editor.currentTheme&&this.addMenuItems(k,["zoomIn","zoomOut","-"],null,G);F.apply(this,arguments);e.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(k,["-","addToScratchpad"],null,G);e.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["-","exitGroup","home"],null,G)};var S=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(k,v,G){if(c.editor.graph.isSelectionEmpty())S.apply(this,arguments),c.menus.addMenuItems(k,["copyAsImage"],null,G);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(k,v,G):this.addPopupMenuArrangeItems(k,v,G),this.addMenuItems(k,"- cut copy copyAsImage duplicate -".split(" "),null,G),this.isShowCellEditItems()||this.addPopupDeleteItem(k,v,G),this.addMenuItems(k,["lockUnlock","-"],null,G),!this.isShowStyleItems()){if(1==e.getSelectionCount()&&!e.isCellLocked(v)&&e.isCellEditable(v)&&(this.addSubmenu("editCell",k,null,mxResources.get("edit")),k.addSeparator(),e.getModel().isEdge(v))){this.addSubmenu("line",k);var I=e.getModel().getGeometry(v);null!=I&&null!=I.points&&0<I.points.length&&this.addMenuItems(k,["clearWaypoints"],null,G)}1==e.getSelectionCount()&&this.addMenuItems(k,["enterGroup"],null,G);I=c.getSelectionState();null!=I.mergeCell?this.addMenuItem(k,"mergeCells"):(1<I.style.colspan||1<I.style.rowspan)&&this.addMenuItem(k,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var U=e.getExportVariables;e.getExportVariables=function(){var k=U.apply(this,arguments),v=c.getCurrentFile();null!=v&&(k.filename=v.getTitle());k.pagecount=null!=c.pages?c.pages.length:1;k.page=null!=c.currentPage?c.currentPage.getName():"";k.pagenumber=null!=c.pages&&null!=c.currentPage?-mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var P=e.getGlobalVariable;e.getGlobalVariable=function(k){var v=c.getCurrentFile();return"filename"==k&&null!=v?v.getTitle():"page"==k&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==k?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==k?null!=c.pages?c.pages.length:1:P.apply(this,arguments)};var O=null,m=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var k=this.getCurrentFile(),-v=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;O!=v&&k==m&&(e.invalidateDescendantsWithPlaceholders(e.model.getRoot()),e.view.validate());O=v;m=k}));var u=e.labelLinkClicked;e.labelLinkClicked=function(k,v,G){var I=v.getAttribute("href");if(null==I||!e.isCustomLink(I)||!mxEvent.isTouchEvent(G)&&mxEvent.isPopupTrigger(G))u.apply(this,arguments);else{if(!e.isEnabled()||null!=k&&e.isCellLocked(k.cell))e.customLinkClicked(I),e.getRubberband().reset();mxEvent.consume(G)}};this.editor.getOrCreateFilename=+mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var O=e.getGlobalVariable;e.getGlobalVariable=function(k){var v=c.getCurrentFile();return"filename"==k&&null!=v?v.getTitle():"page"==k&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==k?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==k?null!=c.pages?c.pages.length:1:O.apply(this,arguments)};var N=null,m=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var k=this.getCurrentFile(),+v=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;N!=v&&k==m&&(e.invalidateDescendantsWithPlaceholders(e.model.getRoot()),e.view.validate());N=v;m=k}));var u=e.labelLinkClicked;e.labelLinkClicked=function(k,v,G){var I=v.getAttribute("href");if(null==I||!e.isCustomLink(I)||!mxEvent.isTouchEvent(G)&&mxEvent.isPopupTrigger(G))u.apply(this,arguments);else{if(!e.isEnabled()||null!=k&&e.isCellLocked(k.cell))e.customLinkClicked(I),e.getRubberband().reset();mxEvent.consume(G)}};this.editor.getOrCreateFilename=function(){var k=c.defaultFilename,v=c.getCurrentFile();null!=v&&(k=null!=v.getTitle()?v.getTitle():k);return k};var A=this.actions.get("print");A.setEnabled(!mxClient.IS_IOS||!navigator.standalone);A.visible=A.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&e.addListener(mxEvent.ESCAPE,function(k,v){null!=v&&e.isEnabled()&&!e.isEditing()&&null!=v.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&e.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(k){var v=e.cellEditor.text2,G=null;null!=v&&(mxEvent.addListener(v,"dragleave",function(I){null!=G&&(G.parentNode.removeChild(G),G=null);I.stopPropagation();I.preventDefault()}),mxEvent.addListener(v,"dragover",mxUtils.bind(this,function(I){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=this.highlightElement(v));I.stopPropagation();I.preventDefault()})),mxEvent.addListener(v,"drop",mxUtils.bind(this,function(I){null!=G&&(G.parentNode.removeChild(G),G=null);if(0<I.dataTransfer.files.length)this.importFiles(I.dataTransfer.files,-0,0,this.maxImageSize,function(N,S,V,W,X,Z){e.insertImage(N,X,Z)},function(){},function(N){return"image/"==N.type.substring(0,6)},function(N){for(var S=0;S<N.length;S++)N[S]()},mxEvent.isControlDown(I));else if(0<=mxUtils.indexOf(I.dataTransfer.types,"text/uri-list")){var M=I.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(M)?this.loadImage(decodeURIComponent(M),mxUtils.bind(this,function(N){var S=Math.max(1,N.width);N=Math.max(1,N.height);var V=this.maxImageSize;V=Math.min(1,-Math.min(V/Math.max(1,S)),V/Math.max(1,N));e.insertImage(decodeURIComponent(M),S*V,N*V)})):document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(I.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(I.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/plain"));I.stopPropagation();I.preventDefault()})))}));if(Editor.isSettingsEnabled()){A=+0,0,this.maxImageSize,function(R,Q,W,V,X,Z){e.insertImage(R,X,Z)},function(){},function(R){return"image/"==R.type.substring(0,6)},function(R){for(var Q=0;Q<R.length;Q++)R[Q]()},mxEvent.isControlDown(I));else if(0<=mxUtils.indexOf(I.dataTransfer.types,"text/uri-list")){var M=I.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(M)?this.loadImage(decodeURIComponent(M),mxUtils.bind(this,function(R){var Q=Math.max(1,R.width);R=Math.max(1,R.height);var W=this.maxImageSize;W=Math.min(1,+Math.min(W/Math.max(1,Q)),W/Math.max(1,R));e.insertImage(decodeURIComponent(M),Q*W,R*W)})):document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(I.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(I.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/plain"));I.stopPropagation();I.preventDefault()})))}));if(Editor.isSettingsEnabled()){A=this.editor.graph.view;var B=mxSettings.getUnit();A.setUnit(B);Editor.pageSizeUnit=B==mxConstants.METERS?mxConstants.MILLIMETERS:B;A.addListener("unitChanged",function(k,v){k=v.getProperty("unit");mxSettings.setUnit(k);mxSettings.save();Editor.pageSizeUnit=k==mxConstants.METERS?mxConstants.MILLIMETERS:k});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,A.unit);this.refresh()}if("1"==urlParams.styledev){A=document.getElementById("geFooter");null!=A&&(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)})),A.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(k,v){0<this.editor.graph.getSelectionCount()?(k=this.editor.graph.getSelectionCell(),k=this.editor.graph.getModel().getStyle(k),this.styleInput.value=k||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var H=this.isSelectionAllowed;this.isSelectionAllowed=function(k){return mxEvent.getSource(k)==this.styleInput?!0:H.apply(this,arguments)}}A=document.getElementById("geInfo");null!=A&&A.parentNode.removeChild(A);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var T=null;mxEvent.addListener(e.container,"dragleave",function(k){e.isEnabled()&&(null!=T&&(T.parentNode.removeChild(T),T=null),k.stopPropagation(),k.preventDefault())});mxEvent.addListener(e.container,"dragover",mxUtils.bind(this,function(k){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=this.highlightElement(e.container));-null!=this.sidebar&&this.sidebar.hideTooltip();k.stopPropagation();k.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(k){null!=T&&(T.parentNode.removeChild(T),T=null);if(e.isEnabled()){var v=mxUtils.convertPoint(e.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),G=k.dataTransfer.files,I=e.view.translate,M=e.view.scale,N=v.x/M-I.x,S=v.y/M-I.y;if(0<G.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(k)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&-this.fileLoaded(null),this.openFiles(G,!0)):(mxEvent.isAltDown(k)&&(S=N=null),this.importFiles(G,N,S,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(k),null,null,mxEvent.isShiftDown(k),k));else{mxEvent.isAltDown(k)&&(S=N=0);var V=0<=mxUtils.indexOf(k.dataTransfer.types,"text/uri-list")?k.dataTransfer.getData("text/uri-list"):null;v=this.extractGraphModelFromEvent(k,null!=this.pages);if(null!=v)e.setSelectionCells(this.importXml(v,N,S,!0));else if(0<=mxUtils.indexOf(k.dataTransfer.types,-"text/html")){var W=k.dataTransfer.getData("text/html");v=document.createElement("div");v.innerHTML=Graph.sanitizeHtml(W);var X=null;G=v.getElementsByTagName("img");null!=G&&1==G.length?(W=G[0].getAttribute("src"),null==W&&(W=G[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)||(X=!0)):(G=v.getElementsByTagName("a"),null!=G&&1==G.length?W=G[0].getAttribute("href"):(v=v.getElementsByTagName("pre"),null!=v&&1==v.length&&(W=mxUtils.getTextContent(v[0]))));var Z=!0,Y=mxUtils.bind(this,-function(){e.setSelectionCells(this.insertTextAt(W,N,S,!0,X,null,Z,mxEvent.isControlDown(k)))});X&&null!=W&&W.length>this.resampleThreshold?this.confirmImageResize(function(ba){Z=ba;Y()},mxEvent.isControlDown(k)):Y()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(ba){var ea=Math.max(1,ba.width);ba=Math.max(1,ba.height);var ca=this.maxImageSize;ca=Math.min(1,Math.min(ca/Math.max(1,ea)),ca/Math.max(1,ba));e.setSelectionCell(e.insertVertex(null,-null,"",N,S,ea*ca,ba*ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+V+";"))}),mxUtils.bind(this,function(ba){e.setSelectionCells(this.insertTextAt(V,N,S,!0))})):0<=mxUtils.indexOf(k.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(k.dataTransfer.getData("text/plain"),N,S,!0))}}k.stopPropagation();k.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",+null!=this.sidebar&&this.sidebar.hideTooltip();k.stopPropagation();k.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(k){null!=T&&(T.parentNode.removeChild(T),T=null);if(e.isEnabled()){var v=mxUtils.convertPoint(e.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),G=k.dataTransfer.files,I=e.view.translate,M=e.view.scale,R=v.x/M-I.x,Q=v.y/M-I.y;if(0<G.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(k)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&+this.fileLoaded(null),this.openFiles(G,!0)):(mxEvent.isAltDown(k)&&(Q=R=null),this.importFiles(G,R,Q,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(k),null,null,mxEvent.isShiftDown(k),k));else{mxEvent.isAltDown(k)&&(Q=R=0);var W=0<=mxUtils.indexOf(k.dataTransfer.types,"text/uri-list")?k.dataTransfer.getData("text/uri-list"):null;v=this.extractGraphModelFromEvent(k,null!=this.pages);if(null!=v)e.setSelectionCells(this.importXml(v,R,Q,!0));else if(0<=mxUtils.indexOf(k.dataTransfer.types,+"text/html")){var V=k.dataTransfer.getData("text/html");v=document.createElement("div");v.innerHTML=Graph.sanitizeHtml(V);var X=null;G=v.getElementsByTagName("img");null!=G&&1==G.length?(V=G[0].getAttribute("src"),null==V&&(V=G[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)||(X=!0)):(G=v.getElementsByTagName("a"),null!=G&&1==G.length?V=G[0].getAttribute("href"):(v=v.getElementsByTagName("pre"),null!=v&&1==v.length&&(V=mxUtils.getTextContent(v[0]))));var Z=!0,Y=mxUtils.bind(this,+function(){e.setSelectionCells(this.insertTextAt(V,R,Q,!0,X,null,Z,mxEvent.isControlDown(k)))});X&&null!=V&&V.length>this.resampleThreshold?this.confirmImageResize(function(ba){Z=ba;Y()},mxEvent.isControlDown(k)):Y()}else null!=W&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)?this.loadImage(decodeURIComponent(W),mxUtils.bind(this,function(ba){var ea=Math.max(1,ba.width);ba=Math.max(1,ba.height);var ca=this.maxImageSize;ca=Math.min(1,Math.min(ca/Math.max(1,ea)),ca/Math.max(1,ba));e.setSelectionCell(e.insertVertex(null,+null,"",R,Q,ea*ca,ba*ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+W+";"))}),mxUtils.bind(this,function(ba){e.setSelectionCells(this.insertTextAt(W,R,Q,!0))})):0<=mxUtils.indexOf(k.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(k.dataTransfer.getData("text/plain"),R,Q,!0))}}k.stopPropagation();k.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&e.view.validateBackground()});e.addListener("enabledChanged",mxUtils.bind(this,function(){e.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var k=parseInt(this.div.offsetLeft),v=-parseInt(this.div.offsetWidth),G=c.embedViewport.x+c.embedViewport.width,I=parseInt(this.div.offsetTop),M=parseInt(this.div.offsetHeight),N=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(k,G-v))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(I,N-M))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};+parseInt(this.div.offsetWidth),G=c.embedViewport.x+c.embedViewport.width,I=parseInt(this.div.offsetTop),M=parseInt(this.div.offsetHeight),R=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(k,G-v))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(I,R-M))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(A=Editor.currentTheme,"simple"==A||"sketch"==A)Editor.currentTheme="",this.doSetCurrentTheme(A,mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}),!0);A=!1;null!=urlParams.dark?A=urlParams.dark:(A="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||A&&"auto"!=mxSettings.settings.darkMode||(A=mxSettings.settings.darkMode));"auto"==A&&this.isAutoDarkModeSupported()&&(A=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof A?"1"==A:A);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(k){this.isAutoDarkMode()&&this.setDarkMode(k.matches)}))}catch(k){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(k,v){e.enableFlowAnimation=Editor.enableAnimations;e.refresh()}));e.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts()};var x=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,e=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=e&&c<e?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<e&&c>=e&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}x.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,e=this.sketchMainMenuElt,f=this.sketchPickerMenuElt,p=this.editor.graph;f.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(F){mxEvent.getSource(F)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(F),mxEvent.getClientY(F)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var n=document.createElement("div");n.style.position="absolute";n.style.width="10px";n.style.height="10px";n.style.borderRadius="5px";n.style.border="1px solid gray";n.style.background="#ffffff";n.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(n);this.bottomResizer=n;var t=null,z=null,E=null,C=null;mxEvent.addGestureListeners(n,mxUtils.bind(this,function(F){C=parseInt(this.diagramContainer.style.height);z=mxEvent.getClientY(F);p.popupMenuHandler.hideMenu();mxEvent.consume(F)}));-n=n.cloneNode(!1);n.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(n);this.rightResizer=n;mxEvent.addGestureListeners(n,mxUtils.bind(this,function(F){E=parseInt(this.diagramContainer.style.width);t=mxEvent.getClientX(F);p.popupMenuHandler.hideMenu();mxEvent.consume(F)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(F){var R=!1;null!=t&&(this.diagramContainer.style.width=Math.max(20,E+mxEvent.getClientX(F)-t)+"px",R=!0);null!=z&&(this.diagramContainer.style.height=-Math.max(20,C+mxEvent.getClientY(F)-z)+"px",R=!0);R&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(F){null==t&&null==z||mxEvent.consume(F);z=t=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=+n=n.cloneNode(!1);n.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(n);this.rightResizer=n;mxEvent.addGestureListeners(n,mxUtils.bind(this,function(F){E=parseInt(this.diagramContainer.style.width);t=mxEvent.getClientX(F);p.popupMenuHandler.hideMenu();mxEvent.consume(F)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(F){var S=!1;null!=t&&(this.diagramContainer.style.width=Math.max(20,E+mxEvent.getClientX(F)-t)+"px",S=!0);null!=z&&(this.diagramContainer.style.height=+Math.max(20,C+mxEvent.getClientY(F)-z)+"px",S=!0);S&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(F){null==t&&null==z||mxEvent.consume(F);z=t=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";e.style.visibility="hidden";c.style.visibility="hidden";f.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(F){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(F){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";e.style.visibility="hidden";c.style.visibility="hidden";f.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var f=e.clipboardData||e.originalEvent.clipboardData,p=!1,n=0;n<f.types.length;n++)if("text/"===f.types[n].substring(0,5)){p=!0;break}if(!p){var t=-f.items;for(index in t){var z=t[index];if("file"===z.kind){if(c.isEditing())this.importFiles([z.getAsFile()],0,0,this.maxImageSize,function(C,F,R,U,P,O){c.insertImage(C,P,O)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var F=0;F<C.length;F++)C[F]()});else{var E=this.editor.graph.getInsertPoint();this.importFiles([z.getAsFile()],E.x,E.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(C){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){f.innerHTML=+f.items;for(index in t){var z=t[index];if("file"===z.kind){if(c.isEditing())this.importFiles([z.getAsFile()],0,0,this.maxImageSize,function(C,F,S,U,O,N){c.insertImage(C,O,N)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var F=0;F<C.length;F++)C[F]()});else{var E=this.editor.graph.getInsertPoint();this.importFiles([z.getAsFile()],E.x,E.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(C){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){f.innerHTML=" ";f.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,f=document.createElement("div");f.setAttribute("autocomplete","off");f.setAttribute("autocorrect","off");f.setAttribute("autocapitalize","off");f.setAttribute("spellcheck","false");f.style.textRendering="optimizeSpeed";f.style.fontFamily="monospace";f.style.wordBreak="break-all";f.style.background="transparent";f.style.color="transparent";f.style.position="absolute";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.display="block";f.style.fontSize="1";f.style.zIndex="-1";f.style.resize="none";f.style.outline="none";f.style.width="1px";f.style.height="1px";mxUtils.setOpacity(f,0);f.contentEditable=!0;f.innerHTML=" ";var p=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(t){var z=mxEvent.getSource(t);null==e.container||!e.isEnabled()||e.isMouseDown||e.isEditing()||null!=this.dialog||"INPUT"==z.nodeName||"TEXTAREA"==z.nodeName||"true"==z.contentEditable||224!=t.keyCode&&(mxClient.IS_MAC||17!=t.keyCode)&&(!mxClient.IS_MAC||91!=t.keyCode&&93!=t.keyCode)||p||(f.style.left=e.container.scrollLeft+10+"px",f.style.top=e.container.scrollTop+10+"px",t=e.container.scrollLeft,z=e.container.scrollTop,e.container.appendChild(f),p=!0,f.focus(),document.execCommand("selectAll",!1,null),e.container.scrollLeft=t,e.container.scrollTop=z)}));mxEvent.addListener(document,@@ -13407,20 +13407,20 @@ this.editor.graph;e.isSelectionEmpty()||(c=mxUtils.sortCells(e.getExportableCellt.getSelectionCount()){n=t.getStartEditingCell(t.getSelectionCell(),p);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==t.getCurrentCellStyle(n)[mxConstants.STYLE_SHAPE])t.setCellStyles(mxConstants.STYLE_IMAGE,c,[n]);else{t.model.beginUpdate();try{t.labelChanged(n,c),Graph.isLink(c)&&t.setLinkForCell(n,c)}finally{t.model.endUpdate()}}t.setSelectionCell(n)}else z=t.getInsertPoint(),t.isMouseInsertPoint()&&(E=0,t.lastPasteXml==c&&0<t.pasteCounter&&t.pasteCounter--),z=this.insertTextAt(c,z.x+E,z.y+E,n),t.setSelectionCells(z);t.isSelectionEmpty()||(t.scrollCellToVisible(t.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(t.view.getState(t.getSelectionCell())));return z};EditorUi.prototype.pasteCells=function(c,e,f,p){if(!mxEvent.isConsumed(c)){var n=e,t=!1;if(f&&null!=c.clipboardData&&c.clipboardData.getData){var z=c.clipboardData.getData("text/plain"),E=!1;if(null!=z&&0<z.length&&"%3CmxGraphModel%3E"==z.substring(0,18))try{var C=decodeURIComponent(z);this.isCompatibleString(C)&&(E=!0,z=C)}catch(m){}E=E?null:c.clipboardData.getData("text/html");null!=E&&0<E.length?(n=this.parseHtmlData(E),t="text/plain"!=n.getAttribute("data-type")):null!=z&&0<z.length&&(n=document.createElement("div"),mxUtils.setTextContent(n,E))}z=n.getElementsByTagName("span");if(null!=z&&0<z.length&&"application/vnd.lucid.chart.objects"===z[0].getAttribute("data-lucid-type"))f=z[0].getAttribute("data-lucid-content"),null!=f&&0<f.length&&(this.convertLucidChart(f,mxUtils.bind(this,function(m){var u=this.editor.graph;-u.lastPasteXml==m?u.pasteCounter++:(u.lastPasteXml=m,u.pasteCounter=0);var A=u.pasteCounter*u.gridSize;u.setSelectionCells(this.importXml(m,A,A));u.scrollCellToVisible(u.getSelectionCell())}),mxUtils.bind(this,function(m){this.handleError(m)})),mxEvent.consume(c));else{var F=!1,R="";R=t?null!=n.textContent&&"<mxfile"==n.textContent.substring(0,7)&&"</mxfile>"==n.textContent.substring(n.textContent.length-9)||"<mxGraphModel"==n.textContent.substring(0,13)&&"</mxGraphModel>"==n.textContent.substring(n.textContent.length--15)?n.textContent.replace(/\u00a0/g," "):n.innerHTML:mxUtils.trim(null==n.innerText?mxUtils.getTextContent(n):n.innerText);try{var U=R.lastIndexOf("%3E");0<=U&&U<R.length-3&&(R=R.substring(0,U+3))}catch(m){}try{z=n.getElementsByTagName("span"),(C=null!=z&&0<z.length?mxUtils.trim(decodeURIComponent(z[0].textContent)):decodeURIComponent(R))&&(this.isCompatibleString(C)||0==C.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(F=!0,R=C)}catch(m){}try{if(null!=R&&0<R.length){if(0==R.substring(0,-20).replace(/\s/g,"").indexOf('{"isProtected":')){var P=mxUtils.bind(this,function(){try{R=(new MiroImporter).importMiroJson(JSON.parse(R)),this.pasteXml(R,p,F,c)}catch(m){console.log("Miro import error:",m)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",P):P()}else this.pasteXml(R,p,F,c,t);try{mxEvent.consume(c)}catch(m){}}else if(!f){var O=this.editor.graph;O.lastPasteXml=null;O.pasteCounter=0}}catch(m){this.handleError(m)}}}e.innerHTML=" "};EditorUi.prototype.showPrintDialog=-function(c,e){var f=320;this.editor.graph.isEnabled()&&(f+=40);null!=this.pages&&1<this.pages.length&&(f+=40,this.editor.graph.isEnabled()||(f+=10));null==e||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(f+=20);this.showDialog((new PrintDialog(this,c,e)).container,320,f,!0,!0)};EditorUi.prototype.print=function(c,e){var f=this.editor,p=f.graph,n=this.getPageIndex(this.currentPage),t=null!=n?n+1:1,z=mxUtils.bind(this,function(A,B,H,T){var k=A.useCssTransforms,v=A.currentTranslate,G=A.currentScale,-I=A.view.translate,M=A.view.scale;A.useCssTransforms&&(A.useCssTransforms=!1,A.currentTranslate=new mxPoint(0,0),A.currentScale=1,A.view.translate=new mxPoint(0,0),A.view.scale=1);var N=A.getGraphBounds(),S=0,V=0,W=mxRectangle.fromRectangle(A.pageFormat),X=e.fit||e.crop||!A.pageVisible,Z=e.scale;W.width=Math.ceil(W.width*A.pageScale);W.height=Math.ceil(W.height*A.pageScale);var Y=1;if(e.fit){Y=e.sheetsAcross;var ba=e.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*Z));-Y=Math.min(W.height*ba/(N.height/A.view.scale),W.width*Y/(N.width/A.view.scale))}else Y=isNaN(Z)?1:Z;Y*=1;!X&&A.pageVisible?(Z=A.getPageLayout(),S-=Z.x*W.width,V-=Z.y*W.height):X=!0;e.crop&&(e.selection&&(N=p.getBoundingBox(p.getSelectionCells())),W.width=(N.width+1)*Y/A.view.scale,W.height=(N.height+1)*Y/A.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);T=null!=T?"page/id,"+T:null;if(null==B){B=PrintDialog.createPrintPreview(A,Y,null,0,S,V,X);B.title=this.getBaseFilename(!0);-B.pageSelector=!1;B.mathEnabled=!1;S=e.border;isNaN(S)||(B.pageMargin=S);e.selection&&(B.isCellVisible=function(aa){return A.isCellSelected(aa)});var ea=B.writeHead;B.writeHead=function(aa){ea.apply(this,arguments);mxClient.IS_GC&&(aa.writeln('<style type="text/css">'),aa.writeln("@media print {"),aa.writeln(".MathJax svg { shape-rendering: crispEdges; }"),aa.writeln("}"),aa.writeln("</style>"));null!=f.fontCss&&(aa.writeln('<style type="text/css">'),aa.writeln(mxUtils.htmlEntities(f.fontCss,!1,!1,-!1)),aa.writeln("</style>"));for(var da=A.getCustomFonts(),ha=0;ha<da.length;ha++){var pa=da[ha].name,na=da[ha].url;Graph.isCssFontUrl(na)?aa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(na))+'" charset="UTF-8" type="text/css">'):(aa.writeln('<style type="text/css">'),aa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(pa)+'";\nsrc: url("'+mxUtils.htmlEntities(na)+'");\n}'),aa.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ca=B.drawBackgroundImage;-B.drawBackgroundImage=function(aa){ca.apply(this,arguments);null!=aa.node&&(EditorUi.embedSvgImages(aa.node),p.disableSvgLinks(aa.node,function(da){da.setAttribute("href","javascript:void(0)")}))}}var fa=B.addGraphFragment;B.addGraphFragment=function(aa,da,ha,pa,na,ia){fa.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:na.classList.add("geDisableMathJax")};e.grid&&(B.gridSize=A.gridSize,B.gridSteps=A.view.gridSteps,B.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:-A.view.gridColor);B.open(null,null,H,!0,T,W,e.selection?A.getSelectionCells():null)}else{N=A.background;if(null==N||""==N||N==mxConstants.NONE)N="#ffffff";B.backgroundColor=N;B.autoOrigin=X;e.grid&&(B.gridSize=A.gridSize,B.gridSteps=A.view.gridSteps,B.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:A.view.gridColor);B.appendGraph(A,Y,S,V,H,!0,T,W,e.selection?A.getSelectionCells():null);H=A.getCustomFonts();if(null!=B.wnd)for(W=0;W<H.length;W++)S=H[W].name,V=H[W].url,Graph.isCssFontUrl(V)?-B.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(V)+'" charset="UTF-8" type="text/css">'):(B.wnd.document.writeln('<style type="text/css">'),B.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(S)+'";\nsrc: url("'+mxUtils.htmlEntities(V)+'");\n}'),B.wnd.document.writeln("</style>"))}k&&(A.useCssTransforms=k,A.currentTranslate=v,A.currentScale=G,A.view.translate=I,A.view.scale=M);return B}),E=e.pagesFrom,C=e.pagesTo,F=!e.allPages;n=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,-e);else{F&&(F=e.selection||E==t&&C==t);if(!F&&null!=this.pages&&this.pages.length){F=0;t=this.pages.length-1;e.allPages||(F=parseInt(E)-1,t=parseInt(C)-1);for(var R=F;R<=t;R++){var U=this.pages[R];E=U==this.currentPage?p:null;if(null==E){E=this.createTemporaryGraph(p.stylesheet);E.shapeForegroundColor=p.shapeForegroundColor;E.shapeBackgroundColor=p.shapeBackgroundColor;C=!0;F=!1;var P=null,O=null;null==U.viewState&&null==U.root&&this.updatePageRoot(U);null!=U.viewState&&(C=U.viewState.pageVisible,-F=U.viewState.mathEnabled,P=U.viewState.background,O=U.viewState.backgroundImage,E.pageFormat=U.viewState.pageFormat,E.gridSize=U.viewState.gridSize);null!=O&&null!=O.originalSrc&&(O=this.createImageForPageLink(O.originalSrc,U));E.background=P;E.backgroundImage=null!=O?new mxImage(O.src,O.width,O.height,O.x,O.y):null;E.pageVisible=C;E.mathEnabled=F;var m=E.getGraphBounds;E.getGraphBounds=function(){var A=m.apply(this,arguments),B=this.backgroundImage;if(null!=B&&null!=B.width&&null!=B.height){var H=-this.view.translate,T=this.view.scale;A=mxRectangle.fromRectangle(A);A.add(new mxRectangle((H.x+B.x)*T,(H.y+B.y)*T,B.width*T,B.height*T))}return A};var u=E.getGlobalVariable;E.getGlobalVariable=function(A){return"page"==A?U.getName():"pagenumber"==A?R+1:"pagecount"==A?null!=this.pages?this.pages.length:1:u.apply(this,arguments)};document.body.appendChild(E.container);this.updatePageRoot(U);E.model.setRoot(U.root)}n=z(E,n,R!=t,U.getId());E!=p&&E.container.parentNode.removeChild(E.container)}}else n=+u.lastPasteXml==m?u.pasteCounter++:(u.lastPasteXml=m,u.pasteCounter=0);var A=u.pasteCounter*u.gridSize;u.setSelectionCells(this.importXml(m,A,A));u.scrollCellToVisible(u.getSelectionCell())}),mxUtils.bind(this,function(m){this.handleError(m)})),mxEvent.consume(c));else{var F=!1,S="";S=t?null!=n.textContent&&"<mxfile"==n.textContent.substring(0,7)&&"</mxfile>"==n.textContent.substring(n.textContent.length-9)||"<mxGraphModel"==n.textContent.substring(0,13)&&"</mxGraphModel>"==n.textContent.substring(n.textContent.length-+15)?n.textContent.replace(/\u00a0/g," "):n.innerHTML:mxUtils.trim(null==n.innerText?mxUtils.getTextContent(n):n.innerText);try{var U=S.lastIndexOf("%3E");0<=U&&U<S.length-3&&(S=S.substring(0,U+3))}catch(m){}try{z=n.getElementsByTagName("span"),(C=null!=z&&0<z.length?mxUtils.trim(decodeURIComponent(z[0].textContent)):decodeURIComponent(S))&&(this.isCompatibleString(C)||0==C.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(F=!0,S=C)}catch(m){}try{if(null!=S&&0<S.length){if(0==S.substring(0,+20).replace(/\s/g,"").indexOf('{"isProtected":')){var O=mxUtils.bind(this,function(){try{S=(new MiroImporter).importMiroJson(JSON.parse(S)),this.pasteXml(S,p,F,c)}catch(m){console.log("Miro import error:",m)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",O):O()}else this.pasteXml(S,p,F,c,t);try{mxEvent.consume(c)}catch(m){}}else if(!f){var N=this.editor.graph;N.lastPasteXml=null;N.pasteCounter=0}}catch(m){this.handleError(m)}}}e.innerHTML=" "};EditorUi.prototype.showPrintDialog=+function(c,e,f){var p=320;this.editor.graph.isEnabled()&&(p+=40);null!=this.pages&&1<this.pages.length&&(p+=40,this.editor.graph.isEnabled()||(p+=10));null==e||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(p+=20);this.showDialog((new PrintDialog(this,c,e,f)).container,320,p,!0,!0)};EditorUi.prototype.print=function(c,e){var f=this.editor,p=f.graph,n=this.getPageIndex(this.currentPage),t=null!=n?n+1:1,z=mxUtils.bind(this,function(A,B,H,T){var k=A.useCssTransforms,v=A.currentTranslate,G=+A.currentScale,I=A.view.translate,M=A.view.scale;A.useCssTransforms&&(A.useCssTransforms=!1,A.currentTranslate=new mxPoint(0,0),A.currentScale=1,A.view.translate=new mxPoint(0,0),A.view.scale=1);var R=A.getGraphBounds(),Q=0,W=0,V=mxRectangle.fromRectangle(A.pageFormat),X=e.fit||e.crop||!A.pageVisible,Z=e.scale;V.width=Math.ceil(V.width*A.pageScale);V.height=Math.ceil(V.height*A.pageScale);var Y=1;if(e.fit){Y=e.sheetsAcross;var ba=e.sheetsDown;isNaN(Z)||(V.width=Math.ceil(V.width*Z),V.height=Math.ceil(V.height*+Z));Y=Math.min(V.height*ba/(R.height/A.view.scale),V.width*Y/(R.width/A.view.scale))}else Y=isNaN(Z)?1:Z;Y*=1;!X&&A.pageVisible?(Z=A.getPageLayout(),Q-=Z.x*V.width,W-=Z.y*V.height):X=!0;e.crop&&(e.selection&&(R=p.getBoundingBox(p.getSelectionCells())),V.width=(R.width+1)*Y/A.view.scale,V.height=(R.height+1)*Y/A.view.scale);V.width=Math.ceil(1*V.width);V.height=Math.ceil(1*V.height);T=null!=T?"page/id,"+T:null;if(null==B){B=PrintDialog.createPrintPreview(A,Y,null,0,Q,W,X);B.title=this.getBaseFilename(!0);+B.pageSelector=!1;B.mathEnabled=!1;Q=e.border;isNaN(Q)||(B.pageMargin=Q);e.selection&&(B.isCellVisible=function(aa){return A.isCellSelected(aa)});var ea=B.writeHead;B.writeHead=function(aa){ea.apply(this,arguments);mxClient.IS_GC&&(aa.writeln('<style type="text/css">'),aa.writeln("@media print {"),aa.writeln(".MathJax svg { shape-rendering: crispEdges; }"),aa.writeln("}"),aa.writeln("</style>"));null!=f.fontCss&&(aa.writeln('<style type="text/css">'),aa.writeln(mxUtils.htmlEntities(f.fontCss,!1,!1,+!1)),aa.writeln("</style>"));for(var da=A.getCustomFonts(),ha=0;ha<da.length;ha++){var na=da[ha].name,oa=da[ha].url;Graph.isCssFontUrl(oa)?aa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(oa))+'" charset="UTF-8" type="text/css">'):(aa.writeln('<style type="text/css">'),aa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(na)+'";\nsrc: url("'+mxUtils.htmlEntities(oa)+'");\n}'),aa.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ca=B.drawBackgroundImage;+B.drawBackgroundImage=function(aa){ca.apply(this,arguments);null!=aa.node&&(EditorUi.embedSvgImages(aa.node),p.disableSvgLinks(aa.node,function(da){da.setAttribute("href","javascript:void(0)")}))}}var fa=B.addGraphFragment;B.addGraphFragment=function(aa,da,ha,na,oa,ia){fa.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:oa.classList.add("geDisableMathJax")};e.grid&&(B.gridSize=A.gridSize,B.gridSteps=A.view.gridSteps,B.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:+A.view.gridColor);B.open(null,null,H,!0,T,V,e.selection?A.getSelectionCells():null)}else{R=A.background;if(null==R||""==R||R==mxConstants.NONE)R="#ffffff";B.backgroundColor=R;B.autoOrigin=X;e.grid&&(B.gridSize=A.gridSize,B.gridSteps=A.view.gridSteps,B.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:A.view.gridColor);B.appendGraph(A,Y,Q,W,H,!0,T,V,e.selection?A.getSelectionCells():null);H=A.getCustomFonts();if(null!=B.wnd)for(V=0;V<H.length;V++)Q=H[V].name,W=H[V].url,Graph.isCssFontUrl(W)?+B.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(W)+'" charset="UTF-8" type="text/css">'):(B.wnd.document.writeln('<style type="text/css">'),B.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Q)+'";\nsrc: url("'+mxUtils.htmlEntities(W)+'");\n}'),B.wnd.document.writeln("</style>"))}k&&(A.useCssTransforms=k,A.currentTranslate=v,A.currentScale=G,A.view.translate=I,A.view.scale=M);return B}),E=e.pagesFrom,C=e.pagesTo,F=!e.allPages;n=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,+e);else{F&&(F=e.selection||E==t&&C==t);if(!F&&null!=this.pages&&this.pages.length){F=0;t=this.pages.length-1;e.allPages||(F=parseInt(E)-1,t=parseInt(C)-1);for(var S=F;S<=t;S++){var U=this.pages[S];E=U==this.currentPage?p:null;if(null==E){E=this.createTemporaryGraph(p.stylesheet);E.shapeForegroundColor=p.shapeForegroundColor;E.shapeBackgroundColor=p.shapeBackgroundColor;C=!0;F=!1;var O=null,N=null;null==U.viewState&&null==U.root&&this.updatePageRoot(U);null!=U.viewState&&(C=U.viewState.pageVisible,+F=U.viewState.mathEnabled,O=U.viewState.background,N=U.viewState.backgroundImage,E.pageFormat=U.viewState.pageFormat,E.gridSize=U.viewState.gridSize);null!=N&&null!=N.originalSrc&&(N=this.createImageForPageLink(N.originalSrc,U));E.background=O;E.backgroundImage=null!=N?new mxImage(N.src,N.width,N.height,N.x,N.y):null;E.pageVisible=C;E.mathEnabled=F;var m=E.getGraphBounds;E.getGraphBounds=function(){var A=m.apply(this,arguments),B=this.backgroundImage;if(null!=B&&null!=B.width&&null!=B.height){var H=+this.view.translate,T=this.view.scale;A=mxRectangle.fromRectangle(A);A.add(new mxRectangle((H.x+B.x)*T,(H.y+B.y)*T,B.width*T,B.height*T))}return A};var u=E.getGlobalVariable;E.getGlobalVariable=function(A){return"page"==A?U.getName():"pagenumber"==A?S+1:"pagecount"==A?null!=this.pages?this.pages.length:1:u.apply(this,arguments)};document.body.appendChild(E.container);this.updatePageRoot(U);E.model.setRoot(U.root)}n=z(E,n,S!=t,U.getId());E!=p&&E.container.parentNode.removeChild(E.container)}}else n=z(p);null==n||null==n.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(n.mathEnabled&&(z=n.wnd.document,c||(n.wnd.IMMEDIATE_PRINT=!0),z.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),n.closeDocument(),Graph.rewritePageLinks(n.wnd.document,!0),n.mathEnabled||c||PrintDialog.printPreview(n));return n}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var e=null,f=0;f<c.length;f++)mxEvent.addListener(c[f],"dragleave",function(p){null!=e&&(e.parentNode.removeChild(e),e=null);p.stopPropagation();p.preventDefault()}),mxEvent.addListener(c[f],"dragover",mxUtils.bind(this,function(p){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==e&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(e=this.highlightElement());p.stopPropagation();p.preventDefault()})),mxEvent.addListener(c[f],"drop",mxUtils.bind(this,function(p){null!=e&&(e.parentNode.removeChild(e),e=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<p.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(p.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(p)&&!mxEvent.isShiftDown(p)):this.openFiles(p.dataTransfer.files,!0);else{var n=this.extractGraphModelFromEvent(p);if(null==n){var t=null!=p.dataTransfer?p.dataTransfer:p.clipboardData;null!=t&&(10==document.documentMode||11==document.documentMode?n=t.getData("Text"):(n=null,n=0<=mxUtils.indexOf(t.types,"text/uri-list")?p.dataTransfer.getData("text/uri-list"):@@ -13445,38 +13445,38 @@ function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModtranslate:e.view.translate,bounds:e.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:e.view.scale,page:e.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var e=this.editor.graph;e.isEditing()&&e.stopEditing(!e.isInvokesStopCellEditing());var f=window.opener||window.parent;if(this.editor.modified){var p=e.background;if(null==p||p==mxConstants.NONE)p=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),e,null,!0,mxUtils.bind(this,function(n){f.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(n)}),"*")}),null,null,!0,p,1,this.embedExportBorder,null,this.embedExportTheme)}else c||f.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,e.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(n){c||this.handleError(n)}};EditorUi.prototype.installMessageHandler=function(c){var e=null,f=!1,p=!1,n=null,t=mxUtils.bind(this,function(C,F){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,t);mxEvent.addListener(window,"message",mxUtils.bind(this,-function(C){if(C.source==(window.opener||window.parent)){var F=C.data,R=null,U=mxUtils.bind(this,function(aa){if(null!=aa&&"function"===typeof aa.charAt&&"<"!=aa.charAt(0))try{Editor.isPngDataUrl(aa)?aa=Editor.extractGraphModelFromPng(aa):"data:image/svg+xml;base64,"==aa.substring(0,26)?aa=atob(aa.substring(26)):"data:image/svg+xml;utf8,"==aa.substring(0,24)&&(aa=aa.substring(24)),null!=aa&&(""==aa.trim()?aa=null:"%"==aa.charAt(0)?aa=decodeURIComponent(aa):"<"!=aa.charAt(0)&&(aa=Graph.decompress(aa)))}catch(da){}return aa});-if("json"==urlParams.proto){var P=!1;try{F=JSON.parse(F),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[C],"data",[F])}catch(aa){F=null}try{if(null==F)return;if("dialog"==F.action){this.showError(null!=F.titleKey?mxResources.get(F.titleKey):F.title,null!=F.messageKey?mxResources.get(F.messageKey):mxUtils.htmlEntities(F.message),null!=F.buttonKey?mxResources.get(F.buttonKey):F.button);null!=F.modified&&(this.editor.modified=F.modified);return}if("layout"==F.action){this.executeLayouts(this.editor.graph.createLayouts(F.layouts));-return}if("prompt"==F.action){this.spinner.stop();var O=new FilenameDialog(this,F.defaultValue||"",null!=F.okKey?mxResources.get(F.okKey):F.ok,function(aa){null!=aa?z.postMessage(JSON.stringify({event:"prompt",value:aa,message:F}),"*"):z.postMessage(JSON.stringify({event:"prompt-cancel",message:F}),"*")},null!=F.titleKey?mxResources.get(F.titleKey):F.title,null,null,null,null,function(){z.postMessage(JSON.stringify({event:"prompt-cancel",message:F}),"*")});this.showDialog(O.container,300,80,!0,!1);-O.init();return}if("draft"==F.action){var m=U(F.xml);this.spinner.stop();O=new DraftDialog(this,mxResources.get("draftFound",[F.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"edit",message:F}),"*")}),mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"discard",message:F}),"*")}),F.editKey?mxResources.get(F.editKey):null,F.discardKey?mxResources.get(F.discardKey):null,F.ignore?-mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"ignore",message:F}),"*")}):null);this.showDialog(O.container,640,480,!0,!1,mxUtils.bind(this,function(aa){aa&&this.actions.get("exit").funct()}));try{O.init()}catch(aa){z.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:F}),"*")}return}if("template"==F.action){this.spinner.stop();var u=1==F.enableRecent,A=1==F.enableSearch,B=1==F.enableCustomTemp;O=new NewDialog(this,!1,F.templatesOnly?-!1:null!=F.callback,mxUtils.bind(this,function(aa,da,ha,pa){aa=aa||this.emptyDiagramXml;null!=F.callback?z.postMessage(JSON.stringify({event:"template",xml:aa,blank:aa==this.emptyDiagramXml,name:da,tempUrl:ha,libs:pa,builtIn:!0,message:F}),"*"):(c(aa,C,aa!=this.emptyDiagramXml,F.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,u?mxUtils.bind(this,function(aa){this.remoteInvoke("getRecentDiagrams",[null],null,aa,function(){aa(null,"Network Error!")})}):-null,A?mxUtils.bind(this,function(aa,da){this.remoteInvoke("searchDiagrams",[aa,null],null,da,function(){da(null,"Network Error!")})}):null,mxUtils.bind(this,function(aa,da,ha){z.postMessage(JSON.stringify({event:"template",docUrl:aa,info:da,name:ha}),"*")}),null,null,B?mxUtils.bind(this,function(aa){this.remoteInvoke("getCustomTemplates",null,null,aa,function(){aa({},0)})}):null,1==F.withoutType);this.showDialog(O.container,620,460,!0,!1,mxUtils.bind(this,function(aa){null!=this.sidebar&&this.sidebar.hideTooltip();-aa&&this.actions.get("exit").funct()}));O.init();return}if("textContent"==F.action){var H=this.getDiagramTextContent();z.postMessage(JSON.stringify({event:"textContent",data:H,message:F}),"*");return}if("status"==F.action){null!=F.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(F.messageKey))):null!=F.message&&this.editor.setStatus(mxUtils.htmlEntities(F.message));null!=F.modified&&(this.editor.modified=F.modified);return}if("spinner"==F.action){var T=null!=F.messageKey?mxResources.get(F.messageKey):-F.message;null==F.show||F.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("exit"==F.action){this.actions.get("exit").funct();return}if("viewport"==F.action){null!=F.viewport&&(this.embedViewport=F.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==F.action){O=null;try{var k=this.diagramContainer.getAttribute("data-scrollState");null!=k&&(this.diagramContainer.removeAttribute("data-scrollState"),O=JSON.parse(k))}catch(aa){}Editor.inlineFullscreen=-F.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=O&&this.restoreScrollState(O);return}if("snapshot"==F.action){this.sendEmbeddedSvgExport(!0);return}if("export"==F.action){if("png"==F.format||"xmlpng"==F.format){if(null==F.spin&&null==F.spinKey||this.spinner.spin(document.body,null!=F.spinKey?mxResources.get(F.spinKey):F.spin)){var v=null!=F.xml?F.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var G=this.editor.graph,I=mxUtils.bind(this,function(aa,da){if(F.withSvg)F.withSvg=-!1,this.getEmbeddedSvg(v,this.editor.graph,null,!0,function(pa){I(aa,pa)},null,null,F.embedImages,this.editor.graph.background,F.scale,F.border,F.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var ha=this.createLoadMessage("export");ha.format=F.format;ha.message=F;ha.data=aa;ha.svg=da;ha.xml=v;z.postMessage(JSON.stringify(ha),"*")}}),M=mxUtils.bind(this,function(aa){null==aa&&(aa=Editor.blankImage);"xmlpng"==F.format&&(aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(v)));-G!=this.editor.graph&&G.container.parentNode.removeChild(G.container);I(aa)}),N=F.pageId||(null!=this.pages?F.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var S=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=N){var aa=G.getGlobalVariable;G=this.createTemporaryGraph(G.getStylesheet());for(var da,ha=0;ha<this.pages.length;ha++)if(this.pages[ha].getId()==N){da=this.updatePageRoot(this.pages[ha]);break}null==da&&(da=this.currentPage);-G.getGlobalVariable=function(wa){return"page"==wa?da.getName():"pagenumber"==wa?1:aa.apply(this,arguments)};document.body.appendChild(G.container);G.model.setRoot(da.root)}if(null!=F.layerIds){var pa=G.model,na=pa.getChildCells(pa.getRoot()),ia={};for(ha=0;ha<F.layerIds.length;ha++)ia[F.layerIds[ha]]=!0;for(ha=0;ha<na.length;ha++)pa.setVisible(na[ha],ia[na[ha].id]||!1)}ha=null;F.keepTheme&&(ha=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(wa){M(wa.toDataURL("image/png"))}),-F.width,null,F.background,mxUtils.bind(this,function(){M(null)}),null,null,F.scale,F.transparent,F.shadow,null,G,F.border,null,F.grid,ha)});null!=F.xml&&0<F.xml.length&&(f=!0,this.setFileData(v),f=!1);S()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==F.format?"1":"0")+(null!=N?"&pageId="+N:"")+(null!=F.layerIds&&0<F.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:F.layerIds})):"")+(null!=F.scale?"&scale="+F.scale:"")+"&base64=1&xml="+encodeURIComponent(v))).send(mxUtils.bind(this,-function(aa){200<=aa.getStatus()&&299>=aa.getStatus()?I("data:image/png;base64,"+aa.getText()):M(null)}),mxUtils.bind(this,function(){M(null)}))}}else if(S=mxUtils.bind(this,function(){var aa=this.createLoadMessage("export");aa.message=F;if("html2"==F.format||"html"==F.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var da=this.getXmlFileData();aa.xml=mxUtils.getXml(da);aa.data=this.getFileData(null,null,!0,null,null,null,da);aa.format=F.format}else if("html"==F.format)da=this.editor.getGraphXml(),-aa.data=this.getHtml(da,this.editor.graph),aa.xml=mxUtils.getXml(da),aa.format=F.format;else{mxSvgCanvas2D.prototype.foAltText=null;da=null!=F.background?F.background:this.editor.graph.background;da==mxConstants.NONE&&(da=null);aa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);aa.format="svg";var ha=mxUtils.bind(this,function(na){this.editor.graph.setEnabled(!0);this.spinner.stop();aa.data=Editor.createSvgDataUri(na);z.postMessage(JSON.stringify(aa),"*")}),pa="auto";F.keepTheme&&-(pa=Editor.isDarkMode()?"dark":"light");null!=F.theme&&(pa=F.theme);if("xmlsvg"==F.format){if(null==F.spin&&null==F.spinKey||this.spinner.spin(document.body,null!=F.spinKey?mxResources.get(F.spinKey):F.spin)){pa=null;if(this.isAutoDarkMode()||Editor.isDarkMode())pa="auto";null!=F.theme&&(pa=F.theme);this.getEmbeddedSvg(aa.xml,this.editor.graph,null,!0,ha,null,null,F.embedImages,da,F.scale,F.border,F.shadow,pa)}}else if(null==F.spin&&null==F.spinKey||this.spinner.spin(document.body,null!=F.spinKey?-mxResources.get(F.spinKey):F.spin))this.editor.graph.setEnabled(!1),da=this.editor.graph.getSvg(da,F.scale,F.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||F.shadow,null,pa),(this.editor.graph.shadowVisible||F.shadow)&&this.editor.graph.addSvgShadow(da),this.embedFonts(da,mxUtils.bind(this,function(na){F.embedImages||null==F.embedImages?this.editor.convertImages(na,mxUtils.bind(this,function(ia){ha(mxUtils.getXml(ia))})):ha(mxUtils.getXml(na))}));return}z.postMessage(JSON.stringify(aa),-"*")}),null!=F.xml&&0<F.xml.length){if(this.editor.graph.mathEnabled){var V=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){V.apply(this,arguments);S()}}f=!0;this.setFileData(F.xml);f=!1;this.editor.graph.mathEnabled||S()}else S();return}if("load"==F.action){P=F.toSketch;p=1==F.autosave;this.hideDialog();null!=F.modified&&null==urlParams.modified&&(urlParams.modified=F.modified);null!=F.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=F.saveAndExit);if("1"==urlParams.saveAndExit||-"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=F.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=F.noSaveBtn);if(null!=F.rough){var W=Editor.sketchMode;this.doSetSketchMode(F.rough);W!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=+function(C){if(C.source==(window.opener||window.parent)){var F=C.data,S=null,U=mxUtils.bind(this,function(aa){if(null!=aa&&"function"===typeof aa.charAt&&"<"!=aa.charAt(0))try{Editor.isPngDataUrl(aa)?aa=Editor.extractGraphModelFromPng(aa):"data:image/svg+xml;base64,"==aa.substring(0,26)?aa=atob(aa.substring(26)):"data:image/svg+xml;utf8,"==aa.substring(0,24)&&(aa=aa.substring(24)),null!=aa&&(""==aa.trim()?aa=null:"%"==aa.charAt(0)?aa=decodeURIComponent(aa):"<"!=aa.charAt(0)&&(aa=Graph.decompress(aa)))}catch(da){}return aa});+if("json"==urlParams.proto){var O=!1;try{F=JSON.parse(F),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[C],"data",[F])}catch(aa){F=null}try{if(null==F)return;if("dialog"==F.action){this.showError(null!=F.titleKey?mxResources.get(F.titleKey):F.title,null!=F.messageKey?mxResources.get(F.messageKey):mxUtils.htmlEntities(F.message),null!=F.buttonKey?mxResources.get(F.buttonKey):F.button);null!=F.modified&&(this.editor.modified=F.modified);return}if("layout"==F.action){this.executeLayouts(this.editor.graph.createLayouts(F.layouts));+return}if("prompt"==F.action){this.spinner.stop();var N=new FilenameDialog(this,F.defaultValue||"",null!=F.okKey?mxResources.get(F.okKey):F.ok,function(aa){null!=aa?z.postMessage(JSON.stringify({event:"prompt",value:aa,message:F}),"*"):z.postMessage(JSON.stringify({event:"prompt-cancel",message:F}),"*")},null!=F.titleKey?mxResources.get(F.titleKey):F.title,null,null,null,null,function(){z.postMessage(JSON.stringify({event:"prompt-cancel",message:F}),"*")});this.showDialog(N.container,300,80,!0,!1);+N.init();return}if("draft"==F.action){var m=U(F.xml);this.spinner.stop();N=new DraftDialog(this,mxResources.get("draftFound",[F.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"edit",message:F}),"*")}),mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"discard",message:F}),"*")}),F.editKey?mxResources.get(F.editKey):null,F.discardKey?mxResources.get(F.discardKey):null,F.ignore?+mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"ignore",message:F}),"*")}):null);this.showDialog(N.container,640,480,!0,!1,mxUtils.bind(this,function(aa){aa&&this.actions.get("exit").funct()}));try{N.init()}catch(aa){z.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:F}),"*")}return}if("template"==F.action){this.spinner.stop();var u=1==F.enableRecent,A=1==F.enableSearch,B=1==F.enableCustomTemp;N=new NewDialog(this,!1,F.templatesOnly?+!1:null!=F.callback,mxUtils.bind(this,function(aa,da,ha,na){aa=aa||this.emptyDiagramXml;null!=F.callback?z.postMessage(JSON.stringify({event:"template",xml:aa,blank:aa==this.emptyDiagramXml,name:da,tempUrl:ha,libs:na,builtIn:!0,message:F}),"*"):(c(aa,C,aa!=this.emptyDiagramXml,F.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,u?mxUtils.bind(this,function(aa){this.remoteInvoke("getRecentDiagrams",[null],null,aa,function(){aa(null,"Network Error!")})}):+null,A?mxUtils.bind(this,function(aa,da){this.remoteInvoke("searchDiagrams",[aa,null],null,da,function(){da(null,"Network Error!")})}):null,mxUtils.bind(this,function(aa,da,ha){z.postMessage(JSON.stringify({event:"template",docUrl:aa,info:da,name:ha}),"*")}),null,null,B?mxUtils.bind(this,function(aa){this.remoteInvoke("getCustomTemplates",null,null,aa,function(){aa({},0)})}):null,1==F.withoutType);this.showDialog(N.container,620,460,!0,!1,mxUtils.bind(this,function(aa){null!=this.sidebar&&this.sidebar.hideTooltip();+aa&&this.actions.get("exit").funct()}));N.init();return}if("textContent"==F.action){var H=this.getDiagramTextContent();z.postMessage(JSON.stringify({event:"textContent",data:H,message:F}),"*");return}if("status"==F.action){null!=F.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(F.messageKey))):null!=F.message&&this.editor.setStatus(mxUtils.htmlEntities(F.message));null!=F.modified&&(this.editor.modified=F.modified);return}if("spinner"==F.action){var T=null!=F.messageKey?mxResources.get(F.messageKey):+F.message;null==F.show||F.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("exit"==F.action){this.actions.get("exit").funct();return}if("viewport"==F.action){null!=F.viewport&&(this.embedViewport=F.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==F.action){N=null;try{var k=this.diagramContainer.getAttribute("data-scrollState");null!=k&&(this.diagramContainer.removeAttribute("data-scrollState"),N=JSON.parse(k))}catch(aa){}Editor.inlineFullscreen=+F.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=N&&this.restoreScrollState(N);return}if("snapshot"==F.action){this.sendEmbeddedSvgExport(!0);return}if("export"==F.action){if("png"==F.format||"xmlpng"==F.format){if(null==F.spin&&null==F.spinKey||this.spinner.spin(document.body,null!=F.spinKey?mxResources.get(F.spinKey):F.spin)){var v=null!=F.xml?F.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var G=this.editor.graph,I=mxUtils.bind(this,function(aa,da){if(F.withSvg)F.withSvg=+!1,this.getEmbeddedSvg(v,this.editor.graph,null,!0,function(na){I(aa,na)},null,null,F.embedImages,this.editor.graph.background,F.scale,F.border,F.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var ha=this.createLoadMessage("export");ha.format=F.format;ha.message=F;ha.data=aa;ha.svg=da;ha.xml=v;z.postMessage(JSON.stringify(ha),"*")}}),M=mxUtils.bind(this,function(aa){null==aa&&(aa=Editor.blankImage);"xmlpng"==F.format&&(aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(v)));+G!=this.editor.graph&&G.container.parentNode.removeChild(G.container);I(aa)}),R=F.pageId||(null!=this.pages?F.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var Q=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=R){var aa=G.getGlobalVariable;G=this.createTemporaryGraph(G.getStylesheet());for(var da,ha=0;ha<this.pages.length;ha++)if(this.pages[ha].getId()==R){da=this.updatePageRoot(this.pages[ha]);break}null==da&&(da=this.currentPage);+G.getGlobalVariable=function(va){return"page"==va?da.getName():"pagenumber"==va?1:aa.apply(this,arguments)};document.body.appendChild(G.container);G.model.setRoot(da.root)}if(null!=F.layerIds){var na=G.model,oa=na.getChildCells(na.getRoot()),ia={};for(ha=0;ha<F.layerIds.length;ha++)ia[F.layerIds[ha]]=!0;for(ha=0;ha<oa.length;ha++)na.setVisible(oa[ha],ia[oa[ha].id]||!1)}ha=null;F.keepTheme&&(ha=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(va){M(va.toDataURL("image/png"))}),+F.width,null,F.background,mxUtils.bind(this,function(){M(null)}),null,null,F.scale,F.transparent,F.shadow,null,G,F.border,null,F.grid,ha)});null!=F.xml&&0<F.xml.length&&(f=!0,this.setFileData(v),f=!1);Q()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==F.format?"1":"0")+(null!=R?"&pageId="+R:"")+(null!=F.layerIds&&0<F.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:F.layerIds})):"")+(null!=F.scale?"&scale="+F.scale:"")+"&base64=1&xml="+encodeURIComponent(v))).send(mxUtils.bind(this,+function(aa){200<=aa.getStatus()&&299>=aa.getStatus()?I("data:image/png;base64,"+aa.getText()):M(null)}),mxUtils.bind(this,function(){M(null)}))}}else if(Q=mxUtils.bind(this,function(){var aa=this.createLoadMessage("export");aa.message=F;if("html2"==F.format||"html"==F.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var da=this.getXmlFileData();aa.xml=mxUtils.getXml(da);aa.data=this.getFileData(null,null,!0,null,null,null,da);aa.format=F.format}else if("html"==F.format)da=this.editor.getGraphXml(),+aa.data=this.getHtml(da,this.editor.graph),aa.xml=mxUtils.getXml(da),aa.format=F.format;else{mxSvgCanvas2D.prototype.foAltText=null;da=null!=F.background?F.background:this.editor.graph.background;da==mxConstants.NONE&&(da=null);aa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);aa.format="svg";var ha=mxUtils.bind(this,function(oa){this.editor.graph.setEnabled(!0);this.spinner.stop();aa.data=Editor.createSvgDataUri(oa);z.postMessage(JSON.stringify(aa),"*")}),na="auto";F.keepTheme&&+(na=Editor.isDarkMode()?"dark":"light");null!=F.theme&&(na=F.theme);if("xmlsvg"==F.format){if(null==F.spin&&null==F.spinKey||this.spinner.spin(document.body,null!=F.spinKey?mxResources.get(F.spinKey):F.spin)){na=null;if(this.isAutoDarkMode()||Editor.isDarkMode())na="auto";null!=F.theme&&(na=F.theme);this.getEmbeddedSvg(aa.xml,this.editor.graph,null,!0,ha,null,null,F.embedImages,da,F.scale,F.border,F.shadow,na)}}else if(null==F.spin&&null==F.spinKey||this.spinner.spin(document.body,null!=F.spinKey?+mxResources.get(F.spinKey):F.spin))this.editor.graph.setEnabled(!1),da=this.editor.graph.getSvg(da,F.scale,F.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||F.shadow,null,na),(this.editor.graph.shadowVisible||F.shadow)&&this.editor.graph.addSvgShadow(da),this.embedFonts(da,mxUtils.bind(this,function(oa){F.embedImages||null==F.embedImages?this.editor.convertImages(oa,mxUtils.bind(this,function(ia){ha(mxUtils.getXml(ia))})):ha(mxUtils.getXml(oa))}));return}z.postMessage(JSON.stringify(aa),+"*")}),null!=F.xml&&0<F.xml.length){if(this.editor.graph.mathEnabled){var W=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){W.apply(this,arguments);Q()}}f=!0;this.setFileData(F.xml);f=!1;this.editor.graph.mathEnabled||Q()}else Q();return}if("load"==F.action){O=F.toSketch;p=1==F.autosave;this.hideDialog();null!=F.modified&&null==urlParams.modified&&(urlParams.modified=F.modified);null!=F.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=F.saveAndExit);if("1"==urlParams.saveAndExit||+"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=F.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=F.noSaveBtn);if(null!=F.rough){var V=Editor.sketchMode;this.doSetSketchMode(F.rough);V!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=F.dark&&this.setDarkMode(F.dark);null!=F.border&&(this.embedExportBorder=F.border);null!=F.theme&&(this.embedExportTheme=F.theme);null!=F.background&&(this.embedExportBackground=F.background);null!=F.viewport&&(this.embedViewport=F.viewport);this.embedExitPoint=null;if(null!=F.rect){var X=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,F.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,F.rect.top)+"px";this.minInlineWidth=F.minWidth;this.minInlineHeight=F.minHeight;-this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var Z=F.maxFitScale,Y=F.rect.width+2*X,ba=F.rect.height+2*X;R=mxUtils.bind(this,function(){var aa=mxUtils.getDocumentSize();Y=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Y):Y,aa.width-80);aa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ba):ba,aa.height-80);this.diagramContainer.style.width=Y+"px";this.diagramContainer.style.height=+this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var Z=F.maxFitScale,Y=F.rect.width+2*X,ba=F.rect.height+2*X;S=mxUtils.bind(this,function(){var aa=mxUtils.getDocumentSize();Y=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Y):Y,aa.width-80);aa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ba):ba,aa.height-80);this.diagramContainer.style.width=Y+"px";this.diagramContainer.style.height=aa+"px";var da=this.editor.graph;aa=da.maxFitScale;da.maxFitScale=Z;da.fit(2*X,null,null,null,null,null,ba);this.setPageVisible(!1);if(null!=this.minInlineWidth&&da.getGraphBounds().width<this.minInlineWidth){var ha=da.container.scrollTop;this.resetScrollbars();da.container.scrollTop=ha}da.maxFitScale=aa;da.container.scrollTop-=X;da.container.scrollLeft-=X;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[F]));da.container.focus();null!=this.formatWindow&&-null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=da.container.style.top);var pa=da.getGraphBounds();da.container.clientWidth>pa.width+2*X&&(da.container.scrollLeft=pa.x+(pa.width+X-da.container.clientWidth)/2)}),10)})}null!=F.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=F.noExitBtn);null!=F.title&&null!=this.buttonContainer&&(m=this.createStatusDiv(""),mxUtils.write(m,F.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),+null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=da.container.style.top);var na=da.getGraphBounds();da.container.clientWidth>na.width+2*X&&(da.container.scrollLeft=na.x+(na.width+X-da.container.clientWidth)/2)}),10)})}null!=F.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=F.noExitBtn);null!=F.title&&null!=this.buttonContainer&&(m=this.createStatusDiv(""),mxUtils.write(m,F.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(m),this.embedFilenameSpan=m);try{F.libs&&this.sidebar.showEntries(F.libs)}catch(aa){}F=null!=F.xmlpng?this.extractGraphModelFromPng(F.xmlpng):null!=F.descriptor?F.descriptor:F.xml}else{if("merge"==F.action){var ea=this.getCurrentFile();null!=ea&&(m=U(F.xml),null!=m&&""!=m&&ea.mergeFile(new LocalFile(this,m),function(){z.postMessage(JSON.stringify({event:"merge",message:F}),"*")},function(aa){z.postMessage(JSON.stringify({event:"merge",message:F,error:aa}),"*")}))}else"remoteInvokeReady"==F.action?this.handleRemoteInvokeReady(z):"remoteInvoke"==F.action?this.handleRemoteInvoke(F,C.origin):"remoteInvokeResponse"==F.action?this.handleRemoteInvokeResponse(F):z.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(F)}),"*");return}}catch(aa){this.handleError(aa)}}var ca=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),fa=mxUtils.bind(this,function(aa,da){f=!0;-try{c(aa,da,null,P)}catch(ha){this.handleError(ha)}f=!1;null!=urlParams.modified&&this.editor.setStatus("");n=ca();p&&null==e&&(e=mxUtils.bind(this,function(ha,pa){ha=ca();ha==n||f||(pa=this.createLoadMessage("autosave"),pa.xml=ha,(window.opener||window.parent).postMessage(JSON.stringify(pa),"*"));n=ha}),this.editor.graph.model.addListener(mxEvent.CHANGE,e),this.editor.graph.addListener("gridSizeChanged",e),this.editor.graph.addListener("shadowVisibleChanged",e),this.addListener("pageFormatChanged",-e),this.addListener("pageScaleChanged",e),this.addListener("backgroundColorChanged",e),this.addListener("backgroundImageChanged",e),this.addListener("foldingEnabledChanged",e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged",e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)da=this.createLoadMessage("load"),da.xml=aa,z.postMessage(JSON.stringify(da),"*");null!=R&&R()});null!=F&&+try{c(aa,da,null,O)}catch(ha){this.handleError(ha)}f=!1;null!=urlParams.modified&&this.editor.setStatus("");n=ca();p&&null==e&&(e=mxUtils.bind(this,function(ha,na){ha=ca();ha==n||f||(na=this.createLoadMessage("autosave"),na.xml=ha,(window.opener||window.parent).postMessage(JSON.stringify(na),"*"));n=ha}),this.editor.graph.model.addListener(mxEvent.CHANGE,e),this.editor.graph.addListener("gridSizeChanged",e),this.editor.graph.addListener("shadowVisibleChanged",e),this.addListener("pageFormatChanged",+e),this.addListener("pageScaleChanged",e),this.addListener("backgroundColorChanged",e),this.addListener("backgroundImageChanged",e),this.addListener("foldingEnabledChanged",e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged",e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)da=this.createLoadMessage("load"),da.xml=aa,z.postMessage(JSON.stringify(da),"*");null!=S&&S()});null!=F&&"function"===typeof F.substring&&"data:application/vnd.visio;base64,"==F.substring(0,34)?(U="0M8R4KGxGuE"==F.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(F.substring(F.indexOf(",")+1)),function(aa){fa(aa,C)},mxUtils.bind(this,function(aa){this.handleError(aa)}),U)):null!=F&&"function"===typeof F.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(F,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(F,mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status&&"<mxGraphModel"==aa.responseText.substring(0,13)?fa(aa.responseText,C):this.handleError({message:413==aa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=F&&"function"===typeof F.substring&&this.isLucidChartData(F)?this.convertLucidChart(F,mxUtils.bind(this,function(aa){fa(aa)}),mxUtils.bind(this,function(aa){this.handleError(aa)})):null==F||"object"!==typeof F||null==F.format||-null==F.data&&null==F.url?(F=U(F),fa(F,C)):this.loadDescriptor(F,mxUtils.bind(this,function(aa){fa(ca(),C)}),mxUtils.bind(this,function(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}))}}));var z=window.opener||window.parent;t="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";z.postMessage(t,"*");if("json"==urlParams.proto){var E=this.editor.graph.openLink;this.editor.graph.openLink=function(C,F,R){E.apply(this,arguments);z.postMessage(JSON.stringify({event:"openLink",-href:C,target:F,allowOpener:R}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,e,f,p){var n="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,t=document.createElement("button");t.setAttribute("title",c+(null!=f?" ("+f+")":""));t.style.marginLeft="6px";mxUtils.write(t,c);n?(t.className=p?"gePrimaryBtn":"",t.style.marginLeft="8px",t.style.padding="6px"):t.className="geBigButton"+(p?"":" geBigStandardButton");mxEvent.addListener(t,"click",e);return t};+null==F.data&&null==F.url?(F=U(F),fa(F,C)):this.loadDescriptor(F,mxUtils.bind(this,function(aa){fa(ca(),C)}),mxUtils.bind(this,function(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}))}}));var z=window.opener||window.parent;t="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";z.postMessage(t,"*");if("json"==urlParams.proto){var E=this.editor.graph.openLink;this.editor.graph.openLink=function(C,F,S){E.apply(this,arguments);z.postMessage(JSON.stringify({event:"openLink",+href:C,target:F,allowOpener:S}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,e,f,p){var n="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,t=document.createElement("button");t.setAttribute("title",c+(null!=f?" ("+f+")":""));t.style.marginLeft="6px";mxUtils.write(t,c);n?(t.className=p?"gePrimaryBtn":"",t.style.marginLeft="8px",t.style.padding="6px"):t.className="geBigButton"+(p?"":" geBigStandardButton");mxEvent.addListener(t,"click",e);return t};EditorUi.prototype.addEmbedButtons=function(){var c=document.createElement("div");c.style.display="inline-flex";c.style.alignItems="center";c.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&(c.style.marginRight="66px",c.style.order="1","atlas"==Editor.currentTheme&&(c.style.marginTop="2px"));document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(c.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&c.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||null==this.buttonContainer?null!=this.menubar&&(this.toolbar.container.style.paddingLeft="6px",this.toolbar.container.appendChild(c),this.toolbar.staticElements.push(c)):(this.buttonContainer.appendChild(c),this.editor.fireEvent(new mxEventObject("statusChanged")))};@@ -13485,23 +13485,23 @@ function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var e=new Textp.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));p.value=t}catch(z){this.handleError(z)}}));n.setAttribute("title","copy");n.className="geBtn";f.appendChild(n)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(e.container,620,460,!0,!0);e.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(e){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;e.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),p=mxUtils.bind(this,function(n){this.loadingOrgChart=!1;e.clear()&&this.handleError(n)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f,null,null,null,p)},null,null,null,p)},null,null,null,p)},null,null,null,p):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",f,null,null,null,p))}),onerror)};EditorUi.prototype.importCsv=function(c,e){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,e)}))};EditorUi.prototype.doImportCsv=function(c,e){try{var f=c.split("\n"),p=[],n=[],t=[],z={};if(0<f.length){var E=-{},C=this.editor.graph,F=null,R=null,U=null,P=null,O=null,m=null,u=null,A="whiteSpace=wrap;html=1;",B=null,H=null,T="",k="auto",v="auto",G=!1,I=null,M=null,N=40,S=40,V=100,W=0,X=mxUtils.bind(this,function(){null!=e?e(za):(C.setSelectionCells(za),C.scrollCellToVisible(C.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=C.getFreeInsertPoint(),Y=Z.x,ba=Z.y;Z=ba;var ea=null,ca="auto";H=null;for(var fa=[],aa=null,da=null,-ha=0;ha<f.length&&"#"==f[ha].charAt(0);){c=f[ha].replace(/\r$/,"");for(ha++;ha<f.length&&"\\"==c.charAt(c.length-1)&&"#"==f[ha].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(f[ha].substring(1)),ha++;if("#"!=c.charAt(1)){var pa=c.indexOf(":");if(0<pa){var na=mxUtils.trim(c.substring(1,pa)),ia=mxUtils.trim(c.substring(pa+1));"label"==na?ea=Graph.sanitizeHtml(ia):"labelname"==na&&0<ia.length&&"-"!=ia?O=ia:"labels"==na&&0<ia.length&&"-"!=ia?u=JSON.parse(ia):"style"==na?R=ia:"parentstyle"==na?A=-ia:"unknownStyle"==na&&"-"!=ia?m=ia:"stylename"==na&&0<ia.length&&"-"!=ia?P=ia:"styles"==na&&0<ia.length&&"-"!=ia?U=JSON.parse(ia):"vars"==na&&0<ia.length&&"-"!=ia?F=JSON.parse(ia):"identity"==na&&0<ia.length&&"-"!=ia?B=ia:"parent"==na&&0<ia.length&&"-"!=ia?H=ia:"namespace"==na&&0<ia.length&&"-"!=ia?T=ia:"width"==na?k=ia:"height"==na?v=ia:"collapsed"==na&&"-"!=ia?G="true"==ia:"left"==na&&0<ia.length?I=ia:"top"==na&&0<ia.length?M=ia:"ignore"==na?da=ia.split(","):"connect"==na?fa.push(JSON.parse(ia)):-"link"==na?aa=ia:"padding"==na?W=parseFloat(ia):"edgespacing"==na?N=parseFloat(ia):"nodespacing"==na?S=parseFloat(ia):"levelspacing"==na?V=parseFloat(ia):"layout"==na&&(ca=ia)}}}if(null==f[ha])throw Error(mxResources.get("invalidOrMissingFile"));var wa=this.editor.csvToArray(f[ha].replace(/\r$/,""));pa=c=null;na=[];for(ia=0;ia<wa.length;ia++)B==wa[ia]&&(c=ia),H==wa[ia]&&(pa=ia),na.push(mxUtils.trim(wa[ia]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ea&&(ea="%"+na[0]+"%");-if(null!=fa)for(var ua=0;ua<fa.length;ua++)null==E[fa[ua].to]&&(E[fa[ua].to]={});B=[];for(ia=ha+1;ia<f.length;ia++){var va=this.editor.csvToArray(f[ia].replace(/\r$/,""));if(null==va){var Ca=40<f[ia].length?f[ia].substring(0,40)+"...":f[ia];throw Error(Ca+" ("+ia+"):\n"+mxResources.get("containsValidationErrors"));}0<va.length&&B.push(va)}C.model.beginUpdate();try{for(ia=0;ia<B.length;ia++){va=B[ia];var ja=null,oa=null!=c?T+va[c]:null;f=!1;null!=oa&&(ja=C.model.getCell(oa),f=null==ja||0<=mxUtils.indexOf(p,-ja));var ma=new mxCell(ea,new mxGeometry(Y,Z,0,0),R||"whiteSpace=wrap;html=1;");ma.collapsed=G;ma.vertex=!0;ma.id=oa;null==ja||f||C.model.setCollapsed(ja,G);for(var Aa=0;Aa<va.length;Aa++)C.setAttributeForCell(ma,na[Aa],va[Aa]),null==ja||f||C.setAttributeForCell(ja,na[Aa],va[Aa]);if(null!=O&&null!=u){var sa=u[ma.getAttribute(O)];null!=sa&&(C.labelChanged(ma,sa),null==ja||f||C.cellLabelChanged(ja,sa))}if(null!=P&&null!=U){var Ia=U[ma.getAttribute(P)];null!=Ia&&(ma.style=Ia)}C.setAttributeForCell(ma,-"placeholders","1");ma.style=C.replacePlaceholders(ma,ma.style,F);null==ja||f?C.fireEvent(new mxEventObject("cellsInserted","cells",[ma])):(C.model.setStyle(ja,ma.style),0>mxUtils.indexOf(t,ja)&&t.push(ja),C.fireEvent(new mxEventObject("cellsInserted","cells",[ja])));f=null!=ja;ja=ma;if(!f)for(ua=0;ua<fa.length;ua++)E[fa[ua].to][ja.getAttribute(fa[ua].to)]=ja;null!=aa&&"link"!=aa&&(C.setLinkForCell(ja,ja.getAttribute(aa)),C.setAttributeForCell(ja,aa,null));var xa=this.editor.graph.getPreferredSizeForCell(ja);-H=null!=pa?C.model.getCell(T+va[pa]):null;if(ja.vertex){Ca=null!=H?0:Y;ha=null!=H?0:ba;null!=I&&null!=ja.getAttribute(I)&&(ja.geometry.x=Ca+parseFloat(ja.getAttribute(I)));null!=M&&null!=ja.getAttribute(M)&&(ja.geometry.y=ha+parseFloat(ja.getAttribute(M)));var Ba="@"==k.charAt(0)?ja.getAttribute(k.substring(1)):null;ja.geometry.width=null!=Ba&&"auto"!=Ba?parseFloat(ja.getAttribute(k.substring(1))):"auto"==k||"auto"==Ba?xa.width+W:parseFloat(k);var Fa="@"==v.charAt(0)?ja.getAttribute(v.substring(1)):-null;ja.geometry.height=null!=Fa&&"auto"!=Fa&&"width"!=v?parseFloat(Fa):"auto"==v||"auto"==Fa?xa.height+W:"width"==v?ja.geometry.width:parseFloat(v);Z+=ja.geometry.height+S}f?(null==z[oa]&&(z[oa]=[]),z[oa].push(ja)):(p.push(ja),null!=H?(H.style=C.replacePlaceholders(H,A,F),C.addCell(ja,H),n.push(H)):t.push(C.addCell(ja)))}for(ia=0;ia<n.length;ia++)Ba="@"==k.charAt(0)?n[ia].getAttribute(k.substring(1)):null,Fa="@"==v.charAt(0)?n[ia].getAttribute(v.substring(1)):null,"auto"!=k&&"auto"!=Ba||"auto"!=-v&&"auto"!=Fa||C.updateGroupBounds([n[ia]],W,!0);var La=t.slice(),za=t.slice();for(ua=0;ua<fa.length;ua++){var Da=fa[ua];for(ia=0;ia<p.length;ia++){ja=p[ia];var Ja=mxUtils.bind(this,function(ta,ra,la){var qa=ra.getAttribute(la.from);if(null!=qa&&""!=qa){qa=qa.split(",");for(var ya=0;ya<qa.length;ya++){var Ea=E[la.to][qa[ya]];if(null==Ea&&null!=m){Ea=new mxCell(qa[ya],new mxGeometry(Y,ba,0,0),m);Ea.style=C.replacePlaceholders(ra,Ea.style,F);var Ha=this.editor.graph.getPreferredSizeForCell(Ea);Ea.geometry.width=-Ha.width+W;Ea.geometry.height=Ha.height+W;E[la.to][qa[ya]]=Ea;Ea.vertex=!0;Ea.id=qa[ya];t.push(C.addCell(Ea))}if(null!=Ea){Ha=la.label;null!=la.fromlabel&&(Ha=(ra.getAttribute(la.fromlabel)||"")+(Ha||""));null!=la.sourcelabel&&(Ha=C.replacePlaceholders(ra,la.sourcelabel,F)+(Ha||""));null!=la.tolabel&&(Ha=(Ha||"")+(Ea.getAttribute(la.tolabel)||""));null!=la.targetlabel&&(Ha=(Ha||"")+C.replacePlaceholders(Ea,la.targetlabel,F));var Pa="target"==la.placeholders==!la.invert?Ea:ta;Pa=null!=la.style?C.replacePlaceholders(Pa,-la.style,F):C.createCurrentEdgeStyle();Ha=C.insertEdge(null,null,Ha||"",la.invert?Ea:ta,la.invert?ta:Ea,Pa);if(null!=la.labels)for(Pa=0;Pa<la.labels.length;Pa++){var Ka=la.labels[Pa],Na=new mxCell(Ka.label||Pa,new mxGeometry(null!=Ka.x?Ka.x:0,null!=Ka.y?Ka.y:0,0,0),"resizable=0;html=1;");Na.vertex=!0;Na.connectable=!1;Na.geometry.relative=!0;null!=Ka.placeholders&&(Na.value=C.replacePlaceholders("target"==Ka.placeholders==!la.invert?Ea:ta,Na.value,F));if(null!=Ka.dx||null!=Ka.dy)Na.geometry.offset=-new mxPoint(null!=Ka.dx?Ka.dx:0,null!=Ka.dy?Ka.dy:0);Ha.insert(Na)}if(null!=la.data)for(var Va in la.data)C.setAttributeForCell(Ha,Va,la.data[Va]);za.push(Ha);mxUtils.remove(la.invert?ta:Ea,La)}}}});Ja(ja,ja,Da);if(null!=z[ja.id])for(Aa=0;Aa<z[ja.id].length;Aa++)Ja(ja,z[ja.id][Aa],Da)}}if(null!=da)for(ia=0;ia<p.length;ia++)for(ja=p[ia],Aa=0;Aa<da.length;Aa++)C.setAttributeForCell(ja,mxUtils.trim(da[Aa]),null);if(0<t.length){var Ra=new mxParallelEdgeLayout(C);Ra.spacing=N;Ra.checkOverlap=!0;var Sa=+{},C=this.editor.graph,F=null,S=null,U=null,O=null,N=null,m=null,u=null,A="whiteSpace=wrap;html=1;",B=null,H=null,T="",k="auto",v="auto",G=!1,I=null,M=null,R=40,Q=40,W=100,V=0,X=mxUtils.bind(this,function(){null!=e?e(Ja):(C.setSelectionCells(Ja),C.scrollCellToVisible(C.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=C.getFreeInsertPoint(),Y=Z.x,ba=Z.y;Z=ba;var ea=null,ca="auto";H=null;for(var fa=[],aa=null,da=null,+ha=0;ha<f.length&&"#"==f[ha].charAt(0);){c=f[ha].replace(/\r$/,"");for(ha++;ha<f.length&&"\\"==c.charAt(c.length-1)&&"#"==f[ha].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(f[ha].substring(1)),ha++;if("#"!=c.charAt(1)){var na=c.indexOf(":");if(0<na){var oa=mxUtils.trim(c.substring(1,na)),ia=mxUtils.trim(c.substring(na+1));"label"==oa?ea=Graph.sanitizeHtml(ia):"labelname"==oa&&0<ia.length&&"-"!=ia?N=ia:"labels"==oa&&0<ia.length&&"-"!=ia?u=JSON.parse(ia):"style"==oa?S=ia:"parentstyle"==oa?A=+ia:"unknownStyle"==oa&&"-"!=ia?m=ia:"stylename"==oa&&0<ia.length&&"-"!=ia?O=ia:"styles"==oa&&0<ia.length&&"-"!=ia?U=JSON.parse(ia):"vars"==oa&&0<ia.length&&"-"!=ia?F=JSON.parse(ia):"identity"==oa&&0<ia.length&&"-"!=ia?B=ia:"parent"==oa&&0<ia.length&&"-"!=ia?H=ia:"namespace"==oa&&0<ia.length&&"-"!=ia?T=ia:"width"==oa?k=ia:"height"==oa?v=ia:"collapsed"==oa&&"-"!=ia?G="true"==ia:"left"==oa&&0<ia.length?I=ia:"top"==oa&&0<ia.length?M=ia:"ignore"==oa?da=ia.split(","):"connect"==oa?fa.push(JSON.parse(ia)):+"link"==oa?aa=ia:"padding"==oa?V=parseFloat(ia):"edgespacing"==oa?R=parseFloat(ia):"nodespacing"==oa?Q=parseFloat(ia):"levelspacing"==oa?W=parseFloat(ia):"layout"==oa&&(ca=ia)}}}if(null==f[ha])throw Error(mxResources.get("invalidOrMissingFile"));var va=this.editor.csvToArray(f[ha].replace(/\r$/,""));na=c=null;oa=[];for(ia=0;ia<va.length;ia++)B==va[ia]&&(c=ia),H==va[ia]&&(na=ia),oa.push(mxUtils.trim(va[ia]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ea&&(ea="%"+oa[0]+"%");+if(null!=fa)for(var ua=0;ua<fa.length;ua++)null==E[fa[ua].to]&&(E[fa[ua].to]={});B=[];for(ia=ha+1;ia<f.length;ia++){var wa=this.editor.csvToArray(f[ia].replace(/\r$/,""));if(null==wa){var Ba=40<f[ia].length?f[ia].substring(0,40)+"...":f[ia];throw Error(Ba+" ("+ia+"):\n"+mxResources.get("containsValidationErrors"));}0<wa.length&&B.push(wa)}C.model.beginUpdate();try{for(ia=0;ia<B.length;ia++){wa=B[ia];var ja=null,qa=null!=c?T+wa[c]:null;f=!1;null!=qa&&(ja=C.model.getCell(qa),f=null==ja||0<=mxUtils.indexOf(p,+ja));var la=new mxCell(ea,new mxGeometry(Y,Z,0,0),S||"whiteSpace=wrap;html=1;");la.collapsed=G;la.vertex=!0;la.id=qa;null==ja||f||C.model.setCollapsed(ja,G);for(var Ea=0;Ea<wa.length;Ea++)C.setAttributeForCell(la,oa[Ea],wa[Ea]),null==ja||f||C.setAttributeForCell(ja,oa[Ea],wa[Ea]);if(null!=N&&null!=u){var sa=u[la.getAttribute(N)];null!=sa&&(C.labelChanged(la,sa),null==ja||f||C.cellLabelChanged(ja,sa))}if(null!=O&&null!=U){var Ia=U[la.getAttribute(O)];null!=Ia&&(la.style=Ia)}C.setAttributeForCell(la,+"placeholders","1");la.style=C.replacePlaceholders(la,la.style,F);null==ja||f?C.fireEvent(new mxEventObject("cellsInserted","cells",[la])):(C.model.setStyle(ja,la.style),0>mxUtils.indexOf(t,ja)&&t.push(ja),C.fireEvent(new mxEventObject("cellsInserted","cells",[ja])));f=null!=ja;ja=la;if(!f)for(ua=0;ua<fa.length;ua++)E[fa[ua].to][ja.getAttribute(fa[ua].to)]=ja;null!=aa&&"link"!=aa&&(C.setLinkForCell(ja,ja.getAttribute(aa)),C.setAttributeForCell(ja,aa,null));var xa=this.editor.graph.getPreferredSizeForCell(ja);+H=null!=na?C.model.getCell(T+wa[na]):null;if(ja.vertex){Ba=null!=H?0:Y;ha=null!=H?0:ba;null!=I&&null!=ja.getAttribute(I)&&(ja.geometry.x=Ba+parseFloat(ja.getAttribute(I)));null!=M&&null!=ja.getAttribute(M)&&(ja.geometry.y=ha+parseFloat(ja.getAttribute(M)));var Ca="@"==k.charAt(0)?ja.getAttribute(k.substring(1)):null;ja.geometry.width=null!=Ca&&"auto"!=Ca?parseFloat(ja.getAttribute(k.substring(1))):"auto"==k||"auto"==Ca?xa.width+V:parseFloat(k);var Da="@"==v.charAt(0)?ja.getAttribute(v.substring(1)):+null;ja.geometry.height=null!=Da&&"auto"!=Da&&"width"!=v?parseFloat(Da):"auto"==v||"auto"==Da?xa.height+V:"width"==v?ja.geometry.width:parseFloat(v);Z+=ja.geometry.height+Q}f?(null==z[qa]&&(z[qa]=[]),z[qa].push(ja)):(p.push(ja),null!=H?(H.style=C.replacePlaceholders(H,A,F),C.addCell(ja,H),n.push(H)):t.push(C.addCell(ja)))}for(ia=0;ia<n.length;ia++)Ca="@"==k.charAt(0)?n[ia].getAttribute(k.substring(1)):null,Da="@"==v.charAt(0)?n[ia].getAttribute(v.substring(1)):null,"auto"!=k&&"auto"!=Ca||"auto"!=+v&&"auto"!=Da||C.updateGroupBounds([n[ia]],V,!0);var Ka=t.slice(),Ja=t.slice();for(ua=0;ua<fa.length;ua++){var Aa=fa[ua];for(ia=0;ia<p.length;ia++){ja=p[ia];var za=mxUtils.bind(this,function(ta,ra,ma){var pa=ra.getAttribute(ma.from);if(null!=pa&&""!=pa){pa=pa.split(",");for(var ya=0;ya<pa.length;ya++){var Fa=E[ma.to][pa[ya]];if(null==Fa&&null!=m){Fa=new mxCell(pa[ya],new mxGeometry(Y,ba,0,0),m);Fa.style=C.replacePlaceholders(ra,Fa.style,F);var Ha=this.editor.graph.getPreferredSizeForCell(Fa);Fa.geometry.width=+Ha.width+V;Fa.geometry.height=Ha.height+V;E[ma.to][pa[ya]]=Fa;Fa.vertex=!0;Fa.id=pa[ya];t.push(C.addCell(Fa))}if(null!=Fa){Ha=ma.label;null!=ma.fromlabel&&(Ha=(ra.getAttribute(ma.fromlabel)||"")+(Ha||""));null!=ma.sourcelabel&&(Ha=C.replacePlaceholders(ra,ma.sourcelabel,F)+(Ha||""));null!=ma.tolabel&&(Ha=(Ha||"")+(Fa.getAttribute(ma.tolabel)||""));null!=ma.targetlabel&&(Ha=(Ha||"")+C.replacePlaceholders(Fa,ma.targetlabel,F));var Pa="target"==ma.placeholders==!ma.invert?Fa:ta;Pa=null!=ma.style?C.replacePlaceholders(Pa,+ma.style,F):C.createCurrentEdgeStyle();Ha=C.insertEdge(null,null,Ha||"",ma.invert?Fa:ta,ma.invert?ta:Fa,Pa);if(null!=ma.labels)for(Pa=0;Pa<ma.labels.length;Pa++){var La=ma.labels[Pa],Na=new mxCell(La.label||Pa,new mxGeometry(null!=La.x?La.x:0,null!=La.y?La.y:0,0,0),"resizable=0;html=1;");Na.vertex=!0;Na.connectable=!1;Na.geometry.relative=!0;null!=La.placeholders&&(Na.value=C.replacePlaceholders("target"==La.placeholders==!ma.invert?Fa:ta,Na.value,F));if(null!=La.dx||null!=La.dy)Na.geometry.offset=+new mxPoint(null!=La.dx?La.dx:0,null!=La.dy?La.dy:0);Ha.insert(Na)}if(null!=ma.data)for(var Va in ma.data)C.setAttributeForCell(Ha,Va,ma.data[Va]);Ja.push(Ha);mxUtils.remove(ma.invert?ta:Fa,Ka)}}}});za(ja,ja,Aa);if(null!=z[ja.id])for(Ea=0;Ea<z[ja.id].length;Ea++)za(ja,z[ja.id][Ea],Aa)}}if(null!=da)for(ia=0;ia<p.length;ia++)for(ja=p[ia],Ea=0;Ea<da.length;Ea++)C.setAttributeForCell(ja,mxUtils.trim(da[Ea]),null);if(0<t.length){var Ra=new mxParallelEdgeLayout(C);Ra.spacing=R;Ra.checkOverlap=!0;var Sa=function(){0<Ra.spacing&&Ra.execute(C.getDefaultParent());for(var ta=0;ta<t.length;ta++){var ra=C.getCellGeometry(t[ta]);ra.x=Math.round(C.snap(ra.x));ra.y=Math.round(C.snap(ra.y));"auto"==k&&(ra.width=Math.round(C.snap(ra.width)));"auto"==v&&(ra.height=Math.round(C.snap(ra.height)))}};if("["==ca.charAt(0)){var ab=X;C.view.validate();this.executeLayouts(C.createLayouts(JSON.parse(ca)),function(){Sa();ab()});X=null}else if("circle"==ca){var db=new mxCircleLayout(C);db.disableEdgeStyle=!1;db.resetEdges=-!1;var Wa=db.isVertexIgnored;db.isVertexIgnored=function(ta){return Wa.apply(this,arguments)||0>mxUtils.indexOf(t,ta)};this.executeLayout(function(){db.execute(C.getDefaultParent());Sa()},!0,X);X=null}else if("horizontaltree"==ca||"verticaltree"==ca||"auto"==ca&&za.length==2*t.length-1&&1==La.length){C.view.validate();var Xa=new mxCompactTreeLayout(C,"horizontaltree"==ca);Xa.levelDistance=S;Xa.edgeRouting=!1;Xa.resetEdges=!1;Xa.sortEdges=!0;this.executeLayout(function(){Xa.execute(C.getDefaultParent(),-0<La.length?La[0]:null)},!0,X);X=null}else if("horizontalflow"==ca||"verticalflow"==ca||"auto"==ca&&1==La.length){C.view.validate();var Ua=new mxHierarchicalLayout(C,"horizontalflow"==ca?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ua.intraCellSpacing=S;Ua.parallelEdgeSpacing=N;Ua.interRankCellSpacing=V;Ua.disableEdgeStyle=!1;this.executeLayout(function(){Ua.execute(C.getDefaultParent(),za);C.moveCells(za,Y,ba)},!0,X);X=null}else if("orgchart"==ca){C.view.validate();var eb=new mxOrgChartLayout(C,-2,V,S),jb=eb.isVertexIgnored;eb.isVertexIgnored=function(ta){return jb.apply(this,arguments)||0>mxUtils.indexOf(t,ta)};this.executeLayout(function(){eb.execute(C.getDefaultParent());Sa()},!0,X);X=null}else if("organic"==ca||"auto"==ca&&za.length>t.length){C.view.validate();var $a=new mxFastOrganicLayout(C);$a.forceConstant=3*S;$a.disableEdgeStyle=!1;$a.resetEdges=!1;var ka=$a.isVertexIgnored;$a.isVertexIgnored=function(ta){return ka.apply(this,arguments)||0>mxUtils.indexOf(t,ta)};this.executeLayout(function(){$a.execute(C.getDefaultParent());+!1;var Wa=db.isVertexIgnored;db.isVertexIgnored=function(ta){return Wa.apply(this,arguments)||0>mxUtils.indexOf(t,ta)};this.executeLayout(function(){db.execute(C.getDefaultParent());Sa()},!0,X);X=null}else if("horizontaltree"==ca||"verticaltree"==ca||"auto"==ca&&Ja.length==2*t.length-1&&1==Ka.length){C.view.validate();var Xa=new mxCompactTreeLayout(C,"horizontaltree"==ca);Xa.levelDistance=Q;Xa.edgeRouting=!1;Xa.resetEdges=!1;Xa.sortEdges=!0;this.executeLayout(function(){Xa.execute(C.getDefaultParent(),+0<Ka.length?Ka[0]:null)},!0,X);X=null}else if("horizontalflow"==ca||"verticalflow"==ca||"auto"==ca&&1==Ka.length){C.view.validate();var Ua=new mxHierarchicalLayout(C,"horizontalflow"==ca?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ua.intraCellSpacing=Q;Ua.parallelEdgeSpacing=R;Ua.interRankCellSpacing=W;Ua.disableEdgeStyle=!1;this.executeLayout(function(){Ua.execute(C.getDefaultParent(),Ja);C.moveCells(Ja,Y,ba)},!0,X);X=null}else if("orgchart"==ca){C.view.validate();var eb=new mxOrgChartLayout(C,+2,W,Q),jb=eb.isVertexIgnored;eb.isVertexIgnored=function(ta){return jb.apply(this,arguments)||0>mxUtils.indexOf(t,ta)};this.executeLayout(function(){eb.execute(C.getDefaultParent());Sa()},!0,X);X=null}else if("organic"==ca||"auto"==ca&&Ja.length>t.length){C.view.validate();var $a=new mxFastOrganicLayout(C);$a.forceConstant=3*Q;$a.disableEdgeStyle=!1;$a.resetEdges=!1;var ka=$a.isVertexIgnored;$a.isVertexIgnored=function(ta){return ka.apply(this,arguments)||0>mxUtils.indexOf(t,ta)};this.executeLayout(function(){$a.execute(C.getDefaultParent());Sa()},!0,X);X=null}}this.hideDialog()}finally{C.model.endUpdate()}null!=X&&X()}}catch(ta){this.handleError(ta)}};EditorUi.prototype.getSearch=function(c){var e="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var f="?",p;for(p in urlParams)0>mxUtils.indexOf(c,p)&&null!=urlParams[p]&&(e+=f+p+"="+urlParams[p],f="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var e=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var f="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),p;for(p in urlParams)0>mxUtils.indexOf(f,p)&&(c=0==e?c+"?":c+"&",null!=urlParams[p]&&(c+=p+"="+urlParams[p],e++))}return c};EditorUi.prototype.showLinkDialog=function(c,e,f,p,n){c=new LinkDialog(this,c,e,f,!0,p,n);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var e=1;null==this.drive&&"function"!==typeof window.DriveClient||e++;null==this.dropbox&&"function"!==typeof window.DropboxClient||e++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||e++;null!=this.gitHub&&e++;null!=this.gitLab&&e++;c&&isLocalStorage&&"1"==urlParams.browser&&e++;return e};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(e);@@ -13513,81 +13513,82 @@ EditorUi.prototype.updateActionStates=function(){L.apply(this,arguments);var c=tthis.actions.get("editConnectionPoints").setEnabled(p&&0==f.edges.length&&1==f.vertices.length);this.actions.get("editImage").setEnabled(p&&f.image&&0<f.cells.length);this.actions.get("crop").setEnabled(p&&f.image&&0<f.cells.length);this.actions.get("pageSetup").setEnabled(p);this.actions.get("shadowVisible").setEnabled(p);this.actions.get("connectionArrows").setEnabled(p);this.actions.get("connectionPoints").setEnabled(p);this.actions.get("copyStyle").setEnabled(p&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&p&&0<f.cells.length);this.actions.get("editGeometry").setEnabled(0<f.vertices.length);this.actions.get("createShape").setEnabled(p);this.actions.get("createRevision").setEnabled(p);this.actions.get("moveToFolder").setEnabled(null!=e);this.actions.get("makeCopy").setEnabled(null!=e&&!e.isRestricted());this.actions.get("editDiagram").setEnabled(p&&(null==e||!e.isRestricted()));this.actions.get("publishLink").setEnabled(null!=e&&!e.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=e&&e.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=e);this.actions.get("properties").setEnabled(null!=e);this.menus.get("publish").setEnabled(null!=-e&&!e.isRestricted());e=this.actions.get("findReplace");e.setEnabled("hidden"!=this.diagramContainer.style.visibility);e.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(p&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=-null);Q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,f,p,n,t,z,E){var C=c.editor.graph;if("xml"==f)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==f)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(C.getSvg(p,n,t)),"image/svg+xml");else{var F=c.getFileData(!0,null,null,null,null,!0),R=C.getGraphBounds(),U=Math.floor(R.width*n/C.view.scale),P=Math.floor(R.height*-n/C.view.scale);if(F.length<=MAX_REQUEST_SIZE&&U*P<MAX_AREA)if(c.hideDialog(),"png"!=f&&"jpg"!=f&&"jpeg"!=f||!c.isExportToCanvas()){var O={globalVars:C.getExportVariables()};E&&(O.grid={size:C.gridSize,steps:C.view.gridSteps,color:C.view.gridColor});c.saveRequest(e,f,function(m,u){return new mxXmlRequest(EXPORT_URL,"format="+f+"&base64="+(u||"0")+(null!=m?"&filename="+encodeURIComponent(m):"")+"&extras="+encodeURIComponent(JSON.stringify(O))+(0<z?"&dpi="+z:"")+"&bg="+(null!=p?p:"none")+"&w="+U+"&h="+-P+"&border="+t+"&xml="+encodeURIComponent(F))})}else"png"==f?c.exportImage(n,null==p||"none"==p,!0,!1,!1,t,!0,!1,null,E,z):c.exportImage(n,!1,!0,!1,!1,t,!0,!1,"jpeg",E);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,e="";if(null!=this.pages)for(var f=0;f<this.pages.length;f++){var p=c;this.currentPage!=this.pages[f]&&(p=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[f]),+e&&!e.isRestricted());e=this.actions.get("findReplace");e.setEnabled("hidden"!=this.diagramContainer.style.visibility);e.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(p&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var P=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=+null);P.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,f,p,n,t,z,E){var C=c.editor.graph;if("xml"==f)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==f)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(C.getSvg(p,n,t)),"image/svg+xml");else{var F=c.getFileData(!0,null,null,null,null,!0),S=C.getGraphBounds(),U=Math.floor(S.width*n/C.view.scale),O=Math.floor(S.height*+n/C.view.scale);if(F.length<=MAX_REQUEST_SIZE&&U*O<MAX_AREA)if(c.hideDialog(),"png"!=f&&"jpg"!=f&&"jpeg"!=f||!c.isExportToCanvas()){var N={globalVars:C.getExportVariables()};E&&(N.grid={size:C.gridSize,steps:C.view.gridSteps,color:C.view.gridColor});c.saveRequest(e,f,function(m,u){return new mxXmlRequest(EXPORT_URL,"format="+f+"&base64="+(u||"0")+(null!=m?"&filename="+encodeURIComponent(m):"")+"&extras="+encodeURIComponent(JSON.stringify(N))+(0<z?"&dpi="+z:"")+"&bg="+(null!=p?p:"none")+"&w="+U+"&h="++O+"&border="+t+"&xml="+encodeURIComponent(F))})}else"png"==f?c.exportImage(n,null==p||"none"==p,!0,!1,!1,t,!0,!1,null,E,z):c.exportImage(n,!1,!0,!1,!1,t,!0,!1,"jpeg",E);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,e="";if(null!=this.pages)for(var f=0;f<this.pages.length;f++){var p=c;this.currentPage!=this.pages[f]&&(p=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[f]),p.model.setRoot(this.pages[f].root));e+=this.pages[f].getName()+" "+p.getIndexableText()+" "}else e=c.getIndexableText();this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var e={},f=document.createElement("div");f.style.whiteSpace="nowrap";var p=document.createElement("h3");mxUtils.write(p,mxUtils.htmlEntities(c));p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(p);var n=document.createElement("div");n.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";n.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var t={};try{var z=mxSettings.getCustomLibraries();for(c=0;c<z.length;c++){var E=z[c];if("R"==E.substring(0,1)){var C=JSON.parse(decodeURIComponent(E.substring(1)));t[C[0]]={id:C[0],title:C[1],downloadUrl:C[2]}}}}catch(F){}this.remoteInvoke("getCustomLibraries",null,null,function(F){n.innerText="";if(0==F.length)n.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+-mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var R=0;R<F.length;R++){var U=F[R];t[U.id]&&(e[U.id]=U);var P=this.addCheckbox(n,U.title,t[U.id]);(function(O,m){mxEvent.addListener(m,"change",function(){this.checked?e[O.id]=O:delete e[O.id]})})(U,P)}},mxUtils.bind(this,function(F){n.innerText="";var R=document.createElement("div");R.style.padding="8px";R.style.textAlign="center";mxUtils.write(R,mxResources.get("error")+": ");mxUtils.write(R,null!=F&&null!=F.message?F.message:-mxResources.get("unknownError"));n.appendChild(R)}));f.appendChild(n);f=new CustomDialog(this,f,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var F=0,R;for(R in e)null==t[R]&&(F++,mxUtils.bind(this,function(U){this.remoteInvoke("getFileContent",[U.downloadUrl],null,mxUtils.bind(this,function(P){F--;0==F&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,P,U)),this.showSidebar()}catch(O){this.handleError(O,mxResources.get("errorLoadingFile"))}}),-mxUtils.bind(this,function(){F--;0==F&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[R]));for(R in t)e[R]||this.closeLibrary(new RemoteLibrary(this,null,t[R]));0==F&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(f.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var S=0;S<F.length;S++){var U=F[S];t[U.id]&&(e[U.id]=U);var O=this.addCheckbox(n,U.title,t[U.id]);(function(N,m){mxEvent.addListener(m,"change",function(){this.checked?e[N.id]=N:delete e[N.id]})})(U,O)}},mxUtils.bind(this,function(F){n.innerText="";var S=document.createElement("div");S.style.padding="8px";S.style.textAlign="center";mxUtils.write(S,mxResources.get("error")+": ");mxUtils.write(S,null!=F&&null!=F.message?F.message:+mxResources.get("unknownError"));n.appendChild(S)}));f.appendChild(n);f=new CustomDialog(this,f,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var F=0,S;for(S in e)null==t[S]&&(F++,mxUtils.bind(this,function(U){this.remoteInvoke("getFileContent",[U.downloadUrl],null,mxUtils.bind(this,function(O){F--;0==F&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,O,U)),this.showSidebar()}catch(N){this.handleError(N,mxResources.get("errorLoadingFile"))}}),+mxUtils.bind(this,function(){F--;0==F&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[S]));for(S in t)e[S]||this.closeLibrary(new RemoteLibrary(this,null,t[S]));0==F&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(f.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var e=0;e<this.remoteInvokeQueue.length;e++)c.postMessage(this.remoteInvokeQueue[e],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var e=c.msgMarkers,f=this.remoteInvokeCallbacks[e.callbackId];if(null==f)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?f.error&&f.error(c.error.errResp):f.callback&&f.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,f,p,n){var t=!0,z=window.setTimeout(mxUtils.bind(this,function(){t=!1;n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),E=mxUtils.bind(this,function(){window.clearTimeout(z);t&&p.apply(this,arguments)}),C=mxUtils.bind(this,-function(){window.clearTimeout(z);t&&n.apply(this,arguments)});f=f||{};f.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:E,error:C});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:f});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var f=mxUtils.bind(this,function(F,R){var U={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=R?-U.error={errResp:R}:null!=F&&(U.resp=F);this.remoteWin.postMessage(JSON.stringify(U),"*")});try{var p=c.funtionName,n=this.remoteInvokableFns[p];if(null!=n&&"function"===typeof this[p]){if(n.allowedDomains){for(var t=!1,z=0;z<n.allowedDomains.length;z++)if(e=="https://"+n.allowedDomains[z]){t=!0;break}if(!t){f(null,"Invalid Call: "+p+" is not allowed.");return}}var E=c.functionArgs;Array.isArray(E)||(E=[]);if(n.isAsync)E.push(function(){f(Array.prototype.slice.apply(arguments))}),E.push(function(F){f(null,+function(){window.clearTimeout(z);t&&n.apply(this,arguments)});f=f||{};f.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:E,error:C});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:f});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var f=mxUtils.bind(this,function(F,S){var U={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=S?+U.error={errResp:S}:null!=F&&(U.resp=F);this.remoteWin.postMessage(JSON.stringify(U),"*")});try{var p=c.funtionName,n=this.remoteInvokableFns[p];if(null!=n&&"function"===typeof this[p]){if(n.allowedDomains){for(var t=!1,z=0;z<n.allowedDomains.length;z++)if(e=="https://"+n.allowedDomains[z]){t=!0;break}if(!t){f(null,"Invalid Call: "+p+" is not allowed.");return}}var E=c.functionArgs;Array.isArray(E)||(E=[]);if(n.isAsync)E.push(function(){f(Array.prototype.slice.apply(arguments))}),E.push(function(F){f(null,F||"Unkown Error")}),this[p].apply(this,E);else{var C=this[p].apply(this,E);f([C])}}else f(null,"Invalid Call: "+p+" is not found.")}catch(F){f(null,"Invalid Call: An error occurred, "+F.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var f=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=f)try{var p=f.open("database",2);p.onupgradeneeded=function(n){try{var t=p.result;1>n.oldVersion&&t.createObjectStore("objects",{keyPath:"key"});2>n.oldVersion&&(t.createObjectStore("files",{keyPath:"title"}),t.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(z){null!=e&&e(z)}};p.onsuccess=mxUtils.bind(this,function(n){try{var t=p.result;this.database=t;EditorUi.migrateStorageFiles&&(StorageFile.migrate(t),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(z){if(!z||-"1"==urlParams.forceMigration){var E=document.createElement("iframe");E.style.display="none";E.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(E);var C=!0,F=!1,R,U=0,P=mxUtils.bind(this,function(){F=!0;this.setDatabaseItem(".drawioMigrated3",!0);E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),O=mxUtils.bind(this,function(){U++;m()}),m=mxUtils.bind(this,function(){try{if(U>=-R.length)P();else{var A=R[U];StorageFile.getFileContent(this,A,mxUtils.bind(this,function(B){null==B||".scratchpad"==A&&B==this.emptyLibraryXml?E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[A]}),"*"):O()}),O)}}catch(B){console.log(B)}}),u=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}],O,O,["filesInfo","files"])}catch(B){console.log(B)}});-z=mxUtils.bind(this,function(A){try{if(A.source==E.contentWindow){var B={};try{B=JSON.parse(A.data)}catch(H){}"init"==B.event?(E.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=B.event||F||(C?null!=B.resp&&0<B.resp.length&&null!=B.resp[0]?(R=B.resp[0],C=!1,m()):P():null!=B.resp&&0<B.resp.length&&null!=B.resp[0]?u(B.resp[0]):O())}}catch(H){console.log(H)}});+"1"==urlParams.forceMigration){var E=document.createElement("iframe");E.style.display="none";E.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(E);var C=!0,F=!1,S,U=0,O=mxUtils.bind(this,function(){F=!0;this.setDatabaseItem(".drawioMigrated3",!0);E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),N=mxUtils.bind(this,function(){U++;m()}),m=mxUtils.bind(this,function(){try{if(U>=+S.length)O();else{var A=S[U];StorageFile.getFileContent(this,A,mxUtils.bind(this,function(B){null==B||".scratchpad"==A&&B==this.emptyLibraryXml?E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[A]}),"*"):N()}),N)}}catch(B){console.log(B)}}),u=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}],N,N,["filesInfo","files"])}catch(B){console.log(B)}});+z=mxUtils.bind(this,function(A){try{if(A.source==E.contentWindow){var B={};try{B=JSON.parse(A.data)}catch(H){}"init"==B.event?(E.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=B.event||F||(C?null!=B.resp&&0<B.resp.length&&null!=B.resp[0]?(S=B.resp[0],C=!1,m()):O():null!=B.resp&&0<B.resp.length&&null!=B.resp[0]?u(B.resp[0]):N())}}catch(H){console.log(H)}});window.addEventListener("message",z)}})));c(t);t.onversionchange=function(){t.close()}}catch(z){null!=e?e(z):null!=window.console&&console.warn(z)}});p.onerror=e;p.onblocked=function(){}}catch(n){null!=e?e(n):null!=window.console&&console.error(n)}else null!=e&&e(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,e,f,p,n){this.openDatabase(mxUtils.bind(this,function(t){try{n=n||"objects";Array.isArray(n)||(n=[n],c=[c],e=[e]);var z=t.transaction(n,"readwrite");z.oncomplete=f;z.onerror=p;for(t=0;t<n.length;t++)z.objectStore(n[t]).put(null!=c&&null!=c[t]?{key:c[t],data:e[t]}:e[t])}catch(E){null!=p&&p(E)}}),p)};EditorUi.prototype.removeDatabaseItem=function(c,e,f,p){this.openDatabase(mxUtils.bind(this,function(n){try{p=p||"objects";Array.isArray(p)||(p=[p],c=[c]);var t=n.transaction(p,"readwrite");t.oncomplete=e;t.onerror=f;for(n=0;n<p.length;n++)t.objectStore(p[n]).delete(c[n])}catch(z){null!=f&&f(z)}}),f)};EditorUi.prototype.getDatabaseItem=function(c,e,f,p){this.openDatabase(mxUtils.bind(this,function(n){try{p=p||"objects";var t=n.transaction([p],"readonly").objectStore(p).get(c);t.onsuccess=function(){e(t.result)};t.onerror=f}catch(z){null!=f&&f(z)}}),f)};EditorUi.prototype.getDatabaseItems=function(c,e,f){this.openDatabase(mxUtils.bind(this,function(p){try{f=f||"objects";var n=p.transaction([f],"readonly").objectStore(f).openCursor(IDBKeyRange.lowerBound(0)),t=[];n.onsuccess=function(z){null==z.target.result?c(t):(t.push(z.target.result.value),z.target.result.continue())};n.onerror=e}catch(z){null!=e&&e(z)}}),e)};EditorUi.prototype.getDatabaseItemKeys=function(c,e,f){this.openDatabase(mxUtils.bind(this,function(p){try{f=f||"objects";var n=p.transaction([f],"readonly").objectStore(f).getAllKeys();n.onsuccess=function(){c(n.result)};n.onerror=e}catch(t){null!=e&&e(t)}}),e)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,e){var f=this.getCurrentFile();null!=f?f.getComments(c,e):c([])};EditorUi.prototype.addComment=function(c,e,f){var p=this.getCurrentFile();null!=p?p.addComment(c,e,f):e(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,e){var f=this.getCurrentFile();return null!=f?f.newComment(c,e):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,e)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,e){var f=this.getCurrentFile();null!=-f&&f.getRevisions?f.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,f,p,n,t,z,E){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");-return this.editor.loadUrl(c,e,f,p,n,t,z,E)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");-return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,f,p,n,t,z,E,C,F,R,U,P,O,m,u){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,f,p,n,t,z,E,C,F,R,U,P,O,m,u)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,f,p){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");-return this.editor.convertImages(c,e,f,p)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,e)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,e,f,p){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,e,f,p)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");-return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,e,f,p,n){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,e,f,p,n)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],e=0;e<localStorage.length;e++){var f=localStorage.key(e),p=localStorage.getItem(f);if(0<f.length&&(".scratchpad"==f||"."!=f.charAt(0))&&0<p.length){var n=-"<mxfile "===p.substring(0,8)||"<?xml"===p.substring(0,5)||"\x3c!--[if IE]>"===p.substring(0,12);p="<mxlibrary>"===p.substring(0,11);(n||p)&&c.push(f)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var e=localStorage.getItem(c);return{title:c,data:e,isLib:"<mxlibrary>"===e.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();+f&&f.getRevisions?f.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language",+"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,f,p,n,t,z,E){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,e,f,p,n,t,z,E)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");+return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,f,p,n,t,z,E,C,F,S,U,O,N,m,u){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,f,p,n,t,z,E,C,F,S,U,O,N,m,u)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");+return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,f,p){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,e,f,p)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,e)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=+function(c,e,f,p){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,e,f,p)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,e,f,p,n){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,e,f,p,n)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=+urlParams.forceMigration)return null;for(var c=[],e=0;e<localStorage.length;e++){var f=localStorage.key(e),p=localStorage.getItem(f);if(0<f.length&&(".scratchpad"==f||"."!=f.charAt(0))&&0<p.length){var n="<mxfile "===p.substring(0,8)||"<?xml"===p.substring(0,5)||"\x3c!--[if IE]>"===p.substring(0,12);p="<mxlibrary>"===p.substring(0,11);(n||p)&&c.push(f)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;+var e=localStorage.getItem(c);return{title:c,data:e,isLib:"<mxlibrary>"===e.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();var CommentsWindow=function(b,g,l,d,q,y){function x(){for(var m=z.getElementsByTagName("div"),u=0,A=0;A<m.length;A++)"none"!=m[A].style.display&&m[A].parentNode==z&&u++;E.style.display=0==u?"block":"none"}function D(m,u,A,B){function H(){u.removeChild(v);u.removeChild(G);k.style.display="block";T.style.display="block"}p={div:u,comment:m,saveCallback:A,deleteOnCancel:B};var T=u.querySelector(".geCommentTxt"),k=u.querySelector(".geCommentActionsList"),v=document.createElement("textarea");v.className="geCommentEditTxtArea";v.style.minHeight=T.offsetHeight+"px";v.value=m.content;u.insertBefore(v,T);var G=document.createElement("div");G.className="geCommentEditBtns";var I=mxUtils.button(mxResources.get("cancel"),function(){B?(u.parentNode.removeChild(u),x()):H();p=null});I.className="geCommentEditBtn";G.appendChild(I);var M=mxUtils.button(mxResources.get("save"),function(){T.innerText="";m.content=v.value;mxUtils.write(T,m.content);H();A(m);p=null});mxEvent.addListener(v,"keydown",mxUtils.bind(this,-function(N){mxEvent.isConsumed(N)||((mxEvent.isControlDown(N)||mxClient.IS_MAC&&mxEvent.isMetaDown(N))&&13==N.keyCode?(M.click(),mxEvent.consume(N)):27==N.keyCode&&(I.click(),mxEvent.consume(N)))}));M.focus();M.className="geCommentEditBtn gePrimaryBtn";G.appendChild(M);u.insertBefore(G,T);k.style.display="none";T.style.display="none";v.focus()}function J(m,u){u.innerText="";m=new Date(m.modifiedDate);var A=b.timeSince(m);null==A&&(A=mxResources.get("lessThanAMinute"));mxUtils.write(u,mxResources.get("timeAgo",-[A],"{1} ago"));u.setAttribute("title",m.toLocaleDateString()+" "+m.toLocaleTimeString())}function K(m){var u=document.createElement("img");u.className="geCommentBusyImg";u.src=IMAGE_PATH+"/spin.gif";m.appendChild(u);m.busyImg=u}function L(m){m.style.border="1px solid red";m.busyImg.parentNode==m&&m.removeChild(m.busyImg)}function Q(m){m.style.border="";m.busyImg.parentNode==m&&m.removeChild(m.busyImg)}function c(m,u,A,B,H){function T(V,W,X){var Z=document.createElement("li");Z.className="geCommentAction";-var Y=document.createElement("a");Y.className="geCommentActionLnk";mxUtils.write(Y,V);Z.appendChild(Y);mxEvent.addListener(Y,"click",function(ba){W(ba,m);ba.preventDefault();mxEvent.consume(ba)});S.appendChild(Z);X&&(Z.style.display="none")}function k(){function V(Z){W.push(X);if(null!=Z.replies)for(var Y=0;Y<Z.replies.length;Y++)X=X.nextSibling,V(Z.replies[Y])}var W=[],X=G;V(m);return{pdiv:X,replies:W}}function v(V,W,X,Z,Y){function ba(){K(aa);m.addReply(fa,function(da){fa.id=da;m.replies.push(fa);-Q(aa);X&&X()},function(da){ea();L(aa);b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,Y)}function ea(){D(fa,aa,function(da){ba()},!0)}var ca=k().pdiv,fa=b.newComment(V,b.getCurrentUser());fa.pCommentId=m.id;null==m.replies&&(m.replies=[]);var aa=c(fa,m.replies,ca,B+1);W?ea():ba()}if(H||!m.isResolved){E.style.display="none";var G=document.createElement("div");G.className="geCommentContainer";G.setAttribute("data-commentId",m.id);G.style.marginLeft=20*B+5+-"px";m.isResolved&&(n.style.opacity="0.7");var I=document.createElement("div");I.className="geCommentHeader";var M=document.createElement("img");M.className="geCommentUserImg";M.src=null!=m.user&&null!=m.user.pictureUrl?m.user.pictureUrl:Editor.userImage;I.appendChild(M);M=document.createElement("div");M.className="geCommentHeaderTxt";I.appendChild(M);var N=document.createElement("div");N.className="geCommentUsername";mxUtils.write(N,null!=m.user?m.user.displayName:mxResources.get("unknownUser"));-M.appendChild(N);N=document.createElement("div");N.className="geCommentDate";N.setAttribute("data-commentId",m.id);J(m,N);M.appendChild(N);G.appendChild(I);I=document.createElement("div");I.className="geCommentTxt";mxUtils.write(I,m.content||"");G.appendChild(I);m.isLocked&&(G.style.opacity="0.5");I=document.createElement("div");I.className="geCommentActions";var S=document.createElement("ul");S.className="geCommentActionsList";I.appendChild(S);e||m.isLocked||0!=B&&!f||T(mxResources.get("reply"),-function(){v("",!0)},m.isResolved);M=b.getCurrentUser();null==M||null==m.user||M.id!=m.user.id||e||m.isLocked||(T(mxResources.get("edit"),function(){function V(){D(m,G,function(){K(G);m.editComment(m.content,function(){Q(G)},function(W){L(G);V();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}V()},m.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){K(G);m.deleteComment(function(V){if(!0===V){V=G.querySelector(".geCommentTxt");-V.innerText="";mxUtils.write(V,mxResources.get("msgDeleted"));var W=G.querySelectorAll(".geCommentAction");for(V=0;V<W.length;V++)W[V].parentNode.removeChild(W[V]);Q(G);G.style.opacity="0.5"}else{W=k(m).replies;for(V=0;V<W.length;V++)z.removeChild(W[V]);for(V=0;V<u.length;V++)if(u[V]==m){u.splice(V,1);break}E.style.display=0==z.getElementsByTagName("div").length?"block":"none"}},function(V){L(G);b.handleError(V,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},m.isResolved));-e||m.isLocked||0!=B||T(m.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(V){function W(){var X=V.target;X.innerText="";m.isResolved=!m.isResolved;mxUtils.write(X,m.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=m.isResolved?"none":"",Y=k(m).replies,ba="light-dark("+(m.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<Y.length;ea++){Y[ea].style.backgroundColor=ba;for(var ca=Y[ea].querySelectorAll(".geCommentAction"),fa=0;fa<ca.length;fa++)ca[fa]!=-X.parentNode&&(ca[fa].style.display=Z);U||(Y[ea].style.display="none")}x()}m.isResolved?v(mxResources.get("reOpened")+": ",!0,W,!1,!0):v(mxResources.get("markedAsResolved"),!1,W,!0)});G.appendChild(I);null!=A?z.insertBefore(G,A.nextSibling):z.appendChild(G);for(A=0;null!=m.replies&&A<m.replies.length;A++)I=m.replies[A],I.isResolved=m.isResolved,c(I,m.replies,null,B+1,H);null!=p&&(p.comment.id==m.id?(H=m.content,m.content=p.comment.content,D(m,G,p.saveCallback,p.deleteOnCancel),m.content=H):null==+function(R){mxEvent.isConsumed(R)||((mxEvent.isControlDown(R)||mxClient.IS_MAC&&mxEvent.isMetaDown(R))&&13==R.keyCode?(M.click(),mxEvent.consume(R)):27==R.keyCode&&(I.click(),mxEvent.consume(R)))}));M.focus();M.className="geCommentEditBtn gePrimaryBtn";G.appendChild(M);u.insertBefore(G,T);k.style.display="none";T.style.display="none";v.focus()}function J(m,u){u.innerText="";m=new Date(m.modifiedDate);var A=b.timeSince(m);null==A&&(A=mxResources.get("lessThanAMinute"));mxUtils.write(u,mxResources.get("timeAgo",+[A],"{1} ago"));u.setAttribute("title",m.toLocaleDateString()+" "+m.toLocaleTimeString())}function K(m){var u=document.createElement("img");u.className="geCommentBusyImg";u.src=IMAGE_PATH+"/spin.gif";m.appendChild(u);m.busyImg=u}function L(m){m.style.border="1px solid red";m.busyImg.parentNode==m&&m.removeChild(m.busyImg)}function P(m){m.style.border="";m.busyImg.parentNode==m&&m.removeChild(m.busyImg)}function c(m,u,A,B,H){function T(W,V,X){var Z=document.createElement("li");Z.className="geCommentAction";+var Y=document.createElement("a");Y.className="geCommentActionLnk";mxUtils.write(Y,W);Z.appendChild(Y);mxEvent.addListener(Y,"click",function(ba){V(ba,m);ba.preventDefault();mxEvent.consume(ba)});Q.appendChild(Z);X&&(Z.style.display="none")}function k(){function W(Z){V.push(X);if(null!=Z.replies)for(var Y=0;Y<Z.replies.length;Y++)X=X.nextSibling,W(Z.replies[Y])}var V=[],X=G;W(m);return{pdiv:X,replies:V}}function v(W,V,X,Z,Y){function ba(){K(aa);m.addReply(fa,function(da){fa.id=da;m.replies.push(fa);+P(aa);X&&X()},function(da){ea();L(aa);b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,Y)}function ea(){D(fa,aa,function(da){ba()},!0)}var ca=k().pdiv,fa=b.newComment(W,b.getCurrentUser());fa.pCommentId=m.id;null==m.replies&&(m.replies=[]);var aa=c(fa,m.replies,ca,B+1);V?ea():ba()}if(H||!m.isResolved){E.style.display="none";var G=document.createElement("div");G.className="geCommentContainer";G.setAttribute("data-commentId",m.id);G.style.marginLeft=20*B+5++"px";m.isResolved&&(n.style.opacity="0.7");var I=document.createElement("div");I.className="geCommentHeader";var M=document.createElement("img");M.className="geCommentUserImg";M.src=null!=m.user&&null!=m.user.pictureUrl?m.user.pictureUrl:Editor.userImage;I.appendChild(M);M=document.createElement("div");M.className="geCommentHeaderTxt";I.appendChild(M);var R=document.createElement("div");R.className="geCommentUsername";mxUtils.write(R,null!=m.user?m.user.displayName:mxResources.get("unknownUser"));+M.appendChild(R);R=document.createElement("div");R.className="geCommentDate";R.setAttribute("data-commentId",m.id);J(m,R);M.appendChild(R);G.appendChild(I);I=document.createElement("div");I.className="geCommentTxt";mxUtils.write(I,m.content||"");G.appendChild(I);m.isLocked&&(G.style.opacity="0.5");I=document.createElement("div");I.className="geCommentActions";var Q=document.createElement("ul");Q.className="geCommentActionsList";I.appendChild(Q);e||m.isLocked||0!=B&&!f||T(mxResources.get("reply"),+function(){v("",!0)},m.isResolved);M=b.getCurrentUser();null==M||null==m.user||M.id!=m.user.id||e||m.isLocked||(T(mxResources.get("edit"),function(){function W(){D(m,G,function(){K(G);m.editComment(m.content,function(){P(G)},function(V){L(G);W();b.handleError(V,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}W()},m.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){K(G);m.deleteComment(function(W){if(!0===W){W=G.querySelector(".geCommentTxt");+W.innerText="";mxUtils.write(W,mxResources.get("msgDeleted"));var V=G.querySelectorAll(".geCommentAction");for(W=0;W<V.length;W++)V[W].parentNode.removeChild(V[W]);P(G);G.style.opacity="0.5"}else{V=k(m).replies;for(W=0;W<V.length;W++)z.removeChild(V[W]);for(W=0;W<u.length;W++)if(u[W]==m){u.splice(W,1);break}E.style.display=0==z.getElementsByTagName("div").length?"block":"none"}},function(W){L(G);b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},m.isResolved));+e||m.isLocked||0!=B||T(m.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(W){function V(){var X=W.target;X.innerText="";m.isResolved=!m.isResolved;mxUtils.write(X,m.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=m.isResolved?"none":"",Y=k(m).replies,ba="light-dark("+(m.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<Y.length;ea++){Y[ea].style.backgroundColor=ba;for(var ca=Y[ea].querySelectorAll(".geCommentAction"),fa=0;fa<ca.length;fa++)ca[fa]!=+X.parentNode&&(ca[fa].style.display=Z);U||(Y[ea].style.display="none")}x()}m.isResolved?v(mxResources.get("reOpened")+": ",!0,V,!1,!0):v(mxResources.get("markedAsResolved"),!1,V,!0)});G.appendChild(I);null!=A?z.insertBefore(G,A.nextSibling):z.appendChild(G);for(A=0;null!=m.replies&&A<m.replies.length;A++)I=m.replies[A],I.isResolved=m.isResolved,c(I,m.replies,null,B+1,H);null!=p&&(p.comment.id==m.id?(H=m.content,m.content=p.comment.content,D(m,G,p.saveCallback,p.deleteOnCancel),m.content=H):null==p.comment.id&&p.comment.pCommentId==m.id&&(z.appendChild(p.div),D(p.comment,p.div,p.saveCallback,p.deleteOnCancel)));return G}}var e=!b.canComment(),f=b.canReplyToReplies(),p=null,n=document.createElement("div");n.className="geCommentsWin";n.style.background="light-dark(whiteSmoke, "+Editor.darkColor+")";var t=EditorUi.compactUi?"26px":"30px",z=document.createElement("div");z.className="geCommentsList";z.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+")";z.style.bottom=parseInt(t)+7+"px";n.appendChild(z);var E=document.createElement("span");E.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(E,mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=t;C.style.padding="3px 4px 4px 4px";t=document.createElement("a");t.className="geToolbarButton geAdaptiveAsset geToggleItem";t.style.width="16px";t.style.height="18px";t.style.backgroundPosition="center center";t.style.backgroundRepeat=-"no-repeat";t.style.backgroundSize="20px";t.style.margin="0 2px";t.style.display="inline-block";t.style.cursor="pointer";if(!e){var F=t.cloneNode();F.style.backgroundImage="url("+Editor.plusImage+")";F.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(F,"click",function(m){function u(){D(A,B,function(H){K(B);b.addComment(H,function(T){H.id=T;P.push(H);Q(B)},function(T){L(B);u();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var A=-b.newComment("",b.getCurrentUser()),B=c(A,P,null,0);u();m.preventDefault();mxEvent.consume(m)});C.appendChild(F)}var R=t.cloneNode();R.classList.add("geToggleItem");R.style.backgroundImage="url("+Editor.checkImage+")";R.setAttribute("title",mxResources.get("showResolved"));var U=!1;mxEvent.addListener(R,"click",function(m){(U=!U)?R.classList.add("geActiveItem"):R.classList.remove("geActiveItem");O();m.preventDefault();mxEvent.consume(m)});C.appendChild(R);b.commentsRefreshNeeded()&&(F=t.cloneNode(),-F.style.backgroundImage="url("+Editor.refreshImage+")",F.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(F,"click",function(m){O();m.preventDefault();mxEvent.consume(m)}),C.appendChild(F));b.commentsSaveNeeded()&&(t=t.cloneNode(),t.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',t.setAttribute("title",mxResources.get("save")),t.className="geButton geAdaptiveAsset",mxEvent.addListener(t,"click",function(m){y();m.preventDefault();mxEvent.consume(m)}),-C.appendChild(t));n.appendChild(C);var P=[],O=mxUtils.bind(this,function(){this.hasError=!1;if(null!=p)try{p.div=p.div.cloneNode(!0);var m=p.div.querySelector(".geCommentEditTxtArea"),u=p.div.querySelector(".geCommentEditBtns");p.comment.content=m.value;m.parentNode.removeChild(m);u.parentNode.removeChild(u)}catch(A){b.handleError(A)}z.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+-"...</div>";f=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(A){function B(H){if(null!=H){H.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});for(var T=0;T<H.length;T++)B(H[T].replies)}}A.sort(function(H,T){return new Date(H.modifiedDate)-new Date(T.modifiedDate)});z.innerText="";z.appendChild(E);E.style.display="block";P=A;for(A=0;A<P.length;A++)B(P[A].replies),c(P[A],P,null,0,U);null!=p&&null==p.comment.id&&null==p.comment.pCommentId&&(z.appendChild(p.div),-D(p.comment,p.div,p.saveCallback,p.deleteOnCancel))},mxUtils.bind(this,function(A){z.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(A&&A.message?": "+A.message:""));this.hasError=!0})):z.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});O();this.refreshComments=O;C=mxUtils.bind(this,function(){function m(T){var k=A[T.id];if(null!=k)for(J(T,k),k=0;null!=T.replies&&k<T.replies.length;k++)m(T.replies[k])}if(this.window.isVisible()){for(var u=z.querySelectorAll(".geCommentDate"),A=-{},B=0;B<u.length;B++){var H=u[B];A[H.getAttribute("data-commentId")]=H}for(B=0;B<P.length;B++)m(P[B])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=new mxWindow(mxResources.get("comments"),n,g,l,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));-b.installResizeHandler(this,!0)},ConfirmDialog=function(b,g,l,d,q,y,x,D,J,K,L){var Q=document.createElement("div");Q.style.textAlign="center";L=null!=L?L:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=L+"px";c.style.lineHeight="1.2em";mxUtils.write(c,g);Q.appendChild(c);null!=K&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",g=document.createElement("img"),g.setAttribute("src",K),c.appendChild(g),Q.appendChild(c));K=document.createElement("div");+"no-repeat";t.style.backgroundSize="20px";t.style.margin="0 2px";t.style.display="inline-block";t.style.cursor="pointer";if(!e){var F=t.cloneNode();F.style.backgroundImage="url("+Editor.plusImage+")";F.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(F,"click",function(m){function u(){D(A,B,function(H){K(B);b.addComment(H,function(T){H.id=T;O.push(H);P(B)},function(T){L(B);u();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var A=+b.newComment("",b.getCurrentUser()),B=c(A,O,null,0);u();m.preventDefault();mxEvent.consume(m)});C.appendChild(F)}var S=t.cloneNode();S.classList.add("geToggleItem");S.style.backgroundImage="url("+Editor.checkImage+")";S.setAttribute("title",mxResources.get("showResolved"));var U=!1;mxEvent.addListener(S,"click",function(m){(U=!U)?S.classList.add("geActiveItem"):S.classList.remove("geActiveItem");N();m.preventDefault();mxEvent.consume(m)});C.appendChild(S);b.commentsRefreshNeeded()&&(F=t.cloneNode(),+F.style.backgroundImage="url("+Editor.refreshImage+")",F.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(F,"click",function(m){N();m.preventDefault();mxEvent.consume(m)}),C.appendChild(F));b.commentsSaveNeeded()&&(t=t.cloneNode(),t.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',t.setAttribute("title",mxResources.get("save")),t.className="geButton geAdaptiveAsset",mxEvent.addListener(t,"click",function(m){y();m.preventDefault();mxEvent.consume(m)}),+C.appendChild(t));n.appendChild(C);var O=[],N=mxUtils.bind(this,function(){this.hasError=!1;if(null!=p)try{p.div=p.div.cloneNode(!0);var m=p.div.querySelector(".geCommentEditTxtArea"),u=p.div.querySelector(".geCommentEditBtns");p.comment.content=m.value;m.parentNode.removeChild(m);u.parentNode.removeChild(u)}catch(A){b.handleError(A)}z.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))++"...</div>";f=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(A){function B(H){if(null!=H){H.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});for(var T=0;T<H.length;T++)B(H[T].replies)}}A.sort(function(H,T){return new Date(H.modifiedDate)-new Date(T.modifiedDate)});z.innerText="";z.appendChild(E);E.style.display="block";O=A;for(A=0;A<O.length;A++)B(O[A].replies),c(O[A],O,null,0,U);null!=p&&null==p.comment.id&&null==p.comment.pCommentId&&(z.appendChild(p.div),+D(p.comment,p.div,p.saveCallback,p.deleteOnCancel))},mxUtils.bind(this,function(A){z.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(A&&A.message?": "+A.message:""));this.hasError=!0})):z.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});N();this.refreshComments=N;C=mxUtils.bind(this,function(){function m(T){var k=A[T.id];if(null!=k)for(J(T,k),k=0;null!=T.replies&&k<T.replies.length;k++)m(T.replies[k])}if(this.window.isVisible()){for(var u=z.querySelectorAll(".geCommentDate"),A=+{},B=0;B<u.length;B++){var H=u[B];A[H.getAttribute("data-commentId")]=H}for(B=0;B<O.length;B++)m(O[B])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=new mxWindow(mxResources.get("comments"),n,g,l,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));+b.installResizeHandler(this,!0)},ConfirmDialog=function(b,g,l,d,q,y,x,D,J,K,L){var P=document.createElement("div");P.style.textAlign="center";L=null!=L?L:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=L+"px";c.style.lineHeight="1.2em";mxUtils.write(c,g);P.appendChild(c);null!=K&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",g=document.createElement("img"),g.setAttribute("src",K),c.appendChild(g),P.appendChild(c));K=document.createElement("div");K.style.textAlign="center";K.style.whiteSpace="nowrap";var e=document.createElement("input");e.setAttribute("type","checkbox");y=mxUtils.button(y||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(e.checked)});y.className="geBtn";null!=D&&(y.innerHTML=D+"<br>"+y.innerHTML,y.style.paddingBottom="8px",y.style.paddingTop="8px",y.style.height="auto",y.style.width="40%");b.editor.cancelFirst&&K.appendChild(y);var f=mxUtils.button(q||mxResources.get("ok"),function(){b.hideDialog();null!=l&&-l(e.checked)});K.appendChild(f);null!=x?(f.innerHTML=x+"<br>"+f.innerHTML+"<br>",f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.className="geBtn",f.style.width="40%"):f.className="geBtn gePrimaryBtn";b.editor.cancelFirst||K.appendChild(y);Q.appendChild(K);J?(K.style.marginTop="10px",c=document.createElement("p"),c.style.marginTop="20px",c.style.marginBottom="0px",c.appendChild(e),q=document.createElement("span"),mxUtils.write(q," "+mxResources.get("rememberThisSetting")),-c.appendChild(q),Q.appendChild(c),mxEvent.addListener(q,"click",function(p){e.checked=!e.checked;mxEvent.consume(p)})):K.style.marginTop="12px";this.init=function(){f.focus()};this.container=Q},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};+l(e.checked)});K.appendChild(f);null!=x?(f.innerHTML=x+"<br>"+f.innerHTML+"<br>",f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.className="geBtn",f.style.width="40%"):f.className="geBtn gePrimaryBtn";b.editor.cancelFirst||K.appendChild(y);P.appendChild(K);J?(K.style.marginTop="10px",c=document.createElement("p"),c.style.marginTop="20px",c.style.marginBottom="0px",c.appendChild(e),q=document.createElement("span"),mxUtils.write(q," "+mxResources.get("rememberThisSetting")),+c.appendChild(q),P.appendChild(c),mxEvent.addListener(q,"click",function(p){e.checked=!e.checked;mxEvent.consume(p)})):K.style.marginTop="12px";this.init=function(){f.focus()};this.container=P},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,g,l,d,q){if(null!=g)for(var y=0;y<g.length;y++)null!=g[y]&&(b=this.patchPages(b,g[y],l,d,q));return b};-EditorUi.prototype.patchPages=function(b,g,l,d,q){var y={},x=[],D={},J={},K={},L={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var Q in d[EditorUi.DIFF_UPDATE])y[Q]=d[EditorUi.DIFF_UPDATE][Q];if(null!=g[EditorUi.DIFF_REMOVE])for(d=0;d<g[EditorUi.DIFF_REMOVE].length;d++)J[g[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=g[EditorUi.DIFF_INSERT])for(d=0;d<g[EditorUi.DIFF_INSERT].length;d++)D[g[EditorUi.DIFF_INSERT][d].previous]=g[EditorUi.DIFF_INSERT][d];if(null!=g[EditorUi.DIFF_UPDATE])for(Q in g[EditorUi.DIFF_UPDATE])d=-g[EditorUi.DIFF_UPDATE][Q],null!=d.previous&&(L[d.previous]=Q);if(null!=b){var c="";for(d=0;d<b.length;d++){var e=b[d].getId();K[e]=b[d];null!=L[c]||J[e]||null!=g[EditorUi.DIFF_UPDATE]&&null!=g[EditorUi.DIFF_UPDATE][e]&&null!=g[EditorUi.DIFF_UPDATE][e].previous||(L[c]=e);c=e}}var f={},p=mxUtils.bind(this,function(t){var z=null!=t?t.getId():"";if(null!=t&&!f[z]){f[z]=!0;x.push(t);var E=null!=g[EditorUi.DIFF_UPDATE]?g[EditorUi.DIFF_UPDATE][z]:null;null!=E&&(this.updatePageRoot(t),null!=E.name&&t.setName(E.name),-null!=E.view&&this.patchViewState(t,E.view),null!=E.cells&&this.patchPage(t,E.cells,y[t.getId()],q),!l||null==E.cells&&null==E.view||(t.needsUpdate=!0))}t=L[z];null!=t&&(delete L[z],p(K[t]));t=D[z];null!=t&&(delete D[z],n(t))}),n=mxUtils.bind(this,function(t){t=mxUtils.parseXml(t.data).documentElement;t=new DiagramPage(t);this.updatePageRoot(t);var z=K[t.getId()];null==z?p(t):(this.patchPage(z,this.diffPages([z],[t]),y[z.getId()],q),l&&(z.needsUpdate=!0))});p();for(Q in L)p(K[L[Q]]),delete L[Q];for(Q in D)n(D[Q]),-delete D[Q];return x};EditorUi.prototype.patchViewState=function(b,g){if(null!=b.viewState&&null!=g){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var l in g)try{this.patchViewStateProperty(b,g,l)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,g,l){b.viewState[l]=JSON.parse(g[l])};+EditorUi.prototype.patchPages=function(b,g,l,d,q){var y={},x=[],D={},J={},K={},L={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var P in d[EditorUi.DIFF_UPDATE])y[P]=d[EditorUi.DIFF_UPDATE][P];if(null!=g[EditorUi.DIFF_REMOVE])for(d=0;d<g[EditorUi.DIFF_REMOVE].length;d++)J[g[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=g[EditorUi.DIFF_INSERT])for(d=0;d<g[EditorUi.DIFF_INSERT].length;d++)D[g[EditorUi.DIFF_INSERT][d].previous]=g[EditorUi.DIFF_INSERT][d];if(null!=g[EditorUi.DIFF_UPDATE])for(P in g[EditorUi.DIFF_UPDATE])d=+g[EditorUi.DIFF_UPDATE][P],null!=d.previous&&(L[d.previous]=P);if(null!=b){var c="";for(d=0;d<b.length;d++){var e=b[d].getId();K[e]=b[d];null!=L[c]||J[e]||null!=g[EditorUi.DIFF_UPDATE]&&null!=g[EditorUi.DIFF_UPDATE][e]&&null!=g[EditorUi.DIFF_UPDATE][e].previous||(L[c]=e);c=e}}var f={},p=mxUtils.bind(this,function(t){var z=null!=t?t.getId():"";if(null!=t&&!f[z]){f[z]=!0;x.push(t);var E=null!=g[EditorUi.DIFF_UPDATE]?g[EditorUi.DIFF_UPDATE][z]:null;null!=E&&(this.updatePageRoot(t),null!=E.name&&t.setName(E.name),+null!=E.view&&this.patchViewState(t,E.view),null!=E.cells&&this.patchPage(t,E.cells,y[t.getId()],q),!l||null==E.cells&&null==E.view||(t.needsUpdate=!0))}t=L[z];null!=t&&(delete L[z],p(K[t]));t=D[z];null!=t&&(delete D[z],n(t))}),n=mxUtils.bind(this,function(t){t=mxUtils.parseXml(t.data).documentElement;t=new DiagramPage(t);this.updatePageRoot(t);var z=K[t.getId()];null==z?p(t):(this.patchPage(z,this.diffPages([z],[t]),y[z.getId()],q),l&&(z.needsUpdate=!0))});p();for(P in L)p(K[L[P]]),delete L[P];for(P in D)n(D[P]),+delete D[P];return x};EditorUi.prototype.patchViewState=function(b,g){if(null!=b.viewState&&null!=g){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var l in g)try{this.patchViewStateProperty(b,g,l)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,g,l){b.viewState[l]=JSON.parse(g[l])};EditorUi.prototype.createParentLookup=function(b,g){function l(K){var L=d[K];null==L&&(L={inserted:[],moved:{}},d[K]=L);return L}var d={};if(null!=g[EditorUi.DIFF_INSERT])for(var q=0;q<g[EditorUi.DIFF_INSERT].length;q++){var y=g[EditorUi.DIFF_INSERT][q],x=null!=y.parent?y.parent:"",D=null!=y.previous?y.previous:"";l(x).inserted[D]=y}if(null!=g[EditorUi.DIFF_UPDATE])for(var J in g[EditorUi.DIFF_UPDATE])y=g[EditorUi.DIFF_UPDATE][J],null!=y.previous&&(x=y.parent,null==x&&(q=b.getCell(J),null!=q&&(q=b.getParent(q),null!=q&&(x=q.getId()))),null!=x&&(l(x).moved[y.previous]=J));return d};-EditorUi.prototype.patchPage=function(b,g,l,d){var q=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),y=this.createParentLookup(q,g);q.beginUpdate();try{var x=q.updateEdgeParent,D=new mxDictionary,J=[];q.updateEdgeParent=function(n,t){!D.get(n)&&d&&(D.put(n,!0),J.push(n))};var K=y[""],L=null!=K&&null!=K.inserted?K.inserted[""]:null,Q=null;null!=L&&(Q=this.getCellForJson(L));if(null==Q){var c=null!=K&&null!=K.moved?K.moved[""]:null;null!=c&&(Q=q.getCell(c))}null!=Q&&(q.setRoot(Q),-b.root=Q,EditorUi.debug("EditorUi.patchPage: Root changed",Q.id));this.patchCellRecursive(b,q,q.root,y,g);if(null!=g[EditorUi.DIFF_REMOVE])for(var e=0;e<g[EditorUi.DIFF_REMOVE].length;e++){c=g[EditorUi.DIFF_REMOVE][e];var f=q.getCell(c);null!=f&&q.remove(f)}if(null!=g[EditorUi.DIFF_UPDATE]){var p=null!=l&&null!=l.cells?l.cells[EditorUi.DIFF_UPDATE]:null;for(c in g[EditorUi.DIFF_UPDATE])f=q.getCell(c),null!=f?this.patchCell(q,f,g[EditorUi.DIFF_UPDATE][c],null!=p?p[c]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",+EditorUi.prototype.patchPage=function(b,g,l,d){var q=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),y=this.createParentLookup(q,g);q.beginUpdate();try{var x=q.updateEdgeParent,D=new mxDictionary,J=[];q.updateEdgeParent=function(n,t){!D.get(n)&&d&&(D.put(n,!0),J.push(n))};var K=y[""],L=null!=K&&null!=K.inserted?K.inserted[""]:null,P=null;null!=L&&(P=this.getCellForJson(L));if(null==P){var c=null!=K&&null!=K.moved?K.moved[""]:null;null!=c&&(P=q.getCell(c))}null!=P&&(q.setRoot(P),+b.root=P,EditorUi.debug("EditorUi.patchPage: Root changed",P.id));this.patchCellRecursive(b,q,q.root,y,g);if(null!=g[EditorUi.DIFF_REMOVE])for(var e=0;e<g[EditorUi.DIFF_REMOVE].length;e++){c=g[EditorUi.DIFF_REMOVE][e];var f=q.getCell(c);null!=f&&q.remove(f)}if(null!=g[EditorUi.DIFF_UPDATE]){var p=null!=l&&null!=l.cells?l.cells[EditorUi.DIFF_UPDATE]:null;for(c in g[EditorUi.DIFF_UPDATE])f=q.getCell(c),null!=f?this.patchCell(q,f,g[EditorUi.DIFF_UPDATE][c],null!=p?p[c]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",c,"diff",[g[EditorUi.DIFF_UPDATE][c]])}if(null!=g[EditorUi.DIFF_INSERT])for(e=0;e<g[EditorUi.DIFF_INSERT].length;e++)L=g[EditorUi.DIFF_INSERT][e],f=q.getCell(L.id),null!=f&&(q.setTerminal(f,q.getCell(L.source),!0),q.setTerminal(f,q.getCell(L.target),!1));q.updateEdgeParent=x;if(d&&0<J.length)for(e=0;e<J.length;e++)q.contains(J[e])&&q.updateEdgeParent(J[e])}finally{q.endUpdate()}};-EditorUi.prototype.patchCellRecursive=function(b,g,l,d,q){if(null!=l){var y=d[l.getId()],x=null!=y&&null!=y.inserted?y.inserted:{};y=null!=y&&null!=y.moved?y.moved:{};for(var D=0,J=g.getChildCount(l),K="",L=0;L<J;L++){var Q=g.getChildAt(l,L).getId();null==y[K]&&(null==q[EditorUi.DIFF_UPDATE]||null==q[EditorUi.DIFF_UPDATE][Q]||null==q[EditorUi.DIFF_UPDATE][Q].previous&&null==q[EditorUi.DIFF_UPDATE][Q].parent)&&(y[K]=Q);K=Q}J=mxUtils.bind(this,function(c,e){var f=null!=c?c.getId():"";null==f&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",-"cell",c);null!=c&&e&&(e=g.getCell(f),null!=e&&e!=c&&(c=null));null!=c&&(g.getChildAt(l,D)!=c&&g.add(l,c,D),this.patchCellRecursive(b,g,c,d,q),D++);return f});for(K=[null];0<K.length;)if(L=K.shift(),L=J(null!=L?L.child:null,null!=L?L.insert:!1),Q=y[L],null!=Q&&(delete y[L],K.push({child:g.getCell(Q)})),Q=x[L],null!=Q&&(delete x[L],K.push({child:this.getCellForJson(Q),insert:!0})),0==K.length){for(L in y)K.push({child:g.getCell(y[L])}),delete y[L];for(L in x)K.push({child:this.getCellForJson(x[L]),+EditorUi.prototype.patchCellRecursive=function(b,g,l,d,q){if(null!=l){var y=d[l.getId()],x=null!=y&&null!=y.inserted?y.inserted:{};y=null!=y&&null!=y.moved?y.moved:{};for(var D=0,J=g.getChildCount(l),K="",L=0;L<J;L++){var P=g.getChildAt(l,L).getId();null==y[K]&&(null==q[EditorUi.DIFF_UPDATE]||null==q[EditorUi.DIFF_UPDATE][P]||null==q[EditorUi.DIFF_UPDATE][P].previous&&null==q[EditorUi.DIFF_UPDATE][P].parent)&&(y[K]=P);K=P}J=mxUtils.bind(this,function(c,e){var f=null!=c?c.getId():"";null==f&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",+"cell",c);null!=c&&e&&(e=g.getCell(f),null!=e&&e!=c&&(c=null));null!=c&&(g.getChildAt(l,D)!=c&&g.add(l,c,D),this.patchCellRecursive(b,g,c,d,q),D++);return f});for(K=[null];0<K.length;)if(L=K.shift(),L=J(null!=L?L.child:null,null!=L?L.insert:!1),P=y[L],null!=P&&(delete y[L],K.push({child:g.getCell(P)})),P=x[L],null!=P&&(delete x[L],K.push({child:this.getCellForJson(P),insert:!0})),0==K.length){for(L in y)K.push({child:g.getCell(y[L])}),delete y[L];for(L in x)K.push({child:this.getCellForJson(x[L]),insert:!0}),delete x[L]}}};EditorUi.prototype.patchCell=function(b,g,l,d){if(null!=g&&null!=l){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))"value"in l?b.setValue(g,l.value):null!=l.xmlValue&&b.setValue(g,mxUtils.parseXml(l.xmlValue).documentElement);null!=d&&null!=d.style||null==l.style||b.setStyle(g,l.style);null!=l.visible&&b.setVisible(g,1==l.visible);null!=l.collapsed&&b.setCollapsed(g,1==l.collapsed);null!=l.vertex&&(g.vertex=1==l.vertex);null!=l.edge&&(g.edge=1==l.edge);null!=l.connectable&&(g.connectable=1==l.connectable);null!=l.geometry&&b.setGeometry(g,this.codec.decode(mxUtils.parseXml(l.geometry).documentElement));null!=l.source&&b.setTerminal(g,b.getCell(l.source),!0);null!=l.target&&b.setTerminal(g,b.getCell(l.target),!1);for(var q in l)this.cellProperties[q]||(g[q]=l[q])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var g=null;null!=b&&(g=mxUtils.getXml(b));return g};EditorUi.prototype.getNodeForPages=function(b){var g=null;if(null!=this.fileNode&&null!=b){g=this.fileNode.cloneNode(!1);for(var l=0;l<b.length;l++){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[l].root));this.editor.graph.saveViewState(b[l].viewState,d);var q=b[l].node.cloneNode(!1);q.appendChild(d);g.appendChild(q)}}return g};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};EditorUi.prototype.getPagesForNode=function(b,g){var l=this.editor.extractGraphModel(b,!0,!0);null!=l&&(b=l);g=b.getElementsByTagName(g||"diagram");l=[];if(0<g.length)for(b=0;b<g.length;b++){var d=new DiagramPage(g[b]);this.updatePageRoot(d,!0);l.push(d)}else"mxGraphModel"==b.nodeName&&(d=new DiagramPage(b.ownerDocument.createElement("diagram")),d.setName(mxResources.get("pageWithNumber",[1])),d.node.appendChild(b.cloneNode(!0)),l.push(d));return l};-EditorUi.prototype.diffPages=function(b,g){var l=[],d=[],q={},y={},x={},D=null;if(null!=b&&null!=g){for(var J=0;J<g.length;J++)y[g[J].getId()]={page:g[J],prev:D},D=g[J];D=null;for(J=0;J<b.length;J++){var K=b[J].getId();g=y[K];if(null==g)d.push(K);else{this.updatePageRoot(b[J]);this.updatePageRoot(g.page);var L=this.diffCells(b[J].root,g.page.root),Q={};mxUtils.isEmptyObject(L)||(Q.cells=L);L=this.diffViewState(b[J],g.page);mxUtils.isEmptyObject(L)||(Q.view=L);if((null!=g.prev?null==D:null!=D)||null!=-D&&null!=g.prev&&D.getId()!=g.prev.getId())Q.previous=null!=g.prev?g.prev.getId():"";null!=g.page.getName()&&b[J].getName()!=g.page.getName()&&(Q.name=g.page.getName());mxUtils.isEmptyObject(Q)||(x[K]=Q)}delete y[b[J].getId()];D=b[J]}for(K in y)g=y[K],l.push({id:g.page.getId(),data:mxUtils.getXml(g.page.node),previous:null!=g.prev?g.prev.getId():""});mxUtils.isEmptyObject(x)||(q[EditorUi.DIFF_UPDATE]=x);0<d.length&&(q[EditorUi.DIFF_REMOVE]=d);0<l.length&&(q[EditorUi.DIFF_INSERT]=l)}return q};+EditorUi.prototype.diffPages=function(b,g){var l=[],d=[],q={},y={},x={},D=null;if(null!=b&&null!=g){for(var J=0;J<g.length;J++)y[g[J].getId()]={page:g[J],prev:D},D=g[J];D=null;for(J=0;J<b.length;J++){var K=b[J].getId();g=y[K];if(null==g)d.push(K);else{this.updatePageRoot(b[J]);this.updatePageRoot(g.page);var L=this.diffCells(b[J].root,g.page.root),P={};mxUtils.isEmptyObject(L)||(P.cells=L);L=this.diffViewState(b[J],g.page);mxUtils.isEmptyObject(L)||(P.view=L);if((null!=g.prev?null==D:null!=D)||null!=+D&&null!=g.prev&&D.getId()!=g.prev.getId())P.previous=null!=g.prev?g.prev.getId():"";null!=g.page.getName()&&b[J].getName()!=g.page.getName()&&(P.name=g.page.getName());mxUtils.isEmptyObject(P)||(x[K]=P)}delete y[b[J].getId()];D=b[J]}for(K in y)g=y[K],l.push({id:g.page.getId(),data:mxUtils.getXml(g.page.node),previous:null!=g.prev?g.prev.getId():""});mxUtils.isEmptyObject(x)||(q[EditorUi.DIFF_UPDATE]=x);0<d.length&&(q[EditorUi.DIFF_REMOVE]=d);0<l.length&&(q[EditorUi.DIFF_INSERT]=l)}return q};EditorUi.prototype.createCellLookup=function(b,g,l){l=null!=l?l:{};null==b.getId()?EditorUi.debug("EditorUi.createCellLookup: Ignored inserted cell with no id",b):l[b.getId()]={cell:b,prev:g};var d=b.getChildCount();g=null;for(var q=0;q<d;q++){var y=b.getChildAt(q);this.createCellLookup(y,g,l);g=y}return l};EditorUi.prototype.diffCellRecursive=function(b,g,l,d,q){d=null!=d?d:{};var y=l[b.getId()];delete l[b.getId()];if(null==y)null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored removed cell with no id",b):q.push(b.getId());else{var x=this.diffCell(b,y.cell);if(null!=x.parent||(null!=y.prev?null==g:null!=g)||null!=g&&null!=y.prev&&g.getId()!=y.prev.getId())x.previous=null!=y.prev?y.prev.getId():"";mxUtils.isEmptyObject(x)||(null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored changed cell with no id",b,"diff",x):d[b.getId()]=x)}y=b.getChildCount();g=null;for(x=0;x<y;x++){var D=b.getChildAt(x);this.diffCellRecursive(D,g,l,d,q);g=D}return d};@@ -13671,8 +13672,8 @@ DrawioFileSync.prototype.patchRealtime=function(b,g,l,d){var q=null;if(this.file"all",q,"local",y,"applied",x,"immediate",d)}return q};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),g=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,g,!0);this.snapshot=b;var l=this.ui.resolveCrossReferences(g,this.ui.diffPages(this.file.ownPages,this.ui.pages));this.file.ownPages=this.ui.patchPages(this.file.ownPages,l,!0);this.isRealtimeActive()&&this.doSendLocalChanges([l,g])}this.localFileWasChanged=!1}catch(d){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),b,d)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};-DrawioFileSync.prototype.merge=function(b,g,l,d,q,y,x){try{this.file.stats.merged++;this.lastModified=new Date;var D=this.file.getDescriptorRevisionId(l);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var J=this.ui.clonePages(this.file.getShadowPages()),K=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(J,this.ui.pages):null,L=this.file.isRealtime()?this.ui.diffPages(J,this.file.ownPages):null;J=this.ui.applyPatches(J,b);var Q=null==g?null:this.ui.getHashValueForPages(J);-EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",K,"pending",L,"checksum",g,"current",Q,"valid",g==Q,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",D,"etag",this.file.getDescriptorEtag(l),"immediate",x);if(null!=g&&g!=Q){this.reload(mxUtils.bind(this,function(){null!=d&&d()}),mxUtils.bind(this,function(){null!=q&&q()}),y,null,x);return}this.file.setShadowPages(J);null==this.patchRealtime(b,null,L,x)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?+DrawioFileSync.prototype.merge=function(b,g,l,d,q,y,x){try{this.file.stats.merged++;this.lastModified=new Date;var D=this.file.getDescriptorRevisionId(l);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var J=this.ui.clonePages(this.file.getShadowPages()),K=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(J,this.ui.pages):null,L=this.file.isRealtime()?this.ui.diffPages(J,this.file.ownPages):null;J=this.ui.applyPatches(J,b);var P=null==g?null:this.ui.getHashValueForPages(J);+EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",K,"pending",L,"checksum",g,"current",P,"valid",g==P,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",D,"etag",this.file.getDescriptorEtag(l),"immediate",x);if(null!=g&&g!=P){this.reload(mxUtils.bind(this,function(){null!=d&&d()}),mxUtils.bind(this,function(){null!=q&&q()}),y,null,x);return}this.file.setShadowPages(J);null==this.patchRealtime(b,null,L,x)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?K:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),l);null!=d&&d(!0)}catch(f){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=q&&q(f);try{var c=this.file.getCurrentUser(),e=null!=c?c.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),e,f)}catch(p){}}};DrawioFileSync.prototype.fileChanged=function(b,g,l,d,q){var y=window.setTimeout(mxUtils.bind(this,function(){null!=l&&l()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",d,"immediate",q,"remoteFileChanged",this.remoteFileChanged,"valid",this.isValidState()),this.isValidState()?(this.remoteFileChanged=!1,this.file.loadPatchDescriptor(mxUtils.bind(this,function(x){null!=l&&l()||(this.isValidState()?this.catchup(x,b,g,l,q):null!=g&&g())}),g)):null!=g&&g())}),d?this.cacheReadyDelay:0);return this.notifyThread=y};@@ -13681,19 +13682,19 @@ this.cleanupThread=null;"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.fastDrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};DrawioFileSync.prototype.catchup=function(b,g,l,d,q){if(null!=b&&(null==d||!d())){var y=this.file.getCurrentRevisionId(),x=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",y,"to",x,"immediate",q,"valid",this.isValidState());if(y==x)this.file.patchDescriptor(this.file.getDescriptor(),b),"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.catchup",[this],"up to date","cleanup",this.cleanupThread,"checksum",this.ui.getHashValueForPages(this.ui.pages)),-document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=g&&g(!0);else if(this.isValidState()){var D=this.file.getDescriptorChecksum(b),J=this.file.getDescriptorSecret(b);if(null!=D&&D==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=g&&g(!0);else if(Editor.enableRealtimeCache&&null!=J&&"1"!=urlParams.lockdown){var K=0,L=!1,Q=mxUtils.bind(this,function(){if(null==d||!d())if(y!=this.file.getCurrentRevisionId())null!=g&&+document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=g&&g(!0);else if(this.isValidState()){var D=this.file.getDescriptorChecksum(b),J=this.file.getDescriptorSecret(b);if(null!=D&&D==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=g&&g(!0);else if(Editor.enableRealtimeCache&&null!=J&&"1"!=urlParams.lockdown){var K=0,L=!1,P=mxUtils.bind(this,function(){if(null==d||!d())if(y!=this.file.getCurrentRevisionId())null!=g&&g(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;this.reload(g,l,d,null,q)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(y)+"&to="+encodeURIComponent(x)+(null!=J?"&secret="+encodeURIComponent(J):""),mxUtils.bind(this,function(f){this.file.stats.bytesReceived+=f.getText().length;window.clearTimeout(e);if(c&&(null==d||!d()))if(y!=this.file.getCurrentRevisionId())null!=g&&g(!0);else if(this.isValidState()){var p=null,n=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[f],"status",f.getStatus(),"cacheReadyRetryCount",K,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=f.getStatus()&&299>=f.getStatus()&&0<f.getText().length)try{var t=JSON.parse(f.getText());if(null!=t&&0<t.length)for(var z=0;z<t.length;z++){var E=this.stringToObject(t[z]);if(E.v>DrawioFileSync.PROTOCOL){L=!0;n=[];break}else if(E.v===DrawioFileSync.PROTOCOL&&null!=E.d)p=E.d.checksum,-n.push(E.d.patch);else{L=!0;n=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[t],"status",L?"failed":"ok","temp",n,"checksum",p)}catch(C){n=[],null!=window.console&&"1"==urlParams.test&&console.log(C)}try{0<n.length?(this.file.stats.cacheHits++,this.merge(n,p,b,g,l,d,q)):K<=this.maxCacheReadyRetries-1&&!L&&401!=f.getStatus()&&503!=f.getStatus()&&410!=f.getStatus()?(K++,this.file.stats.cacheMiss++,window.setTimeout(Q,(K+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,-this.reload(g,l,d,null,q))}catch(C){null!=l&&l(C)}}else null!=l&&l()}),l)}else null!=l&&l()});window.setTimeout(Q,this.cacheReadyDelay)}else this.reload(g,l,d,null,q)}else null!=l&&l()}};DrawioFileSync.prototype.reload=function(b,g,l,d,q){EditorUi.debug("DrawioFileSync.reload",[this],"immediate",q);this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(y){null!=g&&g(y)}),l,d,q)};+n.push(E.d.patch);else{L=!0;n=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[t],"status",L?"failed":"ok","temp",n,"checksum",p)}catch(C){n=[],null!=window.console&&"1"==urlParams.test&&console.log(C)}try{0<n.length?(this.file.stats.cacheHits++,this.merge(n,p,b,g,l,d,q)):K<=this.maxCacheReadyRetries-1&&!L&&401!=f.getStatus()&&503!=f.getStatus()&&410!=f.getStatus()?(K++,this.file.stats.cacheMiss++,window.setTimeout(P,(K+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,+this.reload(g,l,d,null,q))}catch(C){null!=l&&l(C)}}else null!=l&&l()}),l)}else null!=l&&l()});window.setTimeout(P,this.cacheReadyDelay)}else this.reload(g,l,d,null,q)}else null!=l&&l()}};DrawioFileSync.prototype.reload=function(b,g,l,d,q){EditorUi.debug("DrawioFileSync.reload",[this],"immediate",q);this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(y){null!=g&&g(y)}),l,d,q)};DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var g=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),l=this.file.getCurrentRevisionId(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(l)+"&msg="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",l)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};DrawioFileSync.prototype.createToken=function(b,g,l){var d=!0,q=window.setTimeout(mxUtils.bind(this,function(){d=!1;l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(y){window.clearTimeout(q);d&&(200<=y.getStatus()&&299>=y.getStatus()?g(y.getText()):l({code:y.getStatus(),message:"Token Error "+y.getStatus()}))}),l)};DrawioFileSync.prototype.fileSaving=function(){this.file.isOptimisticSync()&&this.notify(this.createMessage({m:Date.now(),type:"optimistic"}));EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])};DrawioFileSync.prototype.fileSaved=function(b,g,l,d,q,y){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var x=this.file.getDescriptorSecret(this.file.getDescriptor()),D=this.createMessage({m:this.lastModified.getTime()}),J=this.file.getDescriptorRevisionId(g),K=this.file.getCurrentRevisionId();if(null!=x&&null!=q&&-"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var L=this.ui.diffPages(this.file.getShadowPages(),b);g=this.file.getDescriptorSecret(g);y=null!=y?y:this.ui.getHashValueForPages(b);var Q=this.objectToString(this.createMessage({patch:L,checksum:y}));this.file.stats.bytesSent+=Q.length;this.file.stats.msgSent++;var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+-"&from="+encodeURIComponent(J)+"&to="+encodeURIComponent(K)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(D)))+(null!=x?"&secret="+encodeURIComponent(x):"")+(null!=g?"&last-secret="+encodeURIComponent(g):"")+(Q.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(Q):"")+(null!=q?"&token="+encodeURIComponent(q):""),mxUtils.bind(this,function(f){window.clearTimeout(e);c&&(200<=f.getStatus()&&299>=f.getStatus()?(Editor.p2pSyncNotify&&this.notify(D),null!=l&&l()):d({message:mxResources.get("realtimeCollaboration")+-(0!=f.getStatus()?": "+f.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",J,"to",K,"etag",this.file.getCurrentEtag(),"diff",L,Q.length,"bytes","msg",D,"checksum",y)}else this.notify(D),null!=l&&l(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",J,"to",K,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};+"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var L=this.ui.diffPages(this.file.getShadowPages(),b);g=this.file.getDescriptorSecret(g);y=null!=y?y:this.ui.getHashValueForPages(b);var P=this.objectToString(this.createMessage({patch:L,checksum:y}));this.file.stats.bytesSent+=P.length;this.file.stats.msgSent++;var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()++"&from="+encodeURIComponent(J)+"&to="+encodeURIComponent(K)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(D)))+(null!=x?"&secret="+encodeURIComponent(x):"")+(null!=g?"&last-secret="+encodeURIComponent(g):"")+(P.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(P):"")+(null!=q?"&token="+encodeURIComponent(q):""),mxUtils.bind(this,function(f){window.clearTimeout(e);c&&(200<=f.getStatus()&&299>=f.getStatus()?(Editor.p2pSyncNotify&&this.notify(D),null!=l&&l()):d({message:mxResources.get("realtimeCollaboration")++(0!=f.getStatus()?": "+f.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",J,"to",K,"etag",this.file.getCurrentEtag(),"diff",L,P.length,"bytes","msg",D,"checksum",y)}else this.notify(D),null!=l&&l(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",J,"to",K,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};DrawioFileSync.prototype.fileConflict=function(b,g,l){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,g,l):this.fileChanged(g,l)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};DrawioFileSync.prototype.stop=function(){null!=this.pusher?(null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null),EditorUi.debug("DrawioFileSync.stop",[this])):null!=this.polling&&(this.polling.stop(),@@ -13732,8 +13733,8 @@ null!=q&&q.parentNode.removeChild(q)}null!=document.referrer&&"aws3"==urlParams./www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(e){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var J=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var K=JSON.parse(localStorage.getItem(mxSettings.key));null!=K&&(J=K.plugins)}catch(e){}K=urlParams.p;App.initPluginCallback();null!=K&&App.loadPlugins(K.split(";"));if(null!=J&&0<J.length&&"0"!=urlParams.plugins)for(q=0;q<J.length;q++)try{("/"==J[q].charAt(0)&&(J[q]=PLUGINS_BASE_PATH+J[q]),App.isSameDomain(J[q]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(J[q])?null==App.pluginsLoaded[J[q]]&&(App.pluginsLoaded[J[q]]=!0,App.embedModePluginsCount++,mxscript(J[q])):null!=window.console&&console.log("Unknown plugin:",J[q]):null!=window.console&&console.log("Blocked plugin:",J[q])}catch(e){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&-"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var L=window.opener||window.parent,Q=function(e){if(e.source==L)try{var f=JSON.parse(e.data);null!=f&&"configure"==f.action&&(mxEvent.removeListener(window,"message",-Q),Editor.configure(f.config),mxSettings.load(),null!=f.config.darkColor&&document.body.style.setProperty("--dark-color",f.config.darkColor),f.colorSchemeMeta&&mxmeta("color-scheme","dark light"),l())}catch(p){null!=window.console&&console.log("Error in configure message: "+p,e.data)}};mxEvent.addListener(window,"message",Q);L.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),+"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var L=window.opener||window.parent,P=function(e){if(e.source==L)try{var f=JSON.parse(e.data);null!=f&&"configure"==f.action&&(mxEvent.removeListener(window,"message",+P),Editor.configure(f.config),mxSettings.load(),null!=f.config.darkColor&&document.body.style.setProperty("--dark-color",f.config.darkColor),f.colorSchemeMeta&&mxmeta("color-scheme","dark light"),l())}catch(p){null!=window.console&&console.log("Error in configure message: "+p,e.data)}};mxEvent.addListener(window,"message",P);L.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(e){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(e.stack)):console.error(e)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed){var c=localStorage.getItem(Editor.configurationKey);if(null!=c)try{c=JSON.parse(c),null!=c&&(EditorUi.debug("Using local configuration",c),Editor.configure(c),mxSettings.load())}catch(e){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(e.stack)):console.error(e)}}}l()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(e){document.body.innerHTML="",J=document.createElement("pre"),mxUtils.write(J,e.stack),document.body.appendChild(J)}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;@@ -13775,12 +13776,12 @@ App.prototype.addRecent=function(b,g,l){if(isLocalStorage&&null!=localStorage){gApp.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent"+(null!=b?b:""))}catch(g){}};App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return this.logIfModified(b),mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};App.prototype.updateDocumentTitle=function(){var b=this.editor.appName,g=this.getCurrentFile();null==g||!this.editor.graph.isLightboxView()&&"simple"!=Editor.currentTheme||null==this.pages||null==this.currentPage?this.isOfflineApp()&&(b+=" app"):b=this.getShortPageName(this.currentPage);null!=g&&(b=(null!=g.getTitle()?g.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b)};-App.prototype.getThumbnail=function(b,g,l){l=null!=l?l:0;var d=!1;try{var q=!0,y=window.setTimeout(mxUtils.bind(this,function(){q=!1;g(null)}),this.timeout),x=mxUtils.bind(this,function(P){window.clearTimeout(y);q&&g(P)});null==this.thumbImageCache&&(this.thumbImageCache={});var D=this.editor.graph,J=D.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var K=D.getGlobalVariable;D=this.createTemporaryGraph(D.getStylesheet());D.setBackgroundImage=this.editor.graph.setBackgroundImage;-var L=this.pages[0];this.currentPage==L?D.setBackgroundImage(J):null!=L.viewState&&null!=L.viewState&&(J=L.viewState.backgroundImage,D.setBackgroundImage(J));D.getGlobalVariable=function(P){return"page"==P?L.getName():"pagenumber"==P?1:K.apply(this,arguments)};D.getGlobalVariable=K;document.body.appendChild(D.container);D.model.setRoot(L.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(P){try{D!=this.editor.graph&&null!=D.container.parentNode&&-D.container.parentNode.removeChild(D.container)}catch(O){P=null}x(P)}),b,this.thumbImageCache,"#ffffff",function(){x()},null,null,null,null,null,null,D,l,null,null,null,"diagram",null),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var Q=document.createElement("canvas"),c=D.getGraphBounds(),e=D.view.translate,f=D.view.scale;null!=J&&(c=mxRectangle.fromRectangle(c),c.add(new mxRectangle((e.x+J.x)*f,(e.y+J.y)*f,J.width*f,J.height*f)));var p=b/c.width;p=Math.min(1,Math.min(3*b/(4*c.height),-p));var n=Math.floor(c.x),t=Math.floor(c.y);Q.setAttribute("width",Math.ceil(p*(c.width+4)));Q.setAttribute("height",Math.ceil(p*(c.height+4)));var z=Q.getContext("2d");z.scale(p,p);z.translate(-n,-t);var E=D.background;if(null==E||""==E||E==mxConstants.NONE)E="#ffffff";z.save();z.fillStyle=E;z.fillRect(n,t,Math.ceil(c.width+4),Math.ceil(c.height+4));z.restore();if(null!=J){var C=new Image;C.src=J.src;z.drawImage(C,J.x*p,J.y*p,J.width*p,J.height*p)}var F=new mxJsCanvas(Q),R=new mxAsyncCanvas(this.thumbImageCache);-F.images=this.thumbImageCache.images;var U=new mxImageExport;U.drawShape=function(P,O){P.shape instanceof mxShape&&P.shape.checkBounds()&&(O.save(),O.translate(.5,.5),P.shape.paint(O),O.translate(-.5,-.5),O.restore())};U.drawText=function(P,O){};U.drawState(D.getView().getState(D.model.root),R);R.finish(mxUtils.bind(this,function(){try{U.drawState(D.getView().getState(D.model.root),F),D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}catch(P){Q=null}x(Q)}));-d=!0}}catch(P){d=!1,null!=D&&D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}d||window.clearTimeout(y);return d};+App.prototype.getThumbnail=function(b,g,l){l=null!=l?l:0;var d=!1;try{var q=!0,y=window.setTimeout(mxUtils.bind(this,function(){q=!1;g(null)}),this.timeout),x=mxUtils.bind(this,function(O){window.clearTimeout(y);q&&g(O)});null==this.thumbImageCache&&(this.thumbImageCache={});var D=this.editor.graph,J=D.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var K=D.getGlobalVariable;D=this.createTemporaryGraph(D.getStylesheet());D.setBackgroundImage=this.editor.graph.setBackgroundImage;+var L=this.pages[0];this.currentPage==L?D.setBackgroundImage(J):null!=L.viewState&&null!=L.viewState&&(J=L.viewState.backgroundImage,D.setBackgroundImage(J));D.getGlobalVariable=function(O){return"page"==O?L.getName():"pagenumber"==O?1:K.apply(this,arguments)};D.getGlobalVariable=K;document.body.appendChild(D.container);D.model.setRoot(L.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(O){try{D!=this.editor.graph&&null!=D.container.parentNode&&+D.container.parentNode.removeChild(D.container)}catch(N){O=null}x(O)}),b,this.thumbImageCache,"#ffffff",function(){x()},null,null,null,null,null,null,D,l,null,null,null,"diagram",null),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var P=document.createElement("canvas"),c=D.getGraphBounds(),e=D.view.translate,f=D.view.scale;null!=J&&(c=mxRectangle.fromRectangle(c),c.add(new mxRectangle((e.x+J.x)*f,(e.y+J.y)*f,J.width*f,J.height*f)));var p=b/c.width;p=Math.min(1,Math.min(3*b/(4*c.height),+p));var n=Math.floor(c.x),t=Math.floor(c.y);P.setAttribute("width",Math.ceil(p*(c.width+4)));P.setAttribute("height",Math.ceil(p*(c.height+4)));var z=P.getContext("2d");z.scale(p,p);z.translate(-n,-t);var E=D.background;if(null==E||""==E||E==mxConstants.NONE)E="#ffffff";z.save();z.fillStyle=E;z.fillRect(n,t,Math.ceil(c.width+4),Math.ceil(c.height+4));z.restore();if(null!=J){var C=new Image;C.src=J.src;z.drawImage(C,J.x*p,J.y*p,J.width*p,J.height*p)}var F=new mxJsCanvas(P),S=new mxAsyncCanvas(this.thumbImageCache);+F.images=this.thumbImageCache.images;var U=new mxImageExport;U.drawShape=function(O,N){O.shape instanceof mxShape&&O.shape.checkBounds()&&(N.save(),N.translate(.5,.5),O.shape.paint(N),N.translate(-.5,-.5),N.restore())};U.drawText=function(O,N){};U.drawState(D.getView().getState(D.model.root),S);S.finish(mxUtils.bind(this,function(){try{U.drawState(D.getView().getState(D.model.root),F),D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}catch(O){P=null}x(P)}));+d=!0}}catch(O){d=!1,null!=D&&D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}d||window.clearTimeout(y);return d};(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(g,l){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();g=null!=d?d.getMode():g;g==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):g==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):g==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=g==App.MODE_DEVICE?"pointer":"default")}if(l)try{if(isLocalStorage)localStorage.setItem(".mode",g);else if("undefined"!=typeof Storage){var q=new Date;q.setYear(q.getFullYear()+1);document.cookie="MODE="+g+"; expires="+q.toUTCString()}}catch(y){}}})();App.prototype.appIconClicked=function(b){var g=this.getCurrentFile(),l=null!=g?g.getMode():null;g=null!=g?mxEvent.isAltDown(b)?g.getFolderUrl():g.getFileUrl():null;null!=g?this.openLink(g):l==App.MODE_GOOGLE?this.openLink("https://drive.google.com/?authuser=0"):l==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):l==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):l==App.MODE_GITHUB?this.openLink("https://github.com/"):l==App.MODE_GITLAB?this.openLink(DRAWIO_GITLAB_URL):l==App.MODE_TRELLO?@@ -13796,13 +13797,13 @@ b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.inner2E3)},15E3)}};App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(x,D,J,K,L){"ResizeObserver loop limit exceeded"!=x&&(EditorUi.logError("Uncaught: "+(null!=x?x:""),D,J,K,L,null,!0),b.handleError({message:x},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(x){var D=this.getCurrentFile();EditorUi.debug("storage event",[x],[D]);null!=D&&".draft-alive-check"==x.key&&null!=x.newValue&&null!=D.draftId&&(this.draftAliveCheck=x.newValue,D.saveDraft())}))}catch(x){}var g=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(x){try{var D=this.getDiagramId();if(D!=g){g=D;var J=this.getCurrentFile();null!=J&&J.getHash()==D||this.loadFile(D,!0)}else{var K=this.getHashObject();if(null!=K&&null!=K.pageId&&null!=this.currentPage&&K.pageId!=this.currentPage.getId()){var L=this.getPageById(K.pageId);-null!=L&&this.selectPage(L)}}}catch(Q){null!=document.body&&this.handleError(Q,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var c=this.getCurrentFile();window.location.hash=null!=c?c.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(x){this.handleError(x,mxResources.get("errorLoadingFile"))}))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}else if((null==+null!=L&&this.selectPage(L)}}}catch(P){null!=document.body&&this.handleError(P,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var c=this.getCurrentFile();window.location.hash=null!=c?c.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(x){this.handleError(x,mxResources.get("errorLoadingFile"))}))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var l=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var x=mxUtils.bind(this,function(K){Editor.isPngDataUrl(K)&&(K=Editor.extractGraphModelFromPng(K));var L=urlParams.title;L=null!=L?decodeURIComponent(L):this.defaultFilename;K=new LocalFile(this,K,L,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(K.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(K);this.editor.chromeless||(K.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),D=window.opener||window.parent;if(D!=window){var J=urlParams.create;null!=J?x(D[decodeURIComponent(J)]):(J=urlParams.data,null!=J?x(decodeURIComponent(J)):this.installMessageHandler(mxUtils.bind(this,function(K,L){L.source==D&&x(K)})))}}else if(null==this.dialog)if("1"==urlParams.demo)J=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=J;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),this.actions.get("insertTemplate").funct();else{J=!1;try{J=null!=window.opener&&null!=window.opener.openFile}catch(K){}J?this.spinner.spin(document.body,mxResources.get("loading")):(J=this.getDiagramId(),-!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=J&&0!=J.length||this.editor.isChromelessView()?null!=J&&0<J.length?this.loadFile(J,null,null,mxUtils.bind(this,function(){var K=decodeURIComponent(urlParams.viewbox||"");if(""!=K)try{var L=JSON.parse(K);this.editor.graph.fitWindow(L,L.border)}catch(Q){console.error(Q)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,+!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=J&&0!=J.length||this.editor.isChromelessView()?null!=J&&0<J.length?this.loadFile(J,null,null,mxUtils.bind(this,function(){var K=decodeURIComponent(urlParams.viewbox||"");if(""!=K)try{var L=JSON.parse(K);this.editor.graph.fitWindow(L,L.border)}catch(P){console.error(P)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),d=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&0<d.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var q=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),y=mxUtils.bind(this,function(x){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,-x,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var D=urlParams.title;D=null!=D?decodeURIComponent(D):this.defaultFilename;x=this.getServiceCount(!0);isLocalStorage&&x++;var J=4>=x?2:6<x?4:3;D=new CreateDialog(this,D,mxUtils.bind(this,function(K,L){if(null==L){this.hideDialog();var Q=Editor.useLocalStorage;this.createFile(0<K.length?K:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=Q}else this.pickFolder(L,mxUtils.bind(this,function(c){this.createFile(K,+x,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var D=urlParams.title;D=null!=D?decodeURIComponent(D):this.defaultFilename;x=this.getServiceCount(!0);isLocalStorage&&x++;var J=4>=x?2:6<x?4:3;D=new CreateDialog(this,D,mxUtils.bind(this,function(K,L){if(null==L){this.hideDialog();var P=Editor.useLocalStorage;this.createFile(0<K.length?K:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=P}else this.pickFolder(L,mxUtils.bind(this,function(c){this.createFile(K,this.getFileData(!0),null,L,null,!0,c)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,J,null,null,null,this.editor.fileExtensions);this.showDialog(D.container,420,x>J?390:280,!0,!1,mxUtils.bind(this,function(K){K&&null==this.getCurrentFile()&&this.showSplash()}));D.init()}});if("http://"!=d.substring(0,7)&&"https://"!=d.substring(0,8))if("{"==d.charAt(0))this.spinner.stop(),d=JSON.parse(d),window.isMermaidEnabled&&"mermaid"==d.type?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(x){x!=this.emptyDiagramXml&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["create"])),this.createFile(null!=x.filename?x.filename:this.defaultFilename,x,null,null,null,!0,null,!0),this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct())})),this.generateMermaidImage(d.data,null,function(){},mxUtils.bind(this,function(x){for(var D=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),J=0;J<D.length;J++)D[J].parentNode.removeChild(D[J]);mxMermaidToDrawio.resetListeners();this.handleError(x)}))):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"));else try{null!=window.opener&&null!=window.opener[d]?y(window.opener[d]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}else this.loadTemplate(d,function(x){y(x)},mxUtils.bind(this,function(x){this.handleError(x,mxResources.get("errorLoadingFile"),q)}))}else(null==window.location.hash||1>=@@ -13832,50 +13833,50 @@ this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dd.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if(null!=d.files){for(var y=0;y<d.files.length;y++)mxUtils.bind(this,function(x){var D=new FileReader;D.onload=mxUtils.bind(this,function(J){g(new LocalLibrary(this,J.target.result,x.name))});D.readAsText(x)})(d.files[y]);d.type="";d.type="file";d.value=""}}));d.style.display="none";document.body.appendChild(d);this.libFileInputElt=d}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(y,x){StorageFile.listFiles(this,"L",y,x)});window.openBrowserFile=mxUtils.bind(this,function(y,x,D){StorageFile.getFileContent(this,y,x,D)});window.deleteBrowserFile=mxUtils.bind(this,function(y,x,D){StorageFile.deleteFile(this,y,x,D)});var q=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(y){this.hideDialog(y)}));window.openFile.setConsumer(mxUtils.bind(this,function(y,x){g(b==App.MODE_BROWSER?new StorageLibrary(this,y,x):new LocalLibrary(this,y,x))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=q;window.openFile=null})}};-App.prototype.saveLibrary=function(b,g,l,d,q,y,x){try{d=null!=d?d:this.mode;q=null!=q?q:!1;y=null!=y?y:!1;var D=this.createLibraryDataFromImages(g),J=mxUtils.bind(this,function(Q){this.spinner.stop();null!=x&&x();this.handleError(Q,null!=Q?mxResources.get("errorSavingFile"):null)});null==l&&d==App.MODE_DEVICE&&(l=new LocalLibrary(this,D,b));if(null==l)this.pickFolder(d,mxUtils.bind(this,function(Q){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?-this.drive.insertFile(b,D,Q,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,D,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,Q):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,-D,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,Q):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,D,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,Q):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,D,mxUtils.bind(this,function(c){this.spinner.stop();-this.hideDialog(!0);this.libraryLoaded(c,g)}),J,Q):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,D,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,Q):d==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,D,b),mxUtils.bind(this,function(c){this.hideDialog(!0);this.libraryLoaded(c,g)}),J):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));-else if(q||this.spinner.spin(document.body,mxResources.get("saving"))){l.setData(D);var K=mxUtils.bind(this,function(){l.save(!0,mxUtils.bind(this,function(Q){this.spinner.stop();this.hideDialog(!0);y||this.libraryLoaded(l,g);null!=x&&x()}),J)});if(b!=l.getTitle()){var L=l.getHash();l.rename(b,mxUtils.bind(this,function(Q){l.constructor!=LocalLibrary&&L!=l.getHash()&&(mxSettings.removeCustomLibrary(L),mxSettings.addCustomLibrary(l.getHash()));this.removeLibrarySidebar(L);K()}),J)}else K()}}catch(Q){this.handleError(Q)}};+App.prototype.saveLibrary=function(b,g,l,d,q,y,x){try{d=null!=d?d:this.mode;q=null!=q?q:!1;y=null!=y?y:!1;var D=this.createLibraryDataFromImages(g),J=mxUtils.bind(this,function(P){this.spinner.stop();null!=x&&x();this.handleError(P,null!=P?mxResources.get("errorSavingFile"):null)});null==l&&d==App.MODE_DEVICE&&(l=new LocalLibrary(this,D,b));if(null==l)this.pickFolder(d,mxUtils.bind(this,function(P){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?+this.drive.insertFile(b,D,P,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,D,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,P):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,+D,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,P):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,D,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,P):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,D,mxUtils.bind(this,function(c){this.spinner.stop();+this.hideDialog(!0);this.libraryLoaded(c,g)}),J,P):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,D,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,P):d==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,D,b),mxUtils.bind(this,function(c){this.hideDialog(!0);this.libraryLoaded(c,g)}),J):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));+else if(q||this.spinner.spin(document.body,mxResources.get("saving"))){l.setData(D);var K=mxUtils.bind(this,function(){l.save(!0,mxUtils.bind(this,function(P){this.spinner.stop();this.hideDialog(!0);y||this.libraryLoaded(l,g);null!=x&&x()}),J)});if(b!=l.getTitle()){var L=l.getHash();l.rename(b,mxUtils.bind(this,function(P){l.constructor!=LocalLibrary&&L!=l.getHash()&&(mxSettings.removeCustomLibrary(L),mxSettings.addCustomLibrary(l.getHash()));this.removeLibrarySidebar(L);K()}),J)}else K()}}catch(P){this.handleError(P)}};App.prototype.saveFile=function(b,g){var l=this.getCurrentFile(),d=this.mode;if(null!=l){var q=mxUtils.bind(this,function(){EditorUi.enableDrafts&&l.removeDraft();this.getCurrentFile()==l||l.isModified()||(l.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=g&&g()});if(b||null==l.getTitle()||null!=l.invalidFileHandle||null==this.mode)if(null!=l&&l.constructor==LocalFile&&null!=l.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,function(D,J){l.invalidFileHandle=null;l.fileHandle=D;l.title=J.name;l.desc=J;l.editable=null;this.save(J.name,q)}),null,this.createFileSystemOptions(l.getTitle()));else{b=null!=l.getTitle()?l.getTitle():this.defaultFilename;var y=mxUtils.bind(this,function(D,J,K,L){if(null!=D&&0<D.length)if(/(\.pdf)$/i.test(D))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){K.value=D.split(".").slice(0,-1).join(".");K.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==d&&J==App.MODE_DEVICE)null!=l&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(c,e){l.fileHandle=c;l.mode=App.MODE_DEVICE;l.title=e.name;l.desc=e;this.setMode(App.MODE_DEVICE);this.save(e.name,q)}),mxUtils.bind(this,function(c){"AbortError"!=c.name&&this.handleError(c)}),-this.createFileSystemOptions(D)):(this.setMode(App.MODE_DEVICE),this.save(D,q));else if("download"==J)(new LocalFile(this,null,D)).save();else if("_blank"==J)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(d!=J){var Q=mxUtils.bind(this,function(c){var e=this.editor.graph,f=e.getSelectionCells(),p=e.getViewState(),n=this.currentPage;this.createFile(D,this.getFileData(/(\.xml)$/i.test(D)||-0>D.indexOf(".")||/(\.drawio)$/i.test(D),/(\.svg)$/i.test(D),/(\.html)$/i.test(D)),null,J,q,null==this.mode,c,null,null,mxUtils.bind(this,function(){this.restoreViewState(n,p,f)}))});null!=L?Q(L):this.pickFolder(J,Q)}else null!=J&&this.save(D,q)}),x=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(D,J,K){y(D.value,J,D,K);this.hideDialog()}),x?null:["_blank"]);this.showDialog(b.container,420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(l.getTitle(),+this.createFileSystemOptions(D)):(this.setMode(App.MODE_DEVICE),this.save(D,q));else if("download"==J)(new LocalFile(this,null,D)).save();else if("_blank"==J)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(d!=J){var P=mxUtils.bind(this,function(c){var e=this.editor.graph,f=e.getSelectionCells(),p=e.getViewState(),n=this.currentPage;this.createFile(D,this.getFileData(/(\.xml)$/i.test(D)||+0>D.indexOf(".")||/(\.drawio)$/i.test(D),/(\.svg)$/i.test(D),/(\.html)$/i.test(D)),null,J,q,null==this.mode,c,null,null,mxUtils.bind(this,function(){this.restoreViewState(n,p,f)}))});null!=L?P(L):this.pickFolder(J,P)}else null!=J&&this.save(D,q)}),x=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(D,J,K){y(D.value,J,D,K);this.hideDialog()}),x?null:["_blank"]);this.showDialog(b.container,420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(l.getTitle(),q)}};App.prototype.loadTemplate=function(b,g,l,d,q){var y=!1,x=b,D=null!=d?d:b;d=/\.png$/i.test(D)||/\.pdf$/i.test(D);var J=EditorUi.isVisioFilename(D);this.editor.isCorsEnabledForUrl(x)||(y=d||J,x="t="+(new Date).getTime(),x=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+x+(y?"&base64=1":""));this.editor.loadUrl(x,mxUtils.bind(this,function(K){try{var L=y?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(K):atob(K):K;if(J||this.isVisioData(L))J||(D=q?this.isRemoteVisioData(L)?"raw.vss":"raw.vssx":this.isRemoteVisioData(L)?-"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(Q){g(Q)},l,D);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(L,D))this.isExternalDataComms()?this.parseFileData(L,mxUtils.bind(this,function(Q){4==Q.readyState&&200<=Q.status&&299>=Q.status&&"<mxGraphModel"==Q.responseText.substring(0,13)&&g(Q.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l);else if(this.isLucidChartData(L))this.convertLucidChart(L,-mxUtils.bind(this,function(Q){g(Q)}),mxUtils.bind(this,function(Q){l(Q)}));else{if(/(\.png)($|\?)/i.test(D)||Editor.isPngData(L))L=Editor.extractGraphModelFromPng(K);g(L)}}catch(Q){l(Q)}}),l,/(\.png)($|\?)/i.test(D)||J,null,null,y)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};+"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(P){g(P)},l,D);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(L,D))this.isExternalDataComms()?this.parseFileData(L,mxUtils.bind(this,function(P){4==P.readyState&&200<=P.status&&299>=P.status&&"<mxGraphModel"==P.responseText.substring(0,13)&&g(P.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l);else if(this.isLucidChartData(L))this.convertLucidChart(L,+mxUtils.bind(this,function(P){g(P)}),mxUtils.bind(this,function(P){l(P)}));else{if(/(\.png)($|\?)/i.test(D)||Editor.isPngData(L))L=Editor.extractGraphModelFromPng(K);g(L)}}catch(P){l(P)}}),l,/(\.png)($|\?)/i.test(D)||J,null,null,y)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};App.prototype.isModeEnabled=function(b){return b==App.MODE_GOOGLE?"function"===typeof window.DriveClient&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode):b==App.MODE_GITHUB?null!=this.gitHub:b==App.MODE_GITLAB?null!=this.gitLab:b==App.MODE_DROPBOX?"function"===typeof window.DropboxClient&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):b==App.MODE_ONEDRIVE?"function"===typeof window.OneDriveClient&&("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode):b==App.MODE_TRELLO?"function"===typeof window.TrelloClient&&"1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):!1};App.prototype.isModeReady=function(b){return null!=this.getServiceForName(b)&&(b!=App.MODE_DROPBOX||"undefined"!==typeof Dropbox.choose)};App.prototype.uncompressPages=function(b){if(null!=b)try{var g=mxUtils.parseXml(b);if("mxfile"==g.documentElement.nodeName){for(var l=g.documentElement.getElementsByTagName("diagram"),d=0;d<l.length;d++){var q=Editor.parseDiagramNode(l[d],!0);null!=q&&(mxUtils.setTextContent(l[d],""),l[d].appendChild(q))}b=mxUtils.getPrettyXml(g.documentElement)}}catch(y){}return b};-App.prototype.createFile=function(b,g,l,d,q,y,x,D,J,K){d=D?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){g=null!=g?g:this.emptyDiagramXml;null==g||Editor.defaultCompressed||(g=this.uncompressPages(g));var L=mxUtils.bind(this,function(){this.spinner.stop()}),Q=mxUtils.bind(this,function(e){L();null==e&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=e&&this.handleError(e)});try{var c=mxUtils.bind(this,function(e){L();this.fileCreated(e,-l,y,q,J,K)});d==App.MODE_GOOGLE&&null!=this.drive?(null==x&&null!=this.stateArg&&null!=this.stateArg.folderId&&(x=this.stateArg.folderId),this.drive.insertFile(b,g,x,c,Q)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,g,c,Q,!1,x):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,g,c,Q,!1,x):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,g,c,Q,!1,x):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,g,c,Q):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?-this.oneDrive.insertFile(b,g,c,Q,!1,x):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,g,c,Q):!D&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(L(),this.showSaveFilePicker(mxUtils.bind(this,function(e,f){var p=new LocalFile(this,g,f.name,null,e,f);p.saveFile(f.name,!1,mxUtils.bind(this,function(){this.fileCreated(p,l,y,q,J,K)}),Q,!0)}),mxUtils.bind(this,function(e){"AbortError"!=e.name&&Q(e)}),this.createFileSystemOptions(b))):(L(),this.fileCreated(new LocalFile(this,g,b,null==d),l,y,q,J,K))}catch(e){L(),+App.prototype.createFile=function(b,g,l,d,q,y,x,D,J,K){d=D?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){g=null!=g?g:this.emptyDiagramXml;null==g||Editor.defaultCompressed||(g=this.uncompressPages(g));var L=mxUtils.bind(this,function(){this.spinner.stop()}),P=mxUtils.bind(this,function(e){L();null==e&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=e&&this.handleError(e)});try{var c=mxUtils.bind(this,function(e){L();this.fileCreated(e,+l,y,q,J,K)});d==App.MODE_GOOGLE&&null!=this.drive?(null==x&&null!=this.stateArg&&null!=this.stateArg.folderId&&(x=this.stateArg.folderId),this.drive.insertFile(b,g,x,c,P)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,g,c,P,!1,x):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,g,c,P,!1,x):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,g,c,P,!1,x):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,g,c,P):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?+this.oneDrive.insertFile(b,g,c,P,!1,x):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,g,c,P):!D&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(L(),this.showSaveFilePicker(mxUtils.bind(this,function(e,f){var p=new LocalFile(this,g,f.name,null,e,f);p.saveFile(f.name,!1,mxUtils.bind(this,function(){this.fileCreated(p,l,y,q,J,K)}),P,!0)}),mxUtils.bind(this,function(e){"AbortError"!=e.name&&P(e)}),this.createFileSystemOptions(b))):(L(),this.fileCreated(new LocalFile(this,g,b,null==d),l,y,q,J,K))}catch(e){L(),this.handleError(e)}}};App.prototype.fileCreated=function(b,g,l,d,q,y){var x=window.location.pathname;null!=g&&0<g.length&&(x+="?libs="+g);null!=q&&0<q.length&&(x+="?clibs="+q);x=this.getUrl(x);b.getMode()!=App.MODE_DEVICE&&(x+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var D=b.getData();D=0<D.length?this.editor.extractGraphModel(mxUtils.parseXml(D).documentElement,!0):null;var J=window.location.protocol+"//"+window.location.hostname+x,K=D,L=null;null!=D&&/\.svg$/i.test(b.getTitle())&&(L=-this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(L.container),K=this.decodeNodeIntoGraph(K,L));b.setData(this.createFileData(D,L,b,J));null!=L&&L.container.parentNode.removeChild(L.container);var Q=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(){Q();var e=this.getCurrentFile();null==l&&null!=e&&(l=!e.isModified()&&null==e.getMode());var f=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,y);l&&b.addAllSavedStatus();+this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(L.container),K=this.decodeNodeIntoGraph(K,L));b.setData(this.createFileData(D,L,b,J));null!=L&&L.container.parentNode.removeChild(L.container);var P=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(){P();var e=this.getCurrentFile();null==l&&null!=e&&(l=!e.isModified()&&null==e.getMode());var f=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,y);l&&b.addAllSavedStatus();null!=g&&this.sidebar.showEntries(g);if(null!=q){for(var n=[],t=q.split(";"),z=0;z<t.length;z++)n.push(decodeURIComponent(t[z]));this.loadLibraries(n)}null!=d&&d()}),p=mxUtils.bind(this,function(){l||null==e||!e.isModified()?f():this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==l||l?p():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),-null==b.getMode())),window.geOpenWindow(x,null,p))});b.constructor==LocalFile?c():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){c()}),mxUtils.bind(this,function(e){Q();null!=e&&"AbortError"==e.name||this.handleError(e)}))}};+null==b.getMode())),window.geOpenWindow(x,null,p))});b.constructor==LocalFile?c():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){c()}),mxUtils.bind(this,function(e){P();null!=e&&"AbortError"==e.name||this.handleError(e)}))}};App.prototype.loadFile=function(b,g,l,d,q){if("1"==urlParams.openInSameWin||navigator.standalone)g=!0;this.hideDialog();var y=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var J=mxUtils.bind(this,function(e){this.handleError(e,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var f=this.getCurrentFile();window.location.hash=null!=f?f.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(e){null!=e?(this.fileLoaded(new StorageFile(this,e,b)),null!=d&&d()):J({message:mxResources.get("fileNotFound")})}),J)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var e=this.getCurrentFile();window.location.hash=null!=e?e.getHash():""}));else if(null!=l)this.spinner.stop(),this.fileLoaded(l),null!=d&&d();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var K=decodeURIComponent(b.substring(1));"<"!=K.charAt(0)&&(K=Graph.decompress(K));K=new LocalFile(this,K,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);K.getHash=function(){return b};this.fileLoaded(K);null!=d&&d()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(e,f){this.spinner.stop();this.fileLoaded(new EmbedFile(this,e,f));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var L=decodeURIComponent(b.substring(1)),Q=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=L.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var e=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var f=L.substring(31,L.lastIndexOf("&ex"));this.loadFile("G"+f,g,null,mxUtils.bind(this,function(){var p=this.getCurrentFile();null!=p&&this.editor.chromeless&&+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var L=decodeURIComponent(b.substring(1)),P=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=L.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var e=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var f=L.substring(31,L.lastIndexOf("&ex"));this.loadFile("G"+f,g,null,mxUtils.bind(this,function(){var p=this.getCurrentFile();null!=p&&this.editor.chromeless&&!this.editor.editable&&(p.getHash=function(){return"G"+f},window.location.hash="#"+p.getHash());null!=d&&d()}));return!0}return!1});!e()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",e);return!0});this.loadTemplate(L,mxUtils.bind(this,function(e){this.spinner.stop();if(null!=e&&0<e.length){var f=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var p=L,n=L.lastIndexOf("."),t=p.lastIndexOf("/");n>t&&0<t&&(p=p.substring(t+1,n),n=L.substring(n),-this.useCanvasForExport||".png"!=n||(n=".drawio"),".svg"===n||".xml"===n||".html"===n||".png"===n||".drawio"===n)&&(f=p+n)}e=new LocalFile(this,e,null!=urlParams.title?decodeURIComponent(urlParams.title):f,!0);e.getHash=function(){return b};this.fileLoaded(e,!0)?null!=d&&d():Q()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else Q()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,-function(){Q()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var c=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var e=this.getServiceForName(c);if(null==e)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var p=this.getCurrentFile();+this.useCanvasForExport||".png"!=n||(n=".drawio"),".svg"===n||".xml"===n||".html"===n||".png"===n||".drawio"===n)&&(f=p+n)}e=new LocalFile(this,e,null!=urlParams.title?decodeURIComponent(urlParams.title):f,!0);e.getHash=function(){return b};this.fileLoaded(e,!0)?null!=d&&d():P()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else P()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,+function(){P()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var c=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var e=this.getServiceForName(c);if(null==e)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var p=this.getCurrentFile();window.location.hash=null!=p?p.getHash():""}));else{var f=b.charAt(0);b=decodeURIComponent(b.substring(1));e.getFile(b,mxUtils.bind(this,function(p){this.spinner.stop();this.fileLoaded(p);var n=this.getCurrentFile();if(null==n)window.location.hash="",this.showSplash();else if(this.editor.chromeless&&!this.editor.editable){n.getHash=function(){return f+b};p="#"+n.getHash();try{var t=this.getHashObject();null==t||mxUtils.isEmptyObject(t)||(p=p+"#"+encodeURIComponent(JSON.stringify(t)))}catch(z){}window.location.replace(p)}else p==n&&null==p.getMode()&&(t=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+t+'" class="geStatusAlert">'+t+"</div>"));null!=d&&d()}),mxUtils.bind(this,function(p){null!=window.console&&null!=p&&console.log("error in loadFile:",b,p);var n=mxUtils.bind(this,function(){var t=this.getCurrentFile();null==t?(window.location.hash="",this.showSplash()):window.location.hash="#"+t.getHash()});null==p||"AbortError"!=p.name?this.handleError(p,null!=p?mxResources.get("errorLoadingFile"):null,n,null,null,"#"+f+b):n()}))}})()}}),x=this.getCurrentFile(),D=mxUtils.bind(this,function(){q||null==x||!x.isModified()?y():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=x&&(window.location.hash=x.getHash())}),y,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?D():null==x||g?D():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,D)).container,320,160,!0,!0)};App.prototype.getLibraryStorageHint=function(b){var g=b.getTitle();b.constructor!=LocalLibrary&&(g+="\n"+b.getHash());b.constructor==DriveLibrary?g+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?g+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?g+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?g+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?g+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?g+=" ("+mxResources.get("browser")+")":b.constructor==LocalLibrary&&(g+=" ("+mxResources.get("device")+")");return g};App.prototype.restoreLibraries=function(){function b(l){for(var d=0;d<l.length;d++)""!=l[d]&&0>mxUtils.indexOf(g,l[d])&&g.push(l[d])}var g=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(g)};App.prototype.loadLibraries=function(b,g){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var l=mxUtils.bind(this,function(K,L){L||mxSettings.removeCustomLibrary(K);delete this.loadedLibraries[K]}),d=0,q=[],y=0<b.length&&"L.scratchpad"==b[0]?1:0,x=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var K=b.length-1;0<=K;K--)null!=q[K]&&this.loadLibrary(q[K],K<=y);null!=g&&g()}});if(null!=b)for(var D=0;D<b.length;D++){var J=encodeURIComponent(decodeURIComponent(b[D]));-mxUtils.bind(this,function(K,L){if(null!=K&&0<K.length&&null==this.loadedLibraries[K]&&null==this.sidebar.palettes[K]){this.loadedLibraries[K]=!0;d++;var Q=mxUtils.bind(this,function(t){q[L]=t;d--;x()}),c=mxUtils.bind(this,function(t){l(K,t);d--;x()}),e=K.substring(0,1);if("L"==e)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var t=decodeURIComponent(K.substring(1));StorageFile.getFileContent(this,t,mxUtils.bind(this,function(z){".scratchpad"==t&&null==-z&&(z=this.emptyLibraryXml);null!=z?Q(new StorageLibrary(this,z,t)):c()}),c)}catch(z){c()}}),0);else if("U"==e){var f=decodeURIComponent(K.substring(1));this.isOffline()?c(!0):this.loadTemplate(f,mxUtils.bind(this,function(t){null!=t&&0<t.length?Q(new UrlLibrary(this,t,f)):c()}),function(){c()},null,!0)}else if("R"==e){e=decodeURIComponent(K.substring(1));try{e=JSON.parse(e);var p={id:e[0],title:e[1],downloadUrl:e[2]};this.remoteInvoke("getFileContent",[p.downloadUrl],null,mxUtils.bind(this,function(t){try{Q(new RemoteLibrary(this,-t,p))}catch(z){c()}}),function(){c()})}catch(t){c()}}else if("S"==e&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(K.substring(1)),function(t){Q(t)},c)}catch(t){c()}else{var n=null;"G"==e?null!=this.drive&&null!=this.drive.user&&(n=this.drive):"H"==e?null!=this.gitHub&&null!=this.gitHub.getUser()&&(n=this.gitHub):"T"==e?null!=this.trello&&this.trello.isAuthorized()&&(n=this.trello):"D"==e?null!=this.dropbox&&null!=this.dropbox.getUser()&&(n=this.dropbox):"W"==e&&null!=this.oneDrive&&-null!=this.oneDrive.getUser()&&(n=this.oneDrive);null!=n?n.getLibrary(decodeURIComponent(K.substring(1)),mxUtils.bind(this,function(t){try{Q(t)}catch(z){c()}}),function(t){c()}):c(!0)}}})(J,D)}x()}};+mxUtils.bind(this,function(K,L){if(null!=K&&0<K.length&&null==this.loadedLibraries[K]&&null==this.sidebar.palettes[K]){this.loadedLibraries[K]=!0;d++;var P=mxUtils.bind(this,function(t){q[L]=t;d--;x()}),c=mxUtils.bind(this,function(t){l(K,t);d--;x()}),e=K.substring(0,1);if("L"==e)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var t=decodeURIComponent(K.substring(1));StorageFile.getFileContent(this,t,mxUtils.bind(this,function(z){".scratchpad"==t&&null==+z&&(z=this.emptyLibraryXml);null!=z?P(new StorageLibrary(this,z,t)):c()}),c)}catch(z){c()}}),0);else if("U"==e){var f=decodeURIComponent(K.substring(1));this.isOffline()?c(!0):this.loadTemplate(f,mxUtils.bind(this,function(t){null!=t&&0<t.length?P(new UrlLibrary(this,t,f)):c()}),function(){c()},null,!0)}else if("R"==e){e=decodeURIComponent(K.substring(1));try{e=JSON.parse(e);var p={id:e[0],title:e[1],downloadUrl:e[2]};this.remoteInvoke("getFileContent",[p.downloadUrl],null,mxUtils.bind(this,function(t){try{P(new RemoteLibrary(this,+t,p))}catch(z){c()}}),function(){c()})}catch(t){c()}}else if("S"==e&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(K.substring(1)),function(t){P(t)},c)}catch(t){c()}else{var n=null;"G"==e?null!=this.drive&&null!=this.drive.user&&(n=this.drive):"H"==e?null!=this.gitHub&&null!=this.gitHub.getUser()&&(n=this.gitHub):"T"==e?null!=this.trello&&this.trello.isAuthorized()&&(n=this.trello):"D"==e?null!=this.dropbox&&null!=this.dropbox.getUser()&&(n=this.dropbox):"W"==e&&null!=this.oneDrive&&+null!=this.oneDrive.getUser()&&(n=this.oneDrive);null!=n?n.getLibrary(decodeURIComponent(K.substring(1)),mxUtils.bind(this,function(t){try{P(t)}catch(z){c()}}),function(t){c()}):c(!0)}}})(J,D)}x()}};App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&(this.buttonContainer.style.paddingRight="1"==urlParams.atlas?"32px":"8px");this.commentsSupported()&&"simple"!=Editor.currentTheme&&"atlas"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton geAdaptiveAsset",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;width:24px;height:24px;background-size:24px 24px;background-position:center center;cursor:pointer;background-repeat:no-repeat;background-image:url("+Editor.commentImage+");",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),null!=this.userElement&&this.userElement.parentNode==this.buttonContainer?this.buttonContainer.insertBefore(this.commentButton,this.userElement):null!=this.shareButton&&this.shareButton.parentNode==this.buttonContainer?this.buttonContainer.insertBefore(this.commentButton,this.shareButton):this.buttonContainer.appendChild(this.commentButton)):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=null);if("draw.io"!=this.getServiceName()||"1"==urlParams.embed||this.isStandaloneApp())null!=urlParams.notif&&@@ -13891,8 +13892,8 @@ d++;if(0==d)null!=this.notificationBtn&&(this.notificationBtn.style.display="non"geNotification-box";d=document.createElement("span");d.className="geNotification-count";this.notificationBtn.appendChild(d);this.notifCount=d;d=document.createElement("div");d.className="geNotification-bell";q=document.createElement("span");q.className="geBell-top";d.appendChild(q);q=document.createElement("span");q.className="geBell-middle";d.appendChild(q);q=document.createElement("span");q.className="geBell-bottom";d.appendChild(q);q=document.createElement("span");q.className="geBell-rad";d.appendChild(q);this.notificationBtn.appendChild(d);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);q=document.createElement("div");q.className="header";d=document.createElement("span");d.className="title";d.textContent=mxResources.get("notifications");q.appendChild(d);d=document.createElement("span");d.className="closeBtn";d.textContent="x";q.appendChild(d);this.notificationWin.appendChild(q);q=document.createElement("div");q.className="notifications clearfix";var x=document.createElement("div");x.setAttribute("id","geNotifList");x.style.position="relative";q.appendChild(x);this.notificationWin.appendChild(q);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=-0;var K=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=K.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=K.right-this.notificationWin.clientWidth+"px";l(0)}else y()}));mxEvent.addListener(d,"click",y)}else this.notificationBtn.style.display="";var D=0,J=document.getElementById("geNotifList");if(null!=J){J.innerHTML='<div class="line"></div>';for(q=0;q<b.length;q++)(function(K,L){L.isNew&&D++;var Q=document.createElement("div");Q.className="notification";-K=K.timeSince(new Date(L.timestamp));null==K&&(K=mxResources.get("lessThanAMinute"));Q.innerHTML='<div class="circle'+(L.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[K],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(L.content)+"</p>";L.link&&mxEvent.addListener(Q,"click",function(){window.open(L.link,"notifWin")});J.appendChild(Q)})(this,b[q]);l(D)}}};+0;var K=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=K.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=K.right-this.notificationWin.clientWidth+"px";l(0)}else y()}));mxEvent.addListener(d,"click",y)}else this.notificationBtn.style.display="";var D=0,J=document.getElementById("geNotifList");if(null!=J){J.innerHTML='<div class="line"></div>';for(q=0;q<b.length;q++)(function(K,L){L.isNew&&D++;var P=document.createElement("div");P.className="notification";+K=K.timeSince(new Date(L.timestamp));null==K&&(K=mxResources.get("lessThanAMinute"));P.innerHTML='<div class="circle'+(L.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[K],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(L.content)+"</p>";L.link&&mxEvent.addListener(P,"click",function(){window.open(L.link,"notifWin")});J.appendChild(P)})(this,b[q]);l(D)}}};App.prototype.save=function(b,g){var l=this.getCurrentFile(),d=!0,q=mxUtils.bind(this,function(){d&&(d=!1,l.handleFileSuccess(!0),null!=g&&g())}),y=mxUtils.bind(this,function(x){if(d){d=!1;Editor.addRetryToError(x,mxUtils.bind(this,function(){this.save(b,g)}));if(null!=x&&null!=x.retry){var D=x.retry;x.retry=function(){d=!0;try{l.isModified()?D():q()}catch(J){y(J)}}}l.handleFileError(x,null==x||"AbortError"!=x.name)}});if(null!=l&&this.spinner.spin(document.body,mxResources.get("saving"),y,3*this.timeout))try{this.editor.setStatus(""),this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),b==l.getTitle()?l.save(!0,q,y):l.saveAs(b,q,y)}catch(x){y(x)}};App.prototype.getExtensionForService=function(b){b=this.getServiceForName(b);return null!=b?b.extension:".drawio"};App.prototype.getServiceForName=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:null};App.prototype.getTitleForService=function(b){return b==App.MODE_GOOGLE?mxResources.get("googleDrive"):b==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):EditorUi.prototype.getTitleForService.apply(this,arguments)};@@ -13906,7 +13907,7 @@ function(){localStorage.setItem(g,b)}),null==localStorage.getItem(g)?l():this.coApp.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerText="";var g=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,g);this.fname.setAttribute("title",g+" - "+mxResources.get("rename"))}g=this.editor.graph;var l=b.isEditable();g.isEnabled()&&!l&&g.reset();g.setEnabled(l);null==urlParams.rev&&(this.updateDocumentTitle(),g=b.getHash(),0<g.length?(g!=this.getDiagramId()&&(window.location.hash=g),this.updateHashObject()):0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};App.prototype.showAuthDialog=function(b,g,l,d){var q=this.spinner.pause();this.showDialog((new AuthDialog(this,b,g,mxUtils.bind(this,function(y){try{null!=l&&l(y,mxUtils.bind(this,function(){this.hideDialog();q()}))}catch(x){this.editor.setStatus(mxUtils.htmlEntities(x.message))}}))).container,300,g?180:140,!0,!0,mxUtils.bind(this,function(y){null!=d&&d(y);y&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};-App.prototype.convertFile=function(b,g,l,d,q,y,x,D){var J=g;/\.svg$/i.test(J)||(J=J.substring(0,g.lastIndexOf("."))+d);var K=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(K=!0);if(/\.v(dx|sdx?)$/i.test(g)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var L=new XMLHttpRequest;L.open("GET",b,!0);K||(L.responseType="blob");if(D)for(var Q in D)L.setRequestHeader(Q,D[Q]);L.onload=mxUtils.bind(this,function(){if(200<=+App.prototype.convertFile=function(b,g,l,d,q,y,x,D){var J=g;/\.svg$/i.test(J)||(J=J.substring(0,g.lastIndexOf("."))+d);var K=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(K=!0);if(/\.v(dx|sdx?)$/i.test(g)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var L=new XMLHttpRequest;L.open("GET",b,!0);K||(L.responseType="blob");if(D)for(var P in D)L.setRequestHeader(P,D[P]);L.onload=mxUtils.bind(this,function(){if(200<=L.status&&299>=L.status){var e=null;K?(e=JSON.parse(L.responseText),e=this.base64ToBlob(e.content,"application/octet-stream")):e=new Blob([L.response],{type:"application/octet-stream"});this.importVisio(e,mxUtils.bind(this,function(f){q(new LocalFile(this,f,J,!0))}),y,g)}else null!=y&&y({message:mxResources.get("errorLoadingFile")})});L.onerror=y;L.send()}else{var c=mxUtils.bind(this,function(e){try{if(/\.pdf$/i.test(g)){var f=Editor.extractGraphModelFromPdf(e);null!=f&&0<f.length&&q(new LocalFile(this,f,J,!0))}else/\.png$/i.test(g)?(f=this.extractGraphModelFromPng(e),null!=f?q(new LocalFile(this,f,J,!0)):q(new LocalFile(this,e,g,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,b)?this.parseFileData(e,mxUtils.bind(this,function(p){4==p.readyState&&(200<=p.status&&299>=p.status?q(new LocalFile(this,p.responseText,J,!0)):null!=y&&y({message:mxResources.get("errorLoadingFile")}))}),g):q(new LocalFile(this,e,J,!0))}catch(p){null!=y&&y(p)}});l=/\.png$/i.test(g)||/\.jpe?g$/i.test(g)||/\.pdf$/i.test(g)||null!=l&&"image/"==l.substring(0,6);K?mxUtils.get(b,mxUtils.bind(this,function(e){if(200<=e.getStatus()&&299>=e.getStatus()){if(null!=q){e=JSON.parse(e.getText());var f=e.content;"base64"===e.encoding&&(f=/\.png$/i.test(g)?"data:image/png;base64,"+f:/\.pdf$/i.test(g)?"data:application/pdf;base64,"+f:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(f):atob(f));c(f)}}else null!=y&&y({code:App.ERROR_UNKNOWN})}),function(){null!=y&&y({code:App.ERROR_UNKNOWN})},!1,this.timeout,@@ -13941,12 +13942,12 @@ App.prototype.toggleUserPanel=function(){if(null==this.userPanel){var b=documentD),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();x()}),2E3)):x()});b=mxUtils.bind(this,function(x){var D=document.createElement("tr"),J=document.createElement("td");J.setAttribute("valig","middle");J.style.height="59px";J.style.width="66px";var K=document.createElement("img");K.setAttribute("width","50");K.setAttribute("height","50");K.setAttribute("border","0");K.setAttribute("src",null!=x.pictureUrl?x.pictureUrl:this.defaultUserPicture);K.style.borderRadius="50%";K.style.margin="4px 8px 0 8px";J.appendChild(K);D.appendChild(J);J=document.createElement("td");J.setAttribute("valign","middle");J.style.whiteSpace="nowrap";J.style.paddingTop="4px";J.style.maxWidth="0";J.style.overflow="hidden";J.style.textOverflow="ellipsis";mxUtils.write(J,x.displayName+(x.isCurrent&&1<l.length?" ("+mxResources.get("default")+")":""));null!=x.email&&(mxUtils.br(J),K=document.createElement("small"),K.style.color="gray",mxUtils.write(K,x.email),J.appendChild(K));K=document.createElement("div");K.style.marginTop="4px";var L=document.createElement("i");mxUtils.write(L,mxResources.get("googleDrive"));K.appendChild(L);J.appendChild(K);D.appendChild(J);x.isCurrent?D.setAttribute("title","User ID: "+x.id):(D.setAttribute("title",mxResources.get("login")+" (User ID: "+x.id+")"),D.style.cursor="pointer",D.style.opacity="0.3",mxEvent.addListener(D,"mouseenter",mxUtils.bind(this,function(){D.style.opacity="1"})),mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(){D.style.opacity="0.3"})),-mxEvent.addListener(D,"click",mxUtils.bind(this,function(Q){this.hideUserPanel();d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(x);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(c){this.handleError(c)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(Q)})));return D});g=!0;var q=document.createElement("table");q.style.borderSpacing="0";q.style.fontSize="10pt";q.style.width=+mxEvent.addListener(D,"click",mxUtils.bind(this,function(P){this.hideUserPanel();d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(x);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(c){this.handleError(c)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(P)})));return D});g=!0;var q=document.createElement("table");q.style.borderSpacing="0";q.style.fontSize="10pt";q.style.width="100%";q.style.padding="10px";for(var y=0;y<l.length;y++)q.appendChild(b(l[y]));this.userPanel.appendChild(q);b=document.createElement("div");b.style.textAlign="left";b.style.padding="10px";b.style.whiteSpace="nowrap";b.style.borderTopStyle="solid";b.style.borderTopWidth="1px";q=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));q.className="geBtn";q.style.float="right";b.appendChild(q);q=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var x=this.drive.createAuthWin();x.blur();window.focus();d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(D){this.handleError(D)}),!0,x)}),mxResources.get("closingFile")+-"...")}));q.className="geBtn";q.style.margin="0px";b.appendChild(q);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(x,D,J,K){if(null!=x){g&&this.userPanel.appendChild(document.createElement("hr"));g=!0;var L=document.createElement("table");L.style.borderSpacing="0";L.style.fontSize="10pt";L.style.width="100%";L.style.padding="10px";var Q=document.createElement("tbody"),c=document.createElement("tr"),e=document.createElement("td");e.setAttribute("valig","top");e.style.width="40px";if(null!=+"...")}));q.className="geBtn";q.style.margin="0px";b.appendChild(q);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(x,D,J,K){if(null!=x){g&&this.userPanel.appendChild(document.createElement("hr"));g=!0;var L=document.createElement("table");L.style.borderSpacing="0";L.style.fontSize="10pt";L.style.width="100%";L.style.padding="10px";var P=document.createElement("tbody"),c=document.createElement("tr"),e=document.createElement("td");e.setAttribute("valig","top");e.style.width="40px";if(null!=D){var f=document.createElement("img");f.setAttribute("width","40");f.setAttribute("height","40");f.setAttribute("border","0");f.setAttribute("src",D);f.style.marginRight="6px";e.appendChild(f)}c.appendChild(e);e=document.createElement("td");e.setAttribute("valign","middle");e.style.whiteSpace="nowrap";e.style.maxWidth="0";e.style.overflow="hidden";e.style.textOverflow="ellipsis";mxUtils.write(e,x.displayName);null!=x.email&&(mxUtils.br(e),D=document.createElement("small"),D.style.color="gray",mxUtils.write(D,-x.email),e.appendChild(D));null!=K&&(x=document.createElement("div"),x.style.marginTop="4px",D=document.createElement("i"),mxUtils.write(D,K),x.appendChild(D),e.appendChild(x));c.appendChild(e);Q.appendChild(c);L.appendChild(Q);this.userPanel.appendChild(L);x=document.createElement("div");x.style.textAlign="center";x.style.padding="10px";x.style.whiteSpace="nowrap";null!=J&&(J=mxUtils.button(mxResources.get("signOut"),J),J.className="geBtn",x.appendChild(J));this.userPanel.appendChild(x)}});null!=+x.email),e.appendChild(D));null!=K&&(x=document.createElement("div"),x.style.marginTop="4px",D=document.createElement("i"),mxUtils.write(D,K),x.appendChild(D),e.appendChild(x));c.appendChild(e);P.appendChild(c);L.appendChild(P);this.userPanel.appendChild(L);x=document.createElement("div");x.style.textAlign="center";x.style.padding="10px";x.style.whiteSpace="nowrap";null!=J&&(J=mxUtils.button(mxResources.get("signOut"),J),J.className="geBtn",x.appendChild(J));this.userPanel.appendChild(x)}});null!=this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var x=this.getCurrentFile();if(null!=x&&x.constructor==DropboxFile){var D=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});x.isModified()?this.confirm(mxResources.get("allChangesLost"),null,D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var x=this.getCurrentFile();if(null!=x&&x.constructor==OneDriveFile){var D=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});x.isModified()?this.confirm(mxResources.get("allChangesLost"),null,D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var x=this.getCurrentFile();if(null!=x&&x.constructor==GitHubFile){var D=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});x.isModified()?this.confirm(mxResources.get("allChangesLost"),null,D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&b(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var x=this.getCurrentFile();if(null!=x&&x.constructor==GitLabFile){var D=@@ -13959,7 +13960,7 @@ Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);nud.style.marginLeft="4px";d.style.cursor="help";d.style.color="blue";var q=document.createElement("img");q.setAttribute("src",Editor.helpImage);q.setAttribute("valign","bottom");q.setAttribute("border","0");q.className="geAdaptiveAsset";mxUtils.setOpacity(q,60);q.style.height="16px";q.style.width="16px";d.appendChild(q);mxEvent.addGestureListeners(d,mxUtils.bind(this,function(y){this.editorUi.hideCurrentMenu();this.editorUi.openLink(l);mxEvent.consume(y)}));return d};Menus.prototype.addLinkToItem=function(l,d){null!=l&&(d=this.createHelpLink(d),d.style.display="inline",d.style.marginLeft="8px",l.firstChild.nextSibling.appendChild(d))};Menus.prototype.removeCustomFont=function(l,d){for(var q=0;q<this.customFonts.length;q++)if(this.customFonts[q].name==l&&this.customFonts[q].url==d){this.customFonts.splice(q,1);this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));break}};Menus.prototype.containsFont=function(l,d){for(var q=0;q<this.customFonts.length;q++)if(this.customFonts[q].name==l&&this.customFonts[q].url==d)return!0;for(q=0;q<this.defaultFonts.length;q++){var y=this.defaultFonts[q];if("string"!==typeof y&&y.fontFamily==l&&y.fontUrl==d||"string"===typeof y&&y==l&&null==d)return!0}return!1};Menus.prototype.addCustomFont=function(l,d){null==l||this.containsFont(l,d)||(this.customFonts.push({name:l,url:d}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var g=Menus.prototype.init;Menus.prototype.init=function(){function l(m,-u,A){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(B,H,T,k,v,G,I,M,N,S,V,W,X){var Z=parseInt(B);!isNaN(Z)&&0<Z&&(d.exportImage(Z/100,H&&"png"==m,T,k,v&&"png"==m,I,!M,N,m,V,null,W,X),null!=A&&A(B,H,T,k,v,G,I,M,N,S,V,W,X))}),!0,u,m,!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(B,H,T,k,+u,A){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(B,H,T,k,v,G,I,M,R,Q,W,V,X){var Z=parseInt(B);!isNaN(Z)&&0<Z&&(d.exportImage(Z/100,H&&"png"==m,T,k,v&&"png"==m,I,!M,R,m,W,null,V,X),null!=A&&A(B,H,T,k,v,G,I,M,R,Q,W,V,X))}),!0,u,m,!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(B,H,T,k,v){d.downloadFile(H&&"png"==m?"xmlpng":m,null,null,B,null,null,T,k,v)}),!1,!0)}g.apply(this,arguments);var d=this.editorUi,q=d.editor.graph,y=mxUtils.bind(q,q.isEnabled);mxClient.IS_SVG||d.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(m){return"file"!=m}));d.actions.addAction("new...",function(){var m=d.isOffline(),u=new NewDialog(d,m,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(u.container,m?350:620,m?70:460,!0,!0,function(A){d.sidebar.hideTooltip();A&&null==d.getCurrentFile()&&d.showSplash()});u.init()});d.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var m=new NewDialog(d,null,!1,function(u){d.hideDialog();if(null!=u){var A=d.editor.graph.getFreeInsertPoint();q.setSelectionCells(d.importXml(u,Math.max(A.x,20),Math.max(A.y,20),!0,null,null,!0));q.scrollCellToVisible(q.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));d.showDialog(m.container,620,460,!0,!0,function(){d.sidebar.hideTooltip()});m.init()}})).isEnabled=y;var x=d.actions.addAction("shareCursor",function(){d.setShareCursorPosition(!d.isShareCursorPosition())});x.setToggleAction(!0);x.setSelectedCallback(function(){return d.isShareCursorPosition()});x=d.actions.addAction("showRemoteCursors",function(){d.setShowRemoteCursors(!d.isShowRemoteCursors())});x.setToggleAction(!0);@@ -13972,94 +13973,93 @@ x.setToggleAction(!0);x.setSelectedCallback(function(){return d.isAutoDarkMode(!x=d.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(m){d.setSketchMode(!Editor.sketchMode)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return Editor.sketchMode});d.actions.addAction("properties...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){m=new FilePropertiesDialog(d,m);d.showDialog(m.container,340,200,!0,!0);m.init()})}).isEnabled=y;window.mxFreehand&&(d.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(q.isEnabled()){if(null==d.freehandWindow){var m=!mxClient.IS_IE&&!mxClient.IS_IE11;d.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,176,m?126:90,m)}q.freehand.isDrawing()?q.freehand.stopDrawing():q.freehand.startDrawing();d.freehandWindow.window.setVisible(q.freehand.isDrawing())}},null,null,"X")).isEnabled=function(){return y()&&mxClient.IS_SVG});d.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var m=document.createElement("div");m.style.whiteSpace="nowrap";var u=null==d.pages||1>=d.pages.length,A=document.createElement("h3");mxUtils.write(A,mxResources.get("formatXml"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";m.appendChild(A);var B=d.addCheckbox(m,mxResources.get("selectionOnly"),!1,q.isSelectionEmpty()),H=d.addCheckbox(m,mxResources.get("compressed"),Editor.defaultCompressed),T=d.addCheckbox(m,mxResources.get("allPages"),!u,u);T.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?T.setAttribute("disabled",-"disabled"):T.removeAttribute("disabled")});m=new CustomDialog(d,m,mxUtils.bind(this,function(){d.downloadFile("xml",!H.checked,null,!B.checked,u||!T.checked)}),null,mxResources.get("export"));d.showDialog(m.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){d.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(m,u,A,B,H,T,k,v,G,I,M,N){k=[];B&&G&&k.push("tags=%7B%7D");m=new EmbedDialog(d,-d.createLink(m,u,!0,B,H,T,null,!0,k,null,A,null,N));d.showDialog(m.container,450,240,!0,!0);m.init()},null,!0)}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){d.showHtmlDialog(mxResources.get("export"),null,m,function(u,A,B,H,T,k,v,G,I,M,N,S){d.createHtml(u,A,B,H,T,k,v,G,I,M,N,mxUtils.bind(this,function(V,W){var X=d.getBaseFilename(v);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+-mxUtils.htmlEntities(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+W+"\n</body>\n</html>";d.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+".html","html",V,"text/html")}),S)})})}));d.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){EditorUi.isElectronApp||!d.isOffline()&&!d.printPdfExport?d.showPrintDialog(mxResources.get("formatPdf"),mxUtils.bind(this,function(m,u){m=null!=d.pages?d.pages.length:1;var A=null==d.pages||1>=d.pages.length,-B=d.getPageIndex(d.currentPage);B=null!=B?B+1:1;d.downloadFile("pdf",null,null,!u.selection,A||!u.allPages&&u.pagesFrom==B&&u.pagesTo==B,!u.crop,u.transparent,u.scale,null,u.grid,u.includeCopy,u.allPages||u.pagesFrom==B&&u.pagesTo==B?null:{from:Math.max(0,Math.min(m-1,u.pagesFrom-1)),to:Math.max(0,Math.min(m-1,u.pagesTo-1))},u.border,u.fit,u.sheetsAcross,u.sheetsDown)})):d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,320,null!=d.pages&&1<d.pages.length&&(d.editor.editable||-"1"!=urlParams["hide-pages"])?350:280,!0,!0)}));d.actions.addAction("open...",function(){d.pickFile()});d.actions.addAction("close",function(){function m(){null!=u&&u.removeDraft();d.fileLoaded(null)}var u=d.getCurrentFile();null!=u&&u.isModified()?d.confirm(mxResources.get("allChangesLost"),null,m,mxResources.get("cancel"),mxResources.get("discardChanges")):m()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){q.getSelectionCells();if(1==q.getSelectionCount()){var m=q.getSelectionCell(),-u=q.view.getState(m);null!=u&&null!=u.shape&&null!=u.shape.stencil&&(m=new EditShapeDialog(d,m,mxResources.get("editShape")+":",630,400),d.showDialog(m.container,640,480,!0,!1),m.init())}}));d.actions.addAction("revisionHistory...",function(){d.isRevisionHistorySupported()?d.spinner.spin(document.body,mxResources.get("loading"))&&d.getRevisions(mxUtils.bind(this,function(m,u){d.spinner.stop();m=new RevisionDialog(d,m,u);d.showDialog(m.container,640,480,!0,!0);m.init()}),mxUtils.bind(this,function(m){d.handleError(null!=-m?m:mxResources.get("notAvailable"))})):d.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});d.actions.addAction("createRevision",function(){d.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");x=d.actions.addAction("synchronize",function(){d.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(x.label=mxResources.get("refresh"));d.actions.addAction("upload...",function(){var m=d.getCurrentFile();null!=-m&&(window.drawdata=d.getFileData(),m=null!=m.getTitle()?m.getTitle():d.defaultFilename,d.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(d.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(m),null,!0))});"undefined"!==typeof MathJax&&(x=d.actions.addAction("mathematicalTypesetting",function(){var m=new ChangePageSetup(d);m.ignoreColor=!0;m.ignoreImage=!0;m.mathEnabled=!d.isMathEnabled();q.model.execute(m)}),x.setToggleAction(!0),x.setSelectedCallback(function(){return d.isMathEnabled()}),-x.isEnabled=y);x=d.actions.put("defaultAdaptiveColors",new Action(mxResources.get("default")+" ("+mxResources.get(Graph.getDefaultAdaptiveColorsKey())+")",function(){var m=new ChangePageSetup(d);m.ignoreColor=!0;m.ignoreImage=!0;m.adaptiveColors="default";q.model.execute(m)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return null==q.adaptiveColors});x=d.actions.put("automaticAdaptiveColors",new Action(mxResources.get("automatic"),function(){var m=new ChangePageSetup(d);m.ignoreColor=-!0;m.ignoreImage=!0;m.adaptiveColors="auto";q.model.execute(m)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return"auto"==q.adaptiveColors});x=d.actions.put("simpleAdaptiveColors",new Action(mxResources.get("simple"),function(){var m=new ChangePageSetup(d);m.ignoreColor=!0;m.ignoreImage=!0;m.adaptiveColors="simple";q.model.execute(m)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return"simple"==q.adaptiveColors});x=d.actions.put("noAdaptiveColors",new Action(mxResources.get("none"),-function(){var m=new ChangePageSetup(d);m.ignoreColor=!0;m.ignoreImage=!0;m.adaptiveColors="none";q.model.execute(m)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return"none"==q.adaptiveColors});this.put("adaptiveColors",new Menu(mxUtils.bind(this,function(m,u){this.addMenuItems(m,["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors","noAdaptiveColors"],u)})));isLocalStorage&&(x=d.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());-mxSettings.save()}),x.setToggleAction(!0),x.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var D=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});D.setToggleAction(!0);D.setSelectedCallback(function(){return D.isEnabled()&&d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var m=q.getSelectionCells(),u=[],A=0;A<m.length;A++)q.getModel().isVertex(m[A])&&u.push(m[A]);0<u.length&&(m=new EditGeometryDialog(d,u),d.showDialog(m.container,-200,270,!0,!0),m.init())},null,null,Editor.ctrlKey+"+Shift+M");d.actions.addAction("copyStyle",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var m=q.getSelectionCell(),u=q.getCellStyle(m,!1);d.copiedStyle={};var A=[],B=[],H;for(H in u)A.push(u[H]),B.push(H);q.copyCellStyles([m],B,A,d.copiedStyle,d.copiedStyle,null,null,null,!0)}},null,null,"Alt+C");d.actions.addAction("pasteStyle",function(){q.isEnabled()&&!q.isSelectionEmpty()&&null!=d.copiedStyle&&q.pasteCellStyles(q.includeDescendants(q.getSelectionCells()),-d.copiedStyle,d.copiedStyle,!0)},null,null,"Alt+V");d.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(m,u,A,B,H,T,k,v,G,I,M,N,S,V){m=parseInt(m);d.lastExportSvgEditable=H;!isNaN(m)&&0<m&&d.exportSvg(m/100,u,A,B,H,T,k,!v,G,I,N,S,V)}),!0,d.lastExportSvgEditable,"svg",!0)}));d.actions.put("exportPng",new Action(mxResources.get("formatPng")+-"...",function(){l("png",d.lastExportPngEditable,function(m,u,A,B,H){d.lastExportPngEditable=H})}));d.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){l("jpeg")}));d.actions.put("exportWebp",new Action(mxResources.get("formatWebp")+"...",function(){l("webp")}));x=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var m=mxUtils.sortCells(q.model.getTopmostCells(q.getSelectionCells())),u=mxUtils.getXml(0==m.length?d.editor.getGraphXml():q.encodeCells(m));-d.copyImage(m,u)}),null,null,"Ctrl+Alt+X");x.visible=Editor.enableNativeCipboard&&d.isExportToCanvas()&&!mxClient.IS_SF;x=d.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){q.setShadowVisible(!q.shadowVisible)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return q.shadowVisible});d.actions.put("about",new Action("v"+EditorUi.VERSION,function(m,u){}));d.actions.addAction("support...",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):-d.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});d.actions.addAction("exportOptionsDisabled...",function(){d.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});d.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("feedback...",-function(){var m=new FeedbackDialog(d);d.showDialog(m.container,610,360,!0,!1);m.init()});d.actions.addAction("quickStart...",function(){"ac.draw.io"===window.location.hostname?d.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});x=d.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(d,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,-function(){d.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");x.setToggleAction(!0);x.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));null==Editor.gptApiKey||null==Editor.gptModel||-null==Editor.gptUrl||d.isOffline()||EditorUi.isElectronApp||(x=d.actions.addAction("chatWindowTitle",mxUtils.bind(this,function(){null==this.chatWindow?(this.chatWindow=new ChatWindow(d,220,document.body.offsetHeight-380,250,320),this.chatWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("chat"))})),this.chatWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("chat"))}),this.chatWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("chat"))):-this.chatWindow.window.setVisible(!this.chatWindow.window.isVisible())})),x.setToggleAction(!0),x.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.chatWindow&&this.chatWindow.window.isVisible()})));x=d.actions.addAction("findReplace",mxUtils.bind(this,function(m,u){var A=(m=q.isEnabled()&&(null==u||!mxEvent.isShiftDown(u)))?"findReplace":"find";u=A+"Window";if(null==this[u]){var B="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,H=m?B?330:-300:240;this[u]=new FindWindow(d,document.body.offsetWidth-(H+20),100,H,m?B?304:288:170,m);this[u].window.addListener("show",function(){d.fireEvent(new mxEventObject(A))});this[u].window.addListener("hide",function(){d.fireEvent(new mxEventObject(A))});this[u].window.setVisible(!0)}else this[u].window.setVisible(!this[u].window.isVisible())}),null,null,Editor.ctrlKey+"+F");x.setToggleAction(!0);x.setSelectedCallback(mxUtils.bind(this,function(){var m=q.isEnabled()?"findReplaceWindow":"findWindow";-return null!=this[m]&&this[m].window.isVisible()}));d.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var m=null==d.pages||1>=d.pages.length;if(m)d.exportVisio();else{var u=document.createElement("div");u.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("formatVsdx"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(A);var B=d.addCheckbox(u,mxResources.get("allPages"),-!m,m);B.style.marginBottom="16px";m=new CustomDialog(d,u,mxUtils.bind(this,function(){d.exportVisio(!B.checked)}),null,mxResources.get("export"));d.showDialog(m.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",function(){var m=document.createElement("input");m.setAttribute("type","checkbox");m.style.marginRight="8px";m.checked=mxSettings.getShowStartScreen();m.defaultChecked=m.checked;if(Editor.isSettingsEnabled()&&("sketch"==-Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var u=document.createElement("span");u.style.display="flex";u.style.alignItems="center";u.style["float"]="right";u.style.cursor="pointer";u.style.userSelect="none";u.style.marginTop="-3px";u.appendChild(m);mxUtils.write(u,mxResources.get("showStartScreen"));mxEvent.addListener(u,"click",function(B){mxEvent.getSource(B)!=m&&(m.checked=!m.checked)});header=u}u=[[mxResources.get("reset"),function(){d.confirm(mxResources.get("areYouSure"),-function(){try{localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(B){d.handleError(B)}})}]];if(!d.isOfflineApp()&&isLocalStorage&&d.mode!=App.MODE_ATLAS){var A=d.actions.get("plugins");null==A||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||u.push([mxResources.get("plugins"),A.funct])}EditorUi.isElectronApp||u.push([mxResources.get("link"),function(B,H){if(0<H.value.length)try{var T=-JSON.parse(H.value),k=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(T)),v=new EmbedDialog(d,k);d.showDialog(v.container,450,240,!0);v.init()}catch(G){d.handleError(G)}else d.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=d.getServiceName()&&"1"!=urlParams.embed&&u.push([mxResources.get("preferences"),function(){d.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),-function(){d.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(B){d.handleError(B)}})}]])}]);d.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,u,m.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=m.parentNode&&(mxSettings.setShowStartScreen(m.checked),mxSettings.save())})});-if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(m,u){var A=mxLanguage;null==urlParams.lang&&isLocalStorage&&(A=mxSettings.settings.language);var B=mxUtils.bind(this,function(T){var k=""==T?mxResources.get("automatic"):mxLanguageMap[T],v=null;""!=k&&(v=m.addItem(k,null,mxUtils.bind(this,function(){d.setAndPersistLanguage(T);d.alert(mxResources.get("restartForChangeRequired"))}),u),(T==A||""==T&&null==A)&&m.addCheckmark(v,Editor.checkmarkImage));return v});-B("");m.addSeparator(u);for(var H in mxLanguageMap)B(H)})));var J=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(m){var u=J.apply(this,arguments);if(("1"!=urlParams.embed||"1"==urlParams.atlas)&&null!=u&&Editor.enableSimpleTheme&&"atlassian"!=d.getServiceName()){var A=this.get("dynamicAppearance");if(null!=A){var B=u.addMenu("",A.funct);B.setAttribute("title",mxResources.get("appearance"));B.className="geToolbarButton geAdaptiveAsset";B.style.backgroundPosition="center center";-B.style.backgroundRepeat="no-repeat";B.style.backgroundSize="100% 100%";B.style.display="inline-block";B.style.cursor="pointer";B.style.zIndex="1";B.style.position="absolute";B.style.height="18px";B.style.width="18px";"atlas"==Editor.currentTheme?(B.style.filter="invert(100%)",B.style.right="11px",B.style.top="10px"):(B.style.right="10px",B.style.top="5px");document.body.appendChild(B);u.langIcon=B;A=mxUtils.bind(this,function(){var H=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;-B.style.display="atlas"==Editor.currentTheme||"min"==Editor.currentTheme||"sketch"==Editor.currentTheme?"none":"";B.style.backgroundImage="simple"==Editor.currentTheme?750>H?"url("+Editor.thinDoubleArrowRightImage+")":"url("+(Editor.isDarkMode()?Editor.thinDarkImage:Editor.thinLightImage)+")":"url("+(Editor.isDarkMode()?Editor.darkModeImage:Editor.lightModeImage)+")"});this.editorUi.addListener("currentThemeChanged",A);this.editorUi.addListener("darkModeChanged",A);mxEvent.addListener(window,"resize",-A);A()}}return u}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){d.showCustomLayoutDialog(JSON.stringify(d.customLayoutConfig,null,2))});d.actions.put("adaptiveColors",new Action("adaptiveColors",function(m){null==d.adaptiveColorsWindow&&(d.adaptiveColorsWindow=new AdaptiveColorsWindow(d,document.body.offsetWidth-520,80,200,160));-d.adaptiveColorsWindow.window.setVisible(!0)}));x=this.get("viewZoom");var K=x.funct;x.funct=mxUtils.bind(this,function(m,u){K.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(m,["-","outline","fullscreen"],u)});x=this.get("layout");var L=x.funct;x.funct=function(m,u){L.apply(this,arguments);m.addItem(mxResources.get("orgChart"),null,function(){var A=null,B=20,H=20,T=function(){"undefined"!==typeof mxOrgChartLayout&&null!=A&&d.tryAndHandle(mxUtils.bind(this,-function(){var V=d.editor.graph,W=new mxOrgChartLayout(V,A,B,H),X=V.getDefaultParent();1<V.model.getChildCount(V.getSelectionCell())&&(X=V.getSelectionCell());W.execute(X)}))},k=document.createElement("div"),v=document.createElement("div");v.style.marginTop="6px";v.style.display="inline-block";v.style.width="180px";mxUtils.write(v,mxResources.get("orgChartType")+": ");k.appendChild(v);var G=document.createElement("select");G.style.width="160px";G.style.boxSizing="border-box";v=[mxResources.get("linear"),-mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var I=0;I<v.length;I++){var M=document.createElement("option");mxUtils.write(M,v[I]);M.value=I;2==I&&M.setAttribute("selected","selected");G.appendChild(M)}mxEvent.addListener(G,"change",function(){A=G.value});k.appendChild(G);v=document.createElement("div");v.style.marginTop="6px";v.style.display=-"inline-block";v.style.width="180px";mxUtils.write(v,mxResources.get("parentChildSpacing")+": ");k.appendChild(v);var N=document.createElement("input");N.type="number";N.value=B;N.style.width="160px";N.style.boxSizing="border-box";k.appendChild(N);mxEvent.addListener(N,"change",function(){B=N.value});v=document.createElement("div");v.style.marginTop="6px";v.style.display="inline-block";v.style.width="180px";mxUtils.write(v,mxResources.get("siblingSpacing")+": ");k.appendChild(v);var S=document.createElement("input");-S.type="number";S.value=H;S.style.width="160px";S.style.boxSizing="border-box";k.appendChild(S);mxEvent.addListener(S,"change",function(){H=S.value});v=mxUtils.button(mxResources.get("custom")+"...",function(){var V=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(G.value),parentChildSpacing:parseInt(N.value),siblingSpacing:parseInt(S.value)}}];d.hideDialog();d.showCustomLayoutDialog(JSON.stringify(V,null,2))});v.className="geBtn";k=new CustomDialog(d,k,function(){null==A&&(A=2);d.loadOrgChartLayouts(T)},-null,null,null,v);d.showDialog(k.container,355,140,!0,!0)},u,null,y());m.addSeparator(u);m.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){d.tryAndHandle(mxUtils.bind(this,function(){var A=new mxParallelEdgeLayout(q);A.checkOverlap=!0;d.prompt(mxResources.get("spacing"),A.spacing,mxUtils.bind(this,function(B){d.tryAndHandle(mxUtils.bind(this,function(){A.spacing=B;d.executeLayout(function(){A.execute(q.getDefaultParent(),q.isSelectionEmpty()?null:q.getSelectionCells())},!1)}))}))}))}),-u);m.addSeparator(u);d.menus.addMenuItem(m,"runLayout",u,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(m,u){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(m,["keyboardShortcuts","-","about"],u);else{var A=m.addItem("Search:",null,null,u,null,null,!1);A.style.cursor="default";var B=document.createElement("input");B.setAttribute("type","text");B.setAttribute("size","25");B.style.borderWidth="1px";B.style.marginLeft="8px";mxEvent.addListener(B,-"keydown",mxUtils.bind(this,function(H){var T=mxUtils.trim(B.value);13==H.keyCode&&0<T.length?(this.editorUi.openLink("https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(T)),B.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:T}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==H.keyCode&&(B.value="")}));A.firstChild.nextSibling.appendChild(B);mxEvent.addGestureListeners(B,-function(H){document.activeElement!=B&&B.focus();mxEvent.consume(H)},function(H){mxEvent.consume(H)},function(H){mxEvent.consume(H)});window.setTimeout(function(){B.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.drawio.com")}),d.actions.addAction("check4Updates",function(){d.checkForUpdates()}),d.actions.put("desktopZoomIn",new Action(mxResources.get("zoomIn"),function(){d.desktopZoomIn()})),d.actions.put("desktopZoomOut",new Action(mxResources.get("zoomOut"),-function(){d.desktopZoomOut()})),d.actions.put("desktopResetZoom",new Action(mxResources.get("actualSize"),function(){d.desktopResetZoom()})),this.addMenuItems(m,"- keyboardShortcuts quickStart website support -".split(" "),u),"1"!=urlParams.disableUpdate&&this.addMenuItems(m,["check4Updates","-"],u),this.addMenuItems(m,"desktopResetZoom desktopZoomIn desktopZoomOut - openDevTools - about".split(" "),u)):this.addMenuItems(m,"- keyboardShortcuts quickStart support - about".split(" "),u)}"1"==urlParams.test&&-(m.addSeparator(u),this.addSubmenu("testDevelop",m,u))})));d.actions.addAction("languageCode...",function(){var m=new FilenameDialog(d,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(u){null!=u&&(Graph.diagramLanguage=0<u.length?u:null,Graph.translateDiagram=!0,q.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");d.showDialog(m.container,340,80,!0,!0);m.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,function(m,-u){this.addMenuItems(m,["languageCode","-"],u);u=m.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;q.refresh()},u);Graph.translateDiagram||m.addCheckmark(u,Editor.checkmarkImage)})));if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testChecksum=Checksum");-mxResources.parse("testCheckPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");mxResources.parse("testPerformance=Performance");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!q.isSelectionEmpty()){var m=q.cloneCells(q.getSelectionCells()),u=q.getBoundingBoxFromGeometry(m,-!0);m=q.moveCells(m,-u.x,-u.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+u.width+", "+u.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(q.encodeCells(m)))+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function m(k){return null==k||null==k.boundingBox||!isNaN(k.boundingBox.x)&&!isNaN(k.boundingBox.y)&&!isNaN(k.boundingBox.width)&&!isNaN(k.boundingBox.height)}var u=q.getGraphBounds(),A=q.view.translate,B=q.view.scale;q.insertVertex(q.getDefaultParent(),-null,"",u.x/B-A.x,u.y/B-A.y,u.width/B,u.height/B,"fillColor=none;strokeColor=red;");var H=0,T=0;q.view.states.visit(function(k,v){k=!0;m(v.shape)||(console.log("invalid shape",v.cell.id,v.shape),k=!1);m(v.text)||(console.log("invalid text",v.cell.id,v.text),k=!1);k||H++;T++});console.log("states checked",T,"invalid",H)}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var m=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";m=new TextareaDialog(d,-"Paste Data:",m,function(u){if(0<u.length)try{var A=function(v){function G(ba){if(null==Y[ba]){if(Y[ba]=!0,null!=N[ba]){for(;0<N[ba].length;){var ea=N[ba].pop();G(ea)}delete N[ba]}}else mxLog.debug(I+": Visited: "+ba)}var I=v.parentNode.id,M=v.childNodes;v={};for(var N={},S=null,V={},W=0;W<M.length;W++){var X=M[W];if(null!=X.id&&0<X.id.length)if(null==v[X.id]){v[X.id]=X.id;var Z=X.getAttribute("parent");null==Z?null!=S?mxLog.debug(I+": Multiple roots: "+X.id):S=X.id:(null==N[Z]&&(N[Z]=[]),N[Z].push(X.id))}else V[X.id]=-X.id}M=Object.keys(V);0<M.length?(M=I+": "+M.length+" Duplicates: "+M.join(", "),mxLog.debug(M+" (see console)")):mxLog.debug(I+": Checked");var Y={};null==S?mxLog.debug(I+": No root"):(G(S),Object.keys(Y).length!=Object.keys(v).length&&(mxLog.debug(I+": Invalid tree: (see console)"),console.log(I+": Invalid tree",N)))};"<"!=u.charAt(0)&&(u=Graph.decompress(u),mxLog.debug("See console for uncompressed XML"),console.log("xml",u));var B=mxUtils.parseXml(u),H=d.getPagesForNode(B.documentElement,"mxGraphModel");-if(null!=H&&0<H.length)try{var T=d.getHashValueForPages(H);mxLog.debug("Checksum: ",T)}catch(v){mxLog.debug("Error: ",v.message)}else mxLog.debug("No pages found for checksum");var k=B.getElementsByTagName("root");for(u=0;u<k.length;u++)A(k[u]);mxLog.show()}catch(v){d.handleError(v),null!=window.console&&console.error(v)}});d.showDialog(m.container,620,460,!0,!0);m.init()}));var Q=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var m=new TextareaDialog(d,"Diff/Sync:",-"",function(u){var A=d.getCurrentFile();if(0<u.length&&null!=A)try{var B=JSON.parse(u);A.patch([B],null,!0,!0);d.hideDialog()}catch(H){d.handleError(H)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(u,A){Q=d.getPagesForXml(d.getFileData(!0));m.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(Q)}],["Diff",function(u,A){try{m.textarea.value=JSON.stringify(d.diffPages(Q,d.pages),null,2)}catch(B){d.handleError(B)}}]]);null==Q?-(Q=d.getPagesForXml(d.getFileData(!0)),m.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(Q)):m.textarea.value=JSON.stringify(d.diffPages(Q,d.pages),null,2);d.showDialog(m.container,620,460,!0,!0);m.init()}else d.alert("No pages")}));d.actions.addAction("testChecksum",mxUtils.bind(this,function(){var m=d.getCurrentFile();null!=d.pages&&null!=m?d.spinner.spin(document.body,mxResources.get("loading"))&&m.getLatestVersion(function(u){d.spinner.stop();-var A=d.getHashValueForPages(d.pages),B=m.getCurrentRevisionId(),H=d.getHashValueForPages(u.getShadowPages()),T=u.getDescriptorChecksum(u.getDescriptor()),k=u.getCurrentRevisionId();console.log("Local File",[m],"modified",m.isModified(),"checksum",A);console.log("Remote File",[u],"rev",k==B,"desc",T==H,"checksum",H);d.alert("Checksums "+(H==A?"match":"no not match"))},function(u){console.log("Error getLatestVersion",u);d.handleError(u)}):console.log("Checksum: no file or pages")}));d.actions.addAction("testCheckPages",-mxUtils.bind(this,function(){var m=d.getCurrentFile();console.log("editorUi",d,"file",m);if(null!=m&&m.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(m.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(m.theirPages));console.log("diff ownPages/theirPages",d.diffPages(m.ownPages,m.theirPages));var u=m.getShadowPages();null!=u&&(console.log("Checksum shadowPages",d.getHashValueForPages(u)),console.log("diff shadowPages/ownPages",d.diffPages(u,m.ownPages)),console.log("diff ownPages/shadowPages",-d.diffPages(m.ownPages,u)),console.log("diff theirPages/shadowPages",d.diffPages(m.theirPages,u)));null!=m.sync&&null!=m.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(m.sync.snapshot)),console.log("diff ownPages/snapshot",d.diffPages(m.ownPages,m.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(m.theirPages,m.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(m.sync.snapshot,d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",-d.diffPages(m.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(m.theirPages,d.pages)))}null!=m&&console.log("Shadow pages",[d.getXmlForPages(m.getShadowPages())]);null!=d.pages&&console.log("Checksum actualPages",d.getHashValueForPages(d.pages))}));d.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",d);var m=d.getCurrentFile();null!=m&&m.isRealtime()&&null!=m.shadowPages&&(console.log("patching actualPages to shadowPages",m.patch([d.diffPages(m.shadowPages,-d.pages)])),m.ownPages=d.clonePages(d.pages),m.theirPages=d.clonePages(d.pages),m.shadowPages=d.clonePages(d.pages),null!=m.sync&&(m.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testOptimize",mxUtils.bind(this,function(){q.model.beginUpdate();try{var m=q.model.cells,u=0,A=[],B=[],H;for(H in m){var T=m[H],k=q.getCurrentCellStyle(T)[mxConstants.STYLE_IMAGE];null!=k&&"data:"==k.substring(0,5)&&(null==A[k]&&(A[k]=(A[k]||0)+1,u++),B.push(T))}q.setCellStyles(mxConstants.STYLE_IMAGE,null,-B);console.log("Removed",u,"image(s) from",B.length,"cell(s): ",[B,A])}finally{q.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,q.getModel())}));d.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var m=new mxImageExport,u=q.getGraphBounds(),A=q.view.scale,B=mxUtils.createXmlDocument(),H=B.createElement("output");B.appendChild(H);B=new mxXmlCanvas2D(H);B.translate(Math.floor((1-u.x)/A),Math.floor((1-u.y)/A));B.scale(1/A);var T=-0,k=B.save;B.save=function(){T++;k.apply(this,arguments)};var v=B.restore;B.restore=function(){T--;v.apply(this,arguments)};var G=m.drawShape;m.drawShape=function(I){mxLog.debug("entering shape",I,T);G.apply(this,arguments);mxLog.debug("leaving shape",I,T)};m.drawState(q.getView().getState(q.model.root),B);mxLog.show();mxLog.debug(mxUtils.getXml(H));mxLog.debug("stateCounter",T)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=-mxPopupMenu.prototype.zIndex-2});var c=null,e=null,f=null,p=null,n=null,t=null,z=null,E=null;d.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=c?(q.view.revalidate=c,c=null):(c=q.view.revalidate,q.view.revalidate=function(){var m=Date.now(),u=c.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=e?(d.selectPage=e,e=null):(e=d.selectPage,d.selectPage=function(){var m=Date.now(),u=e.apply(this,-arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=f?(d.diffPages=f,f=null):(f=d.diffPages,d.diffPages=function(){var m=Date.now(),u=f.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=p?(d.patchPages=p,p=null):(p=d.patchPages,d.patchPages=function(){var m=Date.now(),u=p.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",-[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=n?(d.clonePages=n,n=null):(n=d.clonePages,d.clonePages=function(){var m=Date.now(),u=n.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=z?(d.getHashValueForPages=z,z=null):(z=d.getHashValueForPages,d.getHashValueForPages=function(){var m=Date.now(),u=z.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],-"time",Date.now()-m+" ms","args",arguments);return u});null!=E?(d.resolveCrossReferences=E,E=null):(E=d.resolveCrossReferences,d.resolveCrossReferences=function(){var m=Date.now(),u=E.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=t?(d.getFileData=t,t=null):(t=d.getFileData,d.getFileData=function(){var m=Date.now(),u=t.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",-[this],"time",Date.now()-m+" ms","args",arguments);return u});EditorUi.debug("[Performance]",null!=c?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(m,u){this.addMenuItems(m,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),u);var A=m.addItem(mxResources.get("testPerformance"),null,function(){d.actions.get("testPerformance").funct()},u);null!=c&&m.addCheckmark(A,-Editor.checkmarkImage);this.addMenuItems(m,["-","testShowConsole"],u)})))}d.actions.put("shapes",new Action(mxResources.get("moreShapes")+"...",function(m){mxClient.IS_CHROMEAPP||!d.isOffline()?d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)}));d.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(m){q.isEnabled()&&-(m=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),m.vertex=!0,m=new EditShapeDialog(d,m,mxResources.get("editShape")+":",630,400),d.showDialog(m.container,640,480,!0,!1),m.init())})).isEnabled=y;d.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){d.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",m,function(u,A,B,H,T,k,v,G,I,M,N,S){d.createHtml(u,A,B,H,T,k,v,G,-I,M,N,mxUtils.bind(this,function(V,W){var X=new EmbedDialog(d,"\x3c!-- "+d.editor.appName+" diagram --\x3e\n"+V+"\n"+W+"\n",null,null,function(){var Z=window.open(),Y=Z.document;if(null!=Y){"CSS1Compat"===document.compatMode&&Y.writeln("<!DOCTYPE html>");Y.writeln("<html>");Y.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Y.writeln("<body>");Y.writeln(V);var ba=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;ba&&Y.writeln(W);-Y.writeln("</body>");Y.writeln("</html>");Y.close();if(!ba){var ea=Z.document.createElement("div");ea.marginLeft="26px";ea.marginTop="26px";mxUtils.write(ea,mxResources.get("updatingDocument"));ba=Z.document.createElement("img");ba.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");ba.style.marginLeft="6px";ea.appendChild(ba);Z.document.body.insertBefore(ea,Z.document.body.firstChild);window.setTimeout(function(){var ca=document.createElement("script");-ca.type="text/javascript";ca.src=/<script.*?src="(.*?)"/.exec(W)[1];Y.body.appendChild(ca);ea.parentNode.removeChild(ea)},20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})});d.showDialog(X.container,450,240,!0,!0);X.init()}),S)})})}));d.actions.put("liveImage",new Action("Live image...",function(){var m=d.getCurrentFile();null!=m&&d.getPublicUrl(m,function(u){null!=u?(u=new EmbedDialog(d,'<img src="'+(m.constructor!=DriveFile?u:"https://drive.google.com/uc?id="+m.getId())+-'"/>'),d.showDialog(u.container,450,240,!0,!0),u.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(m,u,A,B,H,T){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(m,u,A,B,H,T,function(k){d.spinner.stop();k=new EmbedDialog(d,k);d.showDialog(k.container,450,240,!0,!0);k.init()},function(k){d.spinner.stop();d.handleError(k)})},mxResources.get("image"),-mxResources.get("retina"),d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showEmbedImageDialog(function(m,u,A,B,H,T){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(m,u,A,B,H,T,function(k){d.spinner.stop();k=new EmbedDialog(d,k);d.showDialog(k.container,450,240,!0,!0);k.init()},function(k){d.spinner.stop();d.handleError(k)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")}));-d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){var u=q.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,u.height/q.view.scale))+2,null,null,null,m,d.getCurrentFile(),function(A,B,H,T,k,v,G,I,M,N,S,V){var W=[];M&&W.push("tags=%7B%7D");A=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+G+";height:"+I+';" src="'+d.createLink(A,B,!0,T,k,v,"public"==N?m:null,null,W,-null,H,S,V)+'"'+(S?' allowtransparency="true"':"")+"></iframe>");d.showDialog(A.container,450,240,!0,!0);A.init()},!0,!0)})}));d.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var m=document.createElement("div");m.style.position="absolute";m.style.bottom="30px";m.style.textAlign="center";m.style.width="100%";m.style.left="0px";var u=document.createElement("a");u.setAttribute("href","javascript:void(0);");u.setAttribute("target","_blank");u.style.cursor="pointer";mxUtils.write(u,-mxResources.get("getNotionChromeExtension"));m.appendChild(u);mxUtils.setPrefixedStyle(u.style,"transition","all 1s ease");mxUtils.setOpacity(u,0);window.setTimeout(function(){mxUtils.setOpacity(u,100)},300);mxEvent.addListener(u,"click",function(A){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(A)});d.getPublicUrl(d.getCurrentFile(),function(A){d.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",-m,A,d.getCurrentFile(),function(B,H,T,k,v,G,I,M,N,S,V,W){I=["border=0"];N&&I.push("tags=%7B%7D");B=new EmbedDialog(d,d.createLink(B,H,!0,k,v,G,"public"==S?A:null,null,I,null,T,null,W));d.showDialog(B.container,450,240,!0,!0);B.init()},null,!0)})}));d.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){d.showPublishLinkDialog(null,null,null,null,null,null,m,d.getCurrentFile(),function(u,A,B,H,T,k,v,G,I,M,N,S){v=[];H&&I&&v.push("tags=%7B%7D");-u=new EmbedDialog(d,d.createLink(u,A,!0,H,T,k,"public"==M?m:null,null,v,null,B,null,S));d.showDialog(u.container,450,240,!0,!0);u.init()},null,!0)})}));d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")});d.actions.addAction("googleDocs...",function(){d.openLink("http://docsaddon.draw.io")});d.actions.addAction("googleSlides...",function(){d.openLink("https://slidesaddon.draw.io")});d.actions.addAction("googleSheets...",function(){d.openLink("https://sheetsaddon.draw.io")});-d.actions.addAction("googleSites...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){m=new GoogleSitesDialog(d,m);d.showDialog(m.container,420,256,!0,!0);m.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)x=d.actions.addAction("scratchpad",function(){d.toggleScratchpad()}),x.setToggleAction(!0),x.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});window.matchMedia&&-null!=document.getElementById("high-contrast-stylesheet")&&(x=d.actions.addAction("highContrast",function(){d.setAndPersistHighContrast(!d.isHighContrast())}),x.setToggleAction(!0),x.setSelectedCallback(function(){return d.isHighContrast()}));x=d.actions.addAction("search",function(){if(null!=d.sidebar){var m=d.sidebar.isEntryVisible("search");d.sidebar.showPalette("search",!m);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!m,mxSettings.save())}});x.label=mxResources.get("searchShapes");-x.setToggleAction(!0);x.setSelectedCallback(function(){return null!=d.sidebar&&d.sidebar.isEntryVisible("search")});d.actions.get("clearDefaultStyle").funct=function(m){q.isEnabled()&&(d.clearDefaultStyle(),Editor.sketchMode&&d.setSketchMode(!1))};"1"==urlParams.embed&&(d.actions.get("saveAs").setEnabled(!1),d.actions.get("save").funct=function(m){q.isEditing()&&q.stopEditing();var u="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==-urlParams.proto){var A=d.createLoadMessage("save");A.xml=u;!0!==m||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(A.exit=!0);u=JSON.stringify(A)}(window.opener||window.parent).postMessage(u,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));m=d.getCurrentFile();null==m||m.constructor==EmbedFile||m.constructor==LocalFile&&null==m.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():+"disabled"):T.removeAttribute("disabled")});m=new CustomDialog(d,m,mxUtils.bind(this,function(){d.downloadFile("xml",!H.checked,null,!B.checked,u||!T.checked)}),null,mxResources.get("export"));d.showDialog(m.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){d.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(m,u,A,B,H,T,k,v,G,I,M,R){k=[];B&&G&&k.push("tags=%7B%7D");m=new EmbedDialog(d,+d.createLink(m,u,!0,B,H,T,null,!0,k,null,A,null,R));d.showDialog(m.container,450,240,!0,!0);m.init()},null,!0)}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){d.showHtmlDialog(mxResources.get("export"),null,m,function(u,A,B,H,T,k,v,G,I,M,R,Q){d.createHtml(u,A,B,H,T,k,v,G,I,M,R,mxUtils.bind(this,function(W,V){var X=d.getBaseFilename(v);W='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'++mxUtils.htmlEntities(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+W+"\n"+V+"\n</body>\n</html>";d.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+".html","html",W,"text/html")}),Q)})})}));d.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){d.showPrintDialog(mxResources.get("formatPdf"),EditorUi.isElectronApp||!d.isOffline()&&!d.printPdfExport?mxUtils.bind(this,function(m,u){m=null!=d.pages?d.pages.length:1;var A=null==d.pages||1>=d.pages.length,+B=d.getPageIndex(d.currentPage);B=null!=B?B+1:1;d.downloadFile("pdf",null,null,!u.selection,A||!u.allPages&&u.pagesFrom==B&&u.pagesTo==B,!u.crop,u.transparent,u.scale,null,u.grid,u.includeCopy,u.allPages||u.pagesFrom==B&&u.pagesTo==B?null:{from:Math.max(0,Math.min(m-1,u.pagesFrom-1)),to:Math.max(0,Math.min(m-1,u.pagesTo-1))},u.border,u.fit,u.sheetsAcross,u.sheetsDown)}):null,mxResources.get("export"))}));d.actions.addAction("open...",function(){d.pickFile()});d.actions.addAction("close",function(){function m(){null!=+u&&u.removeDraft();d.fileLoaded(null)}var u=d.getCurrentFile();null!=u&&u.isModified()?d.confirm(mxResources.get("allChangesLost"),null,m,mxResources.get("cancel"),mxResources.get("discardChanges")):m()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){q.getSelectionCells();if(1==q.getSelectionCount()){var m=q.getSelectionCell(),u=q.view.getState(m);null!=u&&null!=u.shape&&null!=u.shape.stencil&&(m=new EditShapeDialog(d,m,mxResources.get("editShape")+":",630,400),d.showDialog(m.container,+640,480,!0,!1),m.init())}}));d.actions.addAction("revisionHistory...",function(){d.isRevisionHistorySupported()?d.spinner.spin(document.body,mxResources.get("loading"))&&d.getRevisions(mxUtils.bind(this,function(m,u){d.spinner.stop();m=new RevisionDialog(d,m,u);d.showDialog(m.container,640,480,!0,!0);m.init()}),mxUtils.bind(this,function(m){d.handleError(null!=m?m:mxResources.get("notAvailable"))})):d.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});d.actions.addAction("createRevision",+function(){d.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");x=d.actions.addAction("synchronize",function(){d.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(x.label=mxResources.get("refresh"));d.actions.addAction("upload...",function(){var m=d.getCurrentFile();null!=m&&(window.drawdata=d.getFileData(),m=null!=m.getTitle()?m.getTitle():d.defaultFilename,d.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"++(d.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(m),null,!0))});"undefined"!==typeof MathJax&&(x=d.actions.addAction("mathematicalTypesetting",function(){var m=new ChangePageSetup(d);m.ignoreColor=!0;m.ignoreImage=!0;m.mathEnabled=!d.isMathEnabled();q.model.execute(m)}),x.setToggleAction(!0),x.setSelectedCallback(function(){return d.isMathEnabled()}),x.isEnabled=y);x=d.actions.put("defaultAdaptiveColors",new Action(mxResources.get("default")+" ("+mxResources.get(Graph.getDefaultAdaptiveColorsKey())++")",function(){var m=new ChangePageSetup(d);m.ignoreColor=!0;m.ignoreImage=!0;m.adaptiveColors="default";q.model.execute(m)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return null==q.adaptiveColors});x=d.actions.put("automaticAdaptiveColors",new Action(mxResources.get("automatic"),function(){var m=new ChangePageSetup(d);m.ignoreColor=!0;m.ignoreImage=!0;m.adaptiveColors="auto";q.model.execute(m)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return"auto"==q.adaptiveColors});+x=d.actions.put("simpleAdaptiveColors",new Action(mxResources.get("simple"),function(){var m=new ChangePageSetup(d);m.ignoreColor=!0;m.ignoreImage=!0;m.adaptiveColors="simple";q.model.execute(m)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return"simple"==q.adaptiveColors});x=d.actions.put("noAdaptiveColors",new Action(mxResources.get("none"),function(){var m=new ChangePageSetup(d);m.ignoreColor=!0;m.ignoreImage=!0;m.adaptiveColors="none";q.model.execute(m)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return"none"==+q.adaptiveColors});this.put("adaptiveColors",new Menu(mxUtils.bind(this,function(m,u){this.addMenuItems(m,["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors","noAdaptiveColors"],u)})));isLocalStorage&&(x=d.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),x.setToggleAction(!0),x.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var D=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});+D.setToggleAction(!0);D.setSelectedCallback(function(){return D.isEnabled()&&d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var m=q.getSelectionCells(),u=[],A=0;A<m.length;A++)q.getModel().isVertex(m[A])&&u.push(m[A]);0<u.length&&(m=new EditGeometryDialog(d,u),d.showDialog(m.container,200,270,!0,!0),m.init())},null,null,Editor.ctrlKey+"+Shift+M");d.actions.addAction("copyStyle",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var m=q.getSelectionCell(),u=q.getCellStyle(m,+!1);d.copiedStyle={};var A=[],B=[],H;for(H in u)A.push(u[H]),B.push(H);q.copyCellStyles([m],B,A,d.copiedStyle,d.copiedStyle,null,null,null,!0)}},null,null,"Alt+C");d.actions.addAction("pasteStyle",function(){q.isEnabled()&&!q.isSelectionEmpty()&&null!=d.copiedStyle&&q.pasteCellStyles(q.includeDescendants(q.getSelectionCells()),d.copiedStyle,d.copiedStyle,!0)},null,null,"Alt+V");d.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showExportDialog(mxResources.get("formatSvg"),+!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(m,u,A,B,H,T,k,v,G,I,M,R,Q,W){m=parseInt(m);d.lastExportSvgEditable=H;!isNaN(m)&&0<m&&d.exportSvg(m/100,u,A,B,H,T,k,!v,G,I,R,Q,W)}),!0,d.lastExportSvgEditable,"svg",!0)}));d.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){l("png",d.lastExportPngEditable,function(m,u,A,B,H){d.lastExportPngEditable=H})}));d.actions.put("exportJpg",new Action(mxResources.get("formatJpg")++"...",function(){l("jpeg")}));d.actions.put("exportWebp",new Action(mxResources.get("formatWebp")+"...",function(){l("webp")}));x=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var m=mxUtils.sortCells(q.model.getTopmostCells(q.getSelectionCells())),u=mxUtils.getXml(0==m.length?d.editor.getGraphXml():q.encodeCells(m));d.copyImage(m,u)}),null,null,"Ctrl+Alt+X");x.visible=Editor.enableNativeCipboard&&d.isExportToCanvas()&&!mxClient.IS_SF;x=d.actions.put("shadowVisible",new Action(mxResources.get("shadow"),+function(){q.setShadowVisible(!q.shadowVisible)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return q.shadowVisible});d.actions.put("about",new Action("v"+EditorUi.VERSION,function(m,u){}));d.actions.addAction("support...",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):d.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});d.actions.addAction("exportOptionsDisabled...",function(){d.handleError({message:mxResources.get("exportOptionsDisabledDetails")},+mxResources.get("exportOptionsDisabled"))});d.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("feedback...",function(){var m=new FeedbackDialog(d);d.showDialog(m.container,610,360,!0,!1);m.init()});d.actions.addAction("quickStart...",function(){"ac.draw.io"===window.location.hostname?d.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):+d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});x=d.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(d,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("tags"))):+this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");x.setToggleAction(!0);x.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));null==Editor.gptApiKey||null==Editor.gptModel||null==Editor.gptUrl||d.isOffline()||EditorUi.isElectronApp||(x=d.actions.addAction("chatWindowTitle",mxUtils.bind(this,function(){null==this.chatWindow?(this.chatWindow=new ChatWindow(d,220,document.body.offsetHeight-+380,250,320),this.chatWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("chat"))})),this.chatWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("chat"))}),this.chatWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("chat"))):this.chatWindow.window.setVisible(!this.chatWindow.window.isVisible())})),x.setToggleAction(!0),x.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.chatWindow&&this.chatWindow.window.isVisible()})));+x=d.actions.addAction("findReplace",mxUtils.bind(this,function(m,u){var A=(m=q.isEnabled()&&(null==u||!mxEvent.isShiftDown(u)))?"findReplace":"find";u=A+"Window";if(null==this[u]){var B="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,H=m?B?330:300:240;this[u]=new FindWindow(d,document.body.offsetWidth-(H+20),100,H,m?B?304:288:170,m);this[u].window.addListener("show",function(){d.fireEvent(new mxEventObject(A))});this[u].window.addListener("hide",function(){d.fireEvent(new mxEventObject(A))});+this[u].window.setVisible(!0)}else this[u].window.setVisible(!this[u].window.isVisible())}),null,null,Editor.ctrlKey+"+F");x.setToggleAction(!0);x.setSelectedCallback(mxUtils.bind(this,function(){var m=q.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[m]&&this[m].window.isVisible()}));d.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var m=null==d.pages||1>=d.pages.length;if(m)d.exportVisio();else{var u=document.createElement("div");u.style.whiteSpace=+"nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("formatVsdx"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(A);var B=d.addCheckbox(u,mxResources.get("allPages"),!m,m);B.style.marginBottom="16px";m=new CustomDialog(d,u,mxUtils.bind(this,function(){d.exportVisio(!B.checked)}),null,mxResources.get("export"));d.showDialog(m.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",+function(){var m=document.createElement("input");m.setAttribute("type","checkbox");m.style.marginRight="8px";m.checked=mxSettings.getShowStartScreen();m.defaultChecked=m.checked;if(Editor.isSettingsEnabled()&&("sketch"==Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var u=document.createElement("span");u.style.display="flex";u.style.alignItems="center";u.style["float"]="right";u.style.cursor="pointer";u.style.userSelect="none";u.style.marginTop="-3px";u.appendChild(m);+mxUtils.write(u,mxResources.get("showStartScreen"));mxEvent.addListener(u,"click",function(B){mxEvent.getSource(B)!=m&&(m.checked=!m.checked)});header=u}u=[[mxResources.get("reset"),function(){d.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(B){d.handleError(B)}})}]];if(!d.isOfflineApp()&&isLocalStorage&&d.mode!=App.MODE_ATLAS){var A=d.actions.get("plugins");null==A||"sketch"!=+Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||u.push([mxResources.get("plugins"),A.funct])}EditorUi.isElectronApp||u.push([mxResources.get("link"),function(B,H){if(0<H.value.length)try{var T=JSON.parse(H.value),k=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(T)),v=new EmbedDialog(d,k);d.showDialog(v.container,450,240,!0);v.init()}catch(G){d.handleError(G)}else d.handleError({message:mxResources.get("invalidInput")})}]);+"atlassian"!=d.getServiceName()&&"1"!=urlParams.embed&&u.push([mxResources.get("preferences"),function(){d.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),function(){d.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(B){d.handleError(B)}})}]])}]);d.showLocalStorageDialog(mxResources.get("configuration")++":",Editor.configurationKey,u,m.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=m.parentNode&&(mxSettings.setShowStartScreen(m.checked),mxSettings.save())})});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(m,u){var A=mxLanguage;null==urlParams.lang&&isLocalStorage&&(A=mxSettings.settings.language);var B=mxUtils.bind(this,function(T){var k=""==T?mxResources.get("automatic"):mxLanguageMap[T],v=null;""!=k&&(v=m.addItem(k,+null,mxUtils.bind(this,function(){d.setAndPersistLanguage(T);d.alert(mxResources.get("restartForChangeRequired"))}),u),(T==A||""==T&&null==A)&&m.addCheckmark(v,Editor.checkmarkImage));return v});B("");m.addSeparator(u);for(var H in mxLanguageMap)B(H)})));var J=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(m){var u=J.apply(this,arguments);if(("1"!=urlParams.embed||"1"==urlParams.atlas)&&null!=u&&Editor.enableSimpleTheme&&"atlassian"!=d.getServiceName()){var A=this.get("dynamicAppearance");+if(null!=A){var B=u.addMenu("",A.funct);B.setAttribute("title",mxResources.get("appearance"));B.className="geToolbarButton geAdaptiveAsset";B.style.backgroundPosition="center center";B.style.backgroundRepeat="no-repeat";B.style.backgroundSize="100% 100%";B.style.display="inline-block";B.style.cursor="pointer";B.style.zIndex="1";B.style.position="absolute";B.style.height="18px";B.style.width="18px";"atlas"==Editor.currentTheme?(B.style.filter="invert(100%)",B.style.right="11px",B.style.top="10px"):+(B.style.right="10px",B.style.top="5px");document.body.appendChild(B);u.langIcon=B;A=mxUtils.bind(this,function(){var H=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;B.style.display="atlas"==Editor.currentTheme||"min"==Editor.currentTheme||"sketch"==Editor.currentTheme?"none":"";B.style.backgroundImage="simple"==Editor.currentTheme?750>H?"url("+Editor.thinDoubleArrowRightImage+")":"url("+(Editor.isDarkMode()?Editor.thinDarkImage:Editor.thinLightImage)+")":"url("++(Editor.isDarkMode()?Editor.darkModeImage:Editor.lightModeImage)+")"});this.editorUi.addListener("currentThemeChanged",A);this.editorUi.addListener("darkModeChanged",A);mxEvent.addListener(window,"resize",A);A()}}return u}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){d.showCustomLayoutDialog(JSON.stringify(d.customLayoutConfig,+null,2))});d.actions.put("adaptiveColors",new Action("adaptiveColors",function(m){null==d.adaptiveColorsWindow&&(d.adaptiveColorsWindow=new AdaptiveColorsWindow(d,document.body.offsetWidth-520,80,200,160));d.adaptiveColorsWindow.window.setVisible(!0)}));x=this.get("viewZoom");var K=x.funct;x.funct=mxUtils.bind(this,function(m,u){K.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(m,["-","outline","fullscreen"],u)});x=this.get("layout");var L=x.funct;+x.funct=function(m,u){L.apply(this,arguments);m.addItem(mxResources.get("orgChart"),null,function(){var A=null,B=20,H=20,T=function(){"undefined"!==typeof mxOrgChartLayout&&null!=A&&d.tryAndHandle(mxUtils.bind(this,function(){var W=d.editor.graph,V=new mxOrgChartLayout(W,A,B,H),X=W.getDefaultParent();1<W.model.getChildCount(W.getSelectionCell())&&(X=W.getSelectionCell());V.execute(X)}))},k=document.createElement("div"),v=document.createElement("div");v.style.marginTop="6px";v.style.display="inline-block";+v.style.width="180px";mxUtils.write(v,mxResources.get("orgChartType")+": ");k.appendChild(v);var G=document.createElement("select");G.style.width="160px";G.style.boxSizing="border-box";v=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var I=0;I<v.length;I++){var M=document.createElement("option");mxUtils.write(M,v[I]);+M.value=I;2==I&&M.setAttribute("selected","selected");G.appendChild(M)}mxEvent.addListener(G,"change",function(){A=G.value});k.appendChild(G);v=document.createElement("div");v.style.marginTop="6px";v.style.display="inline-block";v.style.width="180px";mxUtils.write(v,mxResources.get("parentChildSpacing")+": ");k.appendChild(v);var R=document.createElement("input");R.type="number";R.value=B;R.style.width="160px";R.style.boxSizing="border-box";k.appendChild(R);mxEvent.addListener(R,"change",function(){B=+R.value});v=document.createElement("div");v.style.marginTop="6px";v.style.display="inline-block";v.style.width="180px";mxUtils.write(v,mxResources.get("siblingSpacing")+": ");k.appendChild(v);var Q=document.createElement("input");Q.type="number";Q.value=H;Q.style.width="160px";Q.style.boxSizing="border-box";k.appendChild(Q);mxEvent.addListener(Q,"change",function(){H=Q.value});v=mxUtils.button(mxResources.get("custom")+"...",function(){var W=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(G.value),+parentChildSpacing:parseInt(R.value),siblingSpacing:parseInt(Q.value)}}];d.hideDialog();d.showCustomLayoutDialog(JSON.stringify(W,null,2))});v.className="geBtn";k=new CustomDialog(d,k,function(){null==A&&(A=2);d.loadOrgChartLayouts(T)},null,null,null,v);d.showDialog(k.container,355,140,!0,!0)},u,null,y());m.addSeparator(u);m.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){d.tryAndHandle(mxUtils.bind(this,function(){var A=new mxParallelEdgeLayout(q);A.checkOverlap=!0;d.prompt(mxResources.get("spacing"),+A.spacing,mxUtils.bind(this,function(B){d.tryAndHandle(mxUtils.bind(this,function(){A.spacing=B;d.executeLayout(function(){A.execute(q.getDefaultParent(),q.isSelectionEmpty()?null:q.getSelectionCells())},!1)}))}))}))}),u);m.addSeparator(u);d.menus.addMenuItem(m,"runLayout",u,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(m,u){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(m,["keyboardShortcuts","-","about"],u);else{var A=m.addItem("Search:",+null,null,u,null,null,!1);A.style.cursor="default";var B=document.createElement("input");B.setAttribute("type","text");B.setAttribute("size","25");B.style.borderWidth="1px";B.style.marginLeft="8px";mxEvent.addListener(B,"keydown",mxUtils.bind(this,function(H){var T=mxUtils.trim(B.value);13==H.keyCode&&0<T.length?(this.editorUi.openLink("https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(T)),B.value="",EditorUi.logEvent({category:"SEARCH-HELP",+action:"search",label:T}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==H.keyCode&&(B.value="")}));A.firstChild.nextSibling.appendChild(B);mxEvent.addGestureListeners(B,function(H){document.activeElement!=B&&B.focus();mxEvent.consume(H)},function(H){mxEvent.consume(H)},function(H){mxEvent.consume(H)});window.setTimeout(function(){B.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.drawio.com")}),d.actions.addAction("check4Updates",+function(){d.checkForUpdates()}),d.actions.put("desktopZoomIn",new Action(mxResources.get("zoomIn"),function(){d.desktopZoomIn()})),d.actions.put("desktopZoomOut",new Action(mxResources.get("zoomOut"),function(){d.desktopZoomOut()})),d.actions.put("desktopResetZoom",new Action(mxResources.get("actualSize"),function(){d.desktopResetZoom()})),this.addMenuItems(m,"- keyboardShortcuts quickStart website support -".split(" "),u),"1"!=urlParams.disableUpdate&&this.addMenuItems(m,["check4Updates","-"],u),+this.addMenuItems(m,"desktopResetZoom desktopZoomIn desktopZoomOut - openDevTools - about".split(" "),u)):this.addMenuItems(m,"- keyboardShortcuts quickStart support - about".split(" "),u)}"1"==urlParams.test&&(m.addSeparator(u),this.addSubmenu("testDevelop",m,u))})));d.actions.addAction("languageCode...",function(){var m=new FilenameDialog(d,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(u){null!=u&&(Graph.diagramLanguage=0<u.length?u:null,Graph.translateDiagram=!0,q.refresh())}),+mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");d.showDialog(m.container,340,80,!0,!0);m.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,function(m,u){this.addMenuItems(m,["languageCode","-"],u);u=m.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;q.refresh()},u);Graph.translateDiagram||m.addCheckmark(u,Editor.checkmarkImage)})));if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");+mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testChecksum=Checksum");mxResources.parse("testCheckPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");mxResources.parse("testPerformance=Performance");+d.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!q.isSelectionEmpty()){var m=q.cloneCells(q.getSelectionCells()),u=q.getBoundingBoxFromGeometry(m,!0);m=q.moveCells(m,-u.x,-u.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+u.width+", "+u.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(q.encodeCells(m)))+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function m(k){return null==k||null==k.boundingBox||!isNaN(k.boundingBox.x)&&+!isNaN(k.boundingBox.y)&&!isNaN(k.boundingBox.width)&&!isNaN(k.boundingBox.height)}var u=q.getGraphBounds(),A=q.view.translate,B=q.view.scale;q.insertVertex(q.getDefaultParent(),null,"",u.x/B-A.x,u.y/B-A.y,u.width/B,u.height/B,"fillColor=none;strokeColor=red;");var H=0,T=0;q.view.states.visit(function(k,v){k=!0;m(v.shape)||(console.log("invalid shape",v.cell.id,v.shape),k=!1);m(v.text)||(console.log("invalid text",v.cell.id,v.text),k=!1);k||H++;T++});console.log("states checked",T,"invalid",H)}));+d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var m=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";m=new TextareaDialog(d,"Paste Data:",m,function(u){if(0<u.length)try{var A=function(v){function G(ba){if(null==Y[ba]){if(Y[ba]=!0,null!=R[ba]){for(;0<R[ba].length;){var ea=R[ba].pop();G(ea)}delete R[ba]}}else mxLog.debug(I+": Visited: "+ba)}var I=v.parentNode.id,M=v.childNodes;v={};for(var R={},Q=null,W={},V=0;V<M.length;V++){var X=+M[V];if(null!=X.id&&0<X.id.length)if(null==v[X.id]){v[X.id]=X.id;var Z=X.getAttribute("parent");null==Z?null!=Q?mxLog.debug(I+": Multiple roots: "+X.id):Q=X.id:(null==R[Z]&&(R[Z]=[]),R[Z].push(X.id))}else W[X.id]=X.id}M=Object.keys(W);0<M.length?(M=I+": "+M.length+" Duplicates: "+M.join(", "),mxLog.debug(M+" (see console)")):mxLog.debug(I+": Checked");var Y={};null==Q?mxLog.debug(I+": No root"):(G(Q),Object.keys(Y).length!=Object.keys(v).length&&(mxLog.debug(I+": Invalid tree: (see console)"),console.log(I++": Invalid tree",R)))};"<"!=u.charAt(0)&&(u=Graph.decompress(u),mxLog.debug("See console for uncompressed XML"),console.log("xml",u));var B=mxUtils.parseXml(u),H=d.getPagesForNode(B.documentElement,"mxGraphModel");if(null!=H&&0<H.length)try{var T=d.getHashValueForPages(H);mxLog.debug("Checksum: ",T)}catch(v){mxLog.debug("Error: ",v.message)}else mxLog.debug("No pages found for checksum");var k=B.getElementsByTagName("root");for(u=0;u<k.length;u++)A(k[u]);mxLog.show()}catch(v){d.handleError(v),null!=+window.console&&console.error(v)}});d.showDialog(m.container,620,460,!0,!0);m.init()}));var P=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var m=new TextareaDialog(d,"Diff/Sync:","",function(u){var A=d.getCurrentFile();if(0<u.length&&null!=A)try{var B=JSON.parse(u);A.patch([B],null,!0,!0);d.hideDialog()}catch(H){d.handleError(H)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(u,A){P=d.getPagesForXml(d.getFileData(!0));m.textarea.value=+"Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(P)}],["Diff",function(u,A){try{m.textarea.value=JSON.stringify(d.diffPages(P,d.pages),null,2)}catch(B){d.handleError(B)}}]]);null==P?(P=d.getPagesForXml(d.getFileData(!0)),m.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(P)):m.textarea.value=JSON.stringify(d.diffPages(P,d.pages),null,2);d.showDialog(m.container,620,460,!0,!0);m.init()}else d.alert("No pages")}));+d.actions.addAction("testChecksum",mxUtils.bind(this,function(){var m=d.getCurrentFile();null!=d.pages&&null!=m?d.spinner.spin(document.body,mxResources.get("loading"))&&m.getLatestVersion(function(u){d.spinner.stop();var A=d.getHashValueForPages(d.pages),B=m.getCurrentRevisionId(),H=d.getHashValueForPages(u.getShadowPages()),T=u.getDescriptorChecksum(u.getDescriptor()),k=u.getCurrentRevisionId();console.log("Local File",[m],"modified",m.isModified(),"checksum",A);console.log("Remote File",[u],"rev",+k==B,"desc",T==H,"checksum",H);d.alert("Checksums "+(H==A?"match":"no not match"))},function(u){console.log("Error getLatestVersion",u);d.handleError(u)}):console.log("Checksum: no file or pages")}));d.actions.addAction("testCheckPages",mxUtils.bind(this,function(){var m=d.getCurrentFile();console.log("editorUi",d,"file",m);if(null!=m&&m.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(m.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(m.theirPages));console.log("diff ownPages/theirPages",+d.diffPages(m.ownPages,m.theirPages));var u=m.getShadowPages();null!=u&&(console.log("Checksum shadowPages",d.getHashValueForPages(u)),console.log("diff shadowPages/ownPages",d.diffPages(u,m.ownPages)),console.log("diff ownPages/shadowPages",d.diffPages(m.ownPages,u)),console.log("diff theirPages/shadowPages",d.diffPages(m.theirPages,u)));null!=m.sync&&null!=m.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(m.sync.snapshot)),console.log("diff ownPages/snapshot",d.diffPages(m.ownPages,+m.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(m.theirPages,m.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(m.sync.snapshot,d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",d.diffPages(m.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(m.theirPages,d.pages)))}null!=m&&console.log("Shadow pages",[d.getXmlForPages(m.getShadowPages())]);null!=d.pages&&console.log("Checksum actualPages",d.getHashValueForPages(d.pages))}));+d.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",d);var m=d.getCurrentFile();null!=m&&m.isRealtime()&&null!=m.shadowPages&&(console.log("patching actualPages to shadowPages",m.patch([d.diffPages(m.shadowPages,d.pages)])),m.ownPages=d.clonePages(d.pages),m.theirPages=d.clonePages(d.pages),m.shadowPages=d.clonePages(d.pages),null!=m.sync&&(m.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testOptimize",mxUtils.bind(this,function(){q.model.beginUpdate();+try{var m=q.model.cells,u=0,A=[],B=[],H;for(H in m){var T=m[H],k=q.getCurrentCellStyle(T)[mxConstants.STYLE_IMAGE];null!=k&&"data:"==k.substring(0,5)&&(null==A[k]&&(A[k]=(A[k]||0)+1,u++),B.push(T))}q.setCellStyles(mxConstants.STYLE_IMAGE,null,B);console.log("Removed",u,"image(s) from",B.length,"cell(s): ",[B,A])}finally{q.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,q.getModel())}));d.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var m=+new mxImageExport,u=q.getGraphBounds(),A=q.view.scale,B=mxUtils.createXmlDocument(),H=B.createElement("output");B.appendChild(H);B=new mxXmlCanvas2D(H);B.translate(Math.floor((1-u.x)/A),Math.floor((1-u.y)/A));B.scale(1/A);var T=0,k=B.save;B.save=function(){T++;k.apply(this,arguments)};var v=B.restore;B.restore=function(){T--;v.apply(this,arguments)};var G=m.drawShape;m.drawShape=function(I){mxLog.debug("entering shape",I,T);G.apply(this,arguments);mxLog.debug("leaving shape",I,T)};m.drawState(q.getView().getState(q.model.root),+B);mxLog.show();mxLog.debug(mxUtils.getXml(H));mxLog.debug("stateCounter",T)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});var c=null,e=null,f=null,p=null,n=null,t=null,z=null,E=null;d.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=c?(q.view.revalidate=c,c=null):(c=q.view.revalidate,q.view.revalidate=function(){var m=Date.now(),u=c.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",+[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=e?(d.selectPage=e,e=null):(e=d.selectPage,d.selectPage=function(){var m=Date.now(),u=e.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=f?(d.diffPages=f,f=null):(f=d.diffPages,d.diffPages=function(){var m=Date.now(),u=f.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-m+" ms","args",arguments);+return u});null!=p?(d.patchPages=p,p=null):(p=d.patchPages,d.patchPages=function(){var m=Date.now(),u=p.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=n?(d.clonePages=n,n=null):(n=d.clonePages,d.clonePages=function(){var m=Date.now(),u=n.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=z?(d.getHashValueForPages=z,+z=null):(z=d.getHashValueForPages,d.getHashValueForPages=function(){var m=Date.now(),u=z.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=E?(d.resolveCrossReferences=E,E=null):(E=d.resolveCrossReferences,d.resolveCrossReferences=function(){var m=Date.now(),u=E.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-m+" ms","args",arguments);return u});+null!=t?(d.getFileData=t,t=null):(t=d.getFileData,d.getFileData=function(){var m=Date.now(),u=t.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",[this],"time",Date.now()-m+" ms","args",arguments);return u});EditorUi.debug("[Performance]",null!=c?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(m,u){this.addMenuItems(m,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),+u);var A=m.addItem(mxResources.get("testPerformance"),null,function(){d.actions.get("testPerformance").funct()},u);null!=c&&m.addCheckmark(A,Editor.checkmarkImage);this.addMenuItems(m,["-","testShowConsole"],u)})))}d.actions.put("shapes",new Action(mxResources.get("moreShapes")+"...",function(m){mxClient.IS_CHROMEAPP||!d.isOffline()?d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?+mxClient.IS_IOS?300:280:260,!0,!0)}));d.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(m){q.isEnabled()&&(m=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),m.vertex=!0,m=new EditShapeDialog(d,m,mxResources.get("editShape")+":",630,400),d.showDialog(m.container,640,480,!0,!1),m.init())})).isEnabled=y;d.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){d.showHtmlDialog(mxResources.get("create"),+"https://www.drawio.com/doc/faq/embed-html-options",m,function(u,A,B,H,T,k,v,G,I,M,R,Q){d.createHtml(u,A,B,H,T,k,v,G,I,M,R,mxUtils.bind(this,function(W,V){var X=new EmbedDialog(d,"\x3c!-- "+d.editor.appName+" diagram --\x3e\n"+W+"\n"+V+"\n",null,null,function(){var Z=window.open(),Y=Z.document;if(null!=Y){"CSS1Compat"===document.compatMode&&Y.writeln("<!DOCTYPE html>");Y.writeln("<html>");Y.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');+Y.writeln("<body>");Y.writeln(W);var ba=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;ba&&Y.writeln(V);Y.writeln("</body>");Y.writeln("</html>");Y.close();if(!ba){var ea=Z.document.createElement("div");ea.marginLeft="26px";ea.marginTop="26px";mxUtils.write(ea,mxResources.get("updatingDocument"));ba=Z.document.createElement("img");ba.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");ba.style.marginLeft="6px";ea.appendChild(ba);Z.document.body.insertBefore(ea,+Z.document.body.firstChild);window.setTimeout(function(){var ca=document.createElement("script");ca.type="text/javascript";ca.src=/<script.*?src="(.*?)"/.exec(V)[1];Y.body.appendChild(ca);ea.parentNode.removeChild(ea)},20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})});d.showDialog(X.container,450,240,!0,!0);X.init()}),Q)})})}));d.actions.put("liveImage",new Action("Live image...",function(){var m=d.getCurrentFile();null!=m&&d.getPublicUrl(m,function(u){null!=u?(u=new EmbedDialog(d,+'<img src="'+(m.constructor!=DriveFile?u:"https://drive.google.com/uc?id="+m.getId())+'"/>'),d.showDialog(u.container,450,240,!0,!0),u.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(m,u,A,B,H,T){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(m,u,A,B,H,T,function(k){d.spinner.stop();k=new EmbedDialog(d,k);d.showDialog(k.container,450,+240,!0,!0);k.init()},function(k){d.spinner.stop();d.handleError(k)})},mxResources.get("image"),mxResources.get("retina"),d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showEmbedImageDialog(function(m,u,A,B,H,T){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(m,u,A,B,H,T,function(k){d.spinner.stop();k=new EmbedDialog(d,k);d.showDialog(k.container,450,240,!0,!0);k.init()},function(k){d.spinner.stop();d.handleError(k)})},+mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")}));d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){var u=q.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,u.height/q.view.scale))+2,null,null,null,m,d.getCurrentFile(),function(A,B,H,T,k,v,G,I,M,R,Q,W){var V=[];M&&V.push("tags=%7B%7D");A=new EmbedDialog(d,'<iframe frameborder="0" style="width:'++G+";height:"+I+';" src="'+d.createLink(A,B,!0,T,k,v,"public"==R?m:null,null,V,null,H,Q,W)+'"'+(Q?' allowtransparency="true"':"")+"></iframe>");d.showDialog(A.container,450,240,!0,!0);A.init()},!0,!0)})}));d.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var m=document.createElement("div");m.style.position="absolute";m.style.bottom="30px";m.style.textAlign="center";m.style.width="100%";m.style.left="0px";var u=document.createElement("a");u.setAttribute("href","javascript:void(0);");+u.setAttribute("target","_blank");u.style.cursor="pointer";mxUtils.write(u,mxResources.get("getNotionChromeExtension"));m.appendChild(u);mxUtils.setPrefixedStyle(u.style,"transition","all 1s ease");mxUtils.setOpacity(u,0);window.setTimeout(function(){mxUtils.setOpacity(u,100)},300);mxEvent.addListener(u,"click",function(A){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(A)});d.getPublicUrl(d.getCurrentFile(),function(A){d.showPublishLinkDialog(mxResources.get("notion"),+null,null,!0,"https://www.drawio.com/blog/drawio-notion",m,A,d.getCurrentFile(),function(B,H,T,k,v,G,I,M,R,Q,W,V){I=["border=0"];R&&I.push("tags=%7B%7D");B=new EmbedDialog(d,d.createLink(B,H,!0,k,v,G,"public"==Q?A:null,null,I,null,T,null,V));d.showDialog(B.container,450,240,!0,!0);B.init()},null,!0)})}));d.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){d.showPublishLinkDialog(null,null,null,null,null,null,m,d.getCurrentFile(),+function(u,A,B,H,T,k,v,G,I,M,R,Q){v=[];H&&I&&v.push("tags=%7B%7D");u=new EmbedDialog(d,d.createLink(u,A,!0,H,T,k,"public"==M?m:null,null,v,null,B,null,Q));d.showDialog(u.container,450,240,!0,!0);u.init()},null,!0)})}));d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")});d.actions.addAction("googleDocs...",function(){d.openLink("http://docsaddon.draw.io")});d.actions.addAction("googleSlides...",function(){d.openLink("https://slidesaddon.draw.io")});d.actions.addAction("googleSheets...",+function(){d.openLink("https://sheetsaddon.draw.io")});d.actions.addAction("googleSites...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){m=new GoogleSitesDialog(d,m);d.showDialog(m.container,420,256,!0,!0);m.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)x=d.actions.addAction("scratchpad",function(){d.toggleScratchpad()}),x.setToggleAction(!0),x.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,+380,240,!0,!1)});window.matchMedia&&null!=document.getElementById("high-contrast-stylesheet")&&(x=d.actions.addAction("highContrast",function(){d.setAndPersistHighContrast(!d.isHighContrast())}),x.setToggleAction(!0),x.setSelectedCallback(function(){return d.isHighContrast()}));x=d.actions.addAction("search",function(){if(null!=d.sidebar){var m=d.sidebar.isEntryVisible("search");d.sidebar.showPalette("search",!m);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!m,mxSettings.save())}});x.label=+mxResources.get("searchShapes");x.setToggleAction(!0);x.setSelectedCallback(function(){return null!=d.sidebar&&d.sidebar.isEntryVisible("search")});d.actions.get("clearDefaultStyle").funct=function(m){q.isEnabled()&&(d.clearDefaultStyle(),Editor.sketchMode&&d.setSketchMode(!1))};"1"==urlParams.embed&&(d.actions.get("saveAs").setEnabled(!1),d.actions.get("save").funct=function(m){q.isEditing()&&q.stopEditing();var u="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());+if("json"==urlParams.proto){var A=d.createLoadMessage("save");A.xml=u;!0!==m||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(A.exit=!0);u=JSON.stringify(A)}(window.opener||window.parent).postMessage(u,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));m=d.getCurrentFile();null==m||m.constructor==EmbedFile||m.constructor==LocalFile&&null==m.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)},null,null,Editor.ctrlKey+"+S").label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var m=function(){d.editor.modified=!1;var u="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):"";(window.opener||window.parent).postMessage(u,"*")};d.editor.modified?d.confirm(mxResources.get("allChangesLost"),null,m,mxResources.get("cancel"),mxResources.get("discardChanges")):m()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(m,u){d.isExportToCanvas()?(this.addMenuItems(m,["exportPng"],u),d.jpgSupported&&this.addMenuItems(m,["exportJpg"],u),d.webpSupported&&this.addMenuItems(m,["exportWebp"],u)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(m,["exportPng","exportJpg"],u);this.addMenuItems(m,["exportSvg","-"],u);d.isOffline()||-d.printPdfExport?this.addMenuItems(m,["exportPdf"],u):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(m,["exportPdf"],u);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(m,["exportVsdx"],u);this.addMenuItems(m,["-","exportHtml","exportXml","exportUrl"],u);d.isOffline()||(m.addSeparator(u),this.addMenuItem(m,"export",u).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||-this.addMenuItems(m,["publishLink"],u);d.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(m.addSeparator(u),d.menus.addSubmenu("embed",m,u))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(m,u){function A(T){T.pickFile(function(k){d.spinner.spin(document.body,mxResources.get("loading"))&&T.getFile(k,function(v){var G="data:image/"==v.getData().substring(0,11)?H(v.getTitle()):"text/xml";/\.svg$/i.test(v.getTitle())&&-!d.editor.isDataSvg(v.getData())&&(v.setData(Editor.createSvgDataUri(v.getData())),G="image/svg+xml");B(v.getData(),G,v.getTitle())},function(v){d.handleError(v,null!=v?mxResources.get("errorLoadingFile"):null)},T==d.drive)},!0)}var B=mxUtils.bind(this,function(T,k,v){var G=q.view,I=q.getGraphBounds(),M=q.snap(Math.ceil(Math.max(0,I.x/G.scale-G.translate.x)+4*q.gridSize)),N=q.snap(Math.ceil(Math.max(0,(I.y+I.height)/G.scale-G.translate.y)+4*q.gridSize));"data:image/"==T.substring(0,11)?d.loadImage(T,-mxUtils.bind(this,function(S){var V=!0,W=mxUtils.bind(this,function(){d.resizeImage(S,T,mxUtils.bind(this,function(X,Z,Y){X=V?Math.min(1,Math.min(d.maxImageSize/Z,d.maxImageSize/Y)):1;d.importFile(T,k,M,N,Math.round(Z*X),Math.round(Y*X),v,function(ba){d.spinner.stop();q.setSelectionCells(ba);q.scrollCellToVisible(q.getSelectionCell())})}),V)});T.length>d.resampleThreshold?d.confirmImageResize(function(X){V=X;W()}):W()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):-d.importFile(T,k,M,N,0,0,v,function(S){d.spinner.stop();q.setSelectionCells(S);q.scrollCellToVisible(q.getSelectionCell())})}),H=mxUtils.bind(this,function(T){var k="text/xml";/\.png$/i.test(T)?k="image/png":/\.jpe?g$/i.test(T)?k="image/jpg":/\.gif$/i.test(T)?k="image/gif":/\.pdf$/i.test(T)&&(k="application/pdf");return k});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?m.addItem(mxResources.get("googleDrive")+"...",null,function(){A(d.drive)},u):d.isModeEnabled(App.MODE_GOOGLE)&&+d.printPdfExport?this.addMenuItems(m,["exportPdf"],u):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(m,["exportPdf"],u);!d.vsdxExportEnabled()||mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(m,["exportVsdx"],u);this.addMenuItems(m,["-","exportHtml","exportXml","exportUrl"],u);d.isOffline()||(m.addSeparator(u),this.addMenuItem(m,"export",u).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||+"min"!=Editor.currentTheme||this.addMenuItems(m,["publishLink"],u);d.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(m.addSeparator(u),d.menus.addSubmenu("embed",m,u))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(m,u){function A(T){T.pickFile(function(k){d.spinner.spin(document.body,mxResources.get("loading"))&&T.getFile(k,function(v){var G="data:image/"==v.getData().substring(0,11)?H(v.getTitle()):+"text/xml";/\.svg$/i.test(v.getTitle())&&!d.editor.isDataSvg(v.getData())&&(v.setData(Editor.createSvgDataUri(v.getData())),G="image/svg+xml");B(v.getData(),G,v.getTitle())},function(v){d.handleError(v,null!=v?mxResources.get("errorLoadingFile"):null)},T==d.drive)},!0)}var B=mxUtils.bind(this,function(T,k,v){var G=q.view,I=q.getGraphBounds(),M=q.snap(Math.ceil(Math.max(0,I.x/G.scale-G.translate.x)+4*q.gridSize)),R=q.snap(Math.ceil(Math.max(0,(I.y+I.height)/G.scale-G.translate.y)+4*q.gridSize));"data:image/"==+T.substring(0,11)?d.loadImage(T,mxUtils.bind(this,function(Q){var W=!0,V=mxUtils.bind(this,function(){d.resizeImage(Q,T,mxUtils.bind(this,function(X,Z,Y){X=W?Math.min(1,Math.min(d.maxImageSize/Z,d.maxImageSize/Y)):1;d.importFile(T,k,M,R,Math.round(Z*X),Math.round(Y*X),v,function(ba){d.spinner.stop();q.setSelectionCells(ba);q.scrollCellToVisible(q.getSelectionCell())})}),W)});T.length>d.resampleThreshold?d.confirmImageResize(function(X){W=X;V()}):V()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):+d.importFile(T,k,M,R,0,0,v,function(Q){d.spinner.stop();q.setSelectionCells(Q);q.scrollCellToVisible(q.getSelectionCell())})}),H=mxUtils.bind(this,function(T){var k="text/xml";/\.png$/i.test(T)?k="image/png":/\.jpe?g$/i.test(T)?k="image/jpg":/\.gif$/i.test(T)?k="image/gif":/\.pdf$/i.test(T)&&(k="application/pdf");return k});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?m.addItem(mxResources.get("googleDrive")+"...",null,function(){A(d.drive)},u):d.isModeEnabled(App.MODE_GOOGLE)&&m.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));d.isModeReady(App.MODE_ONEDRIVE)?m.addItem(mxResources.get("oneDrive")+"...",null,function(){A(d.oneDrive)},u):d.isModeEnabled(App.MODE_ONEDRIVE)&&m.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);d.isModeReady(App.MODE_DROPBOX)?m.addItem(mxResources.get("dropbox")+"...",null,function(){A(d.dropbox)},u):d.isModeEnabled(App.MODE_DROPBOX)&&m.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);m.addSeparator(u);d.isModeReady(App.MODE_GITHUB)&&m.addItem(mxResources.get("github")+"...",null,function(){A(d.gitHub)},u);d.isModeReady(App.MODE_GITLAB)&&m.addItem(mxResources.get("gitlab")+"...",null,function(){A(d.gitLab)},u);d.isModeReady(App.MODE_TRELLO)?m.addItem(mxResources.get("trello")+"...",null,function(){A(d.trello)},u):d.isModeEnabled(App.MODE_TRELLO)&&m.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);m.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&m.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},u);"1"!=urlParams.noDevice&&m.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},u);d.isOffline()||(m.addSeparator(u),m.addItem(mxResources.get("url")+"...",null,function(){var T=new FilenameDialog(d,"",mxResources.get("import"),function(k){if(null!=k&&0<k.length&&@@ -14111,10 +14111,10 @@ mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(B,"https:/u);"1"!=urlParams.sketch&&this.addMenuItems(m,["-","fullscreen"],u)}})));this.put("editCell",new Menu(mxUtils.bind(this,function(m,u){this.addMenuItems(m,"editLink editShape editImage crop - editData copyData pasteData - editConnectionPoints editGeometry - editTooltip editStyle - edit".split(" "),u)})));this.put("currentPage",new Menu(mxUtils.bind(this,function(m,u){var A=d.currentPage;null!=A&&(m.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){d.renamePage(A,A.getName())}),u),m.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){d.removePage(A)}),u),1<d.pages.length&&(d.menus.addSubmenu("movePage",m,u,mxResources.get("move")),m.addSeparator(u)),m.addSeparator(u),m.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){d.duplicatePage(A,mxResources.get("copyOf",[A.getName()]))}),u),1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||m.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){d.editor.editAsNew(d.getFileData(!0,null,null,null,!0,!0))}),u)))})));this.put("pages",new Menu(mxUtils.bind(this,function(m,u){var A=d.currentPage;d.editor.graph.isLightboxView()||(m.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{d.insertPage()}catch(H){d.handleError(H)}}),u,null,d.editor.graph.isEnabled()),m.addSeparator(u));if(null!=d.pages)for(var B=0;B<d.pages.length;B++)mxUtils.bind(this,function(H){var T=null;T=d.pages[H]!=A||d.editor.graph.isLightboxView()?-m.addItem(d.getShortPageName(d.pages[H]),null,mxUtils.bind(this,function(){d.selectPage(d.pages[H])}),u):d.menus.addSubmenu("currentPage",m,u,d.getShortPageName(A));var k=d.pages[H].getId();T.setAttribute("title",d.pages[H].getName()+" ("+(H+1)+"/"+d.pages.length+")"+(null!=k?" ["+k+"]":""));d.pages[H]==A&&m.addCheckmark(T,Editor.checkmarkImage)})(B)})));if(EditorUi.isElectronApp){var R="1"==urlParams.enableSpellCheck;x=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();R=!R;d.alert(mxResources.get("restartForChangeRequired"))});-x.setToggleAction(!0);x.setSelectedCallback(function(){return R});var U="1"==urlParams.enableStoreBkp;x=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();U=!U});x.setToggleAction(!0);x.setSelectedCallback(function(){return U});var P="1"==urlParams.isGoogleFontsEnabled;x=d.actions.addAction("googleFonts",function(){d.toggleGoogleFonts();P=!P;d.alert(mxResources.get("restartForChangeRequired"))});x.setToggleAction(!0);x.setSelectedCallback(function(){return P});d.actions.addAction("openDevTools",-function(){d.openDevTools()});d.actions.addAction("drafts...",function(){var m=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(u){u=parseInt(u);0<=u&&(EditorUi.draftSaveDelay=1E3*u,EditorUi.enableDrafts=0<u,mxSettings.setDraftSaveDelay(u),mxSettings.save())}),mxResources.get("draftSaveInt"));d.showDialog(m.container,320,80,!0,!0);m.init()})}var O=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(m,u){if("simple"==Editor.currentTheme||-"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||d.mode==App.MODE_ATLAS||"1"==urlParams.embedInline||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||d.menus.addSubmenu("appearance",m,u);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",m,u);m.addSeparator(u);null==O||"1"==urlParams.embed&&null!=urlParams.lang||d.menus.addSubmenu("language",m,u);d.menus.addSubmenu("units",+m.addItem(d.getShortPageName(d.pages[H]),null,mxUtils.bind(this,function(){d.selectPage(d.pages[H])}),u):d.menus.addSubmenu("currentPage",m,u,d.getShortPageName(A));var k=d.pages[H].getId();T.setAttribute("title",d.pages[H].getName()+" ("+(H+1)+"/"+d.pages.length+")"+(null!=k?" ["+k+"]":""));d.pages[H]==A&&m.addCheckmark(T,Editor.checkmarkImage)})(B)})));if(EditorUi.isElectronApp){var S="1"==urlParams.enableSpellCheck;x=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();S=!S;d.alert(mxResources.get("restartForChangeRequired"))});+x.setToggleAction(!0);x.setSelectedCallback(function(){return S});var U="1"==urlParams.enableStoreBkp;x=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();U=!U});x.setToggleAction(!0);x.setSelectedCallback(function(){return U});var O="1"==urlParams.isGoogleFontsEnabled;x=d.actions.addAction("googleFonts",function(){d.toggleGoogleFonts();O=!O;d.alert(mxResources.get("restartForChangeRequired"))});x.setToggleAction(!0);x.setSelectedCallback(function(){return O});d.actions.addAction("openDevTools",+function(){d.openDevTools()});d.actions.addAction("drafts...",function(){var m=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(u){u=parseInt(u);0<=u&&(EditorUi.draftSaveDelay=1E3*u,EditorUi.enableDrafts=0<u,mxSettings.setDraftSaveDelay(u),mxSettings.save())}),mxResources.get("draftSaveInt"));d.showDialog(m.container,320,80,!0,!0);m.init()})}var N=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(m,u){if("simple"==Editor.currentTheme||+"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||d.mode==App.MODE_ATLAS||"1"==urlParams.embedInline||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||d.menus.addSubmenu("appearance",m,u);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",m,u);m.addSeparator(u);null==N||"1"==urlParams.embed&&null!=urlParams.lang||d.menus.addSubmenu("language",m,u);d.menus.addSubmenu("units",m,u);d.menus.addMenuItems(m,"- copyConnect collapseExpand - tooltips animations -".split(" "),u);var A=d.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=A&&A.isRealtimeEnabled()&&A.isRealtimeSupported()&&this.addMenuItems(m,["showRemoteCursors"],u),d.menus.addMenuItems(m,["ruler","-"],u));EditorUi.isElectronApp&&d.menus.addMenuItems(m,"- googleFonts spellCheck autoBkp drafts -".split(" "),u);this.addSubmenu("diagramLanguage",m,u);m.addSeparator(u);d.mode!=App.MODE_ATLAS&&d.menus.addMenuItem(m,"configuration",u);m.addSeparator(u)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",m,u),"1"==urlParams.embed&&"1"!=urlParams.atlas||"atlas"==Editor.currentTheme||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||d.menus.addSubmenu("appearance",m,u),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",m,u),m.addSeparator(u),A=this.addSubmenu("adaptiveColors",m,u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(A,"https://github.com/jgraph/drawio/discussions/4713"),"undefined"!==typeof MathJax&&(A=this.addMenuItem(m,"mathematicalTypesetting",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(A,"https://www.drawio.com/doc/faq/math-typesetting")),EditorUi.isElectronApp&&this.addMenuItems(m,["googleFonts","spellCheck","autoBkp","drafts","-"],u),this.addMenuItems(m,["copyConnect","collapseExpand","-"],u),"1"!=urlParams.embed&&(A=d.getCurrentFile(),null!=@@ -14136,14 +14136,14 @@ OneDriveFile||d.menus.addMenuItems(m,["share"],u));m.addSeparator(u);null!=A&&A.u):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==A||A.constructor==LocalFile&&null==A.fileHandle||(m.addSeparator(u),B=this.addMenuItem(m,"synchronize",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(m,["-","save","saveAs","-"],u),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==A||this.addMenuItems(m,["share","-"],u),null!=A&&A.isRenamable()&&this.addMenuItems(m,["rename"],u),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(m,["upload"],u):(this.addMenuItems(m,["makeCopy"],u),null!=A&&(A.constructor==OneDriveFile&&this.addMenuItems(m,["moveToFolder"],u),null!=A.getFolderUrl()&&d.menus.addMenuItems(m,["openFolder"],u)))),m.addSeparator(u),this.addSubmenu("importFrom",m,u),this.addSubmenu("exportAs",m,u),m.addSeparator(u),this.addSubmenu("embed",m,u),this.addSubmenu("publish",m,u),m.addSeparator(u),this.addSubmenu("newLibrary",m,u),this.addSubmenu("openLibraryFrom",m,u),d.isRevisionHistorySupported()&&this.addMenuItems(m,["-","revisionHistory"],u),null!=A&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(B=null!=A.getTitle()?A.getTitle():d.defaultFilename,(A.constructor==DriveFile&&null!=A.sync&&A.sync.isConnected()||!/(\.html)$/i.test(B))&&this.addMenuItems(m,["-","properties"])),this.addMenuItems(m,["-","pageSetup"],u),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(m,["print"],u),-this.addMenuItems(m,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(m,u){function A(M){var N=encodeURIComponent(M.name)+(null==M.url?"":"@"+encodeURIComponent(M.url));if(!H[N]){for(var S=M.name,V=0;null!=G[S.toLowerCase()];)S=M.name+" ("+ ++V+")";null==v[N]&&(I.push({name:M.name,url:M.url,label:S,title:M.url}),G[S.toLowerCase()]=M,v[N]=M)}}for(var B=mxUtils.bind(this,function(M,N,S,V,W){var X=d.editor.graph,Z=this.styleChange(m,null!=V?V:M,[mxConstants.STYLE_FONTFAMILY,-"fontSource","FType"],[M,null!=N?encodeURIComponent(N):null,null],null,u,function(){X.setFont(M,N);d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[M,null!=N?encodeURIComponent(N):null,null],"cells",[X.cellEditor.getEditingCell()]))},function(){X.updateLabelElements(X.getSelectionCells(),function(Y){Y.removeAttribute("face");Y.style.fontFamily=null;"PRE"==Y.nodeName&&X.replaceElement(Y,"div")})});S&&(S=document.createElement("img"),-S.className="geAdaptiveAsset",S.setAttribute("src",Editor.crossImage),S.setAttribute("title",mxResources.get("delete")),S.setAttribute("valign","absmiddle"),S.setAttribute("border","0"),S.style.position="relative",S.style.top="2px",S.style.width="14px",S.style.cursor="default",S.style.margin="0 3px",Z.firstChild.nextSibling.nextSibling.appendChild(S),mxEvent.addListener(S,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Y){this.removeCustomFont(M,N);this.editorUi.hideCurrentMenu();-mxEvent.consume(Y)})));Graph.addFont(M,N);Z.firstChild.nextSibling.style.fontFamily=M;W=null!=V?V:M;null!=N&&(W+=" ("+N+")");Z.setAttribute("title",W)}),H={},T=0;T<this.defaultFonts.length;T++){var k=this.defaultFonts[T];"string"===typeof k?B(k):null!=k.fontFamily&&null!=k.fontUrl&&(H[encodeURIComponent(k.fontFamily)+"@"+encodeURIComponent(k.fontUrl)]=!0,B(k.fontFamily,k.fontUrl))}m.addSeparator(u);var v={},G={},I=[];for(T=0;T<this.customFonts.length;T++)A(this.customFonts[T]);I.sort(function(M,N){return M.label<-N.label?-1:M.label>N.label?1:0});if(0<I.length){for(T=0;T<I.length;T++)B(I[T].name,I[T].url,!0,I[T].label);m.addSeparator(u)}m.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),u);m.addSeparator(u);m.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var M=this.editorUi.editor.graph,N=M.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],S="s",V=null;if(M.isEditing()){var W=-M.getSelectedEditingElement();if(null!=W){var X=mxUtils.getCurrentStyle(W);if(null!=X){N=mxUtils.getCssFontFamily(X.fontFamily);X=M.getView().getState(M.cellEditor.getEditingCell());V=null!=X?X.style.fontSource:null;for(null!=V&&(V=decodeURIComponent(V));null!=W&&W!=M.cellEditor.textarea;){if(W.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=W.getAttribute("data-font-src")){V=W.getAttribute("data-font-src");break}else if(W.getAttribute("face")==N){V=null;break}W=W.parentNode}null!=V&&(Graph.isGoogleFontUrl(V)?-(V=null,S="g"):S="w")}}}else X=M.getView().getState(M.getSelectionCell()),null!=X&&(N=X.style[mxConstants.STYLE_FONTFAMILY]||N,W=X.style.fontSource,null!=W&&(W=decodeURIComponent(W),Graph.isGoogleFontUrl(W)?S="g":(S="w",V=W)));null!=V&&V.substring(0,PROXY_URL.length)==PROXY_URL&&(V=decodeURIComponent(V.substr((PROXY_URL+"?url=").length)));var Z=null;document.activeElement==M.cellEditor.textarea&&(Z=M.cellEditor.saveSelection());N=new FontDialog(this.editorUi,N,V,S,mxUtils.bind(this,function(Y,ba,-ea){null!=Z&&(M.cellEditor.restoreSelection(Z),Z=null);if(null!=Y&&0<Y.length)if(this.addCustomFont(Y,ba),M.isEditing())M.setFont(Y,ba);else{M.getModel().beginUpdate();try{M.stopEditing(!1),M.setCellStyles(mxConstants.STYLE_FONTFAMILY,Y),M.setCellStyles("fontSource",null!=ba?encodeURIComponent(ba):null),M.setCellStyles("FType",null)}finally{M.getModel().endUpdate()}}}));this.editorUi.showDialog(N.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);N.init()}),+this.addMenuItems(m,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(m,u){function A(M){var R=encodeURIComponent(M.name)+(null==M.url?"":"@"+encodeURIComponent(M.url));if(!H[R]){for(var Q=M.name,W=0;null!=G[Q.toLowerCase()];)Q=M.name+" ("+ ++W+")";null==v[R]&&(I.push({name:M.name,url:M.url,label:Q,title:M.url}),G[Q.toLowerCase()]=M,v[R]=M)}}for(var B=mxUtils.bind(this,function(M,R,Q,W,V){var X=d.editor.graph,Z=this.styleChange(m,null!=W?W:M,[mxConstants.STYLE_FONTFAMILY,+"fontSource","FType"],[M,null!=R?encodeURIComponent(R):null,null],null,u,function(){X.setFont(M,R);d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[M,null!=R?encodeURIComponent(R):null,null],"cells",[X.cellEditor.getEditingCell()]))},function(){X.updateLabelElements(X.getSelectionCells(),function(Y){Y.removeAttribute("face");Y.style.fontFamily=null;"PRE"==Y.nodeName&&X.replaceElement(Y,"div")})});Q&&(Q=document.createElement("img"),+Q.className="geAdaptiveAsset",Q.setAttribute("src",Editor.crossImage),Q.setAttribute("title",mxResources.get("delete")),Q.setAttribute("valign","absmiddle"),Q.setAttribute("border","0"),Q.style.position="relative",Q.style.top="2px",Q.style.width="14px",Q.style.cursor="default",Q.style.margin="0 3px",Z.firstChild.nextSibling.nextSibling.appendChild(Q),mxEvent.addListener(Q,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Y){this.removeCustomFont(M,R);this.editorUi.hideCurrentMenu();+mxEvent.consume(Y)})));Graph.addFont(M,R);Z.firstChild.nextSibling.style.fontFamily=M;V=null!=W?W:M;null!=R&&(V+=" ("+R+")");Z.setAttribute("title",V)}),H={},T=0;T<this.defaultFonts.length;T++){var k=this.defaultFonts[T];"string"===typeof k?B(k):null!=k.fontFamily&&null!=k.fontUrl&&(H[encodeURIComponent(k.fontFamily)+"@"+encodeURIComponent(k.fontUrl)]=!0,B(k.fontFamily,k.fontUrl))}m.addSeparator(u);var v={},G={},I=[];for(T=0;T<this.customFonts.length;T++)A(this.customFonts[T]);I.sort(function(M,R){return M.label<+R.label?-1:M.label>R.label?1:0});if(0<I.length){for(T=0;T<I.length;T++)B(I[T].name,I[T].url,!0,I[T].label);m.addSeparator(u)}m.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),u);m.addSeparator(u);m.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var M=this.editorUi.editor.graph,R=M.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],Q="s",W=null;if(M.isEditing()){var V=+M.getSelectedEditingElement();if(null!=V){var X=mxUtils.getCurrentStyle(V);if(null!=X){R=mxUtils.getCssFontFamily(X.fontFamily);X=M.getView().getState(M.cellEditor.getEditingCell());W=null!=X?X.style.fontSource:null;for(null!=W&&(W=decodeURIComponent(W));null!=V&&V!=M.cellEditor.textarea;){if(V.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=V.getAttribute("data-font-src")){W=V.getAttribute("data-font-src");break}else if(V.getAttribute("face")==R){W=null;break}V=V.parentNode}null!=W&&(Graph.isGoogleFontUrl(W)?+(W=null,Q="g"):Q="w")}}}else X=M.getView().getState(M.getSelectionCell()),null!=X&&(R=X.style[mxConstants.STYLE_FONTFAMILY]||R,V=X.style.fontSource,null!=V&&(V=decodeURIComponent(V),Graph.isGoogleFontUrl(V)?Q="g":(Q="w",W=V)));null!=W&&W.substring(0,PROXY_URL.length)==PROXY_URL&&(W=decodeURIComponent(W.substr((PROXY_URL+"?url=").length)));var Z=null;document.activeElement==M.cellEditor.textarea&&(Z=M.cellEditor.saveSelection());R=new FontDialog(this.editorUi,R,W,Q,mxUtils.bind(this,function(Y,ba,+ea){null!=Z&&(M.cellEditor.restoreSelection(Z),Z=null);if(null!=Y&&0<Y.length)if(this.addCustomFont(Y,ba),M.isEditing())M.setFont(Y,ba);else{M.getModel().beginUpdate();try{M.stopEditing(!1),M.setCellStyles(mxConstants.STYLE_FONTFAMILY,Y),M.setCellStyles("fontSource",null!=ba?encodeURIComponent(ba):null),M.setCellStyles("FType",null)}finally{M.getModel().endUpdate()}}}));this.editorUi.showDialog(R.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);R.init()}),u,null,!0)})))}})();function DiagramPage(b,g){this.node=b;null!=g?this.node.setAttribute("id",g):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,g,l){this.ui=b;this.page=g;this.previous=this.name=l}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(b,g,l){this.ui=b;this.oldIndex=g;this.newIndex=l}@@ -14209,7 +14209,7 @@ EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxRd=mxEvent.getClientY(b);g.popup(l,d,null,b);this.setCurrentMenu(g);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,g){var l=this.createTab(),d=b.getName()||mxResources.get("untitled"),q=b.getId();l.setAttribute("title",d+(null!=q?" ("+q+")":"")+" ["+g+"]");g=document.createElement("span");g.style.maxWidth="160px";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,d);l.appendChild(g);this.addTabListeners(b,l);return l};EditorUi.prototype.addTabListeners=function(b,g){mxEvent.disableContextMenu(g);var l=this.editor.graph;mxEvent.addListener(g,"dblclick",mxUtils.bind(this,function(J){this.renamePage(b);mxEvent.consume(J)}));var d=document.createElement("div");d.className="geTabMenuButton";d.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";d.style.backgroundSize="10px";g.appendChild(d);var q=!1,y=!1,x=mxUtils.bind(this,function(J){q=null!=this.currentMenu;y=b==this.currentPage;this.scrollToPage(b);l.isMouseDown||y||this.selectPage(b)}),D=mxUtils.bind(this,function(J){if(l.isEnabled()&&!l.isMouseDown&&(y&&(mxEvent.isTouchEvent(J)||mxEvent.getSource(J)==d)||mxEvent.isPopupTrigger(J))&&(l.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(J)||!q)){var K=new mxPopupMenu(this.createPageMenu(b));K.div.className+=" geMenubarMenu";K.smartSeparators=!0;K.showDisabled=!0;K.autoExpand=!0;K.hideMenu=mxUtils.bind(this,-function(){mxPopupMenu.prototype.hideMenu.apply(K,arguments);this.resetCurrentMenu();K.destroy()});var L=mxEvent.getClientX(J),Q=mxEvent.getClientY(J);K.popup(L,Q,null,J);this.setCurrentMenu(K,g)}mxEvent.consume(J)});mxEvent.addGestureListeners(d,x,null,D);mxEvent.addGestureListeners(g,x,null,D)};+function(){mxPopupMenu.prototype.hideMenu.apply(K,arguments);this.resetCurrentMenu();K.destroy()});var L=mxEvent.getClientX(J),P=mxEvent.getClientY(J);K.popup(L,P,null,J);this.setCurrentMenu(K,g)}mxEvent.consume(J)});mxEvent.addGestureListeners(d,x,null,D);mxEvent.addGestureListeners(g,x,null,D)};EditorUi.prototype.createPageMenu=function(b,g){return mxUtils.bind(this,function(l,d){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||l.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),d));l.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),d);l.addSeparator(d);this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",l,d,mxResources.get("move"));l.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),d);l.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,g)}),d)})};(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(g,l,d){d.ui=g.ui;return l};b.afterDecode=function(g,l,d){g=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=g;return d};mxCodecRegistry.register(b)})();(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(g,l,d){d.ui=g.ui;return l};b.afterDecode=function(g,l,d){g=d.previous;d.previous=d.name;d.name=g;return d};mxCodecRegistry.register(b)})();@@ -14220,29 +14220,29 @@ q.nextSibling,q.parentNode.removeChild(q),q=d;null!=q;){d=q.nextSibling;if(q.nodfunction(K){return this.isTreeEdge(K)}))};Graph.prototype.getIncomingTreeEdges=function(d,q){return this.getTreeEdges(d,q,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,q){return this.getTreeEdges(d,q,!1,!0,!1)};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){g.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(B){return p.isVertex(B)&&y(B)}function q(B){var H=!1;null!=B&&(H="1"==f.getCurrentCellStyle(B).treeMoving);return H}function y(B){var H=!1;null!=B&&(B=p.getParent(B),H=f.view.getState(B),H="tree"==(null!=H?H.style:f.getCellStyle(B)).containerType);return H}function x(B){var H=!1;null!=B&&(B=p.getParent(B),H=f.view.getState(B),f.view.getState(B),H=null!=(null!=H?H.style:f.getCellStyle(B)).childLayout);return H}function D(B){B=f.view.getState(B);if(null!=B){var H=f.getIncomingTreeEdges(B.cell);if(0<H.length&&(H=f.view.getState(H[0]),null!=H&&(H=H.absolutePoints,null!=H&&0<H.length&&(H=H[H.length-1],null!=H)))){if(H.y==B.y&&Math.abs(H.x-B.getCenterX())<B.width/2)return mxConstants.DIRECTION_SOUTH;if(H.y==B.y+B.height&&Math.abs(H.x-B.getCenterX())<B.width/2)return mxConstants.DIRECTION_NORTH;if(H.x>B.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function J(B,H){H=null!=H?H:!0;f.model.beginUpdate();try{var T=f.model.getParent(B),k=f.getIncomingTreeEdges(B),v=f.cloneCells([k[0],B]);f.model.setTerminal(v[0],f.model.getTerminal(k[0],-!0),!0);var G=D(B),I=T.geometry;G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH?v[1].geometry.x+=H?B.geometry.width+10:-v[1].geometry.width-10:v[1].geometry.y+=H?B.geometry.height+10:-v[1].geometry.height-10;f.view.currentRoot!=T&&(v[1].geometry.x-=I.x,v[1].geometry.y-=I.y);var M=f.view.getState(B),N=f.view.scale;if(null!=M){var S=mxRectangle.fromRectangle(M);G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH?S.x+=(H?B.geometry.width+10:-v[1].geometry.width-10)*N:S.y+=(H?-B.geometry.height+10:-v[1].geometry.height-10)*N;var V=f.getOutgoingTreeEdges(f.model.getTerminal(k[0],!0));if(null!=V){for(var W=G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH,X=I=k=0;X<V.length;X++){var Z=f.model.getTerminal(V[X],!1);if(G==D(Z)){var Y=f.view.getState(Z);Z!=B&&null!=Y&&(W&&H!=Y.getCenterX()<M.getCenterX()||!W&&H!=Y.getCenterY()<M.getCenterY())&&mxUtils.intersects(S,Y)&&(k=10+Math.max(k,(Math.min(S.x+S.width,Y.x+Y.width)-Math.max(S.x,Y.x))/N),I=10+Math.max(I,(Math.min(S.y+-S.height,Y.y+Y.height)-Math.max(S.y,Y.y))/N))}}W?I=0:k=0;for(X=0;X<V.length;X++)if(Z=f.model.getTerminal(V[X],!1),G==D(Z)&&(Y=f.view.getState(Z),Z!=B&&null!=Y&&(W&&H!=Y.getCenterX()<M.getCenterX()||!W&&H!=Y.getCenterY()<M.getCenterY()))){var ba=[];f.traverse(Y.cell,!0,function(ea,ca){var fa=null!=ca&&f.isTreeEdge(ca);fa&&ba.push(ca);(null==ca||fa)&&ba.push(ea);return null==ca||fa});f.moveCells(ba,(H?1:-1)*k,(H?1:-1)*I)}}}return f.addCells(v,T)}finally{f.model.endUpdate()}}function K(B){f.model.beginUpdate();-try{var H=D(B),T=f.getIncomingTreeEdges(B),k=f.cloneCells([T[0],B]);f.model.setTerminal(T[0],k[1],!1);f.model.setTerminal(k[0],k[1],!0);f.model.setTerminal(k[0],B,!1);var v=f.model.getParent(B),G=v.geometry,I=[];f.view.currentRoot!=v&&(k[1].geometry.x-=G.x,k[1].geometry.y-=G.y);f.traverse(B,!0,function(S,V){var W=null!=V&&f.isTreeEdge(V);W&&I.push(V);(null==V||W)&&I.push(S);return null==V||W});var M=B.geometry.width+40,N=B.geometry.height+40;H==mxConstants.DIRECTION_SOUTH?M=0:H==mxConstants.DIRECTION_NORTH?-(M=0,N=-N):H==mxConstants.DIRECTION_WEST?(M=-M,N=0):H==mxConstants.DIRECTION_EAST&&(N=0);f.moveCells(I,M,N);return f.addCells(k,v)}finally{f.model.endUpdate()}}function L(B,H){f.model.beginUpdate();try{var T=f.model.getParent(B),k=f.getIncomingTreeEdges(B),v=D(B);0==k.length&&(k=[f.createEdge(T,null,"",null,null,f.createCurrentEdgeStyle())],v=H);var G=f.cloneCells([k[0],B]);f.model.setTerminal(G[0],B,!0);null==f.model.getTerminal(G[0],!1)&&(f.model.setTerminal(G[0],G[1],!1),f.applyNewEdgeStyle(G[1],-[G[0]],v));k=f.getOutgoingTreeEdges(B);var I=T.geometry;H=[];f.view.currentRoot==T&&(I=new mxRectangle);for(var M=0;M<k.length;M++){var N=f.model.getTerminal(k[M],!1);null!=N&&H.push(N)}var S=f.view.getBounds(H),V=f.view.translate,W=f.view.scale;v==mxConstants.DIRECTION_SOUTH?(G[1].geometry.x=null==S?B.geometry.x+(B.geometry.width-G[1].geometry.width)/2:(S.x+S.width)/W-V.x-I.x+10,G[1].geometry.y+=G[1].geometry.height-I.y+40):v==mxConstants.DIRECTION_NORTH?(G[1].geometry.x=null==S?B.geometry.x+(B.geometry.width--G[1].geometry.width)/2:(S.x+S.width)/W-V.x+-I.x+10,G[1].geometry.y-=G[1].geometry.height+I.y+40):(G[1].geometry.x=v==mxConstants.DIRECTION_WEST?G[1].geometry.x-(G[1].geometry.width+I.x+40):G[1].geometry.x+(G[1].geometry.width-I.x+40),G[1].geometry.y=null==S?B.geometry.y+(B.geometry.height-G[1].geometry.height)/2:(S.y+S.height)/W-V.y+-I.y+10);return f.addCells(G,T)}finally{f.model.endUpdate()}}function Q(B,H,T){B=f.getOutgoingTreeEdges(B);T=f.view.getState(T);var k=[];if(null!=T&&null!=B){for(var v=+!0),!0);var G=D(B),I=T.geometry;G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH?v[1].geometry.x+=H?B.geometry.width+10:-v[1].geometry.width-10:v[1].geometry.y+=H?B.geometry.height+10:-v[1].geometry.height-10;f.view.currentRoot!=T&&(v[1].geometry.x-=I.x,v[1].geometry.y-=I.y);var M=f.view.getState(B),R=f.view.scale;if(null!=M){var Q=mxRectangle.fromRectangle(M);G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH?Q.x+=(H?B.geometry.width+10:-v[1].geometry.width-10)*R:Q.y+=(H?+B.geometry.height+10:-v[1].geometry.height-10)*R;var W=f.getOutgoingTreeEdges(f.model.getTerminal(k[0],!0));if(null!=W){for(var V=G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH,X=I=k=0;X<W.length;X++){var Z=f.model.getTerminal(W[X],!1);if(G==D(Z)){var Y=f.view.getState(Z);Z!=B&&null!=Y&&(V&&H!=Y.getCenterX()<M.getCenterX()||!V&&H!=Y.getCenterY()<M.getCenterY())&&mxUtils.intersects(Q,Y)&&(k=10+Math.max(k,(Math.min(Q.x+Q.width,Y.x+Y.width)-Math.max(Q.x,Y.x))/R),I=10+Math.max(I,(Math.min(Q.y++Q.height,Y.y+Y.height)-Math.max(Q.y,Y.y))/R))}}V?I=0:k=0;for(X=0;X<W.length;X++)if(Z=f.model.getTerminal(W[X],!1),G==D(Z)&&(Y=f.view.getState(Z),Z!=B&&null!=Y&&(V&&H!=Y.getCenterX()<M.getCenterX()||!V&&H!=Y.getCenterY()<M.getCenterY()))){var ba=[];f.traverse(Y.cell,!0,function(ea,ca){var fa=null!=ca&&f.isTreeEdge(ca);fa&&ba.push(ca);(null==ca||fa)&&ba.push(ea);return null==ca||fa});f.moveCells(ba,(H?1:-1)*k,(H?1:-1)*I)}}}return f.addCells(v,T)}finally{f.model.endUpdate()}}function K(B){f.model.beginUpdate();+try{var H=D(B),T=f.getIncomingTreeEdges(B),k=f.cloneCells([T[0],B]);f.model.setTerminal(T[0],k[1],!1);f.model.setTerminal(k[0],k[1],!0);f.model.setTerminal(k[0],B,!1);var v=f.model.getParent(B),G=v.geometry,I=[];f.view.currentRoot!=v&&(k[1].geometry.x-=G.x,k[1].geometry.y-=G.y);f.traverse(B,!0,function(Q,W){var V=null!=W&&f.isTreeEdge(W);V&&I.push(W);(null==W||V)&&I.push(Q);return null==W||V});var M=B.geometry.width+40,R=B.geometry.height+40;H==mxConstants.DIRECTION_SOUTH?M=0:H==mxConstants.DIRECTION_NORTH?+(M=0,R=-R):H==mxConstants.DIRECTION_WEST?(M=-M,R=0):H==mxConstants.DIRECTION_EAST&&(R=0);f.moveCells(I,M,R);return f.addCells(k,v)}finally{f.model.endUpdate()}}function L(B,H){f.model.beginUpdate();try{var T=f.model.getParent(B),k=f.getIncomingTreeEdges(B),v=D(B);0==k.length&&(k=[f.createEdge(T,null,"",null,null,f.createCurrentEdgeStyle())],v=H);var G=f.cloneCells([k[0],B]);f.model.setTerminal(G[0],B,!0);null==f.model.getTerminal(G[0],!1)&&(f.model.setTerminal(G[0],G[1],!1),f.applyNewEdgeStyle(G[1],+[G[0]],v));k=f.getOutgoingTreeEdges(B);var I=T.geometry;H=[];f.view.currentRoot==T&&(I=new mxRectangle);for(var M=0;M<k.length;M++){var R=f.model.getTerminal(k[M],!1);null!=R&&H.push(R)}var Q=f.view.getBounds(H),W=f.view.translate,V=f.view.scale;v==mxConstants.DIRECTION_SOUTH?(G[1].geometry.x=null==Q?B.geometry.x+(B.geometry.width-G[1].geometry.width)/2:(Q.x+Q.width)/V-W.x-I.x+10,G[1].geometry.y+=G[1].geometry.height-I.y+40):v==mxConstants.DIRECTION_NORTH?(G[1].geometry.x=null==Q?B.geometry.x+(B.geometry.width-+G[1].geometry.width)/2:(Q.x+Q.width)/V-W.x+-I.x+10,G[1].geometry.y-=G[1].geometry.height+I.y+40):(G[1].geometry.x=v==mxConstants.DIRECTION_WEST?G[1].geometry.x-(G[1].geometry.width+I.x+40):G[1].geometry.x+(G[1].geometry.width-I.x+40),G[1].geometry.y=null==Q?B.geometry.y+(B.geometry.height-G[1].geometry.height)/2:(Q.y+Q.height)/V-W.y+-I.y+10);return f.addCells(G,T)}finally{f.model.endUpdate()}}function P(B,H,T){B=f.getOutgoingTreeEdges(B);T=f.view.getState(T);var k=[];if(null!=T&&null!=B){for(var v=0;v<B.length;v++){var G=f.view.getState(f.model.getTerminal(B[v],!1));null!=G&&(!H&&Math.min(G.x+G.width,T.x+T.width)>=Math.max(G.x,T.x)||H&&Math.min(G.y+G.height,T.y+T.height)>=Math.max(G.y,T.y))&&k.push(G)}k.sort(function(I,M){return H?I.x+I.width-M.x-M.width:I.y+I.height-M.y-M.height})}return k}function c(B,H){var T=D(B),k=H==mxConstants.DIRECTION_EAST||H==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==k&&T!=H?e.actions.get("selectParent").funct():T==-H?(H=f.getOutgoingTreeEdges(B),null!=H&&0<H.length&&f.setSelectionCell(f.model.getTerminal(H[0],!1))):(T=f.getIncomingTreeEdges(B),null!=T&&0<T.length&&(k=Q(f.model.getTerminal(T[0],!0),k,B),B=f.view.getState(B),null!=B&&(B=mxUtils.indexOf(k,B),0<=B&&(B+=H==mxConstants.DIRECTION_NORTH||H==mxConstants.DIRECTION_WEST?-1:1,0<=B&&B<=k.length-1&&f.setSelectionCell(k[B].cell)))))}var e=this,f=e.editor.graph,p=f.getModel(),n=e.menus.createPopupMenu;e.menus.createPopupMenu=function(B,H,T){n.apply(this,arguments);+H?(H=f.getOutgoingTreeEdges(B),null!=H&&0<H.length&&f.setSelectionCell(f.model.getTerminal(H[0],!1))):(T=f.getIncomingTreeEdges(B),null!=T&&0<T.length&&(k=P(f.model.getTerminal(T[0],!0),k,B),B=f.view.getState(B),null!=B&&(B=mxUtils.indexOf(k,B),0<=B&&(B+=H==mxConstants.DIRECTION_NORTH||H==mxConstants.DIRECTION_WEST?-1:1,0<=B&&B<=k.length-1&&f.setSelectionCell(k[B].cell)))))}var e=this,f=e.editor.graph,p=f.getModel(),n=e.menus.createPopupMenu;e.menus.createPopupMenu=function(B,H,T){n.apply(this,arguments);if(1==f.getSelectionCount()){H=f.getSelectionCell();var k=f.getOutgoingTreeEdges(H);B.addSeparator();0<k.length&&(d(f.getSelectionCell())&&this.addMenuItems(B,["selectChildren"],null,T),this.addMenuItems(B,["selectDescendants"],null,T));d(f.getSelectionCell())?(B.addSeparator(),0<f.getIncomingTreeEdges(H).length&&this.addMenuItems(B,["selectSiblings","selectParent"],null,T)):0<f.model.getEdgeCount(H)&&this.addMenuItems(B,["selectConnections"],null,T)}};e.actions.addAction("selectChildren",function(B){if(f.isEnabled()&&1==f.getSelectionCount()){var H=f.getSelectionCell();B=mxEvent.isControlDown(B)?null:f.getOutgoingTreeEdges(H);if(null!=B&&0<B.length){H=[];for(var T=0;T<B.length;T++)H.push(f.model.getTerminal(B[T],!1));f.setSelectionCells(H)}else f.setSelectionCells(f.model.getChildren(H))}},null,null,"Alt+Shift+C");e.actions.addAction("selectDescendants",function(B){var H=f.getSelectionCell();if(f.isEnabled()&&null!=H){var T=[];mxEvent.isControlDown(B)||f.traverse(H,!0,function(k,v){var G=null!=v&&f.isTreeEdge(v);G&&mxEvent.isControlDown(B)&&T.push(v);(null==v||G)&&T.push(k);return null==v||G});if(0==T.length||1==T.length&&T[0]==H)T=f.model.getDescendants(H);f.setSelectionCells(T)}},null,null,"Alt+Shift+X");e.actions.addAction("selectParent",function(B){var H=f.getSelectionCell();f.isEnabled()&&null!=H&&(B=mxEvent.isControlDown(B)?null:f.getIncomingTreeEdges(H),null!=B&&0<B.length?f.setSelectionCell(f.model.getTerminal(B[0],!0)):f.selectParentCell())},null,null,"Alt+Shift+P");e.actions.addAction("selectSiblings",function(B){if(f.isEnabled()&&1==f.getSelectionCount()){var H=f.getSelectionCell(),T=mxEvent.isControlDown(B)?null:f.getIncomingTreeEdges(H);B=[];if(null!=T&&0<T.length&&(T=f.getOutgoingTreeEdges(f.model.getTerminal(T[0],!0)),null!=T))for(var k=0;k<T.length;k++)B.push(f.model.getTerminal(T[k],!1));0==B.length&&(B=f.model.getChildren(f.model.getParent(H)));f.setSelectionCells(B)}},null,null,"Alt+Shift+S");var t=f.removeCells;f.removeCells=function(B,H){H=null!=H?H:!0;null==B&&(B=this.getDeletableCells(this.getSelectionCells()));-H&&(B=this.getDeletableCells(this.addAllEdges(B)));for(var T=[],k=0;k<B.length;k++){var v=B[k];p.isEdge(v)&&y(v)&&(T.push(v),v=p.getTerminal(v,!1));if(d(v)){var G=[];f.traverse(v,!0,function(I,M){var N=null!=M&&f.isTreeEdge(M);N&&G.push(M);(null==M||N)&&G.push(I);return null==M||N});0<G.length&&(T=T.concat(G),v=f.getIncomingTreeEdges(B[k]),B=B.concat(v))}else null!=v&&T.push(B[k])}B=T;return t.apply(this,arguments)};e.hoverIcons.getStateAt=function(B,H,T){return d(B.cell)?null:this.graph.view.getState(this.graph.getCellAt(H,-T))};var z=f.duplicateCells;f.duplicateCells=function(B,H){B=null!=B?B:this.getSelectionCells();for(var T=B.slice(0),k=0;k<T.length;k++){var v=f.view.getState(T[k]);if(null!=v&&d(v.cell)){var G=f.getIncomingTreeEdges(v.cell);for(v=0;v<G.length;v++)mxUtils.remove(G[v],B)}}this.model.beginUpdate();try{var I=z.call(this,B,H);if(I.length==B.length)for(k=0;k<B.length;k++)if(d(B[k])){var M=f.getIncomingTreeEdges(I[k]);G=f.getIncomingTreeEdges(B[k]);if(0==M.length&&0<G.length){var N=this.cloneCell(G[0]);-this.addEdge(N,f.getDefaultParent(),this.model.getTerminal(G[0],!0),I[k])}}}finally{this.model.endUpdate()}return I};var E=f.moveCells;f.moveCells=function(B,H,T,k,v,G,I){for(var M=null,N=[],S=0;S<B.length;S++)(q(B[S])||d(B[S]))&&!x(B[S])&&this.isCellCollapsed(B[S])?N=N.concat(this.getSubtree(B[S])):N.push(B[S]);B=mxUtils.removeDuplicates(N);this.model.beginUpdate();try{N=v;var V=this.getCurrentCellStyle(v);if(null!=B&&d(v)&&"1"==mxUtils.getValue(V,"treeFolding","0")){for(S=0;S<B.length;S++)if(d(B[S])||-f.model.isEdge(B[S])&&null==f.model.getTerminal(B[S],!0)){v=f.model.getParent(B[S]);break}if(null!=N&&v!=N&&null!=this.view.getState(B[0])){var W=f.getIncomingTreeEdges(B[0]);if(0<W.length){var X=f.view.getState(f.model.getTerminal(W[0],!0));if(null!=X){var Z=f.view.getState(N);null!=Z&&(H=(Z.getCenterX()-X.getCenterX())/f.view.scale,T=(Z.getCenterY()-X.getCenterY())/f.view.scale)}}}}M=E.apply(this,arguments);if(null!=M&&null!=B&&M.length==B.length)for(S=0;S<M.length;S++)if(this.model.isEdge(M[S]))d(N)&&-0>mxUtils.indexOf(M,this.model.getTerminal(M[S],!0))&&this.model.setTerminal(M[S],N,!0);else if(d(B[S])&&(W=f.getIncomingTreeEdges(B[S]),0<W.length))if(!k)d(N)&&0>mxUtils.indexOf(B,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],N,!0);else if(0==f.getIncomingTreeEdges(M[S]).length){V=N;if(null==V||V==f.model.getParent(B[S]))V=f.model.getTerminal(W[0],!0);k=this.cloneCell(W[0]);this.addEdge(k,f.getDefaultParent(),V,M[S])}}finally{this.model.endUpdate()}return M};if(null!=e.sidebar){var C=+H&&(B=this.getDeletableCells(this.addAllEdges(B)));for(var T=[],k=0;k<B.length;k++){var v=B[k];p.isEdge(v)&&y(v)&&(T.push(v),v=p.getTerminal(v,!1));if(d(v)){var G=[];f.traverse(v,!0,function(I,M){var R=null!=M&&f.isTreeEdge(M);R&&G.push(M);(null==M||R)&&G.push(I);return null==M||R});0<G.length&&(T=T.concat(G),v=f.getIncomingTreeEdges(B[k]),B=B.concat(v))}else null!=v&&T.push(B[k])}B=T;return t.apply(this,arguments)};e.hoverIcons.getStateAt=function(B,H,T){return d(B.cell)?null:this.graph.view.getState(this.graph.getCellAt(H,+T))};var z=f.duplicateCells;f.duplicateCells=function(B,H){B=null!=B?B:this.getSelectionCells();for(var T=B.slice(0),k=0;k<T.length;k++){var v=f.view.getState(T[k]);if(null!=v&&d(v.cell)){var G=f.getIncomingTreeEdges(v.cell);for(v=0;v<G.length;v++)mxUtils.remove(G[v],B)}}this.model.beginUpdate();try{var I=z.call(this,B,H);if(I.length==B.length)for(k=0;k<B.length;k++)if(d(B[k])){var M=f.getIncomingTreeEdges(I[k]);G=f.getIncomingTreeEdges(B[k]);if(0==M.length&&0<G.length){var R=this.cloneCell(G[0]);+this.addEdge(R,f.getDefaultParent(),this.model.getTerminal(G[0],!0),I[k])}}}finally{this.model.endUpdate()}return I};var E=f.moveCells;f.moveCells=function(B,H,T,k,v,G,I){for(var M=null,R=[],Q=0;Q<B.length;Q++)(q(B[Q])||d(B[Q]))&&!x(B[Q])&&this.isCellCollapsed(B[Q])?R=R.concat(this.getSubtree(B[Q])):R.push(B[Q]);B=mxUtils.removeDuplicates(R);this.model.beginUpdate();try{R=v;var W=this.getCurrentCellStyle(v);if(null!=B&&d(v)&&"1"==mxUtils.getValue(W,"treeFolding","0")){for(Q=0;Q<B.length;Q++)if(d(B[Q])||+f.model.isEdge(B[Q])&&null==f.model.getTerminal(B[Q],!0)){v=f.model.getParent(B[Q]);break}if(null!=R&&v!=R&&null!=this.view.getState(B[0])){var V=f.getIncomingTreeEdges(B[0]);if(0<V.length){var X=f.view.getState(f.model.getTerminal(V[0],!0));if(null!=X){var Z=f.view.getState(R);null!=Z&&(H=(Z.getCenterX()-X.getCenterX())/f.view.scale,T=(Z.getCenterY()-X.getCenterY())/f.view.scale)}}}}M=E.apply(this,arguments);if(null!=M&&null!=B&&M.length==B.length)for(Q=0;Q<M.length;Q++)if(this.model.isEdge(M[Q]))d(R)&&+0>mxUtils.indexOf(M,this.model.getTerminal(M[Q],!0))&&this.model.setTerminal(M[Q],R,!0);else if(d(B[Q])&&(V=f.getIncomingTreeEdges(B[Q]),0<V.length))if(!k)d(R)&&0>mxUtils.indexOf(B,this.model.getTerminal(V[0],!0))&&this.model.setTerminal(V[0],R,!0);else if(0==f.getIncomingTreeEdges(M[Q]).length){W=R;if(null==W||W==f.model.getParent(B[Q]))W=f.model.getTerminal(V[0],!0);k=this.cloneCell(V[0]);this.addEdge(k,f.getDefaultParent(),W,M[Q])}}finally{this.model.endUpdate()}return M};if(null!=e.sidebar){var C=e.sidebar.dropAndConnect;e.sidebar.dropAndConnect=function(B,H,T,k){var v=f.model,G=null;v.beginUpdate();try{if(G=C.apply(this,arguments),d(B))for(var I=0;I<G.length;I++)if(v.isEdge(G[I])&&null==v.getTerminal(G[I],!0)){v.setTerminal(G[I],B,!0);var M=f.getCellGeometry(G[I]);M.points=null;null!=M.getTerminalPoint(!0)&&M.setTerminalPoint(null,!0)}}finally{v.endUpdate()}return G}}var F={67:e.actions.get("selectChildren"),88:e.actions.get("selectDescendants"),80:e.actions.get("selectParent"),83:e.actions.get("selectSiblings")},-R={67:e.actions.get("copyStyle"),86:e.actions.get("pasteStyle")},U=e.onKeyDown;e.onKeyDown=function(B){try{var H=f.getSelectionCell();if(f.isEnabled()&&!f.isEditing()&&null!=H){var T=mxEvent.isAltDown(B)&&mxEvent.isShiftDown(B)?F[B.keyCode]:mxEvent.isAltDown(B)?R[B.keyCode]:null;null!=T?(T.funct(B),mxEvent.consume(B)):d(H)&&(T=null,0<f.getIncomingTreeEdges(H).length&&(9==B.which?T=mxEvent.isShiftDown(B)?K(H):L(H):13==B.which&&(T=J(H,!mxEvent.isShiftDown(B)))),null!=T&&0<T.length?(1==T.length&&f.model.isEdge(T[0])?+S={67:e.actions.get("copyStyle"),86:e.actions.get("pasteStyle")},U=e.onKeyDown;e.onKeyDown=function(B){try{var H=f.getSelectionCell();if(f.isEnabled()&&!f.isEditing()&&null!=H){var T=mxEvent.isAltDown(B)&&mxEvent.isShiftDown(B)?F[B.keyCode]:mxEvent.isAltDown(B)?S[B.keyCode]:null;null!=T?(T.funct(B),mxEvent.consume(B)):d(H)&&(T=null,0<f.getIncomingTreeEdges(H).length&&(9==B.which?T=mxEvent.isShiftDown(B)?K(H):L(H):13==B.which&&(T=J(H,!mxEvent.isShiftDown(B)))),null!=T&&0<T.length?(1==T.length&&f.model.isEdge(T[0])?f.setSelectionCell(f.model.getTerminal(T[0],!1)):f.setSelectionCell(T[T.length-1]),null!=e.hoverIcons&&e.hoverIcons.update(f.view.getState(H)),f.startEditingAtCell(H),mxEvent.consume(B)):37==B.keyCode?(c(H,mxConstants.DIRECTION_WEST),mxEvent.consume(B)):38==B.keyCode?(c(H,mxConstants.DIRECTION_NORTH),mxEvent.consume(B)):39==B.keyCode?(c(H,mxConstants.DIRECTION_EAST),mxEvent.consume(B)):40==B.keyCode&&(c(H,mxConstants.DIRECTION_SOUTH),mxEvent.consume(B)))}}catch(k){e.handleError(k)}mxEvent.isConsumed(B)||-U.apply(this,arguments)};var P=f.connectVertex;f.connectVertex=function(B,H,T,k,v,G,I){var M=f.getIncomingTreeEdges(B);if(d(B)){var N=D(B),S=N==mxConstants.DIRECTION_EAST||N==mxConstants.DIRECTION_WEST,V=H==mxConstants.DIRECTION_EAST||H==mxConstants.DIRECTION_WEST;return N==H||0==M.length?L(B,H):S==V?K(B):J(B,H!=mxConstants.DIRECTION_NORTH&&H!=mxConstants.DIRECTION_WEST)}return P.apply(this,arguments)};f.getSubtree=function(B){var H=[B];!q(B)&&!d(B)||x(B)||f.traverse(B,!0,function(T,k){var v=null!=-k&&f.isTreeEdge(k);v&&0>mxUtils.indexOf(H,k)&&H.push(k);(null==k||v)&&0>mxUtils.indexOf(H,T)&&H.push(T);return null==k||v});return H};var O=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){O.apply(this,arguments);(q(this.state.cell)||d(this.state.cell))&&!x(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",+U.apply(this,arguments)};var O=f.connectVertex;f.connectVertex=function(B,H,T,k,v,G,I){var M=f.getIncomingTreeEdges(B);if(d(B)){var R=D(B),Q=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST,W=H==mxConstants.DIRECTION_EAST||H==mxConstants.DIRECTION_WEST;return R==H||0==M.length?L(B,H):Q==W?K(B):J(B,H!=mxConstants.DIRECTION_NORTH&&H!=mxConstants.DIRECTION_WEST)}return O.apply(this,arguments)};f.getSubtree=function(B){var H=[B];!q(B)&&!d(B)||x(B)||f.traverse(B,!0,function(T,k){var v=null!=+k&&f.isTreeEdge(k);v&&0>mxUtils.indexOf(H,k)&&H.push(k);(null==k||v)&&0>mxUtils.indexOf(H,T)&&H.push(T);return null==k||v});return H};var N=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){N.apply(this,arguments);(q(this.state.cell)||d(this.state.cell))&&!x(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(B){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(B),mxEvent.getClientY(B),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(B);this.graph.isMouseDown=!0;e.hoverIcons.reset();mxEvent.consume(B)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var m=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){m.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 u=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(B){u.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=B?"":"none")};var A=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(B,H){A.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=@@ -14251,16 +14251,16 @@ D.vertex=!0;var J=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=return y.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var x=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");x.vertex=!0;var D=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');D.vertex=!0;var J=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');J.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");K.geometry.relative=!0;K.edge=!0;D.insertEdge(K,!0);J.insertEdge(K,!1);var L=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-L.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),K.style);Q.geometry.relative=!0;Q.edge=!0;D.insertEdge(Q,!0);L.insertEdge(Q,!1);var c=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),K.style);P.geometry.relative=!0;P.edge=!0;D.insertEdge(P,!0);L.insertEdge(P,!1);var c=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),K.style);e.geometry.relative=!0;e.edge=!0;D.insertEdge(e,!0);c.insertEdge(e,!1);var f=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-f.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),K.style);p.geometry.relative=!0;p.edge=!0;D.insertEdge(p,!0);f.insertEdge(p,!1);x.insert(K);x.insert(Q);x.insert(e);x.insert(p);x.insert(D);x.insert(J);x.insert(L);x.insert(c);x.insert(f);return y.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var x=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');+f.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),K.style);p.geometry.relative=!0;p.edge=!0;D.insertEdge(p,!0);f.insertEdge(p,!1);x.insert(K);x.insert(P);x.insert(e);x.insert(p);x.insert(D);x.insert(J);x.insert(L);x.insert(c);x.insert(f);return y.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var x=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');x.vertex=!0;return y.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var x=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');x.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");D.geometry.setTerminalPoint(new mxPoint(-40,40),!0);D.geometry.relative=!0;D.edge=!0;x.insertEdge(D,!1);return y.createVertexTemplateFromCells([x,D],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var x=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');x.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");D.geometry.setTerminalPoint(new mxPoint(-40,40),!0);D.geometry.relative=!0;D.edge=!0;x.insertEdge(D,!1);return y.createVertexTemplateFromCells([x,D],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree orgchart organization division",function(){var x=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.vertex=!0;var D=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');q.setAttributeForCell(D,"treeRoot","1");D.vertex=!0;var J=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');J.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");-K.geometry.relative=!0;K.edge=!0;D.insertEdge(K,!0);J.insertEdge(K,!1);var L=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');L.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");Q.geometry.relative=-!0;Q.edge=!0;D.insertEdge(Q,!0);L.insertEdge(Q,!1);x.insert(K);x.insert(Q);x.insert(D);x.insert(J);x.insert(L);return y.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree root",function(){var x=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');q.setAttributeForCell(x,"treeRoot","1");x.vertex=!0;return y.createVertexTemplateFromCells([x],+K.geometry.relative=!0;K.edge=!0;D.insertEdge(K,!0);J.insertEdge(K,!1);var L=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");P.geometry.relative=+!0;P.edge=!0;D.insertEdge(P,!0);L.insertEdge(P,!1);x.insert(K);x.insert(P);x.insert(D);x.insert(J);x.insert(L);return y.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree root",function(){var x=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');q.setAttributeForCell(x,"treeRoot","1");x.vertex=!0;return y.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree division",function(){var x=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");D.geometry.setTerminalPoint(new mxPoint(0,0),!0);D.geometry.relative=!0;D.edge=!0;x.insertEdge(D,!1);return y.createVertexTemplateFromCells([x,D],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree sub sections",function(){var x=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");x.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");D.geometry.setTerminalPoint(new mxPoint(110,-40),!0);D.geometry.relative=!0;D.edge=!0;x.insertEdge(D,!1);var J=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");J.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),D.style);K.geometry.setTerminalPoint(new mxPoint(110,-40),!0);K.geometry.relative=!0;K.edge=!0;J.insertEdge(K,!1);return y.createVertexTemplateFromCells([D,K,x,J],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;@@ -14281,62 +14281,62 @@ var K=Menus.prototype.init;Menus.prototype.init=function(){K.apply(this,argument620,420,!0,!1);p.init()}));var e="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),f=function(p,n,t,z){p.addItem(t,null,mxUtils.bind(this,function(){var E=new CreateGraphDialog(c,t,z);c.showDialog(E.container,620,420,!0,!1);E.init()}),n)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(p,n){for(var t=0;t<e.length;t++)"-"==e[t]?p.addSeparator(n):f(p,n,mxResources.get(e[t])+"...",e[t])})))};EditorUi.prototype.installFormatToolbar=function(c){var e=this.editor.graph,f=document.createElement("div");f.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";e.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(p,n){0<e.getSelectionCount()?(c.appendChild(f),f.innerHTML="Selected: "+e.getSelectionCount()):null!=f.parentNode&&f.parentNode.removeChild(f)}))};var L=!1;EditorUi.prototype.initFormatWindow=function(){if(!L&&null!=this.formatWindow){L=!0;var c=this.formatWindow.window.toggleMinimized,e=240;this.formatWindow.window.toggleMinimized=function(){c.apply(this,arguments);this.minimized?(e=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+e-140+"px"):(this.div.style.width=e+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-e+140)+"px");this.fit()};-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(f){mxEvent.getSource(f)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var Q=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(W,X,Z){var Y=z.menus.get(W),ba=R.addMenu(mxResources.get(W),mxUtils.bind(this,function(){ba.classList.contains("mxDisabled")||Y.funct.apply(this,arguments)}),F);ba.className="geMenuItem";ba.style.display="inline-block";ba.style.boxSizing=-"border-box";ba.style.top="6px";ba.style.marginRight="6px";ba.style.height="30px";ba.style.paddingTop="6px";ba.style.paddingBottom="6px";ba.style.cursor="pointer";ba.setAttribute("title",mxResources.get(W));z.menus.menuCreated(Y,ba,"geMenuItem");null!=Z?(ba.style.backgroundImage="url("+Z+")",ba.style.backgroundPosition="center center",ba.style.backgroundRepeat="no-repeat",ba.style.backgroundSize="24px 24px",ba.style.width="34px",ba.innerText=""):X||(ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+-")",ba.style.backgroundPosition="right 6px center",ba.style.backgroundRepeat="no-repeat",ba.style.paddingRight="22px");return ba}function e(W,X,Z,Y,ba,ea){var ca=document.createElement("a");ca.className="geMenuItem";ca.style.display="inline-block";ca.style.boxSizing="border-box";ca.style.height="30px";ca.style.padding="6px";ca.style.position="relative";ca.style.verticalAlign="top";ca.style.top="0px";null!=z.statusContainer?C.insertBefore(ca,z.statusContainer):C.appendChild(ca);null!=ea?(ca.style.backgroundImage=-"url("+ea+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="24px 24px",ca.style.width="34px"):mxUtils.write(ca,W);mxEvent.addListener(ca,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fa){fa.preventDefault()}));mxEvent.addListener(ca,"click",function(fa){"disabled"!=ca.getAttribute("disabled")&&X(fa);mxEvent.consume(fa)});null==Z&&(ca.style.marginRight="4px");null!=Y&&ca.setAttribute("title",Y);null!=ba&&(W=function(){ba.isEnabled()?-(ca.removeAttribute("disabled"),ca.style.cursor="pointer"):(ca.setAttribute("disabled","disabled"),ca.style.cursor="default")},ba.addListener("stateChanged",W),E.addListener("enabledChanged",W),W());return ca}function f(W,X,Z){Z=document.createElement("div");Z.className="geMenuItem";Z.style.display="inline-block";Z.style.verticalAlign="top";Z.style.marginRight="6px";Z.style.padding="0 4px 0 4px";Z.style.height="30px";Z.style.position="relative";Z.style.top="0px";for(var Y=0;Y<W.length;Y++)null!=W[Y]&&-(W[Y].style.margin="0px",W[Y].style.boxShadow="none",Z.appendChild(W[Y]));null!=X&&mxUtils.setOpacity(Z,X);null!=z.statusContainer?C.insertBefore(Z,z.statusContainer):C.appendChild(Z);return Z}function p(){for(var W=C.firstChild;null!=W;){var X=W.nextSibling;"geMenuItem"!=W.className&&"geItem"!=W.className||W.parentNode.removeChild(W);W=X}F=C.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;W=1E3>d;var Z=null;W||(Z=c("diagram"));X=W?c("diagram",null,-Editor.menuImage):null;null!=X&&(Z=X);f([Z,e(mxResources.get("shapes"),z.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),z.actions.get("image"),W?Editor.shapesImage:null),e(mxResources.get("format"),z.actions.get("format").funct,null,mxResources.get("format")+" ("+z.actions.get("format").shortcut+")",z.actions.get("image"),W?Editor.formatImage:null)],W?60:null);X=c("insert",!0,W?O:null);f([X,e(mxResources.get("delete"),z.actions.get("delete").funct,null,mxResources.get("delete"),-z.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);E.isEnabled()||X.classList.add("mxDisabled");411<=d&&(f([I,M],60),520<=d&&f([N,640<=d?e("",H.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",H,Editor.zoomInImage):null,640<=d?e("",T.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",T,Editor.zoomOutImage):null],60))}Q.apply(this,arguments);var n=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=n&&(n.classList.add("geSimple"),+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(f){mxEvent.getSource(f)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var P=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(V,X,Z){var Y=z.menus.get(V),ba=S.addMenu(mxResources.get(V),mxUtils.bind(this,function(){ba.classList.contains("mxDisabled")||Y.funct.apply(this,arguments)}),F);ba.className="geMenuItem";ba.style.display="inline-block";ba.style.boxSizing=+"border-box";ba.style.top="6px";ba.style.marginRight="6px";ba.style.height="30px";ba.style.paddingTop="6px";ba.style.paddingBottom="6px";ba.style.cursor="pointer";ba.setAttribute("title",mxResources.get(V));z.menus.menuCreated(Y,ba,"geMenuItem");null!=Z?(ba.style.backgroundImage="url("+Z+")",ba.style.backgroundPosition="center center",ba.style.backgroundRepeat="no-repeat",ba.style.backgroundSize="24px 24px",ba.style.width="34px",ba.innerText=""):X||(ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage++")",ba.style.backgroundPosition="right 6px center",ba.style.backgroundRepeat="no-repeat",ba.style.paddingRight="22px");return ba}function e(V,X,Z,Y,ba,ea){var ca=document.createElement("a");ca.className="geMenuItem";ca.style.display="inline-block";ca.style.boxSizing="border-box";ca.style.height="30px";ca.style.padding="6px";ca.style.position="relative";ca.style.verticalAlign="top";ca.style.top="0px";null!=z.statusContainer?C.insertBefore(ca,z.statusContainer):C.appendChild(ca);null!=ea?(ca.style.backgroundImage=+"url("+ea+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="24px 24px",ca.style.width="34px"):mxUtils.write(ca,V);mxEvent.addListener(ca,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fa){fa.preventDefault()}));mxEvent.addListener(ca,"click",function(fa){"disabled"!=ca.getAttribute("disabled")&&X(fa);mxEvent.consume(fa)});null==Z&&(ca.style.marginRight="4px");null!=Y&&ca.setAttribute("title",Y);null!=ba&&(V=function(){ba.isEnabled()?+(ca.removeAttribute("disabled"),ca.style.cursor="pointer"):(ca.setAttribute("disabled","disabled"),ca.style.cursor="default")},ba.addListener("stateChanged",V),E.addListener("enabledChanged",V),V());return ca}function f(V,X,Z){Z=document.createElement("div");Z.className="geMenuItem";Z.style.display="inline-block";Z.style.verticalAlign="top";Z.style.marginRight="6px";Z.style.padding="0 4px 0 4px";Z.style.height="30px";Z.style.position="relative";Z.style.top="0px";for(var Y=0;Y<V.length;Y++)null!=V[Y]&&+(V[Y].style.margin="0px",V[Y].style.boxShadow="none",Z.appendChild(V[Y]));null!=X&&mxUtils.setOpacity(Z,X);null!=z.statusContainer?C.insertBefore(Z,z.statusContainer):C.appendChild(Z);return Z}function p(){for(var V=C.firstChild;null!=V;){var X=V.nextSibling;"geMenuItem"!=V.className&&"geItem"!=V.className||V.parentNode.removeChild(V);V=X}F=C.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;V=1E3>d;var Z=null;V||(Z=c("diagram"));X=V?c("diagram",null,+Editor.menuImage):null;null!=X&&(Z=X);f([Z,e(mxResources.get("shapes"),z.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),z.actions.get("image"),V?Editor.shapesImage:null),e(mxResources.get("format"),z.actions.get("format").funct,null,mxResources.get("format")+" ("+z.actions.get("format").shortcut+")",z.actions.get("image"),V?Editor.formatImage:null)],V?60:null);X=c("insert",!0,V?N:null);f([X,e(mxResources.get("delete"),z.actions.get("delete").funct,null,mxResources.get("delete"),+z.actions.get("delete"),V?Editor.trashImage:null)],V?60:null);E.isEnabled()||X.classList.add("mxDisabled");411<=d&&(f([I,M],60),520<=d&&f([R,640<=d?e("",H.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",H,Editor.zoomInImage):null,640<=d?e("",T.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",T,Editor.zoomOutImage):null],60))}P.apply(this,arguments);var n=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=n&&(n.classList.add("geSimple"),n.classList.add("geMinimal"));n=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);var t=document.createElement("div");t.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";t.style.bottom=n?"32px":"0px";this.sidebar=this.createSidebar(t);if(1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])l(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),-this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=d&&(b(this,!0),this.formatWindow.window.setVisible(!0));var z=this,E=z.editor.graph;z.toolbar=this.createToolbar(z.createDiv("geToolbar"));z.defaultLibraryName=mxResources.get("untitledLibrary");var C=document.createElement("div");C.className="geMenubarContainer";var F=null,R=new Menubar(z,C);z.statusContainer=z.createStatusContainer();z.statusContainer.style.position="relative";z.statusContainer.style.maxWidth="";z.statusContainer.style.cursor=-"default";var U=z.hideCurrentMenu;z.hideCurrentMenu=function(){U.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var P=z.descriptorChanged;z.descriptorChanged=function(){P.apply(this,arguments);var W=z.getCurrentFile();if(null!=W&&null!=W.getTitle()){var X=W.getMode();"google"==X?X="googleDrive":"github"==X?X="gitHub":"gitlab"==X?X="gitLab":"onedrive"==X&&(X="oneDrive");X=mxResources.get(X);C.setAttribute("title",W.getTitle()+(null!=X?" ("+X+")":""))}else C.removeAttribute("title")};+this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=d&&(b(this,!0),this.formatWindow.window.setVisible(!0));var z=this,E=z.editor.graph;z.toolbar=this.createToolbar(z.createDiv("geToolbar"));z.defaultLibraryName=mxResources.get("untitledLibrary");var C=document.createElement("div");C.className="geMenubarContainer";var F=null,S=new Menubar(z,C);z.statusContainer=z.createStatusContainer();z.statusContainer.style.position="relative";z.statusContainer.style.maxWidth="";z.statusContainer.style.cursor=+"default";var U=z.hideCurrentMenu;z.hideCurrentMenu=function(){U.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var O=z.descriptorChanged;z.descriptorChanged=function(){O.apply(this,arguments);var V=z.getCurrentFile();if(null!=V&&null!=V.getTitle()){var X=V.getMode();"google"==X?X="googleDrive":"github"==X?X="gitHub":"gitlab"==X?X="gitLab":"onedrive"==X&&(X="oneDrive");X=mxResources.get(X);C.setAttribute("title",V.getTitle()+(null!=X?" ("+X+")":""))}else C.removeAttribute("title")};z.setStatusText(z.editor.getStatus());C.appendChild(z.statusContainer);z.buttonContainer=document.createElement("div");z.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";C.appendChild(z.buttonContainer);z.menubarContainer=z.buttonContainer;z.tabContainer=document.createElement("div");z.tabContainer.className="geTabContainer geTabItem";z.tabContainer.style.cssText=-"position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";n=z.diagramContainer.parentNode;t=document.createElement("div");t.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";z.diagramContainer.style.top="47px";var O=Editor.addBoxImage;if(null!=z.hoverIcons){var m=z.hoverIcons.update;z.hoverIcons.update=function(){E.freehand.isDrawing()||m.apply(this,arguments)}}if(null!=E.freehand){var u=E.freehand.createStyle;E.freehand.createStyle=-function(W){return u.apply(this,arguments)+"sketch=0;"}}z.editor.addListener("statusChanged",mxUtils.bind(this,function(){z.setStatusText(z.editor.getStatus())}));z.setStatusText(z.editor.getStatus());var A=z.menus.get("viewZoom");if(null!=A){var B=function(W){if(mxEvent.isAltDown(W))z.hideCurrentMenu(),z.actions.get("customZoom").funct(),mxEvent.consume(W);else if("geMenuItem"==mxEvent.getSource(W).className||mxEvent.isShiftDown(W))z.hideCurrentMenu(),z.actions.get("smartFit").funct(),mxEvent.consume(W)},-H=z.actions.get("zoomIn"),T=z.actions.get("zoomOut"),k=z.actions.get("resetView"),v=z.actions.get("undo"),G=z.actions.get("redo"),I=e("",v.funct,null,mxResources.get("undo")+" ("+v.shortcut+")",v,Editor.undoImage),M=e("",G.funct,null,mxResources.get("redo")+" ("+G.shortcut+")",G,Editor.redoImage),N=e("",B,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",k,Editor.zoomFitImage);C.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";-this.tabContainer.style.right="70px";var S=R.addMenu("100%",A.funct);S.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");S.className="geTabItem";S.style.height=z.tabContainerHeight+"px";S.style.position="absolute";S.style.display="0"!=urlParams.pages?"flex":"none";S.style.alignItems="center";S.style.justifyContent="center";S.style.paddingRight="11px";S.style.whiteSpace="nowrap";S.style.overflow="hidden";S.style.fontSize="11px";S.style.width="51px";S.style.right="0px";S.style.bottom=-"0px";S.style.boxSizing="content-box";S.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";S.style.backgroundPosition="right 6px top 15px";S.style.backgroundRepeat="no-repeat";S.style.backgroundSize="10px";S.style.zIndex="1";t.appendChild(S);(function(W){mxEvent.addListener(W,"click",B);var X=mxUtils.bind(this,function(Z,Y,ba){W.innerText="";mxUtils.write(W,Math.round(100*z.editor.graph.view.scale*(null!=ba?ba:1))+"%")});z.editor.graph.view.addListener(mxEvent.EVENT_SCALE,X);z.editor.addListener("resetGraphView",-X);z.editor.addListener("pageSelected",X);z.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(Z,Y){X(Z,Y,Y.getProperty("factor"))}))})(S);var V=z.setGraphEnabled;z.setGraphEnabled=function(){V.apply(this,arguments);null!=this.tabContainer&&(S.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}t.appendChild(C);t.appendChild(z.diagramContainer);+"position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";n=z.diagramContainer.parentNode;t=document.createElement("div");t.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";z.diagramContainer.style.top="47px";var N=Editor.addBoxImage;if(null!=z.hoverIcons){var m=z.hoverIcons.update;z.hoverIcons.update=function(){E.freehand.isDrawing()||m.apply(this,arguments)}}if(null!=E.freehand){var u=E.freehand.createStyle;E.freehand.createStyle=+function(V){return u.apply(this,arguments)+"sketch=0;"}}z.editor.addListener("statusChanged",mxUtils.bind(this,function(){z.setStatusText(z.editor.getStatus())}));z.setStatusText(z.editor.getStatus());var A=z.menus.get("viewZoom");if(null!=A){var B=function(V){if(mxEvent.isAltDown(V))z.hideCurrentMenu(),z.actions.get("customZoom").funct(),mxEvent.consume(V);else if("geMenuItem"==mxEvent.getSource(V).className||mxEvent.isShiftDown(V))z.hideCurrentMenu(),z.actions.get("smartFit").funct(),mxEvent.consume(V)},+H=z.actions.get("zoomIn"),T=z.actions.get("zoomOut"),k=z.actions.get("resetView"),v=z.actions.get("undo"),G=z.actions.get("redo"),I=e("",v.funct,null,mxResources.get("undo")+" ("+v.shortcut+")",v,Editor.undoImage),M=e("",G.funct,null,mxResources.get("redo")+" ("+G.shortcut+")",G,Editor.redoImage),R=e("",B,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",k,Editor.zoomFitImage);C.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";+this.tabContainer.style.right="70px";var Q=S.addMenu("100%",A.funct);Q.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");Q.className="geTabItem";Q.style.height=z.tabContainerHeight+"px";Q.style.position="absolute";Q.style.display="0"!=urlParams.pages?"flex":"none";Q.style.alignItems="center";Q.style.justifyContent="center";Q.style.paddingRight="11px";Q.style.whiteSpace="nowrap";Q.style.overflow="hidden";Q.style.fontSize="11px";Q.style.width="51px";Q.style.right="0px";Q.style.bottom=+"0px";Q.style.boxSizing="content-box";Q.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";Q.style.backgroundPosition="right 6px top 15px";Q.style.backgroundRepeat="no-repeat";Q.style.backgroundSize="10px";Q.style.zIndex="1";t.appendChild(Q);(function(V){mxEvent.addListener(V,"click",B);var X=mxUtils.bind(this,function(Z,Y,ba){V.innerText="";mxUtils.write(V,Math.round(100*z.editor.graph.view.scale*(null!=ba?ba:1))+"%")});z.editor.graph.view.addListener(mxEvent.EVENT_SCALE,X);z.editor.addListener("resetGraphView",+X);z.editor.addListener("pageSelected",X);z.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(Z,Y){X(Z,Y,Y.getProperty("factor"))}))})(Q);var W=z.setGraphEnabled;z.setGraphEnabled=function(){W.apply(this,arguments);null!=this.tabContainer&&(Q.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}t.appendChild(C);t.appendChild(z.diagramContainer);n.appendChild(t);z.updateTabContainer();!EditorUi.windowed&&1E3<=d&&b(this,!0);t.appendChild(z.tabContainer);p();z.addListener("lockedChanged",p);mxEvent.addListener(window,"resize",function(){p();null!=z.sidebarWindow&&z.sidebarWindow.window.fit();null!=z.formatWindow&&z.formatWindow.window.fit();null!=z.actions.outlineWindow&&z.actions.outlineWindow.window.fit();null!=z.actions.layersWindow&&z.actions.layersWindow.window.fit();null!=z.menus.chatWindow&&z.menus.chatWindow.window.fit();null!=z.menus.tagsWindow&&-z.menus.tagsWindow.window.fit();null!=z.menus.findWindow&&z.menus.findWindow.window.fit();null!=z.menus.findReplaceWindow&&z.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var g=EditorUi.initTheme;EditorUi.initTheme=function(){g.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,q,y,x){var D=q.y,J=q.x,K=!1,L=!1;if(null!=this.states&&null!=d&&null!=q){var Q=this,c=new mxCellState,e=this.graph.getView().scale,f=Math.max(2,this.getGuideTolerance()/2);c.x=d.x+J;c.y=d.y+D;c.width=d.width;c.height=d.height;for(var p=[],n=[],t=0;t<this.states.length;t++){var z=this.states[t];z instanceof mxCellState&&(x||!this.graph.isCellSelected(z.cell))&&((c.x>=z.x&&c.x<=z.x+z.width||z.x>=c.x&&z.x<=c.x+c.width)&&(c.y>-z.y+z.height+4||c.y+c.height+4<z.y)?p.push(z):(c.y>=z.y&&c.y<=z.y+z.height||z.y>=c.y&&z.y<=c.y+c.height)&&(c.x>z.x+z.width+4||c.x+c.width+4<z.x)&&n.push(z))}var E=0,C=0,F=z=0,R=0,U=0,P=0,O=0,m=5*e;if(1<p.length){p.push(c);p.sort(function(H,T){return H.y-T.y});var u=!1;t=c==p[0];e=c==p[p.length-1];if(!t&&!e)for(t=1;t<p.length-1;t++)if(c==p[t]){e=p[t-1];t=p[t+1];z=C=F=(t.y-e.y-e.height-c.height)/2;break}for(t=0;t<p.length-1;t++){e=p[t];var A=p[t+1],B=c==e||c==A;A=A.y-e.y-e.height;u|=c==e;if(0==C&&0==-E)C=A,E=1;else if(Math.abs(C-A)<=(B||1==t&&u?f:0))E+=1;else if(1<E&&u){p=p.slice(0,t+1);break}else if(3<=p.length-t&&!u)E=0,z=C=0!=F?F:0,p.splice(0,0==t?1:t),t=-1;else break;0!=z||B||(C=z=A)}3==p.length&&p[1]==c&&(z=0)}if(1<n.length){n.push(c);n.sort(function(H,T){return H.x-T.x});u=!1;t=c==n[0];e=c==n[n.length-1];if(!t&&!e)for(t=1;t<n.length-1;t++)if(c==n[t]){e=n[t-1];t=n[t+1];P=U=O=(t.x-e.x-e.width-c.width)/2;break}for(t=0;t<n.length-1;t++){e=n[t];A=n[t+1];B=c==e||c==A;A=A.x-e.x-e.width;u|=c==e;-if(0==U&&0==R)U=A,R=1;else if(Math.abs(U-A)<=(B||1==t&&u?f:0))R+=1;else if(1<R&&u){n=n.slice(0,t+1);break}else if(3<=n.length-t&&!u)R=0,P=U=0!=O?O:0,n.splice(0,0==t?1:t),t=-1;else break;0!=P||B||(U=P=A)}3==n.length&&n[1]==c&&(P=0)}f=function(H,T,k,v){var G=[];if(v){v=m;var I=0}else v=0,I=m;G.push(new mxPoint(H.x-v,H.y-I));G.push(new mxPoint(H.x+v,H.y+I));G.push(H);G.push(T);G.push(new mxPoint(T.x-v,T.y-I));G.push(new mxPoint(T.x+v,T.y+I));if(null!=k)return k.points=G,k;H=new mxPolyline(G,mxConstants.GUIDE_COLOR,-mxConstants.GUIDE_STROKEWIDTH);H.dialect=mxConstants.DIALECT_SVG;H.pointerEvents=!1;H.init(Q.graph.getView().getOverlayPane());return H};U=function(H,T){if(H&&null!=Q.guidesArrHor)for(H=0;H<Q.guidesArrHor.length;H++)Q.guidesArrHor[H].node.style.visibility="hidden";if(T&&null!=Q.guidesArrVer)for(H=0;H<Q.guidesArrVer.length;H++)Q.guidesArrVer[H].node.style.visibility="hidden"};if(1<R&&R==n.length-1){R=[];O=Q.guidesArrHor;K=[];J=0;t=n[0]==c?1:0;u=n[t].y+n[t].height;if(0<P)for(t=0;t<n.length-1;t++)e=-n[t],A=n[t+1],c==e?(J=A.x-e.width-P,K.push(new mxPoint(J+e.width+m,u)),K.push(new mxPoint(A.x-m,u))):c==A?(K.push(new mxPoint(e.x+e.width+m,u)),J=e.x+e.width+P,K.push(new mxPoint(J-m,u))):(K.push(new mxPoint(e.x+e.width+m,u)),K.push(new mxPoint(A.x-m,u)));else e=n[0],t=n[2],J=e.x+e.width+(t.x-e.x-e.width-c.width)/2,K.push(new mxPoint(e.x+e.width+m,u)),K.push(new mxPoint(J-m,u)),K.push(new mxPoint(J+c.width+m,u)),K.push(new mxPoint(t.x-m,u));for(t=0;t<K.length;t+=2)n=K[t],P=K[t+1],n=f(n,P,null!=O?-O[t/2]:null),n.node.style.visibility="visible",n.redraw(),R.push(n);for(t=K.length/2;null!=O&&t<O.length;t++)O[t].destroy();Q.guidesArrHor=R;J-=d.x;K=!0}else U(!0);if(1<E&&E==p.length-1){R=[];O=Q.guidesArrVer;L=[];D=0;t=p[0]==c?1:0;E=p[t].x+p[t].width;if(0<z)for(t=0;t<p.length-1;t++)e=p[t],A=p[t+1],c==e?(D=A.y-e.height-z,L.push(new mxPoint(E,D+e.height+m)),L.push(new mxPoint(E,A.y-m))):c==A?(L.push(new mxPoint(E,e.y+e.height+m)),D=e.y+e.height+z,L.push(new mxPoint(E,D-m))):(L.push(new mxPoint(E,e.y+-e.height+m)),L.push(new mxPoint(E,A.y-m)));else e=p[0],t=p[2],D=e.y+e.height+(t.y-e.y-e.height-c.height)/2,L.push(new mxPoint(E,e.y+e.height+m)),L.push(new mxPoint(E,D-m)),L.push(new mxPoint(E,D+c.height+m)),L.push(new mxPoint(E,t.y-m));for(t=0;t<L.length;t+=2)n=L[t],P=L[t+1],n=f(n,P,null!=O?O[t/2]:null,!0),n.node.style.visibility="visible",n.redraw(),R.push(n);for(t=L.length/2;null!=O&&t<O.length;t++)O[t].destroy();Q.guidesArrVer=R;D-=d.y;L=!0}else U(!1,!0)}if(K||L)return c=new mxPoint(J,D),p=b.call(this,+z.menus.tagsWindow.window.fit();null!=z.menus.findWindow&&z.menus.findWindow.window.fit();null!=z.menus.findReplaceWindow&&z.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var g=EditorUi.initTheme;EditorUi.initTheme=function(){g.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,q,y,x){var D=q.y,J=q.x,K=!1,L=!1;if(null!=this.states&&null!=d&&null!=q){var P=this,c=new mxCellState,e=this.graph.getView().scale,f=Math.max(2,this.getGuideTolerance()/2);c.x=d.x+J;c.y=d.y+D;c.width=d.width;c.height=d.height;for(var p=[],n=[],t=0;t<this.states.length;t++){var z=this.states[t];z instanceof mxCellState&&(x||!this.graph.isCellSelected(z.cell))&&((c.x>=z.x&&c.x<=z.x+z.width||z.x>=c.x&&z.x<=c.x+c.width)&&(c.y>+z.y+z.height+4||c.y+c.height+4<z.y)?p.push(z):(c.y>=z.y&&c.y<=z.y+z.height||z.y>=c.y&&z.y<=c.y+c.height)&&(c.x>z.x+z.width+4||c.x+c.width+4<z.x)&&n.push(z))}var E=0,C=0,F=z=0,S=0,U=0,O=0,N=0,m=5*e;if(1<p.length){p.push(c);p.sort(function(H,T){return H.y-T.y});var u=!1;t=c==p[0];e=c==p[p.length-1];if(!t&&!e)for(t=1;t<p.length-1;t++)if(c==p[t]){e=p[t-1];t=p[t+1];z=C=F=(t.y-e.y-e.height-c.height)/2;break}for(t=0;t<p.length-1;t++){e=p[t];var A=p[t+1],B=c==e||c==A;A=A.y-e.y-e.height;u|=c==e;if(0==C&&0==+E)C=A,E=1;else if(Math.abs(C-A)<=(B||1==t&&u?f:0))E+=1;else if(1<E&&u){p=p.slice(0,t+1);break}else if(3<=p.length-t&&!u)E=0,z=C=0!=F?F:0,p.splice(0,0==t?1:t),t=-1;else break;0!=z||B||(C=z=A)}3==p.length&&p[1]==c&&(z=0)}if(1<n.length){n.push(c);n.sort(function(H,T){return H.x-T.x});u=!1;t=c==n[0];e=c==n[n.length-1];if(!t&&!e)for(t=1;t<n.length-1;t++)if(c==n[t]){e=n[t-1];t=n[t+1];O=U=N=(t.x-e.x-e.width-c.width)/2;break}for(t=0;t<n.length-1;t++){e=n[t];A=n[t+1];B=c==e||c==A;A=A.x-e.x-e.width;u|=c==e;+if(0==U&&0==S)U=A,S=1;else if(Math.abs(U-A)<=(B||1==t&&u?f:0))S+=1;else if(1<S&&u){n=n.slice(0,t+1);break}else if(3<=n.length-t&&!u)S=0,O=U=0!=N?N:0,n.splice(0,0==t?1:t),t=-1;else break;0!=O||B||(U=O=A)}3==n.length&&n[1]==c&&(O=0)}f=function(H,T,k,v){var G=[];if(v){v=m;var I=0}else v=0,I=m;G.push(new mxPoint(H.x-v,H.y-I));G.push(new mxPoint(H.x+v,H.y+I));G.push(H);G.push(T);G.push(new mxPoint(T.x-v,T.y-I));G.push(new mxPoint(T.x+v,T.y+I));if(null!=k)return k.points=G,k;H=new mxPolyline(G,mxConstants.GUIDE_COLOR,+mxConstants.GUIDE_STROKEWIDTH);H.dialect=mxConstants.DIALECT_SVG;H.pointerEvents=!1;H.init(P.graph.getView().getOverlayPane());return H};U=function(H,T){if(H&&null!=P.guidesArrHor)for(H=0;H<P.guidesArrHor.length;H++)P.guidesArrHor[H].node.style.visibility="hidden";if(T&&null!=P.guidesArrVer)for(H=0;H<P.guidesArrVer.length;H++)P.guidesArrVer[H].node.style.visibility="hidden"};if(1<S&&S==n.length-1){S=[];N=P.guidesArrHor;K=[];J=0;t=n[0]==c?1:0;u=n[t].y+n[t].height;if(0<O)for(t=0;t<n.length-1;t++)e=+n[t],A=n[t+1],c==e?(J=A.x-e.width-O,K.push(new mxPoint(J+e.width+m,u)),K.push(new mxPoint(A.x-m,u))):c==A?(K.push(new mxPoint(e.x+e.width+m,u)),J=e.x+e.width+O,K.push(new mxPoint(J-m,u))):(K.push(new mxPoint(e.x+e.width+m,u)),K.push(new mxPoint(A.x-m,u)));else e=n[0],t=n[2],J=e.x+e.width+(t.x-e.x-e.width-c.width)/2,K.push(new mxPoint(e.x+e.width+m,u)),K.push(new mxPoint(J-m,u)),K.push(new mxPoint(J+c.width+m,u)),K.push(new mxPoint(t.x-m,u));for(t=0;t<K.length;t+=2)n=K[t],O=K[t+1],n=f(n,O,null!=N?+N[t/2]:null),n.node.style.visibility="visible",n.redraw(),S.push(n);for(t=K.length/2;null!=N&&t<N.length;t++)N[t].destroy();P.guidesArrHor=S;J-=d.x;K=!0}else U(!0);if(1<E&&E==p.length-1){S=[];N=P.guidesArrVer;L=[];D=0;t=p[0]==c?1:0;E=p[t].x+p[t].width;if(0<z)for(t=0;t<p.length-1;t++)e=p[t],A=p[t+1],c==e?(D=A.y-e.height-z,L.push(new mxPoint(E,D+e.height+m)),L.push(new mxPoint(E,A.y-m))):c==A?(L.push(new mxPoint(E,e.y+e.height+m)),D=e.y+e.height+z,L.push(new mxPoint(E,D-m))):(L.push(new mxPoint(E,e.y++e.height+m)),L.push(new mxPoint(E,A.y-m)));else e=p[0],t=p[2],D=e.y+e.height+(t.y-e.y-e.height-c.height)/2,L.push(new mxPoint(E,e.y+e.height+m)),L.push(new mxPoint(E,D-m)),L.push(new mxPoint(E,D+c.height+m)),L.push(new mxPoint(E,t.y-m));for(t=0;t<L.length;t+=2)n=L[t],O=L[t+1],n=f(n,O,null!=N?N[t/2]:null,!0),n.node.style.visibility="visible",n.redraw(),S.push(n);for(t=L.length/2;null!=N&&t<N.length;t++)N[t].destroy();P.guidesArrVer=S;D-=d.y;L=!0}else U(!1,!0)}if(K||L)return c=new mxPoint(J,D),p=b.call(this,d,c,y,x),K&&!L?c.y=p.y:L&&!K&&(c.x=p.x),p.y!=c.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),p.x!=c.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),c;U(!0,!0);return b.apply(this,arguments)};var g=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){g.call(this,d);var q=this.guidesArrVer,y=this.guidesArrHor;if(null!=q)for(var x=0;x<q.length;x++)q[x].node.style.visibility=d?"visible":"hidden";if(null!=-y)for(x=0;x<y.length;x++)y[x].node.style.visibility=d?"visible":"hidden"};var l=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){l.call(this);var d=this.guidesArrVer,q=this.guidesArrHor;if(null!=d){for(var y=0;y<d.length;y++)d[y].destroy();this.guidesArrVer=null}if(null!=q){for(y=0;y<q.length;y++)q[y].destroy();this.guidesArrHor=null}}})();function mxRuler(b,g,l,d){function q(){var E=b.diagramContainer;Q.style.top=E.offsetTop-J+"px";Q.style.left=E.offsetLeft-J+"px";Q.style.width=(l?0:E.offsetWidth)+J+"px";Q.style.height=(l?E.offsetHeight:0)+J+"px"}function y(E,C,F){if(null!=x)return E;var R;return function(){var U=this,P=arguments,O=F&&!R;clearTimeout(R);R=setTimeout(function(){R=null;F||E.apply(U,P)},C);O&&E.apply(U,P)}}var x=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,-D=window.cancelAnimationFrame||window.mozCancelAnimationFrame,J=this.RULER_THICKNESS,K=this;this.unit=g;var L=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},Q=document.createElement("div");Q.className="geRuler";Q.style.position="fixed";this.updateStyle=mxUtils.bind(this,function(){L=-Editor.isDarkMode()?{outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};Q.style[l?"borderRight":"borderBottom"]="0.5px solid "+L.strokeClr;Q.style.borderLeft="0.5px solid "+L.strokeClr});this.updateStyle();b.diagramContainer.appendChild(Q);mxEvent.disableContextMenu(Q);this.editorUiRefresh=b.refresh;b.refresh=function(E){K.editorUiRefresh.apply(b,-arguments);q()};q();var c=document.createElement("canvas");c.width=Q.offsetWidth;c.height=Q.offsetHeight;Q.style.overflow="hidden";c.style.position="relative";Q.appendChild(c);var e=c.getContext("2d");this.ui=b;var f=b.editor.graph;this.graph=f;this.container=Q;this.canvas=c;var p=function(E,C,F,R,U){E=Math.round(E);C=Math.round(C);F=Math.round(F);R=Math.round(R);e.beginPath();e.moveTo(E+.5,C+.5);e.lineTo(F+.5,R+.5);e.stroke();U&&(l?(e.save(),e.translate(E,C),e.rotate(-Math.PI/2),e.fillText(U,0,0),-e.restore()):e.fillText(U,E,C))},n=function(){e.clearRect(0,0,c.width,c.height);e.beginPath();e.lineWidth=.7;e.strokeStyle=L.strokeClr;e.setLineDash([]);e.font="9px Arial";e.textAlign="center";var E=f.view.scale,C=f.view.getBackgroundPageBounds(),F=f.view.translate,R=f.pageVisible;F=R?J+(l?C.y-f.container.scrollTop:C.x-f.container.scrollLeft):J+(l?F.y*E-f.container.scrollTop:F.x*E-f.container.scrollLeft);var U=0;R&&(U=f.getPageLayout(),U=l?U.y*f.pageFormat.height:U.x*f.pageFormat.width);var P;switch(K.unit){case mxConstants.POINTS:var O=-P=10;var m=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:P=10;O=mxConstants.PIXELS_PER_MM;m=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:P=20;O=mxConstants.PIXELS_PER_MM;m=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:P=.5>=E||4<=E?8:16,O=mxConstants.PIXELS_PER_INCH/P,m=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var u=O;2<=E?u=O/(2*Math.floor(E/2)):.5>=E&&(u=O*Math.floor(1/E/2)*(K.unit==mxConstants.MILLIMETERS?2:1));O=null;C=R?Math.min(F+(l?C.height:C.width),l?-c.height:c.width):l?c.height:c.width;if(R)if(e.fillStyle=L.outBkgClr,l){var A=F-J;0<A&&e.fillRect(0,J,J,A);C<c.height&&e.fillRect(0,C,J,c.height)}else A=F-J,0<A&&e.fillRect(J,0,A,J),C<c.width&&e.fillRect(C,0,c.width,J);e.fillStyle=L.fontClr;for(R=R?F:F%(u*E);R<=C;R+=u*E)if(A=Math.round((R-F)/E/u),!(R<J||A==O)){O=A;var B=null;0==A%P&&(B=K.formatText(U+A*u)+"");l?p(J-m[Math.abs(A)%P],R,J,R,B):p(R,J-m[Math.abs(A)%P],R,J,B)}e.lineWidth=1;p(l?0:J,l?J:0,J,J);e.fillStyle=L.cornerClr;e.fillRect(0,0,J,J)},-t=-1,z=function(){null!=x?(null!=D&&D(t),t=x(n)):n()};this.drawRuler=z;this.sizeListener=g=y(function(){var E=f.container;l?(E=E.offsetHeight+J,c.height!=E&&(c.height=E,Q.style.height=E+"px",z())):(E=E.offsetWidth+J,c.width!=E&&(c.width=E,Q.style.width=E+"px",z()))},10);this.pageListener=function(){z()};this.scrollListener=d=y(function(){var E=l?f.container.scrollTop:f.container.scrollLeft;K.lastScroll!=E&&(K.lastScroll=E,z())},10);this.unitListener=function(E,C){K.setUnit(C.getProperty("unit"))};-f.addListener(mxEvent.SIZE,g);f.container.addEventListener("scroll",d);f.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(E){L=E;Q.style.background=L.bkgClr;n()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(E,C,F,R){if(l&&4<E.height||!l&&4<E.width){if(null!=K.guidePart)try{e.putImageData(K.guidePart.imgData1,-K.guidePart.x1,K.guidePart.y1),e.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),e.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3)}catch(v){}var U=K.origGuideMove.apply(this,arguments);try{e.lineWidth=.5;e.strokeStyle=L.guideClr;e.setLineDash([2]);if(l){var P=E.y+U.y+J-this.graph.container.scrollTop;var O=0;var m=P+E.height/2;var u=J/2;var A=P+E.height;var B=0;var H=e.getImageData(O,P-1,J,3);p(O,P,J,P);P--;var T=e.getImageData(u,m-1,J,3);p(u,m,J,m);m--;var k=e.getImageData(B,-A-1,J,3);p(B,A,J,A);A--}else P=0,O=E.x+U.x+J-this.graph.container.scrollLeft,m=J/2,u=O+E.width/2,A=0,B=O+E.width,H=e.getImageData(O-1,P,3,J),p(O,P,O,J),O--,T=e.getImageData(u-1,m,3,J),p(u,m,u,J),u--,k=e.getImageData(B-1,A,3,J),p(B,A,B,J),B--;if(null==K.guidePart||K.guidePart.x1!=O||K.guidePart.y1!=P)K.guidePart={imgData1:H,x1:O,y1:P,imgData2:T,x2:u,y2:m,imgData3:k,x3:B,y3:A}}catch(v){}}else U=K.origGuideMove.apply(this,arguments);return U};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=+y)for(x=0;x<y.length;x++)y[x].node.style.visibility=d?"visible":"hidden"};var l=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){l.call(this);var d=this.guidesArrVer,q=this.guidesArrHor;if(null!=d){for(var y=0;y<d.length;y++)d[y].destroy();this.guidesArrVer=null}if(null!=q){for(y=0;y<q.length;y++)q[y].destroy();this.guidesArrHor=null}}})();function mxRuler(b,g,l,d){function q(){var E=b.diagramContainer;P.style.top=E.offsetTop-J+"px";P.style.left=E.offsetLeft-J+"px";P.style.width=(l?0:E.offsetWidth)+J+"px";P.style.height=(l?E.offsetHeight:0)+J+"px"}function y(E,C,F){if(null!=x)return E;var S;return function(){var U=this,O=arguments,N=F&&!S;clearTimeout(S);S=setTimeout(function(){S=null;F||E.apply(U,O)},C);N&&E.apply(U,O)}}var x=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,+D=window.cancelAnimationFrame||window.mozCancelAnimationFrame,J=this.RULER_THICKNESS,K=this;this.unit=g;var L=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},P=document.createElement("div");P.className="geRuler";P.style.position="fixed";this.updateStyle=mxUtils.bind(this,function(){L=+Editor.isDarkMode()?{outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};P.style[l?"borderRight":"borderBottom"]="0.5px solid "+L.strokeClr;P.style.borderLeft="0.5px solid "+L.strokeClr});this.updateStyle();b.diagramContainer.appendChild(P);mxEvent.disableContextMenu(P);this.editorUiRefresh=b.refresh;b.refresh=function(E){K.editorUiRefresh.apply(b,+arguments);q()};q();var c=document.createElement("canvas");c.width=P.offsetWidth;c.height=P.offsetHeight;P.style.overflow="hidden";c.style.position="relative";P.appendChild(c);var e=c.getContext("2d");this.ui=b;var f=b.editor.graph;this.graph=f;this.container=P;this.canvas=c;var p=function(E,C,F,S,U){E=Math.round(E);C=Math.round(C);F=Math.round(F);S=Math.round(S);e.beginPath();e.moveTo(E+.5,C+.5);e.lineTo(F+.5,S+.5);e.stroke();U&&(l?(e.save(),e.translate(E,C),e.rotate(-Math.PI/2),e.fillText(U,0,0),+e.restore()):e.fillText(U,E,C))},n=function(){e.clearRect(0,0,c.width,c.height);e.beginPath();e.lineWidth=.7;e.strokeStyle=L.strokeClr;e.setLineDash([]);e.font="9px Arial";e.textAlign="center";var E=f.view.scale,C=f.view.getBackgroundPageBounds(),F=f.view.translate,S=f.pageVisible;F=S?J+(l?C.y-f.container.scrollTop:C.x-f.container.scrollLeft):J+(l?F.y*E-f.container.scrollTop:F.x*E-f.container.scrollLeft);var U=0;S&&(U=f.getPageLayout(),U=l?U.y*f.pageFormat.height:U.x*f.pageFormat.width);var O;switch(K.unit){case mxConstants.POINTS:var N=+O=10;var m=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:O=10;N=mxConstants.PIXELS_PER_MM;m=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:O=20;N=mxConstants.PIXELS_PER_MM;m=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:O=.5>=E||4<=E?8:16,N=mxConstants.PIXELS_PER_INCH/O,m=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var u=N;2<=E?u=N/(2*Math.floor(E/2)):.5>=E&&(u=N*Math.floor(1/E/2)*(K.unit==mxConstants.MILLIMETERS?2:1));N=null;C=S?Math.min(F+(l?C.height:C.width),l?+c.height:c.width):l?c.height:c.width;if(S)if(e.fillStyle=L.outBkgClr,l){var A=F-J;0<A&&e.fillRect(0,J,J,A);C<c.height&&e.fillRect(0,C,J,c.height)}else A=F-J,0<A&&e.fillRect(J,0,A,J),C<c.width&&e.fillRect(C,0,c.width,J);e.fillStyle=L.fontClr;for(S=S?F:F%(u*E);S<=C;S+=u*E)if(A=Math.round((S-F)/E/u),!(S<J||A==N)){N=A;var B=null;0==A%O&&(B=K.formatText(U+A*u)+"");l?p(J-m[Math.abs(A)%O],S,J,S,B):p(S,J-m[Math.abs(A)%O],S,J,B)}e.lineWidth=1;p(l?0:J,l?J:0,J,J);e.fillStyle=L.cornerClr;e.fillRect(0,0,J,J)},+t=-1,z=function(){null!=x?(null!=D&&D(t),t=x(n)):n()};this.drawRuler=z;this.sizeListener=g=y(function(){var E=f.container;l?(E=E.offsetHeight+J,c.height!=E&&(c.height=E,P.style.height=E+"px",z())):(E=E.offsetWidth+J,c.width!=E&&(c.width=E,P.style.width=E+"px",z()))},10);this.pageListener=function(){z()};this.scrollListener=d=y(function(){var E=l?f.container.scrollTop:f.container.scrollLeft;K.lastScroll!=E&&(K.lastScroll=E,z())},10);this.unitListener=function(E,C){K.setUnit(C.getProperty("unit"))};+f.addListener(mxEvent.SIZE,g);f.container.addEventListener("scroll",d);f.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(E){L=E;P.style.background=L.bkgClr;n()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(E,C,F,S){if(l&&4<E.height||!l&&4<E.width){if(null!=K.guidePart)try{e.putImageData(K.guidePart.imgData1,+K.guidePart.x1,K.guidePart.y1),e.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),e.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3)}catch(v){}var U=K.origGuideMove.apply(this,arguments);try{e.lineWidth=.5;e.strokeStyle=L.guideClr;e.setLineDash([2]);if(l){var O=E.y+U.y+J-this.graph.container.scrollTop;var N=0;var m=O+E.height/2;var u=J/2;var A=O+E.height;var B=0;var H=e.getImageData(N,O-1,J,3);p(N,O,J,O);O--;var T=e.getImageData(u,m-1,J,3);p(u,m,J,m);m--;var k=e.getImageData(B,+A-1,J,3);p(B,A,J,A);A--}else O=0,N=E.x+U.x+J-this.graph.container.scrollLeft,m=J/2,u=N+E.width/2,A=0,B=N+E.width,H=e.getImageData(N-1,O,3,J),p(N,O,N,J),N--,T=e.getImageData(u-1,m,3,J),p(u,m,u,J),u--,k=e.getImageData(B-1,A,3,J),p(B,A,B,J),B--;if(null==K.guidePart||K.guidePart.x1!=N||K.guidePart.y1!=O)K.guidePart={imgData1:H,x1:N,y1:O,imgData2:T,x2:u,y2:m,imgData3:k,x3:B,y3:A}}catch(v){}}else U=K.origGuideMove.apply(this,arguments);return U};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var E=K.origGuideDestroy.apply(this,arguments);if(null!=K.guidePart)try{e.putImageData(K.guidePart.imgData1,K.guidePart.x1,K.guidePart.y1),e.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),e.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3),K.guidePart=null}catch(C){}return E}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener(this.unitListener);this.ui.removeListener(this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};function mxDualRuler(b,g){var l=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return l};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,g,!0);this.hRuler=new mxRuler(b,g,!1,!0);g=mxUtils.bind(this,function(d){var q=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(y){q=null!=b.currentMenu;mxEvent.consume(y)}),null,mxUtils.bind(this,function(y){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(y)||mxEvent.isPopupTrigger(y))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(y)||!q){var x=new mxPopupMenu(mxUtils.bind(this,function(K,L){b.menus.addMenuItems(K,["points","inches","millimeters","meters"],L)}));x.div.className+=" geMenubarMenu";x.smartSeparators=!0;x.showDisabled=!0;x.autoExpand=!0;x.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(x,arguments);b.resetCurrentMenu();x.destroy()});var D=mxEvent.getClientX(y),J=mxEvent.getClientY(y);x.popup(D,J,null,y);b.setCurrentMenu(x,d)}mxEvent.consume(y)}}))});g(this.hRuler.container);g(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var g=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=g){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var l=mxFreehand.prototype.MILD_SMOOTHING,d=null,q=[],y,x=[],D,J=!1,K=!0,L=!0,Q=!0,c=!0,e=[],f=!1,p=!1,n=!1,t="default",z={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},E=!0;this.setClosedPath=function(m){J=m};this.setAutoClose=function(m){K=m};this.setAutoInsert=-function(m){L=m};this.setAutoScroll=function(m){Q=m};this.setOpenFill=function(m){c=m};this.setStopClickEnabled=function(m){p=m};this.setSelectInserted=function(m){n=m};this.setSmoothing=function(m){l=m};this.getSmoothing=function(){return l};this.setPerfectFreehandMode=function(m){E=m};this.isPerfectFreehandMode=function(){return E};this.setBrushSize=function(m){z.size=m};this.getBrushSize=function(){return z.size};var C=function(m){f=m;b.getRubberband().setEnabled(!m);b.graphHandler.setSelectEnabled(!m);-b.graphHandler.setMoveEnabled(!m);b.container.style.cursor=m?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){C(!0)};this.isDrawing=function(){return f};var F=mxUtils.bind(this,function(m){if(d){var u=D.length,A=p&&0<x.length&&null!=D&&2>D.length;A||x.push.apply(x,D);D=[];x.push(null);q.push(d);d=null;(A||L)&&this.stopDrawing();L&&(!A||2<=u)&&this.startDrawing();mxEvent.consume(m)}}),R=new mxCell;R.edge=!0;this.getStrokeColor=function(m){var u=null!=-t?t:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(R),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=u||m||(u=b.shapeForegroundColor);return u};this.setStrokeColor=function(m){t=m};this.createStyle=function(m){var u=";fillColor=none;";E&&(u=";lineShape=1;");u+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+m+u};this.stopDrawing=function(){if(0<q.length){if(E){for(var m=[],u=0;u<x.length;u++)null!=x[u]&&m.push([x[u].x,-x[u].y]);m=PerfectFreehand.getStroke(m,z);x=[];for(u=0;u<m.length;u++)x.push({x:m[u][0],y:m[u][1]});x.push(null)}m=x[0].x;var A=x[0].x,B=x[0].y,H=x[0].y;for(u=1;u<x.length;u++)null!=x[u]&&(m=Math.max(m,x[u].x),A=Math.min(A,x[u].x),B=Math.max(B,x[u].y),H=Math.min(H,x[u].y));m-=A;B-=H;if(0<m&&0<B){var T=100/m,k=100/B;x.map(function(N){if(null==N)return N;N.x=(N.x-A)*T;N.y=(N.y-H)*k;return N});var v='<shape strokewidth="inherit"><foreground>',G=0;for(u=0;u<x.length;u++){var I=x[u];if(null==I){I=!1;G=+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var g=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=g){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var l=mxFreehand.prototype.MILD_SMOOTHING,d=null,q=[],y,x=[],D,J=!1,K=!0,L=!0,P=!0,c=!0,e=[],f=!1,p=!1,n=!1,t="default",z={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},E=!0;this.setClosedPath=function(m){J=m};this.setAutoClose=function(m){K=m};this.setAutoInsert=+function(m){L=m};this.setAutoScroll=function(m){P=m};this.setOpenFill=function(m){c=m};this.setStopClickEnabled=function(m){p=m};this.setSelectInserted=function(m){n=m};this.setSmoothing=function(m){l=m};this.getSmoothing=function(){return l};this.setPerfectFreehandMode=function(m){E=m};this.isPerfectFreehandMode=function(){return E};this.setBrushSize=function(m){z.size=m};this.getBrushSize=function(){return z.size};var C=function(m){f=m;b.getRubberband().setEnabled(!m);b.graphHandler.setSelectEnabled(!m);+b.graphHandler.setMoveEnabled(!m);b.container.style.cursor=m?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){C(!0)};this.isDrawing=function(){return f};var F=mxUtils.bind(this,function(m){if(d){var u=D.length,A=p&&0<x.length&&null!=D&&2>D.length;A||x.push.apply(x,D);D=[];x.push(null);q.push(d);d=null;(A||L)&&this.stopDrawing();L&&(!A||2<=u)&&this.startDrawing();mxEvent.consume(m)}}),S=new mxCell;S.edge=!0;this.getStrokeColor=function(m){var u=null!=+t?t:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(S),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=u||m||(u=b.shapeForegroundColor);return u};this.setStrokeColor=function(m){t=m};this.createStyle=function(m){var u=";fillColor=none;";E&&(u=";lineShape=1;");u+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+m+u};this.stopDrawing=function(){if(0<q.length){if(E){for(var m=[],u=0;u<x.length;u++)null!=x[u]&&m.push([x[u].x,+x[u].y]);m=PerfectFreehand.getStroke(m,z);x=[];for(u=0;u<m.length;u++)x.push({x:m[u][0],y:m[u][1]});x.push(null)}m=x[0].x;var A=x[0].x,B=x[0].y,H=x[0].y;for(u=1;u<x.length;u++)null!=x[u]&&(m=Math.max(m,x[u].x),A=Math.min(A,x[u].x),B=Math.max(B,x[u].y),H=Math.min(H,x[u].y));m-=A;B-=H;if(0<m&&0<B){var T=100/m,k=100/B;x.map(function(R){if(null==R)return R;R.x=(R.x-A)*T;R.y=(R.y-H)*k;return R});var v='<shape strokewidth="inherit"><foreground>',G=0;for(u=0;u<x.length;u++){var I=x[u];if(null==I){I=!1;G=x[G];var M=x[u-1];!J&&K&&(I=G.x-M.x,M=G.y-M.y,I=Math.sqrt(I*I+M*M)<=b.tolerance);if(J||I)v+='<line x="'+G.x.toFixed(2)+'" y="'+G.y.toFixed(2)+'"/>';v+="</path>"+(c||J||I?"<fillstroke/>":"<stroke/>");G=u+1}else v=u==G?v+('<path><move x="'+I.x.toFixed(2)+'" y="'+I.y.toFixed(2)+'"/>'):v+('<line x="'+I.x.toFixed(2)+'" y="'+I.y.toFixed(2)+'"/>')}v+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){u=this.createStyle("stencil("+Graph.compress(v)+")");v=b.view.scale;G=b.view.translate;u=new mxCell("",new mxGeometry(A/v-G.x,H/v-G.y,m/v,B/v),u);u.vertex=1;b.model.beginUpdate();try{u=b.addCell(u),b.fireEvent(new mxEventObject("cellsInserted","cells",[u])),b.fireEvent(new mxEventObject("freehandInserted","cell",u))}finally{b.model.endUpdate()}n&&b.setSelectionCells([u])}}for(u=0;u<q.length;u++)q[u].parentNode.removeChild(q[u]);d=null;q=[];x=[]}C(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(m,u){m=u.getProperty("eventName");u=u.getProperty("event");m==mxEvent.MOUSE_MOVE&&f&&(null!=u.sourceState&&u.sourceState.setCursor("crosshair"),u.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(m,u){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(m=u.getEvent(),f&&!mxEvent.isPopupTrigger(m)&&!mxEvent.isMiddleMouseButton(m)&&!mxEvent.isMultiTouchEvent(m))){var A=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);A=Math.max(1,A*b.view.scale);var B=this.getStrokeColor();d=document.createElementNS("http://www.w3.org/2000/svg","path");-d.setAttribute("fill",E?B:"none");d.setAttribute("pointer-events","none");d.setAttribute("stroke",B);d.setAttribute("stroke-width",A);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(B=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",B=B.split(" ").map(function(H){return parseFloat(H)*A}).join(" "),d.setAttribute("stroke-dasharray",B));e=[];m=U(m);P(m);y="M"+m.x+" "+m.y;x.push(m);D=[];d.setAttribute("d",E?PerfectFreehand.getSvgPathFromStroke([[m.x,m.y]],z):y);g.appendChild(d);u.consume()}}),-mouseMove:mxUtils.bind(this,function(m,u){if(null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){m=u.getEvent();m=U(m);P(m);var A=O(0);if(A)if(x.push(A),E){var B=[];for(A=0;A<x.length;A++)B.push([x[A].x,x[A].y]);D=[];for(var H=2;H<e.length;H+=2)A=O(H),B.push([A.x,A.y]),D.push(A);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(B,z))}else{y+=" L"+A.x+" "+A.y;B="";D=[];for(H=2;H<e.length;H+=2)A=O(H),B+=" L"+A.x+" "+A.y,D.push(A);d.setAttribute("d",y+B)}Q&&(A=b.view.translate,b.scrollRectToVisible((new mxRectangle(m.x--A.x,m.y-A.y)).grow(20)));u.consume()}}),mouseUp:mxUtils.bind(this,function(m,u){null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(F(u.getEvent()),u.consume())})});var U=function(m){return mxUtils.convertPoint(b.container,mxEvent.getClientX(m),mxEvent.getClientY(m))},P=function(m){for(e.push(m);e.length>l;)e.shift()},O=function(m){var u=e.length;if(1===u%2||u>=l){var A=0,B=0,H,T=0;for(H=m;H<u;H++)T++,m=e[H],A+=m.x,B+=m.y;return{x:A/T,y:B/T}}return null}}}+d.setAttribute("fill",E?B:"none");d.setAttribute("pointer-events","none");d.setAttribute("stroke",B);d.setAttribute("stroke-width",A);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(B=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",B=B.split(" ").map(function(H){return parseFloat(H)*A}).join(" "),d.setAttribute("stroke-dasharray",B));e=[];m=U(m);O(m);y="M"+m.x+" "+m.y;x.push(m);D=[];d.setAttribute("d",E?PerfectFreehand.getSvgPathFromStroke([[m.x,m.y]],z):y);g.appendChild(d);u.consume()}}),+mouseMove:mxUtils.bind(this,function(m,u){if(null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){m=u.getEvent();m=U(m);O(m);var A=N(0);if(A)if(x.push(A),E){var B=[];for(A=0;A<x.length;A++)B.push([x[A].x,x[A].y]);D=[];for(var H=2;H<e.length;H+=2)A=N(H),B.push([A.x,A.y]),D.push(A);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(B,z))}else{y+=" L"+A.x+" "+A.y;B="";D=[];for(H=2;H<e.length;H+=2)A=N(H),B+=" L"+A.x+" "+A.y,D.push(A);d.setAttribute("d",y+B)}P&&(A=b.view.translate,b.scrollRectToVisible((new mxRectangle(m.x-+A.x,m.y-A.y)).grow(20)));u.consume()}}),mouseUp:mxUtils.bind(this,function(m,u){null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(F(u.getEvent()),u.consume())})});var U=function(m){return mxUtils.convertPoint(b.container,mxEvent.getClientX(m),mxEvent.getClientY(m))},O=function(m){for(e.push(m);e.length>l;)e.shift()},N=function(m){var u=e.length;if(1===u%2||u>=l){var A=0,B=0,H,T=0;for(H=m;H<u;H++)T++,m=e[H],A+=m.x,B+=m.y;return{x:A/T,y:B/T}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;DrawioUser=function(b,g,l,d,q){this.id=b;this.email=g;this.displayName=l;this.pictureUrl=d;this.locale=q};DrawioComment=function(b,g,l,d,q,y,x){this.file=b;this.id=g;this.content=l;this.modifiedDate=d;this.createdDate=q;this.isResolved=y;this.user=x;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,g,l,d,q){g()};DrawioComment.prototype.editComment=function(b,g,l){g()};DrawioComment.prototype.deleteComment=function(b,g){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];LucidImporter={};@@ -14351,17 +14351,17 @@ k:!0,f:!0,ac:!0};F.sort(function(ma,La){return ma.s-La.s});var ba=F.filter(funct"center"});W="";var ra=ba.slice();ra.sort(function(ma,La){return ma.e-La.e});var Aa=ka=0;wa=0;pa={};for(var na={},Ba=[],Oa=[],Ca=[],ua=!1,Ma=!1,Ja,Ka=0,l=0,Ha=w.length,cb=!0;wa<F.length||cb;){cb=!1;if(wa<F.length){var Ea=F[wa],Qa=F[wa].s;ua&&(na={},W+=r(w,Ka,Ha,!0),l=Ka=Ha,W+=O());for(;null!=Ea&&Ea.s==Qa;)na[Ea.n]=Ea,Ea=F[++wa];Ha=null!=Ea?Ea.s:w.length;W+=u(na,pa);ua&&(W+=e(pa));ua=!0}for(;ka>=Aa&&(ka<ba.length||Aa<ra.length);)if(Ea=ba[ka],Qa=ra[Aa],Ea&&Qa&&Ea.s<Qa.e){if(Ea.s>=Ha)break;Ka=Ea.s;0<Ka-l&&(W+=e(pa)+r(w,l,Ka),l=Ka);for(;null!=Ea&&Ea.s==Ka;)pa[Ea.n]=Ea,Ea=ba[++ka];W+=e(pa)}else if(Qa){if(Qa.e>Ha)break;l=Qa.e;do delete pa[Qa.n],Qa=ra[++Aa];while(null!=Qa&&Qa.e==l);W+=r(w,Ka,l);Ka=l;0!=Oa.length||null!=Ea&&Ea.s==l||(ba.splice(ka,0,{s:l,n:"dummy",v:""}),ra.splice(Aa,0,{e:Ea?Ea.s:Ha,n:"dummy",v:""}))}else break}W+=r(null,null,null,!0);ua&&(l!=Ha&&(W+=e({dummy:1})+r(w,l,Ha)),W+=O(!0));return W}function m(w,F){G=!1;var D=null!=w.Text&&w.Text.t?w.Text:null!=w.Value&&w.Value.t?w.Value:null!=w.Lane_0&&w.Lane_0.t?w.Lane_0:null;null==D&&null!=w.State?w.State.t&&(D=w.State):null==D&&null!=w.Note?w.Note.t&&(D=w.Note):null==D&&null!=w.Title?w.Title.t&&(D=w.Title):w.t&&(D=w);null==D&&null!=w.TextAreas?null!=w.TextAreas.Text&&null!=w.TextAreas.Text.Value&&w.TextAreas.Text.Value.t&&(D=w.TextAreas.Text.Value):null==D&&null!=w.t0&&w.t0.t&&(D=w.t0);if(null!=D){if(null!=D.t){var u=D.t;u=u.replace(/\u2028/g,"\n");D=D.m;try{/ /.test(u)&&(LucidImporter.hasUnknownShapes=!0);for(var e=0;e<D.length;e++)if(0<-D[e].s||null!=D[e].e&&D[e].e<u.length||"t"==D[e].n||"ac"==D[e].n||"lk"==D[e].n){G=!0;break}if(G=G||F)return B(u,D,w)}catch(O){console.log(O)}u=u.replace(/</g,"<");return u=u.replace(/>/g,">")}if(null!=D.Value&&null!=D.Value.t)return D.Value.t=D.Value.t.replace(/</g,"<"),D.Value.t=D.Value.t.replace(/>/g,">"),D.Value.t}return""}function h(w){return null!=w.Action?w.Action:w}function c(w){if(null!=w.Text){if(null!=w.Text.m)return w.Text.m}else if(null!=w.TextAreas){if(null!=w.TextAreas.Text&&+D[e].s||null!=D[e].e&&D[e].e<u.length||"t"==D[e].n||"ac"==D[e].n||"lk"==D[e].n){G=!0;break}if(G=G||F)return B(u,D,w)}catch(O){console.log(O)}u=u.replace(/</g,"<");return u=u.replace(/>/g,">")}if(null!=D.Value&&null!=D.Value.t)return D.Value.t=D.Value.t.replace(/</g,"<"),D.Value.t=D.Value.t.replace(/>/g,">"),D.Value.t}return""}function h(w){return null!=w.Action?w.Action:w}function b(w){if(null!=w.Text){if(null!=w.Text.m)return w.Text.m}else if(null!=w.TextAreas){if(null!=w.TextAreas.Text&&null!=w.TextAreas.Text.Value&&null!=w.TextAreas.Text.Value.m)return w.TextAreas.Text.Value.m}else{if(null!=w.m)return w.m;if(null!=w.Title){if(null!=w.Title.m)return w.Title.m}else if(null!=w.State){if(null!=w.State.m)return w.State.m}else if(null!=w.Note&&null!=w.Note.m)return w.Note.m}return null}function a(w,F){w="whiteSpace=wrap;"+(F?"overflow=block;blockSpacing=1;html=1;fontSize=13;"+mb:f(w)+k(w)+q(w)+t(w)+C(w)+I(w)+Q(w)+K(w)+L(w))+S(w)+R(w)+Zb(mxConstants.STYLE_ALIGN,w.TextAlign,"center");mb=-"";return w}function b(w,F,D,u,e,O){O=null==O?!1:O;var r="",p=!1,aa=!1;if(null!=w)if(O){O=w.split(";");w="";for(var ba=0;ba<O.length;ba++)"fillColor=none"==O[ba]?aa=!0:"strokeColor=none"==O[ba]?p=!0:""!=O[ba]&&(w+=O[ba]+";")}else""!=w&&";"!=w.charAt(w.length-1)&&(r=";");r+=(Yc(w,"whiteSpace")?"":"whiteSpace=wrap;")+(e?(Yc(w,"overflow")?"":"overflow=block;blockSpacing=1;")+(Yc(w,"html")?"":"html=1;")+"fontSize=13;"+mb:d(mxConstants.STYLE_FONTSIZE,w,F,D,u)+d(mxConstants.STYLE_FONTFAMILY,w,F,D,u)+d(mxConstants.STYLE_FONTCOLOR,+"";return w}function c(w,F,D,u,e,O){O=null==O?!1:O;var r="",p=!1,aa=!1;if(null!=w)if(O){O=w.split(";");w="";for(var ba=0;ba<O.length;ba++)"fillColor=none"==O[ba]?aa=!0:"strokeColor=none"==O[ba]?p=!0:""!=O[ba]&&(w+=O[ba]+";")}else""!=w&&";"!=w.charAt(w.length-1)&&(r=";");r+=(Yc(w,"whiteSpace")?"":"whiteSpace=wrap;")+(e?(Yc(w,"overflow")?"":"overflow=block;blockSpacing=1;")+(Yc(w,"html")?"":"html=1;")+"fontSize=13;"+mb:d(mxConstants.STYLE_FONTSIZE,w,F,D,u)+d(mxConstants.STYLE_FONTFAMILY,w,F,D,u)+d(mxConstants.STYLE_FONTCOLOR,w,F,D,u)+d(mxConstants.STYLE_FONTSTYLE,w,F,D,u)+d(mxConstants.STYLE_ALIGN,w,F,D,u)+d(mxConstants.STYLE_SPACING_LEFT,w,F,D,u)+d(mxConstants.STYLE_SPACING_RIGHT,w,F,D,u)+d(mxConstants.STYLE_SPACING_TOP,w,F,D,u)+d(mxConstants.STYLE_SPACING_BOTTOM,w,F,D,u))+d(mxConstants.STYLE_ALIGN+"Global",w,F,D,u)+d(mxConstants.STYLE_SPACING,w,F,D,u)+d(mxConstants.STYLE_VERTICAL_ALIGN,w,F,D,u)+d(mxConstants.STYLE_STROKECOLOR,w,F,D,u)+d(mxConstants.STYLE_OPACITY,w,F,D,u)+d(mxConstants.STYLE_ROUNDED,w,F,D,u)+d(mxConstants.STYLE_ROTATION,w,F,D,u)+d(mxConstants.STYLE_FLIPH,w,F,D,u)+d(mxConstants.STYLE_FLIPV,w,F,D,u)+d(mxConstants.STYLE_SHADOW,w,F,D,u)+d(mxConstants.STYLE_FILLCOLOR,w,F,D,u)+d(mxConstants.STYLE_DASHED,w,F,D,u)+d(mxConstants.STYLE_STROKEWIDTH,w,F,D,u)+d(mxConstants.STYLE_IMAGE,w,F,D,u)+d(mxConstants.STYLE_POINTER_EVENTS,w,F,D,u);aa&&!Yc(r,mxConstants.STYLE_FILLCOLOR)&&(r+="fillColor=none;");p&&!Yc(r,mxConstants.STYLE_STROKECOLOR)&&(r+="strokeColor=none;");mb="";return r}function d(w,F,D,u,e){if(!Yc(F,w))switch(w){case mxConstants.STYLE_FONTSIZE:return f(D);case mxConstants.STYLE_FONTFAMILY:return k(D);case mxConstants.STYLE_FONTCOLOR:return q(D);case mxConstants.STYLE_FONTSTYLE:return t(D);case mxConstants.STYLE_ALIGN:return C(D);case mxConstants.STYLE_ALIGN+"Global":return Zb(mxConstants.STYLE_ALIGN,D.TextAlign,"center");case mxConstants.STYLE_SPACING_LEFT:return I(D);case mxConstants.STYLE_SPACING_RIGHT:return Q(D);case mxConstants.STYLE_SPACING_TOP:return K(D);case mxConstants.STYLE_SPACING_BOTTOM:return L(D);case mxConstants.STYLE_SPACING:return S(D);case mxConstants.STYLE_VERTICAL_ALIGN:return R(D);case mxConstants.STYLE_STROKECOLOR:return H(D,u);case mxConstants.STYLE_OPACITY:return M(D,u,e);case mxConstants.STYLE_ROUNDED:return w=!e.edge&&!e.style.includes("rounded")&&null!=D.Rounding&&0<D.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+z(.75*D.Rounding)+";":"",w;case mxConstants.STYLE_ROTATION:return T(D,u,e);case mxConstants.STYLE_FLIPH:return w=D.FlipX?"flipH=1;":"",w;case mxConstants.STYLE_FLIPV:return w=D.FlipY?"flipV=1;":"",w;case mxConstants.STYLE_SHADOW:return ca(D);-case mxConstants.STYLE_FILLCOLOR:return Y(D,u);case mxConstants.STYLE_DASHED:return sa(D);case mxConstants.STYLE_STROKEWIDTH:return oa(D);case mxConstants.STYLE_IMAGE:return Ra(D,u);case mxConstants.STYLE_POINTER_EVENTS:return D.Magnetize?"container=1;pointerEvents=0;collapsible=0;recursiveResize=0;":""}return""}function f(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("s"==D.n&&D.v)return"fontSize="+z(.75*D.v)+";";F++}return"fontSize=13;"}function k(w){var F=c(w);if(null!=F)for(var D=-0;D<F.length;D++)if("f"==F[D].n&&F[D].v){var u=F[D].v;break}!u&&w.Font&&(u=w.Font);y(u);return mb}function n(w){return"ext"==w.tp?w.url:"ml"==w.tp?"mailto:"+w.eml:"pg"==w.tp?"data:page/id,"+(LucidImporter.pageIdsMap[w.id]||0):"c"==w.tp?"data:confluence/id,"+w.ccid:null}function q(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("c"==D.n&&null!=D.v)return w=V(D.v).substring(0,7),"#000000"==w&&(w="default"),mxConstants.STYLE_FONTCOLOR+"="+w+";";F++}return""}function t(w){return A(c(w))}function A(w){if(null!=-w){var F=0,D=!1;if(null!=w)for(var u=0;!D&&u<w.length;){var e=w[u];"b"==e.n?null!=e.v&&e.v&&(D=!0,F+=1):"fc"==e.n&&"Bold"==e.v&&(D=!0,F+=1);u++}D=!1;if(null!=w)for(u=0;!D&&u<w.length;)e=w[u],"i"==e.n&&null!=e.v&&e.v&&(D=!0,F+=2),u++;D=!1;if(null!=w)for(u=0;!D&&u<w.length;)e=w[u],"u"==e.n&&null!=e.v&&e.v&&(D=!0,F+=4),u++;if(0<F)return"fontStyle="+F+";"}return""}function C(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("a"==D.n&&null!=D.v)return"align="+D.v+";";F++}return""}function I(w){w=-c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if(null!=D.v&&"il"==D.n)return"spacingLeft="+z(.75*D.v)+";";F++}return""}function Q(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("ir"==D.n&&null!=D.v)return"spacingRight="+z(.75*D.v)+";";F++}return""}function K(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("mt"==D.n&&null!=D.v)return"spacingTop="+z(.75*D.v)+";";F++}return""}function L(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("mb"==D.n&&null!=D.v)return"spacingBottom="++case mxConstants.STYLE_FILLCOLOR:return Y(D,u);case mxConstants.STYLE_DASHED:return sa(D);case mxConstants.STYLE_STROKEWIDTH:return oa(D);case mxConstants.STYLE_IMAGE:return Ra(D,u);case mxConstants.STYLE_POINTER_EVENTS:return D.Magnetize?"container=1;pointerEvents=0;collapsible=0;recursiveResize=0;":""}return""}function f(w){w=b(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("s"==D.n&&D.v)return"fontSize="+z(.75*D.v)+";";F++}return"fontSize=13;"}function k(w){var F=b(w);if(null!=F)for(var D=+0;D<F.length;D++)if("f"==F[D].n&&F[D].v){var u=F[D].v;break}!u&&w.Font&&(u=w.Font);y(u);return mb}function n(w){return"ext"==w.tp?w.url:"ml"==w.tp?"mailto:"+w.eml:"pg"==w.tp?"data:page/id,"+(LucidImporter.pageIdsMap[w.id]||0):"c"==w.tp?"data:confluence/id,"+w.ccid:null}function q(w){w=b(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("c"==D.n&&null!=D.v)return w=V(D.v).substring(0,7),"#000000"==w&&(w="default"),mxConstants.STYLE_FONTCOLOR+"="+w+";";F++}return""}function t(w){return A(b(w))}function A(w){if(null!=+w){var F=0,D=!1;if(null!=w)for(var u=0;!D&&u<w.length;){var e=w[u];"b"==e.n?null!=e.v&&e.v&&(D=!0,F+=1):"fc"==e.n&&"Bold"==e.v&&(D=!0,F+=1);u++}D=!1;if(null!=w)for(u=0;!D&&u<w.length;)e=w[u],"i"==e.n&&null!=e.v&&e.v&&(D=!0,F+=2),u++;D=!1;if(null!=w)for(u=0;!D&&u<w.length;)e=w[u],"u"==e.n&&null!=e.v&&e.v&&(D=!0,F+=4),u++;if(0<F)return"fontStyle="+F+";"}return""}function C(w){w=b(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("a"==D.n&&null!=D.v)return"align="+D.v+";";F++}return""}function I(w){w=+b(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if(null!=D.v&&"il"==D.n)return"spacingLeft="+z(.75*D.v)+";";F++}return""}function Q(w){w=b(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("ir"==D.n&&null!=D.v)return"spacingRight="+z(.75*D.v)+";";F++}return""}function K(w){w=b(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("mt"==D.n&&null!=D.v)return"spacingTop="+z(.75*D.v)+";";F++}return""}function L(w){w=b(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("mb"==D.n&&null!=D.v)return"spacingBottom="+z(.75*D.v)+";";F++}return""}function S(w){return"number"===typeof w.InsetMargin?"spacing="+Math.max(0,z(.75*w.InsetMargin))+";":""}function R(w){return null!=w.Text_VAlign&&"string"===typeof w.Text_VAlign?"verticalAlign="+w.Text_VAlign+";":null!=w.Title_VAlign&&"string"===typeof w.Title_VAlign?"verticalAlign="+w.Title_VAlign+";":Zb(mxConstants.STYLE_VERTICAL_ALIGN,w.TextVAlign,"middle")}function H(w,F){return 0==w.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":Zb(mxConstants.STYLE_STROKECOLOR,P(w.LineColor),"#000000")}function N(w){return null!=w?mxConstants.STYLE_FILLCOLOR+"="+P(w)+";":""}function J(w){return null!=w?"swimlaneFillColor="+P(w)+";":""}function M(w,F,D){F="";if("string"===typeof w.LineColor&&(w.LineColor=V(w.LineColor),7<w.LineColor.length)){var u="0x"+w.LineColor.substring(w.LineColor.length-2,w.LineColor.length);D.style.includes("strokeOpacity")||(F+="strokeOpacity="+Math.round(parseInt(u)/2.55)+";")}"string"===typeof w.FillColor&&(w.FillColor=V(w.FillColor),7<w.FillColor.length&&(w="0x"+w.FillColor.substring(w.FillColor.length-2,w.FillColor.length),D.style.includes("fillOpacity")||(F+="fillOpacity="+Math.round(parseInt(w)/2.55)+";")));return F}function T(w,F,D){var u="";if(null!=w.Rotation){w=mxUtils.toDegree(parseFloat(w.Rotation));var e=!0;0!=w&&F.Class&&("UMLSwimLaneBlockV2"==F.Class||(0<=F.Class.indexOf("Rotated")||-90==w||270==w)&&(0<=F.Class.indexOf("Pool")||0<=F.Class.indexOf("SwimLane")))?(w+=90,D.geometry.rotate90(),D.geometry.isRotated=!0,e=!1):0<=mxUtils.indexOf(wf,@@ -14372,7 +14372,7 @@ return""}function sa(w){return"dotted"==w.StrokeStyle?"dashed=1;fixDash=1;dashPaF.Class&&null!=w.ImageFillProps&&null!=w.ImageFillProps.url&&(D=w.ImageFillProps.url);return null!=D?"image="+g(D)+";"+u:""}function la(w,F,D){null!=F.Link&&0<F.Link.length&&D.setAttributeForCell(w,"link",n(F.Link[0]));null!=F.NoteHint&&F.NoteHint.t&&D.setAttributeForCell(w,"Notes",F.NoteHint.t);var u=[],e=D.convertValueToString(w),O=!1;if(null!=e){for(var r=0;match=yf.exec(e);){var p=match[0];O=!0;if(2<p.length){var aa=p.substring(2,p.length-2);"documentName"==aa?aa="filename":"pageName"==aa?aa="page":"totalPages"==aa?aa="pagecount":"page"==aa?aa="pagenumber":"date:"==aa.substring(0,5)?aa="date{"+aa.substring(5).replace(/MMMM/g,"mmmm").replace(/MM/g,"mm").replace(/YYYY/g,"yyyy")+"}":"lastModifiedTime"==aa.substring(0,16)?aa=aa.replace(/MMMM/g,"mmmm").replace(/MM/g,"mm").replace(/YYYY/g,"yyyy"):"i18nDate:"==aa.substring(0,9)&&(aa="date{"+aa.substring(9).replace(/i18nShort/g,"shortDate").replace(/i18nMediumWithTime/g,"mmm d, yyyy hh:MM TT")+"}");aa="%"+aa+"%";u.push(e.substring(r,match.index)+(null!=aa?aa:p));r=match.index+p.length}}O&&(u.push(e.substring(r)),D.setAttributeForCell(w,"label",u.join("")),D.setAttributeForCell(w,"placeholders","1"))}for(var ba in F)if(F.hasOwnProperty(ba)&&ba.toString().startsWith("ShapeData_"))try{var W=F[ba],wa=mxUtils.trim(W.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");Sa(w,wa,W.Value,D)}catch(ka){window.console&&console.log("Ignored "+ba+":",ka)}}function Sa(w,F,D,u){for(var e=F,O=0;null!=u.getAttributeForCell(w,e);)O++,e=F+-"_"+O;u.setAttributeForCell(w,e,null!=D?D:"")}function Xa(w,F,D,u,e,O){var r=h(F);if(null!=r){var p=Pd[r.Class];null!=p?(w.style+=p,";"!=w.style.charAt(w.style.length-1)&&(w.style+=";")):w.edge||(console.log("No mapping found for: "+r.Class),LucidImporter.hasUnknownShapes=!0);p=null!=r.Properties?r.Properties:r;if(null!=p&&(w.value=O?"":m(p),w.style+=b(w.style,p,r,w,G,!0),w.style.includes("strokeColor")||(w.style+=H(p,r)),la(w,p,D),p.Title&&p.Title.t&&p.Text&&p.Text.t&&"ExtShape"!=r.Class.substr(0,+"_"+O;u.setAttributeForCell(w,e,null!=D?D:"")}function Xa(w,F,D,u,e,O){var r=h(F);if(null!=r){var p=Pd[r.Class];null!=p?(w.style+=p,";"!=w.style.charAt(w.style.length-1)&&(w.style+=";")):w.edge||(console.log("No mapping found for: "+r.Class),LucidImporter.hasUnknownShapes=!0);p=null!=r.Properties?r.Properties:r;if(null!=p&&(w.value=O?"":m(p),w.style+=c(w.style,p,r,w,G,!0),w.style.includes("strokeColor")||(w.style+=H(p,r)),la(w,p,D),p.Title&&p.Title.t&&p.Text&&p.Text.t&&"ExtShape"!=r.Class.substr(0,8)&&(D=w.geometry,D=new mxCell(m(p.Title),new mxGeometry(0,D.height,D.width,10),"strokeColor=none;fillColor=none;"),D.vertex=!0,w.insert(D),D.style+=a(p.Title,G)),w.edge)){w.style=null!=p.Rounding&&"diagonal"!=p.Shape?w.style+("rounded=1;arcSize="+p.Rounding+";"):w.style+"rounded=0;";if(D="curve"==p.Shape)w.style+="curved=1;";else if("diagonal"!=p.Shape)if(null!=p.ElbowPoints&&0<p.ElbowPoints.length)for(w.geometry.points=[],r=0;r<p.ElbowPoints.length;r++)w.geometry.points.push(new mxPoint(Math.round(.75*p.ElbowPoints[r].x+xc),Math.round(.75*p.ElbowPoints[r].y+yc)));else if("elbow"==p.Shape||null!=p.Endpoint1.Block&&null!=p.Endpoint2.Block)w.style+="edgeStyle=orthogonalEdgeStyle;";if(p.LineJumps||LucidImporter.globalProps.LineJumps)w.style+="jumpStyle=arc;";null!=p.Endpoint1.Style&&(O=Fe[p.Endpoint1.Style],null!=O?(O=O.replace(/xyz/g,"start"),w.style+="startArrow="+O+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+p.Endpoint1.Style)));null!=p.Endpoint2.Style&&(O=Fe[p.Endpoint2.Style],null!=O?(O=O.replace(/xyz/g,"end"),w.style+="endArrow="+O+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+p.Endpoint2.Style)));O=null!=p.ElbowControlPoints&&0<p.ElbowControlPoints.length?p.ElbowControlPoints:p.Joints;if(D&&null!=p.BezierJoints&&0<p.BezierJoints.length){O=[];D=p.BezierJoints[p.BezierJoints.length-1];D.p.x=p.Endpoint2.x;D.p.y=p.Endpoint2.y;for(r=0;r<p.BezierJoints.length;r++)D=p.BezierJoints[r],O.push({x:D.p.x+@@ -14403,29 +14403,29 @@ F.children&&0<F.children.length)for(e=F.children.slice(),u=0;u<e.length;u++)D.inAa.n1){var Oa=W[Aa.p2].x,Ca=W[Aa.p2].y,ua=u,Ma=e,Ja=new Rd(W[Aa.p1].x/u,W[Aa.p1].y/e,Aa.n1.x/u,Aa.n1.y/e,W[Aa.p2].x/u,W[Aa.p2].y/e,Aa.n2.x/u,Aa.n2.y/e);if(2<=Ja.getSize()){Ja.getX(0);Ja.getY(0);Ja.getX(1);Ja.getY(1);Oa=Math.round(100*Oa/ua*100)/100;Ca=Math.round(100*Ca/Ma*100)/100;ua=[];Ma=[];for(var Ka=[],l=Ja.getSize(),Ha=0;Ha<l-1;Ha+=3)ua.push(new mxPoint(Ja.getX(Ha),Ja.getY(Ha))),Ma.push(new mxPoint(Ja.getX(Ha+1),Ja.getY(Ha+1))),Ha<l-2?Ka.push(new mxPoint(Ja.getX(Ha+2),Ja.getY(Ha+2))):Ka.push(new mxPoint(Oa,Ca));var cb="";for(Ha=0;Ha<ua.length;Ha++)cb+='<curve x1="'+ua[Ha].x+'" y1="'+ua[Ha].y+'" x2="'+Ma[Ha].x+'" y2="'+Ma[Ha].y+'" x3="'+Ka[Ha].x+'" y3="'+Ka[Ha].y+'"/>';var Ea=cb}else Ea=void 0;ka.push(Ea)}else na=W[Aa.p2].x,Ba=W[Aa.p2].y,na=100*na/u,Ba=100*Ba/e,na=Math.round(100*na)/100,Ba=Math.round(100*Ba)/100,ka.push('<line x="'+na+'" y="'+Ba+'"/>');pa=Aa.p2}ka.push("</path>");ka.push("<fillstroke/>");ka.push("</foreground></shape>");D.push({shapeStencil:"stencil("+Graph.compress(ka.join(""))+")",FillColor:p,LineColor:aa,LineWidth:ba})}LucidImporter.stencilsMap[w]={text:F.Text,w:u,h:e,x:F.BoundingBox.x,y:F.BoundingBox.y,stencils:D}}catch(Qa){console.log("Stencil parsing error:",Qa)}}function tc(w,F,D,u,e,O,r,p){w=new mxCell("",new mxGeometry(w,F,0,0),"strokeColor=none;fillColor=none;");w.vertex=!0;r.insert(w);O=[w];D=D.clone();p.insertEdge(D,!1);w.insertEdge(D,!0);O.push(D);u.push(e.addCell(D,null,null,null,null))}function gb(w,F,D,u,e,O,r,p,aa){w=new mxCell("",new mxGeometry(w,F,0,0),"strokeColor=none;fillColor=none;");-w.vertex=!0;aa.insert(w);D=new mxCell("",new mxGeometry(D,u,0,0),"strokeColor=none;fillColor=none;");D.vertex=!0;aa.insert(D);p=[D];e=e.clone();w.insertEdge(e,!0);D.insertEdge(e,!1);p.push(e);O.push(r.addCell(e,null,null,null,null))}function Ta(w,F,D,u,e,O){u.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";u.style+=b(u.style,e,O,u);F=m(e);u.vertex=!0;w=new mxCell(F,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+-"=mxgraph.gcp2."+w+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");w.style+=b(w.style,e,O,w,G);w.geometry.relative=!0;w.geometry.offset=new mxPoint(5,-12);w.vertex=!0;u.insert(w)}function Ya(w,F,D,u,e,O,r,p){e="transparent"!=w?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";O.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";O.style+=b(O.style,-r,p,O);O.value=m(r);O.vertex=!0;w=new mxCell(null,new mxGeometry(.5,0,.7*u*F,.7*u*D),e+w+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");w.geometry.relative=!0;w.geometry.offset=new mxPoint(-F*u*.35,10+(1-D)*u*.35);w.vertex=!0;w.style+=b(w.style,r,p,w,G);O.insert(w)}function Yc(w,F){return null!=w&&null!=F&&(F==mxConstants.STYLE_ALIGN+"Global"&&(F=mxConstants.STYLE_ALIGN),w.includes(";"+F+"=")||w.substring(0,F.length+1)==F+"=")?!0:!1}function Sd(w,F){function D(u){u=Math.round(parseInt("0x"++w.vertex=!0;aa.insert(w);D=new mxCell("",new mxGeometry(D,u,0,0),"strokeColor=none;fillColor=none;");D.vertex=!0;aa.insert(D);p=[D];e=e.clone();w.insertEdge(e,!0);D.insertEdge(e,!1);p.push(e);O.push(r.addCell(e,null,null,null,null))}function Ta(w,F,D,u,e,O){u.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";u.style+=c(u.style,e,O,u);F=m(e);u.vertex=!0;w=new mxCell(F,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE++"=mxgraph.gcp2."+w+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");w.style+=c(w.style,e,O,w,G);w.geometry.relative=!0;w.geometry.offset=new mxPoint(5,-12);w.vertex=!0;u.insert(w)}function Ya(w,F,D,u,e,O,r,p){e="transparent"!=w?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";O.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";O.style+=c(O.style,+r,p,O);O.value=m(r);O.vertex=!0;w=new mxCell(null,new mxGeometry(.5,0,.7*u*F,.7*u*D),e+w+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");w.geometry.relative=!0;w.geometry.offset=new mxPoint(-F*u*.35,10+(1-D)*u*.35);w.vertex=!0;w.style+=c(w.style,r,p,w,G);O.insert(w)}function Yc(w,F){return null!=w&&null!=F&&(F==mxConstants.STYLE_ALIGN+"Global"&&(F=mxConstants.STYLE_ALIGN),w.includes(";"+F+"=")||w.substring(0,F.length+1)==F+"=")?!0:!1}function Sd(w,F){function D(u){u=Math.round(parseInt("0x"+u)*F).toString(16);return 1==u.length?"0"+u:u}return"#"+D(w.substr(1,2))+D(w.substr(3,2))+D(w.substr(5,2))}function Je(w,F,D){var u=h(w),e=u.Properties,O=e.BoundingBox,r=Math.round(.75*O.w),p=Math.round(.75*O.h),aa=Math.round(.75*O.x+xc),ba=Math.round(.75*O.y+yc);null==w.Class||"GCPInputDatabase"!==w.Class&&"GCPInputRecord"!==w.Class&&"GCPInputPayment"!==w.Class&&"GCPInputGateway"!==w.Class&&"GCPInputLocalCompute"!==w.Class&&"GCPInputBeacon"!==w.Class&&"GCPInputStorage"!==w.Class&&"GCPInputList"!==w.Class&&"GCPInputStream"!==w.Class&&"GCPInputMobileDevices"!==w.Class&&"GCPInputCircuitBoard"!==w.Class&&"GCPInputLive"!==w.Class&&"GCPInputUsers"!==w.Class&&"GCPInputLaptop"!==w.Class&&"GCPInputApplication"!==w.Class&&"GCPInputLightbulb"!==w.Class&&"GCPInputGame"!==w.Class&&"GCPInputDesktop"!==w.Class&&"GCPInputDesktopAndMobile"!==w.Class&&"GCPInputWebcam"!==w.Class&&"GCPInputSpeaker"!==w.Class&&"GCPInputRetail"!==w.Class&&"GCPInputReport"!==w.Class&&"GCPInputPhone"!==w.Class&&"GCPInputBlank"!==w.Class||(p+=20);v=new mxCell("",new mxGeometry(aa,ba,r,p),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;v.zOrder=e.ZOrder;var W=null!=w.Class?w.Class:null!=u?u.Class:null;switch(W){case "BraceNoteBlock":case "UI2BraceNoteBlock":var wa=!1;null!=e.BraceDirection&&"Right"==e.BraceDirection&&(wa=!0);var ka=null,pa=null,ra=m(e),Aa=e.Rotation?mxUtils.getSizeForString(ra.replace(/\n/g,"<br>"),null,null,Math.abs(r-.125*p)):{width:0,height:0};wa?(ka=new mxCell("",new mxGeometry(r-.125*-p,0,.125*p,p),"shape=curlyBracket;rounded=1;"),pa=new mxCell("",new mxGeometry(Aa.height,-2*Aa.width,r-.125*p,p),"strokeColor=none;fillColor=none;")):(ka=new mxCell("",new mxGeometry(0,0,.125*p,p),"shape=curlyBracket;rounded=1;flipH=1;"),pa=new mxCell("",new mxGeometry(.125*p-Aa.height,Aa.width,r-.125*p,p),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);ka.vertex=!0;v.insert(ka);ka.style+=b(ka.style,e,u,ka);pa.vertex=!0;pa.value=ra;v.insert(pa);-pa.style+=b(pa.style,e,u,pa,G);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var na="MainText",Ba=null,Oa="HeaderFill_",Ca="BodyFill_",ua=25,Ma=25,Ja=0;if(null!=e.Lanes)Ja=e.Lanes.length;else if(null!=e.PrimaryLane){var Ka=function(hb){if(hb)32>hb?hb=32:208<hb&&(hb=208);else return 0;return.75*hb};Ja=e.PrimaryLane.length;+p,0,.125*p,p),"shape=curlyBracket;rounded=1;"),pa=new mxCell("",new mxGeometry(Aa.height,-2*Aa.width,r-.125*p,p),"strokeColor=none;fillColor=none;")):(ka=new mxCell("",new mxGeometry(0,0,.125*p,p),"shape=curlyBracket;rounded=1;flipH=1;"),pa=new mxCell("",new mxGeometry(.125*p-Aa.height,Aa.width,r-.125*p,p),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,u,v);ka.vertex=!0;v.insert(ka);ka.style+=c(ka.style,e,u,ka);pa.vertex=!0;pa.value=ra;v.insert(pa);+pa.style+=c(pa.style,e,u,pa,G);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var na="MainText",Ba=null,Oa="HeaderFill_",Ca="BodyFill_",ua=25,Ma=25,Ja=0;if(null!=e.Lanes)Ja=e.Lanes.length;else if(null!=e.PrimaryLane){var Ka=function(hb){if(hb)32>hb?hb=32:208<hb&&(hb=208);else return 0;return.75*hb};Ja=e.PrimaryLane.length;for(var l=p=r=0;l<Ja;l++)r+=e.PrimaryLane[l];for(l=0;l<e.SecondaryLane.length;l++)p+=e.SecondaryLane[l];ua=Ka(e.PrimaryPoolTitleHeight);Ma=Ka(e.PrimaryLaneTitleHeight);r*=.75;p=.75*p+ua+Ma;v.geometry.width=r;v.geometry.height=p;na="poolPrimaryTitleKey";Oa="PrimaryLaneHeaderFill_";Ca="CellFill_0,";Ba=e.PrimaryLaneTextAreaIds;if(null==Ba)for(Ba=[],l=0;l<Ja;l++)Ba.push("Primary_"+l)}if(0==e.IsPrimaryLaneVertical){e.Rotation=-1.5707963267948966;var Ha=v.geometry.x,cb=v.geometry.y}var Ea=0!=e.Rotation,-Qa=0<W.indexOf("Pool"),ma=0==W.indexOf("BPMN"),La=null!=e[na];v.style=(Qa?"swimlane;startSize="+ua+";":"fillColor=none;strokeColor=none;pointerEvents=0;fontStyle=0;")+"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;"+(Ea?"horizontalStack=0;":"");v.style+=b(v.style,e,u,v);La&&(v.value=m(e[na]),v.style+=(G?"overflow=block;blockSpacing=1;fontSize=13;"+mb:f(e[na])+q(e[na])+k(e[na])+t(e[na])+C(e[na],v)+I(e[na])+Q(e[na])+K(e[na])+L(e[na]))+S(e[na])++Qa=0<W.indexOf("Pool"),ma=0==W.indexOf("BPMN"),La=null!=e[na];v.style=(Qa?"swimlane;startSize="+ua+";":"fillColor=none;strokeColor=none;pointerEvents=0;fontStyle=0;")+"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;"+(Ea?"horizontalStack=0;":"");v.style+=c(v.style,e,u,v);La&&(v.value=m(e[na]),v.style+=(G?"overflow=block;blockSpacing=1;fontSize=13;"+mb:f(e[na])+q(e[na])+k(e[na])+t(e[na])+C(e[na],v)+I(e[na])+Q(e[na])+K(e[na])+L(e[na]))+S(e[na])+R(e[na]));for(var ya=0,za=[],Qb="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;fontStyle=0;startSize="+Ma+";dropTarget=0;rounded=0;"+(Ea?"horizontal=0;":"")+(ma?"swimlaneLine=0;fillColor=none;":""),ha=e.Rotation=0;ha<Ja;ha++){if(null==Ba){var xb=parseFloat(e.Lanes[ha].p);l=parseInt(e.Lanes[ha].tid)||ha;var Wa="Lane_"+l}else xb=.75*e.PrimaryLane[ha]/r,l=ha,Wa=Ba[ha];var rc=r*ya,wc=Qa?ua:0;za.push(new mxCell("",Ea?new mxGeometry(wc,rc,p-wc,r*xb):new mxGeometry(rc,wc,r*xb,p--wc),Qb));za[ha].vertex=!0;v.insert(za[ha]);za[ha].value=m(e[Wa]);za[ha].style+=b(za[ha].style,e,u,za[ha],G)+(G?"fontSize=13;":f(e[Wa])+q(e[Wa])+t(e[Wa])+C(e[Wa],za[ha])+I(e[Wa])+Q(e[Wa])+K(e[Wa])+L(e[Wa]))+S(e[Wa])+R(e[Wa])+N(e[Oa+l])+J(e[Ca+l]);ya+=xb}null!=Ha&&(v.geometry.x=Ha,v.geometry.y=cb);break;case "UMLMultidimensionalSwimlane":var Gb=0,Rb=0,Lb=null,$b=null;if(null!=e.Rows&&null!=e.Columns){Gb=e.Rows.length;Rb=e.Columns.length;var Za=.75*e.TitleHeight||25,qb=.75*e.TitleWidth||25}else if(null!=+wc),Qb));za[ha].vertex=!0;v.insert(za[ha]);za[ha].value=m(e[Wa]);za[ha].style+=c(za[ha].style,e,u,za[ha],G)+(G?"fontSize=13;":f(e[Wa])+q(e[Wa])+t(e[Wa])+C(e[Wa],za[ha])+I(e[Wa])+Q(e[Wa])+K(e[Wa])+L(e[Wa]))+S(e[Wa])+R(e[Wa])+N(e[Oa+l])+J(e[Ca+l]);ya+=xb}null!=Ha&&(v.geometry.x=Ha,v.geometry.y=cb);break;case "UMLMultidimensionalSwimlane":var Gb=0,Rb=0,Lb=null,$b=null;if(null!=e.Rows&&null!=e.Columns){Gb=e.Rows.length;Rb=e.Columns.length;var Za=.75*e.TitleHeight||25,qb=.75*e.TitleWidth||25}else if(null!=e.PrimaryLane&&null!=e.SecondaryLane){Gb=e.SecondaryLane.length;Rb=e.PrimaryLane.length;qb=.75*e.SecondaryLaneTitleHeight||25;Za=.75*e.PrimaryLaneTitleHeight||25;for(l=p=r=0;l<Gb;l++)p+=e.SecondaryLane[l];for(l=0;l<Rb;l++)r+=e.PrimaryLane[l];r=.75*r+qb;p=.75*p+Za;v.geometry.width=r;v.geometry.height=p;Lb=e.SecondaryLaneTextAreaIds;$b=e.PrimaryLaneTextAreaIds}v.style="group;";var Oc=new mxCell("",new mxGeometry(0,Za,r,p-Za),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;horizontalStack=0;");Oc.vertex=!0;var Gc=new mxCell("",new mxGeometry(qb,0,r-qb,p),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;");Gc.vertex=!0;v.insert(Oc);v.insert(Gc);ba=0;var Hc="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;horizontal=0;fontStyle=0;startSize="+qb+";";for(ha=0;ha<Gb;ha++){if(null==Lb){var Td=.75*parseInt(e.Rows[ha].height);l=parseInt(e.Rows[ha].id)||ha;var Sb="Row_"+l}else Td=-.75*e.SecondaryLane[ha],Sb=Lb[ha];var Ic=new mxCell("",new mxGeometry(0,ba,r,Td),Hc);ba+=Td;Ic.vertex=!0;Oc.insert(Ic);Ic.value=m(e[Sb]);Ic.style+=b(Ic.style,e,u,Ic,G)+(G?"fontSize=13;":f(e[Sb])+q(e[Sb])+t(e[Sb])+C(e[Sb],Ic)+I(e[Sb])+Q(e[Sb])+K(e[Sb])+L(e[Sb]))+S(e[Sb])+R(e[Sb])}var Ef="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;fontStyle=0;startSize="+Za+";";for(ha=aa=0;ha<Rb;ha++){if(null==$b){var Zc=.75*parseInt(e.Columns[ha].width);l=parseInt(e.Columns[ha].id)||-ha;var Tb="Column_"+l}else Zc=.75*e.PrimaryLane[ha],Tb=$b[ha];var Jc=new mxCell("",new mxGeometry(aa,0,Zc,p),Ef);aa+=Zc;Jc.vertex=!0;Gc.insert(Jc);Jc.value=m(e[Tb]);Jc.style+=b(Jc.style,e,u,Jc,G)+(G?"fontSize=13;":f(e[Tb])+q(e[Tb])+t(e[Tb])+C(e[Tb],Jc)+I(e[Tb])+Q(e[Tb])+K(e[Tb])+L(e[Tb]))+S(e[Tb])+R(e[Tb])}break;case "UMLStateBlock":if(0==e.Composite)v.style="rounded=1;arcSize=20",v.value=m(e.State,!0),v.style+=b(v.style,e,u,v,G);else{v.style="swimlane;startSize=25;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;rounded=1;arcSize=20;fontStyle=0;";-v.value=m(e.State,!0);v.style+=b(v.style,e,u,v,G);v.style+=Y(e,u).replace("fillColor","swimlaneFillColor");var zb=new mxCell("",new mxGeometry(0,25,r,p-25),"rounded=1;arcSize=20;strokeColor=none;fillColor=none");zb.value=m(e.Action,!0);zb.style+=b(zb.style,e,u,zb,G);zb.vertex=!0;v.insert(zb)}break;case "GSDFDProcessBlock":var ie=Math.round(.75*e.nameHeight);v.style="shape=swimlane;html=1;rounded=1;arcSize=10;collapsible=0;fontStyle=0;startSize="+ie;v.value=m(e.Number,!0);v.style+=b(v.style,e,u,v,-G);v.style+=Y(e,u).replace("fillColor","swimlaneFillColor");zb=new mxCell("",new mxGeometry(0,ie,r,p-ie),"rounded=1;arcSize=10;strokeColor=none;fillColor=none");zb.value=m(e.Text,!0);zb.style+=b(zb.style,e,u,zb,G);zb.vertex=!0;v.insert(zb);break;case "AndroidDevice":if(null!=e.AndroidDeviceName){var nb=T(e,u,v);v.style="fillColor=#000000;strokeColor=#000000;";var zc=null,$c=null,ad=null;if("Tablet"==e.AndroidDeviceName||"Mini Tablet"==e.AndroidDeviceName||"custom"==e.AndroidDeviceName&&"Tablet"==+.75*e.SecondaryLane[ha],Sb=Lb[ha];var Ic=new mxCell("",new mxGeometry(0,ba,r,Td),Hc);ba+=Td;Ic.vertex=!0;Oc.insert(Ic);Ic.value=m(e[Sb]);Ic.style+=c(Ic.style,e,u,Ic,G)+(G?"fontSize=13;":f(e[Sb])+q(e[Sb])+t(e[Sb])+C(e[Sb],Ic)+I(e[Sb])+Q(e[Sb])+K(e[Sb])+L(e[Sb]))+S(e[Sb])+R(e[Sb])}var Ef="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;fontStyle=0;startSize="+Za+";";for(ha=aa=0;ha<Rb;ha++){if(null==$b){var Zc=.75*parseInt(e.Columns[ha].width);l=parseInt(e.Columns[ha].id)||+ha;var Tb="Column_"+l}else Zc=.75*e.PrimaryLane[ha],Tb=$b[ha];var Jc=new mxCell("",new mxGeometry(aa,0,Zc,p),Ef);aa+=Zc;Jc.vertex=!0;Gc.insert(Jc);Jc.value=m(e[Tb]);Jc.style+=c(Jc.style,e,u,Jc,G)+(G?"fontSize=13;":f(e[Tb])+q(e[Tb])+t(e[Tb])+C(e[Tb],Jc)+I(e[Tb])+Q(e[Tb])+K(e[Tb])+L(e[Tb]))+S(e[Tb])+R(e[Tb])}break;case "UMLStateBlock":if(0==e.Composite)v.style="rounded=1;arcSize=20",v.value=m(e.State,!0),v.style+=c(v.style,e,u,v,G);else{v.style="swimlane;startSize=25;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;rounded=1;arcSize=20;fontStyle=0;";+v.value=m(e.State,!0);v.style+=c(v.style,e,u,v,G);v.style+=Y(e,u).replace("fillColor","swimlaneFillColor");var zb=new mxCell("",new mxGeometry(0,25,r,p-25),"rounded=1;arcSize=20;strokeColor=none;fillColor=none");zb.value=m(e.Action,!0);zb.style+=c(zb.style,e,u,zb,G);zb.vertex=!0;v.insert(zb)}break;case "GSDFDProcessBlock":var ie=Math.round(.75*e.nameHeight);v.style="shape=swimlane;html=1;rounded=1;arcSize=10;collapsible=0;fontStyle=0;startSize="+ie;v.value=m(e.Number,!0);v.style+=c(v.style,e,u,v,+G);v.style+=Y(e,u).replace("fillColor","swimlaneFillColor");zb=new mxCell("",new mxGeometry(0,ie,r,p-ie),"rounded=1;arcSize=10;strokeColor=none;fillColor=none");zb.value=m(e.Text,!0);zb.style+=c(zb.style,e,u,zb,G);zb.vertex=!0;v.insert(zb);break;case "AndroidDevice":if(null!=e.AndroidDeviceName){var nb=T(e,u,v);v.style="fillColor=#000000;strokeColor=#000000;";var zc=null,$c=null,ad=null;if("Tablet"==e.AndroidDeviceName||"Mini Tablet"==e.AndroidDeviceName||"custom"==e.AndroidDeviceName&&"Tablet"==e.CustomDeviceType)v.style+="shape=mxgraph.android.tab2;",zc=new mxCell("",new mxGeometry(.112,.077,.77*r,.85*p),nb),e.KeyboardShown&&($c=new mxCell("",new mxGeometry(.112,.727,.77*r,.2*p),"shape=mxgraph.android.keyboard;"+nb)),e.FullScreen||(ad=new mxCell("",new mxGeometry(.112,.077,.77*r,.03*p),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*p+";"+nb));else if("Large Phone"==e.AndroidDeviceName||"Phone"==e.AndroidDeviceName||"custom"==e.AndroidDeviceName&&"Phone"==e.CustomDeviceType)v.style+="shape=mxgraph.android.phone2;",zc=new mxCell("",new mxGeometry(.04,.092,.92*r,.816*p),nb),e.KeyboardShown&&($c=new mxCell("",new mxGeometry(.04,.708,.92*r,.2*p),"shape=mxgraph.android.keyboard;"+nb)),e.FullScreen||(ad=new mxCell("",new mxGeometry(.04,.092,.92*r,.03*p),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*p+";"+nb));zc.vertex=!0;zc.geometry.relative=!0;v.insert(zc);"Dark"==e.Scheme?zc.style+="fillColor=#111111;":-"Light"==e.Scheme&&(zc.style+="fillColor=#ffffff;");null!=$c&&($c.vertex=!0,$c.geometry.relative=!0,v.insert($c));null!=ad&&(ad.vertex=!0,ad.geometry.relative=!0,v.insert(ad))}v.style+=b(v.style,e,u,v);break;case "AndroidAlertDialog":var ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);var Pa=new mxCell("",new mxGeometry(0,25,r,10),"shape=line;strokeColor=#33B5E5;");Pa.vertex=!0;v.insert(Pa);var rd=new mxCell("",new mxGeometry(0,+"Light"==e.Scheme&&(zc.style+="fillColor=#ffffff;");null!=$c&&($c.vertex=!0,$c.geometry.relative=!0,v.insert($c));null!=ad&&(ad.vertex=!0,ad.geometry.relative=!0,v.insert(ad))}v.style+=c(v.style,e,u,v);break;case "AndroidAlertDialog":var ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);var Pa=new mxCell("",new mxGeometry(0,25,r,10),"shape=line;strokeColor=#33B5E5;");Pa.vertex=!0;v.insert(Pa);var rd=new mxCell("",new mxGeometry(0,30,r,p-30),"strokeColor=none;fillColor=none;verticalAlign=top;");rd.vertex=!0;v.insert(rd);var jb=new mxCell("",new mxGeometry(0,p-25,.5*r,25),"fillColor=none;");jb.vertex=!0;v.insert(jb);var kb=new mxCell("",new mxGeometry(.5*r,p-25,.5*r,25),"fillColor=none;");kb.vertex=!0;v.insert(kb);ac.value=m(e.DialogTitle);ac.style+=a(e.DialogTitle,G);rd.value=m(e.DialogText);rd.style+=a(e.DialogText,G);jb.value=m(e.Button_0);jb.style+=a(e.Button_0,G);kb.value=m(e.Button_1);kb.style+=a(e.Button_1,G);"Dark"==-e.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",jb.style+="strokeColor=#353535;",kb.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",jb.style+="strokeColor=#E2E2E2;",kb.style+="strokeColor=#E2E2E2;");v.style+=b(v.style,e,u,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);ac.value=m(e.DialogTitle);ac.style+=a(e.DialogTitle,+e.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",jb.style+="strokeColor=#353535;",kb.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",jb.style+="strokeColor=#E2E2E2;",kb.style+="strokeColor=#E2E2E2;");v.style+=c(v.style,e,u,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);ac.value=m(e.DialogTitle);ac.style+=a(e.DialogTitle,G);Pa=new mxCell("",new mxGeometry(0,25,r,10),"shape=line;strokeColor=#33B5E5;");Pa.vertex=!0;v.insert(Pa);jb=new mxCell("",new mxGeometry(0,p-25,.5*r,25),"fillColor=none;");jb.vertex=!0;v.insert(jb);jb.value=m(e.Button_0);jb.style+=a(e.Button_0,G);kb=new mxCell("",new mxGeometry(.5*r,p-25,.5*r,25),"fillColor=none;");kb.vertex=!0;v.insert(kb);kb.value=m(e.Button_1);kb.style+=a(e.Button_1,G);var bd=new mxCell("",new mxGeometry(.5*r-4,41,8,4),"shape=triangle;direction=north;");bd.vertex=!0;v.insert(bd);var cd=new mxCell("",new mxGeometry(.25*r-4,41,8,4),"shape=triangle;direction=north;");cd.vertex=!0;v.insert(cd);var dd=new mxCell("",new mxGeometry(.75*r-4,41,8,4),"shape=triangle;direction=north;");dd.vertex=!0;v.insert(dd);var sd=new mxCell("",new mxGeometry(.375*r,50,.2*r,15),"strokeColor=none;fillColor=none;");sd.vertex=!0;v.insert(sd);sd.value=m(e.Label_1);sd.style+=a(e.Label_1,G);var td=new mxCell("",new mxGeometry(.125*r,50,.2*r,15),"strokeColor=none;fillColor=none;");td.vertex=!0;v.insert(td);td.value=m(e.Label_0);td.style+=a(e.Label_0,G);var ed=null;"AndroidDateDialog"==w.Class&&(ed=new mxCell("",new mxGeometry(.625*r,50,.2*r,15),"strokeColor=none;fillColor=none;"),ed.vertex=!0,v.insert(ed),ed.value=m(e.Label_2),ed.style+=a(e.Label_2,G));var Ab=new mxCell("",new mxGeometry(.43*r,60,.14*r,10),"shape=line;strokeColor=#33B5E5;");Ab.vertex=!0;v.insert(Ab);var Bb=new mxCell("",new mxGeometry(.18*r,60,.14*r,10),"shape=line;strokeColor=#33B5E5;");Bb.vertex=!0;v.insert(Bb);var Me=new mxCell("",@@ -14434,62 +14434,62 @@ r,65,.2*r,15),"strokeColor=none;fillColor=none;");vd.vertex=!0;v.insert(vd);vd.v!0;v.insert(Oe);var Pe=new mxCell("",new mxGeometry(.68*r,75,.14*r,10),"shape=line;strokeColor=#33B5E5;");Pe.vertex=!0;v.insert(Pe);var xd=new mxCell("",new mxGeometry(.375*r,80,.2*r,15),"strokeColor=none;fillColor=none;");xd.vertex=!0;v.insert(xd);xd.value=m(e.Label_7);xd.style+=a(e.Label_7,G);var yd=new mxCell("",new mxGeometry(.125*r,80,.2*r,15),"strokeColor=none;fillColor=none;");yd.vertex=!0;v.insert(yd);yd.value=m(e.Label_6);yd.style+=a(e.Label_6,G);var zd=new mxCell("",new mxGeometry(.625*r,80,.2*r,15),"strokeColor=none;fillColor=none;");zd.vertex=!0;v.insert(zd);zd.value=m(e.Label_8);zd.style+=a(e.Label_8,G);var gd=new mxCell("",new mxGeometry(.5*r-4,99,8,4),"shape=triangle;direction=south;");gd.vertex=!0;v.insert(gd);var hd=new mxCell("",new mxGeometry(.25*r-4,99,8,4),"shape=triangle;direction=south;");hd.vertex=!0;v.insert(hd);var id=new mxCell("",new mxGeometry(.75*r-4,99,8,4),"shape=triangle;direction=south;");id.vertex=!0;v.insert(id);"Dark"==e.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",jb.style+="strokeColor=#353535;",kb.style+="strokeColor=#353535;",bd.style+="strokeColor=none;fillColor=#7E7E7E;",cd.style+="strokeColor=none;fillColor=#7E7E7E;",dd.style+="strokeColor=none;fillColor=#7E7E7E;",gd.style+="strokeColor=none;fillColor=#7E7E7E;",hd.style+="strokeColor=none;fillColor=#7E7E7E;",id.style+="strokeColor=none;fillColor=#7E7E7E;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",jb.style+="strokeColor=#E2E2E2;",kb.style+="strokeColor=#E2E2E2;",bd.style+="strokeColor=none;fillColor=#939393;",-cd.style+="strokeColor=none;fillColor=#939393;",dd.style+="strokeColor=none;fillColor=#939393;",gd.style+="strokeColor=none;fillColor=#939393;",hd.style+="strokeColor=none;fillColor=#939393;",id.style+="strokeColor=none;fillColor=#939393;");v.style+=b(v.style,e,u,v);break;case "AndroidListItems":var Cb=p,Ac=0;if(e.ShowHeader){Ac=8;var Pc=new mxCell("",new mxGeometry(0,0,r,Ac),"strokeColor=none;fillColor=none;");Pc.vertex=!0;v.insert(Pc);Pc.value=m(e.Header);Pc.style+=a(e.Header,G);Cb-=Ac;var Qe=new mxCell("",+cd.style+="strokeColor=none;fillColor=#939393;",dd.style+="strokeColor=none;fillColor=#939393;",gd.style+="strokeColor=none;fillColor=#939393;",hd.style+="strokeColor=none;fillColor=#939393;",id.style+="strokeColor=none;fillColor=#939393;");v.style+=c(v.style,e,u,v);break;case "AndroidListItems":var Cb=p,Ac=0;if(e.ShowHeader){Ac=8;var Pc=new mxCell("",new mxGeometry(0,0,r,Ac),"strokeColor=none;fillColor=none;");Pc.vertex=!0;v.insert(Pc);Pc.value=m(e.Header);Pc.style+=a(e.Header,G);Cb-=Ac;var Qe=new mxCell("",new mxGeometry(0,Ac-2,r,4),"shape=line;strokeColor=#999999;");Qe.vertex=!0;v.insert(Qe)}var bc=parseInt(e.Items);0<bc&&(Cb/=bc);var X=[];Pa=[];for(l=0;l<bc;l++)X[l]=new mxCell("",new mxGeometry(0,Ac+l*Cb,r,Cb),"strokeColor=none;fillColor=none;"),X[l].vertex=!0,v.insert(X[l]),X[l].value=m(e["Item_"+l]),X[l].style+=a(e["Item_"+l],G),0<l&&(Pa[l]=new mxCell("",new mxGeometry(0,Ac+l*Cb-2,r,4),"shape=line;"),Pa[l].vertex=!0,v.insert(Pa[l]),Pa[l].style="Dark"==e.Scheme?Pa[l].style+"strokeColor=#ffffff;":-Pa[l].style+"strokeColor=#D9D9D9;");v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#111111;":v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=b(v.style,e,u,v);break;case "AndroidTabs":var cc=parseInt(e.Tabs),Hb=r;0<cc&&(Hb/=cc);var Ua=[];Pa=[];for(l=0;l<cc;l++)Ua[l]=new mxCell("",new mxGeometry(l*Hb,0,Hb,p),"strokeColor=none;fillColor=none;"),Ua[l].vertex=!0,v.insert(Ua[l]),Ua[l].value=m(e["Tab_"+l]),Ua[l].style+=a(e["Tab_"+l],G),0<l&&(Pa[l]=new mxCell("",new mxGeometry(l*Hb-2,-.2*p,4,.6*p),"shape=line;direction=north;"),Pa[l].vertex=!0,v.insert(Pa[l]),Pa[l].style="Dark"==e.Scheme?Pa[l].style+"strokeColor=#484848;":Pa[l].style+"strokeColor=#CCCCCC;");var Re=new mxCell("",new mxGeometry(e.Selected*Hb+2,p-3,Hb-4,3),"strokeColor=none;fillColor=#33B5E5;");Re.vertex=!0;v.insert(Re);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=b(v.style,e,u,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(aa),-Math.round(ba+.25*p),Math.round(r),Math.round(.5*p)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;var Ad=new mxCell("",new mxGeometry(0,0,r*e.BarPosition,Math.round(.5*p)),"strokeColor=none;fillColor=#33B5E5;");Ad.vertex=!0;v.insert(Ad);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";v.style+=b(v.style,e,u,v);break;case "AndroidImageBlock":v.style="Dark"==e.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+=b(v.style,e,u,v);break;case "AndroidTextBlock":v.style="Dark"==e.Scheme?e.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":e.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=m(e.Label);v.style+=a(e.Label,G);v.style+=b(v.style,e,u,v,G);break;case "AndroidActionBar":v.style+="strokeColor=none;";+Pa[l].style+"strokeColor=#D9D9D9;");v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#111111;":v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=c(v.style,e,u,v);break;case "AndroidTabs":var cc=parseInt(e.Tabs),Hb=r;0<cc&&(Hb/=cc);var Ua=[];Pa=[];for(l=0;l<cc;l++)Ua[l]=new mxCell("",new mxGeometry(l*Hb,0,Hb,p),"strokeColor=none;fillColor=none;"),Ua[l].vertex=!0,v.insert(Ua[l]),Ua[l].value=m(e["Tab_"+l]),Ua[l].style+=a(e["Tab_"+l],G),0<l&&(Pa[l]=new mxCell("",new mxGeometry(l*Hb-2,+.2*p,4,.6*p),"shape=line;direction=north;"),Pa[l].vertex=!0,v.insert(Pa[l]),Pa[l].style="Dark"==e.Scheme?Pa[l].style+"strokeColor=#484848;":Pa[l].style+"strokeColor=#CCCCCC;");var Re=new mxCell("",new mxGeometry(e.Selected*Hb+2,p-3,Hb-4,3),"strokeColor=none;fillColor=#33B5E5;");Re.vertex=!0;v.insert(Re);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=c(v.style,e,u,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(aa),+Math.round(ba+.25*p),Math.round(r),Math.round(.5*p)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;var Ad=new mxCell("",new mxGeometry(0,0,r*e.BarPosition,Math.round(.5*p)),"strokeColor=none;fillColor=#33B5E5;");Ad.vertex=!0;v.insert(Ad);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";v.style+=c(v.style,e,u,v);break;case "AndroidImageBlock":v.style="Dark"==e.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+=c(v.style,e,u,v);break;case "AndroidTextBlock":v.style="Dark"==e.Scheme?e.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":e.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=m(e.Label);v.style+=a(e.Label,G);v.style+=c(v.style,e,u,v,G);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(e.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(e.HighlightShow){var Bc=null;Bc=e.HighlightTop?new mxCell("",new mxGeometry(0,0,r,2),"strokeColor=none;"):new mxCell("",new mxGeometry(0,p-2,r,2),"strokeColor=none;");Bc.vertex=!0;v.insert(Bc);switch(e.HighlightColor){case "Blue":Bc.style+="fillColor=#33B5E5;";break;case "Dark Gray":Bc.style+=-"fillColor=#B0B0B0;";break;case "White":Bc.style+="fillColor=#ffffff;"}}if(e.VlignShow){var jd=new mxCell("",new mxGeometry(20,5,2,p-10),"shape=line;direction=north;");jd.vertex=!0;v.insert(jd);switch(e.VlignColor){case "Blue":jd.style+="strokeColor=#244C5A;";break;case "White":jd.style+="strokeColor=#ffffff;"}}v.style+=b(v.style,e,u,v);break;case "AndroidButton":v.value=m(e.Label);v.style+=a(e.Label,G)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==e.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":-v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";v.style+=b(v.style,e,u,v);break;case "AndroidTextBox":v.value=m(e.Label);v.style+=a(e.Label,G);var Bd=new mxCell("",new mxGeometry(2,p-6,r-4,4),"shape=partialRectangle;top=0;fillColor=none;");Bd.vertex=!0;v.insert(Bd);v.style="Dark"==e.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;";Bd.style=e.TextFocused?Bd.style+"strokeColor=#33B5E5;":Bd.style+"strokeColor=#A9A9A9;";v.style+=b(v.style,e,u,v);+"fillColor=#B0B0B0;";break;case "White":Bc.style+="fillColor=#ffffff;"}}if(e.VlignShow){var jd=new mxCell("",new mxGeometry(20,5,2,p-10),"shape=line;direction=north;");jd.vertex=!0;v.insert(jd);switch(e.VlignColor){case "Blue":jd.style+="strokeColor=#244C5A;";break;case "White":jd.style+="strokeColor=#ffffff;"}}v.style+=c(v.style,e,u,v);break;case "AndroidButton":v.value=m(e.Label);v.style+=a(e.Label,G)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==e.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":+v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";v.style+=c(v.style,e,u,v);break;case "AndroidTextBox":v.value=m(e.Label);v.style+=a(e.Label,G);var Bd=new mxCell("",new mxGeometry(2,p-6,r-4,4),"shape=partialRectangle;top=0;fillColor=none;");Bd.vertex=!0;v.insert(Bd);v.style="Dark"==e.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;";Bd.style=e.TextFocused?Bd.style+"strokeColor=#33B5E5;":Bd.style+"strokeColor=#A9A9A9;";v.style+=c(v.style,e,u,v);break;case "AndroidRadioButton":var Qc=null;e.Checked&&(Qc=new mxCell("",new mxGeometry(.15*r,.15*p,.7*r,.7*p),"ellipse;fillColor=#33B5E5;strokeWidth=1;"),Qc.vertex=!0,v.insert(Qc));"Dark"==e.Scheme?(v.style+="shape=ellipse;perimeter=ellipsePerimeter;strokeWidth=1;strokeColor=#272727;",e.Checked?(Qc.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"):(v.style+="shape=ellipse;perimeter=ellipsePerimeter;strokeWidth=1;fillColor=#ffffff;strokeColor=#5C5C5C;",e.Checked&&-(Qc.style+="strokeColor=#999999;"));v.style+=b(v.style,e,u,v);break;case "AndroidCheckBox":var je=null;e.Checked&&(je=new mxCell("",new mxGeometry(.25*r,.05*-p,r,.8*p),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),je.vertex=!0,v.insert(je));v.style="Dark"==e.Scheme?v.style+"strokeWidth=1;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=1;strokeColor=#5C5C5C;fillColor=#ffffff;";v.style+=b(v.style,e,u,v);break;case "AndroidToggle":v.style="Dark"==e.Scheme?e.Checked?-v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":e.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";v.style+=b(v.style,e,u,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+e.BarPosition+";fillColor=#33b5e5;";v.style+=b(v.style,e,u,v);break;case "iOSSegmentedControl":cc=parseInt(e.Tabs);Hb=r;v.style+="strokeColor=none;fillColor=none;";-0<cc&&(Hb/=cc);Ua=[];Pa=[];for(l=0;l<cc;l++)Ua[l]=new mxCell("",new mxGeometry(l*Hb,0,Hb,p),"strokeColor="+e.FillColor+";"),Ua[l].vertex=!0,v.insert(Ua[l]),Ua[l].value=m(e["Tab_"+l]),Ua[l].style+=a(e["Tab_"+l],G),Ua[l].style=e.Selected==l?Ua[l].style+Y(e,u):Ua[l].style+"fillColor=none;";v.style+=b(v.style,e,u,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+e.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*e.BarPosition+";";v.style+=b(v.style,e,u,v);break;case "iOSProgressBar":v=-new mxCell("",new mxGeometry(Math.round(aa),Math.round(ba+.25*p),Math.round(r),Math.round(.5*p)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;Ad=new mxCell("",new mxGeometry(0,0,r*e.BarPosition,Math.round(.5*p)),"strokeColor=none;"+Y(e,u));Ad.vertex=!0;v.insert(Ad);v.style+=b(v.style,e,u,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=b(v.style,e,u,v);break;case "iOSStatusBar":v.style+=-"shape=mxgraph.ios7ui.appBar;strokeColor=#000000;";var Da=new mxCell(m(e.Text),new mxGeometry(.35*r,0,.3*r,p),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.Text,G);var Db=new mxCell(m(e.Carrier),new mxGeometry(.09*r,0,.2*r,p),"strokeColor=none;fillColor=none;");Db.vertex=!0;v.insert(Db);Db.style+=a(e.Carrier,G);v.style+=b(v.style,e,u,v);break;case "iOSSearchBar":v.value=m(e.Search);v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v,G)+a(e.Search,G);var Ia=new mxCell("",-new mxGeometry(.3*r,.3*p,.4*p,.4*p),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");Ia.vertex=!0;v.insert(Ia);break;case "iOSNavBar":v.value=m(e.Title);v.style+="shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;"+a(e.Title,G);v.style+=b(v.style,e,u,v,G);Da=new mxCell(m(e.LeftText),new mxGeometry(.03*r,0,.3*r,p),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.LeftText,G);Db=new mxCell(m(e.RightText),new mxGeometry(.65*r,0,.3*-r,p),"strokeColor=none;fillColor=none;");Db.vertex=!0;v.insert(Db);Db.style+=a(e.RightText,G);Ia=new mxCell("",new mxGeometry(.02*r,.2*p,.3*p,.5*p),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;");Ia.vertex=!0;v.insert(Ia);break;case "iOSTabs":cc=parseInt(e.Tabs);Hb=r;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=b(v.style,e,u,v);0<cc&&(Hb/=cc);Ua=[];Pa=[];for(l=0;l<cc;l++)Ua[l]=new mxCell("",new mxGeometry(l*Hb,0,Hb,p),"strokeColor=none;"),+(Qc.style+="strokeColor=#999999;"));v.style+=c(v.style,e,u,v);break;case "AndroidCheckBox":var je=null;e.Checked&&(je=new mxCell("",new mxGeometry(.25*r,.05*-p,r,.8*p),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),je.vertex=!0,v.insert(je));v.style="Dark"==e.Scheme?v.style+"strokeWidth=1;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=1;strokeColor=#5C5C5C;fillColor=#ffffff;";v.style+=c(v.style,e,u,v);break;case "AndroidToggle":v.style="Dark"==e.Scheme?e.Checked?+v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":e.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";v.style+=c(v.style,e,u,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+e.BarPosition+";fillColor=#33b5e5;";v.style+=c(v.style,e,u,v);break;case "iOSSegmentedControl":cc=parseInt(e.Tabs);Hb=r;v.style+="strokeColor=none;fillColor=none;";+0<cc&&(Hb/=cc);Ua=[];Pa=[];for(l=0;l<cc;l++)Ua[l]=new mxCell("",new mxGeometry(l*Hb,0,Hb,p),"strokeColor="+e.FillColor+";"),Ua[l].vertex=!0,v.insert(Ua[l]),Ua[l].value=m(e["Tab_"+l]),Ua[l].style+=a(e["Tab_"+l],G),Ua[l].style=e.Selected==l?Ua[l].style+Y(e,u):Ua[l].style+"fillColor=none;";v.style+=c(v.style,e,u,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+e.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*e.BarPosition+";";v.style+=c(v.style,e,u,v);break;case "iOSProgressBar":v=+new mxCell("",new mxGeometry(Math.round(aa),Math.round(ba+.25*p),Math.round(r),Math.round(.5*p)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;Ad=new mxCell("",new mxGeometry(0,0,r*e.BarPosition,Math.round(.5*p)),"strokeColor=none;"+Y(e,u));Ad.vertex=!0;v.insert(Ad);v.style+=c(v.style,e,u,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=c(v.style,e,u,v);break;case "iOSStatusBar":v.style+=+"shape=mxgraph.ios7ui.appBar;strokeColor=#000000;";var Da=new mxCell(m(e.Text),new mxGeometry(.35*r,0,.3*r,p),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.Text,G);var Db=new mxCell(m(e.Carrier),new mxGeometry(.09*r,0,.2*r,p),"strokeColor=none;fillColor=none;");Db.vertex=!0;v.insert(Db);Db.style+=a(e.Carrier,G);v.style+=c(v.style,e,u,v);break;case "iOSSearchBar":v.value=m(e.Search);v.style+="strokeColor=none;";v.style+=c(v.style,e,u,v,G)+a(e.Search,G);var Ia=new mxCell("",+new mxGeometry(.3*r,.3*p,.4*p,.4*p),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");Ia.vertex=!0;v.insert(Ia);break;case "iOSNavBar":v.value=m(e.Title);v.style+="shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;"+a(e.Title,G);v.style+=c(v.style,e,u,v,G);Da=new mxCell(m(e.LeftText),new mxGeometry(.03*r,0,.3*r,p),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.LeftText,G);Db=new mxCell(m(e.RightText),new mxGeometry(.65*r,0,.3*+r,p),"strokeColor=none;fillColor=none;");Db.vertex=!0;v.insert(Db);Db.style+=a(e.RightText,G);Ia=new mxCell("",new mxGeometry(.02*r,.2*p,.3*p,.5*p),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;");Ia.vertex=!0;v.insert(Ia);break;case "iOSTabs":cc=parseInt(e.Tabs);Hb=r;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=c(v.style,e,u,v);0<cc&&(Hb/=cc);Ua=[];Pa=[];for(l=0;l<cc;l++)Ua[l]=new mxCell("",new mxGeometry(l*Hb,0,Hb,p),"strokeColor=none;"),Ua[l].vertex=!0,v.insert(Ua[l]),Ua[l].value=m(e["Tab_"+l]),Ua[l].style+=G?"overflow=block;blockSpacing=1;html=1;fontSize=13;"+mb:f(e["Tab_"+l])+k(e["Tab_"+l])+q(e["Tab_"+l])+t(e["Tab_"+l])+C(e["Tab_"+l])+I(e["Tab_"+l])+Q(e["Tab_"+l])+K(e["Tab_"+l])+L(e["Tab_"+l])+S(e["Tab_"+l]),Ua[l].style+="verticalAlign=bottom;",Ua[l].style=e.Selected==l?Ua[l].style+"fillColor=#BBBBBB;":Ua[l].style+"fillColor=none;";break;case "iOSDatePicker":var dc=new mxCell("",new mxGeometry(0,0,.5*r,.2*p),"strokeColor=none;fillColor=none;");dc.vertex=!0;v.insert(dc);dc.value=m(e.Option11);dc.style+=a(e.Option11,G);var ec=new mxCell("",new mxGeometry(.5*r,0,.15*r,.2*p),"strokeColor=none;fillColor=none;");ec.vertex=!0;v.insert(ec);ec.value=m(e.Option21);ec.style+=a(e.Option21,G);var fc=new mxCell("",new mxGeometry(.65*r,0,.15*r,.2*p),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=m(e.Option31);fc.style+=a(e.Option31,G);var gc=new mxCell("",new mxGeometry(0,.2*p,.5*r,.2*p),"strokeColor=none;fillColor=none;");gc.vertex=!0;v.insert(gc);gc.value=m(e.Option12);gc.style+=a(e.Option12,G);var hc=new mxCell("",new mxGeometry(.5*r,.2*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");hc.vertex=!0;v.insert(hc);hc.value=m(e.Option22);hc.style+=a(e.Option22,G);var ic=new mxCell("",new mxGeometry(.65*r,.2*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");ic.vertex=!0;v.insert(ic);ic.value=m(e.Option32);ic.style+=a(e.Option32,G);var rb=new mxCell("",new mxGeometry(0,.4*p,.5*r,.2*p),"strokeColor=none;fillColor=none;");rb.vertex=!0;v.insert(rb);rb.value=m(e.Option13);rb.style+=a(e.Option13,G);var sb=new mxCell("",new mxGeometry(.5*r,.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");sb.vertex=!0;v.insert(sb);sb.value=m(e.Option23);sb.style+=a(e.Option23,G);var jc=new mxCell("",new mxGeometry(.65*r,.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");jc.vertex=!0;v.insert(jc);jc.value=m(e.Option33);jc.style+=a(e.Option33,G);var tb=new mxCell("",new mxGeometry(.8*r,.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");tb.vertex=!0;v.insert(tb);tb.value=m(e.Option43);tb.style+=a(e.Option43,G);var ub=new mxCell("",new mxGeometry(0,.6*p,.5*r,.2*p),"strokeColor=none;fillColor=none;");ub.vertex=!0;v.insert(ub);ub.value=m(e.Option14);ub.style+=a(e.Option14,G);var kc=new mxCell("",new mxGeometry(.5*r,.6*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");kc.vertex=!0;v.insert(kc);kc.value=m(e.Option24);kc.style+=a(e.Option24,G);var lc=new mxCell("",new mxGeometry(.65*r,.6*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");lc.vertex=!0;v.insert(lc);lc.value=m(e.Option34);lc.style+=a(e.Option34,G);var mc=new mxCell("",new mxGeometry(.8*r,.6*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");mc.vertex=!0;v.insert(mc);mc.value=m(e.Option44);mc.style+=a(e.Option44,G);var vb=new mxCell("",new mxGeometry(0,.8*p,.5*r,.2*p),"strokeColor=none;fillColor=none;");vb.vertex=!0;v.insert(vb);vb.value=m(e.Option15);vb.style+=a(e.Option15,G);var nc=new mxCell("",new mxGeometry(.5*r,.8*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");nc.vertex=-!0;v.insert(nc);nc.value=m(e.Option25);nc.style+=a(e.Option25,G);var oc=new mxCell("",new mxGeometry(.65*r,.8*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");oc.vertex=!0;v.insert(oc);oc.value=m(e.Option35);oc.style+=a(e.Option35,G);Ab=new mxCell("",new mxGeometry(0,.4*p-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);Bb=new mxCell("",new mxGeometry(0,.6*p-2,r,4),"shape=line;strokeColor=#888888;");Bb.vertex=!0;v.insert(Bb);v.style+="strokeColor=none;";v.style+=b(v.style,e,u,+!0;v.insert(nc);nc.value=m(e.Option25);nc.style+=a(e.Option25,G);var oc=new mxCell("",new mxGeometry(.65*r,.8*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");oc.vertex=!0;v.insert(oc);oc.value=m(e.Option35);oc.style+=a(e.Option35,G);Ab=new mxCell("",new mxGeometry(0,.4*p-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);Bb=new mxCell("",new mxGeometry(0,.6*p-2,r,4),"shape=line;strokeColor=#888888;");Bb.vertex=!0;v.insert(Bb);v.style+="strokeColor=none;";v.style+=c(v.style,e,u,v);break;case "iOSTimePicker":dc=new mxCell("",new mxGeometry(0,0,.25*r,.2*p),"strokeColor=none;fillColor=none;");dc.vertex=!0;v.insert(dc);dc.value=m(e.Option11);dc.style+=a(e.Option11,G);ec=new mxCell("",new mxGeometry(.25*r,0,.3*r,.2*p),"strokeColor=none;fillColor=none;");ec.vertex=!0;v.insert(ec);ec.value=m(e.Option21);ec.style+=a(e.Option21,G);gc=new mxCell("",new mxGeometry(0,.2*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");gc.vertex=!0;v.insert(gc);gc.value=m(e.Option12);gc.style+=a(e.Option12,G);hc=new mxCell("",new mxGeometry(.25*r,.2*p,.3*r,.2*p),"strokeColor=none;fillColor=none;");hc.vertex=!0;v.insert(hc);hc.value=m(e.Option22);hc.style+=a(e.Option22,G);rb=new mxCell("",new mxGeometry(0,.4*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");rb.vertex=!0;v.insert(rb);rb.value=m(e.Option13);rb.style+=a(e.Option13,G);sb=new mxCell("",new mxGeometry(.25*r,.4*p,.3*r,.2*p),"strokeColor=none;fillColor=none;");sb.vertex=!0;v.insert(sb);sb.value=m(e.Option23);sb.style+=a(e.Option23,G);tb=new mxCell("",new mxGeometry(.7*r,.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");tb.vertex=!0;v.insert(tb);tb.value=m(e.Option33);tb.style+=a(e.Option33,G);ub=new mxCell("",new mxGeometry(0,.6*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");ub.vertex=!0;v.insert(ub);ub.value=m(e.Option14);ub.style+=a(e.Option14,G);kc=new mxCell("",new mxGeometry(.25*r,.6*p,.3*r,.2*p),"strokeColor=none;fillColor=none;");kc.vertex=!0;v.insert(kc);kc.value=m(e.Option24);kc.style+=a(e.Option24,G);mc=new mxCell("",new mxGeometry(.7*r,.6*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");mc.vertex=!0;v.insert(mc);mc.value=m(e.Option34);mc.style+=a(e.Option34,G);vb=new mxCell("",new mxGeometry(0,.8*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");vb.vertex=!0;v.insert(vb);vb.value=m(e.Option15);vb.style+=a(e.Option15,G);nc=new mxCell("",new mxGeometry(.25*r,.8*p,.3*r,.2*p),"strokeColor=none;fillColor=none;");nc.vertex=!0;v.insert(nc);nc.value=m(e.Option25);nc.style+=a(e.Option25,G);Ab=new mxCell("",new mxGeometry(0,.4*p-2,r,4),-"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);Bb=new mxCell("",new mxGeometry(0,.6*p-2,r,4),"shape=line;strokeColor=#888888;");Bb.vertex=!0;v.insert(Bb);v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);break;case "iOSCountdownPicker":fc=new mxCell("",new mxGeometry(.45*r,0,.2*r,.2*p),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=m(e.Option31);fc.style+=a(e.Option31,G);ic=new mxCell("",new mxGeometry(.45*r,.2*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");+"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);Bb=new mxCell("",new mxGeometry(0,.6*p-2,r,4),"shape=line;strokeColor=#888888;");Bb.vertex=!0;v.insert(Bb);v.style+="strokeColor=none;";v.style+=c(v.style,e,u,v);break;case "iOSCountdownPicker":fc=new mxCell("",new mxGeometry(.45*r,0,.2*r,.2*p),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=m(e.Option31);fc.style+=a(e.Option31,G);ic=new mxCell("",new mxGeometry(.45*r,.2*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");ic.vertex=!0;v.insert(ic);ic.value=m(e.Option32);ic.style+=a(e.Option32,G);rb=new mxCell("",new mxGeometry(0,.4*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");rb.vertex=!0;v.insert(rb);rb.value=m(e.Option13);rb.style+=a(e.Option13,G);sb=new mxCell("",new mxGeometry(.2*r,.4*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");sb.vertex=!0;v.insert(sb);sb.value=m(e.Option23);sb.style+=a(e.Option23,G);jc=new mxCell("",new mxGeometry(.45*r,.4*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");jc.vertex=!0;v.insert(jc);jc.value=m(e.Option33);jc.style+=a(e.Option33,G);tb=new mxCell("",new mxGeometry(.6*r,.4*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");tb.vertex=!0;v.insert(tb);tb.value=m(e.Option43);tb.style+=a(e.Option43,G);ub=new mxCell("",new mxGeometry(0,.6*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");ub.vertex=!0;v.insert(ub);ub.value=m(e.Option14);ub.style+=a(e.Option14,G);lc=new mxCell("",new mxGeometry(.45*r,.6*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");lc.vertex=!0;v.insert(lc);lc.value=m(e.Option34);lc.style+=a(e.Option34,G);vb=new mxCell("",new mxGeometry(0,.8*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");vb.vertex=!0;v.insert(vb);vb.value=m(e.Option15);vb.style+=a(e.Option15,G);oc=new mxCell("",new mxGeometry(.45*r,.8*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");oc.vertex=!0;v.insert(oc);oc.value=m(e.Option35);oc.style+=a(e.Option35,G);Ab=new mxCell("",new mxGeometry(0,.4*p-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);Bb=new mxCell("",new mxGeometry(0,-.6*p-2,r,4),"shape=line;strokeColor=#888888;");Bb.vertex=!0;v.insert(Bb);v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);break;case "iOSBasicCell":v.value=m(e.text);v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.75*e.SeparatorInset+";";v.style+=(G?"fontSize=13;":f(e.text)+q(e.text)+t(e.text))+R(e.text);v.style+=b(v.style,e,u,v,G);switch(e.AccessoryIndicatorType){case "Disclosure":Ia=new mxCell("",new mxGeometry(.91*+.6*p-2,r,4),"shape=line;strokeColor=#888888;");Bb.vertex=!0;v.insert(Bb);v.style+="strokeColor=none;";v.style+=c(v.style,e,u,v);break;case "iOSBasicCell":v.value=m(e.text);v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.75*e.SeparatorInset+";";v.style+=(G?"fontSize=13;":f(e.text)+q(e.text)+t(e.text))+R(e.text);v.style+=c(v.style,e,u,v,G);switch(e.AccessoryIndicatorType){case "Disclosure":Ia=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ia.vertex=!0;v.insert(Ia);break;case "DetailDisclosure":Ia=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ia.vertex=!0;v.insert(Ia);var ab=new mxCell("",new mxGeometry(.79*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ab.vertex=!0;v.insert(ab);break;case "DetailIndicator":ab=new mxCell("",new mxGeometry(.87*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ab.vertex=!0;v.insert(ab);break;case "CheckMark":Ia=new mxCell("",new mxGeometry(.89*r,.37*p,.4*p,.26*p),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ia.vertex=!0,v.insert(Ia)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=-G?"fontSize=13;":f(e.subtext)+q(e.subtext)+t(e.subtext);v.style+=b(v.style,e,u,v,G);var db=new mxCell("",new mxGeometry(0,.4*p,r,.6*p),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.75*e.SeparatorInset+";");db.vertex=!0;v.insert(db);db.value=m(e.text);db.style+=G?"html=1;fontSize=13;"+mb:f(e.text)+k(e.text)+q(e.text)+t(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ia=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");+G?"fontSize=13;":f(e.subtext)+q(e.subtext)+t(e.subtext);v.style+=c(v.style,e,u,v,G);var db=new mxCell("",new mxGeometry(0,.4*p,r,.6*p),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.75*e.SeparatorInset+";");db.vertex=!0;v.insert(db);db.value=m(e.text);db.style+=G?"html=1;fontSize=13;"+mb:f(e.text)+k(e.text)+q(e.text)+t(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ia=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ia.vertex=!0;v.insert(Ia);break;case "DetailDisclosure":Ia=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ia.vertex=!0;v.insert(Ia);ab=new mxCell("",new mxGeometry(.79*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ab.vertex=!0;v.insert(ab);break;case "DetailIndicator":ab=new mxCell("",new mxGeometry(.87*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");-ab.vertex=!0;v.insert(ab);break;case "CheckMark":Ia=new mxCell("",new mxGeometry(.89*r,.37*p,.4*p,.26*p),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ia.vertex=!0,v.insert(Ia)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=G?"fontSize=13;":f(e.subtext)+q(e.subtext)+t(e.subtext);v.style+=b(v.style,+ab.vertex=!0;v.insert(ab);break;case "CheckMark":Ia=new mxCell("",new mxGeometry(.89*r,.37*p,.4*p,.26*p),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ia.vertex=!0,v.insert(Ia)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=G?"fontSize=13;":f(e.subtext)+q(e.subtext)+t(e.subtext);v.style+=c(v.style,e,u,v,G);db=null;switch(e.AccessoryIndicatorType){case "Disclosure":Ia=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ia.vertex=!0;v.insert(Ia);db=new mxCell("",new mxGeometry(.55*r,0,.3*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailDisclosure":Ia=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ia.vertex=!0;v.insert(Ia);ab=new mxCell("",new mxGeometry(.79*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ab.vertex=!0;v.insert(ab);db=new mxCell("",new mxGeometry(.45*r,0,.3*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailIndicator":ab=new mxCell("",new mxGeometry(.87*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ab.vertex=!0;v.insert(ab);db=new mxCell("",new mxGeometry(.52*r,0,.3*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "CheckMark":Ia=new mxCell("",new mxGeometry(.89*r,.37*p,.4*p,.26*p),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;");Ia.vertex=!0;v.insert(Ia);db=new mxCell("",new mxGeometry(.55*r,0,.3*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;default:db=new mxCell("",new mxGeometry(.65*r,0,.3*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;")}db.vertex=!0;v.insert(db);db.value=m(e.text);db.style+=G?"html=1;fontSize=13;"+mb:f(e.text)+k(e.text)+-q(e.text)+t(e.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";v.style+=b(v.style,e,u,v);var Ub=new mxCell("",new mxGeometry(0,0,.25*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");Ub.vertex=!0;v.insert(Ub);Ub.value=m(e.subtext);Ub.style+=G?"html=1;fontSize=13;"+mb:f(e.subtext)+k(e.subtext)+q(e.subtext)+t(e.subtext);db=new mxCell("",new mxGeometry(.25*r,0,.5*r,p),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");+q(e.text)+t(e.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";v.style+=c(v.style,e,u,v);var Ub=new mxCell("",new mxGeometry(0,0,.25*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");Ub.vertex=!0;v.insert(Ub);Ub.value=m(e.subtext);Ub.style+=G?"html=1;fontSize=13;"+mb:f(e.subtext)+k(e.subtext)+q(e.subtext)+t(e.subtext);db=new mxCell("",new mxGeometry(.25*r,0,.5*r,p),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");db.vertex=!0;v.insert(db);db.value=m(e.text);db.style+=G?"html=1;fontSize=13;"+mb:f(e.text)+k(e.text)+q(e.text)+t(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ia=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ia.vertex=!0;v.insert(Ia);break;case "DetailDisclosure":Ia=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ia.vertex=!0;v.insert(Ia);ab=new mxCell("",new mxGeometry(.79*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ab.vertex=!0;v.insert(ab);break;case "DetailIndicator":ab=new mxCell("",new mxGeometry(.87*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ab.vertex=!0;v.insert(ab);break;case "CheckMark":Ia=new mxCell("",new mxGeometry(.89*r,.37*p,.4*p,.26*p),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ia.vertex=!0,v.insert(Ia)}break;case "iOSTableGroupedSectionBreak":v.style+="shape=partialRectangle;left=0;right=0;fillColor=#EFEFF4;strokeColor=#C8C7CC;";Da=new mxCell("",new mxGeometry(0,0,r,.4*p),"fillColor=none;strokeColor=none;spacing=10;align=left;");Da.vertex=!0;v.insert(Da);Da.value=m(e.text);Da.style+=G?"html=1;fontSize=13;"+mb:f(e.text)+k(e.text)+q(e.text)+t(e.text);Db=new mxCell("",new mxGeometry(0,.6*p,r,.4*p),"fillColor=none;strokeColor=none;spacing=10;align=left;");Db.vertex=!0;v.insert(Db);Db.value=m(e["bottom-text"]);Db.style+=G?"html=1;fontSize=13;"+mb:f(e["bottom-text"])+-k(e["bottom-text"])+q(e["bottom-text"])+t(e["bottom-text"]);break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.value=m(e.text);v.style+=G?"fontSize=13;":f(e.text)+q(e.text)+t(e.text);v.style+=b(v.style,e,u,v,G);break;case "SMPage":if(e.Group){v.style+="strokeColor=none;fillColor=none;";var x=new mxCell("",new mxGeometry(0,0,.9*r,.9*p),"rounded=1;arcSize=3;part=1;");x.vertex=!0;v.insert(x);x.style+=H(e,u)+Y(e,u)+M(e,u,x)+ca(e)+-oa(e);var E=new mxCell("",new mxGeometry(.1*r,.1*p,.9*r,.9*p),"rounded=1;arcSize=3;part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=H(e,u)+Y(e,u)+M(e,u,E)+ca(e)+oa(e)+a(e,G);e.Future&&(x.style+="dashed=1;fixDash=1;",E.style+="dashed=1;fixDash=1;")}else v.style+="rounded=1;arcSize=3;",e.Future&&(v.style+="dashed=1;fixDash=1;"),v.value=m(e.Text),v.style+=H(e,u)+Y(e,u)+M(e,u,v)+ca(e)+oa(e)+a(e,G);v.style+=b(v.style,e,u,v,G);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":x=+k(e["bottom-text"])+q(e["bottom-text"])+t(e["bottom-text"]);break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.value=m(e.text);v.style+=G?"fontSize=13;":f(e.text)+q(e.text)+t(e.text);v.style+=c(v.style,e,u,v,G);break;case "SMPage":if(e.Group){v.style+="strokeColor=none;fillColor=none;";var x=new mxCell("",new mxGeometry(0,0,.9*r,.9*p),"rounded=1;arcSize=3;part=1;");x.vertex=!0;v.insert(x);x.style+=H(e,u)+Y(e,u)+M(e,u,x)+ca(e)++oa(e);var E=new mxCell("",new mxGeometry(.1*r,.1*p,.9*r,.9*p),"rounded=1;arcSize=3;part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=H(e,u)+Y(e,u)+M(e,u,E)+ca(e)+oa(e)+a(e,G);e.Future&&(x.style+="dashed=1;fixDash=1;",E.style+="dashed=1;fixDash=1;")}else v.style+="rounded=1;arcSize=3;",e.Future&&(v.style+="dashed=1;fixDash=1;"),v.value=m(e.Text),v.style+=H(e,u)+Y(e,u)+M(e,u,v)+ca(e)+oa(e)+a(e,G);v.style+=c(v.style,e,u,v,G);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":x=null;switch(w.Class){case "SMHome":x=new mxCell("",new mxGeometry(.5*r-.4*p,.1*p,.8*p,.8*p),"part=1;shape=mxgraph.office.concepts.home;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMPrint":x=new mxCell("",new mxGeometry(.5*r-.4*p,.19*p,.8*p,.62*p),"part=1;shape=mxgraph.office.devices.printer;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSearch":x=new mxCell("",new mxGeometry(.5*r-.4*p,.1*p,.8*p,.8*p),"part=1;shape=mxgraph.office.concepts.search;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSettings":x=new mxCell("",new mxGeometry(.5*r-.35*p,.15*p,.7*p,.7*p),"part=1;shape=mxgraph.mscae.enterprise.settings;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSitemap":x=new mxCell("",new mxGeometry(.5*r-.35*p,.2*p,.7*p,.6*p),"part=1;shape=mxgraph.office.sites.site_collection;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSuccess":x=new mxCell("",new mxGeometry(.5*r-.3*p,.25*p,.6*p,.5*p),"part=1;shape=mxgraph.mscae.general.checkmark;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMVideo":x=new mxCell("",new mxGeometry(.5*r-.4*p,.2*p,.8*p,.6*p),"part=1;shape=mxgraph.office.concepts.video_play;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMAudio":x=new mxCell("",new mxGeometry(.5*r-.3*p,.2*p,.6*p,.6*p),"part=1;shape=mxgraph.mscae.general.audio;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMCalendar":x=new mxCell("",new mxGeometry(.5*r-.4*p,.15*p,.8*p,.7*p),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMChart":var Z=Y(e,u);Z=""==Z?"#ffffff;":Z.replace("fillColor=","");x=new mxCell("",new mxGeometry(.5*r-.35*p,.15*p,.7*p,.7*p),"part=1;shape=mxgraph.ios7.icons.pie_chart;fillColor=#e6e6e6;fillOpacity=50;strokeWidth=4;strokeColor="+Z);break;case "SMCloud":x=new mxCell("",new mxGeometry(.5*r-.4*p,.27*p,.8*p,.46*p),"part=1;shape=mxgraph.networks.cloud;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMDocument":x=new mxCell("",new mxGeometry(.5*r-.25*p,.15*p,.5*p,.7*p),"part=1;shape=mxgraph.mscae.enterprise.document;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMForm":x=new mxCell("",new mxGeometry(.5*r-.4*p,.15*p,.8*p,.7*p),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMGame":x=new mxCell("",new mxGeometry(.5*r-.4*p,.2*p,.8*p,.6*p),"part=1;shape=mxgraph.mscae.general.game_controller;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMUpload":x=new mxCell("",new mxGeometry(.5*r-.4*p,.2*p,.8*p,.6*p),"part=1;shape=mxgraph.mscae.enterprise.backup_online;fillColor=#e6e6e6;opacity=50;strokeColor=none;")}x.vertex=-!0;v.insert(x);x.value=m(e.Text);x.style+=a(e,G);v.style+=b(v.style,e,u,v);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;";x=new mxCell("",new mxGeometry(.1*r,0,.9*r,.9*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(0,.1*p,.9*r,.9*p),"part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=a(e.Text,G);E.style+=b(E.style,e,u,E,G);break;case "UMLConstraintBlock":var Cc=new mxCell("",new mxGeometry(0,0,.25*p,p),"shape=curlyBracket;rounded=1;");-Cc.vertex=!0;v.insert(Cc);var Dc=new mxCell("",new mxGeometry(r-.25*p,0,.25*p,p),"shape=curlyBracket;rounded=1;flipH=1;");Dc.vertex=!0;v.insert(Dc);pa=new mxCell("",new mxGeometry(.25*p,0,r-.5*p,p),"strokeColor=none;fillColor=none;");pa.vertex=!0;pa.value=m(e);v.insert(pa);v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);Cc.style+=M(e,u,Cc);Dc.style+=M(e,u,Dc);pa.style+=q(e,pa);Cc.style+=b(Cc.style,e,u,Cc);Dc.style+=b(Dc.style,e,u,Dc);pa.style+=b(pa.style,e,u,pa,G);break;case "UMLTextBlock":v.value=-m(e.Text);v.style+="strokeColor=none;"+a(e.Text,G);v.style+=b(v.style,e,u,v,G);break;case "UMLProvidedInterfaceBlock":case "UMLProvidedInterfaceBlockV2":nb=T(e,u,v);e.Rotatio=null;var Vb=b(v.style,e,u,v,G);-1==Vb.indexOf(mxConstants.STYLE_STROKEWIDTH)&&(Vb=mxConstants.STYLE_STROKEWIDTH+"=1;"+Vb);v.style="group;dropTarget=0;pointerEvents=0;"+nb;var Ud=.8*r,Ff=r-Ud,Rc=new mxCell("",new mxGeometry(.2,0,Ud,p),"shape=ellipse;"+Vb);Rc.vertex=!0;Rc.geometry.relative=!0;v.insert(Rc);Pa=new mxCell("",new mxGeometry(0,-.5,Ff,1),"line;"+Vb);Pa.geometry.relative=!0;Pa.vertex=!0;v.insert(Pa);break;case "UMLComponentBoxBlock":case "UMLComponentBoxBlockV2":v.value=m(e);v.style="html=1;dropTarget=0;"+b(v.style,e,u,v,G);var ob=new mxCell("",new mxGeometry(1,0,15,15),"shape=component;jettyWidth=8;jettyHeight=4;");ob.geometry.relative=!0;ob.geometry.offset=new mxPoint(-20,5);ob.vertex=!0;v.insert(ob);break;case "UMLAssemblyConnectorBlock":case "UMLAssemblyConnectorBlockV2":nb=T(e,u,v);e.Rotatio=null;Vb=b(v.style,e,u,v,G);+!0;v.insert(x);x.value=m(e.Text);x.style+=a(e,G);v.style+=c(v.style,e,u,v);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;";x=new mxCell("",new mxGeometry(.1*r,0,.9*r,.9*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);E=new mxCell("",new mxGeometry(0,.1*p,.9*r,.9*p),"part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=a(e.Text,G);E.style+=c(E.style,e,u,E,G);break;case "UMLConstraintBlock":var Cc=new mxCell("",new mxGeometry(0,0,.25*p,p),"shape=curlyBracket;rounded=1;");+Cc.vertex=!0;v.insert(Cc);var Dc=new mxCell("",new mxGeometry(r-.25*p,0,.25*p,p),"shape=curlyBracket;rounded=1;flipH=1;");Dc.vertex=!0;v.insert(Dc);pa=new mxCell("",new mxGeometry(.25*p,0,r-.5*p,p),"strokeColor=none;fillColor=none;");pa.vertex=!0;pa.value=m(e);v.insert(pa);v.style="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,u,v);Cc.style+=M(e,u,Cc);Dc.style+=M(e,u,Dc);pa.style+=q(e,pa);Cc.style+=c(Cc.style,e,u,Cc);Dc.style+=c(Dc.style,e,u,Dc);pa.style+=c(pa.style,e,u,pa,G);break;case "UMLTextBlock":v.value=+m(e.Text);v.style+="strokeColor=none;"+a(e.Text,G);v.style+=c(v.style,e,u,v,G);break;case "UMLProvidedInterfaceBlock":case "UMLProvidedInterfaceBlockV2":nb=T(e,u,v);e.Rotatio=null;var Vb=c(v.style,e,u,v,G);-1==Vb.indexOf(mxConstants.STYLE_STROKEWIDTH)&&(Vb=mxConstants.STYLE_STROKEWIDTH+"=1;"+Vb);v.style="group;dropTarget=0;pointerEvents=0;"+nb;var Ud=.8*r,Ff=r-Ud,Rc=new mxCell("",new mxGeometry(.2,0,Ud,p),"shape=ellipse;"+Vb);Rc.vertex=!0;Rc.geometry.relative=!0;v.insert(Rc);Pa=new mxCell("",new mxGeometry(0,+.5,Ff,1),"line;"+Vb);Pa.geometry.relative=!0;Pa.vertex=!0;v.insert(Pa);break;case "UMLComponentBoxBlock":case "UMLComponentBoxBlockV2":v.value=m(e);v.style="html=1;dropTarget=0;"+c(v.style,e,u,v,G);var ob=new mxCell("",new mxGeometry(1,0,15,15),"shape=component;jettyWidth=8;jettyHeight=4;");ob.geometry.relative=!0;ob.geometry.offset=new mxPoint(-20,5);ob.vertex=!0;v.insert(ob);break;case "UMLAssemblyConnectorBlock":case "UMLAssemblyConnectorBlockV2":nb=T(e,u,v);e.Rotatio=null;Vb=c(v.style,e,u,v,G);-1==Vb.indexOf(mxConstants.STYLE_STROKEWIDTH)&&(Vb=mxConstants.STYLE_STROKEWIDTH+"=1;"+Vb);v.style="group;dropTarget=0;pointerEvents=0;"+nb;var Se=.225*r,Te=.1*r;Ud=r-Se-Te;Rc=new mxCell("",new mxGeometry(.225,0,Ud,p),"shape=providedRequiredInterface;verticalLabelPosition=bottom;"+Vb);Rc.vertex=!0;Rc.geometry.relative=!0;v.insert(Rc);Ab=new mxCell("",new mxGeometry(0,.5,Se,1),"line;"+Vb);Ab.geometry.relative=!0;Ab.vertex=!0;v.insert(Ab);Bb=new mxCell("",new mxGeometry(.9,.5,Te,1),"line;"+Vb);Bb.geometry.relative=!0;Bb.vertex=!0;v.insert(Bb);break;case "BPMNActivity":v.value=m(e.Text);switch(e.bpmnActivityType){case 1:v.style+=a(e.Text,G);break;case 2:v.style+="shape=ext;double=1;"+a(e.Text,G);break;case 3:v.style+="shape=ext;dashed=1;dashPattern=2 5;"+a(e.Text,G);break;case 4:v.style+="shape=ext;strokeWidth=2;"+a(e.Text,G)}if(0!=e.bpmnTaskType){switch(e.bpmnTaskType){case 1:x=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");x.geometry.offset=new mxPoint(4,7);break;case 2:x=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");x.geometry.offset=new mxPoint(4,7);break;case 3:x=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");x.geometry.offset=new mxPoint(4,5);break;case 4:x=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");x.geometry.offset=new mxPoint(4,7);break;case 5:x=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");x.geometry.offset=new mxPoint(4,7);break;case 6:x=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");@@ -14498,175 +14498,175 @@ x.geometry.offset=new mxPoint(4,5);break;case 7:x=new mxCell("",new mxGeometry(0x.geometry.offset=new mxPoint(Eb,-20);x.style+=Y(e,u)+H(e,u);break;case 4:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");x.geometry.offset=new mxPoint(Eb,-20);x.style+=Y(e,u)+H(e,u);break;case 5:x=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");x.geometry.offset=new mxPoint(Eb,-17);Z=H(e,u);Z=Z.replace("strokeColor","fillColor");""==Z&&(Z="fillColor=#000000;");x.style+=Z;break;case 6:x=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),x.geometry.offset=new mxPoint(Eb,-18),x.style+=Y(e,u)+H(e,u)}x.geometry.relative=!0;x.vertex=!0;v.insert(x)}2==Cd&&(Eb=5);if(0!=e.bpmnActivityMarker2){switch(e.bpmnActivityMarker2){case 1:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");x.geometry.offset=new mxPoint(Eb,-20);x.style+=Y(e,u)+H(e,u);break;case 2:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");x.geometry.offset=new mxPoint(Eb,-20);x.style+=Y(e,u)+H(e,u);break;case 3:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");x.geometry.offset=new mxPoint(Eb,-20);x.style+=Y(e,u)+H(e,u);break;case 4:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");x.geometry.offset=new mxPoint(Eb,-20);x.style+=Y(e,u)+H(e,u);break;case 5:x=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");x.geometry.offset=new mxPoint(Eb,-17);Z=H(e,-u);Z=Z.replace("strokeColor","fillColor");""==Z&&(Z="fillColor=#000000;");x.style+=Z;break;case 6:x=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),x.geometry.offset=new mxPoint(Eb,-18),x.style+=Y(e,u)+H(e,u)}x.geometry.relative=!0;x.vertex=!0;v.insert(x)}v.style+=b(v.style,e,u,v);break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);if(1==e.bpmnDashed)switch(e.bpmnEventGroup){case 0:v.style+=+u);Z=Z.replace("strokeColor","fillColor");""==Z&&(Z="fillColor=#000000;");x.style+=Z;break;case 6:x=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),x.geometry.offset=new mxPoint(Eb,-18),x.style+=Y(e,u)+H(e,u)}x.geometry.relative=!0;x.vertex=!0;v.insert(x)}v.style+=c(v.style,e,u,v);break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);if(1==e.bpmnDashed)switch(e.bpmnEventGroup){case 0:v.style+="outline=eventNonint;";break;case 1:v.style+="outline=boundNonint;";break;case 2:v.style+="outline=end;"}else switch(e.bpmnEventGroup){case 0:v.style+="outline=standard;";break;case 1:v.style+="outline=throwing;";break;case 2:v.style+="outline=end;"}switch(e.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;";break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;";break;case 12:v.style+="symbol=terminate;"}v.style+=b(v.style,e,u,v,G);break;case "BPMNChoreography":try{var ja=P(e.FillColor),ke=Sd(ja,.75),Kc=f(e.Name).match(/\d+/),eb=Math.max(mxUtils.getSizeForString(e.Name.t,Kc?Kc[0]:"13",null,r-10).height,24);ja="swimlaneFillColor="+ke+";";v.value=-m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ja+"startSize="+eb+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Name,G);v.style+=b(v.style,e,u,v,G);var Wb=eb;Kc=f(e.TaskName).match(/\d+/);var pc=e.TaskHeight?.75*e.TaskHeight:Math.max(mxUtils.getSizeForString(e.TaskName.t,Kc?Kc[0]:"13",null,r-10).height+15,24),Ec=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");-Ec.value=m(e.TaskName);Ec.vertex=!0;v.insert(Ec);Ec.style+=a(e.TaskName,G);Ec.style+=b(Ec.style,e,u,Ec,G);Wb+=pc;X=[];for(l=0;l<e.Fields;l++){var Vd=e["Participant"+(l+1)];Kc=f(Vd).match(/\d+/);pc=Math.max(mxUtils.getSizeForString(Vd.t,Kc?Kc[0]:"13",null,r-10).height,24);X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;fillColor=none;spacingTop=-1;spacingLeft=3;spacingRight=3;");Wb+=pc;X[l].vertex=!0;v.insert(X[l]);X[l].style+=a(Vd,G);X[l].style+=b(X[l].style,e,u,X[l],G);-X[l].value=m(Vd)}}catch(hb){console.log(hb)}break;case "BPMNConversation":v.style+="shape=hexagon;perimeter=hexagonPerimeter2;";v.value=m(e.Text);v.style=0==e.bpmnConversationType?v.style+oa(e):v.style+"strokeWidth=2;";e.bpmnIsSubConversation&&(x=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),x.geometry.offset=new mxPoint(-6,-17),x.style+=Y(e,u)+H(e,u),x.geometry.relative=!0,x.vertex=!0,v.insert(x));v.style+=b(v.style,e,u,v,G);break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;verticalLabelPosition=bottom;verticalAlign=top;";-switch(e.bpmnGatewayType){case 0:v.style+="outline=none;symbol=general;";break;case 1:v.style+="outline=none;symbol=exclusiveGw;";break;case 2:v.style+="outline=catching;symbol=multiple;";break;case 3:v.style+="outline=none;symbol=parallelGw;";break;case 4:v.style+="outline=end;symbol=general;";break;case 5:v.style+="outline=standard;symbol=multiple;";break;case 6:v.style+="outline=none;symbol=complexGw;";break;case 7:v.style+="outline=standard;symbol=parallelMultiple;"}v.style+=b(v.style,e,u,v);+break;case 7:v.style+="symbol=cancel;";break;case 8:v.style+="symbol=compensation;";break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;";break;case 12:v.style+="symbol=terminate;"}v.style+=c(v.style,e,u,v,G);break;case "BPMNChoreography":try{var ja=P(e.FillColor),ke=Sd(ja,.75),Kc=f(e.Name).match(/\d+/),eb=Math.max(mxUtils.getSizeForString(e.Name.t,Kc?Kc[0]:"13",null,r-10).height,24);ja="swimlaneFillColor="+ke+";";v.value=+m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ja+"startSize="+eb+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Name,G);v.style+=c(v.style,e,u,v,G);var Wb=eb;Kc=f(e.TaskName).match(/\d+/);var pc=e.TaskHeight?.75*e.TaskHeight:Math.max(mxUtils.getSizeForString(e.TaskName.t,Kc?Kc[0]:"13",null,r-10).height+15,24),Ec=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");+Ec.value=m(e.TaskName);Ec.vertex=!0;v.insert(Ec);Ec.style+=a(e.TaskName,G);Ec.style+=c(Ec.style,e,u,Ec,G);Wb+=pc;X=[];for(l=0;l<e.Fields;l++){var Vd=e["Participant"+(l+1)];Kc=f(Vd).match(/\d+/);pc=Math.max(mxUtils.getSizeForString(Vd.t,Kc?Kc[0]:"13",null,r-10).height,24);X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;fillColor=none;spacingTop=-1;spacingLeft=3;spacingRight=3;");Wb+=pc;X[l].vertex=!0;v.insert(X[l]);X[l].style+=a(Vd,G);X[l].style+=c(X[l].style,e,u,X[l],G);+X[l].value=m(Vd)}}catch(hb){console.log(hb)}break;case "BPMNConversation":v.style+="shape=hexagon;perimeter=hexagonPerimeter2;";v.value=m(e.Text);v.style=0==e.bpmnConversationType?v.style+oa(e):v.style+"strokeWidth=2;";e.bpmnIsSubConversation&&(x=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),x.geometry.offset=new mxPoint(-6,-17),x.style+=Y(e,u)+H(e,u),x.geometry.relative=!0,x.vertex=!0,v.insert(x));v.style+=c(v.style,e,u,v,G);break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;verticalLabelPosition=bottom;verticalAlign=top;";+switch(e.bpmnGatewayType){case 0:v.style+="outline=none;symbol=general;";break;case 1:v.style+="outline=none;symbol=exclusiveGw;";break;case 2:v.style+="outline=catching;symbol=multiple;";break;case 3:v.style+="outline=none;symbol=parallelGw;";break;case 4:v.style+="outline=end;symbol=general;";break;case 5:v.style+="outline=standard;symbol=multiple;";break;case 6:v.style+="outline=none;symbol=complexGw;";break;case 7:v.style+="outline=standard;symbol=parallelMultiple;"}v.style+=c(v.style,e,u,v);v.value=m(e.Text);v.style+=a(e,G);break;case "BPMNData":v.style+="shape=note;size=14;";switch(e.bpmnDataType){case 0:v.value=m(e.Text);e.Text&&!e.Text.t&&(e.Text.t=" ");break;case 1:x=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");x.geometry.offset=new mxPoint(-6,-15);x.style+=Y(e,u)+H(e,u);x.geometry.relative=!0;x.vertex=!0;v.insert(x);break;case 2:x=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");x.geometry.offset=new mxPoint(3,3);x.style+=Y(e,u)+H(e,u);x.geometry.relative=!0;x.vertex=!0;v.insert(x);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";Da=new mxCell("",new mxGeometry(0,0,r,20),"strokeColor=none;fillColor=none;");Da.geometry.offset=new mxPoint(0,14);Da.geometry.relative=!0;Da.vertex=!0;v.insert(Da);Da.value=m(e.Text);Da.style+=a(e,G);break;case 3:x=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),x.geometry.offset=new mxPoint(3,3),x.style+=H(e,u),x.geometry.relative=-!0,x.vertex=!0,v.insert(x),Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),x.style+=Z,Da=new mxCell("",new mxGeometry(0,0,r,20),"strokeColor=none;fillColor=none;"),Da.geometry.offset=new mxPoint(0,14),Da.geometry.relative=!0,Da.vertex=!0,v.insert(Da),Da.value=m(e.Text),Da.style+=a(e,G)}v.style+=b(v.style,e,u,v);break;case "BPMNBlackPool":v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,r,p),"fillColor=#000000;strokeColor=none;opacity=30;");-x.vertex=!0;v.insert(x);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=new mxCell("",new mxGeometry(0,0,.95*r,.95*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.05*r,.05*p,.95*r,.95*p),"part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=a(e.Text,G);E.style+=b(E.style,e,u,E,G);break;case "GSDFDDataStoreBlock":v.value=m(e.Text);v.style+="shape=partialRectangle;right=0;"+a(e.Text,G);-v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,.2*r,p),"part=1;");x.vertex=!0;v.insert(x);x.value=m(e.Number);x.style+=a(e.Number,G);x.style+=b(x.style,e,u,x,G);break;case "OrgBlock":var Ue="";for(Fa in e.Active)"Photo"!=Fa&&e.Active[Fa]&&(Ue+=m(e[Fa],!0));if(e.Active.Photo){var le=.4*r;v.style+="spacingLeft="+le+";imageWidth="+(le-4)+";imageHeight="+(le-4)+";imageAlign=left;imageVerticalAlign=top;image="+g(e.Photo)}v.value=Ue;v.style+=b(v.style,e,u,v,!0);break;case "DefaultTableBlock":try{Gb=+!0,x.vertex=!0,v.insert(x),Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),x.style+=Z,Da=new mxCell("",new mxGeometry(0,0,r,20),"strokeColor=none;fillColor=none;"),Da.geometry.offset=new mxPoint(0,14),Da.geometry.relative=!0,Da.vertex=!0,v.insert(Da),Da.value=m(e.Text),Da.style+=a(e,G)}v.style+=c(v.style,e,u,v);break;case "BPMNBlackPool":v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,r,p),"fillColor=#000000;strokeColor=none;opacity=30;");+x.vertex=!0;v.insert(x);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,u,v);x=new mxCell("",new mxGeometry(0,0,.95*r,.95*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);E=new mxCell("",new mxGeometry(.05*r,.05*p,.95*r,.95*p),"part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=a(e.Text,G);E.style+=c(E.style,e,u,E,G);break;case "GSDFDDataStoreBlock":v.value=m(e.Text);v.style+="shape=partialRectangle;right=0;"+a(e.Text,G);+v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,.2*r,p),"part=1;");x.vertex=!0;v.insert(x);x.value=m(e.Number);x.style+=a(e.Number,G);x.style+=c(x.style,e,u,x,G);break;case "OrgBlock":var Ue="";for(Fa in e.Active)"Photo"!=Fa&&e.Active[Fa]&&(Ue+=m(e[Fa],!0));if(e.Active.Photo){var le=.4*r;v.style+="spacingLeft="+le+";imageWidth="+(le-4)+";imageHeight="+(le-4)+";imageAlign=left;imageVerticalAlign=top;image="+g(e.Photo)}v.value=Ue;v.style+=c(v.style,e,u,v,!0);break;case "DefaultTableBlock":try{Gb=e.RowHeights.length;Rb=e.ColWidths.length;var Wd=[],Dd=[];for(l=0;l<Gb;l++)Wd[l]=.75*e.RowHeights[l];for(ha=0;ha<Rb;ha++)Dd[ha]=.75*e.ColWidths[ha];v.style="group;dropTarget=0;pointerEvents=0;";var me=e.BandedColor1,ne=e.BandedColor2,Gf=e.BandedRows,Ve=e.BandedCols,Xd=e.HideH,Hf=e.HideV,We=e.TextVAlign,Xe=e.FillColor,Ye=e.StrokeStyle;delete e.StrokeStyle;var If=ea(Xe,"fillOpacity"),Ze=e.LineColor,Jf=ea(Ze,"strokeOpacity");ba=0;var Ed={};for(l=0;l<Gb;l++){aa=0;p=Wd[l];for(ha=0;ha<Rb;ha++){var Mb=l+","+ha;if(Ed[Mb])aa+=Dd[ha];else{var lb=e["CellFill_"+Mb],oe=e["NoBand_"+Mb],Yd=e["CellSize_"+Mb],qc=e["Cell_"+Mb],$e=e["Cell_"+Mb+"_VAlign"],Kf=e["Cell_"+Mb+"_TRotation"],Lf=e["CellBorderWidthH_"+Mb],Mf=e["CellBorderColorH_"+Mb],Nf=e["CellBorderStrokeStyleH_"+Mb],Of=e["CellBorderWidthV_"+Mb],Pf=e["CellBorderColorV_"+Mb],Qf=e["CellBorderStrokeStyleV_"+Mb],af=Xd?Pf:Mf,bf=ea(af,"strokeOpacity"),cf=Xd?Of:Lf,Tc=Xd?Qf:Nf;lb=Gf&&!oe?0==l%2?me:Ve&&!oe?0==ha%2?me:ne:ne:Ve&&!oe?0==ha%2?me:ne:lb;var Rf=ea(lb,"fillOpacity")||If;r=Dd[ha];var df=p;Zc=r;for(var Nb=l+1;Nb<l+Yd.h;Nb++)if(null!=Wd[Nb]){df+=Wd[Nb];Ed[Nb+","+ha]=!0;for(var Uc=ha+1;Uc<ha+Yd.w;Uc++)Ed[Nb+","+Uc]=!0}for(Nb=ha+1;Nb<ha+Yd.w;Nb++)if(null!=Dd[Nb])for(Zc+=Dd[Nb],Ed[l+","+Nb]=!0,Uc=l+1;Uc<l+Yd.h;Uc++)Ed[Uc+","+Nb]=!0;var qa=new mxCell("",new mxGeometry(aa,ba,Zc,df),"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;"+(Hf?"left=0;right=0;":"")+(Xd?"top=0;bottom=0;":"")+Y({FillColor:lb||Xe})+Zb(mxConstants.STYLE_STROKECOLOR,P(af),-P(Ze))+(null!=cf?Zb(mxConstants.STYLE_STROKEWIDTH,Math.round(.75*parseFloat(cf)),"1"):"")+(bf?bf:Jf)+Rf+"verticalAlign="+($e?$e:We?We:"middle")+";"+sa({StrokeStyle:Tc?Tc:Ye?Ye:"solid"})+(Kf?"horizontal=0;":""));qa.vertex=!0;qa.value=m(qc);qa.style+=b(qa.style,e,u,qa,G)+(G?"fontSize=13;":f(qc)+q(qc)+t(qc)+C(qc,qa)+I(qc)+Q(qc)+K(qc)+L(qc))+S(qc)+R(qc);v.insert(qa);aa+=r}}ba+=p}}catch(hb){console.log(hb)}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";-"VSMDedicatedProcessBlock"==w.Class?v.value=m(e.Text):"VSMProductionControlBlock"==w.Class&&(v.value=m(e.Resources));v.style+=b(v.style,e,u,v,G);"VSMDedicatedProcessBlock"==w.Class&&(x=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),x.geometry.relative=!0,x.geometry.offset=new mxPoint(4,-13),x.vertex=!0,v.insert(x),x.style+=b(x.style,e,u,x));Da=new mxCell("",new mxGeometry(0,0,r,15),"strokeColor=none;fillColor=none;part=1;");Da.vertex=!0;v.insert(Da);Da.value=-m(e.Title);Da.style+=a(e.Title,G);e.Text=null;break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);Da=new mxCell("",new mxGeometry(.1*r,.3*p,.8*r,.6*p),"part=1;");Da.vertex=!0;v.insert(Da);Da.value=m(e.Resource);Da.style+=a(e.Resource,G);Da.style+=b(Da.style,e,u,Da,G);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";-v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);Cb=p;bc=parseInt(e.Cells);ja=b("part=1;",e,u,v);0<bc&&(Cb/=bc);X=[];Pa=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(0,(l-1)*Cb,r,Cb),ja),X[l].vertex=!0,v.insert(X[l]),X[l].value=m(e["cell_"+l]),X[l].style+=a(e["cell_"+l],G);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";-v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);Cb=p;bc=parseInt(e.Cells);ja=b("part=1;fillColor=none;",e,u,v);0<bc&&(Cb/=bc);X=[];Ub=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(.5*r,(l-1)*Cb,.5*r,Cb),"shape=partialRectangle;left=0;"+ja),X[l].vertex=!0,v.insert(X[l]),Ub[l]=new mxCell("",new mxGeometry(0,(l-1)*Cb,r,Cb),"strokeColor=none;fillColor=none;part=1;"),Ub[l].vertex=!0,v.insert(Ub[l]),Ub[l].value=-m(e["cell_"+l]),Ub[l].style+=a(e["cell_"+l],G);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18";v.style+=b(v.style,e,u,v);v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.17*r,.2*p,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");x.vertex=!0;v.insert(x);-x.style+=b(x.style,e,u,x);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";ja="shape=card;size=18;flipH=1;part=1;";x=new mxCell("",new mxGeometry(.1*r,0,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ja);x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.05*r,.1*p,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ja);E.vertex=!0;v.insert(E);E.style+=b(E.style,-e,u,E);var U=new mxCell("",new mxGeometry(0,.2*p,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+ja);U.vertex=!0;v.insert(U);U.value=m(e.Text);U.style+=b(U.style,e,u,U,G);break;case "VSMElectronicInformationArrow":v.style="group;";v.value=m(e.Title);v.style+=a(e.Title,G);var va=new mxCell("",new mxGeometry(0,0,r,p),"shape=mxgraph.lean_mapping.electronic_info_flow_edge;html=1;entryX=0;entryY=1;exitX=1;exitY=0;");va.edge=!0;va.geometry.relative=-1;D.addCell(va,v,null,v,v);break;case "AWSRoundedRectangleContainerBlock2":case "AWSRoundedRectangleContainerBlock":v.style+="strokeColor=none;fillColor=none;";e.Spotfleet?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,35,40),-"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.Beanstalk?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,30,40),"strokeColor=none;shape=mxgraph.aws3.elastic_beanstalk;fillColor=#759C3E;"),-E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.EC2?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),E.geometry.relative=-!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.Subnet?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.permissions;fillColor=#146EB4;"),E.geometry.relative=!0,E.geometry.offset=-new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.VPC?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.virtual_private_cloud;fillColor=#146EB4;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,-0),E.vertex=!0,v.insert(E)):e.AWS?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):-e.Corporate?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):-(v.style="resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;",v.value=m(e.Title),v.style+=b(v.style,e,u,v,G));break;case "AWSElasticComputeCloudBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.ec2;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "AWSRoute53Block2":v.style+="strokeColor=none;shape=mxgraph.aws3.route_53;verticalLabelPosition=bottom;align=center;verticalAlign=top;";-v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "AWSRDBSBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.rds;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";qa=new mxCell("",new mxGeometry(.25*r,.25*p,.5*r,.5*p),"ellipse;html=1;strokeColor=#29AAE1;strokeWidth=2;");qa.vertex=!0;v.insert(qa);var Na=[qa];qa.style+=Y(e,u);va=new mxCell("",new mxGeometry(0,+P(Ze))+(null!=cf?Zb(mxConstants.STYLE_STROKEWIDTH,Math.round(.75*parseFloat(cf)),"1"):"")+(bf?bf:Jf)+Rf+"verticalAlign="+($e?$e:We?We:"middle")+";"+sa({StrokeStyle:Tc?Tc:Ye?Ye:"solid"})+(Kf?"horizontal=0;":""));qa.vertex=!0;qa.value=m(qc);qa.style+=c(qa.style,e,u,qa,G)+(G?"fontSize=13;":f(qc)+q(qc)+t(qc)+C(qc,qa)+I(qc)+Q(qc)+K(qc)+L(qc))+S(qc)+R(qc);v.insert(qa);aa+=r}}ba+=p}}catch(hb){console.log(hb)}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";+"VSMDedicatedProcessBlock"==w.Class?v.value=m(e.Text):"VSMProductionControlBlock"==w.Class&&(v.value=m(e.Resources));v.style+=c(v.style,e,u,v,G);"VSMDedicatedProcessBlock"==w.Class&&(x=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),x.geometry.relative=!0,x.geometry.offset=new mxPoint(4,-13),x.vertex=!0,v.insert(x),x.style+=c(x.style,e,u,x));Da=new mxCell("",new mxGeometry(0,0,r,15),"strokeColor=none;fillColor=none;part=1;");Da.vertex=!0;v.insert(Da);Da.value=+m(e.Title);Da.style+=a(e.Title,G);e.Text=null;break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);Da=new mxCell("",new mxGeometry(.1*r,.3*p,.8*r,.6*p),"part=1;");Da.vertex=!0;v.insert(Da);Da.value=m(e.Resource);Da.style+=a(e.Resource,G);Da.style+=c(Da.style,e,u,Da,G);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";+v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,u,v);Cb=p;bc=parseInt(e.Cells);ja=c("part=1;",e,u,v);0<bc&&(Cb/=bc);X=[];Pa=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(0,(l-1)*Cb,r,Cb),ja),X[l].vertex=!0,v.insert(X[l]),X[l].value=m(e["cell_"+l]),X[l].style+=a(e["cell_"+l],G);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";+v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=c(v.style,e,u,v);Cb=p;bc=parseInt(e.Cells);ja=c("part=1;fillColor=none;",e,u,v);0<bc&&(Cb/=bc);X=[];Ub=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(.5*r,(l-1)*Cb,.5*r,Cb),"shape=partialRectangle;left=0;"+ja),X[l].vertex=!0,v.insert(X[l]),Ub[l]=new mxCell("",new mxGeometry(0,(l-1)*Cb,r,Cb),"strokeColor=none;fillColor=none;part=1;"),Ub[l].vertex=!0,v.insert(Ub[l]),Ub[l].value=+m(e["cell_"+l]),Ub[l].style+=a(e["cell_"+l],G);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18";v.style+=c(v.style,e,u,v);v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.17*r,.2*p,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");x.vertex=!0;v.insert(x);+x.style+=c(x.style,e,u,x);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";ja="shape=card;size=18;flipH=1;part=1;";x=new mxCell("",new mxGeometry(.1*r,0,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ja);x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);E=new mxCell("",new mxGeometry(.05*r,.1*p,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ja);E.vertex=!0;v.insert(E);E.style+=c(E.style,+e,u,E);var U=new mxCell("",new mxGeometry(0,.2*p,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+ja);U.vertex=!0;v.insert(U);U.value=m(e.Text);U.style+=c(U.style,e,u,U,G);break;case "VSMElectronicInformationArrow":v.style="group;";v.value=m(e.Title);v.style+=a(e.Title,G);var va=new mxCell("",new mxGeometry(0,0,r,p),"shape=mxgraph.lean_mapping.electronic_info_flow_edge;html=1;entryX=0;entryY=1;exitX=1;exitY=0;");va.edge=!0;va.geometry.relative=+1;D.addCell(va,v,null,v,v);break;case "AWSRoundedRectangleContainerBlock2":case "AWSRoundedRectangleContainerBlock":v.style+="strokeColor=none;fillColor=none;";e.Spotfleet?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=c(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,35,40),+"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.Beanstalk?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=c(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,30,40),"strokeColor=none;shape=mxgraph.aws3.elastic_beanstalk;fillColor=#759C3E;"),+E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.EC2?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=c(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),E.geometry.relative=+!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.Subnet?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=c(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.permissions;fillColor=#146EB4;"),E.geometry.relative=!0,E.geometry.offset=+new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.VPC?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=c(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.virtual_private_cloud;fillColor=#146EB4;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,+0),E.vertex=!0,v.insert(E)):e.AWS?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=c(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):+e.Corporate?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=c(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):+(v.style="resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;",v.value=m(e.Title),v.style+=c(v.style,e,u,v,G));break;case "AWSElasticComputeCloudBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.ec2;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=c(v.style,e,u,v,G);break;case "AWSRoute53Block2":v.style+="strokeColor=none;shape=mxgraph.aws3.route_53;verticalLabelPosition=bottom;align=center;verticalAlign=top;";+v.value=m(e.Title);v.style+=c(v.style,e,u,v,G);break;case "AWSRDBSBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.rds;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=c(v.style,e,u,v,G);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";qa=new mxCell("",new mxGeometry(.25*r,.25*p,.5*r,.5*p),"ellipse;html=1;strokeColor=#29AAE1;strokeWidth=2;");qa.vertex=!0;v.insert(qa);var Na=[qa];qa.style+=Y(e,u);va=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=none;dashed=0;html=1;strokeColor=#29AAE1;strokeWidth=2;");va.geometry.relative=!0;va.edge=!0;tc(.5*r,0,va,F,D,Na,v,qa);tc(.855*r,.145*p,va,F,D,Na,v,qa);tc(r,.5*p,va,F,D,Na,v,qa);tc(.855*r,.855*p,va,F,D,Na,v,qa);tc(.5*r,p,va,F,D,Na,v,qa);tc(.145*r,.855*p,va,F,D,Na,v,qa);tc(0,.5*p,va,F,D,Na,v,qa);tc(.145*r,.145*p,va,F,D,Na,v,qa);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";qa=new mxCell("",new mxGeometry(0,.5*p-10,r,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");-qa.vertex=!0;v.insert(qa);Na=[qa];va=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");va.geometry.relative=!0;va.edge=!0;Na=[qa];var Fd=r/e.NumTopNodes;for(l=0;l<e.NumTopNodes;l++)tc(.5*Fd+l*Fd,0,va,F,D,Na,v,qa);Fd=r/e.NumBottomNodes;for(l=0;l<e.NumBottomNodes;l++)tc(.5*Fd+l*Fd,p,va,F,D,Na,v,qa);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);-e.ToggleCharge&&(v.style+="flipV=1;");break;case "EIMessageChannelBlock":case "EIDatatypeChannelBlock":case "EIInvalidMessageChannelBlock":case "EIDeadLetterChannelBlock":case "EIGuaranteedDeliveryBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);"EIMessageChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(.45*-r,0)):"EIDatatypeChannelBlock"==+qa.vertex=!0;v.insert(qa);Na=[qa];va=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");va.geometry.relative=!0;va.edge=!0;Na=[qa];var Fd=r/e.NumTopNodes;for(l=0;l<e.NumTopNodes;l++)tc(.5*Fd+l*Fd,0,va,F,D,Na,v,qa);Fd=r/e.NumBottomNodes;for(l=0;l<e.NumBottomNodes;l++)tc(.5*Fd+l*Fd,p,va,F,D,Na,v,qa);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.value=m(e.Title);v.style+=c(v.style,e,u,v,G);+e.ToggleCharge&&(v.style+="flipV=1;");break;case "EIMessageChannelBlock":case "EIDatatypeChannelBlock":case "EIInvalidMessageChannelBlock":case "EIDeadLetterChannelBlock":case "EIGuaranteedDeliveryBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);"EIMessageChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(.45*-r,0)):"EIDatatypeChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.dataChannel;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(.45*-r,0)):"EIInvalidMessageChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.invalidMessageChannel;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(.45*-r,0)):"EIDeadLetterChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.deadLetterChannel;fillColor=#818181;part=1;"),x.geometry.offset=-new mxPoint(.45*-r,0)):"EIGuaranteedDeliveryBlock"==w.Class&&(x=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(-10,-7));x.geometry.relative=!0;x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);va=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;");va.geometry.relative=!0;va.edge=!0;gb(.15*r,.25*p,.85*r,.25*p,va,F,D,Na,v,qa);break;-case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,.07*p,.21*r,.86*p),"fillColor=#FFFF33;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.26*r,.09*p,.2*r,.82*p),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);U=new mxCell("",new mxGeometry(1,.5,.35*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");-U.geometry.relative=!0;U.geometry.offset=new mxPoint(.4*-r,-10);U.vertex=!0;v.insert(U);U.style+=b(U.style,e,u,U);fa=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;");fa.geometry.relative=!0;fa.edge=!0;x.insertEdge(fa,!0);E.insertEdge(fa,!1);fa.style+=H(e,u);F.push(D.addCell(fa,null,null,null,null));da=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;");-da.geometry.relative=!0;da.edge=!0;E.insertEdge(da,!0);U.insertEdge(da,!1);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);var Gd=+new mxPoint(.45*-r,0)):"EIGuaranteedDeliveryBlock"==w.Class&&(x=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(-10,-7));x.geometry.relative=!0;x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);va=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;");va.geometry.relative=!0;va.edge=!0;gb(.15*r,.25*p,.85*r,.25*p,va,F,D,Na,v,qa);break;+case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,.07*p,.21*r,.86*p),"fillColor=#FFFF33;part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);E=new mxCell("",new mxGeometry(.26*r,.09*p,.2*r,.82*p),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");E.vertex=!0;v.insert(E);E.style+=c(E.style,e,u,E);U=new mxCell("",new mxGeometry(1,.5,.35*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");+U.geometry.relative=!0;U.geometry.offset=new mxPoint(.4*-r,-10);U.vertex=!0;v.insert(U);U.style+=c(U.style,e,u,U);fa=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;");fa.geometry.relative=!0;fa.edge=!0;x.insertEdge(fa,!0);E.insertEdge(fa,!1);fa.style+=H(e,u);F.push(D.addCell(fa,null,null,null,null));da=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;");+da.geometry.relative=!0;da.edge=!0;E.insertEdge(da,!0);U.insertEdge(da,!1);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);var Gd=e.Messages,pe=(p-17)/Gd;E=[];va=[];for(l=0;l<Gd;l++){var Hd=pe*(l+1)-3;E[l]=new mxCell("",new mxGeometry(r-20,Hd,20,20),"part=1;");E[l].vertex=!0;v.insert(E[l]);switch(w.Class){case "EIMessageBlock":E[l].value=m(e["message_"+(l+1)]);E.style+=a(e["message_"+(l+1)],G);break;case "EICommandMessageBlock":E[l].value="C";E[l].style+="fontStyle=1;fontSize=13;";break;case "EIDocumentMessageBlock":E[l].value="D";E[l].style+="fontStyle=1;fontSize=13;";break;case "EIEventMessageBlock":E[l].value="E",E[l].style+=-"fontStyle=1;fontSize=13;"}E[l].style+=b(E[l].style,e,u,E[l]);va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");va[l].geometry.relative=!0;va[l].edge=!0;x.insertEdge(va[l],!1);E[l].insertEdge(va[l],!0);va[l].style+=b(va[l].style,e,u,va[l]);var Lc=[];Lc.push(new mxPoint(aa+8.5,ba+Hd+10));va[l].geometry.points=Lc;F.push(D.addCell(va[l],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";-v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.45*r,.25*p,.3*r,.5*p),"part=1;fillColor=#ffffff");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);va=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;");va.geometry.relative=!0;va.edge=!0;gb(0,.5*p,.4*r,.5*p,va,F,D,Na,v,qa);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";-v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);var fa=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;");fa.geometry.relative=!0;fa.edge=!0;gb(.05*r,.5*p,.85*r,.5*p,fa,F,D,Na,v,qa);var da=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;");da.geometry.relative=!0;da.edge=!0;gb(.05*r,.5*p,.85*-r,.15*p,da,F,D,Na,v,qa);var xa=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;");xa.geometry.relative=!0;xa.edge=!0;gb(.05*r,.5*p,.85*r,.85*p,xa,F,D,Na,v,qa);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);fa=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;");+"fontStyle=1;fontSize=13;"}E[l].style+=c(E[l].style,e,u,E[l]);va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");va[l].geometry.relative=!0;va[l].edge=!0;x.insertEdge(va[l],!1);E[l].insertEdge(va[l],!0);va[l].style+=c(va[l].style,e,u,va[l]);var Lc=[];Lc.push(new mxPoint(aa+8.5,ba+Hd+10));va[l].geometry.points=Lc;F.push(D.addCell(va[l],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";+v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.45*r,.25*p,.3*r,.5*p),"part=1;fillColor=#ffffff");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);va=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;");va.geometry.relative=!0;va.edge=!0;gb(0,.5*p,.4*r,.5*p,va,F,D,Na,v,qa);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";+v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);var fa=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;");fa.geometry.relative=!0;fa.edge=!0;gb(.05*r,.5*p,.85*r,.5*p,fa,F,D,Na,v,qa);var da=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;");da.geometry.relative=!0;da.edge=!0;gb(.05*r,.5*p,.85*+r,.15*p,da,F,D,Na,v,qa);var xa=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;");xa.geometry.relative=!0;xa.edge=!0;gb(.05*r,.5*p,.85*r,.85*p,xa,F,D,Na,v,qa);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);fa=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;");fa.geometry.relative=!0;fa.edge=!0;fa.style+=H(e,u);gb(.05*r,.5*p,.95*r,.5*p,fa,F,D,Na,v,qa);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");da.geometry.relative=!0;da.edge=!0;da.style+=H(e,u);gb(.3*r,.1*p,.3*r,.5*p,da,F,D,Na,v,qa);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");-xa.geometry.relative=!0;xa.edge=!0;xa.style+=H(e,u);gb(.7*r,.1*p,.7*r,.5*p,xa,F,D,Na,v,qa);var $a=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");$a.geometry.relative=!0;$a.edge=!0;$a.style+=H(e,u);gb(.5*r,.5*p,.5*r,.9*p,$a,F,D,Na,v,qa);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,-e,u,v,G);x=new mxCell("",new mxGeometry(.2*r,.21*p,.16*r,.24*p),"part=1;fillColor=#ffffff;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);fa=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;");fa.geometry.relative=!0;fa.edge=!0;gb(.45*r,.33*p,.8*r,.33*p,fa,F,D,Na,v,qa);E=new mxCell("",new mxGeometry(.64*r,.55*p,.16*r,.24*p),"part=1;fillColor=#ffffff;");E.vertex=!0;v.insert(E);E.style+=b(E.style,-e,u,E);da=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;");da.geometry.relative=!0;da.edge=!0;gb(.55*r,.67*p,.2*r,.67*p,da,F,D,Na,v,qa);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.1*r,.15*p,.8*r,.7*p),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");x.vertex=!0;v.insert(x);-x.style+=b(x.style,e,u,x);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.04*r,.06*p,.18*r,.28*p),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.2*r,.56*p,.2*r,.32*p),"part=1;");E.vertex=!0;v.insert(E);E.value="A";E.style+="fontStyle=1;fontSize=13;";x.style+=b(x.style,e,u,x);fa=new mxCell("",new mxGeometry(0,-0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");fa.geometry.relative=!0;fa.edge=!0;x.insertEdge(fa,!1);E.insertEdge(fa,!0);fa.style+=b(fa.style,e,u,fa);Lc=[];Lc.push(new mxPoint(aa+.13*r,ba+.72*p));fa.geometry.points=Lc;F.push(D.addCell(fa,null,null,null,null));U=new mxCell("",new mxGeometry(.6*r,.06*p,.18*r,.28*p),"ellipse;fillColor=#808080;part=1;");U.vertex=!0;v.insert(U);U.style+=H(e,u)+oa(e);U.style+=b(U.style,e,u,U);ta=new mxCell("",-new mxGeometry(.76*r,.56*p,.2*r,.32*p),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=H(e,u)+M(e,u,ta)+oa(e)+sa(e);ta.value="B";ta.style+="fontStyle=1;fontSize=13;fillColor=#ffffff;";ta.style+=b(ta.style,e,u,ta);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");da.geometry.relative=!0;da.edge=!0;U.insertEdge(da,!1);ta.insertEdge(da,!0);da.style+=b(da.style,e,u,da);var ef=[];ef.push(new mxPoint(aa+.69*r,ba+.72*-p));da.geometry.points=ef;F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;");xa.geometry.relative=!0;xa.edge=!0;x.insertEdge(xa,!1);U.insertEdge(xa,!0);xa.style+=b(xa.style,e,u,xa);F.push(D.addCell(xa,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("1",new mxGeometry(.2*-r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("2",new mxGeometry(.45*r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);U=new mxCell("3",new mxGeometry(.7*r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");U.vertex=!0;v.insert(U);U.style+=b(U.style,e,u,U);fa=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");-x.insertEdge(fa,!1);E.insertEdge(fa,!0);fa.geometry.points=[new mxPoint(aa+.375*r,ba+.15*p)];fa.geometry.relative=!0;fa.edge=!0;fa.style+=b(fa.style,e,u,fa);F.push(D.addCell(fa,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");E.insertEdge(da,!1);U.insertEdge(da,!0);da.geometry.points=[new mxPoint(aa+.675*r,ba+.15*p)];da.geometry.relative=!0;da.edge=!0;da.style+=b(da.style,e,u,da);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+=-"verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.3*r,.2*p,.4*r,.6*p),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.38*r,.42*p,.24*r,.16*p),"part=1;fillColor=#aefe7d;");-x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.38*r,0,.24*r,.16*p),"part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);U=new mxCell("",new mxGeometry(.76*r,.23*p,.24*r,.16*p),"");U.vertex=!0;v.insert(U);U.style=E.style;var ta=new mxCell("",new mxGeometry(.76*r,.61*p,.24*r,.16*p),"");ta.vertex=!0;v.insert(ta);ta.style=E.style;var Zd=new mxCell("",new mxGeometry(.38*r,.84*p,.24*r,.16*p),"");Zd.vertex=!0;v.insert(Zd);Zd.style=E.style;var $d=new mxCell("",new mxGeometry(0,-.61*p,.24*r,.16*p),"");$d.vertex=!0;v.insert($d);$d.style=E.style;var ae=new mxCell("",new mxGeometry(0,.23*p,.24*r,.16*p),"");ae.vertex=!0;v.insert(ae);ae.style=E.style;fa=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(fa,!1);E.insertEdge(fa,!0);fa.edge=!0;fa.style+=b(fa.style,e,u,fa);F.push(D.addCell(fa,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(da,!1);U.insertEdge(da,!0);da.edge=!0;da.style+=b(da.style,e,u,da);-F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(xa,!1);ta.insertEdge(xa,!0);xa.edge=!0;xa.style+=b(xa.style,e,u,xa);F.push(D.addCell(xa,null,null,null,null));$a=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge($a,!1);Zd.insertEdge($a,!0);$a.edge=!0;$a.style+=b($a.style,e,u,$a);F.push(D.addCell($a,null,null,null,null));var Mc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(Mc,-!1);$d.insertEdge(Mc,!0);Mc.edge=!0;Mc.style+=b(Mc.style,e,u,Mc);F.push(D.addCell(Mc,null,null,null,null));var Nc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(Nc,!1);ae.insertEdge(Nc,!0);Nc.edge=!0;Nc.style+=b(Nc.style,e,u,Nc);F.push(D.addCell(Nc,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);fa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");-fa.geometry.relative=!0;fa.edge=!0;gb(.05*r,.5*p,.6*r,.25*p,fa,F,D,Na,v,qa);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");da.geometry.relative=!0;da.edge=!0;gb(.05*r,.5*p,.6*r,.75*p,da,F,D,Na,v,qa);x=new mxCell("",new mxGeometry(.7*r,.1*p,.15*r,.32*p),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";-v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.25*r,.25*p,.5*r,.5*p),"shape=mxgraph.eip.control_bus;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);U=new mxCell("",-new mxGeometry(r-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");U.vertex=!0;v.insert(U);U.style+=b(U.style,e,u,U);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");xa.geometry.relative=!0;xa.edge=!0;x.insertEdge(xa,!1);U.insertEdge(xa,!0);xa.style+=b(xa.style,e,u,xa);xa.geometry.points=[new mxPoint(aa+8.5,ba+40)];F.push(D.addCell(xa,null,null,null,null));ta=new mxCell("",new mxGeometry(r--45,p-20,20,20),"part=1;");ta.vertex=!0;v.insert(ta);ta.value=m(e.message_0);ta.style+=a(e.message_0,G);ta.style+=b(ta.style,e,u,ta,G);$a=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");$a.geometry.relative=!0;$a.edge=!0;x.insertEdge($a,!1);ta.insertEdge($a,!0);$a.style+=b($a.style,e,u,$a);$a.geometry.points=[new mxPoint(aa+8.5,ba+p-10)];F.push(D.addCell($a,null,null,null,null));Gd=e.HistoryMessages;pe=(p-75)/Gd;E=[];-va=[];for(l=0;l<Gd;l++)Hd=pe*(l+1)+30,E[l]=new mxCell("",new mxGeometry(r-20,Hd,20,20),"part=1;"),E[l].vertex=!0,E[l].value=m(e["message_"+(l+1)]),E.style+=a(e["message_"+(l+1)],G),v.insert(E[l]),E[l].style+=b(E[l].style,e,u,E[l],G),va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),va[l].geometry.relative=!0,va[l].edge=!0,U.insertEdge(va[l],!1),E[l].insertEdge(va[l],!0),va[l].style+=b(va[l].style,e,u,va[l]),Lc=[],-Lc.push(new mxPoint(aa+r-30,ba+Hd+10)),va[l].geometry.points=Lc,F.push(D.addCell(va[l],null,null,null,null));break;case "Equation":LucidImporter.hasMath=!0;v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);v.value="$$"+e.Latex+"$$";break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>e.DoorAngle&&(v.style+="flipV=1;");v.style+=b(v.style,e,u,v);break;case "fpWall":v.style+="labelPosition=center;verticalAlign=bottom;verticalLabelPosition=top;";v.value=m(e);v.style+=b(v.style,e,u,-v,G);v.style=v.style.replace("rotation=180;","");break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;";0<e.DoorAngle&&(v.style+="flipV=1;");v.style+=b(v.style,e,u,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=new mxCell("",new mxGeometry(0,0,r,.25*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=[];var ff=.02*r,qe=(r-2*ff)/e.LightCount,gf=.8*qe;for(l=0;l<e.LightCount;l++)E[l]=new mxCell("",new mxGeometry(ff+-qe*l+(qe-gf)/2,.25*p,gf,.75*p),"ellipse;part=1;"),E[l].vertex=!0,v.insert(E[l]),E[l].style+=b(E[l].style,e,u,E[l]);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=[];var hf=r/e.SinkCount;for(l=0;l<e.SinkCount;l++)x[l]=new mxCell("",new mxGeometry(hf*l,0,hf,p),"part=1;shape=mxgraph.floorplan.sink_2;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=b(x[l].style,e,u,x[l]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Fb=-.1*r/e.StallCount;x=new mxCell("",new mxGeometry(0,0,Fb,p),"fillColor=#000000;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);var Ob=(r-Fb)/e.StallCount,re=[],Id=[],Jd=[],Kd=[];Z=H(e,u);Z=""==Z?"#000000;":Z.replace("stokreColor=","");var se="part=1;fillColor="+Z;se+=b(se,e,u,v);var te=b("",e,u,v);for(l=0;l<e.StallCount;l++)re[l]=new mxCell("",new mxGeometry((l+1)*Ob,0,Fb,p),se),re[l].vertex=!0,v.insert(re[l]),Jd[l]=new mxCell("",new mxGeometry(Fb+l*Ob+.05*(Ob-Fb),p-.92*(Ob-Fb),.9*(Ob-+xa.geometry.relative=!0;xa.edge=!0;xa.style+=H(e,u);gb(.7*r,.1*p,.7*r,.5*p,xa,F,D,Na,v,qa);var $a=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");$a.geometry.relative=!0;$a.edge=!0;$a.style+=H(e,u);gb(.5*r,.5*p,.5*r,.9*p,$a,F,D,Na,v,qa);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,+e,u,v,G);x=new mxCell("",new mxGeometry(.2*r,.21*p,.16*r,.24*p),"part=1;fillColor=#ffffff;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);fa=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;");fa.geometry.relative=!0;fa.edge=!0;gb(.45*r,.33*p,.8*r,.33*p,fa,F,D,Na,v,qa);E=new mxCell("",new mxGeometry(.64*r,.55*p,.16*r,.24*p),"part=1;fillColor=#ffffff;");E.vertex=!0;v.insert(E);E.style+=c(E.style,+e,u,E);da=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;");da.geometry.relative=!0;da.edge=!0;gb(.55*r,.67*p,.2*r,.67*p,da,F,D,Na,v,qa);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.1*r,.15*p,.8*r,.7*p),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");x.vertex=!0;v.insert(x);+x.style+=c(x.style,e,u,x);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.04*r,.06*p,.18*r,.28*p),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);E=new mxCell("",new mxGeometry(.2*r,.56*p,.2*r,.32*p),"part=1;");E.vertex=!0;v.insert(E);E.value="A";E.style+="fontStyle=1;fontSize=13;";x.style+=c(x.style,e,u,x);fa=new mxCell("",new mxGeometry(0,+0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");fa.geometry.relative=!0;fa.edge=!0;x.insertEdge(fa,!1);E.insertEdge(fa,!0);fa.style+=c(fa.style,e,u,fa);Lc=[];Lc.push(new mxPoint(aa+.13*r,ba+.72*p));fa.geometry.points=Lc;F.push(D.addCell(fa,null,null,null,null));U=new mxCell("",new mxGeometry(.6*r,.06*p,.18*r,.28*p),"ellipse;fillColor=#808080;part=1;");U.vertex=!0;v.insert(U);U.style+=H(e,u)+oa(e);U.style+=c(U.style,e,u,U);ta=new mxCell("",+new mxGeometry(.76*r,.56*p,.2*r,.32*p),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=H(e,u)+M(e,u,ta)+oa(e)+sa(e);ta.value="B";ta.style+="fontStyle=1;fontSize=13;fillColor=#ffffff;";ta.style+=c(ta.style,e,u,ta);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");da.geometry.relative=!0;da.edge=!0;U.insertEdge(da,!1);ta.insertEdge(da,!0);da.style+=c(da.style,e,u,da);var ef=[];ef.push(new mxPoint(aa+.69*r,ba+.72*+p));da.geometry.points=ef;F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;");xa.geometry.relative=!0;xa.edge=!0;x.insertEdge(xa,!1);U.insertEdge(xa,!0);xa.style+=c(xa.style,e,u,xa);F.push(D.addCell(xa,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("1",new mxGeometry(.2*+r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);E=new mxCell("2",new mxGeometry(.45*r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");E.vertex=!0;v.insert(E);E.style+=c(E.style,e,u,E);U=new mxCell("3",new mxGeometry(.7*r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");U.vertex=!0;v.insert(U);U.style+=c(U.style,e,u,U);fa=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");+x.insertEdge(fa,!1);E.insertEdge(fa,!0);fa.geometry.points=[new mxPoint(aa+.375*r,ba+.15*p)];fa.geometry.relative=!0;fa.edge=!0;fa.style+=c(fa.style,e,u,fa);F.push(D.addCell(fa,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");E.insertEdge(da,!1);U.insertEdge(da,!0);da.geometry.points=[new mxPoint(aa+.675*r,ba+.15*p)];da.geometry.relative=!0;da.edge=!0;da.style+=c(da.style,e,u,da);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+=+"verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.3*r,.2*p,.4*r,.6*p),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.38*r,.42*p,.24*r,.16*p),"part=1;fillColor=#aefe7d;");+x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);E=new mxCell("",new mxGeometry(.38*r,0,.24*r,.16*p),"part=1;");E.vertex=!0;v.insert(E);E.style+=c(E.style,e,u,E);U=new mxCell("",new mxGeometry(.76*r,.23*p,.24*r,.16*p),"");U.vertex=!0;v.insert(U);U.style=E.style;var ta=new mxCell("",new mxGeometry(.76*r,.61*p,.24*r,.16*p),"");ta.vertex=!0;v.insert(ta);ta.style=E.style;var Zd=new mxCell("",new mxGeometry(.38*r,.84*p,.24*r,.16*p),"");Zd.vertex=!0;v.insert(Zd);Zd.style=E.style;var $d=new mxCell("",new mxGeometry(0,+.61*p,.24*r,.16*p),"");$d.vertex=!0;v.insert($d);$d.style=E.style;var ae=new mxCell("",new mxGeometry(0,.23*p,.24*r,.16*p),"");ae.vertex=!0;v.insert(ae);ae.style=E.style;fa=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(fa,!1);E.insertEdge(fa,!0);fa.edge=!0;fa.style+=c(fa.style,e,u,fa);F.push(D.addCell(fa,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(da,!1);U.insertEdge(da,!0);da.edge=!0;da.style+=c(da.style,e,u,da);+F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(xa,!1);ta.insertEdge(xa,!0);xa.edge=!0;xa.style+=c(xa.style,e,u,xa);F.push(D.addCell(xa,null,null,null,null));$a=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge($a,!1);Zd.insertEdge($a,!0);$a.edge=!0;$a.style+=c($a.style,e,u,$a);F.push(D.addCell($a,null,null,null,null));var Mc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(Mc,+!1);$d.insertEdge(Mc,!0);Mc.edge=!0;Mc.style+=c(Mc.style,e,u,Mc);F.push(D.addCell(Mc,null,null,null,null));var Nc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(Nc,!1);ae.insertEdge(Nc,!0);Nc.edge=!0;Nc.style+=c(Nc.style,e,u,Nc);F.push(D.addCell(Nc,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);fa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");+fa.geometry.relative=!0;fa.edge=!0;gb(.05*r,.5*p,.6*r,.25*p,fa,F,D,Na,v,qa);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");da.geometry.relative=!0;da.edge=!0;gb(.05*r,.5*p,.6*r,.75*p,da,F,D,Na,v,qa);x=new mxCell("",new mxGeometry(.7*r,.1*p,.15*r,.32*p),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";+v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.25*r,.25*p,.5*r,.5*p),"shape=mxgraph.eip.control_bus;part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);U=new mxCell("",+new mxGeometry(r-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");U.vertex=!0;v.insert(U);U.style+=c(U.style,e,u,U);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");xa.geometry.relative=!0;xa.edge=!0;x.insertEdge(xa,!1);U.insertEdge(xa,!0);xa.style+=c(xa.style,e,u,xa);xa.geometry.points=[new mxPoint(aa+8.5,ba+40)];F.push(D.addCell(xa,null,null,null,null));ta=new mxCell("",new mxGeometry(r-+45,p-20,20,20),"part=1;");ta.vertex=!0;v.insert(ta);ta.value=m(e.message_0);ta.style+=a(e.message_0,G);ta.style+=c(ta.style,e,u,ta,G);$a=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");$a.geometry.relative=!0;$a.edge=!0;x.insertEdge($a,!1);ta.insertEdge($a,!0);$a.style+=c($a.style,e,u,$a);$a.geometry.points=[new mxPoint(aa+8.5,ba+p-10)];F.push(D.addCell($a,null,null,null,null));Gd=e.HistoryMessages;pe=(p-75)/Gd;E=[];+va=[];for(l=0;l<Gd;l++)Hd=pe*(l+1)+30,E[l]=new mxCell("",new mxGeometry(r-20,Hd,20,20),"part=1;"),E[l].vertex=!0,E[l].value=m(e["message_"+(l+1)]),E.style+=a(e["message_"+(l+1)],G),v.insert(E[l]),E[l].style+=c(E[l].style,e,u,E[l],G),va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),va[l].geometry.relative=!0,va[l].edge=!0,U.insertEdge(va[l],!1),E[l].insertEdge(va[l],!0),va[l].style+=c(va[l].style,e,u,va[l]),Lc=[],+Lc.push(new mxPoint(aa+r-30,ba+Hd+10)),va[l].geometry.points=Lc,F.push(D.addCell(va[l],null,null,null,null));break;case "Equation":LucidImporter.hasMath=!0;v.style+="strokeColor=none;";v.style+=c(v.style,e,u,v);v.value="$$"+e.Latex+"$$";break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>e.DoorAngle&&(v.style+="flipV=1;");v.style+=c(v.style,e,u,v);break;case "fpWall":v.style+="labelPosition=center;verticalAlign=bottom;verticalLabelPosition=top;";v.value=m(e);v.style+=c(v.style,e,u,+v,G);v.style=v.style.replace("rotation=180;","");break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;";0<e.DoorAngle&&(v.style+="flipV=1;");v.style+=c(v.style,e,u,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,u,v);x=new mxCell("",new mxGeometry(0,0,r,.25*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);E=[];var ff=.02*r,qe=(r-2*ff)/e.LightCount,gf=.8*qe;for(l=0;l<e.LightCount;l++)E[l]=new mxCell("",new mxGeometry(ff++qe*l+(qe-gf)/2,.25*p,gf,.75*p),"ellipse;part=1;"),E[l].vertex=!0,v.insert(E[l]),E[l].style+=c(E[l].style,e,u,E[l]);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,u,v);x=[];var hf=r/e.SinkCount;for(l=0;l<e.SinkCount;l++)x[l]=new mxCell("",new mxGeometry(hf*l,0,hf,p),"part=1;shape=mxgraph.floorplan.sink_2;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=c(x[l].style,e,u,x[l]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Fb=+.1*r/e.StallCount;x=new mxCell("",new mxGeometry(0,0,Fb,p),"fillColor=#000000;part=1;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);var Ob=(r-Fb)/e.StallCount,re=[],Id=[],Jd=[],Kd=[];Z=H(e,u);Z=""==Z?"#000000;":Z.replace("stokreColor=","");var se="part=1;fillColor="+Z;se+=c(se,e,u,v);var te=c("",e,u,v);for(l=0;l<e.StallCount;l++)re[l]=new mxCell("",new mxGeometry((l+1)*Ob,0,Fb,p),se),re[l].vertex=!0,v.insert(re[l]),Jd[l]=new mxCell("",new mxGeometry(Fb+l*Ob+.05*(Ob-Fb),p-.92*(Ob-Fb),.9*(Ob-Fb),.92*(Ob-Fb)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),Jd[l].vertex=!0,v.insert(Jd[l]),Jd[l].style+=te,Id[l]=new mxCell("",new mxGeometry(Fb+l*Ob+.2*(Ob-Fb),0,.6*(Ob-Fb),.8*(Ob-Fb)),"shape=mxgraph.floorplan.toilet;part=1;"),Id[l].vertex=!0,v.insert(Id[l]),Id[l].style+=te,Kd[l]=new mxCell("",new mxGeometry(Fb+l*Ob,.42*p,.15*(Ob-Fb),.12*(Ob-Fb)),"part=1;"),Kd[l].vertex=!0,v.insert(Kd[l]),Kd[l].style+=te;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var be="edgeStyle=none;endArrow=none;part=1;";-Z=H(e,u);Z=""==Z?"#000000;":Z.replace("strokeColor=","");var Vc="shape=triangle;part=1;fillColor="+Z;Vc+=b(Vc,e,u,v);fa=new mxCell("",new mxGeometry(0,0,0,0),be);fa.geometry.relative=!0;fa.edge=!0;gb(0,.5*p,.65*r,.5*p,fa,F,D,Na,v,qa);var ia=p/e.numLines;da=[];var Wc=[];for(l=0;l<e.numLines;l++)da[l]=new mxCell("",new mxGeometry(0,0,0,0),be),da[l].geometry.relative=!0,da[l].edge=!0,gb(.65*r,.5*p,.96*r,(l+.5)*ia,da[l],F,D,Na,v,qa),Wc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*ia,.05*r,.6*ia),Vc),-Wc[l].vertex=!0,v.insert(Wc[l]);break;case "PEMultilines":v.style+="strokeColor=none;fillColor=none;";be="edgeStyle=none;endArrow=none;part=1;";Z=H(e,u);Z=""==Z?"#000000;":Z.replace("strokeColor=","");Vc="shape=triangle;part=1;fillColor="+Z;Vc+=b(Vc,e,u,v);ia=p/e.numLines;da=[];Wc=[];for(l=0;l<e.numLines;l++)da[l]=new mxCell("",new mxGeometry(0,0,0,0),be),da[l].geometry.relative=!0,da[l].edge=!0,gb(0,(l+.5)*ia,.96*r,(l+.5)*ia,da[l],F,D,Na,v,qa),Wc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*ia,.05*-r,.6*ia),Vc),Wc[l].vertex=!0,v.insert(Wc[l]);break;case "PEVesselBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);switch(e.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+=b(v.style,e,u,v,G);break;case "PEClosedTankBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);1==e.peakedRoof&&0==e.stumpType?v.style+=-"shape=mxgraph.pid.vessels.tank_(conical_roof);":1==e.stumpType&&(v.style+="shape=mxgraph.pid.vessels.tank_(boot);");v.style+=b(v.style,e,u,v,G);break;case "PEColumnBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style=0==e.columnType?v.style+"shape=mxgraph.pid.vessels.pressurized_vessel;":v.style+"shape=mxgraph.pid.vessels.tank;";v.style+=b(v.style,e,u,v,G);break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;";v.value=m(e.Text);v.style+=-b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,.2*p,r,.6*p),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");x.vertex=!0;v.insert(x);x.style+=ja;x.style+=b(x.style,e,u,x);ja="endSize=4;endArrow=block;endFill=1;";0==e.compressorType?(fa=new mxCell("",new mxGeometry(0,0,0,0),""),fa.geometry.relative=!0,fa.edge=!0,fa.style+=ja,fa.style+=b(fa.style,e,u,fa),gb(0,0,0,.2*p,fa,F,D,Na,v,qa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=-ja,da.style+=b(da.style,e,u,da),gb(r,.67*p,r,p,da,F,D,Na,v,qa)):(x.style+="flipH=1;",fa=new mxCell("",new mxGeometry(0,0,0,0),""),fa.geometry.relative=!0,fa.edge=!0,fa.style+=ja,fa.style+=b(fa.style,e,u,fa),gb(0,0,0,.33*p,fa,F,D,Na,v,qa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ja,da.style+=b(da.style,e,u,da),gb(r,.8*p,r,p,da,F,D,Na,v,qa));1==e.centerLineType&&(xa=new mxCell("",new mxGeometry(0,0,0,0),""),xa.geometry.relative=!0,xa.edge=!0,xa.style+=-ja,xa.style+=b(xa.style,e,u,xa),gb(.2*r,.5*p,.8*r,.5*p,xa,F,D,Na,v,qa));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.2*r,.2*p,.6*r,.6*p),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(w.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+=b(v.style,e,u,v);"PEIndicator2Block"==-w.Class||"PESharedIndicator2Block"==w.Class?(x=new mxCell("",new mxGeometry(0,0,r,.5*r),"part=1;strokeColor=none;fillColor=none;"),x.vertex=!0,v.insert(x),x.value=m(e.TopText),x.style+=a(e.TopText,G),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,.5*r,r,.5*r),"part=1;strokeColor=none;fillColor=none;")):(x=new mxCell("",new mxGeometry(0,0,r,.5*p),"part=1;strokeColor=none;fillColor=none;"),x.vertex=!0,v.insert(x),x.value=m(e.TopText),x.style+=a(e.TopText,G),x.style+=b(x.style,e,u,x,G),-E=new mxCell("",new mxGeometry(0,.5*p,r,.5*p),"part=1;strokeColor=none;fillColor=none;"));E.vertex=!0;v.insert(E);E.value=m(e.BotText);E.style+=a(e.BotText,G);E.style+=b(E.style,e,u,E,G);switch(e.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 ue=+Z=H(e,u);Z=""==Z?"#000000;":Z.replace("strokeColor=","");var Vc="shape=triangle;part=1;fillColor="+Z;Vc+=c(Vc,e,u,v);fa=new mxCell("",new mxGeometry(0,0,0,0),be);fa.geometry.relative=!0;fa.edge=!0;gb(0,.5*p,.65*r,.5*p,fa,F,D,Na,v,qa);var ia=p/e.numLines;da=[];var Wc=[];for(l=0;l<e.numLines;l++)da[l]=new mxCell("",new mxGeometry(0,0,0,0),be),da[l].geometry.relative=!0,da[l].edge=!0,gb(.65*r,.5*p,.96*r,(l+.5)*ia,da[l],F,D,Na,v,qa),Wc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*ia,.05*r,.6*ia),Vc),+Wc[l].vertex=!0,v.insert(Wc[l]);break;case "PEMultilines":v.style+="strokeColor=none;fillColor=none;";be="edgeStyle=none;endArrow=none;part=1;";Z=H(e,u);Z=""==Z?"#000000;":Z.replace("strokeColor=","");Vc="shape=triangle;part=1;fillColor="+Z;Vc+=c(Vc,e,u,v);ia=p/e.numLines;da=[];Wc=[];for(l=0;l<e.numLines;l++)da[l]=new mxCell("",new mxGeometry(0,0,0,0),be),da[l].geometry.relative=!0,da[l].edge=!0,gb(0,(l+.5)*ia,.96*r,(l+.5)*ia,da[l],F,D,Na,v,qa),Wc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*ia,.05*+r,.6*ia),Vc),Wc[l].vertex=!0,v.insert(Wc[l]);break;case "PEVesselBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);switch(e.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+=c(v.style,e,u,v,G);break;case "PEClosedTankBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);1==e.peakedRoof&&0==e.stumpType?v.style+=+"shape=mxgraph.pid.vessels.tank_(conical_roof);":1==e.stumpType&&(v.style+="shape=mxgraph.pid.vessels.tank_(boot);");v.style+=c(v.style,e,u,v,G);break;case "PEColumnBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style=0==e.columnType?v.style+"shape=mxgraph.pid.vessels.pressurized_vessel;":v.style+"shape=mxgraph.pid.vessels.tank;";v.style+=c(v.style,e,u,v,G);break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;";v.value=m(e.Text);v.style+=+c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,.2*p,r,.6*p),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");x.vertex=!0;v.insert(x);x.style+=ja;x.style+=c(x.style,e,u,x);ja="endSize=4;endArrow=block;endFill=1;";0==e.compressorType?(fa=new mxCell("",new mxGeometry(0,0,0,0),""),fa.geometry.relative=!0,fa.edge=!0,fa.style+=ja,fa.style+=c(fa.style,e,u,fa),gb(0,0,0,.2*p,fa,F,D,Na,v,qa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=+ja,da.style+=c(da.style,e,u,da),gb(r,.67*p,r,p,da,F,D,Na,v,qa)):(x.style+="flipH=1;",fa=new mxCell("",new mxGeometry(0,0,0,0),""),fa.geometry.relative=!0,fa.edge=!0,fa.style+=ja,fa.style+=c(fa.style,e,u,fa),gb(0,0,0,.33*p,fa,F,D,Na,v,qa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ja,da.style+=c(da.style,e,u,da),gb(r,.8*p,r,p,da,F,D,Na,v,qa));1==e.centerLineType&&(xa=new mxCell("",new mxGeometry(0,0,0,0),""),xa.geometry.relative=!0,xa.edge=!0,xa.style+=+ja,xa.style+=c(xa.style,e,u,xa),gb(.2*r,.5*p,.8*r,.5*p,xa,F,D,Na,v,qa));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";v.value=m(e.Text);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.2*r,.2*p,.6*r,.6*p),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");x.vertex=!0;v.insert(x);x.style+=c(x.style,e,u,x);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(w.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+=c(v.style,e,u,v);"PEIndicator2Block"==+w.Class||"PESharedIndicator2Block"==w.Class?(x=new mxCell("",new mxGeometry(0,0,r,.5*r),"part=1;strokeColor=none;fillColor=none;"),x.vertex=!0,v.insert(x),x.value=m(e.TopText),x.style+=a(e.TopText,G),x.style+=c(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,.5*r,r,.5*r),"part=1;strokeColor=none;fillColor=none;")):(x=new mxCell("",new mxGeometry(0,0,r,.5*p),"part=1;strokeColor=none;fillColor=none;"),x.vertex=!0,v.insert(x),x.value=m(e.TopText),x.style+=a(e.TopText,G),x.style+=c(x.style,e,u,x,G),+E=new mxCell("",new mxGeometry(0,.5*p,r,.5*p),"part=1;strokeColor=none;fillColor=none;"));E.vertex=!0;v.insert(E);E.value=m(e.BotText);E.style+=a(e.BotText,G);E.style+=c(E.style,e,u,E,G);switch(e.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 ue=!1;"PEPoweredValveBlock"==w.Class?1!=e.poweredHandOperated&&(ue=!0):1!=e.handOperated&&(ue=!0);if(ue){e=h(w).Properties;O=e.BoundingBox;var Sf=O.h;O.h="PEAngleValveBlock"==w.Class||"PEAngleGlobeValveBlock"==w.Class?.7*O.h:.6*O.h;v=new mxCell("",new mxGeometry(Math.round(.75*O.x+xc),Math.round(.75*(O.y+Sf-O.h)+yc),Math.round(.75*O.w),Math.round(.75*O.h)),"");v.vertex=!0;Xa(v,w,D)}if("PEPoweredValveBlock"==w.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;",-v.style+=b(v.style,e,u,v),1==e.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",x=new mxCell("",new mxGeometry(.325*r,0,.35*r,.35*p),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),x.vertex=!0,v.insert(x),x.value=m(e.PoweredText),x.style+=(G?"":q(e.PoweredText)+t(e.PoweredText)+C(e.PoweredText)+I(e.PoweredText)+Q(e.PoweredText)+L(e.PoweredText)+S(e.PoweredText))+"fontSize=6;"+R(e.PoweredText),x.style+=b(x.style,e,u,x,G)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";-v.value=m(e.Text);switch(w.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==e.handOperated&&(v.style+="actuator=man;")}v.style+=b(v.style,e,u,v,G);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,+v.style+=c(v.style,e,u,v),1==e.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",x=new mxCell("",new mxGeometry(.325*r,0,.35*r,.35*p),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),x.vertex=!0,v.insert(x),x.value=m(e.PoweredText),x.style+=(G?"":q(e.PoweredText)+t(e.PoweredText)+C(e.PoweredText)+I(e.PoweredText)+Q(e.PoweredText)+L(e.PoweredText)+S(e.PoweredText))+"fontSize=6;"+R(e.PoweredText),x.style+=c(x.style,e,u,x,G)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";+v.value=m(e.Text);switch(w.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==e.handOperated&&(v.style+="actuator=man;")}v.style+=c(v.style,e,u,v,G);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-110),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(-20,110),U.vertex=!0,v.insert(U),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):-new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,u,v);break;case "UI2WindowBlock":v.value=m(e.Title);v.style+="shape=mxgraph.mockup.containers.window;mainText=;align=center;verticalAlign=top;spacing=5;"+(G?"fontSize=13;":f(e.Title)+q(e.Title)+t(e.Title));1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-50),+new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=c(v.style,e,u,v);break;case "UI2WindowBlock":v.value=m(e.Title);v.style+="shape=mxgraph.mockup.containers.window;mainText=;align=center;verticalAlign=top;spacing=5;"+(G?"fontSize=13;":f(e.Title)+q(e.Title)+t(e.Title));1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(-20,30),U.vertex=!0,v.insert(U),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",-new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,u,v,G);break;case "UI2DialogBlock":v.value=m(e.Text);v.style+=a(e.Text,G);x=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");x.vertex=!0;v.insert(x);x.value=m(e.Title);x.style+=a(e.Title,G);x.style+=b(x.style,e,u,x,G);E=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");+new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=c(v.style,e,u,v,G);break;case "UI2DialogBlock":v.value=m(e.Text);v.style+=a(e.Text,G);x=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");x.vertex=!0;v.insert(x);x.value=m(e.Title);x.style+=a(e.Title,G);x.style+=c(x.style,e,u,x,G);E=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");E.geometry.relative=!0;E.geometry.offset=new mxPoint(-25,-10);E.vertex=!0;x.insert(E);1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(-20,30),U.vertex=!0,v.insert(U),v.style+="spacingRight=20;");-1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,u,v);e.Text=null;break;case "UI2AccordionBlock":x=[];ia=25;for(l=0;l<=e.Panels-1;l++)x[l]=l<e.Selected-1?new mxCell("",new mxGeometry(0,+1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=c(v.style,e,u,v);e.Text=null;break;case "UI2AccordionBlock":x=[];ia=25;for(l=0;l<=e.Panels-1;l++)x[l]=l<e.Selected-1?new mxCell("",new mxGeometry(0,l*ia,r,ia),"part=1;fillColor=#000000;fillOpacity=25;"):l==e.Selected-1?new mxCell("",new mxGeometry(0,l*ia,r,ia),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0,p-(e.Panels-e.Selected)*ia+(l-e.Selected)*ia,r,ia),"part=1;fillColor=#000000;fillOpacity=25;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Panel_"+(l+1)]),x[l].style+=a(e["Panel_"+(l+1)],G),0>x[l].style.indexOf(";align=")&&(x[l].style+="align=left;spacingLeft=5;");var Va=H(e,u);Va=Va.replace("strokeColor","fillColor2");""==Va&&(Va="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-e.Selected*ia-20-(e.Panels-e.Selected)*ia),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-e.Selected*ia-(e.Panels-e.Selected)*ia),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,e.Selected*ia),E.vertex=!0,v.insert(E),v.style+=-"spacingRight=20;",E.style+=Va,E.style+=b(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20-(e.Panels-e.Selected)*ia),U.vertex=!0,v.insert(U),U.style+=Va,U.style+=b(U.style,e,u,U));ta=1==e.vScroll?new mxCell("",new mxGeometry(0,-e.Selected*ia,r-20,p-e.Selected*ia-20-(e.Panels-e.Selected)*ia),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,e.Selected*ia,r-20,p-e.Selected*ia-(e.Panels-e.Selected)*ia),"part=1;fillColor=none;strokeColor=none;");ta.vertex=!0;v.insert(ta);ta.value=m(e.Content_1);ta.style+=a(e.Content_1,G);!G&&0>ta.style.indexOf(";align=")&&(ta.style+="align=left;spacingLeft=5;");v.style+=b(v.style,e,u,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";-x=[];E=[];ia=25;var Ib=3,Ga=(r+Ib)/(e.Tabs+1),ib=new mxCell("",new mxGeometry(0,ia,r,p-ia),"part=1;");ib.vertex=!0;v.insert(ib);ib.style+=b(ib.style,e,u,ib);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(10+l*Ga,0,Ga-Ib,ia),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(10+l*Ga,0,Ga-Ib,ia),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ga-Ib,ia),"fillColor=#000000;fillOpacity=25;"),-E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;"),E[l].style+=b(E[l].style,e,u,E[l]);Va=H(e,u);Va=Va.replace("strokeColor","fillColor2");""==Va&&(Va="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20-ia),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p--ia),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ia),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Va,E.style+=b(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),-U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),U.style+=Va,U.style+=b(U.style,e,u,U));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];ia=25;Ib=3;Ga=(r+Ib)/e.Tabs;ib=new mxCell("",new mxGeometry(0,ia,r,p-ia),"part=1;");ib.vertex=!0;v.insert(ib);ib.style+=b(ib.style,e,u,ib);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga-Ib,ia),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",-new mxGeometry(l*Ga,0,Ga-Ib,ia),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ga-Ib,ia),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;");Va=H(e,u);Va=Va.replace("strokeColor","fillColor2");""==Va&&(Va="fillColor2=#000000;");1==-e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20-ia),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-ia),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ia),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Va,E.style+=b(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,-1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),U.style+=Va,U.style+=b(U.style,e,u,U));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];Ib=3;ia=25+Ib;Ga=80;Ac=10;ib=new mxCell("",new mxGeometry(Ga,0,r-Ga,p),"part=1;");ib.vertex=-!0;v.insert(ib);ib.style+=b(ib.style,e,u,ib);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,Ac+l*ia,Ga,ia-Ib),""),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G)):(x[l]=new mxCell("",new mxGeometry(0,Ac+l*ia,Ga,ia-Ib),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ga,ia-Ib),"fillColor=#000000;fillOpacity=25;"),-E[l].vertex=!0,x[l].insert(E[l]),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G)),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;"),E[l].style+=b(E[l].style,e,u,E[l]);Va=H(e,u);Va=Va.replace("strokeColor","fillColor2");""==Va&&(Va="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),-E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,0),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Va,E.style+=b(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(Ga,1,r-20-Ga,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(Ga,1,r-Ga,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),-U.style+=Va,U.style+=b(U.style,e,u,U));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";ia=p/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(0,l*ia+.5*ia-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=b(x[l].style,e,u,x[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&-(Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Z,E[l].style+=b(E[l].style,e,u,E[l]));break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";Ga=r/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(l*Ga,.5*p-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),-x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=b(x[l].style,e,u,x[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Z,E[l].style+=b(E[l].style,e,u,E[l]));break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";-ia=p/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(0,l*ia+.5*ia-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=b(x[l].style,e,u,x[l],G),null!=e.Selected&&e.Selected==l+1&&(Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2.5,-2.5,5,5),"ellipse;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Z,E[l].style+=b(E[l].style,e,u,E[l]));break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";Ga=r/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(l*Ga,.5*p-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=-b(x[l].style,e,u,x[l],G),null!=e.Selected&&e.Selected==l+1&&(Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"ellipse;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Z,E[l].style+=b(E[l].style,e,u,E[l]));break;case "UI2SelectBlock":v.style+="shape=mxgraph.mockup.forms.comboBox;strokeColor=#999999;fillColor=#ddeeff;align=left;fillColor2=#aaddff;mainText=;fontColor=#666666";v.value=m(e.Selected);break;case "UI2HSliderBlock":case "UI2VSliderBlock":v.style+=-"shape=mxgraph.mockup.forms.horSlider;sliderStyle=basic;handleStyle=handle;";"UI2VSliderBlock"==w.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*e.ScrollVal+";";v.style+=b(v.style,e,u,v);break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";x=new mxCell("",new mxGeometry(0,0,.6*r,p),"part=1;");x.vertex=!0;v.insert(x);x.value=m(e.Date);x.style+=a(e.Date,G);v.style+=b(v.style,e,u,v);Z=H(e,u);Z=Z.replace("strokeColor","fillColor");""==Z&&(Z="fillColor=#000000;");-E=new mxCell("",new mxGeometry(.75*r,0,.25*r,p),"part=1;shape=mxgraph.gmdl.calendar;");E.vertex=!0;v.insert(E);E.style+=Z;E.style+=b(E.style,e,u,E);break;case "UI2SearchBlock":v.value=m(e.Search);v.style+="shape=mxgraph.mockup.forms.searchBox;mainText=;flipH=1;align=left;spacingLeft=26;"+a(e.Search,G);v.style+=b(v.style,e,u,v,G);break;case "UI2NumericStepperBlock":Z=H(e,u);Z=Z.replace("strokeColor","fillColor");""==Z&&(Z="fillColor=#000000;");v.value=m(e.Number);v.style+="shape=mxgraph.mockup.forms.spinner;spinLayout=right;spinStyle=normal;adjStyle=triangle;mainText=;align=left;spacingLeft=8;"+-Z+a(e.Number,G);v.style+=b(v.style,e,u,v,G);break;case "UI2TableBlock":try{lb=P(e.FillColor);var Ld=P(e.LineColor);Tc="";var ce=20;v.style="html=1;overflow=fill;verticalAlign=top;spacing=0;";var Md='<table style="width:100%;height:100%;border-collapse: collapse;border: 1px solid '+Ld+';">',uc=e.Data.split("\n");var jf=e.AltRow&&"default"!=e.AltRow?"none"==e.AltRow?lb:P(e.AltRow):Sd(lb,.95);Pc=e.Header&&"default"!=e.Header?"none"==e.Header?jf:P(e.Header):Sd(lb,.8);if("full"==e.GridLines)Tc="border: 1px solid "++"spacingRight=20;",E.style+=Va,E.style+=c(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20-(e.Panels-e.Selected)*ia),U.vertex=!0,v.insert(U),U.style+=Va,U.style+=c(U.style,e,u,U));ta=1==e.vScroll?new mxCell("",new mxGeometry(0,+e.Selected*ia,r-20,p-e.Selected*ia-20-(e.Panels-e.Selected)*ia),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,e.Selected*ia,r-20,p-e.Selected*ia-(e.Panels-e.Selected)*ia),"part=1;fillColor=none;strokeColor=none;");ta.vertex=!0;v.insert(ta);ta.value=m(e.Content_1);ta.style+=a(e.Content_1,G);!G&&0>ta.style.indexOf(";align=")&&(ta.style+="align=left;spacingLeft=5;");v.style+=c(v.style,e,u,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";+x=[];E=[];ia=25;var Ib=3,Ga=(r+Ib)/(e.Tabs+1),ib=new mxCell("",new mxGeometry(0,ia,r,p-ia),"part=1;");ib.vertex=!0;v.insert(ib);ib.style+=c(ib.style,e,u,ib);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(10+l*Ga,0,Ga-Ib,ia),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(10+l*Ga,0,Ga-Ib,ia),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=x[l].style+=c(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ga-Ib,ia),"fillColor=#000000;fillOpacity=25;"),+E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;"),E[l].style+=c(E[l].style,e,u,E[l]);Va=H(e,u);Va=Va.replace("strokeColor","fillColor2");""==Va&&(Va="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20-ia),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-+ia),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ia),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Va,E.style+=c(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),+U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),U.style+=Va,U.style+=c(U.style,e,u,U));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];ia=25;Ib=3;Ga=(r+Ib)/e.Tabs;ib=new mxCell("",new mxGeometry(0,ia,r,p-ia),"part=1;");ib.vertex=!0;v.insert(ib);ib.style+=c(ib.style,e,u,ib);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga-Ib,ia),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",+new mxGeometry(l*Ga,0,Ga-Ib,ia),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=c(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ga-Ib,ia),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),E[l].style+=c(E[l].style,e,u,E[l],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;");Va=H(e,u);Va=Va.replace("strokeColor","fillColor2");""==Va&&(Va="fillColor2=#000000;");1==+e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20-ia),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-ia),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ia),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Va,E.style+=c(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,+1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),U.style+=Va,U.style+=c(U.style,e,u,U));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];Ib=3;ia=25+Ib;Ga=80;Ac=10;ib=new mxCell("",new mxGeometry(Ga,0,r-Ga,p),"part=1;");ib.vertex=+!0;v.insert(ib);ib.style+=c(ib.style,e,u,ib);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,Ac+l*ia,Ga,ia-Ib),""),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),E[l].style+=c(E[l].style,e,u,E[l],G)):(x[l]=new mxCell("",new mxGeometry(0,Ac+l*ia,Ga,ia-Ib),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=c(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ga,ia-Ib),"fillColor=#000000;fillOpacity=25;"),+E[l].vertex=!0,x[l].insert(E[l]),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G)),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;"),E[l].style+=c(E[l].style,e,u,E[l]);Va=H(e,u);Va=Va.replace("strokeColor","fillColor2");""==Va&&(Va="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),+E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,0),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Va,E.style+=c(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(Ga,1,r-20-Ga,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(Ga,1,r-Ga,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),+U.style+=Va,U.style+=c(U.style,e,u,U));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";ia=p/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(0,l*ia+.5*ia-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=c(x[l].style,e,u,x[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&+(Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Z,E[l].style+=c(E[l].style,e,u,E[l]));break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";Ga=r/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(l*Ga,.5*p-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),+x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=c(x[l].style,e,u,x[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Z,E[l].style+=c(E[l].style,e,u,E[l]));break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";+ia=p/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(0,l*ia+.5*ia-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=c(x[l].style,e,u,x[l],G),null!=e.Selected&&e.Selected==l+1&&(Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2.5,+2.5,5,5),"ellipse;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Z,E[l].style+=c(E[l].style,e,u,E[l]));break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";Ga=r/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(l*Ga,.5*p-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=+c(x[l].style,e,u,x[l],G),null!=e.Selected&&e.Selected==l+1&&(Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"ellipse;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Z,E[l].style+=c(E[l].style,e,u,E[l]));break;case "UI2SelectBlock":v.style+="shape=mxgraph.mockup.forms.comboBox;strokeColor=#999999;fillColor=#ddeeff;align=left;fillColor2=#aaddff;mainText=;fontColor=#666666";v.value=m(e.Selected);break;case "UI2HSliderBlock":case "UI2VSliderBlock":v.style+=+"shape=mxgraph.mockup.forms.horSlider;sliderStyle=basic;handleStyle=handle;";"UI2VSliderBlock"==w.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*e.ScrollVal+";";v.style+=c(v.style,e,u,v);break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";x=new mxCell("",new mxGeometry(0,0,.6*r,p),"part=1;");x.vertex=!0;v.insert(x);x.value=m(e.Date);x.style+=a(e.Date,G);v.style+=c(v.style,e,u,v);Z=H(e,u);Z=Z.replace("strokeColor","fillColor");""==Z&&(Z="fillColor=#000000;");+E=new mxCell("",new mxGeometry(.75*r,0,.25*r,p),"part=1;shape=mxgraph.gmdl.calendar;");E.vertex=!0;v.insert(E);E.style+=Z;E.style+=c(E.style,e,u,E);break;case "UI2SearchBlock":v.value=m(e.Search);v.style+="shape=mxgraph.mockup.forms.searchBox;mainText=;flipH=1;align=left;spacingLeft=26;"+a(e.Search,G);v.style+=c(v.style,e,u,v,G);break;case "UI2NumericStepperBlock":Z=H(e,u);Z=Z.replace("strokeColor","fillColor");""==Z&&(Z="fillColor=#000000;");v.value=m(e.Number);v.style+="shape=mxgraph.mockup.forms.spinner;spinLayout=right;spinStyle=normal;adjStyle=triangle;mainText=;align=left;spacingLeft=8;"++Z+a(e.Number,G);v.style+=c(v.style,e,u,v,G);break;case "UI2TableBlock":try{lb=P(e.FillColor);var Ld=P(e.LineColor);Tc="";var ce=20;v.style="html=1;overflow=fill;verticalAlign=top;spacing=0;";var Md='<table style="width:100%;height:100%;border-collapse: collapse;border: 1px solid '+Ld+';">',uc=e.Data.split("\n");var jf=e.AltRow&&"default"!=e.AltRow?"none"==e.AltRow?lb:P(e.AltRow):Sd(lb,.95);Pc=e.Header&&"default"!=e.Header?"none"==e.Header?jf:P(e.Header):Sd(lb,.8);if("full"==e.GridLines)Tc="border: 1px solid "+Ld,ce=19;else if("row"==e.GridLines)Tc="border-bottom: 1px solid "+Ld,ce=19;else if("default"==e.GridLines||"column"==e.GridLines)Tc="border-right: 1px solid "+Ld;uc=uc.filter(function(hb){return hb});/^\{[^}]*\}$/.test(uc[uc.length-1])&&uc.pop();Gc=uc[0].split(",").length;var kf="";for(ha=0;ha<Gc-1;ha++)kf+=" , ";for(l=uc.length;l<Math.ceil(p/20);l++)uc.push(kf);for(l=0;l<uc.length;l++){Md+='<tr style="height: '+ce+"px;background:"+(0==l?Pc:l%2?lb:jf)+'">';var lf=uc[l].split(",");for(ha=0;ha<lf.length;ha++){var Nd=-e["Cell_"+l+"_"+ha],Tf=Nd&&Nd.m&&Nd.m[0]&&"c"==Nd.m[0].n?P(Nd.m[0].v):Ld;Md+='<td style="height: '+ce+"px;color:"+Tf+";"+Tc+'">'+mxUtils.htmlEntities(lf[ha])+"</td>"}Md+="</tr>"}Md+="</table>";v.value=Md}catch(hb){console.log(hb)}break;case "UI2ButtonBarBlock":v.style+=b(v.style,e,u,v);x=[];E=[];Ga=r/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga,p),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga,p),"strokeColor=none;"),-x[l].vertex=!0,v.insert(x[l]),x[l].style+=x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ga,p),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Button_"+(l+1)]),E[l].style+=a(e["Button_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G);break;case "UI2VerticalButtonBarBlock":v.style+=b(v.style,e,u,v);x=[];E=[];ia=p/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,l*ia,r,ia),""),E[l].vertex=!0,v.insert(E[l])):-(x[l]=new mxCell("",new mxGeometry(0,l*ia,r,ia),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,r,ia),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Button_"+(l+1)]),E[l].style+=a(e["Button_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=[];E=[];Ga=r/e.Links;for(l=0;l<e.Links;l++)0!=-l?(E[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga,p),"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),E[l].style+=b(E[l].style,e,u,E[l])):E[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga,p),"fillColor=none;strokeColor=none;"),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Link_"+(l+1)]),E[l].style+=a(e["Link_"+(l+1)],G);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=[];E=[];Ga=r/e.Links;for(l=0;l<e.Links;l++)x[l]=new mxCell("",new mxGeometry(l*-Ga,0,Ga,p),"fillColor=none;strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Link_"+(l+1)]),x[l].style+=a(e["Link_"+(l+1)],G);for(l=1;l<e.Links;l++)E[l]=new mxCell("",new mxGeometry(l/e.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),E[l].geometry.relative=!0,E[l].geometry.offset=new mxPoint(-3,-5),E[l].vertex=!0,v.insert(E[l]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);x=[];Ga=r/(e.Buttons+1);for(l=0;l<=e.Buttons-1;l++)x[l]=l!=e.Selected-+e["Cell_"+l+"_"+ha],Tf=Nd&&Nd.m&&Nd.m[0]&&"c"==Nd.m[0].n?P(Nd.m[0].v):Ld;Md+='<td style="height: '+ce+"px;color:"+Tf+";"+Tc+'">'+mxUtils.htmlEntities(lf[ha])+"</td>"}Md+="</tr>"}Md+="</table>";v.value=Md}catch(hb){console.log(hb)}break;case "UI2ButtonBarBlock":v.style+=c(v.style,e,u,v);x=[];E=[];Ga=r/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga,p),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga,p),"strokeColor=none;"),+x[l].vertex=!0,v.insert(x[l]),x[l].style+=x[l].style+=c(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ga,p),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Button_"+(l+1)]),E[l].style+=a(e["Button_"+(l+1)],G),E[l].style+=c(E[l].style,e,u,E[l],G);break;case "UI2VerticalButtonBarBlock":v.style+=c(v.style,e,u,v);x=[];E=[];ia=p/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,l*ia,r,ia),""),E[l].vertex=!0,v.insert(E[l])):+(x[l]=new mxCell("",new mxGeometry(0,l*ia,r,ia),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=c(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,r,ia),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Button_"+(l+1)]),E[l].style+=a(e["Button_"+(l+1)],G),E[l].style+=c(E[l].style,e,u,E[l],G);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,u,v);x=[];E=[];Ga=r/e.Links;for(l=0;l<e.Links;l++)0!=+l?(E[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga,p),"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),E[l].style+=c(E[l].style,e,u,E[l])):E[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga,p),"fillColor=none;strokeColor=none;"),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Link_"+(l+1)]),E[l].style+=a(e["Link_"+(l+1)],G);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,u,v);x=[];E=[];Ga=r/e.Links;for(l=0;l<e.Links;l++)x[l]=new mxCell("",new mxGeometry(l*+Ga,0,Ga,p),"fillColor=none;strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Link_"+(l+1)]),x[l].style+=a(e["Link_"+(l+1)],G);for(l=1;l<e.Links;l++)E[l]=new mxCell("",new mxGeometry(l/e.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),E[l].geometry.relative=!0,E[l].geometry.offset=new mxPoint(-3,-5),E[l].vertex=!0,v.insert(E[l]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;";v.style+=c(v.style,e,u,v);x=[];Ga=r/(e.Buttons+1);for(l=0;l<=e.Buttons-1;l++)x[l]=l!=e.Selected-1?new mxCell("",new mxGeometry(0,0,Ga,p),"strokeColor=none;fillColor=none;resizeHeight=1;"):new mxCell("",new mxGeometry(0,0,Ga,p),"fillColor=#000000;fillOpacity=25;strokeColor=none;resizeHeight=1;"),x[l].geometry.relative=!0,x[l].geometry.offset=new mxPoint(l*Ga,0),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["MenuItem_"+(l+1)]),x[l].style+=a(e["MenuItem_"+(l+1)],G);break;case "UI2AtoZBlock":v.style+="fillColor=none;strokeColor=none;"+a(e.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;"+a(e.Text_prev);v.value=m(e.Text_prev)+" ";for(l=0;l<e.Links;l++)v.value+=m(e["Link_"+(l+1)])+" ";v.value+=m(e.Text_next);break;case "UI2ContextMenuBlock":v.style+=b(v.style,e,u,v);X=[];ob=[];var kd=[];ia=p/e.Lines;ja=null;for(l=0;l<e.Lines;l++)null!=e["Item_"+(l+1)]&&(null==ja&&(ja=""+f(e["Item_"+(l+1)])+q(e["Item_"+(l+1)])+t(e["Item_"+(l+1)])),X[l]=new mxCell("",new mxGeometry(0,l*p/e.Lines,r,ia),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),+break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+a(e.Text_prev);v.value=m(e.Text_prev)+" ";for(l=0;l<e.Links;l++)v.value+=m(e["Link_"+(l+1)])+" ";v.value+=m(e.Text_next);break;case "UI2ContextMenuBlock":v.style+=c(v.style,e,u,v);X=[];ob=[];var kd=[];ia=p/e.Lines;ja=null;for(l=0;l<e.Lines;l++)null!=e["Item_"+(l+1)]&&(null==ja&&(ja=""+f(e["Item_"+(l+1)])+q(e["Item_"+(l+1)])+t(e["Item_"+(l+1)])),X[l]=new mxCell("",new mxGeometry(0,l*p/e.Lines,r,ia),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=ja,X[l].value=m(e["Item_"+(l+1)])),null!=e.Icons[l+1]&&null!=X[l]&&("dot"==e.Icons[l+1]?(ob[l]=new mxCell("",new mxGeometry(0,.5,8,8),"ellipse;strokeColor=none;"),ob[l].geometry.offset=new mxPoint(6,-4)):"check"==e.Icons[l+1]&&(ob[l]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),ob[l].geometry.offset=new mxPoint(6.5,-4)),null!=ob[l]&&(ob[l].geometry.relative=!0,ob[l].vertex=!0,X[l].insert(ob[l]),Z=H(e,u),Z=Z.replace("strokeColor","fillColor"),""==Z&&(Z="fillColor=#000000;"),ob[l].style+=Z)),null!=e["Shortcut_"+(l+1)]&&(null==ja&&(ja=""+f(e["Shortcut_"+(l+1)])+q(e["Shortcut_"+(l+1)])+t(e["Shortcut_"+(l+1)])),kd[l]=new mxCell("",new mxGeometry(.6*r,l*p/e.Lines,.4*r,ia),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),kd[l].vertex=!0,v.insert(kd[l]),kd[l].style+=ja,kd[l].value=m(e["Shortcut_"+(l+1)])),null!=e.Dividers[l+1]&&(X[l]=new mxCell("",new mxGeometry(.05*r,l*p/e.Lines,.9*-r,ia),"shape=line;strokeWidth=1;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=H(e,u));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*e.ScrollVal+";";break;case "CalloutSquareBlock":case "UI2TooltipSquareBlock":v.value=m(e.Tip||e.Text);v.style+="html=1;shape=callout;flipV=1;base=13;size=7;position=0.5;position2=0.66;rounded=1;arcSize="+e.RoundCorners+";"+a(e.Tip||e.Text,G);v.style+=b(v.style,e,u,v,G);v.geometry.height+=10;break;case "UI2CalloutBlock":v.value=-m(e.Txt);v.style+="shape=ellipse;perimeter=ellipsePerimeter;"+a(e.Txt,G);v.style+=b(v.style,e,u,v,G);break;case "UI2AlertBlock":v.value=m(e.Txt);v.style+=a(e.Txt,G);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");x.vertex=!0;v.insert(x);x.value=m(e.Title);x.style+=a(e.Title,G);x.style+=b(x.style,e,u,x,G);E=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");E.geometry.relative=!0;E.geometry.offset=-new mxPoint(-25,-10);E.vertex=!0;x.insert(E);var Uf=45*e.Buttons+(10*e.Buttons-1);U=[];for(l=0;l<e.Buttons;l++)U[l]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),U[l].geometry.relative=!0,U[l].geometry.offset=new mxPoint(.5*-Uf+55*l,-40),U[l].vertex=!0,v.insert(U[l]),U[l].value=m(e["Button_"+(l+1)]),U[l].style+=a(e["Button_"+(l+1)],G),U[l].style+=b(U[l].style,e,u,U[l],G);break;case "UMLClassBlock":if(0==e.Simple){ja=Y(e,u);eb=Math.round(.75*e.TitleHeight)||25;ja=ja.replace("fillColor",-"swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Title);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ja+"startSize="+eb+";"+a(e.Title,G);v.style+=b(v.style,e,u,v,G);X=[];var ve=[],wb=eb/p;Wb=eb;for(l=0;l<=e.Attributes;l++)0<l&&(ve[l]=new mxCell("",new mxGeometry(0,Wb,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),+r,ia),"shape=line;strokeWidth=1;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=H(e,u));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*e.ScrollVal+";";break;case "CalloutSquareBlock":case "UI2TooltipSquareBlock":v.value=m(e.Tip||e.Text);v.style+="html=1;shape=callout;flipV=1;base=13;size=7;position=0.5;position2=0.66;rounded=1;arcSize="+e.RoundCorners+";"+a(e.Tip||e.Text,G);v.style+=c(v.style,e,u,v,G);v.geometry.height+=10;break;case "UI2CalloutBlock":v.value=+m(e.Txt);v.style+="shape=ellipse;perimeter=ellipsePerimeter;"+a(e.Txt,G);v.style+=c(v.style,e,u,v,G);break;case "UI2AlertBlock":v.value=m(e.Txt);v.style+=a(e.Txt,G);v.style+=c(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");x.vertex=!0;v.insert(x);x.value=m(e.Title);x.style+=a(e.Title,G);x.style+=c(x.style,e,u,x,G);E=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");E.geometry.relative=!0;E.geometry.offset=+new mxPoint(-25,-10);E.vertex=!0;x.insert(E);var Uf=45*e.Buttons+(10*e.Buttons-1);U=[];for(l=0;l<e.Buttons;l++)U[l]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),U[l].geometry.relative=!0,U[l].geometry.offset=new mxPoint(.5*-Uf+55*l,-40),U[l].vertex=!0,v.insert(U[l]),U[l].value=m(e["Button_"+(l+1)]),U[l].style+=a(e["Button_"+(l+1)],G),U[l].style+=c(U[l].style,e,u,U[l],G);break;case "UMLClassBlock":if(0==e.Simple){ja=Y(e,u);eb=Math.round(.75*e.TitleHeight)||25;ja=ja.replace("fillColor",+"swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Title);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ja+"startSize="+eb+";"+a(e.Title,G);v.style+=c(v.style,e,u,v,G);X=[];var ve=[],wb=eb/p;Wb=eb;for(l=0;l<=e.Attributes;l++)0<l&&(ve[l]=new mxCell("",new mxGeometry(0,Wb,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),Wb+=8,ve[l].vertex=!0,v.insert(ve[l])),ia=0,0==e.Attributes?ia=l=1:l<e.Attributes?(ia=e["Text"+(l+1)+"Percent"],wb+=ia):ia=1-wb,pc=Math.round((p-eb)*ia)+(e.ExtraHeightSet&&1==l?.75*e.ExtraHeight:0),X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;whiteSpace=wrap;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;"),Wb+=pc,X[l].vertex=!0,v.insert(X[l]),X[l].style+=-ja+M(e,u,X[l])+a(e["Text"+(l+1)],G),X[l].value=m(e["Text"+(l+1)])}else v.value=m(e.Title),v.style+="align=center;",v.style+=a(e.Title,G),v.style+=b(v.style,e,u,v,G);break;case "ERDEntityBlock":ja=Y(e,u);eb=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ja+"startSize="+-eb+";"+a(e.Name,G);v.style+=b(v.style,e,u,v,G);e.ShadedHeader?(ja=P(e.FillColor),ke=Sd(ja,.85),v.style+="fillColor="+ke+";"):v.style+=Y(e,u);X=[];wb=eb/p;Wb=eb;for(l=0;l<e.Fields;l++)ia=0,pc=.75*e["Field"+(l+1)+"_h"],X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"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;html=1;whiteSpace=wrap;"),Wb+=pc,X[l].vertex=!0,v.insert(X[l]),X[l].style+=+ja+M(e,u,X[l])+a(e["Text"+(l+1)],G),X[l].value=m(e["Text"+(l+1)])}else v.value=m(e.Title),v.style+="align=center;",v.style+=a(e.Title,G),v.style+=c(v.style,e,u,v,G);break;case "ERDEntityBlock":ja=Y(e,u);eb=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ja+"startSize="++eb+";"+a(e.Name,G);v.style+=c(v.style,e,u,v,G);e.ShadedHeader?(ja=P(e.FillColor),ke=Sd(ja,.85),v.style+="fillColor="+ke+";"):v.style+=Y(e,u);X=[];wb=eb/p;Wb=eb;for(l=0;l<e.Fields;l++)ia=0,pc=.75*e["Field"+(l+1)+"_h"],X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"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;html=1;whiteSpace=wrap;"),Wb+=pc,X[l].vertex=!0,v.insert(X[l]),X[l].style+=ja+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;opacity=5;":X[l].style+("fillColor=none;"+M(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]);break;case "ERDEntityBlock2":ja=Y(e,u);eb=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ja+"startSize="+eb+";"+a(e.Name,G);v.style=e.ShadedHeader?-v.style+"fillColor=#e0e0e0;":v.style+Y(e,u);v.style+=b(v.style,e,u,v,G);X=[];var Fa=[];wb=eb;var Jb=30;null!=e.Column1&&(Jb=.75*e.Column1);for(l=0;l<e.Fields;l++)ia=0,Fa[l]=new mxCell("",new mxGeometry(0,wb,Jb,.75*e["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;html=1;whiteSpace=wrap;"),Fa[l].vertex=!0,v.insert(Fa[l]),Fa[l].style+=ja+a(e["Key"+(l+1)],+v.style+"fillColor=#e0e0e0;":v.style+Y(e,u);v.style+=c(v.style,e,u,v,G);X=[];var Fa=[];wb=eb;var Jb=30;null!=e.Column1&&(Jb=.75*e.Column1);for(l=0;l<e.Fields;l++)ia=0,Fa[l]=new mxCell("",new mxGeometry(0,wb,Jb,.75*e["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;html=1;whiteSpace=wrap;"),Fa[l].vertex=!0,v.insert(Fa[l]),Fa[l].style+=ja+a(e["Key"+(l+1)],G),Fa[l].style=1==e.AltRows&&0!=l%2?Fa[l].style+"fillColor=#000000;fillOpacity=5;":Fa[l].style+("fillColor=none;"+M(e,u,Fa[l])),Fa[l].value=m(e["Key"+(l+1)]),X[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb,.75*e["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;html=1;whiteSpace=wrap;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=-ja+a(e["Field"+(l+1)],G),v.style+=b(v.style,e,u,v),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+M(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]),wb+=.75*e["Key"+(l+1)+"_h"];break;case "ERDEntityBlock3":ja=Y(e,u);eb=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ja+"startSize="+eb+-";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+Y(e,u);v.value=m(e.Name);v.style+=b(v.style,e,u,v,G);X=[];Fa=[];wb=eb;Jb=30;null!=e.Column1&&(Jb=.75*e.Column1);for(l=0;l<e.Fields;l++)ia=0,Fa[l]=new mxCell("",new mxGeometry(0,wb,Jb,.75*e["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;whiteSpace=wrap;"),Fa[l].vertex=!0,v.insert(Fa[l]),-Fa[l].style+=ja+a(e["Field"+(l+1)],G),Fa[l].style=1==e.AltRows&&0!=l%2?Fa[l].style+"fillColor=#000000;fillOpacity=5;":Fa[l].style+("fillColor=none;"+M(e,u,Fa[l])),Fa[l].value=m(e["Field"+(l+1)]),Fa[l].style+=b(Fa[l].style,e,u,Fa[l],G),X[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb,.75*e["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;whiteSpace=wrap;"),-X[l].vertex=!0,v.insert(X[l]),X[l].style+=ja+a(e["Type"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+M(e,u,X[l])),X[l].value=m(e["Type"+(l+1)]),X[l].style+=b(X[l].style,e,u,X[l],G),wb+=.75*e["Field"+(l+1)+"_h"];break;case "ERDEntityBlock4":ja=Y(e,u);eb=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+-ja+"startSize="+eb+";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+Y(e,u);v.value=m(e.Name);v.style+=b(v.style,e,u,v,G);X=[];Fa=[];var Kb=[];wb=eb;Jb=30;var de=40;null!=e.Column1&&(Jb=.75*e.Column1);null!=e.Column2&&(de=.75*e.Column2);for(l=0;l<e.Fields;l++)ia=0,Fa[l]=new mxCell("",new mxGeometry(0,wb,Jb,.75*e["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;whiteSpace=wrap;"),-Fa[l].vertex=!0,v.insert(Fa[l]),Fa[l].style+=ja+a(e["Key"+(l+1)],G),Fa[l].style=1==e.AltRows&&0!=l%2?Fa[l].style+"fillColor=#000000;fillOpacity=5;":Fa[l].style+("fillColor=none;"+M(e,u,Fa[l])),Fa[l].value=m(e["Key"+(l+1)]),Fa[l].style+=b(Fa[l].style,e,u,Fa[l],G),X[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb-de,.75*e["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;whiteSpace=wrap;"),-X[l].vertex=!0,v.insert(X[l]),X[l].style+=ja+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+M(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]),X[l].style+=b(X[l].style,e,u,X[l],G),Kb[l]=new mxCell("",new mxGeometry(r-de,wb,de,.75*e["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;whiteSpace=wrap;"),-Kb[l].vertex=!0,v.insert(Kb[l]),Kb[l].style+=ja+a(e["Type"+(l+1)],G),Kb[l].style=1==e.AltRows&&0!=l%2?Kb[l].style+"fillColor=#000000;fillOpacity=5;":Kb[l].style+("fillColor=none;"+M(e,u,Kb[l])),Kb[l].value=m(e["Type"+(l+1)]),Kb[l].style+=b(Kb[l].style,e,u,Kb[l],G),wb+=.75*e["Key"+(l+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":Ta("application_system",r,p,v,e,u);break;case "GCPServiceCardAuthorizationBlock":Ta("internal_payment_authorization",r,p,v,e,u);break;case "GCPServiceCardBlankBlock":Ta("blank",+ja+a(e["Field"+(l+1)],G),v.style+=c(v.style,e,u,v),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+M(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]),wb+=.75*e["Key"+(l+1)+"_h"];break;case "ERDEntityBlock3":ja=Y(e,u);eb=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ja+"startSize="+eb++";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+Y(e,u);v.value=m(e.Name);v.style+=c(v.style,e,u,v,G);X=[];Fa=[];wb=eb;Jb=30;null!=e.Column1&&(Jb=.75*e.Column1);for(l=0;l<e.Fields;l++)ia=0,Fa[l]=new mxCell("",new mxGeometry(0,wb,Jb,.75*e["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;whiteSpace=wrap;"),Fa[l].vertex=!0,v.insert(Fa[l]),+Fa[l].style+=ja+a(e["Field"+(l+1)],G),Fa[l].style=1==e.AltRows&&0!=l%2?Fa[l].style+"fillColor=#000000;fillOpacity=5;":Fa[l].style+("fillColor=none;"+M(e,u,Fa[l])),Fa[l].value=m(e["Field"+(l+1)]),Fa[l].style+=c(Fa[l].style,e,u,Fa[l],G),X[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb,.75*e["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;whiteSpace=wrap;"),+X[l].vertex=!0,v.insert(X[l]),X[l].style+=ja+a(e["Type"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+M(e,u,X[l])),X[l].value=m(e["Type"+(l+1)]),X[l].style+=c(X[l].style,e,u,X[l],G),wb+=.75*e["Field"+(l+1)+"_h"];break;case "ERDEntityBlock4":ja=Y(e,u);eb=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"++ja+"startSize="+eb+";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+Y(e,u);v.value=m(e.Name);v.style+=c(v.style,e,u,v,G);X=[];Fa=[];var Kb=[];wb=eb;Jb=30;var de=40;null!=e.Column1&&(Jb=.75*e.Column1);null!=e.Column2&&(de=.75*e.Column2);for(l=0;l<e.Fields;l++)ia=0,Fa[l]=new mxCell("",new mxGeometry(0,wb,Jb,.75*e["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;whiteSpace=wrap;"),+Fa[l].vertex=!0,v.insert(Fa[l]),Fa[l].style+=ja+a(e["Key"+(l+1)],G),Fa[l].style=1==e.AltRows&&0!=l%2?Fa[l].style+"fillColor=#000000;fillOpacity=5;":Fa[l].style+("fillColor=none;"+M(e,u,Fa[l])),Fa[l].value=m(e["Key"+(l+1)]),Fa[l].style+=c(Fa[l].style,e,u,Fa[l],G),X[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb-de,.75*e["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;whiteSpace=wrap;"),+X[l].vertex=!0,v.insert(X[l]),X[l].style+=ja+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+M(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]),X[l].style+=c(X[l].style,e,u,X[l],G),Kb[l]=new mxCell("",new mxGeometry(r-de,wb,de,.75*e["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;whiteSpace=wrap;"),+Kb[l].vertex=!0,v.insert(Kb[l]),Kb[l].style+=ja+a(e["Type"+(l+1)],G),Kb[l].style=1==e.AltRows&&0!=l%2?Kb[l].style+"fillColor=#000000;fillOpacity=5;":Kb[l].style+("fillColor=none;"+M(e,u,Kb[l])),Kb[l].value=m(e["Type"+(l+1)]),Kb[l].style+=c(Kb[l].style,e,u,Kb[l],G),wb+=.75*e["Key"+(l+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":Ta("application_system",r,p,v,e,u);break;case "GCPServiceCardAuthorizationBlock":Ta("internal_payment_authorization",r,p,v,e,u);break;case "GCPServiceCardBlankBlock":Ta("blank",r,p,v,e,u);break;case "GCPServiceCardReallyBlankBlock":Ta("blank",r,p,v,e,u);break;case "GCPServiceCardBucketBlock":Ta("bucket",r,p,v,e,u);break;case "GCPServiceCardCDNInterconnectBlock":Ta("google_network_edge_cache",r,p,v,e,u);break;case "GCPServiceCardCloudDNSBlock":Ta("blank",r,p,v,e,u);break;case "GCPServiceCardClusterBlock":Ta("cluster",r,p,v,e,u);break;case "GCPServiceCardDiskSnapshotBlock":Ta("persistent_disk_snapshot",r,p,v,e,u);break;case "GCPServiceCardEdgePopBlock":Ta("google_network_edge_cache",r,p,v,e,u);break;case "GCPServiceCardFrontEndPlatformServicesBlock":Ta("frontend_platform_services",r,p,v,e,u);break;case "GCPServiceCardGatewayBlock":Ta("gateway",r,p,v,e,u);break;case "GCPServiceCardGoogleNetworkBlock":Ta("google_network_edge_cache",r,p,v,e,u);break;case "GCPServiceCardImageServicesBlock":Ta("image_services",r,p,v,e,u);break;case "GCPServiceCardLoadBalancerBlock":Ta("network_load_balancer",r,p,v,e,u);break;case "GCPServiceCardLocalComputeBlock":Ta("dedicated_game_server",r,p,v,e,u);break;case "GCPServiceCardLocalStorageBlock":Ta("persistent_disk_snapshot",r,p,v,e,u);break;case "GCPServiceCardLogsAPIBlock":Ta("logs_api",r,p,v,e,u);break;case "GCPServiceCardMemcacheBlock":Ta("memcache",r,p,v,e,u);break;case "GCPServiceCardNATBlock":Ta("nat",r,p,v,e,u);break;case "GCPServiceCardPaymentFormBlock":Ta("external_payment_form",r,p,v,e,u);break;case "GCPServiceCardPushNotificationsBlock":Ta("push_notification_service",r,p,v,e,u);break;case "GCPServiceCardScheduledTasksBlock":Ta("scheduled_tasks",r,p,v,e,u);break;case "GCPServiceCardServiceDiscoveryBlock":Ta("service_discovery",r,p,v,e,u);break;case "GCPServiceCardSquidProxyBlock":Ta("squid_proxy",r,p,v,e,u);break;case "GCPServiceCardTaskQueuesBlock":Ta("task_queues",r,p,v,e,u);break;case "GCPServiceCardVirtualFileSystemBlock":Ta("virtual_file_system",r,p,v,e,u);break;case "GCPServiceCardVPNGatewayBlock":Ta("gateway",r,p,v,e,u);break;case "GCPInputDatabase":Ya("database",1,.9,r,p,v,e,u);break;case "GCPInputRecord":Ya("record",1,.66,r,p,v,e,u);break;case "GCPInputPayment":Ya("payment",1,.8,r,p,v,e,u);break;case "GCPInputGateway":Ya("gateway_icon",1,.44,r,p,v,e,u);break;case "GCPInputLocalCompute":Ya("compute_engine_icon",1,.89,r,p,v,e,u);break;case "GCPInputBeacon":Ya("beacon",.73,1,r,p,v,e,u);break;case "GCPInputStorage":Ya("storage",1,.8,r,p,v,e,u);break;case "GCPInputList":Ya("list",.89,1,r,p,v,e,u);break;case "GCPInputStream":Ya("stream",1,.82,r,p,v,e,u);break;case "GCPInputMobileDevices":Ya("mobile_devices",1,.73,r,p,v,e,u);break;case "GCPInputCircuitBoard":Ya("circuit_board",1,.9,r,p,v,e,u);break;case "GCPInputLive":Ya("live",.74,1,r,p,v,e,u);break;case "GCPInputUsers":Ya("users",1,.63,r,p,v,e,u);break;case "GCPInputLaptop":Ya("laptop",1,.66,r,p,v,e,u);break;case "GCPInputApplication":Ya("application",1,.8,r,p,v,e,u);break;case "GCPInputLightbulb":Ya("lightbulb",.7,1,r,p,v,e,u);break;case "GCPInputGame":Ya("game",1,.54,r,p,v,e,u);break;case "GCPInputDesktop":Ya("desktop",1,.9,r,p,v,e,u);break;case "GCPInputDesktopAndMobile":Ya("desktop_and_mobile",-1,.66,r,p,v,e,u);break;case "GCPInputWebcam":Ya("webcam",.5,1,r,p,v,e,u);break;case "GCPInputSpeaker":Ya("speaker",.7,1,r,p,v,e,u);break;case "GCPInputRetail":Ya("retail",1,.89,r,p,v,e,u);break;case "GCPInputReport":Ya("report",1,1,r,p,v,e,u);break;case "GCPInputPhone":Ya("phone",.64,1,r,p,v,e,u);break;case "GCPInputBlank":Ya("transparent",1,1,r,p,v,e,u);break;case "PresentationFrameBlock":0==e.ZOrder?v.style+="strokeColor=none;fillColor=none;":(v.style+=a(e.Text),v.value=m(e.Text),v.style+=b(v.style,+1,.66,r,p,v,e,u);break;case "GCPInputWebcam":Ya("webcam",.5,1,r,p,v,e,u);break;case "GCPInputSpeaker":Ya("speaker",.7,1,r,p,v,e,u);break;case "GCPInputRetail":Ya("retail",1,.89,r,p,v,e,u);break;case "GCPInputReport":Ya("report",1,1,r,p,v,e,u);break;case "GCPInputPhone":Ya("phone",.64,1,r,p,v,e,u);break;case "GCPInputBlank":Ya("transparent",1,1,r,p,v,e,u);break;case "PresentationFrameBlock":0==e.ZOrder?v.style+="strokeColor=none;fillColor=none;":(v.style+=a(e.Text),v.value=m(e.Text),v.style+=c(v.style,e,u,v,G));break;case "SVGPathBlock2":try{var Vf=e.LineWidth,Wf=e.LineColor,mf=e.FillColor,nf=e.DrawData.Data,ee='<svg viewBox="0 0 1 1" xmlns="http://www.w3.org/2000/svg">',we=null;for(l=0;l<nf.length;l++){var vc=nf[l],Xf=vc.a,Yf=("prop"==vc.w||null==vc.w?Vf:vc.w)/Math.min(r,p)*.75;Sc="prop"==vc.s||null==vc.s?Wf:vc.s;Z="prop"==vc.f||null==vc.f?mf:vc.f;"object"==typeof Z&&(null!=Z.url&&(we="shape=image;image="+g(Z.url)+";"),Z=Array.isArray(Z.cs)?Z.cs[0].c:mf);ee+='<path d="'+Xf+'" fill="'+Z+'" stroke="'+-Sc+'" stroke-width="'+Yf+'"/>'}ee+="</svg>";v.style=we?we:"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,"+(window.btoa?btoa(ee):Base64.encode(ee,!0))+";"}catch(hb){}break;case "BraceBlock":case "BraceBlockRotated":case "BracketBlock":case "BracketBlockRotated":var of=0==W.indexOf("Bracket")?"size=0;arcSize=50;":"",pf=b(v.style,e,u,v,G);nb=T(e,u,v);v.style="group;"+nb;var xe=Math.min(.14*(nb?r:p),100),ye=-new mxCell("",new mxGeometry(0,0,xe,p),"shape=curlyBracket;rounded=1;"+of+pf);ye.vertex=!0;ye.geometry.relative=!0;var ze=new mxCell("",new mxGeometry(1-xe/r,0,xe,p),"shape=curlyBracket;rounded=1;flipH=1;"+of+pf);ze.vertex=!0;ze.geometry.relative=!0;v.insert(ye);v.insert(ze);break;case "BPMNTextAnnotation":case "NoteBlock":e.InsetMargin=null;v.value=m(e.Text);v.style="group;spacingLeft=8;align=left;spacing=0;strokeColor=none;";v.style+=b(v.style,e,u,v,G);0>v.style.indexOf("verticalAlign")&&(v.style+=-"verticalAlign=middle;");var ld=new mxCell("",new mxGeometry(0,0,8,p),"shape=partialRectangle;right=0;fillColor=none;");ld.geometry.relative=!0;ld.vertex=!0;ld.style+=b(ld.style,e,u,v,G);v.insert(ld);break;case "VSMTimelineBlock":case "TimelineBlock":case "TimelineMilestoneBlock":case "TimelineIntervalBlock":LucidImporter.hasTimeLine=!0;LucidImporter.hasUnknownShapes=!0;break;case "FreehandBlock":try{nb=T(e,u,v);v.style="group;"+nb;if(null!=e.Stencil){null==e.Stencil.id&&(e.Stencil.id="$$tmpId$$",+Sc+'" stroke-width="'+Yf+'"/>'}ee+="</svg>";v.style=we?we:"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,"+(window.btoa?btoa(ee):Base64.encode(ee,!0))+";"}catch(hb){}break;case "BraceBlock":case "BraceBlockRotated":case "BracketBlock":case "BracketBlockRotated":var of=0==W.indexOf("Bracket")?"size=0;arcSize=50;":"",pf=c(v.style,e,u,v,G);nb=T(e,u,v);v.style="group;"+nb;var xe=Math.min(.14*(nb?r:p),100),ye=+new mxCell("",new mxGeometry(0,0,xe,p),"shape=curlyBracket;rounded=1;"+of+pf);ye.vertex=!0;ye.geometry.relative=!0;var ze=new mxCell("",new mxGeometry(1-xe/r,0,xe,p),"shape=curlyBracket;rounded=1;flipH=1;"+of+pf);ze.vertex=!0;ze.geometry.relative=!0;v.insert(ye);v.insert(ze);break;case "BPMNTextAnnotation":case "NoteBlock":e.InsetMargin=null;v.value=m(e.Text);v.style="group;spacingLeft=8;align=left;spacing=0;strokeColor=none;";v.style+=c(v.style,e,u,v,G);0>v.style.indexOf("verticalAlign")&&(v.style+=+"verticalAlign=middle;");var ld=new mxCell("",new mxGeometry(0,0,8,p),"shape=partialRectangle;right=0;fillColor=none;");ld.geometry.relative=!0;ld.vertex=!0;ld.style+=c(ld.style,e,u,v,G);v.insert(ld);break;case "VSMTimelineBlock":case "TimelineBlock":case "TimelineMilestoneBlock":case "TimelineIntervalBlock":LucidImporter.hasTimeLine=!0;LucidImporter.hasUnknownShapes=!0;break;case "FreehandBlock":try{nb=T(e,u,v);v.style="group;"+nb;if(null!=e.Stencil){null==e.Stencil.id&&(e.Stencil.id="$$tmpId$$",Le(e.Stencil.id,e.Stencil));var Pb=LucidImporter.stencilsMap[e.Stencil.id],Zf=-Pb.x/Pb.w,$f=-Pb.y/Pb.h;for(l=0;l<Pb.stencils.length;l++){var pb=Pb.stencils[l];qa=new mxCell("",new mxGeometry(Zf,$f,r,p),"shape="+pb.shapeStencil+";");var ag=pb.FillColor,bg=pb.LineColor,cg=pb.LineWidth;"prop"==pb.FillColor&&(pb.FillColor=e.FillColor);null==pb.FillColor&&(pb.FillColor="#ffffff00");"prop"==pb.LineColor&&(pb.LineColor=e.LineColor);null==pb.LineColor&&(pb.LineColor="#ffffff00");"prop"==pb.LineWidth&&(pb.LineWidth=-e.LineWidth);qa.style+=b(qa.style,pb,u,qa,G);pb.FillColor=ag;pb.LineColor=bg;pb.LineWidth=cg;Z=e.FillColor;var dg=e.LineColor,eg=e.LineWidth;e.FillColor=null;e.LineColor=null;e.LineWidth=null;qa.style+=b(qa.style,e,u,qa,G);e.FillColor=Z;e.LineColor=dg;e.LineWidth=eg;qa.vertex=!0;qa.geometry.relative=!0;v.insert(qa)}var Xb=0;for(nb=e.Rotation;e["t"+Xb];){var qf=e["t"+Xb],rf=m(qf);if(rf){ra=new mxCell(rf,new mxGeometry(0,0,r,p),"strokeColor=none;fillColor=none;overflow=visible;");e.Rotation=0;ra.style+=-b(ra.style,qf,u,ra,G);ra.style+=b(ra.style,e,u,ra,G);e.Rotation=nb;if(null!=Pb.text&&null!=Pb.text["t"+Xb]){var fb=Pb.text["t"+Xb];fb.Rotation=nb+(fb.rotation?fb.rotation:0)+(e["t"+Xb+"_TRotation"]?e["t"+Xb+"_TRotation"]:0)+(e["t"+Xb+"_TAngle"]?e["t"+Xb+"_TAngle"]:0);ra.style+=b(ra.style,fb,u,ra,G);var Yb=ra.geometry;fb.w&&(Yb.width*=fb.w/Pb.w);fb.h&&(Yb.height*=fb.h/Pb.h);fb.x&&(Yb.x=fb.x/Pb.w);fb.y&&(Yb.y=fb.y/Pb.h);fb.fw&&(Yb.width*=.75*fb.fw/r);fb.fh&&(Yb.height*=.75*fb.fh/p);fb.fx&&(Yb.x=(0<-fb.fx?1:0)+.75*fb.fx/r);fb.fy&&(Yb.y=(0<fb.fy?1:0)+.75*fb.fy/p)}ra.vertex=!0;ra.geometry.relative=!0;v.insert(ra)}Xb++}}if(e.FillColor&&e.FillColor.url){var Od=new mxCell("",new mxGeometry(0,0,r,p),"shape=image;html=1;");Od.style+=Ra({},{},e.FillColor.url);Od.vertex=!0;Od.geometry.relative=!0;v.insert(Od)}}catch(hb){console.log("Freehand error",hb)}break;case "RightArrowBlock":var Ae=e.Head*p/r;v.style="shape=singleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+Ae;v.value=m(e);v.style+=b(v.style,-e,u,v,G);break;case "DoubleArrowBlock":Ae=e.Head*p/r;v.style="shape=doubleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+Ae;v.value=m(e);v.style+=b(v.style,e,u,v,G);break;case "VPCSubnet2017":case "VirtualPrivateCloudContainer2017":case "ElasticBeanStalkContainer2017":case "EC2InstanceContents2017":case "AWSCloudContainer2017":case "CorporateDataCenterContainer2017":switch(W){case "VPCSubnet2017":var md="shape=mxgraph.aws3.permissions;fillColor=#D9A741;";var nd=30;var od=35;break;case "VirtualPrivateCloudContainer2017":md=+e.LineWidth);qa.style+=c(qa.style,pb,u,qa,G);pb.FillColor=ag;pb.LineColor=bg;pb.LineWidth=cg;Z=e.FillColor;var dg=e.LineColor,eg=e.LineWidth;e.FillColor=null;e.LineColor=null;e.LineWidth=null;qa.style+=c(qa.style,e,u,qa,G);e.FillColor=Z;e.LineColor=dg;e.LineWidth=eg;qa.vertex=!0;qa.geometry.relative=!0;v.insert(qa)}var Xb=0;for(nb=e.Rotation;e["t"+Xb];){var qf=e["t"+Xb],rf=m(qf);if(rf){ra=new mxCell(rf,new mxGeometry(0,0,r,p),"strokeColor=none;fillColor=none;overflow=visible;");e.Rotation=0;ra.style+=+c(ra.style,qf,u,ra,G);ra.style+=c(ra.style,e,u,ra,G);e.Rotation=nb;if(null!=Pb.text&&null!=Pb.text["t"+Xb]){var fb=Pb.text["t"+Xb];fb.Rotation=nb+(fb.rotation?fb.rotation:0)+(e["t"+Xb+"_TRotation"]?e["t"+Xb+"_TRotation"]:0)+(e["t"+Xb+"_TAngle"]?e["t"+Xb+"_TAngle"]:0);ra.style+=c(ra.style,fb,u,ra,G);var Yb=ra.geometry;fb.w&&(Yb.width*=fb.w/Pb.w);fb.h&&(Yb.height*=fb.h/Pb.h);fb.x&&(Yb.x=fb.x/Pb.w);fb.y&&(Yb.y=fb.y/Pb.h);fb.fw&&(Yb.width*=.75*fb.fw/r);fb.fh&&(Yb.height*=.75*fb.fh/p);fb.fx&&(Yb.x=(0<+fb.fx?1:0)+.75*fb.fx/r);fb.fy&&(Yb.y=(0<fb.fy?1:0)+.75*fb.fy/p)}ra.vertex=!0;ra.geometry.relative=!0;v.insert(ra)}Xb++}}if(e.FillColor&&e.FillColor.url){var Od=new mxCell("",new mxGeometry(0,0,r,p),"shape=image;html=1;");Od.style+=Ra({},{},e.FillColor.url);Od.vertex=!0;Od.geometry.relative=!0;v.insert(Od)}}catch(hb){console.log("Freehand error",hb)}break;case "RightArrowBlock":var Ae=e.Head*p/r;v.style="shape=singleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+Ae;v.value=m(e);v.style+=c(v.style,+e,u,v,G);break;case "DoubleArrowBlock":Ae=e.Head*p/r;v.style="shape=doubleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+Ae;v.value=m(e);v.style+=c(v.style,e,u,v,G);break;case "VPCSubnet2017":case "VirtualPrivateCloudContainer2017":case "ElasticBeanStalkContainer2017":case "EC2InstanceContents2017":case "AWSCloudContainer2017":case "CorporateDataCenterContainer2017":switch(W){case "VPCSubnet2017":var md="shape=mxgraph.aws3.permissions;fillColor=#D9A741;";var nd=30;var od=35;break;case "VirtualPrivateCloudContainer2017":md="shape=mxgraph.aws3.virtual_private_cloud;fillColor=#F58536;";nd=52;od=36;break;case "ElasticBeanStalkContainer2017":md="shape=mxgraph.aws3.elastic_beanstalk;fillColor=#F58536;";nd=30;od=41;break;case "EC2InstanceContents2017":md="shape=mxgraph.aws3.instance;fillColor=#F58536;";nd=40;od=41;break;case "AWSCloudContainer2017":md="shape=mxgraph.aws3.cloud;fillColor=#F58536;";nd=52;od=36;break;case "CorporateDataCenterContainer2017":md="shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;",nd=-30,od=42}v.style="rounded=1;arcSize=10;dashed=0;verticalAlign=bottom;";v.value=m(e);v.style+=b(v.style,e,u,v,G);v.geometry.y+=20;v.geometry.height-=20;ob=new mxCell("",new mxGeometry(20,-20,nd,od),md);ob.vertex=!0;v.insert(ob);break;case "FlexiblePolygonBlock":var Xc=['<shape strokewidth="inherit"><foreground>'];Xc.push("<path>");for(ha=0;ha<e.Vertices.length;ha++)Pa=e.Vertices[ha],0==ha?Xc.push('<move x="'+100*Pa.x+'" y="'+100*Pa.y+'"/>'):Xc.push('<line x="'+100*Pa.x+'" y="'+100*Pa.y+'"/>');Xc.push("</path>");-Xc.push("<fillstroke/>");Xc.push("</foreground></shape>");v.style="shape=stencil("+Graph.compress(Xc.join(""))+");";v.value=m(e);v.style+=b(v.style,e,u,v,G);break;case "InfographicsBlock":var sf=e.ShapeData_1.Value,Be=e.ShapeData_2.Value-sf,Ce=e.ShapeData_3.Value-sf,fe=e.ShapeData_4.Value*r/200;Xb="ProgressBar"==e.InternalStencilId?4:5;lb=e["ShapeData_"+Xb].Value;lb="=fillColor()"==lb?e.FillColor:lb;var pd=e["ShapeData_"+(Xb+1)].Value;switch(e.InternalStencilId){case "ProgressDonut":v.style="shape=mxgraph.basic.donut;dx="+-fe+";strokeColor=none;fillColor="+P(pd)+";"+ea(pd,"fillOpacity");v.style+=b(v.style,e,u,v,G);var bb=new mxCell("",new mxGeometry(0,0,r,p),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+Ce/Be+";arcWidth="+fe/r*2+";strokeColor=none;fillColor="+P(lb)+";"+ea(lb,"fillOpacity"));bb.style+=b(bb.style,e,u,bb,G);bb.vertex=!0;bb.geometry.relative=1;v.insert(bb);break;case "ProgressHalfDonut":v.geometry.height*=2;v.geometry.rotate90();var tf=Ce/Be/2;v.style="shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+-tf+";arcWidth="+2*fe/r+";strokeColor=none;fillColor="+P(lb)+";"+ea(lb,"fillOpacity");e.Rotation-=Math.PI/2;v.style+=b(v.style,e,u,v,G);bb=new mxCell("",new mxGeometry(0,0,v.geometry.width,v.geometry.height),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+(.5-tf)+";arcWidth="+2*fe/r+";strokeColor=none;flipH=1;fillColor="+P(pd)+";"+ea(pd,"fillOpacity"));e.Rotation+=Math.PI;bb.style+=b(bb.style,e,u,bb,G);bb.vertex=!0;bb.geometry.relative=1;v.insert(bb);break;case "ProgressBar":v.style="strokeColor=none;fillColor="+-P(pd)+";"+ea(pd,"fillOpacity"),v.style+=b(v.style,e,u,v,G),bb=new mxCell("",new mxGeometry(0,0,r*Ce/Be,p),"strokeColor=none;fillColor="+P(lb)+";"+ea(lb,"fillOpacity")),bb.style+=b(bb.style,e,u,bb,G),bb.vertex=!0,bb.geometry.relative=1,v.insert(bb)}break;case "InternalStorageBlock":v.style+="shape=internalStorage;dx=10;dy=10";if(e.Text&&e.Text.m){var ge=e.Text.m,De=!1,Ee=!1;for(l=0;l<ge.length;l++){var qd=ge[l];De||"mt"!=qd.n?Ee||"il"!=qd.n||(qd.v=17+(qd.v||0),Ee=!0):(qd.v=17+(qd.v||0),De=!0)}De||-ge.push({s:0,n:"mt",v:17});Ee||ge.push({s:0,n:"il",v:17})}v.value=m(e);v.style+=b(v.style,e,u,v,G);break;case "PersonRoleBlock":try{ja=Y(e,u);eb=p/2;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Role);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ja+"startSize="+eb+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Role,G);v.style+=b(v.style,-e,u,v,G);var Fc=new mxCell("",new mxGeometry(0,p/2,r,p/2),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");Fc.value=m(e.Name);Fc.vertex=!0;v.insert(Fc);Fc.style+=a(e.Name,G);Fc.style+=b(Fc.style,e,u,Fc,G)}catch(hb){console.log(hb)}}v.style&&0>v.style.indexOf("html")&&(v.style+="html=1;");if(e.Title&&e.Title.t&&e.Text&&e.Text.t)try{var uf=v.geometry,vf=new mxCell(m(e.Title),new mxGeometry(0,uf.height+4,uf.width,10),"strokeColor=none;fillColor=none;whiteSpace=wrap;verticalAlign=top;labelPosition=center;verticalLabelPosition=top;align=center;");+30,od=42}v.style="rounded=1;arcSize=10;dashed=0;verticalAlign=bottom;";v.value=m(e);v.style+=c(v.style,e,u,v,G);v.geometry.y+=20;v.geometry.height-=20;ob=new mxCell("",new mxGeometry(20,-20,nd,od),md);ob.vertex=!0;v.insert(ob);break;case "FlexiblePolygonBlock":var Xc=['<shape strokewidth="inherit"><foreground>'];Xc.push("<path>");for(ha=0;ha<e.Vertices.length;ha++)Pa=e.Vertices[ha],0==ha?Xc.push('<move x="'+100*Pa.x+'" y="'+100*Pa.y+'"/>'):Xc.push('<line x="'+100*Pa.x+'" y="'+100*Pa.y+'"/>');Xc.push("</path>");+Xc.push("<fillstroke/>");Xc.push("</foreground></shape>");v.style="shape=stencil("+Graph.compress(Xc.join(""))+");";v.value=m(e);v.style+=c(v.style,e,u,v,G);break;case "InfographicsBlock":var sf=e.ShapeData_1.Value,Be=e.ShapeData_2.Value-sf,Ce=e.ShapeData_3.Value-sf,fe=e.ShapeData_4.Value*r/200;Xb="ProgressBar"==e.InternalStencilId?4:5;lb=e["ShapeData_"+Xb].Value;lb="=fillColor()"==lb?e.FillColor:lb;var pd=e["ShapeData_"+(Xb+1)].Value;switch(e.InternalStencilId){case "ProgressDonut":v.style="shape=mxgraph.basic.donut;dx="++fe+";strokeColor=none;fillColor="+P(pd)+";"+ea(pd,"fillOpacity");v.style+=c(v.style,e,u,v,G);var bb=new mxCell("",new mxGeometry(0,0,r,p),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+Ce/Be+";arcWidth="+fe/r*2+";strokeColor=none;fillColor="+P(lb)+";"+ea(lb,"fillOpacity"));bb.style+=c(bb.style,e,u,bb,G);bb.vertex=!0;bb.geometry.relative=1;v.insert(bb);break;case "ProgressHalfDonut":v.geometry.height*=2;v.geometry.rotate90();var tf=Ce/Be/2;v.style="shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="++tf+";arcWidth="+2*fe/r+";strokeColor=none;fillColor="+P(lb)+";"+ea(lb,"fillOpacity");e.Rotation-=Math.PI/2;v.style+=c(v.style,e,u,v,G);bb=new mxCell("",new mxGeometry(0,0,v.geometry.width,v.geometry.height),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+(.5-tf)+";arcWidth="+2*fe/r+";strokeColor=none;flipH=1;fillColor="+P(pd)+";"+ea(pd,"fillOpacity"));e.Rotation+=Math.PI;bb.style+=c(bb.style,e,u,bb,G);bb.vertex=!0;bb.geometry.relative=1;v.insert(bb);break;case "ProgressBar":v.style="strokeColor=none;fillColor="++P(pd)+";"+ea(pd,"fillOpacity"),v.style+=c(v.style,e,u,v,G),bb=new mxCell("",new mxGeometry(0,0,r*Ce/Be,p),"strokeColor=none;fillColor="+P(lb)+";"+ea(lb,"fillOpacity")),bb.style+=c(bb.style,e,u,bb,G),bb.vertex=!0,bb.geometry.relative=1,v.insert(bb)}break;case "InternalStorageBlock":v.style+="shape=internalStorage;dx=10;dy=10";if(e.Text&&e.Text.m){var ge=e.Text.m,De=!1,Ee=!1;for(l=0;l<ge.length;l++){var qd=ge[l];De||"mt"!=qd.n?Ee||"il"!=qd.n||(qd.v=17+(qd.v||0),Ee=!0):(qd.v=17+(qd.v||0),De=!0)}De||+ge.push({s:0,n:"mt",v:17});Ee||ge.push({s:0,n:"il",v:17})}v.value=m(e);v.style+=c(v.style,e,u,v,G);break;case "PersonRoleBlock":try{ja=Y(e,u);eb=p/2;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Role);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ja+"startSize="+eb+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Role,G);v.style+=c(v.style,+e,u,v,G);var Fc=new mxCell("",new mxGeometry(0,p/2,r,p/2),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");Fc.value=m(e.Name);Fc.vertex=!0;v.insert(Fc);Fc.style+=a(e.Name,G);Fc.style+=c(Fc.style,e,u,Fc,G)}catch(hb){console.log(hb)}}v.style&&0>v.style.indexOf("html")&&(v.style+="html=1;");if(e.Title&&e.Title.t&&e.Text&&e.Text.t)try{var uf=v.geometry,vf=new mxCell(m(e.Title),new mxGeometry(0,uf.height+4,uf.width,10),"strokeColor=none;fillColor=none;whiteSpace=wrap;verticalAlign=top;labelPosition=center;verticalLabelPosition=top;align=center;");vf.vertex=!0;v.insert(vf);v.style+=a(e.Title,G)}catch(hb){console.log(hb)}He(v,e);la(v,e,D);e.Hidden&&(v.visible=!1);return v}function He(w,F){if(F.Text_TRotation||F.TextRotation)try{var D=mxUtils.toDegree(F.Text_TRotation||0)+mxUtils.toDegree(F.TextRotation||0);if(!isNaN(D)&&0!=D&&w.value){var u=w.geometry.width,e=w.geometry.height,O=u,r=e,p=0,aa=0;if(-90==D||-270==D){O=e;r=u;var ba=(e-u)/2;p=-ba/u;aa=ba/e}D+=mxUtils.toDegree(F.Rotation);var W=w.style.split(";").filter(function(ka){return 0>ka.indexOf("fillColor=")&&0>ka.indexOf("strokeColor=")&&0>ka.indexOf("rotation=")}).join(";"),wa=new mxCell(w.value,new mxGeometry(p,aa,O,r),W+"fillColor=none;strokeColor=none;rotation="+D+";");w.value=null;wa.geometry.relative=!0;wa.vertex=!0;w.insert(wa)}}catch(ka){console.log(ka)}}function Ke(w,F,D,u,e){function O(Lb,$b){var Za="";try{for(var qb=0;qb<Lb.text.length;qb++){var Oc=Lb.text[qb];if(Oc[0]=="t_"+$b){for(var Gc in Oc[1]){var Hc=Oc[1][Gc];if(Hc)switch(Gc){case "font":Za+=y(Hc);break;case "bold":Za+="font-weight: bold;";break;case "italic":Za+="font-style: italic;";break;case "underline":Za+="text-decoration: underline;";break;case "size":Za+="font-size:"+z(.75*Hc)+"px;";break;case "color":Za+="color:"+V(Hc).substring(0,7)+";";break;case "fill":Za+="background-color:"+V(Hc).substring(0,7)+";";break;case "align":Za+="text-align:"+Hc+";"}}break}}}catch(Td){}return Za}try{var r=function(Lb,$b,Za){Lb=Aa+Lb;ra[Lb]=$b;$b="";for(var qb=0;qb<W.length;qb++)$b+='<div style="'+na[qb]+'">'+(Za[W[qb]]||" ")+"</div>";qb=mxUtils.getSizeForString($b);Za=g(Za.Image||Za["018__ImageUrl__"])||"https://cdn4.iconfinder.com/data/icons/basic-user-interface-elements/700/user-account-profile-human-avatar-face-head--128.png";Za=new mxCell($b,new mxGeometry(0,0,qb.width+Ba,qb.height+Oa),ua+(Ca?Za:""));Za.vertex=!0;e[Lb]=Za;u.addCell(Za,ba)},p=F.OrgChartBlockType,aa=F.Location,ba=new mxCell("",new mxGeometry(.75*aa.x,.75*aa.y,200,100),"group");ba.vertex=!0;u.addCell(ba);var W=F.FieldNames,wa=F.LayoutSettings,ka=F.BlockItemDefaultStyle||-{props:{}},pa=F.EdgeItemDefaultStyle,ra={},Aa=(w||Date.now())+"_";4==p&&(ka.props.LineWidth=0);var na=[],Ba=25,Oa=40,Ca=!0,ua=b("",ka.props,{},ba,!0);0==p?(ua+="spacingTop=54;imageWidth=54;imageHeight=54;imageAlign=center;imageVerticalAlign=top;image=",Oa+=54):1==p||2==p?(ua+="spacingLeft=54;imageWidth=50;imageHeight=50;imageAlign=left;imageVerticalAlign=top;image=",Ba+=54):3<=p&&(Ca=!1);for(w=0;w<W.length;w++)na.push(O(ka,W[w]));if(D.Items)for(var Ma=D.Items.n,Ja=0;Ja<Ma.length;Ja++){var Ka=Ma[Ja];+{props:{}},pa=F.EdgeItemDefaultStyle,ra={},Aa=(w||Date.now())+"_";4==p&&(ka.props.LineWidth=0);var na=[],Ba=25,Oa=40,Ca=!0,ua=c("",ka.props,{},ba,!0);0==p?(ua+="spacingTop=54;imageWidth=54;imageHeight=54;imageAlign=center;imageVerticalAlign=top;image=",Oa+=54):1==p||2==p?(ua+="spacingLeft=54;imageWidth=50;imageHeight=50;imageAlign=left;imageVerticalAlign=top;image=",Ba+=54):3<=p&&(Ca=!1);for(w=0;w<W.length;w++)na.push(O(ka,W[w]));if(D.Items)for(var Ma=D.Items.n,Ja=0;Ja<Ma.length;Ja++){var Ka=Ma[Ja];r(Ka.pk,Ka.ie[0]?Ka.ie[0].nf:null,Ka.f)}else{var l=F.ContractMap.derivative;if(null==l){var Ha=F.ContractMap.c.People;var cb=Ha.id;cb=cb.substr(0,cb.lastIndexOf("_"));for(w=0;w<W.length;w++)W[w]=Ha.f[W[w]]||W[w]}else for(Ja=0;Ja<l.length;Ja++)if("ForeignKeyGraph"==l[Ja].type)cb=l[Ja].c[0].id,cb=cb.substr(0,cb.lastIndexOf("_"));else if("MappedGraph"==l[Ja].type)for(w=0;w<W.length;w++)W[w]=l[Ja].nfs[W[w]]||W[w];var Ea;for(Ea in D){Ka=D[Ea].Collections;for(var Qa in Ka)if(Qa==cb)Ma=Ka[Qa].Items;else if(Ka[Qa].Properties.ForeignKeys&&Ka[Qa].Properties.ForeignKeys[0]){var ma=Ka[Qa].Properties.ForeignKeys[0].SourceFields[0];var La=Ka[Qa].Properties.Schema.PrimaryKey[0]}if(Ma)break}F={};for(var ya in Ma){Ka=Ma[ya];var za=Ka[La],Qb=Ka[ma];za==Qb?(F[za]=za+Date.now(),za=F[za],Ka[La]=za,r(za,Qb,Ka)):r(za,F[Qb]||Qb,Ka)}}for(Ea in ra){var ha=ra[Ea];if(null!=ha){var xb=e[Aa+ha],Wa=e[Ea];if(null!=xb&&null!=Wa){var rc=new mxCell("",new mxGeometry(0,0,100,100),"");rc.geometry.relative=!0;rc.edge=!0;null!=pa&&null!=pa.props&&Xa(rc,pa.props,u,null,null,!0);u.addCell(rc,ba,null,xb,Wa)}}}var wc=.75*wa.NodeSpacing.LevelSeparation;(new mxOrgChartLayout(u,0,wc,.75*wa.NodeSpacing.NeighborSeparation)).execute(ba);for(Ja=wa=r=0;ba.children&&Ja<ba.children.length;Ja++){var Gb=ba.children[Ja].geometry;r=Math.max(r,Gb.x+Gb.width);wa=Math.max(wa,Gb.y+Gb.height)}var Rb=ba.geometry;Rb.y-=wc;Rb.width=r;Rb.height=wa}catch(Lb){LucidImporter.hasUnknownShapes=!0,LucidImporter.hasOrgChart=!0,console.log(Lb)}}var xc=0,yc=0,he="text;html=1;resizable=0;labelBackgroundColor=default;align=center;verticalAlign=middle;",@@ -15400,147 +15400,147 @@ null;return F.join("")}})();function VsdxExport(g){function y(H,N){var J={"[Cont"visio/masters/master1.xml":"<?xml version='1.0' encoding='utf-8' ?><MasterContents xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Shapes><Shape ID='5' OriginalID='0' Type='Shape' LineStyle='7' FillStyle='7' TextStyle='7'><Cell N='PinX' V='1.5' F='GUARD((BeginX+EndX)/2)'/><Cell N='PinY' V='1.5' F='GUARD((BeginY+EndY)/2)'/><Cell N='Width' V='1' F='GUARD(EndX-BeginX)'/><Cell N='Height' V='-1' F='GUARD(EndY-BeginY)'/><Cell N='LocPinX' V='0.5' F='GUARD(Width*0.5)'/><Cell N='LocPinY' V='-0.5' F='GUARD(Height*0.5)'/><Cell N='Angle' V='0' F='GUARD(0DA)'/><Cell N='FlipX' V='0' F='GUARD(FALSE)'/><Cell N='FlipY' V='0' F='GUARD(FALSE)'/><Cell N='ResizeMode' V='0'/><Cell N='BeginX' V='1'/><Cell N='BeginY' V='2'/><Cell N='EndX' V='2'/><Cell N='EndY' V='1'/><Cell N='TxtPinX' V='0' F='SETATREF(Controls.TextPosition)'/><Cell N='TxtPinY' V='-1' F='SETATREF(Controls.TextPosition.Y)'/><Cell N='TxtWidth' V='0.5555555555555556' F='MAX(TEXTWIDTH(TheText),5*Char.Size)'/><Cell N='TxtHeight' V='0.2444444444444444' F='TEXTHEIGHT(TheText,TxtWidth)'/><Cell N='TxtLocPinX' V='0.2777777777777778' F='TxtWidth*0.5'/><Cell N='TxtLocPinY' V='0.1222222222222222' F='TxtHeight*0.5'/><Cell N='TxtAngle' V='0'/><Cell N='LockHeight' V='1'/><Cell N='LockCalcWH' V='1'/><Cell N='HelpTopic' V='Vis_SE.chm!#20000'/><Cell N='Copyright' V='Copyright 2001 Microsoft Corporation. All rights reserved.'/><Cell N='NoAlignBox' V='1'/><Cell N='DynFeedback' V='2'/><Cell N='GlueType' V='2'/><Cell N='ObjType' V='2'/><Cell N='NoLiveDynamics' V='1'/><Cell N='ShapeSplittable' V='1'/><Cell N='LayerMember' V='0'/><Section N='Control'><Row N='TextPosition'><Cell N='X' V='0'/><Cell N='Y' V='-1'/><Cell N='XDyn' V='0' F='Controls.TextPosition'/><Cell N='YDyn' V='-1' F='Controls.TextPosition.Y'/><Cell N='XCon' V='5' F='IF(OR(STRSAME(SHAPETEXT(TheText),\"\"),HideText),5,0)'/><Cell N='YCon' V='0'/><Cell N='CanGlue' V='0'/><Cell N='Prompt' V='Reposition Text'/></Row></Section><Section N='Geometry' IX='0'><Cell N='NoFill' V='1'/><Cell N='NoLine' V='0'/><Cell N='NoShow' V='0'/><Cell N='NoSnap' V='0'/><Cell N='NoQuickDrag' V='0'/><Row T='MoveTo' IX='1'><Cell N='X' V='0'/><Cell N='Y' V='0'/></Row><Row T='LineTo' IX='2'><Cell N='X' V='0'/><Cell N='Y' V='-1'/></Row></Section></Shape></Shapes></MasterContents>"},M;for(M in J)if(1<N&&M==K.CONTENT_TYPES_XML){for(var T=mxUtils.parseXml(J[M]),ca=T.documentElement,V=ca.children,P=null,ea=0;ea<V.length;ea++){var Y=V[ea];"/visio/pages/page1.xml"==Y.getAttribute(K.PART_NAME)&&(P=Y)}for(ea=2;ea<=N;ea++)V=P.cloneNode(),V.setAttribute(K.PART_NAME,"/visio/pages/page"+ea+".xml"),ca.appendChild(V);C(H,M,T,!0)}else H.file(M,J[M])}function z(H,N,J){return null!=H.createElementNS?H.createElementNS(N,J):H.createElement(J)}function B(H){var N=S[H];null==N&&(N=R++,S[H]=N);return N}function m(H){var N={};try{var J=H.getGraphBounds().clone(),M=H.view.scale,T=H.view.translate,ca=Math.round(J.x/M)-T.x,V=Math.round(J.y/M)-T.y,P=H.pageFormat.width,ea=H.pageFormat.height;0>ca&&(ca+=Math.ceil((T.x-J.x/M)/P)*P);0>V&&(V+=Math.ceil((T.y-J.y/M)/ea)*ea);var Y=Math.max(1,Math.ceil((J.width/M+ca)/P)),sa=Math.max(1,Math.ceil((J.height/M+V)/ea));N.gridEnabled=H.gridEnabled;N.gridSize=H.gridSize;N.guidesEnabled=H.graphHandler.guidesEnabled;N.pageVisible=H.pageVisible;N.pageScale=H.pageScale;-N.pageWidth=H.pageFormat.width*Y;N.pageHeight=H.pageFormat.height*sa;N.backgroundClr=H.background;N.mathEnabled=H.mathEnabled;N.shadowVisible=H.shadowVisible}catch(oa){}return N}function h(H,N,J,M){return c(H,N/K.CONVERSION_FACTOR,J,M)}function c(H,N,J,M){J=z(J,K.XMLNS,"Cell");J.setAttribute("N",H);J.setAttribute("V",N);M&&J.setAttribute("F",M);return J}function a(H,N,J,M,T){var ca=z(T,K.XMLNS,"Row");ca.setAttribute("T",H);ca.setAttribute("IX",N);ca.appendChild(h("X",J,T));ca.appendChild(h("Y",M,-T));return ca}function b(H){mxUtils.isLightDarkColor(H)&&(H=mxUtils.parseLightDarkColor(H).light);return mxUtils.rgba2hex(H)}function d(H,N,J){var M=b(H.style[mxConstants.STYLE_FILLCOLOR]);if(M&&"none"!=M){if(N.appendChild(c("FillForegnd",M,J)),(M=b(H.style[mxConstants.STYLE_GRADIENTCOLOR]))&&"none"!=M){N.appendChild(c("FillBkgnd",M,J));M=H.style[mxConstants.STYLE_GRADIENT_DIRECTION];var T=28;if(M)switch(M){case mxConstants.DIRECTION_EAST:T=25;break;case mxConstants.DIRECTION_WEST:T=27;break;case mxConstants.DIRECTION_NORTH:T=-30}N.appendChild(c("FillPattern",T,J))}}else N.appendChild(c("FillPattern",0,J));(M=b(H.style[mxConstants.STYLE_STROKECOLOR]))&&"none"!=M?N.appendChild(c("LineColor",M,J)):N.appendChild(c("LinePattern",0,J));(M=H.style[mxConstants.STYLE_STROKEWIDTH])&&N.appendChild(h("LineWeight",M,J));(T=H.style[mxConstants.STYLE_OPACITY])?M=T:(M=H.style[mxConstants.STYLE_FILL_OPACITY],T=H.style[mxConstants.STYLE_STROKE_OPACITY]);M&&N.appendChild(c("FillForegndTrans",1-parseInt(M)/100,J));T&&N.appendChild(c("LineColorTrans",-1-parseInt(T)/100,J));if(1==H.style[mxConstants.STYLE_DASHED]){M=H.style[mxConstants.STYLE_DASH_PATTERN];T=9;if(M)switch(M){case "1 1":T=10;break;case "1 2":T=3;break;case "1 4":T=17}N.appendChild(c("LinePattern",T,J))}1==H.style[mxConstants.STYLE_SHADOW]&&(N.appendChild(c("ShdwPattern",1,J)),N.appendChild(c("ShdwForegnd","#000000",J)),N.appendChild(c("ShdwForegndTrans",.6,J)),N.appendChild(c("ShapeShdwType",1,J)),N.appendChild(c("ShapeShdwOffsetX","0.02946278254943948",J)),N.appendChild(c("ShapeShdwOffsetY",-"-0.02946278254943948",J)),N.appendChild(c("ShapeShdwScaleFactor","1",J)),N.appendChild(c("ShapeShdwBlur","0.05555555555555555",J)),N.appendChild(c("ShapeShdwShow",2,J)));1==H.style[mxConstants.STYLE_FLIPH]&&N.appendChild(c("FlipX",1,J));1==H.style[mxConstants.STYLE_FLIPV]&&N.appendChild(c("FlipY",1,J));1==H.style[mxConstants.STYLE_ROUNDED]&&N.appendChild(h("Rounding",.1*H.cell.geometry.width,J));(H=b(H.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]))&&N.appendChild(c("TextBkgnd",H,J))}function f(H,-N,J,M,T,ca){var V=z(M,K.XMLNS,"Shape");V.setAttribute("ID",H);V.setAttribute("NameU","Shape"+H);V.setAttribute("LineStyle","0");V.setAttribute("FillStyle","0");V.setAttribute("TextStyle","0");H=N.width/2;var P=N.height/2;V.appendChild(h("PinX",N.x+H+(ca?0:L.shiftX),M));V.appendChild(h("PinY",T-N.y-P-(ca?0:L.shiftY),M));V.appendChild(h("Width",N.width,M));V.appendChild(h("Height",N.height,M));V.appendChild(h("LocPinX",H,M));V.appendChild(h("LocPinY",P,M));V.appendChild(c("LayerMember",J+"",M));return V}+N.pageWidth=H.pageFormat.width*Y;N.pageHeight=H.pageFormat.height*sa;N.backgroundClr=H.background;N.mathEnabled=H.mathEnabled;N.shadowVisible=H.shadowVisible}catch(oa){}return N}function h(H,N,J,M){return b(H,N/K.CONVERSION_FACTOR,J,M)}function b(H,N,J,M){J=z(J,K.XMLNS,"Cell");J.setAttribute("N",H);J.setAttribute("V",N);M&&J.setAttribute("F",M);return J}function a(H,N,J,M,T){var ca=z(T,K.XMLNS,"Row");ca.setAttribute("T",H);ca.setAttribute("IX",N);ca.appendChild(h("X",J,T));ca.appendChild(h("Y",M,+T));return ca}function c(H){mxUtils.isLightDarkColor(H)&&(H=mxUtils.parseLightDarkColor(H).light);return mxUtils.rgba2hex(H)}function d(H,N,J){var M=c(H.style[mxConstants.STYLE_FILLCOLOR]);if(M&&"none"!=M){if(N.appendChild(b("FillForegnd",M,J)),(M=c(H.style[mxConstants.STYLE_GRADIENTCOLOR]))&&"none"!=M){N.appendChild(b("FillBkgnd",M,J));M=H.style[mxConstants.STYLE_GRADIENT_DIRECTION];var T=28;if(M)switch(M){case mxConstants.DIRECTION_EAST:T=25;break;case mxConstants.DIRECTION_WEST:T=27;break;case mxConstants.DIRECTION_NORTH:T=+30}N.appendChild(b("FillPattern",T,J))}}else N.appendChild(b("FillPattern",0,J));(M=c(H.style[mxConstants.STYLE_STROKECOLOR]))&&"none"!=M?N.appendChild(b("LineColor",M,J)):N.appendChild(b("LinePattern",0,J));(M=H.style[mxConstants.STYLE_STROKEWIDTH])&&N.appendChild(h("LineWeight",M,J));(T=H.style[mxConstants.STYLE_OPACITY])?M=T:(M=H.style[mxConstants.STYLE_FILL_OPACITY],T=H.style[mxConstants.STYLE_STROKE_OPACITY]);M&&N.appendChild(b("FillForegndTrans",1-parseInt(M)/100,J));T&&N.appendChild(b("LineColorTrans",+1-parseInt(T)/100,J));if(1==H.style[mxConstants.STYLE_DASHED]){M=H.style[mxConstants.STYLE_DASH_PATTERN];T=9;if(M)switch(M){case "1 1":T=10;break;case "1 2":T=3;break;case "1 4":T=17}N.appendChild(b("LinePattern",T,J))}1==H.style[mxConstants.STYLE_SHADOW]&&(N.appendChild(b("ShdwPattern",1,J)),N.appendChild(b("ShdwForegnd","#000000",J)),N.appendChild(b("ShdwForegndTrans",.6,J)),N.appendChild(b("ShapeShdwType",1,J)),N.appendChild(b("ShapeShdwOffsetX","0.02946278254943948",J)),N.appendChild(b("ShapeShdwOffsetY",+"-0.02946278254943948",J)),N.appendChild(b("ShapeShdwScaleFactor","1",J)),N.appendChild(b("ShapeShdwBlur","0.05555555555555555",J)),N.appendChild(b("ShapeShdwShow",2,J)));1==H.style[mxConstants.STYLE_FLIPH]&&N.appendChild(b("FlipX",1,J));1==H.style[mxConstants.STYLE_FLIPV]&&N.appendChild(b("FlipY",1,J));1==H.style[mxConstants.STYLE_ROUNDED]&&N.appendChild(h("Rounding",.1*H.cell.geometry.width,J));(H=c(H.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]))&&N.appendChild(b("TextBkgnd",H,J))}function f(H,+N,J,M,T,ca){var V=z(M,K.XMLNS,"Shape");V.setAttribute("ID",H);V.setAttribute("NameU","Shape"+H);V.setAttribute("LineStyle","0");V.setAttribute("FillStyle","0");V.setAttribute("TextStyle","0");H=N.width/2;var P=N.height/2;V.appendChild(h("PinX",N.x+H+(ca?0:L.shiftX),M));V.appendChild(h("PinY",T-N.y-P-(ca?0:L.shiftY),M));V.appendChild(h("Width",N.width,M));V.appendChild(h("Height",N.height,M));V.appendChild(h("LocPinX",H,M));V.appendChild(h("LocPinY",P,M));V.appendChild(b("LayerMember",J+"",M));return V}function k(H,N){H=K.ARROWS_MAP[(null==H?"none":H)+"|"+(null==N?"1":N)];return null!=H?H:1}function n(H){return null==H?2:2>=H?0:3>=H?1:5>=H?2:7>=H?3:9>=H?4:22>=H?5:6}function q(H,N,J,M,T,ca){var V=J.view.getState(H,!0);if(null==V||null==V.absolutePoints||null==V.cellBounds)return null;J=z(M,K.XMLNS,"Shape");var P=B(H.id);J.setAttribute("ID",P);J.setAttribute("NameU","Dynamic connector."+P);J.setAttribute("Name","Dynamic connector."+P);J.setAttribute("Type","Shape");J.setAttribute("Master","4");var ea=L.state;P=V.absolutePoints;var Y=V.cellBounds,sa=Y.width/2,oa=Y.height/2;J.appendChild(h("PinX",Y.x+sa+(ca?0:L.shiftX),M));J.appendChild(h("PinY",T-Y.y-oa-(ca?0:L.shiftY),M));J.appendChild(h("Width",Y.width,M));J.appendChild(h("Height",Y.height,M));J.appendChild(h("LocPinX",sa,M));J.appendChild(h("LocPinY",oa,M));L.newEdge(J,V,M);sa=function(Ra,la,Sa){var Xa=Ra.x;Ra=Ra.y;Xa=Xa*ea.scale-Y.x+ea.dx+(Sa||ca?0:L.shiftX);Ra=(la?0:Y.height)-Ra*ea.scale+Y.y-ea.dy-(Sa||ca?0:L.shiftY);return{x:Xa,y:Ra}};oa=-sa(P[0],!0);J.appendChild(h("BeginX",Y.x+oa.x,M,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));J.appendChild(h("BeginY",T-Y.y+oa.y,M,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));oa=sa(P[P.length-1],!0);J.appendChild(h("EndX",Y.x+oa.x,M,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));J.appendChild(h("EndY",T-Y.y+oa.y,M,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));J.appendChild(c("BegTrigger","2",M,H.source?"_XFTRIGGER(Sheet."+B(H.source.id)+"!EventXFMod)":null));J.appendChild(c("EndTrigger",-"2",M,H.target?"_XFTRIGGER(Sheet."+B(H.target.id)+"!EventXFMod)":null));J.appendChild(c("ConFixedCode","6",M));J.appendChild(c("LayerMember",N+"",M));d(V,J,M);N=V.style[mxConstants.STYLE_STARTSIZE];H=k(V.style[mxConstants.STYLE_STARTARROW],V.style[mxConstants.STYLE_STARTFILL]);J.appendChild(c("BeginArrow",H,M));J.appendChild(c("BeginArrowSize",n(N),M));N=V.style[mxConstants.STYLE_ENDSIZE];H=k(V.style[mxConstants.STYLE_ENDARROW],V.style[mxConstants.STYLE_ENDFILL]);J.appendChild(c("EndArrow",H,M));-J.appendChild(c("EndArrowSize",n(N),M));null!=V.text&&V.text.checkBounds()&&(L.save(),V.text.paint(L),L.restore());V=z(M,K.XMLNS,"Section");V.setAttribute("N","Geometry");V.setAttribute("IX","0");for(H=0;H<P.length;H++)N=sa(P[H],!1,!0),V.appendChild(a(0==H?"MoveTo":"LineTo",H+1,N.x,N.y,M));V.appendChild(c("NoFill","1",M));V.appendChild(c("NoLine","0",M));J.appendChild(V);return J}function t(H,N,J,M,T,ca,V){var P=H.geometry,ea=P;if(null!=P)try{P.relative&&ca&&(ea=P.clone(),P.x*=ca.width,P.y*=ca.height,+sa(P[0],!0);J.appendChild(h("BeginX",Y.x+oa.x,M,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));J.appendChild(h("BeginY",T-Y.y+oa.y,M,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));oa=sa(P[P.length-1],!0);J.appendChild(h("EndX",Y.x+oa.x,M,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));J.appendChild(h("EndY",T-Y.y+oa.y,M,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));J.appendChild(b("BegTrigger","2",M,H.source?"_XFTRIGGER(Sheet."+B(H.source.id)+"!EventXFMod)":null));J.appendChild(b("EndTrigger",+"2",M,H.target?"_XFTRIGGER(Sheet."+B(H.target.id)+"!EventXFMod)":null));J.appendChild(b("ConFixedCode","6",M));J.appendChild(b("LayerMember",N+"",M));d(V,J,M);N=V.style[mxConstants.STYLE_STARTSIZE];H=k(V.style[mxConstants.STYLE_STARTARROW],V.style[mxConstants.STYLE_STARTFILL]);J.appendChild(b("BeginArrow",H,M));J.appendChild(b("BeginArrowSize",n(N),M));N=V.style[mxConstants.STYLE_ENDSIZE];H=k(V.style[mxConstants.STYLE_ENDARROW],V.style[mxConstants.STYLE_ENDFILL]);J.appendChild(b("EndArrow",H,M));+J.appendChild(b("EndArrowSize",n(N),M));null!=V.text&&V.text.checkBounds()&&(L.save(),V.text.paint(L),L.restore());V=z(M,K.XMLNS,"Section");V.setAttribute("N","Geometry");V.setAttribute("IX","0");for(H=0;H<P.length;H++)N=sa(P[H],!1,!0),V.appendChild(a(0==H?"MoveTo":"LineTo",H+1,N.x,N.y,M));V.appendChild(b("NoFill","1",M));V.appendChild(b("NoLine","0",M));J.appendChild(V);return J}function t(H,N,J,M,T,ca,V){var P=H.geometry,ea=P;if(null!=P)try{P.relative&&ca&&(ea=P.clone(),P.x*=ca.width,P.y*=ca.height,H.vertex&&null!=P.offset&&(P.x+=P.offset.x,P.y+=P.offset.y),P.relative=0);var Y=B(H.id);if(!H.treatAsSingle&&0<H.getChildCount()){var sa=f(Y+"10000",P,N,M,T,V);sa.setAttribute("Type","Group");var oa=z(M,K.XMLNS,"Shapes");L.save();L.translate(-P.x,-P.y);var Ra=P.clone();Ra.x=0;Ra.y=0;H.setGeometry(Ra);H.treatAsSingle=!0;var la=t(H,N,J,M,P.height,P,!0);delete H.treatAsSingle;H.setGeometry(P);null!=la&&oa.appendChild(la);for(T=0;T<H.getChildCount();T++)la=t(H.children[T],N,J,M,P.height,P,!0),null!=la&&oa.appendChild(la);sa.appendChild(oa);L.restore();return sa}if(H.vertex){sa=f(Y,P,N,M,T,V);var Sa=J.view.getState(H,!0);null!=Sa&&(d(Sa,sa,M),L.newShape(sa,Sa,M),null!=Sa.text&&Sa.text.checkBounds()&&(L.save(),Sa.text.paint(L),L.restore()),null!=Sa.shape&&Sa.shape.checkBounds()&&(L.save(),Sa.shape.paint(L),L.restore()),sa.appendChild(L.getShapeGeo()),L.endShape(),sa.setAttribute("Type",L.getShapeType()));return sa}return q(H,N,J,M,T,V)}finally{H.geometry=ea}else return null}function A(H,N){var J=mxUtils.createXmlDocument(),M=z(J,K.XMLNS,"PageContents");M.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",K.XMLNS);M.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",K.XMLNS_R);var T=z(J,K.XMLNS,"Shapes");M.appendChild(T);var ca=H.model,V=H.view.translate,P=H.view.scale,ea=H.getGraphBounds();L.shiftX=0;L.shiftY=0;if(ea.x/P<V.x||ea.y/P<V.y)L.shiftX=Math.ceil((V.x-ea.x/P)/H.pageFormat.width)*H.pageFormat.width,L.shiftY=Math.ceil((V.y-ea.y/P)/H.pageFormat.height)*H.pageFormat.height;L.save();L.translate(-V.x,-V.y);L.scale(1/P);L.newPage();P=H.model.getChildCells(H.model.root);V={};for(ea=0;ea<P.length;ea++)V[P[ea].id]=ea;for(var Y in ca.cells)P=ca.cells[Y],ea=null!=P.parent?V[P.parent.id]:null,null!=ea&&(P=t(P,ea,H,J,N.pageHeight),null!=P&&T.appendChild(P));H=z(J,K.XMLNS,"Connects");M.appendChild(H);for(Y in ca.cells)P=ca.cells[Y],P.edge&&(P.source&&(N=z(J,K.XMLNS,"Connect"),N.setAttribute("FromSheet",B(P.id)),N.setAttribute("FromCell","BeginX"),N.setAttribute("ToSheet",B(P.source.id)),H.appendChild(N)),P.target&&(N=z(J,K.XMLNS,"Connect"),N.setAttribute("FromSheet",B(P.id)),N.setAttribute("FromCell","EndX"),N.setAttribute("ToSheet",B(P.target.id)),H.appendChild(N)));J.appendChild(M);L.restore();return J}function C(H,N,J,M){H.file(N,(M?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(J,"\n"))}function I(H,N,J,M){var T=mxUtils.createXmlDocument(),ca=mxUtils.createXmlDocument(),V=z(T,K.XMLNS,"Pages");V.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",-K.XMLNS);V.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",K.XMLNS_R);var P=z(ca,K.RELS_XMLNS,"Relationships"),ea=1,Y;for(Y in N){var sa="page"+ea+".xml",oa=z(T,K.XMLNS,"Page");oa.setAttribute("ID",ea-1);oa.setAttribute("NameU",Y);oa.setAttribute("Name",Y);var Ra=z(T,K.XMLNS,"PageSheet"),la=M[Y];Ra.appendChild(h("PageWidth",la.pageWidth,T));Ra.appendChild(h("PageHeight",la.pageHeight,T));Ra.appendChild(c("PageScale",la.pageScale,T));Ra.appendChild(c("DrawingScale",1,T));la=z(T,K.XMLNS,"Rel");-la.setAttributeNS(K.XMLNS_R,"r:id","rId"+ea);var Sa=z(T,K.XMLNS,"Section");Sa.setAttribute("N","Layer");for(var Xa=J[Y],sc=0;sc<Xa.length;sc++){var yb=z(T,K.XMLNS,"Row");yb.setAttribute("IX",sc+"");Sa.appendChild(yb);yb.appendChild(c("Name",Xa[sc].name,T));yb.appendChild(c("Color","255",T));yb.appendChild(c("Status","0",T));yb.appendChild(c("Visible",Xa[sc].visible?"1":"0",T));yb.appendChild(c("Print","1",T));yb.appendChild(c("Active","0",T));yb.appendChild(c("Lock",Xa[sc].locked?"1":"0",T));yb.appendChild(c("Snap",-"1",T));yb.appendChild(c("Glue","1",T));yb.appendChild(c("NameUniv",Xa[sc].name,T));yb.appendChild(c("ColorTrans","0",T))}Ra.appendChild(Sa);oa.appendChild(Ra);oa.appendChild(la);V.appendChild(oa);oa=z(ca,K.RELS_XMLNS,"Relationship");oa.setAttribute("Id","rId"+ea);oa.setAttribute("Type",K.PAGES_TYPE);oa.setAttribute("Target",sa);P.appendChild(oa);C(H,K.VISIO_PAGES+sa,N[Y]);ea++}T.appendChild(V);ca.appendChild(P);C(H,K.VISIO_PAGES+"pages.xml",T);C(H,K.VISIO_PAGES+"_rels/pages.xml.rels",ca)}function Q(H,+K.XMLNS);V.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",K.XMLNS_R);var P=z(ca,K.RELS_XMLNS,"Relationships"),ea=1,Y;for(Y in N){var sa="page"+ea+".xml",oa=z(T,K.XMLNS,"Page");oa.setAttribute("ID",ea-1);oa.setAttribute("NameU",Y);oa.setAttribute("Name",Y);var Ra=z(T,K.XMLNS,"PageSheet"),la=M[Y];Ra.appendChild(h("PageWidth",la.pageWidth,T));Ra.appendChild(h("PageHeight",la.pageHeight,T));Ra.appendChild(b("PageScale",la.pageScale,T));Ra.appendChild(b("DrawingScale",1,T));la=z(T,K.XMLNS,"Rel");+la.setAttributeNS(K.XMLNS_R,"r:id","rId"+ea);var Sa=z(T,K.XMLNS,"Section");Sa.setAttribute("N","Layer");for(var Xa=J[Y],sc=0;sc<Xa.length;sc++){var yb=z(T,K.XMLNS,"Row");yb.setAttribute("IX",sc+"");Sa.appendChild(yb);yb.appendChild(b("Name",Xa[sc].name,T));yb.appendChild(b("Color","255",T));yb.appendChild(b("Status","0",T));yb.appendChild(b("Visible",Xa[sc].visible?"1":"0",T));yb.appendChild(b("Print","1",T));yb.appendChild(b("Active","0",T));yb.appendChild(b("Lock",Xa[sc].locked?"1":"0",T));yb.appendChild(b("Snap",+"1",T));yb.appendChild(b("Glue","1",T));yb.appendChild(b("NameUniv",Xa[sc].name,T));yb.appendChild(b("ColorTrans","0",T))}Ra.appendChild(Sa);oa.appendChild(Ra);oa.appendChild(la);V.appendChild(oa);oa=z(ca,K.RELS_XMLNS,"Relationship");oa.setAttribute("Id","rId"+ea);oa.setAttribute("Type",K.PAGES_TYPE);oa.setAttribute("Target",sa);P.appendChild(oa);C(H,K.VISIO_PAGES+sa,N[Y]);ea++}T.appendChild(V);ca.appendChild(P);C(H,K.VISIO_PAGES+"pages.xml",T);C(H,K.VISIO_PAGES+"_rels/pages.xml.rels",ca)}function Q(H,N){N=K.VISIO_PAGES_RELS+"page"+N+".xml.rels";var J=mxUtils.createXmlDocument(),M=z(J,K.RELS_XMLNS,"Relationships"),T=z(J,K.RELS_XMLNS,"Relationship");T.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");T.setAttribute("Id","rId1");T.setAttribute("Target","../masters/master1.xml");M.appendChild(T);var ca=L.images;if(0<ca.length)for(var V=0;V<ca.length;V++)T=z(J,K.RELS_XMLNS,"Relationship"),T.setAttribute("Type",K.XMLNS_R+"/image"),T.setAttribute("Id","rId"+(V+2)),T.setAttribute("Target","../media/"+ca[V]),M.appendChild(T);J.appendChild(M);C(H,N,J)}var K=this,L=new mxVsdxCanvas2D,S={},R=1;this.exportCurrentDiagrams=function(H){try{if(g.spinner.spin(document.body,mxResources.get("exporting"))){var N=function(la,Sa){la=la.model.getChildCells(la.model.root);T[Sa]=[];for(var Xa=0;Xa<la.length;Xa++)la[Xa].visible&&T[Sa].push({name:la[Xa].value||"Background",visible:la[Xa].visible,locked:la[Xa].style&&0<=la[Xa].style.indexOf("locked=1")})},J=new JSZip;L.init(J);S={};R=1;var M={},T={},ca={},V=null!=g.pages?g.pages.length:1;if(null!=g.pages){var P=function(la){la=la.getName();var Sa=g.editor.graph,Xa=m(Sa);M[la]=A(Sa,Xa);N(Sa,la);Q(J,sa+1);ca[la]=Xa},ea=g.editor.graph.getSelectionCells(),Y=g.currentPage;if(H)P(Y);else{for(var sa=0;sa<g.pages.length;sa++){var oa=g.pages[sa];g.currentPage!=oa&&g.selectPage(oa,!0);P(oa)}Y!=g.currentPage&&g.selectPage(Y,!0);g.editor.graph.setSelectionCells(ea)}}else{P=g.editor.graph;var Ra=m(P);M.Page1=A(P,Ra);N(P,"Page1");Q(J,1);ca.Page1=Ra}y(J,V);I(J,M,T,ca);H=function(){J.generateAsync({type:"base64"}).then(function(la){g.spinner.stop();var Sa=g.getBaseFilename();g.saveData(Sa+".vsdx","vsdx",la,"application/vnd.visio2013",!0)})};0<L.filesLoading?L.onFilesLoaded=H:H()}return!0}catch(la){return console.log(la),g.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(g){this.filesLoading=0;this.zip=g};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(g){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,g):this.xmlDoc.createElement(g)};+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);this.pageIndex=0}mxUtils.extend(mxVsdxCanvas2D,mxAbstractCanvas2D);mxVsdxCanvas2D.prototype.textEnabled=!0;mxVsdxCanvas2D.prototype.init=function(g){this.filesLoading=0;this.zip=g};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(g){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,g):this.xmlDoc.createElement(g)};mxVsdxCanvas2D.prototype.createGeoSec=function(){null!=this.geoSec&&this.shape.appendChild(this.geoSec);var g=this.createElt("Section");g.setAttribute("N","Geometry");g.setAttribute("IX",this.geoIndex++);this.geoSec=g;this.geoStepIndex=1;this.lastMoveToY=this.lastMoveToX=this.lastY=this.lastX=0};mxVsdxCanvas2D.prototype.newShape=function(g,y,z){this.geoIndex=0;this.shape=g;this.cellState=y;this.xmGeo=y.cell.geometry;this.xmlDoc=z;this.shapeImg=this.geoSec=null;this.shapeType="Shape";this.createGeoSec()};-mxVsdxCanvas2D.prototype.newEdge=function(g,y,z){this.shape=g;this.cellState=y;this.xmGeo=y.cellBounds;this.xmlDoc=z};mxVsdxCanvas2D.prototype.endShape=function(){null!=this.shapeImg&&this.addForeignData(this.shapeImg.type,this.shapeImg.id)};mxVsdxCanvas2D.prototype.newPage=function(){this.images=[]};mxVsdxCanvas2D.prototype.getShapeType=function(){return this.shapeType};mxVsdxCanvas2D.prototype.getShapeGeo=function(){return this.geoSec};+mxVsdxCanvas2D.prototype.newEdge=function(g,y,z){this.shape=g;this.cellState=y;this.xmGeo=y.cellBounds;this.xmlDoc=z};mxVsdxCanvas2D.prototype.endShape=function(){null!=this.shapeImg&&this.addForeignData(this.shapeImg.type,this.shapeImg.id)};mxVsdxCanvas2D.prototype.newPage=function(){this.images=[];this.pageIndex++};mxVsdxCanvas2D.prototype.getShapeType=function(){return this.shapeType};mxVsdxCanvas2D.prototype.getShapeGeo=function(){return this.geoSec};mxVsdxCanvas2D.prototype.createCellElemScaled=function(g,y,z){return this.createCellElem(g,y/VsdxExport.prototype.CONVERSION_FACTOR,z)};mxVsdxCanvas2D.prototype.createCellElem=function(g,y,z){var B=this.createElt("Cell");B.setAttribute("N",g);B.setAttribute("V",y);z&&B.setAttribute("F",z);return B};-mxVsdxCanvas2D.prototype.createRowScaled=function(g,y,z,B,m,h,c,a,b,d,f,k,n,q){return this.createRowRel(g,y,z/VsdxExport.prototype.CONVERSION_FACTOR,B/VsdxExport.prototype.CONVERSION_FACTOR,m/VsdxExport.prototype.CONVERSION_FACTOR,h/VsdxExport.prototype.CONVERSION_FACTOR,c/VsdxExport.prototype.CONVERSION_FACTOR,a/VsdxExport.prototype.CONVERSION_FACTOR,b,d,f,k,n,q)};-mxVsdxCanvas2D.prototype.createRowRel=function(g,y,z,B,m,h,c,a,b,d,f,k,n,q){var t=this.createElt("Row");t.setAttribute("T",g);t.setAttribute("IX",y);t.appendChild(this.createCellElem("X",z,b));t.appendChild(this.createCellElem("Y",B,d));null!=m&&isFinite(m)&&t.appendChild(this.createCellElem("A",m,f));null!=h&&isFinite(h)&&t.appendChild(this.createCellElem("B",h,k));null!=c&&isFinite(c)&&t.appendChild(this.createCellElem("C",c,n));null!=a&&isFinite(a)&&t.appendChild(this.createCellElem("D",a,q));+mxVsdxCanvas2D.prototype.createRowScaled=function(g,y,z,B,m,h,b,a,c,d,f,k,n,q){return this.createRowRel(g,y,z/VsdxExport.prototype.CONVERSION_FACTOR,B/VsdxExport.prototype.CONVERSION_FACTOR,m/VsdxExport.prototype.CONVERSION_FACTOR,h/VsdxExport.prototype.CONVERSION_FACTOR,b/VsdxExport.prototype.CONVERSION_FACTOR,a/VsdxExport.prototype.CONVERSION_FACTOR,c,d,f,k,n,q)};+mxVsdxCanvas2D.prototype.createRowRel=function(g,y,z,B,m,h,b,a,c,d,f,k,n,q){var t=this.createElt("Row");t.setAttribute("T",g);t.setAttribute("IX",y);t.appendChild(this.createCellElem("X",z,c));t.appendChild(this.createCellElem("Y",B,d));null!=m&&isFinite(m)&&t.appendChild(this.createCellElem("A",m,f));null!=h&&isFinite(h)&&t.appendChild(this.createCellElem("B",h,k));null!=b&&isFinite(b)&&t.appendChild(this.createCellElem("C",b,n));null!=a&&isFinite(a)&&t.appendChild(this.createCellElem("D",a,q));return t};mxVsdxCanvas2D.prototype.begin=function(){1<this.geoStepIndex&&this.createGeoSec()};mxVsdxCanvas2D.prototype.rect=function(g,y,z,B){1<this.geoStepIndex&&this.createGeoSec();var m=this.state;z*=m.scale;B*=m.scale;var h=this.xmGeo;g=(g-h.x+m.dx)*m.scale;y=(h.height-y+h.y-m.dy)*m.scale;this.geoSec.appendChild(this.createRowScaled("MoveTo",this.geoStepIndex++,g,y));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g+z,y));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g+z,y-B));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g,y-B));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g,y))};mxVsdxCanvas2D.prototype.roundrect=function(g,y,z,B,m,h){this.rect(g,y,z,B);this.shape.appendChild(this.createCellElemScaled("Rounding",m))};-mxVsdxCanvas2D.prototype.ellipse=function(g,y,z,B){1<this.geoStepIndex&&this.createGeoSec();var m=this.state;z*=m.scale;B*=m.scale;var h=this.xmGeo,c=h.height*m.scale,a=h.width*m.scale;g=(g-h.x+m.dx)*m.scale;y=c+(-y+h.y-m.dy)*m.scale;this.geoSec.appendChild(this.createRowScaled("Ellipse",this.geoStepIndex++,g+z/2,y-B/2,g,y-B/2,g+z/2,y,"Width*"+(g+z/2)/a,"Height*"+(y-B/2)/c,"Width*"+g/a,"Height*"+(y-B/2)/c,"Width*"+(g+z/2)/a,"Height*"+y/c))};+mxVsdxCanvas2D.prototype.ellipse=function(g,y,z,B){1<this.geoStepIndex&&this.createGeoSec();var m=this.state;z*=m.scale;B*=m.scale;var h=this.xmGeo,b=h.height*m.scale,a=h.width*m.scale;g=(g-h.x+m.dx)*m.scale;y=b+(-y+h.y-m.dy)*m.scale;this.geoSec.appendChild(this.createRowScaled("Ellipse",this.geoStepIndex++,g+z/2,y-B/2,g,y-B/2,g+z/2,y,"Width*"+(g+z/2)/a,"Height*"+(y-B/2)/b,"Width*"+g/a,"Height*"+(y-B/2)/b,"Width*"+(g+z/2)/a,"Height*"+y/b))};mxVsdxCanvas2D.prototype.moveTo=function(g,y){1<this.geoStepIndex&&this.createGeoSec();this.lastMoveToX=g;this.lastMoveToY=y;this.lastX=g;this.lastY=y;var z=this.xmGeo,B=this.state;g=(g-z.x+B.dx)*B.scale;y=(z.height-y+z.y-B.dy)*B.scale;var m=z.height*B.scale;z=z.width*B.scale;this.geoSec.appendChild(this.createRowRel("RelMoveTo",this.geoStepIndex++,g/z,y/m))};mxVsdxCanvas2D.prototype.lineTo=function(g,y){this.lastX=g;this.lastY=y;var z=this.xmGeo,B=this.state;g=(g-z.x+B.dx)*B.scale;y=(z.height-y+z.y-B.dy)*B.scale;var m=z.height*B.scale;z=z.width*B.scale;this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,g/z,y/m))};-mxVsdxCanvas2D.prototype.quadTo=function(g,y,z,B){this.lastX=z;this.lastY=B;var m=this.state,h=this.xmGeo,c=h.height*m.scale,a=h.width*m.scale;g=(g-h.x+m.dx)*m.scale;y=(h.height-y+h.y-m.dy)*m.scale;z=(z-h.x+m.dx)*m.scale;B=(h.height-B+h.y-m.dy)*m.scale;g/=a;y/=c;z/=a;B/=c;this.geoSec.appendChild(this.createRowRel("RelQuadBezTo",this.geoStepIndex++,z,B,g,y))};-mxVsdxCanvas2D.prototype.curveTo=function(g,y,z,B,m,h){this.lastX=m;this.lastY=h;var c=this.state,a=this.xmGeo,b=a.height*c.scale,d=a.width*c.scale;g=(g-a.x+c.dx)*c.scale;y=(a.height-y+a.y-c.dy)*c.scale;z=(z-a.x+c.dx)*c.scale;B=(a.height-B+a.y-c.dy)*c.scale;m=(m-a.x+c.dx)*c.scale;h=(a.height-h+a.y-c.dy)*c.scale;g/=d;y/=b;z/=d;B/=b;m/=d;h/=b;this.geoSec.appendChild(this.createRowRel("RelCubBezTo",this.geoStepIndex++,m,h,g,y,z,B))};+mxVsdxCanvas2D.prototype.quadTo=function(g,y,z,B){this.lastX=z;this.lastY=B;var m=this.state,h=this.xmGeo,b=h.height*m.scale,a=h.width*m.scale;g=(g-h.x+m.dx)*m.scale;y=(h.height-y+h.y-m.dy)*m.scale;z=(z-h.x+m.dx)*m.scale;B=(h.height-B+h.y-m.dy)*m.scale;g/=a;y/=b;z/=a;B/=b;this.geoSec.appendChild(this.createRowRel("RelQuadBezTo",this.geoStepIndex++,z,B,g,y))};+mxVsdxCanvas2D.prototype.curveTo=function(g,y,z,B,m,h){this.lastX=m;this.lastY=h;var b=this.state,a=this.xmGeo,c=a.height*b.scale,d=a.width*b.scale;g=(g-a.x+b.dx)*b.scale;y=(a.height-y+a.y-b.dy)*b.scale;z=(z-a.x+b.dx)*b.scale;B=(a.height-B+a.y-b.dy)*b.scale;m=(m-a.x+b.dx)*b.scale;h=(a.height-h+a.y-b.dy)*b.scale;g/=d;y/=c;z/=d;B/=c;m/=d;h/=c;this.geoSec.appendChild(this.createRowRel("RelCubBezTo",this.geoStepIndex++,m,h,g,y,z,B))};mxVsdxCanvas2D.prototype.close=function(){this.lastMoveToX==this.lastX&&this.lastMoveToY==this.lastY||this.lineTo(this.lastMoveToX,this.lastMoveToY)};mxVsdxCanvas2D.prototype.addForeignData=function(g,y){var z=this.createElt("ForeignData");z.setAttribute("ForeignType","Bitmap");g=g.toUpperCase();"BMP"!=g&&z.setAttribute("CompressionType",g);g=this.createElt("Rel");g.setAttribute("r:id","rId"+y);z.appendChild(g);this.shape.appendChild(z);this.shapeType="Foreign"};-mxVsdxCanvas2D.prototype.convertSvg2Png=function(g,y,z){var B=this;this.filesLoading++;try{var m=document.createElement("canvas"),h=m.getContext("2d");y||(g=String.fromCharCode.apply(null,new Uint8Array(g)),g=window.btoa?btoa(g):Base64.encode(g,!0));y="data:image/svg+xml;base64,"+g;img=new Image;img.onload=function(){m.width=this.width;m.height=this.height;h.drawImage(this,0,0);try{z(m.toDataURL("image/png"))}catch(c){}B.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()};img.onerror=function(){console.log("SVG2PNG conversion failed");-try{z(g)}catch(c){}B.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()};img.src=y}catch(c){console.log("SVG2PNG conversion failed"+c.message);try{z(g)}catch(a){}this.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()}};-mxVsdxCanvas2D.prototype.image=function(g,y,z,B,m,h,c,a){var b=this,d="image"+(this.images.length+1)+".";if(0==m.indexOf("data:")){var f=m.indexOf("base64,");h=m.substring(f+7);f=m.substring(11,f-1);0==f.indexOf("svg")?(f="png",d+=f,this.convertSvg2Png(h,!0,function(n){b.zip.file("visio/media/"+d,n.substring(22),{base64:!0})})):(d+=f,this.zip.file("visio/media/"+d,h,{base64:!0}))}else if(window.XMLHttpRequest){m=this.converter.convert(m);this.filesLoading++;f=m.lastIndexOf(".");f=m.substring(f+1);-var k=!1;0==f.indexOf("svg")&&(f="png",k=!0);d+=f;h=new XMLHttpRequest;h.open("GET",m,!0);h.responseType="arraybuffer";h.onreadystatechange=function(n){if(4==this.readyState&&(200==this.status&&(k?b.convertSvg2Png(this.response,!1,function(q){b.zip.file("visio/media/"+d,q.substring(22),{base64:!0})}):b.zip.file("visio/media/"+d,this.response)),b.filesLoading--,0==b.filesLoading))b.onFilesLoaded()};h.send()}this.images.push(d);this.shapeImg={type:f,id:this.images.length+1};m=this.state;z*=m.scale;-B*=m.scale;f=this.xmGeo;g=(g-f.x+m.dx)*m.scale;y=(f.height-y+f.y-m.dy)*m.scale;this.shape.appendChild(this.createCellElemScaled("ImgOffsetX",g));this.shape.appendChild(this.createCellElemScaled("ImgOffsetY",y-B));this.shape.appendChild(this.createCellElemScaled("ImgWidth",z));this.shape.appendChild(this.createCellElemScaled("ImgHeight",B))};-mxVsdxCanvas2D.prototype.text=function(g,y,z,B,m,h,c,a,b,d,f,k,n){var q=this;if(this.textEnabled&&null!=m){mxUtils.isNode(m)&&(m=mxUtils.getOuterHtml(m));0==z&&0==B&&(B=mxUtils.getSizeForString(m,q.cellState.style.fontSize,q.cellState.style.fontFamily),z=2*B.width,B=2*B.height);"html"==b&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(m=m.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML=Graph.sanitizeHtml(m),+mxVsdxCanvas2D.prototype.convertSvg2Png=function(g,y,z,B,m){var h=this;this.filesLoading++;try{var b=document.createElement("canvas"),a=b.getContext("2d");B||(g=String.fromCharCode.apply(null,new Uint8Array(g)),g=window.btoa?btoa(g):Base64.encode(g,!0));B="data:image/svg+xml;base64,"+g;img=new Image;img.onload=function(){b.width=Math.max(this.width,y);b.height=Math.max(this.height,z);a.drawImage(this,0,0,b.width,b.height);try{m(b.toDataURL("image/png"))}catch(c){}h.filesLoading--;if(0==h.filesLoading)h.onFilesLoaded()};+img.onerror=function(){console.log("SVG2PNG conversion failed");try{m(g)}catch(c){}h.filesLoading--;if(0==h.filesLoading)h.onFilesLoaded()};img.src=B}catch(c){console.log("SVG2PNG conversion failed"+c.message);try{m(g)}catch(d){}this.filesLoading--;if(0==h.filesLoading)h.onFilesLoaded()}};+mxVsdxCanvas2D.prototype.image=function(g,y,z,B,m,h,b,a){var c=this;h=this.state;z*=h.scale;B*=h.scale;var d=this.pageIndex+"_image"+(this.images.length+1)+".";if(0==m.indexOf("data:")){var f=m.indexOf("base64,");b=m.substring(f+7);f=m.substring(11,f-1);0==f.indexOf("svg")?(f="png",d+=f,this.convertSvg2Png(b,z,B,!0,function(n){c.zip.file("visio/media/"+d,n.substring(22),{base64:!0})})):(d+=f,this.zip.file("visio/media/"+d,b,{base64:!0}))}else if(window.XMLHttpRequest){m=this.converter.convert(m);+this.filesLoading++;f=m.lastIndexOf(".");f=m.substring(f+1);var k=!1;0==f.indexOf("svg")&&(f="png",k=!0);d+=f;b=new XMLHttpRequest;b.open("GET",m,!0);b.responseType="arraybuffer";b.onreadystatechange=function(n){if(4==this.readyState&&(200==this.status&&(k?c.convertSvg2Png(this.response,z,B,!1,function(q){c.zip.file("visio/media/"+d,q.substring(22),{base64:!0})}):c.zip.file("visio/media/"+d,this.response)),c.filesLoading--,0==c.filesLoading))c.onFilesLoaded()};b.send()}this.images.push(d);this.shapeImg=+{type:f,id:this.images.length+1};m=this.xmGeo;g=(g-m.x+h.dx)*h.scale;y=(m.height-y+m.y-h.dy)*h.scale;this.shape.appendChild(this.createCellElemScaled("ImgOffsetX",g));this.shape.appendChild(this.createCellElemScaled("ImgOffsetY",y-B));this.shape.appendChild(this.createCellElemScaled("ImgWidth",z));this.shape.appendChild(this.createCellElemScaled("ImgHeight",B))};+mxVsdxCanvas2D.prototype.text=function(g,y,z,B,m,h,b,a,c,d,f,k,n){var q=this;if(this.textEnabled&&null!=m){mxUtils.isNode(m)&&(m=mxUtils.getOuterHtml(m));0==z&&0==B&&(B=mxUtils.getSizeForString(m,q.cellState.style.fontSize,q.cellState.style.fontFamily),z=2*B.width,B=2*B.height);"html"==c&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(m=m.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML=Graph.sanitizeHtml(m),m=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));d=this.state;f=this.xmGeo;z*=d.scale;B*=d.scale;var t=this.createElt("Section");t.setAttribute("N","Character");var A=this.createElt("Section");A.setAttribute("N","Paragraph");var C=this.createElt("Text"),I=0,Q=0,K=0,L=0,S=0,R=0,H=0,N=function(V,P,ea,Y,sa){var oa=V.fontSize,Ra=V.fontFamily,la=mxUtils.getSizeForString(sa,oa,Ra);a&&la.width>z&&(la=mxUtils.getSizeForString(sa,oa,Ra,z));V.blockElem?(S+=la.width,K=Math.min(Math.max(K,S),z),S=0,R=Math.max(R,la.height),L+=R+H,H=R,R=0):(S+=la.width,K=Math.min(Math.max(K,S),z),R=Math.max(R,la.height),L=Math.max(L,R));la=q.createElt("Row");la.setAttribute("IX",I);V.fontColor&&la.appendChild(q.createCellElem("Color",mxUtils.rgba2hex(V.fontColor)));oa&&la.appendChild(q.createCellElemScaled("Size",.97*oa));Ra&&la.appendChild(q.createCellElem("Font",Ra));oa=0;V.bold&&(oa|=17);V.italic&&(oa|=34);V.underline&&(oa|=4);la.appendChild(q.createCellElem("Style",oa));la.appendChild(q.createCellElem("Case","0"));la.appendChild(q.createCellElem("Pos","0"));la.appendChild(q.createCellElem("FontScale","1"));la.appendChild(q.createCellElem("Letterspace","0"));P.appendChild(la);P=q.createElt("Row");P.setAttribute("IX",Q);switch(V.align){case "left":oa=0;break;case "center":oa=1;break;case "right":oa=2;break;case "start":oa=0;break;case "end":oa=2;break;case "justify":oa=0;break;default:oa=1}P.appendChild(q.createCellElem("HorzAlign",oa));ea.appendChild(P);ea=q.createElt("cp");ea.setAttribute("IX",I++);Y.appendChild(ea);V=q.xmlDoc.createTextNode(sa+(V.blockElem?"\n":""));Y.appendChild(V)},J=function(V,P){P=P||{};for(var ea=0;ea<V.length;ea++){var Y=V[ea];if(3==Y.nodeType){var sa=q.cellState.style.fontStyle;sa={fontColor:P.fontColor||q.cellState.style.fontColor,fontSize:P.fontSize||q.cellState.style.fontSize,fontFamily:P.fontFamily||q.cellState.style.fontFamily,align:P.align||q.cellState.style.align,bold:P.bold||sa&1,italic:P.italic||sa&2,underline:P.underline||sa&4};var oa=!1;ea+1<V.length&&"BR"==V[ea+1].nodeName.toUpperCase()&&(oa=!0,ea++);N(sa,t,A,C,(P.OL?P.LiIndex+". ":"")+Y.textContent+(oa?"\n":""))}else if(1==Y.nodeType){oa=Y.nodeName.toUpperCase();var Ra=Y.childNodes.length;sa=window.getComputedStyle(Y,null);sa={bold:"bold"==sa.getPropertyValue("font-weight")||P.bold,italic:"italic"==sa.getPropertyValue("font-style")||P.italic,underline:0<=sa.getPropertyValue("text-decoration").indexOf("underline")||P.underline,align:sa.getPropertyValue("text-align"),fontColor:sa.getPropertyValue("color"),fontSize:parseFloat(sa.getPropertyValue("font-size")),fontFamily:sa.getPropertyValue("font-family").replace(/"/g,""),blockElem:"block"==sa.getPropertyValue("display")||"BR"==oa||"LI"==oa,OL:P.OL,LiIndex:P.LiIndex};if("UL"==oa){var la=q.createElt("Row");la.setAttribute("IX",Q);la.appendChild(q.createCellElem("HorzAlign","0"));la.appendChild(q.createCellElem("Bullet","1"));A.appendChild(la);la=q.createElt("pp");la.setAttribute("IX",Q++);C.appendChild(la)}else"OL"==oa?sa.OL=!0:"LI"==oa&&(sa.LiIndex=ea+1);0<Ra?(J(Y.childNodes,sa),"UL"==oa&&(la=q.createElt("Row"),-la.setAttribute("IX",Q),la.appendChild(q.createCellElem("Bullet","0")),A.appendChild(la),la=q.createElt("pp"),la.setAttribute("IX",Q++),C.appendChild(la)),N(sa,t,A,C,"")):N(sa,t,A,C,(P.OL?P.LiIndex+". ":"")+Y.textContent)}}};"html"==b&&mxClient.IS_SVG?(m=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1],null!=m&&J(m.childNodes,{})):N({fontColor:q.cellState.style.fontColor,fontSize:q.cellState.style.fontSize,fontFamily:q.cellState.style.fontFamily},t,A,C,m);b=m=0;B=Math.max(B,-L);z=Math.max(z,K);n=z/2;var M=B/2,T=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),ca=T*Math.PI/180;switch(h){case "right":0!=T?(g-=n*Math.cos(ca),y-=n*Math.sin(ca)):m=K/2;break;case "left":0!=T?(g+=n*Math.cos(ca),y+=n*Math.sin(ca)):m=-K/2}switch(c){case "top":0!=T?(g+=M*Math.sin(ca),y+=M*Math.cos(ca)):b=L/2;break;case "bottom":0!=T?(g-=M*Math.sin(ca),y-=M*Math.cos(ca)):b=-L/2}g=(g-f.x+d.dx)*d.scale;y=(f.height-y+f.y-d.dy)*d.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",-g));this.shape.appendChild(this.createCellElemScaled("TxtPinY",y));this.shape.appendChild(this.createCellElemScaled("TxtWidth",z));this.shape.appendChild(this.createCellElemScaled("TxtHeight",B));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",n+m));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",M+b));k-=T;0!=k&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-k)*Math.PI/180));this.shape.appendChild(t);this.shape.appendChild(A);this.shape.appendChild(C)}};+la.setAttribute("IX",Q),la.appendChild(q.createCellElem("Bullet","0")),A.appendChild(la),la=q.createElt("pp"),la.setAttribute("IX",Q++),C.appendChild(la)),N(sa,t,A,C,"")):N(sa,t,A,C,(P.OL?P.LiIndex+". ":"")+Y.textContent)}}};"html"==c&&mxClient.IS_SVG?(m=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1],null!=m&&J(m.childNodes,{})):N({fontColor:q.cellState.style.fontColor,fontSize:q.cellState.style.fontSize,fontFamily:q.cellState.style.fontFamily},t,A,C,m);c=m=0;B=Math.max(B,+L);z=Math.max(z,K);n=z/2;var M=B/2,T=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),ca=T*Math.PI/180;switch(h){case "right":0!=T?(g-=n*Math.cos(ca),y-=n*Math.sin(ca)):m=K/2;break;case "left":0!=T?(g+=n*Math.cos(ca),y+=n*Math.sin(ca)):m=-K/2}switch(b){case "top":0!=T?(g+=M*Math.sin(ca),y+=M*Math.cos(ca)):c=L/2;break;case "bottom":0!=T?(g-=M*Math.sin(ca),y-=M*Math.cos(ca)):c=-L/2}g=(g-f.x+d.dx)*d.scale;y=(f.height-y+f.y-d.dy)*d.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",+g));this.shape.appendChild(this.createCellElemScaled("TxtPinY",y));this.shape.appendChild(this.createCellElemScaled("TxtWidth",z));this.shape.appendChild(this.createCellElemScaled("TxtHeight",B));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",n+m));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",M+c));k-=T;0!=k&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-k)*Math.PI/180));this.shape.appendChild(t);this.shape.appendChild(A);this.shape.appendChild(C)}};mxVsdxCanvas2D.prototype.rotate=function(g,y,z,B,m){0!=g&&(y=this.state,B+=y.dx,m+=y.dy,B*=y.scale,m*=y.scale,this.shape.appendChild(this.createCellElem("Angle",(360-g)*Math.PI/180)),y.rotation+=g,y.rotationCx=B,y.rotationCy=m)};mxVsdxCanvas2D.prototype.stroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","1"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};mxVsdxCanvas2D.prototype.fill=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","1"))};mxVsdxCanvas2D.prototype.fillAndStroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};function BmpDecoder(g,y){this.pos=0;this.buffer=g;this.is_with_alpha=!!y;if(66!=this.buffer[0]&&77!=this.buffer[1])throw Error("Invalid BMP File");this.pos+=2;this.parseHeader();this.parseBGR()}BmpDecoder.prototype.parseHeader=function(){var g=this.buffer;this.fileSize=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.reserved=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.offset=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.headerSize=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.width=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.height=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.planes=g[this.pos+1]<<8|g[this.pos];this.pos+=2;this.bitPP=g[this.pos+1]<<8|g[this.pos];this.pos+=2;this.compress=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.rawSize=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.hr=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.vr=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.colors=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.importantColors=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15);if(15>this.bitPP){g=0===this.colors?1<<this.bitPP:this.colors;this.palette=Array(g);for(var y=0;y<g;y++){var z=this.buffer[this.pos++],B=this.buffer[this.pos++],m=this.buffer[this.pos++],h=this.buffer[this.pos++];this.palette[y]={red:m,green:B,blue:z,quad:h}}}};BmpDecoder.prototype.parseBGR=function(){this.pos=this.offset;try{var g="bit"+this.bitPP,y=document.createElement("canvas").getContext("2d").createImageData(this.width,this.height);this.imageData=y;this.data=y.data;this[g]()}catch(z){console.log("bit decode error:"+z)}};-BmpDecoder.prototype.bit1=function(){for(var g=Math.ceil(this.width/8),y=g%4,z=this.height-1;0<=z;z--){for(var B=0;B<g;B++)for(var m=this.buffer[this.pos++],h=z*this.width*4+32*B,c=0;8>c;c++)if(8*B+c<this.width){var a=this.palette[m>>7-c&1];this.data[h+4*c]=a.red;this.data[h+4*c+1]=a.green;this.data[h+4*c+2]=a.blue;this.data[h+4*c+3]=255}else break;0!=y&&(this.pos+=4-y)}};-BmpDecoder.prototype.bit4=function(){for(var g=Math.ceil(this.width/2),y=g%4,z=this.height-1;0<=z;z--){for(var B=0;B<g;B++){var m=this.buffer[this.pos++],h=z*this.width*4+8*B,c=m&15;m=this.palette[m>>4];this.data[h]=m.red;this.data[h+1]=m.green;this.data[h+2]=m.blue;this.data[h+3]=255;if(2*B+1>=this.width)break;m=this.palette[c];this.data[h+4]=m.red;this.data[h+4+1]=m.green;this.data[h+4+2]=m.blue;this.data[h+4+3]=255}0!=y&&(this.pos+=4-y)}};+BmpDecoder.prototype.bit1=function(){for(var g=Math.ceil(this.width/8),y=g%4,z=this.height-1;0<=z;z--){for(var B=0;B<g;B++)for(var m=this.buffer[this.pos++],h=z*this.width*4+32*B,b=0;8>b;b++)if(8*B+b<this.width){var a=this.palette[m>>7-b&1];this.data[h+4*b]=a.red;this.data[h+4*b+1]=a.green;this.data[h+4*b+2]=a.blue;this.data[h+4*b+3]=255}else break;0!=y&&(this.pos+=4-y)}};+BmpDecoder.prototype.bit4=function(){for(var g=Math.ceil(this.width/2),y=g%4,z=this.height-1;0<=z;z--){for(var B=0;B<g;B++){var m=this.buffer[this.pos++],h=z*this.width*4+8*B,b=m&15;m=this.palette[m>>4];this.data[h]=m.red;this.data[h+1]=m.green;this.data[h+2]=m.blue;this.data[h+3]=255;if(2*B+1>=this.width)break;m=this.palette[b];this.data[h+4]=m.red;this.data[h+4+1]=m.green;this.data[h+4+2]=m.blue;this.data[h+4+3]=255}0!=y&&(this.pos+=4-y)}};BmpDecoder.prototype.bit8=function(){for(var g=this.width%4,y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos++],m=y*this.width*4+4*z;B<this.palette.length?(B=this.palette[B],this.data[m]=B.red,this.data[m+1]=B.green,this.data[m+2]=B.blue):(this.data[m]=255,this.data[m+1]=255,this.data[m+2]=255);this.data[m+3]=255}0!=g&&(this.pos+=4-g)}};-BmpDecoder.prototype.bit15=function(){var g=2*this.width%4;0!=g&&(g=4-g);for(var y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var m=(B&31)/31*255|0,h=(B>>5&31)/31*255|0,c=B>>15?255:0,a=y*this.width*4+4*z;this.data[a]=(B>>10&31)/31*255|0;this.data[a+1]=h;this.data[a+2]=m;this.data[a+3]=c}this.pos+=g}};-BmpDecoder.prototype.bit16=function(){var g=2*this.width%4;0!=g&&(g=4-g);for(var y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var m=(B&31)/31*255|0,h=(B>>5&31)/31*255|0,c=y*this.width*4+4*z;this.data[c]=(B>>10&31)/31*255|0;this.data[c+1]=h;this.data[c+2]=m;this.data[c+3]=255}this.pos+=g}};-BmpDecoder.prototype.bit24=function(){var g=3*this.width%4;0!=g&&(g=4-g);for(var y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos++],m=this.buffer[this.pos++],h=this.buffer[this.pos++],c=y*this.width*4+4*z;this.data[c]=h;this.data[c+1]=m;this.data[c+2]=B;this.data[c+3]=255}this.pos+=g}};-BmpDecoder.prototype.bit32=function(){for(var g=this.height-1;0<=g;g--)for(var y=0;y<this.width;y++){var z=this.buffer[this.pos++],B=this.buffer[this.pos++],m=this.buffer[this.pos++],h=this.buffer[this.pos++],c=g*this.width*4+4*y;this.data[c]=m;this.data[c+1]=B;this.data[c+2]=z;this.data[c+3]=h}};BmpDecoder.prototype.getData=function(){return this.data};var __extends=this&&this.__extends||function(g,y){function z(){this.constructor=g}for(var B in y)y.hasOwnProperty(B)&&(g[B]=y[B]);g.prototype=null===y?Object.create(y):(z.prototype=y.prototype,new z)},com;-(function(g){(function(y){(function(z){var B=function(){function m(c){this.RESPONSE_END="</mxfile>";this.RESPONSE_DIAGRAM_START="";this.RESPONSE_DIAGRAM_END="</diagram>";this.RESPONSE_HEADER='<?xml version="1.0" encoding="UTF-8"?><mxfile>';this.vertexMap={};this.edgeShapeMap={};this.vertexShapeMap={};this.parentsMap={};this.layerNames=[];this.debugPaths=!1;this.vsdxModel=null;this.editorUi=c;this.shapeIndexShift=0}function h(c,a,b,d,f){c=b.createLabelSubShape(c,a);null!=c&&(0!==d&&(a=c.getStyle().match(/;rotation=(\d+\.*\d+)/),-null!=a&&(d+=parseFloat(a[1])),c.setStyle(c.getStyle().replace(/;rotation=(\d+\.*\d+)/,"")+";rotation="+(60<d&&240>d?(d+180)%360:d))),d=c.getGeometry(),d.x=0,d.y=0,d.relative=!0,f=f||new mxPoint(0,0),d.offset=new mxPoint(f.x-d.width/2,f.y-d.height/2))}m.vsdxPlaceholder_$LI$=function(){null==m.vsdxPlaceholder&&(m.vsdxPlaceholder=window.atob?atob("dmlzaW8="):Base64.decode("dmlzaW8=",!0));return m.vsdxPlaceholder};m.parsererrorNS_$LI$=function(){m.parsererrorNS=mxConstants.NS_XHTML;return m.parsererrorNS};-m.parseXml=function(c){try{var a=mxUtils.parseXml(c);return 0<a.getElementsByTagNameNS(m.parsererrorNS,"parsererror").length?null:a}catch(b){return null}};m.decodeUTF16LE=function(c){for(var a="",b=0;b<c.length;b+=2)a+=String.fromCharCode(c.charCodeAt(b)|c.charCodeAt(b+1)<<8);return a};m.prototype.scaleGraph=function(c,a){if(1!==a){c=c.getModel();for(var b in c.cells){var d=c.cells[b],f=c.getGeometry(d);if(null!=f&&(this.scaleRect(f,a),this.scaleRect(f.alternateBounds,a),c.isEdge(d)&&(this.scalePoint(f.sourcePoint,-a),this.scalePoint(f.targetPoint,a),this.scalePoint(f.offset,a),d=f.points,null!=d)))for(f=0;f<d.length;f++)this.scalePoint(d[f],a)}}};m.incorrectXMLReqExp=[{regExp:/&(?!amp;|lt;|gt;|quot;|#)/g,repl:"&"}];m.prototype.decodeVsdx=function(c,a,b,d){function f(K,L,S){function R(){C++;I();L++;L==H&&f(K,L,S)}for(var H=Math.min(L+Q,K.length),N=L;N<H;N++)(function(J){function M(ca){var V=new FormData;V.append("img",ca,J.name);V.append("inputformat","emf");V.append("outputformat","png");var P=new XMLHttpRequest;+BmpDecoder.prototype.bit15=function(){var g=2*this.width%4;0!=g&&(g=4-g);for(var y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var m=(B&31)/31*255|0,h=(B>>5&31)/31*255|0,b=B>>15?255:0,a=y*this.width*4+4*z;this.data[a]=(B>>10&31)/31*255|0;this.data[a+1]=h;this.data[a+2]=m;this.data[a+3]=b}this.pos+=g}};+BmpDecoder.prototype.bit16=function(){var g=2*this.width%4;0!=g&&(g=4-g);for(var y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var m=(B&31)/31*255|0,h=(B>>5&31)/31*255|0,b=y*this.width*4+4*z;this.data[b]=(B>>10&31)/31*255|0;this.data[b+1]=h;this.data[b+2]=m;this.data[b+3]=255}this.pos+=g}};+BmpDecoder.prototype.bit24=function(){var g=3*this.width%4;0!=g&&(g=4-g);for(var y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos++],m=this.buffer[this.pos++],h=this.buffer[this.pos++],b=y*this.width*4+4*z;this.data[b]=h;this.data[b+1]=m;this.data[b+2]=B;this.data[b+3]=255}this.pos+=g}};+BmpDecoder.prototype.bit32=function(){for(var g=this.height-1;0<=g;g--)for(var y=0;y<this.width;y++){var z=this.buffer[this.pos++],B=this.buffer[this.pos++],m=this.buffer[this.pos++],h=this.buffer[this.pos++],b=g*this.width*4+4*y;this.data[b]=m;this.data[b+1]=B;this.data[b+2]=z;this.data[b+3]=h}};BmpDecoder.prototype.getData=function(){return this.data};var __extends=this&&this.__extends||function(g,y){function z(){this.constructor=g}for(var B in y)y.hasOwnProperty(B)&&(g[B]=y[B]);g.prototype=null===y?Object.create(y):(z.prototype=y.prototype,new z)},com;+(function(g){(function(y){(function(z){var B=function(){function m(b){this.RESPONSE_END="</mxfile>";this.RESPONSE_DIAGRAM_START="";this.RESPONSE_DIAGRAM_END="</diagram>";this.RESPONSE_HEADER='<?xml version="1.0" encoding="UTF-8"?><mxfile>';this.vertexMap={};this.edgeShapeMap={};this.vertexShapeMap={};this.parentsMap={};this.layerNames=[];this.debugPaths=!1;this.vsdxModel=null;this.editorUi=b;this.shapeIndexShift=0}function h(b,a,c,d,f){b=c.createLabelSubShape(b,a);null!=b&&(0!==d&&(a=b.getStyle().match(/;rotation=(\d+\.*\d+)/),+null!=a&&(d+=parseFloat(a[1])),b.setStyle(b.getStyle().replace(/;rotation=(\d+\.*\d+)/,"")+";rotation="+(60<d&&240>d?(d+180)%360:d))),d=b.getGeometry(),d.x=0,d.y=0,d.relative=!0,f=f||new mxPoint(0,0),d.offset=new mxPoint(f.x-d.width/2,f.y-d.height/2))}m.vsdxPlaceholder_$LI$=function(){null==m.vsdxPlaceholder&&(m.vsdxPlaceholder=window.atob?atob("dmlzaW8="):Base64.decode("dmlzaW8=",!0));return m.vsdxPlaceholder};m.parsererrorNS_$LI$=function(){m.parsererrorNS=mxConstants.NS_XHTML;return m.parsererrorNS};+m.parseXml=function(b){try{var a=mxUtils.parseXml(b);return 0<a.getElementsByTagNameNS(m.parsererrorNS,"parsererror").length?null:a}catch(c){return null}};m.decodeUTF16LE=function(b){for(var a="",c=0;c<b.length;c+=2)a+=String.fromCharCode(b.charCodeAt(c)|b.charCodeAt(c+1)<<8);return a};m.prototype.scaleGraph=function(b,a){if(1!==a){b=b.getModel();for(var c in b.cells){var d=b.cells[c],f=b.getGeometry(d);if(null!=f&&(this.scaleRect(f,a),this.scaleRect(f.alternateBounds,a),b.isEdge(d)&&(this.scalePoint(f.sourcePoint,+a),this.scalePoint(f.targetPoint,a),this.scalePoint(f.offset,a),d=f.points,null!=d)))for(f=0;f<d.length;f++)this.scalePoint(d[f],a)}}};m.incorrectXMLReqExp=[{regExp:/&(?!amp;|lt;|gt;|quot;|#)/g,repl:"&"}];m.prototype.decodeVsdx=function(b,a,c,d){function f(K,L,S){function R(){C++;I();L++;L==H&&f(K,L,S)}for(var H=Math.min(L+Q,K.length),N=L;N<H;N++)(function(J){function M(ca){var V=new FormData;V.append("img",ca,J.name);V.append("inputformat","emf");V.append("outputformat","png");var P=new XMLHttpRequest;P.open("POST",EMF_CONVERT_URL);P.responseType="blob";k.editorUi.addRemoteServiceSecurityCheck(P);P.onreadystatechange=mxUtils.bind(this,function(){if(4==P.readyState)if(200<=P.status&&299>=P.status)try{var ea=new FileReader;ea.readAsDataURL(P.response);ea.onloadend=function(){var Y=ea.result.indexOf(",")+1;S[J.name]=ea.result.substr(Y);R()}}catch(Y){console.log(Y),R()}else T++,3>T?M(ca):R()});P.send(V)}var T=0;J.async("blob").then(M)})(K[N])}var k=this,n={},q={},t=function(){function K(){H=H.concat(k.RESPONSE_END);a&&a(H)}for(var L=m.vsdxPlaceholder+"/document.xml",S=n[L]?n[L]:null,R=S.firstChild;null!=R&&1!=R.nodeType;)R=R.nextSibling;if(null!=R&&1==R.nodeType)k.importNodes(S,R,L,n);else return null;k.vsdxModel=new g.mxgraph.io.vsdx.mxVsdxModel(S,n,q);L=k.vsdxModel.getPages();var H=k.RESPONSE_HEADER;var N=function(ca){null==ca.entries&&(ca.entries=[]);return ca.entries}(L);m.pageTitleMap={};m.pageIdsSet={};try{for(L=0;L<N.length;L++){var J=N[L].getValue();m.pageTitleMap[J.getPageName()]=J.getPageNameU();m.pageIdsSet[J.getPageNameU()]=!0}}catch(ca){}var M=function(ca,V){var P=N[ca].getValue(),ea=T.createMxGraph();ea.getModel().beginUpdate();T.importPage(P,ea,ea.getDefaultParent(),!0);T.scaleGraph(ea,P.getPageScale()/P.getDrawingScale());ea.getModel().endUpdate();T.postImportPage(P,ea,function(){T.sanitiseGraph(ea);H=H.concat(k.RESPONSE_DIAGRAM_START);H=H.concat(k.processPage(ea,P));H=H.concat(k.RESPONSE_DIAGRAM_END);ca<N.length-1?M(ca+1,V):V()})},T=k;0<N.length?M(0,K):K()},A=0,C=0,I=function(){if(C==A)try{t()}catch(K){console.log(K),-null!=d?d(K):a("")}},Q=window.EMF_CHUNK_SIZE||10;JSZip.loadAsync(c).then(function(K){if(0==Object.keys(K.files).length)null!=d&&d();else{var L=[];K.forEach(function(S,R){var H=R.name;S=H.toLowerCase();var N=S.length;S.indexOf(".xml")==N-4||S.indexOf(".rels")==N-5?(A++,R.async("string").then(function(J){if(0!==J.length){65279==J.charCodeAt(0)&&(J=J.substring(1));var M=m.parseXml(J);if(null==M)if(0===J.charCodeAt(1)&&0===J.charCodeAt(3)&&0===J.charCodeAt(5))M=m.parseXml(m.decodeUTF16LE(J));else{for(M=+null!=d?d(K):a("")}},Q=window.EMF_CHUNK_SIZE||10;JSZip.loadAsync(b).then(function(K){if(0==Object.keys(K.files).length)null!=d&&d();else{var L=[];K.forEach(function(S,R){var H=R.name;S=H.toLowerCase();var N=S.length;S.indexOf(".xml")==N-4||S.indexOf(".rels")==N-5?(A++,R.async("string").then(function(J){if(0!==J.length){65279==J.charCodeAt(0)&&(J=J.substring(1));var M=m.parseXml(J);if(null==M)if(0===J.charCodeAt(1)&&0===J.charCodeAt(3)&&0===J.charCodeAt(5))M=m.parseXml(m.decodeUTF16LE(J));else{for(M=0;M<m.incorrectXMLReqExp.length;M++)m.incorrectXMLReqExp[M].regExp.test(J)&&(J=J.replace(m.incorrectXMLReqExp[M].regExp,m.incorrectXMLReqExp[M].repl));M=m.parseXml(J)}null!=M&&(M.vsdxFileName=H,n[H]=M)}C++;I()})):0===S.indexOf(m.vsdxPlaceholder+"/media")&&(A++,function(J,M){var T=J.length-M.length;J=J.indexOf(M,T);return-1!==J&&J===T}(S,".emf")?JSZip.support.blob&&window.EMF_CONVERT_URL?L.push(R):(C++,I()):function(J,M){var T=J.length-M.length;J=J.indexOf(M,T);return-1!==J&&J===T}(S,".bmp")?JSZip.support.uint8array&&-R.async("uint8array").then(function(J){J=new BmpDecoder(J);var M=document.createElement("canvas");M.width=J.width;M.height=J.height;M.getContext("2d").putImageData(J.imageData,0,0);J=M.toDataURL("image/jpeg");q[H]=J.substr(23);C++;I()}):R.async("base64").then(function(J){q[H]=J;C++;I()}))});f(L,0,q)}},function(K){null!=d&&d(K)})};m.prototype.createMxGraph=function(){var c=new Graph;c.setExtendParents(!1);c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=-!1;return c};m.prototype.processPage=function(c,a){c=(new mxCodec).encode(c.getModel());c.setAttribute("style","default-style2");c=mxUtils.getXml(c);var b="";if(null!=a){var d=mxUtils.htmlEntities(a.getPageName())+(a.isBackground()?" (Background)":"");a=mxUtils.htmlEntities(a.getPageNameU());b+='<diagram name="'+d+'" id="'+a.replace(/\s/g,"_")+'">'}return b+=Graph.compress(c)};m.prototype.scalePoint=function(c,a){null!=c&&(c.x*=a,c.y*=a);return c};m.prototype.scaleRect=function(c,a){null!=c&&(c.x*=-a,c.y*=a,c.height*=a,c.width*=a);return c};m.prototype.importNodes=function(c,a,b,d){var f=b.lastIndexOf("/"),k=b,n=b;if(-1!==f&&(k=b.substring(0,f),n=b.substring(f+1,b.length),b=function(C,I){return C[I]?C[I]:null}(d,k+"/_rels/"+n+".rels"),null!=b)){var q=b.getElementsByTagName("Relationship");b={};for(f=0;f<q.length;f++){n=q.item(f);var t=n.getAttribute("Id");n=n.getAttribute("Target");b[t]=n}a=a.getElementsByTagName("Rel");for(f=0;f<a.length;f++)if(q=a.item(f),n=function(C,I){return C[I]?C[I]:-null}(b,q.getAttribute("r:id")),n=k+"/"+n,null!=n&&(t=d[n]?d[n]:null,null!=t)){q=q.parentNode;for(t=t.firstChild;null!=t&&1!=t.nodeType;)t=t.nextSibling;if(null!=t&&1==t.nodeType)for(t=t.firstChild;null!=t;){if(null!=t&&1==t.nodeType){var A=q.appendChild(c.importNode(t,!0));this.importNodes(c,A,n,d)}t=t.nextSibling}}}};m.prototype.layerIndexToNames=function(c){var a=[];if(c)for(var b=0;b<c.length;b++){var d=parseInt(c[b]);d<this.layerNames.length&&a.push(this.layerNames[d])}return 0<a.length?a:[mxResources.get("background")]};-m.prototype.importPage=function(c,a,b,d){var f=c.getBackPage();if(null!=f){a.getModel().setValue(a.getDefaultParent(),c.getPageName());var k=new mxCell(f.getPageName());a.addCell(k,a.getModel().getRoot(),0,null,null);this.importPage(f,a,a.getDefaultParent())}var n=c.getLayers();k=c.getShapes();f=[];for(var q=0;q<n.length;q++){var t=n[q],A=t.Name.replace(/\s/g,"_");this.layerNames.push(A);0==t.Visible&&f.push(A)}t=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<-C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(k));k=c.getPageDimensions().y;for(q=c.getId();t.hasNext();)n=t.next(),n=n.getValue(),A=this.addShape(a,n,b,q,k),n=this.layerIndexToNames(n.layerMember),null!=A&&null!=n&&a.addTagsForCells([A],n);for(c=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(c.getConnects()));c.hasNext();)n=c.next(),n=this.addConnectedEdge(a,-n.getValue(),q,k),null!=n&&function(C,I){null==C.entries&&(C.entries=[]);for(var Q=0;Q<C.entries.length;Q++)if(null!=C.entries[Q].key.equals&&C.entries[Q].key.equals(I)||C.entries[Q].key===I)return C.entries.splice(Q,1)[0]}(this.edgeShapeMap,n);for(c=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(this.edgeShapeMap));c.hasNext();)n=c.next(),n.getKey().getPageNumber()===q&&-(t=this.addUnconnectedEdge(a,function(C,I){null==C.entries&&(C.entries=[]);for(var Q=0;Q<C.entries.length;Q++)if(null!=C.entries[Q].key.equals&&C.entries[Q].key.equals(I)||C.entries[Q].key===I)return C.entries[Q].value;return null}(this.parentsMap,n.getKey()),n.getValue(),k),n=this.layerIndexToNames(n.getValue().layerMember),null!=n&&a.addTagsForCells([t],n));if(0<this.layerNames.length){c=a.getAllTags();q=!1;for(n=0;n<this.layerNames.length;n++)if(0>mxUtils.indexOf(c,this.layerNames[n])){q=!0;break}q&&-(b=a.insertVertex(b,null,null,0,0,0,0),a.addTagsForCells([b],this.layerNames),b.setVisible(!1));a.setHiddenTags(f)}d||this.sanitiseGraph(a);return k};m.prototype.postImportPage=function(c,a,b){try{var d=function(q){if(null!=q){q=q.entries||[];for(var t=0;t<q.length;t++){var A=q[t].value||{};A.toBeCroppedImg&&k.push(A);d(A.getChildShapes())}}},f=this,k=[];d(c.getShapes());if(0<k.length){var n=function(q,t){function A(){q<k.length-1?n(q+1,t):t()}var C=k[q],I=C.toBeCroppedImg,Q=function(L,S){null==L.entries&&-(L.entries=[]);for(var R=0;R<L.entries.length;R++)if(null!=L.entries[R].key.equals&&L.entries[R].key.equals(S)||L.entries[R].key===S)return L.entries[R].value;return null}(f.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(c.Id,C.Id)),K=new Image;K.onload=function(){var L=I.iData,S=I.iType;try{var R=K.width/I.imgWidth,H=K.height/I.imgHeight,N=-I.imgOffsetX*R,J=(I.imgHeight-I.height+I.imgOffsetY)*H,M=document.createElement("canvas");M.width=I.width*R;M.height=I.height*H;var T=M.getContext("2d");T.fillStyle=-"#FFFFFF";T.fillRect(0,0,M.width,M.height);T.drawImage(K,N,J,M.width,M.height,0,0,M.width,M.height);L=M.toDataURL("image/jpeg").substr(23);S="jpg"}catch(ca){console.log(ca)}Q.style+=";image=data:image/"+S+","+L;A()};K.src="data:image/"+I.iType+";base64,"+I.iData;K.onerror=function(){Q.style+=";image=data:image/"+I.iType+","+I.iData;A()}};n(0,b)}else b()}catch(q){console.log(q),b()}};m.prototype.addShape=function(c,a,b,d,f){a.parentHeight=f;var k=g.mxgraph.io.vsdx.VsdxShape.getType(a.getShape());if(null!=-k&&(function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var n=a.getId();if(a.isVertex()){k=null;k=a.isGroup()?this.addGroup(c,a,b,d,f):this.addVertex(c,a,b,d,f);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=-q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);b=a.getHyperlink();b.pageLink?(d=b.pageLink,m.pageIdsSet[d]||null==m.pageTitleMap[d]||(d=m.pageTitleMap[d]+""),c.setLinkForCell(k,"data:page/id,"+d.replace(/\s/g,"_"))):b.extLink&&c.setLinkForCell(k,b.extLink);a=a.getProperties();-for(b=0;b<a.length;b++)try{c.setAttributeForCell(k,a[b].key,a[b].val)}catch(q){console.log('Attribute: "',a[b].key,'" with value "',a[b].val,'" not allowed in HTML')}return k}a.isGroup()&&this.addGroup(c,a,b,d,f,!0);a.setShapeIndex(c.getModel().getChildCount(b));(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},-getValue:function(){return this.value}})})(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),b)}return null};m.prototype.addGroup=function(c,-a,b,d,f,k){var n=a.getDimensions(),q=a.getMaster(),t=a.getStyleFromShape(),A=a.getGeomList();if(A.isNoFill()||k)t[mxConstants.STYLE_FILLCOLOR]="none",t[mxConstants.STYLE_GRADIENTCOLOR]="none";if(A.isNoLine()||k)t[mxConstants.STYLE_STROKECOLOR]="none";t.html="1";t[mxConstants.STYLE_WHITE_SPACE]="wrap";var C=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(t,"=");k=null;A=a.getChildShapes();k=null!=A&&0<function(K){null==K.entries&&(K.entries=[]);return K.entries.length}(A);t=a.isDisplacedLabel()||a.isRotatedLabel()||-k;k=a.getOriginPoint(f,!0);if(t)k=c.insertVertex(b,null,null,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),C);else{var I=a.noLabelGroup?null:a.getTextLabel();k=c.insertVertex(b,null,I,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),C)}b=k.geometry.height;for(A=function(K){var L=0;return{next:function(){return L<+R.async("uint8array").then(function(J){J=new BmpDecoder(J);var M=document.createElement("canvas");M.width=J.width;M.height=J.height;M.getContext("2d").putImageData(J.imageData,0,0);J=M.toDataURL("image/jpeg");q[H]=J.substr(23);C++;I()}):R.async("base64").then(function(J){q[H]=J;C++;I()}))});f(L,0,q)}},function(K){null!=d&&d(K)})};m.prototype.createMxGraph=function(){var b=new Graph;b.setExtendParents(!1);b.setExtendParentsOnAdd(!1);b.setConstrainChildren(!1);b.setHtmlLabels(!0);b.getModel().maintainEdgeParent=+!1;return b};m.prototype.processPage=function(b,a){b=(new mxCodec).encode(b.getModel());b.setAttribute("style","default-style2");b=mxUtils.getXml(b);var c="";if(null!=a){var d=mxUtils.htmlEntities(a.getPageName())+(a.isBackground()?" (Background)":"");a=mxUtils.htmlEntities(a.getPageNameU());c+='<diagram name="'+d+'" id="'+a.replace(/\s/g,"_")+'">'}return c+=Graph.compress(b)};m.prototype.scalePoint=function(b,a){null!=b&&(b.x*=a,b.y*=a);return b};m.prototype.scaleRect=function(b,a){null!=b&&(b.x*=+a,b.y*=a,b.height*=a,b.width*=a);return b};m.prototype.importNodes=function(b,a,c,d){var f=c.lastIndexOf("/"),k=c,n=c;if(-1!==f&&(k=c.substring(0,f),n=c.substring(f+1,c.length),c=function(C,I){return C[I]?C[I]:null}(d,k+"/_rels/"+n+".rels"),null!=c)){var q=c.getElementsByTagName("Relationship");c={};for(f=0;f<q.length;f++){n=q.item(f);var t=n.getAttribute("Id");n=n.getAttribute("Target");c[t]=n}a=a.getElementsByTagName("Rel");for(f=0;f<a.length;f++)if(q=a.item(f),n=function(C,I){return C[I]?C[I]:+null}(c,q.getAttribute("r:id")),n=k+"/"+n,null!=n&&(t=d[n]?d[n]:null,null!=t)){q=q.parentNode;for(t=t.firstChild;null!=t&&1!=t.nodeType;)t=t.nextSibling;if(null!=t&&1==t.nodeType)for(t=t.firstChild;null!=t;){if(null!=t&&1==t.nodeType){var A=q.appendChild(b.importNode(t,!0));this.importNodes(b,A,n,d)}t=t.nextSibling}}}};m.prototype.layerIndexToNames=function(b){var a=[];if(b)for(var c=0;c<b.length;c++){var d=parseInt(b[c]);d<this.layerNames.length&&a.push(this.layerNames[d])}return 0<a.length?a:[mxResources.get("background")]};+m.prototype.importPage=function(b,a,c,d){var f=b.getBackPage();if(null!=f){a.getModel().setValue(a.getDefaultParent(),b.getPageName());var k=new mxCell(f.getPageName());a.addCell(k,a.getModel().getRoot(),0,null,null);this.importPage(f,a,a.getDefaultParent())}var n=b.getLayers();k=b.getShapes();f=[];for(var q=0;q<n.length;q++){var t=n[q],A=t.Name.replace(/\s/g,"_");this.layerNames.push(A);0==t.Visible&&f.push(A)}t=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<+C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(k));k=b.getPageDimensions().y;for(q=b.getId();t.hasNext();)n=t.next(),n=n.getValue(),A=this.addShape(a,n,c,q,k),n=this.layerIndexToNames(n.layerMember),null!=A&&null!=n&&a.addTagsForCells([A],n);for(b=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(b.getConnects()));b.hasNext();)n=b.next(),n=this.addConnectedEdge(a,+n.getValue(),q,k),null!=n&&function(C,I){null==C.entries&&(C.entries=[]);for(var Q=0;Q<C.entries.length;Q++)if(null!=C.entries[Q].key.equals&&C.entries[Q].key.equals(I)||C.entries[Q].key===I)return C.entries.splice(Q,1)[0]}(this.edgeShapeMap,n);for(b=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(this.edgeShapeMap));b.hasNext();)n=b.next(),n.getKey().getPageNumber()===q&&+(t=this.addUnconnectedEdge(a,function(C,I){null==C.entries&&(C.entries=[]);for(var Q=0;Q<C.entries.length;Q++)if(null!=C.entries[Q].key.equals&&C.entries[Q].key.equals(I)||C.entries[Q].key===I)return C.entries[Q].value;return null}(this.parentsMap,n.getKey()),n.getValue(),k),n=this.layerIndexToNames(n.getValue().layerMember),null!=n&&a.addTagsForCells([t],n));if(0<this.layerNames.length){b=a.getAllTags();q=!1;for(n=0;n<this.layerNames.length;n++)if(0>mxUtils.indexOf(b,this.layerNames[n])){q=!0;break}q&&+(c=a.insertVertex(c,null,null,0,0,0,0),a.addTagsForCells([c],this.layerNames),c.setVisible(!1));a.setHiddenTags(f)}d||this.sanitiseGraph(a);return k};m.prototype.postImportPage=function(b,a,c){try{var d=function(q){if(null!=q){q=q.entries||[];for(var t=0;t<q.length;t++){var A=q[t].value||{};A.toBeCroppedImg&&k.push(A);d(A.getChildShapes())}}},f=this,k=[];d(b.getShapes());if(0<k.length){var n=function(q,t){function A(){q<k.length-1?n(q+1,t):t()}var C=k[q],I=C.toBeCroppedImg,Q=function(L,S){null==L.entries&&+(L.entries=[]);for(var R=0;R<L.entries.length;R++)if(null!=L.entries[R].key.equals&&L.entries[R].key.equals(S)||L.entries[R].key===S)return L.entries[R].value;return null}(f.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b.Id,C.Id)),K=new Image;K.onload=function(){var L=I.iData,S=I.iType;try{var R=K.width/I.imgWidth,H=K.height/I.imgHeight,N=-I.imgOffsetX*R,J=(I.imgHeight-I.height+I.imgOffsetY)*H,M=document.createElement("canvas");M.width=I.width*R;M.height=I.height*H;var T=M.getContext("2d");T.fillStyle=+"#FFFFFF";T.fillRect(0,0,M.width,M.height);T.drawImage(K,N,J,M.width,M.height,0,0,M.width,M.height);L=M.toDataURL("image/jpeg").substr(23);S="jpg"}catch(ca){console.log(ca)}Q.style+=";image=data:image/"+S+","+L;A()};K.src="data:image/"+I.iType+";base64,"+I.iData;K.onerror=function(){Q.style+=";image=data:image/"+I.iType+","+I.iData;A()}};n(0,c)}else c()}catch(q){console.log(q),c()}};m.prototype.addShape=function(b,a,c,d,f){a.parentHeight=f;var k=g.mxgraph.io.vsdx.VsdxShape.getType(a.getShape());if(null!=+k&&(function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var n=a.getId();if(a.isVertex()){k=null;k=a.isGroup()?this.addGroup(b,a,c,d,f):this.addVertex(b,a,c,d,f);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=+q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);c=a.getHyperlink();c.pageLink?(d=c.pageLink,m.pageIdsSet[d]||null==m.pageTitleMap[d]||(d=m.pageTitleMap[d]+""),b.setLinkForCell(k,"data:page/id,"+d.replace(/\s/g,"_"))):c.extLink&&b.setLinkForCell(k,c.extLink);a=a.getProperties();+for(c=0;c<a.length;c++)try{b.setAttributeForCell(k,a[c].key,a[c].val)}catch(q){console.log('Attribute: "',a[c].key,'" with value "',a[c].val,'" not allowed in HTML')}return k}a.isGroup()&&this.addGroup(b,a,c,d,f,!0);a.setShapeIndex(b.getModel().getChildCount(c));(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},+getValue:function(){return this.value}})})(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),c)}return null};m.prototype.addGroup=function(b,+a,c,d,f,k){var n=a.getDimensions(),q=a.getMaster(),t=a.getStyleFromShape(),A=a.getGeomList();if(A.isNoFill()||k)t[mxConstants.STYLE_FILLCOLOR]="none",t[mxConstants.STYLE_GRADIENTCOLOR]="none";if(A.isNoLine()||k)t[mxConstants.STYLE_STROKECOLOR]="none";t.html="1";t[mxConstants.STYLE_WHITE_SPACE]="wrap";var C=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(t,"=");k=null;A=a.getChildShapes();k=null!=A&&0<function(K){null==K.entries&&(K.entries=[]);return K.entries.length}(A);t=a.isDisplacedLabel()||a.isRotatedLabel()||+k;k=a.getOriginPoint(f,!0);if(t)k=b.insertVertex(c,null,null,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),C);else{var I=a.noLabelGroup?null:a.getTextLabel();k=b.insertVertex(c,null,I,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),C)}c=k.geometry.height;for(A=function(K){var L=0;return{next:function(){return L<K.length?K[L++]:null},hasNext:function(){return L<K.length}}}(function(K){null==K.entries&&(K.entries=[]);return K.entries}(A));A.hasNext();)if(C=A.next().getValue(),I=C.getId(),C.isVertex()){var Q=g.mxgraph.io.vsdx.VsdxShape.getType(C.getShape());null!=Q&&(function(K,L){return K&&K.equals?K.equals(L):K===L}(Q,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(K,L){return K&&K.equals?K.equals(L):K===L}(Q,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(K,L){return K&&K.equals?K.equals(L):-K===L}(Q,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&C.isVertex()&&(C.propagateRotation(a.getRotation()),(Q=C.isGroup()?this.addGroup(c,C,k,d,n.y):this.addVertex(c,C,k,d,n.y))&&Q.geometry&&(b=Math.max(Q.geometry.height,b)));null==q&&function(K,L,S){null==K.entries&&(K.entries=[]);for(var R=0;R<K.entries.length;R++)if(null!=K.entries[R].key.equals&&K.entries[R].key.equals(L)||K.entries[R].key===L){K.entries[R].value=S;return}K.entries.push({key:L,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,+K===L}(Q,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&C.isVertex()&&(C.propagateRotation(a.getRotation()),(Q=C.isGroup()?this.addGroup(b,C,k,d,n.y):this.addVertex(b,C,k,d,n.y))&&Q.geometry&&(c=Math.max(Q.geometry.height,c)));null==q&&function(K,L,S){null==K.entries&&(K.entries=[]);for(var R=0;R<K.entries.length;R++)if(null!=K.entries[R].key.equals&&K.entries[R].key.equals(L)||K.entries[R].key===L){K.entries[R].value=S;return}K.entries.push({key:L,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),C)}else null==q?(function(K,L,S){null==K.entries&&(K.entries=[]);for(var R=0;R<K.entries.length;R++)if(null!=K.entries[R].key.equals&&K.entries[R].key.equals(L)||K.entries[R].key===L){K.entries[R].value=S;return}K.entries.push({key:L,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),C),function(K,L,S){null==K.entries&&(K.entries=[]);for(var R=0;R<K.entries.length;R++)if(null!=-K.entries[R].key.equals&&K.entries[R].key.equals(L)||K.entries[R].key===L){K.entries[R].value=S;return}K.entries.push({key:L,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),k)):this.addUnconnectedEdge(c,k,C,f);if(k.children&&0==k.geometry.height&&0<b)for(k.geometry.height=b,f=0;f<k.children.length;f++)n=k.children[f],n.geometry&&(n.geometry.y+=b);t&&a.createLabelSubShape(c,k);c=a.getRotation();if(0!==c)for(f=-k.getGeometry(),q=f.width/2,t=f.height/2,f=0;f<k.getChildCount();f++)n=k.getChildAt(f),g.mxgraph.online.Utils.rotatedGeometry(n.getGeometry(),c,q,t);(function(K,L,S){null==K.entries&&(K.entries=[]);for(var R=0;R<K.entries.length;R++)if(null!=K.entries[R].key.equals&&K.entries[R].key.equals(L)||K.entries[R].key===L){K.entries[R].value=S;return}K.entries.push({key:L,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,-a.getId()),k);return k};m.rotatedEdgePoint=function(c,a,b,d){a=a*Math.PI/180;var f=Math.cos(a);a=Math.sin(a);var k=c.x-b,n=c.y-d;c.x=Math.round(k*f-n*a+b);c.y=Math.round(n*f+k*a+d)};m.prototype.addVertex=function(c,a,b,d,f){var k="",n=a.isDisplacedLabel()||a.isRotatedLabel();n||(k=a.getTextLabel());var q=a.getDimensions(),t=a.getStyleFromShape();t.html="1";var A=t.hasOwnProperty(mxConstants.STYLE_SHAPE)||t.hasOwnProperty("stencil");t.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&A||(t[mxConstants.STYLE_FILLCOLOR]=-"none");A||(t[mxConstants.STYLE_STROKECOLOR]="none");t.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&A||(t[mxConstants.STYLE_GRADIENTCOLOR]="none");t[mxConstants.STYLE_WHITE_SPACE]="wrap";f=a.getOriginPoint(f,!0);return A||null!=k?(t=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(t,"="),A=null,A=n?c.insertVertex(b,null,null,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*q.x)/100),Math.floor(Math.round(100*q.y)/100),t):c.insertVertex(b,null,k,Math.floor(Math.round(100*+K.entries[R].key.equals&&K.entries[R].key.equals(L)||K.entries[R].key===L){K.entries[R].value=S;return}K.entries.push({key:L,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),k)):this.addUnconnectedEdge(b,k,C,f);if(k.children&&0==k.geometry.height&&0<c)for(k.geometry.height=c,f=0;f<k.children.length;f++)n=k.children[f],n.geometry&&(n.geometry.y+=c);t&&a.createLabelSubShape(b,k);b=a.getRotation();if(0!==b)for(f=+k.getGeometry(),q=f.width/2,t=f.height/2,f=0;f<k.getChildCount();f++)n=k.getChildAt(f),g.mxgraph.online.Utils.rotatedGeometry(n.getGeometry(),b,q,t);(function(K,L,S){null==K.entries&&(K.entries=[]);for(var R=0;R<K.entries.length;R++)if(null!=K.entries[R].key.equals&&K.entries[R].key.equals(L)||K.entries[R].key===L){K.entries[R].value=S;return}K.entries.push({key:L,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,+a.getId()),k);return k};m.rotatedEdgePoint=function(b,a,c,d){a=a*Math.PI/180;var f=Math.cos(a);a=Math.sin(a);var k=b.x-c,n=b.y-d;b.x=Math.round(k*f-n*a+c);b.y=Math.round(n*f+k*a+d)};m.prototype.addVertex=function(b,a,c,d,f){var k="",n=a.isDisplacedLabel()||a.isRotatedLabel();n||(k=a.getTextLabel());var q=a.getDimensions(),t=a.getStyleFromShape();t.html="1";var A=t.hasOwnProperty(mxConstants.STYLE_SHAPE)||t.hasOwnProperty("stencil");t.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&A||(t[mxConstants.STYLE_FILLCOLOR]=+"none");A||(t[mxConstants.STYLE_STROKECOLOR]="none");t.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&A||(t[mxConstants.STYLE_GRADIENTCOLOR]="none");t[mxConstants.STYLE_WHITE_SPACE]="wrap";f=a.getOriginPoint(f,!0);return A||null!=k?(t=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(t,"="),A=null,A=n?b.insertVertex(c,null,null,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*q.x)/100),Math.floor(Math.round(100*q.y)/100),t):b.insertVertex(c,null,k,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*q.x)/100),Math.floor(Math.round(100*q.y)/100),t),function(C,I,Q){null==C.entries&&(C.entries=[]);for(var K=0;K<C.entries.length;K++)if(null!=C.entries[K].key.equals&&C.entries[K].key.equals(I)||C.entries[K].key===I){C.entries[K].value=Q;return}C.entries.push({key:I,value:Q,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,a.getId()),A),a.setLabelOffset(A,-t),n&&a.createLabelSubShape(c,A),A):null};m.calculateAbsolutePoint=function(c){for(var a=0,b=0;null!=c;){var d=c.geometry;null!=d&&(a+=d.x,b+=d.y);c=c.parent}return new mxPoint(a,b)};m.prototype.processEdgeGeo=function(c,a){try{var b=c.geomList.geomList[0].rows;for(c=0;c<b.length;c++)if(b[c]instanceof g.mxgraph.io.vsdx.geometry.ArcTo){a.style+="jumpStyle=arc;";break}for(c=0;c<b.length;c++);}catch(d){}};m.prototype.addConnectedEdge=function(c,a,b,d){var f=a.getFromSheet();f=new g.mxgraph.io.vsdx.ShapePageId(b,-f);var k=function(H,N){null==H.entries&&(H.entries=[]);for(var J=0;J<H.entries.length;J++)if(null!=H.entries[J].key.equals&&H.entries[J].key.equals(N)||H.entries[J].key===N)return H.entries[J].value;return null}(this.edgeShapeMap,f);if(null==k)return null;var n=function(H,N){null==H.entries&&(H.entries=[]);for(var J=0;J<H.entries.length;J++)if(null!=H.entries[J].key.equals&&H.entries[J].key.equals(N)||H.entries[J].key===N)return H.entries[J].value;return null}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(b,-k.getId()));if(null!=n){var q=c.getModel().getGeometry(n);null!=q&&(d=q.height)}var t=k.getStartXY(d),A=k.getEndXY(d);q=k.getRoutingPoints(d,t,k.getRotation());this.rotateChildEdge(c.getModel(),n,t,A,q);var C=null,I=a.getSourceToSheet();I=null!=I?function(H,N){null==H.entries&&(H.entries=[]);for(var J=0;J<H.entries.length;J++)if(null!=H.entries[J].key.equals&&H.entries[J].key.equals(N)||H.entries[J].key===N)return H.entries[J].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,-I)):null;var Q=!0;if(null==I||0==I.geometry.width||0==I.geometry.height)I=c.insertVertex(n,null,null,Math.floor(Math.round(100*t.x)/100),Math.floor(Math.round(100*t.y)/100),0,0);else if(I.style&&-1==I.style.indexOf(";rotation=")){C=m.calculateAbsolutePoint(I);var K=m.calculateAbsolutePoint(n),L=I.geometry;C=new mxPoint((K.x+t.x-C.x)/L.width,(K.y+t.y-C.y)/L.height)}else Q=!1;t=null;a=a.getTargetToSheet();a=null!=a?function(H,N){null==H.entries&&(H.entries=[]);for(var J=0;J<H.entries.length;J++)if(null!=-H.entries[J].key.equals&&H.entries[J].key.equals(N)||H.entries[J].key===N)return H.entries[J].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,a)):null;K=!0;null==a||0==a.geometry.width||0==a.geometry.height?a=c.insertVertex(n,null,null,Math.floor(Math.round(100*A.x)/100),Math.floor(Math.round(100*A.y)/100),0,0):a.style&&-1==a.style.indexOf(";rotation=")?(b=m.calculateAbsolutePoint(a),t=m.calculateAbsolutePoint(n),L=a.geometry,t=new mxPoint((t.x+A.x-b.x)/L.width,(t.y+A.y-b.y)/-L.height)):K=!1;b=k.getStyleFromEdgeShape(d);L=k.getRotation();A="";var S=k.isDisplacedLabel()||k.isRotatedLabel()||0!==L,R=k.getLblEdgeOffset(c.getView(),q);S||(A=k.getTextLabel(!0));A=c.insertEdge(n,null,A,I,a,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,"="));S?h(c,A,k,L,R):A.getGeometry().offset=R;null!=C&&c.setConnectionConstraint(A,I,!0,new mxConnectionConstraint(C,!1));Q&&q.shift();null!=t&&c.setConnectionConstraint(A,a,!1,new mxConnectionConstraint(t,!1));K&&q.pop();Q=c.getModel().getGeometry(A);-if(I.parent!=a.parent&&null!=n&&1!=n.id&&1==I.parent.id){a=C=0;do t=n.geometry,null!=t&&(C+=t.x,a+=t.y),n=n.parent;while(null!=n);A.parent=I.parent;for(n=0;n<q.length;n++)q[n].x+=C,q[n].y+=a}Q.points=q;b.hasOwnProperty("curved")&&function(H,N){return H&&H.equals?H.equals(N):H===N}(function(H,N){return H[N]?H[N]:null}(b,"curved"),"1")&&(Q=c.getModel().getGeometry(A),d=k.getControlPoints(d),Q.points=d);this.processEdgeGeo(k,A);k=this.layerIndexToNames(k.layerMember);null!=k&&c.addTagsForCells([A],k);-return f};m.prototype.addUnconnectedEdge=function(c,a,b,d){if(null!=a){var f=c.getModel().getGeometry(a);null!=f&&(d=f.height)}f=b.getStartXY(d);var k=b.getEndXY(d),n=b.getStyleFromEdgeShape(d),q=b.getRoutingPoints(d,f,b.getRotation()),t=b.getRotation();var A="";var C=b.isDisplacedLabel()||b.isRotatedLabel()||0!==t,I=b.getLblEdgeOffset(c.getView(),q);C||(A=b.getTextLabel(!0));0===b.getShapeIndex()?A=c.insertEdge(a,null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")):(A=c.createEdge(a,-null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")),A=c.addEdge(A,a,null,null,b.getShapeIndex()+this.shapeIndexShift++));C?h(c,A,b,t,I):A.getGeometry().offset=I;this.rotateChildEdge(c.getModel(),a,f,k,q);a=c.getModel().getGeometry(A);q.pop();q.shift();a.points=q;a.setTerminalPoint(f,!0);a.setTerminalPoint(k,!1);n.hasOwnProperty("curved")&&function(Q,K){return Q&&Q.equals?Q.equals(K):Q===K}(function(Q,K){return Q[K]?Q[K]:null}(n,"curved"),"1")&&(a=c.getModel().getGeometry(A),c=b.getControlPoints(d),-a.points=c);this.processEdgeGeo(b,A);return A};m.prototype.rotateChildEdge=function(c,a,b,d,f){if(null!=a){var k=c.getGeometry(a);c=c.getStyle(a);if(null!=k&&null!=c&&(a=c.indexOf("rotation="),-1<a))for(c=parseFloat(c.substring(a+9,c.indexOf(";",a))),a=k.width/2,k=k.height/2,m.rotatedEdgePoint(b,c,a,k),m.rotatedEdgePoint(d,c,a,k),b=0;b<f.length;b++)m.rotatedEdgePoint(f[b],c,a,k)}};m.prototype.sanitiseGraph=function(c){var a=c.getModel().getRoot();this.sanitiseCell(c,a)};m.prototype.sanitiseCell=function(c,-a){for(var b=c.getModel(),d=b.getChildCount(a),f=[],k=0;k<d;k++){var n=b.getChildAt(a,k);this.sanitiseCell(c,n)&&f.push(n)}for(c=0;c<f.length;c++)b.remove(f[c]);f=a.geometry;null!=f&&(0>f.height&&(f.height=Math.abs(f.height),f.y-=f.height,a.style+=";flipV=1;"),0>f.width&&(f.width=Math.abs(f.width),f.x-=f.width,a.style+=";flipH=1;"));0<d&&(d=b.getChildCount(a));f=(new String(b.getValue(a))).toString();c=b.getStyle(a);return 0!==d||!b.isVertex(a)||null!=b.getValue(a)&&0!==f.length||null==c||-1==c.indexOf(mxConstants.STYLE_FILLCOLOR+-"=none")||-1==c.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=c.indexOf("image=")?!1:!0};return m}();z.mxVsdxCodec=B;B.__class="com.mxgraph.io.mxVsdxCodec"})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){var B=function(m){function h(c){var a=m.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=c;return a}__extends(h,m);h.prototype.decodeVssx=function(c,a,b,d){var f=this,k="<mxlibrary>[";this.decodeVsdx(c,function(n){k=k.concat(n);var q=f.vsdxModel.getMasterShapes(),t=function(L){var S=0;return{next:function(){return S<L.length?L[S++]:null},hasNext:function(){return S<L.length}}}(function(L){var S=+t),n&&a.createLabelSubShape(b,A),A):null};m.calculateAbsolutePoint=function(b){for(var a=0,c=0;null!=b;){var d=b.geometry;null!=d&&(a+=d.x,c+=d.y);b=b.parent}return new mxPoint(a,c)};m.prototype.processEdgeGeo=function(b,a){try{var c=b.geomList.geomList[0].rows;for(b=0;b<c.length;b++)if(c[b]instanceof g.mxgraph.io.vsdx.geometry.ArcTo){a.style+="jumpStyle=arc;";break}for(b=0;b<c.length;b++);}catch(d){}};m.prototype.addConnectedEdge=function(b,a,c,d){var f=a.getFromSheet();f=new g.mxgraph.io.vsdx.ShapePageId(c,+f);var k=function(H,N){null==H.entries&&(H.entries=[]);for(var J=0;J<H.entries.length;J++)if(null!=H.entries[J].key.equals&&H.entries[J].key.equals(N)||H.entries[J].key===N)return H.entries[J].value;return null}(this.edgeShapeMap,f);if(null==k)return null;var n=function(H,N){null==H.entries&&(H.entries=[]);for(var J=0;J<H.entries.length;J++)if(null!=H.entries[J].key.equals&&H.entries[J].key.equals(N)||H.entries[J].key===N)return H.entries[J].value;return null}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(c,+k.getId()));if(null!=n){var q=b.getModel().getGeometry(n);null!=q&&(d=q.height)}var t=k.getStartXY(d),A=k.getEndXY(d);q=k.getRoutingPoints(d,t,k.getRotation());this.rotateChildEdge(b.getModel(),n,t,A,q);var C=null,I=a.getSourceToSheet();I=null!=I?function(H,N){null==H.entries&&(H.entries=[]);for(var J=0;J<H.entries.length;J++)if(null!=H.entries[J].key.equals&&H.entries[J].key.equals(N)||H.entries[J].key===N)return H.entries[J].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(c,+I)):null;var Q=!0;if(null==I||0==I.geometry.width||0==I.geometry.height)I=b.insertVertex(n,null,null,Math.floor(Math.round(100*t.x)/100),Math.floor(Math.round(100*t.y)/100),0,0);else if(I.style&&-1==I.style.indexOf(";rotation=")){C=m.calculateAbsolutePoint(I);var K=m.calculateAbsolutePoint(n),L=I.geometry;C=new mxPoint((K.x+t.x-C.x)/L.width,(K.y+t.y-C.y)/L.height)}else Q=!1;t=null;a=a.getTargetToSheet();a=null!=a?function(H,N){null==H.entries&&(H.entries=[]);for(var J=0;J<H.entries.length;J++)if(null!=+H.entries[J].key.equals&&H.entries[J].key.equals(N)||H.entries[J].key===N)return H.entries[J].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(c,a)):null;K=!0;null==a||0==a.geometry.width||0==a.geometry.height?a=b.insertVertex(n,null,null,Math.floor(Math.round(100*A.x)/100),Math.floor(Math.round(100*A.y)/100),0,0):a.style&&-1==a.style.indexOf(";rotation=")?(c=m.calculateAbsolutePoint(a),t=m.calculateAbsolutePoint(n),L=a.geometry,t=new mxPoint((t.x+A.x-c.x)/L.width,(t.y+A.y-c.y)/+L.height)):K=!1;c=k.getStyleFromEdgeShape(d);L=k.getRotation();A="";var S=k.isDisplacedLabel()||k.isRotatedLabel()||0!==L,R=k.getLblEdgeOffset(b.getView(),q);S||(A=k.getTextLabel(!0));A=b.insertEdge(n,null,A,I,a,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(c,"="));S?h(b,A,k,L,R):A.getGeometry().offset=R;null!=C&&b.setConnectionConstraint(A,I,!0,new mxConnectionConstraint(C,!1));Q&&q.shift();null!=t&&b.setConnectionConstraint(A,a,!1,new mxConnectionConstraint(t,!1));K&&q.pop();Q=b.getModel().getGeometry(A);+if(I.parent!=a.parent&&null!=n&&1!=n.id&&1==I.parent.id){a=C=0;do t=n.geometry,null!=t&&(C+=t.x,a+=t.y),n=n.parent;while(null!=n);A.parent=I.parent;for(n=0;n<q.length;n++)q[n].x+=C,q[n].y+=a}Q.points=q;c.hasOwnProperty("curved")&&function(H,N){return H&&H.equals?H.equals(N):H===N}(function(H,N){return H[N]?H[N]:null}(c,"curved"),"1")&&(Q=b.getModel().getGeometry(A),d=k.getControlPoints(d),Q.points=d);this.processEdgeGeo(k,A);k=this.layerIndexToNames(k.layerMember);null!=k&&b.addTagsForCells([A],k);+return f};m.prototype.addUnconnectedEdge=function(b,a,c,d){if(null!=a){var f=b.getModel().getGeometry(a);null!=f&&(d=f.height)}f=c.getStartXY(d);var k=c.getEndXY(d),n=c.getStyleFromEdgeShape(d),q=c.getRoutingPoints(d,f,c.getRotation()),t=c.getRotation();var A="";var C=c.isDisplacedLabel()||c.isRotatedLabel()||0!==t,I=c.getLblEdgeOffset(b.getView(),q);C||(A=c.getTextLabel(!0));0===c.getShapeIndex()?A=b.insertEdge(a,null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")):(A=b.createEdge(a,+null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")),A=b.addEdge(A,a,null,null,c.getShapeIndex()+this.shapeIndexShift++));C?h(b,A,c,t,I):A.getGeometry().offset=I;this.rotateChildEdge(b.getModel(),a,f,k,q);a=b.getModel().getGeometry(A);q.pop();q.shift();a.points=q;a.setTerminalPoint(f,!0);a.setTerminalPoint(k,!1);n.hasOwnProperty("curved")&&function(Q,K){return Q&&Q.equals?Q.equals(K):Q===K}(function(Q,K){return Q[K]?Q[K]:null}(n,"curved"),"1")&&(a=b.getModel().getGeometry(A),b=c.getControlPoints(d),+a.points=b);this.processEdgeGeo(c,A);return A};m.prototype.rotateChildEdge=function(b,a,c,d,f){if(null!=a){var k=b.getGeometry(a);b=b.getStyle(a);if(null!=k&&null!=b&&(a=b.indexOf("rotation="),-1<a))for(b=parseFloat(b.substring(a+9,b.indexOf(";",a))),a=k.width/2,k=k.height/2,m.rotatedEdgePoint(c,b,a,k),m.rotatedEdgePoint(d,b,a,k),c=0;c<f.length;c++)m.rotatedEdgePoint(f[c],b,a,k)}};m.prototype.sanitiseGraph=function(b){var a=b.getModel().getRoot();this.sanitiseCell(b,a)};m.prototype.sanitiseCell=function(b,+a){for(var c=b.getModel(),d=c.getChildCount(a),f=[],k=0;k<d;k++){var n=c.getChildAt(a,k);this.sanitiseCell(b,n)&&f.push(n)}for(b=0;b<f.length;b++)c.remove(f[b]);f=a.geometry;null!=f&&(0>f.height&&(f.height=Math.abs(f.height),f.y-=f.height,a.style+=";flipV=1;"),0>f.width&&(f.width=Math.abs(f.width),f.x-=f.width,a.style+=";flipH=1;"));0<d&&(d=c.getChildCount(a));f=(new String(c.getValue(a))).toString();b=c.getStyle(a);return 0!==d||!c.isVertex(a)||null!=c.getValue(a)&&0!==f.length||null==b||-1==b.indexOf(mxConstants.STYLE_FILLCOLOR++"=none")||-1==b.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=b.indexOf("image=")?!1:!0};return m}();z.mxVsdxCodec=B;B.__class="com.mxgraph.io.mxVsdxCodec"})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){var B=function(m){function h(b){var a=m.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=b;return a}__extends(h,m);h.prototype.decodeVssx=function(b,a,c,d){var f=this,k="<mxlibrary>[";this.decodeVsdx(b,function(n){k=k.concat(n);var q=f.vsdxModel.getMasterShapes(),t=function(L){var S=0;return{next:function(){return S<L.length?L[S++]:null},hasNext:function(){return S<L.length}}}(function(L){var S=[];null==L.entries&&(L.entries=[]);for(var R=0;R<L.entries.length;R++)S.push(L.entries[R].value);return S}(f.vsdxModel.getPages())).next();if(null!=q){var A={str:"",toString:function(){return this.str}},C=0===n.length?"":",",I=function(L){return Object.keys(L).map(function(S){return L[S]})}(q);n=function(L){L=I[L];var S=Q.createMxGraph(),R=1;if(null!=L.pageSheet){var H=R=1,N=L.pageSheet.DrawingScale;null!=N&&(R=parseFloat(N.getAttribute("V"))||1);N=L.pageSheet.PageScale;null!=N&&(H=parseFloat(N.getAttribute("V"))||1);R=H/R}H=!1;for(N=0;null!=L.firstLevelShapes&&N<L.firstLevelShapes.length;N++){var J=L.firstLevelShapes[N].getShape(),M=new g.mxgraph.io.vsdx.VsdxShape(t,J,!t.isEdge(J),q,null,Q.vsdxModel);J=null;if(M.isVertex()){Q.edgeShapeMap.entries=[];Q.parentsMap.entries=[];J=Q.addShape(S,M,S.getDefaultParent(),0,1169);M=function(P){null==P.entries&&(P.entries=[]);return P.entries}(Q.edgeShapeMap);for(var T=0;T<M.length;T++){var ca=M[T],V=function(P,ea){null==P.entries&&(P.entries=[]);for(var Y=0;Y<P.entries.length;Y++)if(null!=P.entries[Y].key.equals&&P.entries[Y].key.equals(ea)||P.entries[Y].key===ea)return P.entries[Y].value;return null}(Q.parentsMap,ca.getKey());Q.addUnconnectedEdge(S,V,ca.getValue(),1169)}}else J=Q.addUnconnectedEdge(S,null,M,1169);H|=null!=J}if(H){Q.scaleGraph(S,R);R=Q.normalizeGraph(S);Q.sanitiseGraph(S);if(0===S.getModel().getChildCount(S.getDefaultParent()))return"continue";A.str=A.str.concat(C);A.str=A.str.concat('{"xml":"');S=m.prototype.processPage.call(Q,S,null);A.str=A.str.concat(S);A.str=-A.str.concat('","w":');A.str=A.str.concat(R.width);A.str=A.str.concat(',"h":');A.str=A.str.concat(R.height);A.str=A.str.concat(',"title":');L=L.getName();null==L&&(L="");L=mxUtils.htmlEntities(JSON.stringify(L));A.str=A.str.concat(L);A.str=A.str.concat("}");C=","}};for(var Q=f,K=0;K<I.length;K++)n(K);k=k.concat(A)}k=k.concat("]</mxlibrary>");if(a)try{a(k)}catch(L){null!=d?d(L):a("")}},b)};h.prototype.normalizeGeo=function(c){var a=c.getGeometry();a.x=0;a.y=0;var b=a.sourcePoint;if(c.isEdge()&&null!=-b){this.transPoint(a.targetPoint,b);this.transPoint(a.offset,b);c=a.points;if(null!=c)for(var d=0;d<c.length;d++)this.transPoint(c[d],b);this.transPoint(b,b)}return a};h.prototype.normalizeGraph=function(c){function a(C){null!=C&&(null==b?(b=C.x,d=C.y,f=C.x+(C.width||0),k=C.y+(C.height||0)):(b=Math.min(C.x,b),d=Math.min(C.y,d),f=Math.max(C.x+(C.width||0),f),k=Math.max(C.y+(C.height||0),k)))}var b,d,f,k,n;for(n in c.model.cells){var q=c.model.cells[n],t=q.geometry;if(null!=t&&1==q.parent.id)if(q.vertex)a(t);-else for(a(t.sourcePoint),a(t.targetPoint),q=t.points,t=0;null!=q&&t<q.length;t++)a(q[t])}var A={x:b,y:d};for(n in c.model.cells)if(q=c.model.cells[n],t=q.geometry,null!=t&&1==q.parent.id&&(t.x-=b,t.y-=d,q.isEdge()))for(this.transPoint(t.sourcePoint,A),this.transPoint(t.targetPoint,A),this.transPoint(t.offset,A),q=t.points,t=0;null!=q&&t<q.length;t++)this.transPoint(q[t],A);return{width:f-b,height:k-d}};h.prototype.transPoint=function(c,a){null!=c&&(c.x-=a.x,c.y-=a.y)};h.prototype.processPage=function(c,-a){var b=c.getModel(),d="",f="";for(q in b.cells){var k=b.cells[q];if(c.getDefaultParent()===b.getParent(k)){d=d.concat(f);d=d.concat('{"xml":"');var n=this.createMxGraph();n.addCell(k);this.sanitiseGraph(n);if(0===n.getModel().getChildCount(n.getDefaultParent()))return"continue";f=this.normalizeGeo(k);n=m.prototype.processPage.call(this,n,null);d=d.concat(n);d=d.concat('","w":');d=d.concat(f.width);d=d.concat(',"h":');d=d.concat(f.height);d=d.concat(',"title":"');f=b.getStyle(k);k="";if(null!=f&&+A.str.concat('","w":');A.str=A.str.concat(R.width);A.str=A.str.concat(',"h":');A.str=A.str.concat(R.height);A.str=A.str.concat(',"title":');L=L.getName();null==L&&(L="");L=mxUtils.htmlEntities(JSON.stringify(L));A.str=A.str.concat(L);A.str=A.str.concat("}");C=","}};for(var Q=f,K=0;K<I.length;K++)n(K);k=k.concat(A)}k=k.concat("]</mxlibrary>");if(a)try{a(k)}catch(L){null!=d?d(L):a("")}},c)};h.prototype.normalizeGeo=function(b){var a=b.getGeometry();a.x=0;a.y=0;var c=a.sourcePoint;if(b.isEdge()&&null!=+c){this.transPoint(a.targetPoint,c);this.transPoint(a.offset,c);b=a.points;if(null!=b)for(var d=0;d<b.length;d++)this.transPoint(b[d],c);this.transPoint(c,c)}return a};h.prototype.normalizeGraph=function(b){function a(C){null!=C&&(null==c?(c=C.x,d=C.y,f=C.x+(C.width||0),k=C.y+(C.height||0)):(c=Math.min(C.x,c),d=Math.min(C.y,d),f=Math.max(C.x+(C.width||0),f),k=Math.max(C.y+(C.height||0),k)))}var c,d,f,k,n;for(n in b.model.cells){var q=b.model.cells[n],t=q.geometry;if(null!=t&&1==q.parent.id)if(q.vertex)a(t);+else for(a(t.sourcePoint),a(t.targetPoint),q=t.points,t=0;null!=q&&t<q.length;t++)a(q[t])}var A={x:c,y:d};for(n in b.model.cells)if(q=b.model.cells[n],t=q.geometry,null!=t&&1==q.parent.id&&(t.x-=c,t.y-=d,q.isEdge()))for(this.transPoint(t.sourcePoint,A),this.transPoint(t.targetPoint,A),this.transPoint(t.offset,A),q=t.points,t=0;null!=q&&t<q.length;t++)this.transPoint(q[t],A);return{width:f-c,height:k-d}};h.prototype.transPoint=function(b,a){null!=b&&(b.x-=a.x,b.y-=a.y)};h.prototype.processPage=function(b,+a){var c=b.getModel(),d="",f="";for(q in c.cells){var k=c.cells[q];if(b.getDefaultParent()===c.getParent(k)){d=d.concat(f);d=d.concat('{"xml":"');var n=this.createMxGraph();n.addCell(k);this.sanitiseGraph(n);if(0===n.getModel().getChildCount(n.getDefaultParent()))return"continue";f=this.normalizeGeo(k);n=m.prototype.processPage.call(this,n,null);d=d.concat(n);d=d.concat('","w":');d=d.concat(f.width);d=d.concat(',"h":');d=d.concat(f.height);d=d.concat(',"title":"');f=c.getStyle(k);k="";if(null!=f&&(n=f.indexOf(g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID),0<=n)){n+=g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID.length+1;var q=parseInt(f.substring(n,f.indexOf(";",n)));a:{f=this.vertexShapeMap;n=new g.mxgraph.io.vsdx.ShapePageId(a.getId(),q);null==f.entries&&(f.entries=[]);for(var t=0;t<f.entries.length;t++)if(null!=f.entries[t].key.equals&&f.entries[t].key.equals(n)||f.entries[t].key===n){f=f.entries[t].value;break a}f=null}null!=f&&(k=f.getName())}d=d.concat(k);d=d.concat('"}');f=","}}this.RESPONSE_DIAGRAM_START=0<d.length?",":"";return d};return h}(g.mxgraph.io.mxVsdxCodec);z.mxVssxCodec=B;B.__class="com.mxgraph.io.mxVssxCodec"})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d){this.formulaE=this.formulaA=this.d=this.c=this.b=this.a=this.y=this.x=null;this.index=0;this.index=a;this.x=b;this.y=d}c.prototype.getX=function(){return this.x};c.prototype.getY=function(){return this.y};c.prototype.getA=function(){return this.a};c.prototype.getB=function(){return this.b};c.prototype.getC=function(){return this.c};c.prototype.getD=function(){return this.d};c.prototype.getFormulaA=-function(){return this.formulaA};c.prototype.getFormulaE=function(){return this.formulaE};c.prototype.getIndex=function(){return this.index};return c}();m.Row=h;h.__class="com.mxgraph.io.vsdx.geometry.Row"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(){}c.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))||1}catch(b){return 1}};c.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var b=parseFloat(a);if(isFinite(b))return b}}catch(d){}return null};c.getRowObj=function(a,b){var d=a.getAttribute("T"),f=c.getIndex(a);var k=(k=a.getAttribute("Del"))&&k.equals?k.equals("1"):"1"===k;if(!k){var n=null;f<=b.length&&(n=b[f-1]);var q=k=b=null,t=null,-A=null,C=null,I=null,Q=null;null!=n&&(b=n.x,k=n.y,q=n.getA(),t=n.getB(),A=n.getC(),C=n.getD(),Q=n.getFormulaA(),I=n.getFormulaE());a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(n=0;n<a.length;n++){var K=a[n],L=K.getAttribute("N"),S=K.getAttribute("V");switch(L){case "X":b=c.getDoubleVal(S);break;case "Y":k=c.getDoubleVal(S);break;case "A":q=c.getDoubleVal(S);Q=K.getAttribute("V");break;case "B":t=c.getDoubleVal(S);break;case "C":A=c.getDoubleVal(S);break;case "D":C=c.getDoubleVal(S);-break;case "E":I=S}}switch(d){case "MoveTo":return new g.mxgraph.io.vsdx.geometry.MoveTo(f,b,k);case "LineTo":return new g.mxgraph.io.vsdx.geometry.LineTo(f,b,k);case "ArcTo":return new g.mxgraph.io.vsdx.geometry.ArcTo(f,b,k,q);case "Ellipse":return new g.mxgraph.io.vsdx.geometry.Ellipse(f,b,k,q,t,A,C);case "EllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.EllipticalArcTo(f,b,k,q,t,A,C);case "InfiniteLine":return new g.mxgraph.io.vsdx.geometry.InfiniteLine(f,b,k,q,t);case "NURBSTo":return new g.mxgraph.io.vsdx.geometry.NURBSTo(f,-b,k,q,t,A,C,I);case "PolylineTo":return new g.mxgraph.io.vsdx.geometry.PolylineTo(f,b,k,Q);case "RelCubBezTo":return new g.mxgraph.io.vsdx.geometry.RelCubBezTo(f,b,k,q,t,A,C);case "RelEllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(f,b,k,q,t,A,C);case "RelLineTo":return new g.mxgraph.io.vsdx.geometry.RelLineTo(f,b,k);case "RelMoveTo":return new g.mxgraph.io.vsdx.geometry.RelMoveTo(f,b,k);case "RelQuadBezTo":return new g.mxgraph.io.vsdx.geometry.RelQuadBezTo(f,b,k,q,t);case "SplineKnot":return new g.mxgraph.io.vsdx.geometry.SplineKnot(f,-b,k,q);case "SplineStart":return new g.mxgraph.io.vsdx.geometry.SplineStart(f,b,k,q,t,A,C)}}return new g.mxgraph.io.vsdx.geometry.DelRow(f)};return c}();m.RowFactory=h;h.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(a,c,d){this.formulaE=this.formulaA=this.d=this.c=this.b=this.a=this.y=this.x=null;this.index=0;this.index=a;this.x=c;this.y=d}b.prototype.getX=function(){return this.x};b.prototype.getY=function(){return this.y};b.prototype.getA=function(){return this.a};b.prototype.getB=function(){return this.b};b.prototype.getC=function(){return this.c};b.prototype.getD=function(){return this.d};b.prototype.getFormulaA=+function(){return this.formulaA};b.prototype.getFormulaE=function(){return this.formulaE};b.prototype.getIndex=function(){return this.index};return b}();m.Row=h;h.__class="com.mxgraph.io.vsdx.geometry.Row"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(){}b.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))||1}catch(c){return 1}};b.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var c=parseFloat(a);if(isFinite(c))return c}}catch(d){}return null};b.getRowObj=function(a,c){var d=a.getAttribute("T"),f=b.getIndex(a);var k=(k=a.getAttribute("Del"))&&k.equals?k.equals("1"):"1"===k;if(!k){var n=null;f<=c.length&&(n=c[f-1]);var q=k=c=null,t=null,+A=null,C=null,I=null,Q=null;null!=n&&(c=n.x,k=n.y,q=n.getA(),t=n.getB(),A=n.getC(),C=n.getD(),Q=n.getFormulaA(),I=n.getFormulaE());a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(n=0;n<a.length;n++){var K=a[n],L=K.getAttribute("N"),S=K.getAttribute("V");switch(L){case "X":c=b.getDoubleVal(S);break;case "Y":k=b.getDoubleVal(S);break;case "A":q=b.getDoubleVal(S);Q=K.getAttribute("V");break;case "B":t=b.getDoubleVal(S);break;case "C":A=b.getDoubleVal(S);break;case "D":C=b.getDoubleVal(S);+break;case "E":I=S}}switch(d){case "MoveTo":return new g.mxgraph.io.vsdx.geometry.MoveTo(f,c,k);case "LineTo":return new g.mxgraph.io.vsdx.geometry.LineTo(f,c,k);case "ArcTo":return new g.mxgraph.io.vsdx.geometry.ArcTo(f,c,k,q);case "Ellipse":return new g.mxgraph.io.vsdx.geometry.Ellipse(f,c,k,q,t,A,C);case "EllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.EllipticalArcTo(f,c,k,q,t,A,C);case "InfiniteLine":return new g.mxgraph.io.vsdx.geometry.InfiniteLine(f,c,k,q,t);case "NURBSTo":return new g.mxgraph.io.vsdx.geometry.NURBSTo(f,+c,k,q,t,A,C,I);case "PolylineTo":return new g.mxgraph.io.vsdx.geometry.PolylineTo(f,c,k,Q);case "RelCubBezTo":return new g.mxgraph.io.vsdx.geometry.RelCubBezTo(f,c,k,q,t,A,C);case "RelEllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(f,c,k,q,t,A,C);case "RelLineTo":return new g.mxgraph.io.vsdx.geometry.RelLineTo(f,c,k);case "RelMoveTo":return new g.mxgraph.io.vsdx.geometry.RelMoveTo(f,c,k);case "RelQuadBezTo":return new g.mxgraph.io.vsdx.geometry.RelQuadBezTo(f,c,k,q,t);case "SplineKnot":return new g.mxgraph.io.vsdx.geometry.SplineKnot(f,+c,k,q);case "SplineStart":return new g.mxgraph.io.vsdx.geometry.SplineStart(f,c,k,q,t,A,C)}}return new g.mxgraph.io.vsdx.geometry.DelRow(f)};return b}();m.RowFactory=h;h.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(){this.colorElementMap={};this.fontElementMap={}}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0())};h.defaultColors_$LI$=function(){h.__static_initialize();null==h.defaultColors&&(h.defaultColors={});return h.defaultColors};h.__static_initializer_0=function(){h.defaultColors_$LI$()["0"]="#000000";h.defaultColors_$LI$()["1"]="#FFFFFF";h.defaultColors_$LI$()["2"]="#FF0000";h.defaultColors_$LI$()["3"]="#00FF00";h.defaultColors_$LI$()["4"]="#0000FF";h.defaultColors_$LI$()["5"]="#FFFF00";h.defaultColors_$LI$()["6"]="#FF00FF";h.defaultColors_$LI$()["7"]="#00FFFF";h.defaultColors_$LI$()["8"]="#800000";h.defaultColors_$LI$()["9"]="#008000";h.defaultColors_$LI$()["10"]="#000080";h.defaultColors_$LI$()["11"]="#808000";h.defaultColors_$LI$()["12"]="#800080";h.defaultColors_$LI$()["13"]="#008080";h.defaultColors_$LI$()["14"]="#C0C0C0";h.defaultColors_$LI$()["15"]="#E6E6E6";-h.defaultColors_$LI$()["16"]="#CDCDCD";h.defaultColors_$LI$()["17"]="#B3B3B3";h.defaultColors_$LI$()["18"]="#9A9A9A";h.defaultColors_$LI$()["19"]="#808080";h.defaultColors_$LI$()["20"]="#666666";h.defaultColors_$LI$()["21"]="#4D4D4D";h.defaultColors_$LI$()["22"]="#333333";h.defaultColors_$LI$()["23"]="#1A1A1A"};h.prototype.initialise=function(c,a){if(null!=c){a=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.COLORS);if(0<a.length){var b=a.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR_ENTRY),-d=b.length;for(a=0;a<d;a++){var f=b.item(a),k=f.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.INDEX);f=f.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.RGB);this.colorElementMap[k]=f}}a=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.FACE_NAMES);if(0<a.length)for(c=a.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.FACE_NAME),b=c.length,a=0;a<b;a++)k=c.item(a),d=k.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID),k=k.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FONT_NAME),-this.fontElementMap[d]=k}};h.prototype.getColor=function(c){var a=function(b,d){return b[d]?b[d]:null}(this.colorElementMap,c);return null==a&&(a=function(b,d){return b[d]?b[d]:null}(h.defaultColors_$LI$(),c),null==a)?"":a};h.prototype.getFont=function(c){var a=this.fontElementMap;c=a[c]?a[c]:null;return null==c?"":c};return h}();m.__static_initialized=!1;B.mxPropertiesManager=m;m.__class="com.mxgraph.io.vsdx.mxPropertiesManager"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||+h.defaultColors_$LI$()["16"]="#CDCDCD";h.defaultColors_$LI$()["17"]="#B3B3B3";h.defaultColors_$LI$()["18"]="#9A9A9A";h.defaultColors_$LI$()["19"]="#808080";h.defaultColors_$LI$()["20"]="#666666";h.defaultColors_$LI$()["21"]="#4D4D4D";h.defaultColors_$LI$()["22"]="#333333";h.defaultColors_$LI$()["23"]="#1A1A1A"};h.prototype.initialise=function(b,a){if(null!=b){a=b.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.COLORS);if(0<a.length){var c=a.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR_ENTRY),+d=c.length;for(a=0;a<d;a++){var f=c.item(a),k=f.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.INDEX);f=f.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.RGB);this.colorElementMap[k]=f}}a=b.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.FACE_NAMES);if(0<a.length)for(b=a.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.FACE_NAME),c=b.length,a=0;a<c;a++)k=b.item(a),d=k.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID),k=k.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FONT_NAME),+this.fontElementMap[d]=k}};h.prototype.getColor=function(b){var a=function(c,d){return c[d]?c[d]:null}(this.colorElementMap,b);return null==a&&(a=function(c,d){return c[d]?c[d]:null}(h.defaultColors_$LI$(),b),null==a)?"":a};h.prototype.getFont=function(b){var a=this.fontElementMap;b=a[b]?a[b]:null;return null==b?"":b};return h}();m.__static_initialized=!1;B.mxPropertiesManager=m;m.__class="com.mxgraph.io.vsdx.mxPropertiesManager"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c){this.sourceToSheet=this.fromSheet=null;this.sourceToPart=-1;this.targetToSheet=null;this.targetToPart=-1;this.endShape=this.fromCell=null;var a=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FROM_SHEET);this.fromSheet=null!=a&&0!==a.length?parseFloat(a):-1;a=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FROM_CELL);this.addFromCell(c,a)}h.prototype.addFromCell=function(c,a){var b=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TO_SHEET),d=-!0;null!=a&&function(f,k){return f&&f.equals?f.equals(k):f===k}(a,g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X)?(this.sourceToSheet=null!=b&&0!==b.length?parseFloat(b):-1,d=!0):null!=a&&function(f,k){return f&&f.equals?f.equals(k):f===k}(a,g.mxgraph.io.vsdx.mxVsdxConstants.END_X)?(this.targetToSheet=null!=b&&0!==b.length?parseFloat(b):-1,d=!1):null==this.sourceToSheet?(this.sourceToSheet=null!=b&&0!==b.length?parseFloat(b):-1,d=!0):null==this.targetToSheet&&(this.targetToSheet=null!=b&&0!==b.length?-parseFloat(b):-1,d=!1);this.findToPart(c,d)};h.prototype.findToPart=function(c,a){c=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TO_PART);c=null!=c&&0!==c.length?parseFloat(c):-1;a?this.sourceToPart=c:this.targetToPart=c};h.prototype.getFromSheet=function(){return this.fromSheet};h.prototype.getSourceToSheet=function(){return this.sourceToSheet};h.prototype.getTargetToSheet=function(){return this.targetToSheet};h.prototype.getSourceToPart=function(){return this.sourceToPart};h.prototype.getTargetToPart=-function(){return this.targetToPart};h.prototype.addConnect=function(c){this.endShape=c;var a=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FROM_CELL);this.addFromCell(c,a)};return h}();B.mxVsdxConnect=m;m.__class="com.mxgraph.io.vsdx.mxVsdxConnect"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b){this.sourceToSheet=this.fromSheet=null;this.sourceToPart=-1;this.targetToSheet=null;this.targetToPart=-1;this.endShape=this.fromCell=null;var a=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FROM_SHEET);this.fromSheet=null!=a&&0!==a.length?parseFloat(a):-1;a=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FROM_CELL);this.addFromCell(b,a)}h.prototype.addFromCell=function(b,a){var c=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TO_SHEET),d=+!0;null!=a&&function(f,k){return f&&f.equals?f.equals(k):f===k}(a,g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X)?(this.sourceToSheet=null!=c&&0!==c.length?parseFloat(c):-1,d=!0):null!=a&&function(f,k){return f&&f.equals?f.equals(k):f===k}(a,g.mxgraph.io.vsdx.mxVsdxConstants.END_X)?(this.targetToSheet=null!=c&&0!==c.length?parseFloat(c):-1,d=!1):null==this.sourceToSheet?(this.sourceToSheet=null!=c&&0!==c.length?parseFloat(c):-1,d=!0):null==this.targetToSheet&&(this.targetToSheet=null!=c&&0!==c.length?+parseFloat(c):-1,d=!1);this.findToPart(b,d)};h.prototype.findToPart=function(b,a){b=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TO_PART);b=null!=b&&0!==b.length?parseFloat(b):-1;a?this.sourceToPart=b:this.targetToPart=b};h.prototype.getFromSheet=function(){return this.fromSheet};h.prototype.getSourceToSheet=function(){return this.sourceToSheet};h.prototype.getTargetToSheet=function(){return this.targetToSheet};h.prototype.getSourceToPart=function(){return this.sourceToPart};h.prototype.getTargetToPart=+function(){return this.targetToPart};h.prototype.addConnect=function(b){this.endShape=b;var a=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FROM_CELL);this.addFromCell(b,a)};return h}();B.mxVsdxConnect=m;m.__class="com.mxgraph.io.vsdx.mxVsdxConnect"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(){}h.SET_VALUES_$LI$=function(){null==h.SET_VALUES&&(h.SET_VALUES=["a","b"]);return h.SET_VALUES};h.MY_SET_$LI$=function(){null==h.MY_SET&&(h.MY_SET=h.SET_VALUES_$LI$().slice(0).slice(0));return h.MY_SET};return h}();m.ANGLE="Angle";m.ARC_TO="ArcTo";m.BACKGROUND="Background";m.BACK_PAGE="BackPage";m.BEGIN_ARROW="BeginArrow";m.BEGIN_ARROW_SIZE="BeginArrowSize";m.BEGIN_X="BeginX";m.BEGIN_Y="BeginY";m.BOTTOM_MARGIN="BottomMargin";m.BULLET="Bullet";m.CASE="Case";m.CHARACTER="Character";m.COLOR="Color";m.COLOR_ENTRY="ColorEntry";m.COLORS="Colors";m.COLOR_TRANS="ColorTrans";m.CONNECT="Connect";m.CONNECTS="Connects";m.CONNECTION="Connection";m.CONTROL="Control";m.DELETED="Del";m.DOCUMENT_SHEET="DocumentSheet";m.ELLIPSE="Ellipse";m.ELLIPTICAL_ARC_TO="EllipticalArcTo";m.END_ARROW="EndArrow";m.END_ARROW_SIZE="EndArrowSize";m.END_X="EndX";m.END_Y="EndY";m.FACE_NAME="FaceName";m.FACE_NAMES="FaceNames";m.FALSE="0";m.FILL="Fill";m.FILL_BKGND="FillBkgnd";m.FILL_BKGND_TRANS="FillBkgndTrans";m.FILL_FOREGND="FillForegnd";m.FILL_FOREGND_TRANS="FillForegndTrans";m.FILL_PATTERN="FillPattern";m.FILL_STYLE="FillStyle";m.FILL_GRADIENT_ENABLED="FillGradientEnabled";m.FLAGS="Flags";m.FLIP_X="FlipX";m.FLIP_Y="FlipY";m.FONT="Font";m.FONT_NAME="Name";m.FOREIGN="Foreign";m.FROM_CELL="FromCell";m.FROM_SHEET="FromSheet";m.GEOM="Geom";m.HEIGHT="Height";m.HORIZONTAL_ALIGN="HorzAlign";m.ID="ID";m.INDENT_FIRST="IndFirst";m.INDENT_LEFT="IndLeft";m.INDENT_RIGHT=@@ -15548,490 +15548,490 @@ m.BULLET="Bullet";m.CASE="Case";m.CHARACTER="Character";m.COLOR="Color";m.COLOR_"PageWidth";m.PAGES="Pages";m.PARAGRAPH="Paragraph";m.PIN_X="PinX";m.PIN_Y="PinY";m.POS="Pos";m.RGB="RGB";m.RIGHT_MARGIN="RightMargin";m.ROUNDING="Rounding";m.RTL_TEXT="RTLText";m.SIZE="Size";m.SHAPE="Shape";m.SHAPES="Shapes";m.SHAPE_SHDW_SHOW="ShapeShdwShow";m.SHDW_PATTERN="ShdwPattern";m.SPACE_AFTER="SpAfter";m.SPACE_BEFORE="SpBefore";m.SPACE_LINE="SpLine";m.STRIKETHRU="Strikethru";m.STYLE="Style";m.STYLE_SHEET="StyleSheet";m.STYLE_SHEETS="StyleSheets";m.TEXT="Text";m.TEXT_BKGND="TextBkgnd";m.TEXT_BLOCK="TextBlock";m.TEXT_STYLE="TextStyle";m.TO_PART="ToPart";m.TO_SHEET="ToSheet";m.TOP_MARGIN="TopMargin";m.TRUE="1";m.TXT_ANGLE="TxtAngle";m.TXT_HEIGHT="TxtHeight";m.TXT_LOC_PIN_X="TxtLocPinX";m.TXT_LOC_PIN_Y="TxtLocPinY";m.TXT_PIN_X="TxtPinX";m.TXT_PIN_Y="TxtPinY";m.TXT_WIDTH="TxtWidth";m.TYPE="Type";m.TYPE_GROUP="Group";m.TYPE_SHAPE="Shape";m.UNIQUE_ID="UniqueID";m.VERTICAL_ALIGN="VerticalAlign";m.WIDTH="Width";m.X_CON="XCon";m.X_DYN="XDyn";m.X="X";m.Y_CON="YCon";m.Y_DYN="YDyn";m.Y="Y";m.HIDE_TEXT="HideText";m.VSDX_ID="vsdxID";m.CONNECT_TO_PART_WHOLE_SHAPE=3;B.mxVsdxConstants=m;m.__class="com.mxgraph.io.vsdx.mxVsdxConstants"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a){this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1;this.rows=null;if((null!=c&&1==c.nodeType||null===c)&&(null!=a&&a instanceof Array||null===a))Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(c),null!=a&&this.index<a.length&&this.inheritGeo(a[this.index]),-this.processGeoElem(c);else if((null!=c&&1==c.nodeType||null===c)&&void 0===a)Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(c),this.processGeoElem(c);else throw Error("invalid overload");}h.prototype.getIndex$org_w3c_dom_Element=function(c){try{return parseInt(c.getAttribute("IX"))||0}catch(a){return 0}};h.prototype.getIndex=function(c){if(null!=c&&1==c.nodeType||-null===c)return this.getIndex$org_w3c_dom_Element(c);if(void 0===c)return this.getIndex$();throw Error("invalid overload");};h.prototype.processGeoElem=function(c){var a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"Cell");c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"Row");if(null==this.rows){this.rows=[];for(var b=0;b<c.length;b++)this.rows.push(null)}for(b=0;b<a.length;b++){var d=a[b],f=d.getAttribute("N");d=d.getAttribute("V");switch(f){case "NoFill":this.noFill=-function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoLine":this.noLine=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoShow":this.noShow=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoSnap":this.noSnap=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoQuickDrag":this.noQuickDrag=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d)}}a=this.rows.length;b=!1;for(f=0;f<c.length;f++)d=g.mxgraph.io.vsdx.geometry.RowFactory.getRowObj(c[f],-this.rows),d.getIndex()>a?(this.rows.push(d),b=!0):this.rows[d.getIndex()-1]=d;b&&function(k,n){n.compare?k.sort(function(q,t){return n.compare(q,t)}):k.sort(n)}(this.rows,new h.mxVsdxGeometry$0(this))};h.prototype.inheritGeo=function(c){this.noFill=c.noFill;this.noLine=c.noLine;this.noShow=c.noShow;this.noSnap=c.noSnap;this.noQuickDrag=c.noQuickDrag;var a=this.rows=[];a.push.apply(a,c.rows)};h.prototype.getIndex$=function(){return this.index};h.prototype.isNoFill=function(){return this.noFill};h.prototype.isNoLine=-function(){return this.noLine};h.prototype.isNoShow=function(){return this.noShow};h.prototype.isNoSnap=function(){return this.noSnap};h.prototype.isNoQuickDrag=function(){return this.noQuickDrag};h.prototype.getRows=function(){return this.rows};h.prototype.getPathXML=function(c,a){if(this.noShow)return"";for(var b="",d=0;d<this.rows.length;d++){var f=this.rows[d];b=b.concat(null!=f?f.handle(c,a):"")}return b};return h}();B.mxVsdxGeometry=m;m.__class="com.mxgraph.io.vsdx.mxVsdxGeometry";(function(h){var c=-function(){function a(b){this.__parent=b}a.prototype.compare=function(b,d){b=null!=b?b.getIndex():0;d=null!=d?d.getIndex():0;return b-d};return a}();h.mxVsdxGeometry$0=c;c.__interfaces=["java.util.Comparator"]})(m=B.mxVsdxGeometry||(B.mxVsdxGeometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c){this.geomList=[];this.parentGeomList=null;this.sortNeeded=!1;if(null!=c){this.parentGeomList=c.geomList;var a=this.geomList;a.push.apply(a,c.geomList)}}h.prototype.addGeometry=function(c){c=new g.mxgraph.io.vsdx.mxVsdxGeometry(c,this.parentGeomList);c.getIndex()<this.geomList.length?this.geomList[c.getIndex()]=c:(this.geomList.push(c),this.sortNeeded=!0)};h.prototype.sort=function(){this.sortNeeded&&(function(c,a){a.compare?-c.sort(function(b,d){return a.compare(b,d)}):c.sort(a)}(this.geomList,new h.mxVsdxGeometryList$0(this)),this.sortNeeded=!1)};h.prototype.isNoShow=function(){for(var c=0;c<this.geomList.length;c++)if(!this.geomList[c].isNoShow())return!1;return!0};h.prototype.isNoFill=function(){for(var c=0;c<this.geomList.length;c++){var a=this.geomList[c];if(!a.isNoShow()&&!a.isNoFill())return!1}return!0};h.prototype.isNoLine=function(){for(var c=0;c<this.geomList.length;c++){var a=this.geomList[c];if(!a.isNoShow()&&-!a.isNoLine())return!1}return!0};h.prototype.hasGeom=function(){return 0!=this.geomList.length};h.prototype.getGeoCount=function(){for(var c=0,a=0;a<this.geomList.length;a++)this.geomList[a].isNoShow()||c++;return c};h.prototype.rotatedPoint=function(c,a,b){var d=c.y*a+c.x*b;c.x=c.x*a-c.y*b;c.y=d};h.prototype.getRoutingPoints=function(c,a,b){this.sort();c=[];c.push(a.clone());for(var d=0,f=0,k=0;k<this.geomList.length;k++){var n=this.geomList[k];if(!n.isNoShow()){n=n.getRows();for(var q=0;q<n.length;q++){var t=-n[q];if(0==q&&null!=t&&t instanceof g.mxgraph.io.vsdx.geometry.MoveTo)d=null!=t.x?t.x:0,f=null!=t.y?t.y:0;else if(null!=t&&t instanceof g.mxgraph.io.vsdx.geometry.LineTo){var A=null!=t.x?t.x:0;t=null!=t.y?t.y:0;var C=new mxPoint(A,t);0!==b&&(b=(360-b)*Math.PI/180,this.rotatedPoint(C,Math.cos(b),Math.sin(b)));A=(C.x-d)*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();A+=a.x;t=(C.y-f)*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()*-1;t+=a.y;A=Math.round(100*A)/100;t=Math.round(100*t)/100;-C.x=A;C.y=t;c.push(C)}}}}return c};h.prototype.getShapeXML=function(c){var a=new mxPoint(0,0),b={str:'<shape strokewidth="inherit"><foreground>',toString:function(){return this.str}},d=b.str.length;var f=this.processGeo(c,a,b,-1,!0);f=this.processGeo(c,a,b,f,!1);if(b.str.length===d)return"";this.closePath(b,f);b.str=b.str.concat("</foreground></shape>");return b.str};h.prototype.processGeo=function(c,a,b,d,f){var k=c.getRounding(),n="";0<k&&(n=' rounded="1" arcSize="'+k*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor+-'" ');for(k=0;k<this.geomList.length;k++){var q=this.geomList[k];if(f!==q.isNoFill()){var t=q.getPathXML(a,c);0!==t.length&&(q=this.getGeoStyle(q),-1===d?b.str=b.str.concat("<path"+n+">"):d!==q&&(this.closePath(b,d),b.str=b.str.concat("<path"+n+">")),b.str=b.str.concat(t),d=q)}}return d};h.prototype.getGeoStyle=function(c){var a=0;c.isNoLine()||c.isNoFill()?c.isNoFill()?c.isNoLine()||(a=3):a=2:a=1;return a};h.prototype.closePath=function(c,a){c.str=c.str.concat("</path>");1===a?c.str=c.str.concat("<fillstroke/>"):-2===a?c.str=c.str.concat("<fill/>"):3===a&&(c.str=c.str.concat("<stroke/>"))};return h}();B.mxVsdxGeometryList=m;m.__class="com.mxgraph.io.vsdx.mxVsdxGeometryList";(function(h){var c=function(){function a(b){this.__parent=b}a.prototype.compare=function(b,d){return b.getIndex()-d.getIndex()};return a}();h.mxVsdxGeometryList$0=c;c.__interfaces=["java.util.Comparator"]})(m=B.mxVsdxGeometryList||(B.mxVsdxGeometryList={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com=+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b,a){this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1;this.rows=null;if((null!=b&&1==b.nodeType||null===b)&&(null!=a&&a instanceof Array||null===a))Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(b),null!=a&&this.index<a.length&&this.inheritGeo(a[this.index]),+this.processGeoElem(b);else if((null!=b&&1==b.nodeType||null===b)&&void 0===a)Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(b),this.processGeoElem(b);else throw Error("invalid overload");}h.prototype.getIndex$org_w3c_dom_Element=function(b){try{return parseInt(b.getAttribute("IX"))||0}catch(a){return 0}};h.prototype.getIndex=function(b){if(null!=b&&1==b.nodeType||+null===b)return this.getIndex$org_w3c_dom_Element(b);if(void 0===b)return this.getIndex$();throw Error("invalid overload");};h.prototype.processGeoElem=function(b){var a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Cell");b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Row");if(null==this.rows){this.rows=[];for(var c=0;c<b.length;c++)this.rows.push(null)}for(c=0;c<a.length;c++){var d=a[c],f=d.getAttribute("N");d=d.getAttribute("V");switch(f){case "NoFill":this.noFill=+function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoLine":this.noLine=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoShow":this.noShow=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoSnap":this.noSnap=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoQuickDrag":this.noQuickDrag=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d)}}a=this.rows.length;c=!1;for(f=0;f<b.length;f++)d=g.mxgraph.io.vsdx.geometry.RowFactory.getRowObj(b[f],+this.rows),d.getIndex()>a?(this.rows.push(d),c=!0):this.rows[d.getIndex()-1]=d;c&&function(k,n){n.compare?k.sort(function(q,t){return n.compare(q,t)}):k.sort(n)}(this.rows,new h.mxVsdxGeometry$0(this))};h.prototype.inheritGeo=function(b){this.noFill=b.noFill;this.noLine=b.noLine;this.noShow=b.noShow;this.noSnap=b.noSnap;this.noQuickDrag=b.noQuickDrag;var a=this.rows=[];a.push.apply(a,b.rows)};h.prototype.getIndex$=function(){return this.index};h.prototype.isNoFill=function(){return this.noFill};h.prototype.isNoLine=+function(){return this.noLine};h.prototype.isNoShow=function(){return this.noShow};h.prototype.isNoSnap=function(){return this.noSnap};h.prototype.isNoQuickDrag=function(){return this.noQuickDrag};h.prototype.getRows=function(){return this.rows};h.prototype.getPathXML=function(b,a){if(this.noShow)return"";for(var c="",d=0;d<this.rows.length;d++){var f=this.rows[d];c=c.concat(null!=f?f.handle(b,a):"")}return c};return h}();B.mxVsdxGeometry=m;m.__class="com.mxgraph.io.vsdx.mxVsdxGeometry";(function(h){var b=+function(){function a(c){this.__parent=c}a.prototype.compare=function(c,d){c=null!=c?c.getIndex():0;d=null!=d?d.getIndex():0;return c-d};return a}();h.mxVsdxGeometry$0=b;b.__interfaces=["java.util.Comparator"]})(m=B.mxVsdxGeometry||(B.mxVsdxGeometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b){this.geomList=[];this.parentGeomList=null;this.sortNeeded=!1;if(null!=b){this.parentGeomList=b.geomList;var a=this.geomList;a.push.apply(a,b.geomList)}}h.prototype.addGeometry=function(b){b=new g.mxgraph.io.vsdx.mxVsdxGeometry(b,this.parentGeomList);b.getIndex()<this.geomList.length?this.geomList[b.getIndex()]=b:(this.geomList.push(b),this.sortNeeded=!0)};h.prototype.sort=function(){this.sortNeeded&&(function(b,a){a.compare?+b.sort(function(c,d){return a.compare(c,d)}):b.sort(a)}(this.geomList,new h.mxVsdxGeometryList$0(this)),this.sortNeeded=!1)};h.prototype.isNoShow=function(){for(var b=0;b<this.geomList.length;b++)if(!this.geomList[b].isNoShow())return!1;return!0};h.prototype.isNoFill=function(){for(var b=0;b<this.geomList.length;b++){var a=this.geomList[b];if(!a.isNoShow()&&!a.isNoFill())return!1}return!0};h.prototype.isNoLine=function(){for(var b=0;b<this.geomList.length;b++){var a=this.geomList[b];if(!a.isNoShow()&&+!a.isNoLine())return!1}return!0};h.prototype.hasGeom=function(){return 0!=this.geomList.length};h.prototype.getGeoCount=function(){for(var b=0,a=0;a<this.geomList.length;a++)this.geomList[a].isNoShow()||b++;return b};h.prototype.rotatedPoint=function(b,a,c){var d=b.y*a+b.x*c;b.x=b.x*a-b.y*c;b.y=d};h.prototype.getRoutingPoints=function(b,a,c){this.sort();b=[];b.push(a.clone());for(var d=0,f=0,k=0;k<this.geomList.length;k++){var n=this.geomList[k];if(!n.isNoShow()){n=n.getRows();for(var q=0;q<n.length;q++){var t=+n[q];if(0==q&&null!=t&&t instanceof g.mxgraph.io.vsdx.geometry.MoveTo)d=null!=t.x?t.x:0,f=null!=t.y?t.y:0;else if(null!=t&&t instanceof g.mxgraph.io.vsdx.geometry.LineTo){var A=null!=t.x?t.x:0;t=null!=t.y?t.y:0;var C=new mxPoint(A,t);0!==c&&(c=(360-c)*Math.PI/180,this.rotatedPoint(C,Math.cos(c),Math.sin(c)));A=(C.x-d)*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();A+=a.x;t=(C.y-f)*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()*-1;t+=a.y;A=Math.round(100*A)/100;t=Math.round(100*t)/100;+C.x=A;C.y=t;b.push(C)}}}}return b};h.prototype.getShapeXML=function(b){var a=new mxPoint(0,0),c={str:'<shape strokewidth="inherit"><foreground>',toString:function(){return this.str}},d=c.str.length;var f=this.processGeo(b,a,c,-1,!0);f=this.processGeo(b,a,c,f,!1);if(c.str.length===d)return"";this.closePath(c,f);c.str=c.str.concat("</foreground></shape>");return c.str};h.prototype.processGeo=function(b,a,c,d,f){var k=b.getRounding(),n="";0<k&&(n=' rounded="1" arcSize="'+k*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor++'" ');for(k=0;k<this.geomList.length;k++){var q=this.geomList[k];if(f!==q.isNoFill()){var t=q.getPathXML(a,b);0!==t.length&&(q=this.getGeoStyle(q),-1===d?c.str=c.str.concat("<path"+n+">"):d!==q&&(this.closePath(c,d),c.str=c.str.concat("<path"+n+">")),c.str=c.str.concat(t),d=q)}}return d};h.prototype.getGeoStyle=function(b){var a=0;b.isNoLine()||b.isNoFill()?b.isNoFill()?b.isNoLine()||(a=3):a=2:a=1;return a};h.prototype.closePath=function(b,a){b.str=b.str.concat("</path>");1===a?b.str=b.str.concat("<fillstroke/>"):+2===a?b.str=b.str.concat("<fill/>"):3===a&&(b.str=b.str.concat("<stroke/>"))};return h}();B.mxVsdxGeometryList=m;m.__class="com.mxgraph.io.vsdx.mxVsdxGeometryList";(function(h){var b=function(){function a(c){this.__parent=c}a.prototype.compare=function(c,d){return c.getIndex()-d.getIndex()};return a}();h.mxVsdxGeometryList$0=b;b.__interfaces=["java.util.Comparator"]})(m=B.mxVsdxGeometryList||(B.mxVsdxGeometryList={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a){this.masterShape=this.Id=null;this.childShapes={};this.master=c;this.Id=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID)||"";this.processMasterShapes(a)}h.prototype.processMasterShapes=function(c){for(var a=this.master.firstChild;null!=a;){if(null!=a&&1==a.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(a.nodeName,"Rel")){var b=c.getRelationship(a.getAttribute("r:id"),g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/_rels/masters.xml.rels"),-d=b.getAttribute("Target");b=b.getAttribute("Type");var f=null;null!=b&&function(k,n){var q=k.length-n.length;k=k.indexOf(n,q);return-1!==k&&k===q}(b,"master")&&(f=c.getXmlDoc(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/"+d));if(null!=f)for(d=f.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(d.nodeName,"MasterContents")){this.processMasterShape(d,c);break}d=d.nextSibling}}else if(1==a.nodeType&&"PageSheet"==a.nodeName)for(this.pageSheet={},-d=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Cell"),b=0;b<d.length;b++)this.pageSheet[d[b].getAttribute("N")]=d[b];a=a.nextSibling}};h.prototype.processMasterShape=function(c,a,b){b||(this.firstLevelShapes=[]);for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(q,t){return q&&q.equals?q.equals(t):q===t}(c.nodeName,"Shapes"))for(var d=c.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(q,t){return q&&q.equals?q.equals(t):q===t}(d.nodeName,"Shape")){var f=d,k=f.getAttribute("ID"),-n=new g.mxgraph.io.vsdx.Shape(f,a);this.masterShape=null==this.masterShape?n:this.masterShape;this.childShapes[k]=n;b||this.firstLevelShapes.push(n);this.processMasterShape(f,a,!0)}d=d.nextSibling}else if(null!=c&&1==c.nodeType&&"Connects"==c.nodeName)for(this.connects={},d=c.firstChild;null!=d;)null!=d&&1==d.nodeType&&"Connect"==d.nodeName&&(f=new g.mxgraph.io.vsdx.mxVsdxConnect(d),this.connects[f.getFromSheet()]=f),d=d.nextSibling;c=c.nextSibling}};h.prototype.getMasterShape=function(){return this.masterShape};-h.prototype.getSubShape=function(c){var a=this.childShapes;return a[c]?a[c]:null};h.prototype.getNameU=function(){return this.master.getAttribute("NameU")||""};h.prototype.getName=function(){return this.master.getAttribute("Name")||""};h.prototype.getUniqueID=function(){var c="";this.master.hasAttribute("UniqueID")&&(c=this.master.getAttribute("UniqueID"));return c};h.prototype.getId=function(){return this.Id};h.prototype.getMasterElement=function(){return this.master};return h}();B.mxVsdxMaster=+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b,a){this.masterShape=this.Id=null;this.childShapes={};this.master=b;this.Id=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID)||"";this.processMasterShapes(a)}h.prototype.processMasterShapes=function(b){for(var a=this.master.firstChild;null!=a;){if(null!=a&&1==a.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(a.nodeName,"Rel")){var c=b.getRelationship(a.getAttribute("r:id"),g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/_rels/masters.xml.rels"),+d=c.getAttribute("Target");c=c.getAttribute("Type");var f=null;null!=c&&function(k,n){var q=k.length-n.length;k=k.indexOf(n,q);return-1!==k&&k===q}(c,"master")&&(f=b.getXmlDoc(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/"+d));if(null!=f)for(d=f.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(d.nodeName,"MasterContents")){this.processMasterShape(d,b);break}d=d.nextSibling}}else if(1==a.nodeType&&"PageSheet"==a.nodeName)for(this.pageSheet={},+d=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Cell"),c=0;c<d.length;c++)this.pageSheet[d[c].getAttribute("N")]=d[c];a=a.nextSibling}};h.prototype.processMasterShape=function(b,a,c){c||(this.firstLevelShapes=[]);for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(q,t){return q&&q.equals?q.equals(t):q===t}(b.nodeName,"Shapes"))for(var d=b.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(q,t){return q&&q.equals?q.equals(t):q===t}(d.nodeName,"Shape")){var f=d,k=f.getAttribute("ID"),+n=new g.mxgraph.io.vsdx.Shape(f,a);this.masterShape=null==this.masterShape?n:this.masterShape;this.childShapes[k]=n;c||this.firstLevelShapes.push(n);this.processMasterShape(f,a,!0)}d=d.nextSibling}else if(null!=b&&1==b.nodeType&&"Connects"==b.nodeName)for(this.connects={},d=b.firstChild;null!=d;)null!=d&&1==d.nodeType&&"Connect"==d.nodeName&&(f=new g.mxgraph.io.vsdx.mxVsdxConnect(d),this.connects[f.getFromSheet()]=f),d=d.nextSibling;b=b.nextSibling}};h.prototype.getMasterShape=function(){return this.masterShape};+h.prototype.getSubShape=function(b){var a=this.childShapes;return a[b]?a[b]:null};h.prototype.getNameU=function(){return this.master.getAttribute("NameU")||""};h.prototype.getName=function(){return this.master.getAttribute("Name")||""};h.prototype.getUniqueID=function(){var b="";this.master.hasAttribute("UniqueID")&&(b=this.master.getAttribute("UniqueID"));return b};h.prototype.getId=function(){return this.Id};h.prototype.getMasterElement=function(){return this.master};return h}();B.mxVsdxMaster=m;m.__class="com.mxgraph.io.vsdx.mxVsdxMaster"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a,b){this.pages=this.media=this.xmlDocs=null;this.masters={};this.stylesheets={};this.themes={};this.pm=this.rootElement=null;this.xmlDocs=a;this.media=b;for(c=c.firstChild;null!=c;){if(a=null!=c&&1==c.nodeType)a=c.tagName.toLowerCase(),b=g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"document",a=a&&a.equals?a.equals(b):a===b;if(a){this.rootElement=c;break}c=c.nextSibling}this.pm=new g.mxgraph.io.vsdx.mxPropertiesManager;-this.pm.initialise(this.rootElement,this);this.initStylesheets();this.initThemes();this.initMasters();this.initPages()}h.prototype.initThemes=function(){if(null!=this.xmlDocs)for(var c=!0,a=1;c;){var b=function(f,k){return f[k]?f[k]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/theme/theme"+a+".xml");if(null!=b){for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(b.tagName,"a:theme")){b=new g.mxgraph.io.vsdx.mxVsdxTheme(b);0>-b.getThemeIndex()&&b.processTheme();var d=function(f,k){null==f.entries&&(f.entries=[]);for(var n=0;n<f.entries.length;n++)if(null!=f.entries[n].key.equals&&f.entries[n].key.equals(k)||f.entries[n].key===k)return f.entries[n].value;return null}(this.themes,b.getThemeIndex());null!=d&&d.isPure()||function(f,k,n){null==f.entries&&(f.entries=[]);for(var q=0;q<f.entries.length;q++)if(null!=f.entries[q].key.equals&&f.entries[q].key.equals(k)||f.entries[q].key===k){f.entries[q].value=n;return}f.entries.push({key:k,-value:n,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.themes,b.getThemeIndex(),b);break}b=b.nextSibling}a++}else c=!1}};h.prototype.initStylesheets=function(){var c=this.rootElement.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEETS);if(0<c.length){c=c.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEET);for(var a=c.length,b=0;b<a;b++){var d=c.item(b),f=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID);d=new g.mxgraph.io.vsdx.Style(d,-this);this.stylesheets[f]=d}}for(c=function(k){var n=0;return{next:function(){return n<k.length?k[n++]:null},hasNext:function(){return n<k.length}}}(function(k){return Object.keys(k).map(function(n){return k[n]})}(this.stylesheets));c.hasNext();)d=c.next(),d.stylesheetRefs(this)};h.prototype.initMasters=function(){if(null!=this.xmlDocs){var c=function(b,d){return b[d]?b[d]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/masters.xml");if(null!=c)for(c=c.firstChild;null!=c;){if(null!=-c&&1==c.nodeType&&function(b,d){return b&&b.equals?b.equals(d):b===d}(c.tagName,g.mxgraph.io.vsdx.mxVsdxConstants.MASTERS)){for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(b,d){return b&&b.equals?b.equals(d):b===d}(c.tagName,"Master")){var a=new g.mxgraph.io.vsdx.mxVsdxMaster(c,this);this.masters[a.getId()]=a}c=c.nextSibling}break}c=c.nextSibling}}};h.prototype.initPages=function(){if(null!=this.xmlDocs){var c=function(k,n){return k[n]?k[n]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+-"/pages/pages.xml");if(null!=c)for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(c.tagName,g.mxgraph.io.vsdx.mxVsdxConstants.PAGES)){var a=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.PAGE);if(null!=a&&0<a.length){this.pages={};c={};for(var b=a.length,d=0;d<b;d++){var f=a.item(d);f=this.createPage(f);f.isBackground()&&function(k,n,q){null==k.entries&&(k.entries=[]);for(var t=0;t<k.entries.length;t++)if(null!=k.entries[t].key.equals&&-k.entries[t].key.equals(n)||k.entries[t].key===n){k.entries[t].value=q;return}k.entries.push({key:n,value:q,getKey:function(){return this.key},getValue:function(){return this.value}})}(c,f.getId(),f);(function(k,n,q){null==k.entries&&(k.entries=[]);for(var t=0;t<k.entries.length;t++)if(null!=k.entries[t].key.equals&&k.entries[t].key.equals(n)||k.entries[t].key===n){k.entries[t].value=q;return}k.entries.push({key:n,value:q,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.pages,-f.getId(),f)}a=function(k){null==k.entries&&(k.entries=[]);return k.entries}(this.pages);for(b=0;b<a.length;b++)f=a[b].getValue(),d=f.getBackPageId(),null!=d&&(d=function(k,n){null==k.entries&&(k.entries=[]);for(var q=0;q<k.entries.length;q++)if(null!=k.entries[q].key.equals&&k.entries[q].key.equals(n)||k.entries[q].key===n)return k.entries[q].value;return null}(c,d),f.setBackPage(d))}break}c=c.nextSibling}}};h.prototype.getPages=function(){return this.pages};h.prototype.getThemes=function(){return this.themes};-h.prototype.getDefaultTheme=function(){null==this.defaultTheme&&null!=this.themes.entries&&0<this.themes.entries.length&&(this.defaultTheme=this.themes.entries[0].getValue());return this.defaultTheme};h.prototype.getRelationship=function(c,a){a=function(f,k){return f[k]?f[k]:null}(this.xmlDocs,a);if(null==a||null==c||0===c.length)return null;a=a.getElementsByTagName("Relationship");for(var b=0;b<a.length;b++){var d=a.item(b);if(function(f,k){return f&&f.equals?f.equals(k):f===k}(d.getAttribute("Id"),-c))return d}return null};h.prototype.getMaster=function(c){var a=this.masters;return a[c]?a[c]:null};h.prototype.createPage=function(c){return new g.mxgraph.io.vsdx.mxVsdxPage(c,this)};h.prototype.getPropertiesManager=function(){return this.pm};h.prototype.setPropertiesManager=function(c){this.pm=c};h.prototype.getMasterShapes=function(){return this.masters};h.prototype.setMasterShapes=function(c){this.masters=c};h.prototype.getStylesheet=function(c){var a=this.stylesheets;return a[c]?a[c]:null};-h.prototype.getXmlDoc=function(c){var a=this.xmlDocs;return a[c]?a[c]:null};h.prototype.getMedia=function(c){var a=this.media;return a[c]?a[c]:null};return h}();B.mxVsdxModel=m;m.__class="com.mxgraph.io.vsdx.mxVsdxModel"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a){this.pageName=this.Id=null;this.__isBackground=!1;this.model=this.pageSheet=this.pageElement=this.backPage=this.backPageId=null;this.shapes={};this.connects={};this.connectsMap={};this.cellElements={};this.model=a;this.pageElement=c;this.layers=[];var b=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.BACKGROUND),d;if(d=null!=b)d=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE,d=b&&b.equals?b.equals(d):b===d;this.__isBackground=-d?!0:!1;b=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.BACK_PAGE);null!=b&&0<b.length&&(this.backPageId=parseFloat(b));this.Id=parseFloat(c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID));this.pageName=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME)||"";this.pageNameU=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||this.pageName;b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"PageSheet");if(0<b.length){b=b[0];d=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,-"Cell");for(var f=0;f<d.length;f++){var k=d[f],n=k.getAttribute("N");this.cellElements[n]=k}b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Section");for(d=0;d<b.length;d++)if(f=b[d],n=f.getAttribute("N"),"Layer"==n)for(n=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Row"),f=0;f<n.length;f++){k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(n[f],"Cell");for(var q={},t=0;t<k.length;t++)q[k[t].getAttribute("N")]=k[t].getAttribute("V");null==q.Name&&(q.Name="Layer "+-f);this.layers[parseInt(n[f].getAttribute("IX"))]=q}}this.parseNodes(c,a,"pages")}h.prototype.parseNodes=function(c,a,b){for(var d=c.firstChild;null!=d;){if(null!=d&&1==d.nodeType){var f=d,k=f.nodeName;if(function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"Connects"))for(f=f.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONNECT),f=null!=f&&0<f.length?f.item(0):null;null!=f;){if(null!=f&&1==f.nodeType){k=f;var n=new g.mxgraph.io.vsdx.mxVsdxConnect(k),q=n.getFromSheet();this.connectsMap[q]=+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b,a,c){this.pages=this.media=this.xmlDocs=null;this.masters={};this.stylesheets={};this.themes={};this.pm=this.rootElement=null;this.xmlDocs=a;this.media=c;for(b=b.firstChild;null!=b;){if(a=null!=b&&1==b.nodeType)a=b.tagName.toLowerCase(),c=g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"document",a=a&&a.equals?a.equals(c):a===c;if(a){this.rootElement=b;break}b=b.nextSibling}this.pm=new g.mxgraph.io.vsdx.mxPropertiesManager;+this.pm.initialise(this.rootElement,this);this.initStylesheets();this.initThemes();this.initMasters();this.initPages()}h.prototype.initThemes=function(){if(null!=this.xmlDocs)for(var b=!0,a=1;b;){var c=function(f,k){return f[k]?f[k]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/theme/theme"+a+".xml");if(null!=c){for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(c.tagName,"a:theme")){c=new g.mxgraph.io.vsdx.mxVsdxTheme(c);0>+c.getThemeIndex()&&c.processTheme();var d=function(f,k){null==f.entries&&(f.entries=[]);for(var n=0;n<f.entries.length;n++)if(null!=f.entries[n].key.equals&&f.entries[n].key.equals(k)||f.entries[n].key===k)return f.entries[n].value;return null}(this.themes,c.getThemeIndex());null!=d&&d.isPure()||function(f,k,n){null==f.entries&&(f.entries=[]);for(var q=0;q<f.entries.length;q++)if(null!=f.entries[q].key.equals&&f.entries[q].key.equals(k)||f.entries[q].key===k){f.entries[q].value=n;return}f.entries.push({key:k,+value:n,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.themes,c.getThemeIndex(),c);break}c=c.nextSibling}a++}else b=!1}};h.prototype.initStylesheets=function(){var b=this.rootElement.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEETS);if(0<b.length){b=b.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEET);for(var a=b.length,c=0;c<a;c++){var d=b.item(c),f=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID);d=new g.mxgraph.io.vsdx.Style(d,+this);this.stylesheets[f]=d}}for(b=function(k){var n=0;return{next:function(){return n<k.length?k[n++]:null},hasNext:function(){return n<k.length}}}(function(k){return Object.keys(k).map(function(n){return k[n]})}(this.stylesheets));b.hasNext();)d=b.next(),d.stylesheetRefs(this)};h.prototype.initMasters=function(){if(null!=this.xmlDocs){var b=function(c,d){return c[d]?c[d]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/masters.xml");if(null!=b)for(b=b.firstChild;null!=b;){if(null!=+b&&1==b.nodeType&&function(c,d){return c&&c.equals?c.equals(d):c===d}(b.tagName,g.mxgraph.io.vsdx.mxVsdxConstants.MASTERS)){for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(c,d){return c&&c.equals?c.equals(d):c===d}(b.tagName,"Master")){var a=new g.mxgraph.io.vsdx.mxVsdxMaster(b,this);this.masters[a.getId()]=a}b=b.nextSibling}break}b=b.nextSibling}}};h.prototype.initPages=function(){if(null!=this.xmlDocs){var b=function(k,n){return k[n]?k[n]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder++"/pages/pages.xml");if(null!=b)for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(b.tagName,g.mxgraph.io.vsdx.mxVsdxConstants.PAGES)){var a=b.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.PAGE);if(null!=a&&0<a.length){this.pages={};b={};for(var c=a.length,d=0;d<c;d++){var f=a.item(d);f=this.createPage(f);f.isBackground()&&function(k,n,q){null==k.entries&&(k.entries=[]);for(var t=0;t<k.entries.length;t++)if(null!=k.entries[t].key.equals&&+k.entries[t].key.equals(n)||k.entries[t].key===n){k.entries[t].value=q;return}k.entries.push({key:n,value:q,getKey:function(){return this.key},getValue:function(){return this.value}})}(b,f.getId(),f);(function(k,n,q){null==k.entries&&(k.entries=[]);for(var t=0;t<k.entries.length;t++)if(null!=k.entries[t].key.equals&&k.entries[t].key.equals(n)||k.entries[t].key===n){k.entries[t].value=q;return}k.entries.push({key:n,value:q,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.pages,+f.getId(),f)}a=function(k){null==k.entries&&(k.entries=[]);return k.entries}(this.pages);for(c=0;c<a.length;c++)f=a[c].getValue(),d=f.getBackPageId(),null!=d&&(d=function(k,n){null==k.entries&&(k.entries=[]);for(var q=0;q<k.entries.length;q++)if(null!=k.entries[q].key.equals&&k.entries[q].key.equals(n)||k.entries[q].key===n)return k.entries[q].value;return null}(b,d),f.setBackPage(d))}break}b=b.nextSibling}}};h.prototype.getPages=function(){return this.pages};h.prototype.getThemes=function(){return this.themes};+h.prototype.getDefaultTheme=function(){null==this.defaultTheme&&null!=this.themes.entries&&0<this.themes.entries.length&&(this.defaultTheme=this.themes.entries[0].getValue());return this.defaultTheme};h.prototype.getRelationship=function(b,a){a=function(f,k){return f[k]?f[k]:null}(this.xmlDocs,a);if(null==a||null==b||0===b.length)return null;a=a.getElementsByTagName("Relationship");for(var c=0;c<a.length;c++){var d=a.item(c);if(function(f,k){return f&&f.equals?f.equals(k):f===k}(d.getAttribute("Id"),+b))return d}return null};h.prototype.getMaster=function(b){var a=this.masters;return a[b]?a[b]:null};h.prototype.createPage=function(b){return new g.mxgraph.io.vsdx.mxVsdxPage(b,this)};h.prototype.getPropertiesManager=function(){return this.pm};h.prototype.setPropertiesManager=function(b){this.pm=b};h.prototype.getMasterShapes=function(){return this.masters};h.prototype.setMasterShapes=function(b){this.masters=b};h.prototype.getStylesheet=function(b){var a=this.stylesheets;return a[b]?a[b]:null};+h.prototype.getXmlDoc=function(b){var a=this.xmlDocs;return a[b]?a[b]:null};h.prototype.getMedia=function(b){var a=this.media;return a[b]?a[b]:null};return h}();B.mxVsdxModel=m;m.__class="com.mxgraph.io.vsdx.mxVsdxModel"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b,a){this.pageName=this.Id=null;this.__isBackground=!1;this.model=this.pageSheet=this.pageElement=this.backPage=this.backPageId=null;this.shapes={};this.connects={};this.connectsMap={};this.cellElements={};this.model=a;this.pageElement=b;this.layers=[];var c=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.BACKGROUND),d;if(d=null!=c)d=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE,d=c&&c.equals?c.equals(d):c===d;this.__isBackground=+d?!0:!1;c=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.BACK_PAGE);null!=c&&0<c.length&&(this.backPageId=parseFloat(c));this.Id=parseFloat(b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID));this.pageName=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME)||"";this.pageNameU=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||this.pageName;c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"PageSheet");if(0<c.length){c=c[0];d=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,+"Cell");for(var f=0;f<d.length;f++){var k=d[f],n=k.getAttribute("N");this.cellElements[n]=k}c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"Section");for(d=0;d<c.length;d++)if(f=c[d],n=f.getAttribute("N"),"Layer"==n)for(n=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Row"),f=0;f<n.length;f++){k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(n[f],"Cell");for(var q={},t=0;t<k.length;t++)q[k[t].getAttribute("N")]=k[t].getAttribute("V");null==q.Name&&(q.Name="Layer "++f);this.layers[parseInt(n[f].getAttribute("IX"))]=q}}this.parseNodes(b,a,"pages")}h.prototype.parseNodes=function(b,a,c){for(var d=b.firstChild;null!=d;){if(null!=d&&1==d.nodeType){var f=d,k=f.nodeName;if(function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"Connects"))for(f=f.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONNECT),f=null!=f&&0<f.length?f.item(0):null;null!=f;){if(null!=f&&1==f.nodeType){k=f;var n=new g.mxgraph.io.vsdx.mxVsdxConnect(k),q=n.getFromSheet();this.connectsMap[q]=(this.connectsMap[q]||0)+1;q=null!=q&&-1<q?function(t,A){null==t.entries&&(t.entries=[]);for(var C=0;C<t.entries.length;C++)if(null!=t.entries[C].key.equals&&t.entries[C].key.equals(A)||t.entries[C].key===A)return t.entries[C].value;return null}(this.connects,q):null;null!=q?q.addConnect(k):function(t,A,C){null==t.entries&&(t.entries=[]);for(var I=0;I<t.entries.length;I++)if(null!=t.entries[I].key.equals&&t.entries[I].key.equals(A)||t.entries[I].key===A){t.entries[I].value=C;return}t.entries.push({key:A,-value:C,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.connects,n.getFromSheet(),n)}f=f.nextSibling}}d=d.nextSibling}for(d=c.firstChild;null!=d;)null!=d&&1==d.nodeType&&(f=d,k=f.nodeName,function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"Rel")?this.resolveRel(f,a,b):function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"Shapes")?this.shapes=this.parseShapes(f,null,!1):function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"PageSheet")&&(this.pageSheet=f)),d=d.nextSibling};-h.prototype.resolveRel=function(c,a,b){b=a.getRelationship(c.getAttribute("r:id"),g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/_rels/"+b+".xml.rels");c=b.getAttribute("Target");b=b.getAttribute("Type");if(function(f,k){var n=f.length-k.length;f=f.indexOf(k,n);return-1!==f&&f===n}((new String(b)).toString(),"page")){var d=null;null!=b&&function(f,k){var n=f.length-k.length;f=f.indexOf(k,n);return-1!==f&&f===n}(b,"page")&&(d=a.getXmlDoc(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/"+c));if(null!=-d)for(b=d.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(b.tagName,"PageContents")){d=c.indexOf(".");-1!==d&&this.parseNodes(b,a,c.substring(0,d));break}b=b.nextSibling}}};h.prototype.parseShapes=function(c,a,b){b={};c=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.SHAPE);for(c=null!=c&&0<c.length?c.item(0):null;null!=c;){if(null!=c&&1==c.nodeType){var d=c,f=a;if(null==f){var k=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER);+value:C,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.connects,n.getFromSheet(),n)}f=f.nextSibling}}d=d.nextSibling}for(d=b.firstChild;null!=d;)null!=d&&1==d.nodeType&&(f=d,k=f.nodeName,function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"Rel")?this.resolveRel(f,a,c):function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"Shapes")?this.shapes=this.parseShapes(f,null,!1):function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"PageSheet")&&(this.pageSheet=f)),d=d.nextSibling};+h.prototype.resolveRel=function(b,a,c){c=a.getRelationship(b.getAttribute("r:id"),g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/_rels/"+c+".xml.rels");b=c.getAttribute("Target");c=c.getAttribute("Type");if(function(f,k){var n=f.length-k.length;f=f.indexOf(k,n);return-1!==f&&f===n}((new String(c)).toString(),"page")){var d=null;null!=c&&function(f,k){var n=f.length-k.length;f=f.indexOf(k,n);return-1!==f&&f===n}(c,"page")&&(d=a.getXmlDoc(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/"+b));if(null!=+d)for(c=d.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(c.tagName,"PageContents")){d=b.indexOf(".");-1!==d&&this.parseNodes(c,a,b.substring(0,d));break}c=c.nextSibling}}};h.prototype.parseShapes=function(b,a,c){c={};b=b.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.SHAPE);for(b=null!=b&&0<b.length?b.item(0):null;null!=b;){if(null!=b&&1==b.nodeType){var d=b,f=a;if(null==f){var k=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER);null==k||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,"")||(f=this.model.getMaster(k))}var n=this.isEdge(d);n||null==f||(k=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE),n=f.getMasterElement(),null==k||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,"")||(k=f.getSubShape(k),n=null!=k?k.getShape():n),n=this.isEdge(n));d=this.createCell(d,!n,f);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||-q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(b,d.getId(),d)}c=c.nextSibling}return b};h.prototype.createCell=function(c,a,b){return new g.mxgraph.io.vsdx.VsdxShape(this,c,a,this.model.getMasterShapes(),b,this.model)};h.prototype.isEdge=function(c){if(null!=c&&(c=c.childNodes,null!=c))for(c=c.item(0);null!=c;){if(null!=c&&1==c.nodeType){var a=c;if(function(b,d){return b&&b.equals?b.equals(d):-b===d}(a.nodeName,"Cell")&&(a=a.getAttribute("N"),function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"BeginX")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"BeginY")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"EndY")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"EndX")))return!0}c=c.nextSibling}return!1};h.prototype.getPageDimensions=function(){var c=0,a=0,b=function(f,k){return f[k]?f[k]:null}(this.cellElements,"PageHeight"),d=function(f,k){return f[k]?f[k]:null}(this.cellElements,-"PageWidth");null!=b&&(c=parseFloat(b.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),c=Math.round(100*c)/100);null!=d&&(a=parseFloat(d.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),a=Math.round(100*a)/100);return new mxPoint(a,c)};h.prototype.getDrawingScale=function(){var c=this.cellElements;c=c.DrawingScale?c.DrawingScale:null;return null!=c?parseFloat(c.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};h.prototype.getPageScale=-function(){var c=this.cellElements;c=c.PageScale?c.PageScale:null;return null!=c?parseFloat(c.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};h.prototype.getCellValue=function(c){var a=this.cellElements;c=a[c]?a[c]:null;return null!=c?c.getAttribute("V")||"":null};h.prototype.getCellIntValue=function(c,a){c=this.getCellValue(c);return null!=c?parseInt(c):a};h.prototype.getId=function(){return this.Id};h.prototype.getPageName=function(){return this.pageName};h.prototype.getPageNameU=-function(){return this.pageNameU};h.prototype.getShapes=function(){return this.shapes};h.prototype.getLayers=function(){return this.layers};h.prototype.getConnects=function(){return this.connects};h.prototype.isBackground=function(){return this.__isBackground};h.prototype.getBackPageId=function(){return this.backPageId};h.prototype.setBackPage=function(c){this.backPage=c};h.prototype.getBackPage=function(){return this.backPage};return h}();B.mxVsdxPage=m;m.__class="com.mxgraph.io.vsdx.mxVsdxPage"})(z.vsdx||+q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(c,d.getId(),d)}b=b.nextSibling}return c};h.prototype.createCell=function(b,a,c){return new g.mxgraph.io.vsdx.VsdxShape(this,b,a,this.model.getMasterShapes(),c,this.model)};h.prototype.isEdge=function(b){if(null!=b&&(b=b.childNodes,null!=b))for(b=b.item(0);null!=b;){if(null!=b&&1==b.nodeType){var a=b;if(function(c,d){return c&&c.equals?c.equals(d):+c===d}(a.nodeName,"Cell")&&(a=a.getAttribute("N"),function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"BeginX")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"BeginY")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"EndY")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"EndX")))return!0}b=b.nextSibling}return!1};h.prototype.getPageDimensions=function(){var b=0,a=0,c=function(f,k){return f[k]?f[k]:null}(this.cellElements,"PageHeight"),d=function(f,k){return f[k]?f[k]:null}(this.cellElements,+"PageWidth");null!=c&&(b=parseFloat(c.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),b=Math.round(100*b)/100);null!=d&&(a=parseFloat(d.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),a=Math.round(100*a)/100);return new mxPoint(a,b)};h.prototype.getDrawingScale=function(){var b=this.cellElements;b=b.DrawingScale?b.DrawingScale:null;return null!=b?parseFloat(b.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};h.prototype.getPageScale=+function(){var b=this.cellElements;b=b.PageScale?b.PageScale:null;return null!=b?parseFloat(b.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};h.prototype.getCellValue=function(b){var a=this.cellElements;b=a[b]?a[b]:null;return null!=b?b.getAttribute("V")||"":null};h.prototype.getCellIntValue=function(b,a){b=this.getCellValue(b);return null!=b?parseInt(b):a};h.prototype.getId=function(){return this.Id};h.prototype.getPageName=function(){return this.pageName};h.prototype.getPageNameU=+function(){return this.pageNameU};h.prototype.getShapes=function(){return this.shapes};h.prototype.getLayers=function(){return this.layers};h.prototype.getConnects=function(){return this.connects};h.prototype.isBackground=function(){return this.__isBackground};h.prototype.getBackPageId=function(){return this.backPageId};h.prototype.setBackPage=function(b){this.backPage=b};h.prototype.getBackPage=function(){return this.backPage};return h}();B.mxVsdxPage=m;m.__class="com.mxgraph.io.vsdx.mxVsdxPage"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c){this.themeIndex=-1;this.themeVariant=0;this.baseColors={};this.variantsColors=function(a){var b=function(d){if(0!=d.length){for(var f=[],k=0;k<d[0];k++)f.push(b(d.slice(1)));return f}};return b(a)}([4,7]);this.isMonotoneVariant=Array(4);this.defaultClr=new g.mxgraph.io.vsdx.theme.Color(255,255,255);this.defaultLineClr=new g.mxgraph.io.vsdx.theme.Color(0,0,0);this.defaultLineStyle=new g.mxgraph.io.vsdx.theme.LineStyle;-this.fillStyles=[];this.connFillStyles=[];this.lineStyles=[];this.connLineStyles=[];this.lineStylesExt=[];this.connLineStylesExt=[];this.connFontColors=[];this.connFontStyles=[];this.fontColors=[];this.fontStyles=[];this.variantEmbellishment=[0,0,0,0];this.variantFillIdx=function(a){var b=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(b(d.slice(1)));return f};return b(a)}([4,4]);this.variantLineIdx=function(a){var b=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(b(d.slice(1)));-return f};return b(a)}([4,4]);this.variantEffectIdx=function(a){var b=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(b(d.slice(1)));return f};return b(a)}([4,4]);this.variantFontIdx=function(a){var b=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(b(d.slice(1)));return f};return b(a)}([4,4]);this.isProcessed=!1;this.__isPure=!0;this.name=this.bkgndColor=this.theme=null;this.theme=c;this.name=c.getAttribute("name")||"";c=function(a,b){return a[b]?a[b]:-null}(h.themesIds_$LI$(),this.name);null!=c&&(this.themeIndex=c)}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0(),h.__static_initializer_1())};h.themesIds_$LI$=function(){h.__static_initialize();null==h.themesIds&&(h.themesIds={});return h.themesIds};h.__static_initializer_0=function(){h.themesIds_$LI$().Office=33;h.themesIds_$LI$().Linear=34;h.themesIds_$LI$().Zephyr=35;h.themesIds_$LI$().Integral=36;h.themesIds_$LI$().Simple=37;h.themesIds_$LI$().Whisp=+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b){this.themeIndex=-1;this.themeVariant=0;this.baseColors={};this.variantsColors=function(a){var c=function(d){if(0!=d.length){for(var f=[],k=0;k<d[0];k++)f.push(c(d.slice(1)));return f}};return c(a)}([4,7]);this.isMonotoneVariant=Array(4);this.defaultClr=new g.mxgraph.io.vsdx.theme.Color(255,255,255);this.defaultLineClr=new g.mxgraph.io.vsdx.theme.Color(0,0,0);this.defaultLineStyle=new g.mxgraph.io.vsdx.theme.LineStyle;+this.fillStyles=[];this.connFillStyles=[];this.lineStyles=[];this.connLineStyles=[];this.lineStylesExt=[];this.connLineStylesExt=[];this.connFontColors=[];this.connFontStyles=[];this.fontColors=[];this.fontStyles=[];this.variantEmbellishment=[0,0,0,0];this.variantFillIdx=function(a){var c=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(c(d.slice(1)));return f};return c(a)}([4,4]);this.variantLineIdx=function(a){var c=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(c(d.slice(1)));+return f};return c(a)}([4,4]);this.variantEffectIdx=function(a){var c=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(c(d.slice(1)));return f};return c(a)}([4,4]);this.variantFontIdx=function(a){var c=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(c(d.slice(1)));return f};return c(a)}([4,4]);this.isProcessed=!1;this.__isPure=!0;this.name=this.bkgndColor=this.theme=null;this.theme=b;this.name=b.getAttribute("name")||"";b=function(a,c){return a[c]?a[c]:+null}(h.themesIds_$LI$(),this.name);null!=b&&(this.themeIndex=b)}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0(),h.__static_initializer_1())};h.themesIds_$LI$=function(){h.__static_initialize();null==h.themesIds&&(h.themesIds={});return h.themesIds};h.__static_initializer_0=function(){h.themesIds_$LI$().Office=33;h.themesIds_$LI$().Linear=34;h.themesIds_$LI$().Zephyr=35;h.themesIds_$LI$().Integral=36;h.themesIds_$LI$().Simple=37;h.themesIds_$LI$().Whisp=38;h.themesIds_$LI$().Daybreak=39;h.themesIds_$LI$().Parallel=40;h.themesIds_$LI$().Sequence=41;h.themesIds_$LI$().Slice=42;h.themesIds_$LI$().Ion=43;h.themesIds_$LI$().Retrospect=44;h.themesIds_$LI$().Organic=45;h.themesIds_$LI$().Bubble=46;h.themesIds_$LI$().Clouds=47;h.themesIds_$LI$().Gemstone=48;h.themesIds_$LI$().Lines=49;h.themesIds_$LI$().Facet=50;h.themesIds_$LI$().Prominence=51;h.themesIds_$LI$().Smoke=52;h.themesIds_$LI$().Radiance=53;h.themesIds_$LI$().Shade=54;h.themesIds_$LI$().Pencil=-55;h.themesIds_$LI$().Pen=56;h.themesIds_$LI$().Marker=57;h.themesIds_$LI$().Whiteboard=58};h.colorIds_$LI$=function(){h.__static_initialize();null==h.colorIds&&(h.colorIds={});return h.colorIds};h.__static_initializer_1=function(){(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),-0,"dk1");(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),1,"lt1");(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===-a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),2,"accent1");(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),3,"accent2");-(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),4,"accent3");(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=-b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),5,"accent4");(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),6,"accent5");(function(c,a,b){null==-c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),7,"accent6")};h.prototype.getThemeIndex=function(){return this.themeIndex};h.prototype.setVariant=function(c){this.themeVariant=c};h.prototype.isPure=function(){return this.__isPure};h.prototype.processTheme=-function(){if(!this.isProcessed){try{for(var c=this.theme.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(c.nodeName,"a:themeElements"))for(var a=c.firstChild;null!=a;){if(null!=a&&1==a.nodeType){var b=a,d=b.nodeName;(function(f,k){return f&&f.equals?f.equals(k):f===k})(d,"a:clrScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,b.getAttribute("name"))||(this.__isPure=!1),this.processColors(b)):function(f,k){return f&&f.equals?-f.equals(k):f===k}(d,"a:fontScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,b.getAttribute("name"))||(this.__isPure=!1),this.processFonts(b)):function(f,k){return f&&f.equals?f.equals(k):f===k}(d,"a:fmtScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,b.getAttribute("name"))||(this.__isPure=!1),this.processFormats(b)):function(f,k){return f&&f.equals?f.equals(k):f===k}(d,"a:extLst")&&this.processExtras(b)}a=a.nextSibling}c=c.nextSibling}}catch(f){}this.isProcessed=-!0}};h.prototype.processExtras=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var a=0;a<c.length;a++){var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c[a]);switch(b.nodeName){case "vt:fmtConnectorScheme":var d=this.name;var f=b.getAttribute("name");d=d&&d.equals?d.equals(f):d===f;d||(this.__isPure=!1);b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(d=0;d<b.length;d++)switch(f=b[d],f.nodeName){case "a:fillStyleLst":f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);-for(var k=0;k<f.length;k++)this.connFillStyles.push(g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(f[k]));break;case "a:lnStyleLst":for(f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),k=0;k<f.length;k++)this.connLineStyles.push(new g.mxgraph.io.vsdx.theme.LineStyle(f[k]))}break;case "vt:lineStyles":b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(d=0;d<b.length;d++)switch(f=b[d],f.nodeName){case "vt:fmtConnectorSchemeLineStyles":f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);-for(k=0;k<f.length;k++)this.connLineStylesExt.push(new g.mxgraph.io.vsdx.theme.LineStyleExt(f[k]));break;case "vt:fmtSchemeLineStyles":for(f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),k=0;k<f.length;k++)this.lineStylesExt.push(new g.mxgraph.io.vsdx.theme.LineStyleExt(f[k]))}break;case "vt:fontStylesGroup":b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(d=0;d<b.length;d++)switch(f=b[d],f.nodeName){case "vt:connectorFontStyles":this.fillFontStyles(f,this.connFontColors,this.connFontStyles);-break;case "vt:fontStyles":this.fillFontStyles(f,this.fontColors,this.fontStyles)}break;case "vt:variationStyleSchemeLst":for(b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b),f=d=0;f<b.length;f++){k=b[f];this.variantEmbellishment[d]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(k,"embellishment");k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(k);for(var n=0,q=0;q<k.length;q++){var t=k[q];this.variantFillIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,-"fillIdx");this.variantLineIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,"lineIdx");this.variantEffectIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,"effectIdx");this.variantFontIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,"fontIdx");n++}d++}}}};h.prototype.fillFontStyles=function(c,a,b){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var d=0;d<c.length;d++){var f=-c[d];b.push(g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"style"));f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(f);null!=f&&a.push(g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(f)))}};h.prototype.processFormats=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var a=0;a<c.length;a++){var b=c[a];switch(b.nodeName){case "a:fillStyleLst":b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);-for(var d=0;d<b.length;d++)this.fillStyles.push(g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(b[d]));break;case "a:lnStyleLst":for(b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b),d=0;d<b.length;d++)this.lineStyles.push(new g.mxgraph.io.vsdx.theme.LineStyle(b[d]))}}};h.prototype.processFonts=function(c){};h.prototype.processColors=function(c){for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType){var a=c,b=a.nodeName;a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);var d=-(d=b)&&d.equals?d.equals("a:extLst"):"a:extLst"===d;d?3===a.length&&(0>this.themeIndex&&this.extractThemeIndex(a[0]),this.addBkgndColor(a[1]),this.addVariantColors(a[2])):(b=b.substring(2),0<a.length&&this.addBasicColor(b,a[0]))}c=c.nextSibling}};h.prototype.addVariantColors=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c);if(null!=c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var a=0,b=0;b<c.length;b++){var d=c[b];this.addVariantColorsSet(a++,d)}}};h.prototype.addVariantColorsSet=-function(c,a){var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);this.isMonotoneVariant[c]=a.hasAttribute("monotone");for(a=0;a<b.length;a++){var d=b[a];switch(d.nodeName){case "vt:varColor1":this.variantsColors[c][0]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor2":this.variantsColors[c][1]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));-break;case "vt:varColor3":this.variantsColors[c][2]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor4":this.variantsColors[c][3]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor5":this.variantsColors[c][4]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));-break;case "vt:varColor6":this.variantsColors[c][5]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor7":this.variantsColors[c][6]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d))}}};h.prototype.addBkgndColor=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c);null!=c&&(this.bkgndColor=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c)))};-h.prototype.extractThemeIndex=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c);null!=c&&(this.themeIndex=parseInt(c.getAttribute("schemeEnum")))};h.prototype.addBasicColor=function(c,a){this.baseColors[c]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(a)};h.prototype.getSchemeColor=function(c){this.processTheme();var a=this.baseColors;c=a[c]?a[c]:null;return null!=c?c.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this):this.defaultClr};h.prototype.getStyleColor=function(c){this.processTheme();-if(8>c){var a=function(d,f){return d[f]?d[f]:null}(this.baseColors,function(d,f){null==d.entries&&(d.entries=[]);for(var k=0;k<d.entries.length;k++)if(null!=d.entries[k].key.equals&&d.entries[k].key.equals(f)||d.entries[k].key===f)return d.entries[k].value;return null}(h.colorIds_$LI$(),c));if(null!=a)return a.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}else if(8===c){if(null!=this.bkgndColor)return this.bkgndColor.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}else{a=null;var b=0;200<=c?b=c-200:-100<=c&&(b=c-100);0<=b&&6>=b&&(a=this.variantsColors[this.themeVariant][b]);if(null!=a)return a.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}return this.defaultClr};h.prototype.getFillGraientColor=function(c){return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(c,!0)};h.prototype.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(c,!1)};h.prototype.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean=-function(c,a){this.processTheme();var b=c.getQuickStyleFillColor(),d=null;switch(c.getQuickStyleFillMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:d=this.fillStyles[c.getQuickStyleFillMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&(b=100),d=c.getQuickStyleFillMatrix()-100,d=this.fillStyles[this.variantFillIdx[this.themeVariant][d]-1]}a=null!=d?a?null!=d&&d instanceof g.mxgraph.io.vsdx.theme.GradFill?d.applyStyle(b,this).getGradientClr():null:-d.applyStyle(b,this):a?null:this.getStyleColor(b);b=c.getQuickStyleVariation();if(null!=a&&0<(b&8)){b=this.getStyleColor(8).toHsl();c=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);d=c.toHsl();var f=a.toHsl();.1666<=Math.abs(b.getLum()-f.getLum())||(.7292>=b.getLum()?a=new g.mxgraph.io.vsdx.theme.Color(255,255,255):Math.abs(b.getLum()-d.getLum())>Math.abs(b.getLum()-f.getLum())&&(a=c))}return a};h.prototype.getFillColor=function(c,a){if(!(null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||-null===c)||"boolean"!==typeof a&&null!==a){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a)return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);throw Error("invalid overload");}return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(c,a)};h.prototype.getLineStyle=function(c,a){this.processTheme();var b=null;switch(c){case 1:case 2:case 3:case 4:case 5:case 6:b=a[c-1];break;case 100:case 101:case 102:case 103:b=a===this.lineStyles?-this.lineStyles[this.variantLineIdx[this.themeVariant][c-100]-1]:this.defaultLineStyle}return b};h.prototype.getLineStyleExt=function(c,a){this.processTheme();var b=null;switch(c){case 0:case 1:case 2:case 3:case 4:case 5:case 6:b=a[c]}return b};h.prototype.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(c,a){this.processTheme();var b=c.getQuickStyleLineColor();a=this.getLineStyle(c.getQuickStyleLineMatrix(),a);switch(c.getQuickStyleLineMatrix()){case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&-(b=100)}b=null!=a?a.getLineColor(b,this):this.getStyleColor(b);if(0<(c.getQuickStyleVariation()&4)){a=this.getStyleColor(8).toHsl();c=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);var d=c.toHsl(),f=b.toHsl();.1666<=Math.abs(a.getLum()-f.getLum())||(.7292>=a.getLum()?b=new g.mxgraph.io.vsdx.theme.Color(255,255,255):Math.abs(a.getLum()-d.getLum())>Math.abs(a.getLum()-f.getLum())&&(b=c))}return b};h.prototype.getLineColor=function(c,a){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||-null===c)&&(null!=a&&a instanceof Array||null===a))return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,a);if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a)return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);throw Error("invalid overload");};h.prototype.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.lineStyles)};-h.prototype.getConnLineColor=function(c){return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.connLineStyles)};h.prototype.getDefaultLineClr=function(){return this.defaultLineClr};h.prototype.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList=function(c,a,b){a=this.getLineStyleExt(c.getQuickStyleLineMatrix(),a);if(null!=a)return a.isDashed();c=this.getLineStyle(c.getQuickStyleLineMatrix(),b);return null!=c?c.isDashed():-!1};h.prototype.isLineDashed=function(c,a,b){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&(null!=a&&a instanceof Array||null===a)&&(null!=b&&b instanceof Array||null===b))return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,a,b);if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a&&void 0===b)return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);throw Error("invalid overload");-};h.prototype.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,this.lineStylesExt,this.lineStyles)};h.prototype.isConnLineDashed=function(c){return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,this.connLineStylesExt,this.connLineStyles)};h.prototype.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList=-function(c,a,b){a=this.getLineStyleExt(c.getQuickStyleLineMatrix(),a);if(null!=a)return a.getLineDashPattern();c=this.getLineStyle(c.getQuickStyleLineMatrix(),b);return null!=c?c.getLineDashPattern():null};h.prototype.getLineDashPattern=function(c,a,b){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&(null!=a&&a instanceof Array||null===a)&&(null!=b&&b instanceof Array||null===b))return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,-a,b);if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a&&void 0===b)return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);throw Error("invalid overload");};h.prototype.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,this.lineStylesExt,this.lineStyles)};h.prototype.getConnLineDashPattern=function(c){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,-this.connLineStylesExt,this.connLineStyles)};h.prototype.getArrowSize=function(c,a,b,d){b=this.getLineStyleExt(c.getQuickStyleLineMatrix(),b);if(null!=b)return a?b.getStartSize():b.getEndSize();c=this.getLineStyle(c.getQuickStyleLineMatrix(),d);return null!=c?a?c.getStartSize():c.getEndSize():4};h.prototype.getStartSize=function(c){return this.getArrowSize(c,!0,this.lineStylesExt,this.lineStyles)};h.prototype.getConnStartSize=function(c){return this.getArrowSize(c,!0,this.connLineStylesExt,this.connLineStyles)};-h.prototype.getEndSize=function(c){return this.getArrowSize(c,!1,this.lineStylesExt,this.lineStyles)};h.prototype.getConnEndSize=function(c){return this.getArrowSize(c,!1,this.connLineStylesExt,this.connLineStyles)};h.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(c,a){this.processTheme();var b=c.getQuickStyleFontColor(),d=null;switch(c.getQuickStyleFontMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:d=a[c.getQuickStyleFontMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&-(b=100),d=c.getQuickStyleFontMatrix()-100,a!==this.fontColors?(a=this.baseColors,d=a.dk1?a.dk1:null):d=a[this.variantFontIdx[this.themeVariant][d]-1]}b=null!=d?d.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(b,this):this.getStyleColor(b);if(0<(c.getQuickStyleVariation()&2)){d=this.getStyleColor(8).toHsl();var f=b.toHsl();a=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);var k=a.toHsl();c=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);var n=c.toHsl();.1666<=Math.abs(d.getLum()--f.getLum())||(.7292>=d.getLum()?b=new g.mxgraph.io.vsdx.theme.Color(255,255,255):(n=Math.abs(d.getLum()-n.getLum()),k=Math.abs(d.getLum()-k.getLum()),d=Math.abs(d.getLum()-f.getLum()),d=Math.max(n,k,d),d==n?b=c:d==k&&(b=a)))}return b};h.prototype.getFontColor=function(c,a){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&(null!=a&&a instanceof Array||null===a))return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,a);if((null!=c&&c instanceof-g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a)return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);throw Error("invalid overload");};h.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.fontColors)};h.prototype.getConnFontColor=function(c){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.connFontColors)};h.prototype.getArrowType=-function(c,a,b,d){b=this.getLineStyleExt(c.getQuickStyleLineMatrix(),b);if(null!=b)return a?b.getStart():b.getEnd();c=this.getLineStyle(c.getQuickStyleLineMatrix(),d);return null!=c?a?c.getStart():c.getEnd():0};h.prototype.getEdgeMarker=function(c,a){return this.getArrowType(a,c,this.lineStylesExt,this.lineStyles)};h.prototype.getConnEdgeMarker=function(c,a){return this.getArrowType(a,c,this.connLineStylesExt,this.connLineStyles)};h.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=-function(c,a){c=this.getLineStyle(c.getQuickStyleLineMatrix(),a);return null!=c?c.getLineWidth():0};h.prototype.getLineWidth=function(c,a){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&(null!=a&&a instanceof Array||null===a))return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,a);if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a)return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);-throw Error("invalid overload");};h.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.lineStyles)};h.prototype.getConnLineWidth=function(c){return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.connLineStyles)};return h}();m.__static_initialized=!1;B.mxVsdxTheme=m;m.__class="com.mxgraph.io.vsdx.mxVsdxTheme"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io=+55;h.themesIds_$LI$().Pen=56;h.themesIds_$LI$().Marker=57;h.themesIds_$LI$().Whiteboard=58};h.colorIds_$LI$=function(){h.__static_initialize();null==h.colorIds&&(h.colorIds={});return h.colorIds};h.__static_initializer_1=function(){(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),+0,"dk1");(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),1,"lt1");(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===+a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),2,"accent1");(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),3,"accent2");+(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),4,"accent3");(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=+c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),5,"accent4");(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),6,"accent5");(function(b,a,c){null==+b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),7,"accent6")};h.prototype.getThemeIndex=function(){return this.themeIndex};h.prototype.setVariant=function(b){this.themeVariant=b};h.prototype.isPure=function(){return this.__isPure};h.prototype.processTheme=+function(){if(!this.isProcessed){try{for(var b=this.theme.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(b.nodeName,"a:themeElements"))for(var a=b.firstChild;null!=a;){if(null!=a&&1==a.nodeType){var c=a,d=c.nodeName;(function(f,k){return f&&f.equals?f.equals(k):f===k})(d,"a:clrScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,c.getAttribute("name"))||(this.__isPure=!1),this.processColors(c)):function(f,k){return f&&f.equals?+f.equals(k):f===k}(d,"a:fontScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,c.getAttribute("name"))||(this.__isPure=!1),this.processFonts(c)):function(f,k){return f&&f.equals?f.equals(k):f===k}(d,"a:fmtScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,c.getAttribute("name"))||(this.__isPure=!1),this.processFormats(c)):function(f,k){return f&&f.equals?f.equals(k):f===k}(d,"a:extLst")&&this.processExtras(c)}a=a.nextSibling}b=b.nextSibling}}catch(f){}this.isProcessed=+!0}};h.prototype.processExtras=function(b){b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var a=0;a<b.length;a++){var c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b[a]);switch(c.nodeName){case "vt:fmtConnectorScheme":var d=this.name;var f=c.getAttribute("name");d=d&&d.equals?d.equals(f):d===f;d||(this.__isPure=!1);c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(d=0;d<c.length;d++)switch(f=c[d],f.nodeName){case "a:fillStyleLst":f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);+for(var k=0;k<f.length;k++)this.connFillStyles.push(g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(f[k]));break;case "a:lnStyleLst":for(f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),k=0;k<f.length;k++)this.connLineStyles.push(new g.mxgraph.io.vsdx.theme.LineStyle(f[k]))}break;case "vt:lineStyles":c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(d=0;d<c.length;d++)switch(f=c[d],f.nodeName){case "vt:fmtConnectorSchemeLineStyles":f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);+for(k=0;k<f.length;k++)this.connLineStylesExt.push(new g.mxgraph.io.vsdx.theme.LineStyleExt(f[k]));break;case "vt:fmtSchemeLineStyles":for(f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),k=0;k<f.length;k++)this.lineStylesExt.push(new g.mxgraph.io.vsdx.theme.LineStyleExt(f[k]))}break;case "vt:fontStylesGroup":c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(d=0;d<c.length;d++)switch(f=c[d],f.nodeName){case "vt:connectorFontStyles":this.fillFontStyles(f,this.connFontColors,this.connFontStyles);+break;case "vt:fontStyles":this.fillFontStyles(f,this.fontColors,this.fontStyles)}break;case "vt:variationStyleSchemeLst":for(c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c),f=d=0;f<c.length;f++){k=c[f];this.variantEmbellishment[d]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(k,"embellishment");k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(k);for(var n=0,q=0;q<k.length;q++){var t=k[q];this.variantFillIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,+"fillIdx");this.variantLineIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,"lineIdx");this.variantEffectIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,"effectIdx");this.variantFontIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,"fontIdx");n++}d++}}}};h.prototype.fillFontStyles=function(b,a,c){b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var d=0;d<b.length;d++){var f=+b[d];c.push(g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"style"));f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(f);null!=f&&a.push(g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(f)))}};h.prototype.processFormats=function(b){b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var a=0;a<b.length;a++){var c=b[a];switch(c.nodeName){case "a:fillStyleLst":c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);+for(var d=0;d<c.length;d++)this.fillStyles.push(g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(c[d]));break;case "a:lnStyleLst":for(c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c),d=0;d<c.length;d++)this.lineStyles.push(new g.mxgraph.io.vsdx.theme.LineStyle(c[d]))}}};h.prototype.processFonts=function(b){};h.prototype.processColors=function(b){for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType){var a=b,c=a.nodeName;a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);var d=+(d=c)&&d.equals?d.equals("a:extLst"):"a:extLst"===d;d?3===a.length&&(0>this.themeIndex&&this.extractThemeIndex(a[0]),this.addBkgndColor(a[1]),this.addVariantColors(a[2])):(c=c.substring(2),0<a.length&&this.addBasicColor(c,a[0]))}b=b.nextSibling}};h.prototype.addVariantColors=function(b){b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b);if(null!=b){b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var a=0,c=0;c<b.length;c++){var d=b[c];this.addVariantColorsSet(a++,d)}}};h.prototype.addVariantColorsSet=+function(b,a){var c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);this.isMonotoneVariant[b]=a.hasAttribute("monotone");for(a=0;a<c.length;a++){var d=c[a];switch(d.nodeName){case "vt:varColor1":this.variantsColors[b][0]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor2":this.variantsColors[b][1]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));+break;case "vt:varColor3":this.variantsColors[b][2]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor4":this.variantsColors[b][3]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor5":this.variantsColors[b][4]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));+break;case "vt:varColor6":this.variantsColors[b][5]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor7":this.variantsColors[b][6]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d))}}};h.prototype.addBkgndColor=function(b){b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b);null!=b&&(this.bkgndColor=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b)))};+h.prototype.extractThemeIndex=function(b){b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b);null!=b&&(this.themeIndex=parseInt(b.getAttribute("schemeEnum")))};h.prototype.addBasicColor=function(b,a){this.baseColors[b]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(a)};h.prototype.getSchemeColor=function(b){this.processTheme();var a=this.baseColors;b=a[b]?a[b]:null;return null!=b?b.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this):this.defaultClr};h.prototype.getStyleColor=function(b){this.processTheme();+if(8>b){var a=function(d,f){return d[f]?d[f]:null}(this.baseColors,function(d,f){null==d.entries&&(d.entries=[]);for(var k=0;k<d.entries.length;k++)if(null!=d.entries[k].key.equals&&d.entries[k].key.equals(f)||d.entries[k].key===f)return d.entries[k].value;return null}(h.colorIds_$LI$(),b));if(null!=a)return a.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}else if(8===b){if(null!=this.bkgndColor)return this.bkgndColor.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}else{a=null;var c=0;200<=b?c=b-200:+100<=b&&(c=b-100);0<=c&&6>=c&&(a=this.variantsColors[this.themeVariant][c]);if(null!=a)return a.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}return this.defaultClr};h.prototype.getFillGraientColor=function(b){return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(b,!0)};h.prototype.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(b,!1)};h.prototype.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean=+function(b,a){this.processTheme();var c=b.getQuickStyleFillColor(),d=null;switch(b.getQuickStyleFillMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:d=this.fillStyles[b.getQuickStyleFillMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&(c=100),d=b.getQuickStyleFillMatrix()-100,d=this.fillStyles[this.variantFillIdx[this.themeVariant][d]-1]}a=null!=d?a?null!=d&&d instanceof g.mxgraph.io.vsdx.theme.GradFill?d.applyStyle(c,this).getGradientClr():null:+d.applyStyle(c,this):a?null:this.getStyleColor(c);c=b.getQuickStyleVariation();if(null!=a&&0<(c&8)){c=this.getStyleColor(8).toHsl();b=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);d=b.toHsl();var f=a.toHsl();.1666<=Math.abs(c.getLum()-f.getLum())||(.7292>=c.getLum()?a=new g.mxgraph.io.vsdx.theme.Color(255,255,255):Math.abs(c.getLum()-d.getLum())>Math.abs(c.getLum()-f.getLum())&&(a=b))}return a};h.prototype.getFillColor=function(b,a){if(!(null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||+null===b)||"boolean"!==typeof a&&null!==a){if((null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");}return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(b,a)};h.prototype.getLineStyle=function(b,a){this.processTheme();var c=null;switch(b){case 1:case 2:case 3:case 4:case 5:case 6:c=a[b-1];break;case 100:case 101:case 102:case 103:c=a===this.lineStyles?+this.lineStyles[this.variantLineIdx[this.themeVariant][b-100]-1]:this.defaultLineStyle}return c};h.prototype.getLineStyleExt=function(b,a){this.processTheme();var c=null;switch(b){case 0:case 1:case 2:case 3:case 4:case 5:case 6:c=a[b]}return c};h.prototype.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(b,a){this.processTheme();var c=b.getQuickStyleLineColor();a=this.getLineStyle(b.getQuickStyleLineMatrix(),a);switch(b.getQuickStyleLineMatrix()){case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&+(c=100)}c=null!=a?a.getLineColor(c,this):this.getStyleColor(c);if(0<(b.getQuickStyleVariation()&4)){a=this.getStyleColor(8).toHsl();b=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);var d=b.toHsl(),f=c.toHsl();.1666<=Math.abs(a.getLum()-f.getLum())||(.7292>=a.getLum()?c=new g.mxgraph.io.vsdx.theme.Color(255,255,255):Math.abs(a.getLum()-d.getLum())>Math.abs(a.getLum()-f.getLum())&&(c=b))}return c};h.prototype.getLineColor=function(b,a){if((null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||+null===b)&&(null!=a&&a instanceof Array||null===a))return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,a);if((null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};h.prototype.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.lineStyles)};+h.prototype.getConnLineColor=function(b){return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.connLineStyles)};h.prototype.getDefaultLineClr=function(){return this.defaultLineClr};h.prototype.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList=function(b,a,c){a=this.getLineStyleExt(b.getQuickStyleLineMatrix(),a);if(null!=a)return a.isDashed();b=this.getLineStyle(b.getQuickStyleLineMatrix(),c);return null!=b?b.isDashed():+!1};h.prototype.isLineDashed=function(b,a,c){if((null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a)&&(null!=c&&c instanceof Array||null===c))return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,a,c);if((null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a&&void 0===c)return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");+};h.prototype.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,this.lineStylesExt,this.lineStyles)};h.prototype.isConnLineDashed=function(b){return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,this.connLineStylesExt,this.connLineStyles)};h.prototype.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList=+function(b,a,c){a=this.getLineStyleExt(b.getQuickStyleLineMatrix(),a);if(null!=a)return a.getLineDashPattern();b=this.getLineStyle(b.getQuickStyleLineMatrix(),c);return null!=b?b.getLineDashPattern():null};h.prototype.getLineDashPattern=function(b,a,c){if((null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a)&&(null!=c&&c instanceof Array||null===c))return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,+a,c);if((null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a&&void 0===c)return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};h.prototype.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,this.lineStylesExt,this.lineStyles)};h.prototype.getConnLineDashPattern=function(b){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,+this.connLineStylesExt,this.connLineStyles)};h.prototype.getArrowSize=function(b,a,c,d){c=this.getLineStyleExt(b.getQuickStyleLineMatrix(),c);if(null!=c)return a?c.getStartSize():c.getEndSize();b=this.getLineStyle(b.getQuickStyleLineMatrix(),d);return null!=b?a?b.getStartSize():b.getEndSize():4};h.prototype.getStartSize=function(b){return this.getArrowSize(b,!0,this.lineStylesExt,this.lineStyles)};h.prototype.getConnStartSize=function(b){return this.getArrowSize(b,!0,this.connLineStylesExt,this.connLineStyles)};+h.prototype.getEndSize=function(b){return this.getArrowSize(b,!1,this.lineStylesExt,this.lineStyles)};h.prototype.getConnEndSize=function(b){return this.getArrowSize(b,!1,this.connLineStylesExt,this.connLineStyles)};h.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(b,a){this.processTheme();var c=b.getQuickStyleFontColor(),d=null;switch(b.getQuickStyleFontMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:d=a[b.getQuickStyleFontMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&+(c=100),d=b.getQuickStyleFontMatrix()-100,a!==this.fontColors?(a=this.baseColors,d=a.dk1?a.dk1:null):d=a[this.variantFontIdx[this.themeVariant][d]-1]}c=null!=d?d.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(c,this):this.getStyleColor(c);if(0<(b.getQuickStyleVariation()&2)){d=this.getStyleColor(8).toHsl();var f=c.toHsl();a=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);var k=a.toHsl();b=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);var n=b.toHsl();.1666<=Math.abs(d.getLum()-+f.getLum())||(.7292>=d.getLum()?c=new g.mxgraph.io.vsdx.theme.Color(255,255,255):(n=Math.abs(d.getLum()-n.getLum()),k=Math.abs(d.getLum()-k.getLum()),d=Math.abs(d.getLum()-f.getLum()),d=Math.max(n,k,d),d==n?c=b:d==k&&(c=a)))}return c};h.prototype.getFontColor=function(b,a){if((null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a))return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,a);if((null!=b&&b instanceof+g.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};h.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.fontColors)};h.prototype.getConnFontColor=function(b){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.connFontColors)};h.prototype.getArrowType=+function(b,a,c,d){c=this.getLineStyleExt(b.getQuickStyleLineMatrix(),c);if(null!=c)return a?c.getStart():c.getEnd();b=this.getLineStyle(b.getQuickStyleLineMatrix(),d);return null!=b?a?b.getStart():b.getEnd():0};h.prototype.getEdgeMarker=function(b,a){return this.getArrowType(a,b,this.lineStylesExt,this.lineStyles)};h.prototype.getConnEdgeMarker=function(b,a){return this.getArrowType(a,b,this.connLineStylesExt,this.connLineStyles)};h.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=+function(b,a){b=this.getLineStyle(b.getQuickStyleLineMatrix(),a);return null!=b?b.getLineWidth():0};h.prototype.getLineWidth=function(b,a){if((null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a))return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,a);if((null!=b&&b instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);+throw Error("invalid overload");};h.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.lineStyles)};h.prototype.getConnLineWidth=function(b){return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.connLineStyles)};return h}();m.__static_initialized=!1;B.mxVsdxTheme=m;m.__class="com.mxgraph.io.vsdx.mxVsdxTheme"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(){}h.conversionFactor_$LI$=function(){null==h.conversionFactor&&(h.conversionFactor=h.screenCoordinatesPerCm*h.CENTIMETERS_PER_INCHES);return h.conversionFactor};h.getDirectChildNamedElements=function(c,a){var b=[];for(c=c.firstChild;null!=c;c=c.nextSibling){var d;if(d=null!=c&&1==c.nodeType){d=a;var f=c.nodeName;d=d&&d.equals?d.equals(f):d===f}d&&b.push(c)}return b};h.getDirectChildElements=function(c){var a=[];for(c=-c.firstChild;null!=c;c=c.nextSibling)null!=c&&1==c.nodeType&&a.push(c);return a};h.getDirectFirstChildElement=function(c){for(c=c.firstChild;null!=c;c=c.nextSibling)if(null!=c&&1==c.nodeType)return c;return null};h.getIntAttr$org_w3c_dom_Element$java_lang_String$int=function(c,a,b){try{var d=c.getAttribute(a);if(null!=d)return parseInt(d)}catch(f){}return b};h.getIntAttr=function(c,a,b){if((null==c||1!=c.nodeType)&&null!==c||"string"!==typeof a&&null!==a||"number"!==typeof b&&null!==b){if((null==-c||1!=c.nodeType)&&null!==c||"string"!==typeof a&&null!==a||void 0!==b)throw Error("invalid overload");return g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(c,a)}return g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String$int(c,a,b)};h.getIntAttr$org_w3c_dom_Element$java_lang_String=function(c,a){return h.getIntAttr$org_w3c_dom_Element$java_lang_String$int(c,a,0)};h.getStyleString=function(c,a){for(var b="",d=function(q){var t=0;return{next:function(){return t<-q.length?q[t++]:null},hasNext:function(){return t<q.length}}}(function(q){return Object.keys(q).map(function(t){return q[t]})}(c)),f=function(q){var t=0;return{next:function(){return t<q.length?q[t++]:null},hasNext:function(){return t<q.length}}}(Object.keys(c));f.hasNext();){var k=f.next(),n=d.next();if(!function(q,t){return q&&q.equals?q.equals(t):q===t}(k,mxConstants.STYLE_SHAPE)||!function(q,t,A){void 0===A&&(A=0);return q.substr(A,t.length)===t}(c[k]?c[k]:null,"image")&&!function(q,t,A){void 0===-A&&(A=0);return q.substr(A,t.length)===t}(c[k]?c[k]:null,"rounded="))try{b=b+k+a}catch(q){}b=b+n+";"}return b};h.surroundByTags=function(c,a,b){return"<"+a+(b?' style="'+b+'"':"")+">"+c+"</"+a+">"};h.htmlEntities=function(c){return c.replace(RegExp("&","g"),"&").replace(RegExp('"',"g"),""").replace(RegExp("'","g"),"′").replace(RegExp("<","g"),"<").replace(RegExp(">","g"),">")};h.toInitialCapital=function(c){c=c.split(" ");for(var a="",b=0;b<c.length;b++){var d=c[b],f=d.substring(0,-1);d=d.substring(1);f=f.toUpperCase();a+=f+d}return a.substring(0,a.length)};h.toSmallCaps=function(c,a){var b="",d=b;if(a&&a.equals?a.equals(d):a===d)b=c;else for(c=c.split(""),d=0;d<c.length;d++){var f=c[d];(null==f.charCodeAt?f:f.charCodeAt(0))>=(null=="a".charCodeAt?"a":97)&&(null==f.charCodeAt?f:f.charCodeAt(0))<=(null=="z".charCodeAt?"z":122)?(f=(new String(f)).toString(),f=f.toUpperCase(),b+='<font style="font-size:'+parseFloat(a)/1.28+'px">'+f+"</font>"):b+=f}return b};h.getStyleMap=function(c,-a){var b={};c=c.split(";");for(var d=0;d<c.length;d++){var f=c[d],k=f.indexOf(a),n=f.substring(0,k);f=f.substring(k+1);b[n]=f}return b};h.isInsideTriangle=function(c,a,b,d,f,k,n,q){var t=(c-f)*(d-k)-(b-f)*(a-k);f=(c-n)*(k-q)-(f-n)*(a-q);c=(c-b)*(q-d)-(n-b)*(a-d);return!((0>t||0>f||0>c)&&(0<t||0<f||0<c))};return h}();m.screenCoordinatesPerCm=40;m.CENTIMETERS_PER_INCHES=2.54;B.mxVsdxUtils=m;m.__class="com.mxgraph.io.vsdx.mxVsdxUtils"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(){}h.conversionFactor_$LI$=function(){null==h.conversionFactor&&(h.conversionFactor=h.screenCoordinatesPerCm*h.CENTIMETERS_PER_INCHES);return h.conversionFactor};h.getDirectChildNamedElements=function(b,a){var c=[];for(b=b.firstChild;null!=b;b=b.nextSibling){var d;if(d=null!=b&&1==b.nodeType){d=a;var f=b.nodeName;d=d&&d.equals?d.equals(f):d===f}d&&c.push(b)}return c};h.getDirectChildElements=function(b){var a=[];for(b=+b.firstChild;null!=b;b=b.nextSibling)null!=b&&1==b.nodeType&&a.push(b);return a};h.getDirectFirstChildElement=function(b){for(b=b.firstChild;null!=b;b=b.nextSibling)if(null!=b&&1==b.nodeType)return b;return null};h.getIntAttr$org_w3c_dom_Element$java_lang_String$int=function(b,a,c){try{var d=b.getAttribute(a);if(null!=d)return parseInt(d)}catch(f){}return c};h.getIntAttr=function(b,a,c){if((null==b||1!=b.nodeType)&&null!==b||"string"!==typeof a&&null!==a||"number"!==typeof c&&null!==c){if((null==+b||1!=b.nodeType)&&null!==b||"string"!==typeof a&&null!==a||void 0!==c)throw Error("invalid overload");return g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(b,a)}return g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String$int(b,a,c)};h.getIntAttr$org_w3c_dom_Element$java_lang_String=function(b,a){return h.getIntAttr$org_w3c_dom_Element$java_lang_String$int(b,a,0)};h.getStyleString=function(b,a){for(var c="",d=function(q){var t=0;return{next:function(){return t<+q.length?q[t++]:null},hasNext:function(){return t<q.length}}}(function(q){return Object.keys(q).map(function(t){return q[t]})}(b)),f=function(q){var t=0;return{next:function(){return t<q.length?q[t++]:null},hasNext:function(){return t<q.length}}}(Object.keys(b));f.hasNext();){var k=f.next(),n=d.next();if(!function(q,t){return q&&q.equals?q.equals(t):q===t}(k,mxConstants.STYLE_SHAPE)||!function(q,t,A){void 0===A&&(A=0);return q.substr(A,t.length)===t}(b[k]?b[k]:null,"image")&&!function(q,t,A){void 0===+A&&(A=0);return q.substr(A,t.length)===t}(b[k]?b[k]:null,"rounded="))try{c=c+k+a}catch(q){}c=c+n+";"}return c};h.surroundByTags=function(b,a,c){return"<"+a+(c?' style="'+c+'"':"")+">"+b+"</"+a+">"};h.htmlEntities=function(b){return b.replace(RegExp("&","g"),"&").replace(RegExp('"',"g"),""").replace(RegExp("'","g"),"′").replace(RegExp("<","g"),"<").replace(RegExp(">","g"),">")};h.toInitialCapital=function(b){b=b.split(" ");for(var a="",c=0;c<b.length;c++){var d=b[c],f=d.substring(0,+1);d=d.substring(1);f=f.toUpperCase();a+=f+d}return a.substring(0,a.length)};h.toSmallCaps=function(b,a){var c="",d=c;if(a&&a.equals?a.equals(d):a===d)c=b;else for(b=b.split(""),d=0;d<b.length;d++){var f=b[d];(null==f.charCodeAt?f:f.charCodeAt(0))>=(null=="a".charCodeAt?"a":97)&&(null==f.charCodeAt?f:f.charCodeAt(0))<=(null=="z".charCodeAt?"z":122)?(f=(new String(f)).toString(),f=f.toUpperCase(),c+='<font style="font-size:'+parseFloat(a)/1.28+'px">'+f+"</font>"):c+=f}return c};h.getStyleMap=function(b,+a){var c={};b=b.split(";");for(var d=0;d<b.length;d++){var f=b[d],k=f.indexOf(a),n=f.substring(0,k);f=f.substring(k+1);c[n]=f}return c};h.isInsideTriangle=function(b,a,c,d,f,k,n,q){var t=(b-f)*(d-k)-(c-f)*(a-k);f=(b-n)*(k-q)-(f-n)*(a-q);b=(b-c)*(q-d)-(n-c)*(a-d);return!((0>t||0>f||0>b)&&(0<t||0<f||0<b))};return h}();m.screenCoordinatesPerCm=40;m.CENTIMETERS_PER_INCHES=2.54;B.mxVsdxUtils=m;m.__class="com.mxgraph.io.vsdx.mxVsdxUtils"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a,b,d){this.paraIndex=this.fields=this.charIndices=this.values=null;this.values=[];this.values.push(c);this.charIndices=[];this.charIndices.push(a);this.fields=[];this.fields.push(d);this.paraIndex=b}h.prototype.addText=function(c,a,b){this.values.push(c);this.charIndices.push(a);this.fields.push(b)};h.prototype.getParagraphIndex=function(){return this.paraIndex};h.prototype.getValue=function(c){return this.values[c]};h.prototype.numValues=-function(){return this.values.length};h.prototype.getChar=function(c){return this.charIndices[c]};h.prototype.getField=function(c){return this.fields[c]};return h}();B.Paragraph=m;m.__class="com.mxgraph.io.vsdx.Paragraph"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c){this.elem=c}h.prototype.getIndexedCell=function(c,a){for(var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.elem,"Row"),d=0;d<b.length;d++){var f=b[d],k=f.getAttribute("IX");if(function(t,A){return t&&t.equals?t.equals(A):t===A}(k,c)||null==c){f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Cell");for(var n=0;n<f.length;n++){var q=f[n];k=q.getAttribute("N");if(function(t,A){return t&&+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b,a,c,d){this.paraIndex=this.fields=this.charIndices=this.values=null;this.values=[];this.values.push(b);this.charIndices=[];this.charIndices.push(a);this.fields=[];this.fields.push(d);this.paraIndex=c}h.prototype.addText=function(b,a,c){this.values.push(b);this.charIndices.push(a);this.fields.push(c)};h.prototype.getParagraphIndex=function(){return this.paraIndex};h.prototype.getValue=function(b){return this.values[b]};h.prototype.numValues=+function(){return this.values.length};h.prototype.getChar=function(b){return this.charIndices[b]};h.prototype.getField=function(b){return this.fields[b]};return h}();B.Paragraph=m;m.__class="com.mxgraph.io.vsdx.Paragraph"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b){this.elem=b}h.prototype.getIndexedCell=function(b,a){for(var c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.elem,"Row"),d=0;d<c.length;d++){var f=c[d],k=f.getAttribute("IX");if(function(t,A){return t&&t.equals?t.equals(A):t===A}(k,b)||null==b){f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Cell");for(var n=0;n<f.length;n++){var q=f[n];k=q.getAttribute("N");if(function(t,A){return t&&t.equals?t.equals(A):t===A}(k,a))return q}}}return null};return h}();B.Section=m;m.__class="com.mxgraph.io.vsdx.Section"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a){this.pageNumber=0;this.pageNumber=c;this.Id=a}h.prototype.getId=function(){return this.Id};h.prototype.getPageNumber=function(){return this.pageNumber};h.prototype.equals=function(c){return null==c||this.constructor!==c.constructor||this.pageNumber!==c.pageNumber||this.Id!==c.Id?!1:!0};h.prototype.hashCode=function(){return 1E5*this.pageNumber+this.Id};return h}();B.ShapePageId=m;m.__class="com.mxgraph.io.vsdx.ShapePageId"})(z.vsdx||+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b,a){this.pageNumber=0;this.pageNumber=b;this.Id=a}h.prototype.getId=function(){return this.Id};h.prototype.getPageNumber=function(){return this.pageNumber};h.prototype.equals=function(b){return null==b||this.constructor!==b.constructor||this.pageNumber!==b.pageNumber||this.Id!==b.Id?!1:!0};h.prototype.hashCode=function(){return 1E5*this.pageNumber+this.Id};return h}();B.ShapePageId=m;m.__class="com.mxgraph.io.vsdx.ShapePageId"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d){this.blue=this.green=this.red=0;this.gradientClr=null;this.red=a;this.green=b;this.blue=d}c.NONE_$LI$=function(){null==c.NONE&&(c.NONE=new c(-1,-1,-1));return c.NONE};c.prototype.getRed=function(){return this.red};c.prototype.setRed=function(a){this.red=a};c.prototype.getGreen=function(){return this.green};c.prototype.setGreen=function(a){this.green=a};c.prototype.getBlue=function(){return this.blue};-c.prototype.setBlue=function(a){this.blue=a};c.prototype.toHsl=function(){var a=this.getRed()/255,b=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(b,d)),k=Math.min(a,Math.min(b,d)),n=(f+k)/2;if(f===k)a=k=0;else{var q=f-k;k=.5<n?q/(2-f-k):q/(f+k);a=(f===a?(b-d)/q+(b<d?6:0):f===b?(d-a)/q+2:(a-b)/q+4)/6}return new g.mxgraph.io.vsdx.theme.HSLColor(a,k,n)};c.prototype.toHsv=function(){var a=this.getRed()/255,b=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(b,d)),k=Math.min(a,-Math.min(b,d)),n=f-k;a=f===k?0:(f===a?(b-d)/n+(b<d?6:0):f===b?(d-a)/n+2:(a-b)/n+4)/6;return new g.mxgraph.io.vsdx.theme.HSVColor(a,0===f?0:n/f,f)};c.decodeColorHex=function(a){a=parseInt(a,16);return new c(a>>16&255,a>>8&255,a&255)};c.prototype.toHexStr=function(){var a=this.red.toString(16);a=1==a.length?"0"+a:a;var b=this.green.toString(16);b=1==b.length?"0"+b:b;var d=this.blue.toString(16);d=1==d.length?"0"+d:d;return"#"+a+b+d};c.prototype.getGradientClr=function(){return this.gradientClr};c.prototype.setGradientClr=-function(a){this.gradientClr=a};return c}();m.Color=h;h.__class="com.mxgraph.io.vsdx.theme.Color"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(){}c.getFillStyle=function(a){var b=null;switch(a.nodeName){case "a:solidFill":b=new g.mxgraph.io.vsdx.theme.SolidFillStyle(g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a)));break;case "a:noFill":b=new g.mxgraph.io.vsdx.theme.NoFillStyle;break;case "a:gradFill":b=new g.mxgraph.io.vsdx.theme.GradFill(a)}return b};return c}();m.FillStyleFactory=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(a,c,d){this.blue=this.green=this.red=0;this.gradientClr=null;this.red=a;this.green=c;this.blue=d}b.NONE_$LI$=function(){null==b.NONE&&(b.NONE=new b(-1,-1,-1));return b.NONE};b.prototype.getRed=function(){return this.red};b.prototype.setRed=function(a){this.red=a};b.prototype.getGreen=function(){return this.green};b.prototype.setGreen=function(a){this.green=a};b.prototype.getBlue=function(){return this.blue};+b.prototype.setBlue=function(a){this.blue=a};b.prototype.toHsl=function(){var a=this.getRed()/255,c=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(c,d)),k=Math.min(a,Math.min(c,d)),n=(f+k)/2;if(f===k)a=k=0;else{var q=f-k;k=.5<n?q/(2-f-k):q/(f+k);a=(f===a?(c-d)/q+(c<d?6:0):f===c?(d-a)/q+2:(a-c)/q+4)/6}return new g.mxgraph.io.vsdx.theme.HSLColor(a,k,n)};b.prototype.toHsv=function(){var a=this.getRed()/255,c=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(c,d)),k=Math.min(a,+Math.min(c,d)),n=f-k;a=f===k?0:(f===a?(c-d)/n+(c<d?6:0):f===c?(d-a)/n+2:(a-c)/n+4)/6;return new g.mxgraph.io.vsdx.theme.HSVColor(a,0===f?0:n/f,f)};b.decodeColorHex=function(a){a=parseInt(a,16);return new b(a>>16&255,a>>8&255,a&255)};b.prototype.toHexStr=function(){var a=this.red.toString(16);a=1==a.length?"0"+a:a;var c=this.green.toString(16);c=1==c.length?"0"+c:c;var d=this.blue.toString(16);d=1==d.length?"0"+d:d;return"#"+a+c+d};b.prototype.getGradientClr=function(){return this.gradientClr};b.prototype.setGradientClr=+function(a){this.gradientClr=a};return b}();m.Color=h;h.__class="com.mxgraph.io.vsdx.theme.Color"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(){}b.getFillStyle=function(a){var c=null;switch(a.nodeName){case "a:solidFill":c=new g.mxgraph.io.vsdx.theme.SolidFillStyle(g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a)));break;case "a:noFill":c=new g.mxgraph.io.vsdx.theme.NoFillStyle;break;case "a:gradFill":c=new g.mxgraph.io.vsdx.theme.GradFill(a)}return c};return b}();m.FillStyleFactory=h;h.__class="com.mxgraph.io.vsdx.theme.FillStyleFactory"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a){this.color2=this.color1=null;a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"a:gsLst");0<a.length&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a[0]),2<=a.length&&(this.color2=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[0])),this.color1=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[a.length--1]))));null==this.color1&&(this.color1=this.color2=new g.mxgraph.io.vsdx.theme.SrgbClr("FFFFFF"))}c.prototype.applyStyle=function(a,b){var d=this.color1.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b);d.setGradientClr(this.color2.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b));return d};return c}();m.GradFill=h;h.__class="com.mxgraph.io.vsdx.theme.GradFill";h.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(a){this.color2=this.color1=null;a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"a:gsLst");0<a.length&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a[0]),2<=a.length&&(this.color2=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[0])),this.color1=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[a.length-+1]))));null==this.color1&&(this.color1=this.color2=new g.mxgraph.io.vsdx.theme.SrgbClr("FFFFFF"))}b.prototype.applyStyle=function(a,c){var d=this.color1.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,c);d.setGradientClr(this.color2.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,c));return d};return b}();m.GradFill=h;h.__class="com.mxgraph.io.vsdx.theme.GradFill";h.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d){this.lum=this.sat=this.hue=0;this.hue=a;this.sat=b;this.lum=d}c.prototype.getHue=function(){return this.hue};c.prototype.setHue=function(a){this.hue=a};c.prototype.getSat=function(){return this.sat};c.prototype.setSat=function(a){this.sat=a};c.prototype.getLum=function(){return this.lum};c.prototype.setLum=function(a){this.lum=a};c.prototype.hue2rgb=function(a,b,d){0>d&&(d+=1);1<d&&--d;return d<1/6?-a+6*(b-a)*d:.5>d?b:d<2/3?a+(b-a)*(2/3-d)*6:a};c.prototype.toRgb=function(){var a=this.hue;var b=this.sat;var d=this.lum;if(0===b)d=b=a=d;else{var f=.5>d?d*(1+b):d+b-d*b,k=2*d-f;d=this.hue2rgb(k,f,a+1/3);b=this.hue2rgb(k,f,a);a=this.hue2rgb(k,f,a-1/3)}return new g.mxgraph.io.vsdx.theme.Color(255*d|0,255*b|0,255*a|0)};c.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};c.prototype.tint=function(a){this.lum*=1+a/100;this.lum=this.clamp01(this.lum);return this};c.prototype.shade=function(a){this.lum*=-a/100;this.lum=this.clamp01(this.lum);return this};c.prototype.satMod=function(a){this.sat*=a/100;this.sat=this.clamp01(this.sat);return this};c.prototype.lumMod=function(a){this.lum*=a/100;this.lum=this.clamp01(this.lum);return this};return c}();m.HSLColor=h;h.__class="com.mxgraph.io.vsdx.theme.HSLColor"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d){this.h=a;this.s=b;this.v=d}c.prototype.toRgb=function(){var a=6*this.h,b=this.s,d=Math.floor(a),f=a-d;a=this.v*(1-b);var k=this.v*(1-f*b);b=this.v*(1-(1-f)*b);d=(d|0)%6;return new g.mxgraph.io.vsdx.theme.Color(255*[this.v,k,a,a,b,this.v][d]|0,255*[b,this.v,this.v,k,a,a][d]|0,255*[a,a,b,this.v,this.v,k][d]|0)};c.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};c.prototype.tint=function(a){this.v*=-1+a/100;this.v=this.clamp01(this.v);return this};c.prototype.shade=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};c.prototype.satMod=function(a){this.s*=a/100;this.s=this.clamp01(this.s);return this};c.prototype.lumMod=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};c.prototype.hueMod=function(a){this.h*=a/100;this.h=this.clamp01(this.h);return this};return c}();m.HSVColor=h;h.__class="com.mxgraph.io.vsdx.theme.HSVColor"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(a,c,d){this.lum=this.sat=this.hue=0;this.hue=a;this.sat=c;this.lum=d}b.prototype.getHue=function(){return this.hue};b.prototype.setHue=function(a){this.hue=a};b.prototype.getSat=function(){return this.sat};b.prototype.setSat=function(a){this.sat=a};b.prototype.getLum=function(){return this.lum};b.prototype.setLum=function(a){this.lum=a};b.prototype.hue2rgb=function(a,c,d){0>d&&(d+=1);1<d&&--d;return d<1/6?+a+6*(c-a)*d:.5>d?c:d<2/3?a+(c-a)*(2/3-d)*6:a};b.prototype.toRgb=function(){var a=this.hue;var c=this.sat;var d=this.lum;if(0===c)d=c=a=d;else{var f=.5>d?d*(1+c):d+c-d*c,k=2*d-f;d=this.hue2rgb(k,f,a+1/3);c=this.hue2rgb(k,f,a);a=this.hue2rgb(k,f,a-1/3)}return new g.mxgraph.io.vsdx.theme.Color(255*d|0,255*c|0,255*a|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.lum*=1+a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.shade=function(a){this.lum*=+a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.satMod=function(a){this.sat*=a/100;this.sat=this.clamp01(this.sat);return this};b.prototype.lumMod=function(a){this.lum*=a/100;this.lum=this.clamp01(this.lum);return this};return b}();m.HSLColor=h;h.__class="com.mxgraph.io.vsdx.theme.HSLColor"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(a,c,d){this.h=a;this.s=c;this.v=d}b.prototype.toRgb=function(){var a=6*this.h,c=this.s,d=Math.floor(a),f=a-d;a=this.v*(1-c);var k=this.v*(1-f*c);c=this.v*(1-(1-f)*c);d=(d|0)%6;return new g.mxgraph.io.vsdx.theme.Color(255*[this.v,k,a,a,c,this.v][d]|0,255*[c,this.v,this.v,k,a,a][d]|0,255*[a,a,c,this.v,this.v,k][d]|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.v*=+1+a/100;this.v=this.clamp01(this.v);return this};b.prototype.shade=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};b.prototype.satMod=function(a){this.s*=a/100;this.s=this.clamp01(this.s);return this};b.prototype.lumMod=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};b.prototype.hueMod=function(a){this.h*=a/100;this.h=this.clamp01(this.h);return this};return b}();m.HSVColor=h;h.__class="com.mxgraph.io.vsdx.theme.HSVColor"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a){this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1;if(null!=a&&1==a.nodeType||null===a){Array.prototype.slice.call(arguments);this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=-this.isBevelJoin=this.isRoundJoin=!1;this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.lineWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"w");var b=a.getAttribute("cap");if(null!=b)switch(b){case "rnd":this.lineCap=c.LineCapType.ROUND;break;case "sq":this.lineCap=c.LineCapType.SQUARE;break;case "flat":this.lineCap=c.LineCapType.FLAT}b=-a.getAttribute("cmpd");if(null!=b)switch(b){case "sng":this.lineComp=c.CompoundLineType.SINGLE;break;case "dbl":this.lineComp=c.CompoundLineType.DOUBLE;break;case "thickThin":this.lineComp=c.CompoundLineType.THICK_THIN_DOUBLE;break;case "thinThick":this.lineComp=c.CompoundLineType.THIN_THICK_DOUBLE;break;case "tri":this.lineComp=c.CompoundLineType.THIN_THICK_THIN_TRIPLE}b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var d=0;d<b.length;d++){var f=b[d];switch(f.nodeName){case "a:noFill":case "a:solidFill":case "a:gradFill":case "a:pattFill":this.fillStyle=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(a){this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1;if(null!=a&&1==a.nodeType||null===a){Array.prototype.slice.call(arguments);this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=+this.isBevelJoin=this.isRoundJoin=!1;this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.lineWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"w");var c=a.getAttribute("cap");if(null!=c)switch(c){case "rnd":this.lineCap=b.LineCapType.ROUND;break;case "sq":this.lineCap=b.LineCapType.SQUARE;break;case "flat":this.lineCap=b.LineCapType.FLAT}c=+a.getAttribute("cmpd");if(null!=c)switch(c){case "sng":this.lineComp=b.CompoundLineType.SINGLE;break;case "dbl":this.lineComp=b.CompoundLineType.DOUBLE;break;case "thickThin":this.lineComp=b.CompoundLineType.THICK_THIN_DOUBLE;break;case "thinThick":this.lineComp=b.CompoundLineType.THIN_THICK_DOUBLE;break;case "tri":this.lineComp=b.CompoundLineType.THIN_THICK_THIN_TRIPLE}c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var d=0;d<c.length;d++){var f=c[d];switch(f.nodeName){case "a:noFill":case "a:solidFill":case "a:gradFill":case "a:pattFill":this.fillStyle=g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(f);break;case "a:prstDash":f=f.getAttribute("val");this.isLineDashed=!0;switch(f){case "solid":this.isLineDashed=!1;break;case "sysDot":case "dot":this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "lgDash":this.lineDashPattern.push(12);this.lineDashPattern.push(4);break;case "sysDashDot":case "dashDot":this.lineDashPattern.push(8);this.lineDashPattern.push(4);this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "lgDashDot":this.lineDashPattern.push(12);this.lineDashPattern.push(4);this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "sysDashDotDot":case "lgDashDotDot":this.lineDashPattern.push(12),this.lineDashPattern.push(4),this.lineDashPattern.push(1),this.lineDashPattern.push(4),this.lineDashPattern.push(1),this.lineDashPattern.push(4)}break;case "a:custDash":this.isLineDashed=!0;f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"a:ds");for(var k=0;k<f.length;k++){var n=f[k],q=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"d");n=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"sp");this.lineDashPattern.push(q/1E4);this.lineDashPattern.push(n/1E4)}break;case "a:round":this.isRoundJoin=!0;break;case "a:bevel":this.isBevelJoin=!0;break;case "a:miter":g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"lim");this.isMiterJoin=!0;break;case "a:headEnd":this.headEndType=this.getLineEndType(f);this.headEndWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"w");this.headEndLen=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"len");break;case "a:tailEnd":this.tailEndType=this.getLineEndType(f),this.tailEndWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"w"),this.tailEndLen=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"len")}}}else if(void 0===a)Array.prototype.slice.call(arguments),this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=-null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0,this.isLineDashed=!1,this.lineDashPattern=[],this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1,this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0;else throw Error("invalid overload");}c.prototype.getLineEndType=function(a){var b=null;switch(a.getAttribute("type")){case "none":b=-c.LineEndType.NONE;break;case "triangle":b=c.LineEndType.TRIANGLE;break;case "stealth":b=c.LineEndType.STEALTH;break;case "diamond":b=c.LineEndType.DIAMOND;break;case "oval":b=c.LineEndType.OVAL;break;case "arrow":b=c.LineEndType.ARROW}return b};c.prototype.getLineColor=function(a,b){return null!=this.fillStyle?this.fillStyle.applyStyle(a,b):b.getDefaultLineClr()};c.prototype.isDashed=function(){return this.isLineDashed};c.prototype.getLineDashPattern=function(){return this.lineDashPattern};c.prototype.getStartSize=-function(){return 4};c.prototype.getEndSize=function(){return 4};c.prototype.getStart=function(){return 0};c.prototype.getEnd=function(){return 0};c.prototype.getLineWidth=function(){return this.lineWidth};return c}();m.LineStyle=h;h.__class="com.mxgraph.io.vsdx.theme.LineStyle";(function(c){(function(a){a[a.ROUND=0]="ROUND";a[a.SQUARE=1]="SQUARE";a[a.FLAT=2]="FLAT"})(c.LineCapType||(c.LineCapType={}));(function(a){a[a.SINGLE=0]="SINGLE";a[a.DOUBLE=1]="DOUBLE";a[a.THICK_THIN_DOUBLE=2]="THICK_THIN_DOUBLE";-a[a.THIN_THICK_DOUBLE=3]="THIN_THICK_DOUBLE";a[a.THIN_THICK_THIN_TRIPLE=4]="THIN_THICK_THIN_TRIPLE"})(c.CompoundLineType||(c.CompoundLineType={}));(function(a){a[a.NONE=0]="NONE";a[a.TRIANGLE=1]="TRIANGLE";a[a.STEALTH=2]="STEALTH";a[a.DIAMOND=3]="DIAMOND";a[a.OVAL=4]="OVAL";a[a.ARROW=5]="ARROW"})(c.LineEndType||(c.LineEndType={}))})(h=m.LineStyle||(m.LineStyle={}))})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a){this.pattern=this.endSize=this.end=this.startSize=this.start=this.rndg=0;this.lineDashPattern=null;a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a);this.rndg=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"rndg");this.start=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"start");this.startSize=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,-"startSize");this.end=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"end");this.endSize=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"endSize");this.pattern=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"pattern");this.lineDashPattern=g.mxgraph.io.vsdx.Style.getLineDashPattern(this.pattern)}c.prototype.getRndg=function(){return this.rndg};c.prototype.getStart=function(){return this.start};c.prototype.getStartSize=-function(){return this.startSize};c.prototype.getEnd=function(){return this.end};c.prototype.getEndSize=function(){return this.endSize};c.prototype.isDashed=function(){return 1<this.pattern};c.prototype.getLineDashPattern=function(){return this.lineDashPattern};return c}();m.LineStyleExt=h;h.__class="com.mxgraph.io.vsdx.theme.LineStyleExt"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(){}c.prototype.applyStyle=function(a,b){return g.mxgraph.io.vsdx.theme.Color.NONE_$LI$()};return c}();m.NoFillStyle=h;h.__class="com.mxgraph.io.vsdx.theme.NoFillStyle";h.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(){this.invGamma=this.gamma=this.blueMod=this.blueOff=this.blue=this.greenMod=this.greenOff=this.green=this.redMod=this.redOff=this.red=this.lumMod=this.lumOff=this.lum=this.satMod=this.satOff=this.sat=this.hueMod=this.hueOff=this.hue=this.alphaMod=this.alphaOff=this.alpha=this.gray=this.inv=this.comp=this.shade=this.tint=0;this.hasEffects=this.isInitialized=this.isDynamic=!1;this.color=null}c.prototype.calcColor=-function(a,b){this.hasEffects&&(a=this.color.toHsv(),0!==this.tint&&a.tint(this.tint),0!==this.shade&&a.shade(this.shade),0!==this.satMod&&a.satMod(this.satMod),0!==this.lumMod&&a.lumMod(this.lumMod),0!==this.hueMod&&a.hueMod(this.hueMod),this.color=a.toRgb())};c.prototype.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme=function(a,b){if(this.isDynamic||!this.isInitialized)this.calcColor(a,b),this.isInitialized=!0;return this.color};c.prototype.getColor=function(a,b){if("number"!==typeof a&&null!==a||-!(null!=b&&b instanceof g.mxgraph.io.vsdx.mxVsdxTheme||null===b)){if((null!=a&&a instanceof g.mxgraph.io.vsdx.mxVsdxTheme||null===a)&&void 0===b)return this.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(a);throw Error("invalid overload");}return this.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b)};c.prototype.getColor$com_mxgraph_io_vsdx_mxVsdxTheme=function(a){return this.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(-1,a)};c.prototype.setTint=function(a){this.tint=a;this.hasEffects=!0};c.prototype.setShade=-function(a){this.shade=a;this.hasEffects=!0};c.prototype.setComp=function(a){this.comp=a;this.hasEffects=!0};c.prototype.setInv=function(a){this.inv=a;this.hasEffects=!0};c.prototype.setGray=function(a){this.gray=a;this.hasEffects=!0};c.prototype.setAlpha=function(a){this.alpha=a;this.hasEffects=!0};c.prototype.setAlphaOff=function(a){this.alphaOff=a;this.hasEffects=!0};c.prototype.setAlphaMod=function(a){this.alphaMod=a;this.hasEffects=!0};c.prototype.setHue=function(a){this.hue=a;this.hasEffects=-!0};c.prototype.setHueOff=function(a){this.hueOff=a;this.hasEffects=!0};c.prototype.setHueMod=function(a){this.hueMod=a;this.hasEffects=!0};c.prototype.setSat=function(a){this.sat=a;this.hasEffects=!0};c.prototype.setSatOff=function(a){this.satOff=a;this.hasEffects=!0};c.prototype.setSatMod=function(a){this.satMod=a;this.hasEffects=!0};c.prototype.setLum=function(a){this.lum=a;this.hasEffects=!0};c.prototype.setLumOff=function(a){this.lumOff=a;this.hasEffects=!0};c.prototype.setLumMod=function(a){this.lumMod=-a;this.hasEffects=!0};c.prototype.setRed=function(a){this.red=a;this.hasEffects=!0};c.prototype.setRedOff=function(a){this.redOff=a;this.hasEffects=!0};c.prototype.setRedMod=function(a){this.redMod=a;this.hasEffects=!0};c.prototype.setGreen=function(a){this.green=a;this.hasEffects=!0};c.prototype.setGreenOff=function(a){this.greenOff=a;this.hasEffects=!0};c.prototype.setGreenMod=function(a){this.greenMod=a;this.hasEffects=!0};c.prototype.setBlue=function(a){this.blue=a;this.hasEffects=!0};c.prototype.setBlueOff=-function(a){this.blueOff=a;this.hasEffects=!0};c.prototype.setBlueMod=function(a){this.blueMod=a;this.hasEffects=!0};c.prototype.setGamma=function(a){this.gamma=a;this.hasEffects=!0};c.prototype.setInvGamma=function(a){this.invGamma=a;this.hasEffects=!0};return c}();m.OoxmlColor=h;h.__class="com.mxgraph.io.vsdx.theme.OoxmlColor"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(){}c.getOoxmlColor=function(a){var b=null;switch(a.nodeName){case "a:scrgbClr":b=new g.mxgraph.io.vsdx.theme.ScrgbClr(parseInt(a.getAttribute("r")),parseInt(a.getAttribute("g")),parseInt(a.getAttribute("b")));break;case "a:srgbClr":b=new g.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"));break;case "a:hslClr":b=new g.mxgraph.io.vsdx.theme.HslClr(parseInt(a.getAttribute("hue")),parseInt(a.getAttribute("sat")),-parseInt(a.getAttribute("lum")));break;case "a:sysClr":b=new g.mxgraph.io.vsdx.theme.SysClr(a.getAttribute("val"),a.getAttribute("lastClr"));break;case "a:schemeClr":b=new g.mxgraph.io.vsdx.theme.SchemeClr(a.getAttribute("val"));break;case "a:prstClr":b=new g.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"))}a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var d=0;d<a.length;d++){var f=a[d],k=parseInt(f.getAttribute("val"))/1E3|0;switch(f.nodeName){case "a:tint":b.setTint(k);break;-case "a:shade":b.setShade(k);break;case "a:satMod":b.setSatMod(k);break;case "a:lumMod":b.setLumMod(k);break;case "a:hueMod":b.setHueMod(k)}}return b};return c}();m.OoxmlColorFactory=h;h.__class="com.mxgraph.io.vsdx.theme.OoxmlColorFactory"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d,f,k,n,q,t,A,C){this.quickStyleVariation=this.quickStyleType=this.quickStyleShadowColor=this.quickStyleLineColor=this.quickStyleFontMatrix=this.quickStyleFontColor=this.quickStyleFillMatrix=this.quickStyleFillColor=this.quickStyleEffectsMatrix=0;this.quickStyleEffectsMatrix=a;this.quickStyleFillColor=b;this.quickStyleFillMatrix=d;this.quickStyleFontColor=f;this.quickStyleFontMatrix=k;this.quickStyleLineColor=-n;this.quickStyleLineMatrix=q;this.quickStyleShadowColor=t;this.quickStyleType=A;this.quickStyleVariation=C}c.prototype.getQuickStyleEffectsMatrix=function(){return this.quickStyleEffectsMatrix};c.prototype.getQuickStyleFillColor=function(){return this.quickStyleFillColor};c.prototype.getQuickStyleFillMatrix=function(){return this.quickStyleFillMatrix};c.prototype.getQuickStyleFontColor=function(){return this.quickStyleFontColor};c.prototype.getQuickStyleFontMatrix=function(){return this.quickStyleFontMatrix};-c.prototype.getQuickStyleLineColor=function(){return this.quickStyleLineColor};c.prototype.getQuickStyleLineMatrix=function(){return this.quickStyleLineMatrix};c.prototype.getQuickStyleShadowColor=function(){return this.quickStyleShadowColor};c.prototype.getQuickStyleType=function(){return this.quickStyleType};c.prototype.getQuickStyleVariation=function(){return this.quickStyleVariation};c.prototype.setQuickStyleEffectsMatrix=function(a){this.quickStyleEffectsMatrix=a};c.prototype.setQuickStyleFillColor=-function(a){this.quickStyleFillColor=a};c.prototype.setQuickStyleFillMatrix=function(a){this.quickStyleFillMatrix=a};c.prototype.setQuickStyleFontColor=function(a){this.quickStyleFontColor=a};c.prototype.setQuickStyleFontMatrix=function(a){this.quickStyleFontMatrix=a};c.prototype.setQuickStyleLineColor=function(a){this.quickStyleLineColor=a};c.prototype.setQuickStyleLineMatrix=function(a){this.quickStyleLineMatrix=a};c.prototype.setQuickStyleShadowColor=function(a){this.quickStyleShadowColor=a};c.prototype.setQuickStyleType=-function(a){this.quickStyleType=a};c.prototype.setQuickStyleVariation=function(a){this.quickStyleVariation=a};return c}();m.QuickStyleVals=h;h.__class="com.mxgraph.io.vsdx.theme.QuickStyleVals"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a){this.color=null;this.color=a}c.prototype.applyStyle=function(a,b){return this.color.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b)};return c}();m.SolidFillStyle=h;h.__class="com.mxgraph.io.vsdx.theme.SolidFillStyle";h.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0,this.isLineDashed=!1,this.lineDashPattern=[],this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1,this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0;else throw Error("invalid overload");}b.prototype.getLineEndType=function(a){var c=null;switch(a.getAttribute("type")){case "none":c=+b.LineEndType.NONE;break;case "triangle":c=b.LineEndType.TRIANGLE;break;case "stealth":c=b.LineEndType.STEALTH;break;case "diamond":c=b.LineEndType.DIAMOND;break;case "oval":c=b.LineEndType.OVAL;break;case "arrow":c=b.LineEndType.ARROW}return c};b.prototype.getLineColor=function(a,c){return null!=this.fillStyle?this.fillStyle.applyStyle(a,c):c.getDefaultLineClr()};b.prototype.isDashed=function(){return this.isLineDashed};b.prototype.getLineDashPattern=function(){return this.lineDashPattern};b.prototype.getStartSize=+function(){return 4};b.prototype.getEndSize=function(){return 4};b.prototype.getStart=function(){return 0};b.prototype.getEnd=function(){return 0};b.prototype.getLineWidth=function(){return this.lineWidth};return b}();m.LineStyle=h;h.__class="com.mxgraph.io.vsdx.theme.LineStyle";(function(b){(function(a){a[a.ROUND=0]="ROUND";a[a.SQUARE=1]="SQUARE";a[a.FLAT=2]="FLAT"})(b.LineCapType||(b.LineCapType={}));(function(a){a[a.SINGLE=0]="SINGLE";a[a.DOUBLE=1]="DOUBLE";a[a.THICK_THIN_DOUBLE=2]="THICK_THIN_DOUBLE";+a[a.THIN_THICK_DOUBLE=3]="THIN_THICK_DOUBLE";a[a.THIN_THICK_THIN_TRIPLE=4]="THIN_THICK_THIN_TRIPLE"})(b.CompoundLineType||(b.CompoundLineType={}));(function(a){a[a.NONE=0]="NONE";a[a.TRIANGLE=1]="TRIANGLE";a[a.STEALTH=2]="STEALTH";a[a.DIAMOND=3]="DIAMOND";a[a.OVAL=4]="OVAL";a[a.ARROW=5]="ARROW"})(b.LineEndType||(b.LineEndType={}))})(h=m.LineStyle||(m.LineStyle={}))})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(a){this.pattern=this.endSize=this.end=this.startSize=this.start=this.rndg=0;this.lineDashPattern=null;a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a);this.rndg=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"rndg");this.start=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"start");this.startSize=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,+"startSize");this.end=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"end");this.endSize=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"endSize");this.pattern=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"pattern");this.lineDashPattern=g.mxgraph.io.vsdx.Style.getLineDashPattern(this.pattern)}b.prototype.getRndg=function(){return this.rndg};b.prototype.getStart=function(){return this.start};b.prototype.getStartSize=+function(){return this.startSize};b.prototype.getEnd=function(){return this.end};b.prototype.getEndSize=function(){return this.endSize};b.prototype.isDashed=function(){return 1<this.pattern};b.prototype.getLineDashPattern=function(){return this.lineDashPattern};return b}();m.LineStyleExt=h;h.__class="com.mxgraph.io.vsdx.theme.LineStyleExt"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(){}b.prototype.applyStyle=function(a,c){return g.mxgraph.io.vsdx.theme.Color.NONE_$LI$()};return b}();m.NoFillStyle=h;h.__class="com.mxgraph.io.vsdx.theme.NoFillStyle";h.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(){this.invGamma=this.gamma=this.blueMod=this.blueOff=this.blue=this.greenMod=this.greenOff=this.green=this.redMod=this.redOff=this.red=this.lumMod=this.lumOff=this.lum=this.satMod=this.satOff=this.sat=this.hueMod=this.hueOff=this.hue=this.alphaMod=this.alphaOff=this.alpha=this.gray=this.inv=this.comp=this.shade=this.tint=0;this.hasEffects=this.isInitialized=this.isDynamic=!1;this.color=null}b.prototype.calcColor=+function(a,c){this.hasEffects&&(a=this.color.toHsv(),0!==this.tint&&a.tint(this.tint),0!==this.shade&&a.shade(this.shade),0!==this.satMod&&a.satMod(this.satMod),0!==this.lumMod&&a.lumMod(this.lumMod),0!==this.hueMod&&a.hueMod(this.hueMod),this.color=a.toRgb())};b.prototype.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme=function(a,c){if(this.isDynamic||!this.isInitialized)this.calcColor(a,c),this.isInitialized=!0;return this.color};b.prototype.getColor=function(a,c){if("number"!==typeof a&&null!==a||+!(null!=c&&c instanceof g.mxgraph.io.vsdx.mxVsdxTheme||null===c)){if((null!=a&&a instanceof g.mxgraph.io.vsdx.mxVsdxTheme||null===a)&&void 0===c)return this.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(a);throw Error("invalid overload");}return this.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,c)};b.prototype.getColor$com_mxgraph_io_vsdx_mxVsdxTheme=function(a){return this.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(-1,a)};b.prototype.setTint=function(a){this.tint=a;this.hasEffects=!0};b.prototype.setShade=+function(a){this.shade=a;this.hasEffects=!0};b.prototype.setComp=function(a){this.comp=a;this.hasEffects=!0};b.prototype.setInv=function(a){this.inv=a;this.hasEffects=!0};b.prototype.setGray=function(a){this.gray=a;this.hasEffects=!0};b.prototype.setAlpha=function(a){this.alpha=a;this.hasEffects=!0};b.prototype.setAlphaOff=function(a){this.alphaOff=a;this.hasEffects=!0};b.prototype.setAlphaMod=function(a){this.alphaMod=a;this.hasEffects=!0};b.prototype.setHue=function(a){this.hue=a;this.hasEffects=+!0};b.prototype.setHueOff=function(a){this.hueOff=a;this.hasEffects=!0};b.prototype.setHueMod=function(a){this.hueMod=a;this.hasEffects=!0};b.prototype.setSat=function(a){this.sat=a;this.hasEffects=!0};b.prototype.setSatOff=function(a){this.satOff=a;this.hasEffects=!0};b.prototype.setSatMod=function(a){this.satMod=a;this.hasEffects=!0};b.prototype.setLum=function(a){this.lum=a;this.hasEffects=!0};b.prototype.setLumOff=function(a){this.lumOff=a;this.hasEffects=!0};b.prototype.setLumMod=function(a){this.lumMod=+a;this.hasEffects=!0};b.prototype.setRed=function(a){this.red=a;this.hasEffects=!0};b.prototype.setRedOff=function(a){this.redOff=a;this.hasEffects=!0};b.prototype.setRedMod=function(a){this.redMod=a;this.hasEffects=!0};b.prototype.setGreen=function(a){this.green=a;this.hasEffects=!0};b.prototype.setGreenOff=function(a){this.greenOff=a;this.hasEffects=!0};b.prototype.setGreenMod=function(a){this.greenMod=a;this.hasEffects=!0};b.prototype.setBlue=function(a){this.blue=a;this.hasEffects=!0};b.prototype.setBlueOff=+function(a){this.blueOff=a;this.hasEffects=!0};b.prototype.setBlueMod=function(a){this.blueMod=a;this.hasEffects=!0};b.prototype.setGamma=function(a){this.gamma=a;this.hasEffects=!0};b.prototype.setInvGamma=function(a){this.invGamma=a;this.hasEffects=!0};return b}();m.OoxmlColor=h;h.__class="com.mxgraph.io.vsdx.theme.OoxmlColor"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(){}b.getOoxmlColor=function(a){var c=null;switch(a.nodeName){case "a:scrgbClr":c=new g.mxgraph.io.vsdx.theme.ScrgbClr(parseInt(a.getAttribute("r")),parseInt(a.getAttribute("g")),parseInt(a.getAttribute("b")));break;case "a:srgbClr":c=new g.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"));break;case "a:hslClr":c=new g.mxgraph.io.vsdx.theme.HslClr(parseInt(a.getAttribute("hue")),parseInt(a.getAttribute("sat")),+parseInt(a.getAttribute("lum")));break;case "a:sysClr":c=new g.mxgraph.io.vsdx.theme.SysClr(a.getAttribute("val"),a.getAttribute("lastClr"));break;case "a:schemeClr":c=new g.mxgraph.io.vsdx.theme.SchemeClr(a.getAttribute("val"));break;case "a:prstClr":c=new g.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"))}a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var d=0;d<a.length;d++){var f=a[d],k=parseInt(f.getAttribute("val"))/1E3|0;switch(f.nodeName){case "a:tint":c.setTint(k);break;+case "a:shade":c.setShade(k);break;case "a:satMod":c.setSatMod(k);break;case "a:lumMod":c.setLumMod(k);break;case "a:hueMod":c.setHueMod(k)}}return c};return b}();m.OoxmlColorFactory=h;h.__class="com.mxgraph.io.vsdx.theme.OoxmlColorFactory"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(a,c,d,f,k,n,q,t,A,C){this.quickStyleVariation=this.quickStyleType=this.quickStyleShadowColor=this.quickStyleLineColor=this.quickStyleFontMatrix=this.quickStyleFontColor=this.quickStyleFillMatrix=this.quickStyleFillColor=this.quickStyleEffectsMatrix=0;this.quickStyleEffectsMatrix=a;this.quickStyleFillColor=c;this.quickStyleFillMatrix=d;this.quickStyleFontColor=f;this.quickStyleFontMatrix=k;this.quickStyleLineColor=+n;this.quickStyleLineMatrix=q;this.quickStyleShadowColor=t;this.quickStyleType=A;this.quickStyleVariation=C}b.prototype.getQuickStyleEffectsMatrix=function(){return this.quickStyleEffectsMatrix};b.prototype.getQuickStyleFillColor=function(){return this.quickStyleFillColor};b.prototype.getQuickStyleFillMatrix=function(){return this.quickStyleFillMatrix};b.prototype.getQuickStyleFontColor=function(){return this.quickStyleFontColor};b.prototype.getQuickStyleFontMatrix=function(){return this.quickStyleFontMatrix};+b.prototype.getQuickStyleLineColor=function(){return this.quickStyleLineColor};b.prototype.getQuickStyleLineMatrix=function(){return this.quickStyleLineMatrix};b.prototype.getQuickStyleShadowColor=function(){return this.quickStyleShadowColor};b.prototype.getQuickStyleType=function(){return this.quickStyleType};b.prototype.getQuickStyleVariation=function(){return this.quickStyleVariation};b.prototype.setQuickStyleEffectsMatrix=function(a){this.quickStyleEffectsMatrix=a};b.prototype.setQuickStyleFillColor=+function(a){this.quickStyleFillColor=a};b.prototype.setQuickStyleFillMatrix=function(a){this.quickStyleFillMatrix=a};b.prototype.setQuickStyleFontColor=function(a){this.quickStyleFontColor=a};b.prototype.setQuickStyleFontMatrix=function(a){this.quickStyleFontMatrix=a};b.prototype.setQuickStyleLineColor=function(a){this.quickStyleLineColor=a};b.prototype.setQuickStyleLineMatrix=function(a){this.quickStyleLineMatrix=a};b.prototype.setQuickStyleShadowColor=function(a){this.quickStyleShadowColor=a};b.prototype.setQuickStyleType=+function(a){this.quickStyleType=a};b.prototype.setQuickStyleVariation=function(a){this.quickStyleVariation=a};return b}();m.QuickStyleVals=h;h.__class="com.mxgraph.io.vsdx.theme.QuickStyleVals"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function b(a){this.color=null;this.color=a}b.prototype.applyStyle=function(a,c){return this.color.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,c)};return b}();m.SolidFillStyle=h;h.__class="com.mxgraph.io.vsdx.theme.SolidFillStyle";h.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){var B=function(){function m(){}m.MAX_AREA_$LI$=function(){null==m.MAX_AREA&&(m.MAX_AREA=1E8);return m.MAX_AREA};return m}();B.MAX_REQUEST_SIZE=52428800;B.IMAGE_DOMAIN="http://img.diagramly.com/";z.Constants=B;B.__class="com.mxgraph.online.Constants"})(y.online||(y.online={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){var B=function(){function m(){}m.getRotatedPoint=function(h,c,a,b){var d=h.x-b.x;h=h.y-b.y;return new mxPoint(d*c-h*a+b.x,h*c+d*a+b.y)};m.rotatedGeometry=function(h,c,a,b){c=c*Math.PI/180;var d=Math.cos(c);c=Math.sin(c);var f=h.getCenterX()-a,k=h.getCenterY()-b;h.x=Math.round(f*d-k*c+a-h.width/2);h.y=Math.round(k*d+f*c+b-h.height/2)};return m}();B.CHARSET_FOR_URL_ENCODING="ISO-8859-1";z.Utils=B;B.__class="com.mxgraph.online.Utils"})(y.online||(y.online={}))})(g.mxgraph||+(function(g){(function(y){(function(z){var B=function(){function m(){}m.getRotatedPoint=function(h,b,a,c){var d=h.x-c.x;h=h.y-c.y;return new mxPoint(d*b-h*a+c.x,h*b+d*a+c.y)};m.rotatedGeometry=function(h,b,a,c){b=b*Math.PI/180;var d=Math.cos(b);b=Math.sin(b);var f=h.getCenterX()-a,k=h.getCenterY()-c;h.x=Math.round(f*d-k*b+a-h.width/2);h.y=Math.round(k*d+f*b+c-h.height/2)};return m}();B.CHARSET_FOR_URL_ENCODING="ISO-8859-1";z.Utils=B;B.__class="com.mxgraph.online.Utils"})(y.online||(y.online={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k){b=c.call(this,b,d,f)||this;b.a=k;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a){var f=d.getHeight(),k=d.getWidth(),n=Math.floor(Math.round(d.getLastX()*k)/100),q=Math.floor(Math.round(d.getLastY()*f)/100);b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var t=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();t=f-t;var A=-this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.abs(b-n);q=Math.abs(t-q);n=q=.5*A+(n*n+q*q)/(8*A);var C=Math.abs(q);q=Math.round(100*q/k*100)/100;n=Math.round(100*n/f*100)/100;b=Math.round(100*b/k*100)/100;t=Math.round(100*t/f*100)/100;A=Math.round(100*A)/100;q=Math.abs(q);n=Math.abs(n);f=0>A?"1":"0";A=C<Math.abs(A)?"1":"0";d.setLastX(b);d.setLastY(t);return'<arc rx="'+(new String(q)).toString()+'" ry="'+(new String(n)).toString()+'" x="'+(new String(b)).toString()+'" y="'+(new String(t)).toString()++(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k){c=b.call(this,c,d,f)||this;c.a=k;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a){var f=d.getHeight(),k=d.getWidth(),n=Math.floor(Math.round(d.getLastX()*k)/100),q=Math.floor(Math.round(d.getLastY()*f)/100);c=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var t=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();t=f-t;var A=+this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.abs(c-n);q=Math.abs(t-q);n=q=.5*A+(n*n+q*q)/(8*A);var C=Math.abs(q);q=Math.round(100*q/k*100)/100;n=Math.round(100*n/f*100)/100;c=Math.round(100*c/k*100)/100;t=Math.round(100*t/f*100)/100;A=Math.round(100*A)/100;q=Math.abs(q);n=Math.abs(n);f=0>A?"1":"0";A=C<Math.abs(A)?"1":"0";d.setLastX(c);d.setLastY(t);return'<arc rx="'+(new String(q)).toString()+'" ry="'+(new String(n)).toString()+'" x="'+(new String(c)).toString()+'" y="'+(new String(t)).toString()+'" x-axis-rotation="0" large-arc-flag="'+A+'" sweep-flag="'+f+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.ArcTo=h;h.__class="com.mxgraph.io.vsdx.geometry.ArcTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b){return c.call(this,b,null,null)||this}__extends(a,c);a.prototype.handle=function(b,d){return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.DelRow=h;h.__class="com.mxgraph.io.vsdx.geometry.DelRow"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){b=d.getHeight();var f=d.getWidth(),k=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=b-d;var n=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),-q=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();q=b-q;var t=this.c*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.d*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.abs(n-k);q=Math.abs(q-d);q=Math.sqrt(n*n+q*q);t=Math.abs(t-k);A=Math.abs(b-A-d);k=100*k/f;A=Math.round(100*Math.sqrt(t*t+A*A)/b/2*100)/100;f=Math.round(100*q/f/2*100)/100;t=Math.round(100*(k-2*f))/100;k=Math.round(100*(k+2*f))/100;b=Math.round(100*d/b*100)/100;return'<move x="'+(new String(t)).toString()+-'" y="'+(new String(b)).toString()+'"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(A)).toString()+'" x="'+(new String(k)).toString()+'" y="'+(new String(b)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(A)).toString()+'" x="'+(new String(t)).toString()+'" y="'+(new String(b)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.Ellipse=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c){return b.call(this,c,null,null)||this}__extends(a,b);a.prototype.handle=function(c,d){return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.DelRow=h;h.__class="com.mxgraph.io.vsdx.geometry.DelRow"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k,n,q,t){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;c.c=q;c.d=t;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){c=d.getHeight();var f=d.getWidth(),k=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=c-d;var n=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),+q=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();q=c-q;var t=this.c*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.d*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.abs(n-k);q=Math.abs(q-d);q=Math.sqrt(n*n+q*q);t=Math.abs(t-k);A=Math.abs(c-A-d);k=100*k/f;A=Math.round(100*Math.sqrt(t*t+A*A)/c/2*100)/100;f=Math.round(100*q/f/2*100)/100;t=Math.round(100*(k-2*f))/100;k=Math.round(100*(k+2*f))/100;c=Math.round(100*d/c*100)/100;return'<move x="'+(new String(t)).toString()++'" y="'+(new String(c)).toString()+'"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(A)).toString()+'" x="'+(new String(k)).toString()+'" y="'+(new String(c)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(A)).toString()+'" x="'+(new String(t)).toString()+'" y="'+(new String(c)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.Ellipse=h;h.__class="com.mxgraph.io.vsdx.geometry.Ellipse"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var f=d.getHeight(),k=d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=f-n;var q=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),-t=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.c,C=this.d;b=100*b/k;n=100*n/f;var I=d.getLastX()*k/100,Q=d.getLastY()*f/100,K=b*k/100,L=n*f/100,S=f-t,R=-A;A=Math.sqrt(I*I+Q*Q)*Math.cos(Math.atan2(Q,I)-R);t=Math.sqrt(I*I+Q*Q)*Math.sin(Math.atan2(Q,I)-R);var H=Math.sqrt(K*K+L*L)*Math.cos(Math.atan2(L,K)-R),N=Math.sqrt(K*K+L*L)*Math.sin(Math.atan2(L,K)-R),J=Math.sqrt(q*q+S*S)*Math.cos(Math.atan2(S,q)-R),M=Math.sqrt(q*q+S*S)*Math.sin(Math.atan2(S,q)-R),T=((A-H)*(A+H)*(N-M)-(H-J)*-(H+J)*(t-N)+C*C*(t-N)*(N-M)*(t-M))/(2*((A-H)*(N-M)-(H-J)*(t-N))),ca=((A-H)*(H-J)*(A-J)/(C*C)+(H-J)*(t-N)*(t+N)-(A-H)*(N-M)*(N+M))/(2*((H-J)*(t-N)-(A-H)*(N-M))),V=A-T,P=t-ca;V=Math.sqrt(V*V+P*P*C*C);C=V/C;R=180*R/Math.PI;b=Math.round(100*b)/100;n=Math.round(100*n)/100;V=Math.round(100*V/k*100)/100;C=Math.round(100*C/f*100)/100;R=Math.round(100*R)/100;f=0<(K-I)*(S-Q)-(L-Q)*(q-I)?"0":"1";k="0";g.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(T,ca,A,t,H,N,J,M)&&(k="1");d.setLastX(b);d.setLastY(n);return'<arc rx="'+-(new String(V)).toString()+'" ry="'+(new String(C)).toString()+'" x="'+(new String(b)).toString()+'" y="'+(new String(n)).toString()+'" x-axis-rotation="'+(new String(R)).toString()+'" large-arc-flag="'+k+'" sweep-flag="'+f+'"/>'}return""};a.prototype.isReflexAngle=function(b,d,f,k,n,q,t,A){f-=b;k-=d;q-=d;n=t-b;A-=d;d=b=0;f=180*(Math.atan2(k,f)-Math.atan2(d,b))/Math.PI;n=180*(Math.atan2(q,n)-Math.atan2(d,b))/Math.PI;b=180*(Math.atan2(A,t)-Math.atan2(d,b))/Math.PI;f=(f-b)%360;n=(n-b)%360;180<f?f-=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k,n,q,t){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;c.c=q;c.d=t;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var f=d.getHeight(),k=d.getWidth();c=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=f-n;var q=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),+t=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.c,C=this.d;c=100*c/k;n=100*n/f;var I=d.getLastX()*k/100,Q=d.getLastY()*f/100,K=c*k/100,L=n*f/100,S=f-t,R=-A;A=Math.sqrt(I*I+Q*Q)*Math.cos(Math.atan2(Q,I)-R);t=Math.sqrt(I*I+Q*Q)*Math.sin(Math.atan2(Q,I)-R);var H=Math.sqrt(K*K+L*L)*Math.cos(Math.atan2(L,K)-R),N=Math.sqrt(K*K+L*L)*Math.sin(Math.atan2(L,K)-R),J=Math.sqrt(q*q+S*S)*Math.cos(Math.atan2(S,q)-R),M=Math.sqrt(q*q+S*S)*Math.sin(Math.atan2(S,q)-R),T=((A-H)*(A+H)*(N-M)-(H-J)*+(H+J)*(t-N)+C*C*(t-N)*(N-M)*(t-M))/(2*((A-H)*(N-M)-(H-J)*(t-N))),ca=((A-H)*(H-J)*(A-J)/(C*C)+(H-J)*(t-N)*(t+N)-(A-H)*(N-M)*(N+M))/(2*((H-J)*(t-N)-(A-H)*(N-M))),V=A-T,P=t-ca;V=Math.sqrt(V*V+P*P*C*C);C=V/C;R=180*R/Math.PI;c=Math.round(100*c)/100;n=Math.round(100*n)/100;V=Math.round(100*V/k*100)/100;C=Math.round(100*C/f*100)/100;R=Math.round(100*R)/100;f=0<(K-I)*(S-Q)-(L-Q)*(q-I)?"0":"1";k="0";g.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(T,ca,A,t,H,N,J,M)&&(k="1");d.setLastX(c);d.setLastY(n);return'<arc rx="'++(new String(V)).toString()+'" ry="'+(new String(C)).toString()+'" x="'+(new String(c)).toString()+'" y="'+(new String(n)).toString()+'" x-axis-rotation="'+(new String(R)).toString()+'" large-arc-flag="'+k+'" sweep-flag="'+f+'"/>'}return""};a.prototype.isReflexAngle=function(c,d,f,k,n,q,t,A){f-=c;k-=d;q-=d;n=t-c;A-=d;d=c=0;f=180*(Math.atan2(k,f)-Math.atan2(d,c))/Math.PI;n=180*(Math.atan2(q,n)-Math.atan2(d,c))/Math.PI;c=180*(Math.atan2(A,t)-Math.atan2(d,c))/Math.PI;f=(f-c)%360;n=(n-c)%360;180<f?f-=360:-180>f&&(f+=360);180<n?n-=360:-180>n&&(n+=360);return(0<f&&0>n||0>f&&0<n)&&180<Math.abs(f-n)?!0:!1};return a}(g.mxgraph.io.vsdx.geometry.Row);m.EllipticalArcTo=h;h.__class="com.mxgraph.io.vsdx.geometry.EllipticalArcTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;return b}__extends(a,c);a.prototype.handle=function(b,d){return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.InfiniteLine=h;h.__class="com.mxgraph.io.vsdx.geometry.InfiniteLine"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y,n=d.getHeight(),q=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/q*100)/100;k=Math.round(100*(100-100*k/n))/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'++(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k,n){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;return c}__extends(a,b);a.prototype.handle=function(c,d){return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.InfiniteLine=h;h.__class="com.mxgraph.io.vsdx.geometry.InfiniteLine"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f){return b.call(this,c,d,f)||this}__extends(a,b);a.prototype.handle=function(c,d){var f=c.x,k=c.y,n=d.getHeight(),q=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/q*100)/100;k=Math.round(100*(100-100*k/n))/100;c.x=f;c.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.LineTo=h;h.__class="com.mxgraph.io.vsdx.geometry.LineTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y,n=d.getHeight(),q=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/q*100)/100;k=Math.round(100*(100-100*k/n))/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);d.setLastMoveX(f);+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f){return b.call(this,c,d,f)||this}__extends(a,b);a.prototype.handle=function(c,d){var f=c.x,k=c.y,n=d.getHeight(),q=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/q*100)/100;k=Math.round(100*(100-100*k/n))/100;c.x=f;c.y=k;d.setLastX(f);d.setLastY(k);d.setLastMoveX(f);d.setLastMoveY(k);return'<move x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.MoveTo=h;h.__class="com.mxgraph.io.vsdx.geometry.MoveTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t,A){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;b.formulaE=A;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.formulaE){var f=d.getHeight(),k=d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),q=this.formulaE.split("NURBS(").join("");q=q.split(")").join("");-q=new a.Nurbs(this,q,k,f);if(2<=q.getSize()){var t=q.getX(0),A=q.getY(0),C=q.getX(1),I=q.getY(1);b=Math.round(100*b/k*100)/100;n=Math.round(100*(100-100*n/f))/100;t=Math.round(100*t)/100;A=Math.round(100*A)/100;C=Math.round(100*C)/100;I=Math.round(100*I)/100;d.setLastX(b);d.setLastY(n);if(3===q.getDegree()&&q.isOrderedByThree(this.getA())){d=[];f=[];k=[];A=q.getSize();for(t=0;t<A-1;t+=3)d.push(new mxPoint(q.getX(t),q.getY(t))),f.push(new mxPoint(q.getX(t+1),q.getY(t+1))),t<A-2?k.push(new mxPoint(q.getX(t+-2),q.getY(t+2))):k.push(new mxPoint(b,n));b="";for(t=0;t<d.length;t++)b+='<curve x1="'+d[t].x+'" y1="'+d[t].y+'" x2="'+f[t].x+'" y2="'+f[t].y+'" x3="'+k[t].x+'" y3="'+k[t].y+'"/>\n';return b}return'<curve x1="'+(new String(t)).toString()+'" y1="'+(new String(A)).toString()+'" x2="'+(new String(C)).toString()+'" y2="'+(new String(I)).toString()+'" x3="'+(new String(b)).toString()+'" y3="'+(new String(n)).toString()+'"/>'}}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.NURBSTo=h;h.__class="com.mxgraph.io.vsdx.geometry.NURBSTo";-(function(c){var a=function(){function b(d,f,k,n){this.__parent=d;this.nurbsValues=[];d=f.split(/\s*,\s*/).slice(0);for(f=0;f<d.length;f++)3<f&&0===f%4?this.nurbsValues.push(100*parseFloat(d[f])):3<f&&1===f%4?this.nurbsValues.push(100-100*parseFloat(d[f])):this.nurbsValues.push(parseFloat(d[f]))}b.prototype.isOrderedByThree=function(d){for(var f=0;f+2<this.getSize();f+=3){var k=Math.round(100*this.getKnot(f))/100,n=Math.round(100*this.getKnot(f+1))/100,q=Math.round(100*this.getKnot(f+2))/100;if(k!==-n||k!==q||n!==q)return!1}f=Math.round(10*this.getKnot(this.getSize()-2))/10;k=Math.round(10*this.getKnot(this.getSize()-1))/10;d=Math.round(10*d)/10;return f!==k||f!==d||k!==d?!1:!0};b.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};b.prototype.getKnotLast=function(){return this.nurbsValues[0]};b.prototype.getDegree=function(){return this.nurbsValues[1]};b.prototype.getXType=function(){return this.nurbsValues[2]};b.prototype.getYType=function(){return this.nurbsValues[3]};b.prototype.getX=-function(d){return this.nurbsValues[4*(d+1)]};b.prototype.getY=function(d){return this.nurbsValues[4*(d+1)+1]};b.prototype.getKnot=function(d){return this.nurbsValues[4*(d+1)+2]};b.prototype.getWeight=function(d){return this.nurbsValues[4*(d+1)+3]};return b}();c.Nurbs=a;a.__class="com.mxgraph.io.vsdx.geometry.NURBSTo.Nurbs"})(h=m.NURBSTo||(m.NURBSTo={}))})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k){b=c.call(this,b,d,f)||this;b.formulaA=k;return b}__extends(a,c);a.prototype.handle=function(b,d){b="";if(null!=this.x&&null!=this.y&&null!=this.formulaA){var f=d.getHeight(),k=d.getWidth(),n=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),q=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.round(100*n/k*100)/100;q=Math.round(100*(100-100*q/f))/100;var t=this.formulaA.replace(RegExp("\\s",+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k,n,q,t,A){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;c.c=q;c.d=t;c.formulaE=A;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.formulaE){var f=d.getHeight(),k=d.getWidth();c=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),q=this.formulaE.split("NURBS(").join("");q=q.split(")").join("");+q=new a.Nurbs(this,q,k,f);if(2<=q.getSize()){var t=q.getX(0),A=q.getY(0),C=q.getX(1),I=q.getY(1);c=Math.round(100*c/k*100)/100;n=Math.round(100*(100-100*n/f))/100;t=Math.round(100*t)/100;A=Math.round(100*A)/100;C=Math.round(100*C)/100;I=Math.round(100*I)/100;d.setLastX(c);d.setLastY(n);if(3===q.getDegree()&&q.isOrderedByThree(this.getA())){d=[];f=[];k=[];A=q.getSize();for(t=0;t<A-1;t+=3)d.push(new mxPoint(q.getX(t),q.getY(t))),f.push(new mxPoint(q.getX(t+1),q.getY(t+1))),t<A-2?k.push(new mxPoint(q.getX(t++2),q.getY(t+2))):k.push(new mxPoint(c,n));c="";for(t=0;t<d.length;t++)c+='<curve x1="'+d[t].x+'" y1="'+d[t].y+'" x2="'+f[t].x+'" y2="'+f[t].y+'" x3="'+k[t].x+'" y3="'+k[t].y+'"/>\n';return c}return'<curve x1="'+(new String(t)).toString()+'" y1="'+(new String(A)).toString()+'" x2="'+(new String(C)).toString()+'" y2="'+(new String(I)).toString()+'" x3="'+(new String(c)).toString()+'" y3="'+(new String(n)).toString()+'"/>'}}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.NURBSTo=h;h.__class="com.mxgraph.io.vsdx.geometry.NURBSTo";+(function(b){var a=function(){function c(d,f,k,n){this.__parent=d;this.nurbsValues=[];d=f.split(/\s*,\s*/).slice(0);for(f=0;f<d.length;f++)3<f&&0===f%4?this.nurbsValues.push(100*parseFloat(d[f])):3<f&&1===f%4?this.nurbsValues.push(100-100*parseFloat(d[f])):this.nurbsValues.push(parseFloat(d[f]))}c.prototype.isOrderedByThree=function(d){for(var f=0;f+2<this.getSize();f+=3){var k=Math.round(100*this.getKnot(f))/100,n=Math.round(100*this.getKnot(f+1))/100,q=Math.round(100*this.getKnot(f+2))/100;if(k!==+n||k!==q||n!==q)return!1}f=Math.round(10*this.getKnot(this.getSize()-2))/10;k=Math.round(10*this.getKnot(this.getSize()-1))/10;d=Math.round(10*d)/10;return f!==k||f!==d||k!==d?!1:!0};c.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};c.prototype.getKnotLast=function(){return this.nurbsValues[0]};c.prototype.getDegree=function(){return this.nurbsValues[1]};c.prototype.getXType=function(){return this.nurbsValues[2]};c.prototype.getYType=function(){return this.nurbsValues[3]};c.prototype.getX=+function(d){return this.nurbsValues[4*(d+1)]};c.prototype.getY=function(d){return this.nurbsValues[4*(d+1)+1]};c.prototype.getKnot=function(d){return this.nurbsValues[4*(d+1)+2]};c.prototype.getWeight=function(d){return this.nurbsValues[4*(d+1)+3]};return c}();b.Nurbs=a;a.__class="com.mxgraph.io.vsdx.geometry.NURBSTo.Nurbs"})(h=m.NURBSTo||(m.NURBSTo={}))})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k){c=b.call(this,c,d,f)||this;c.formulaA=k;return c}__extends(a,b);a.prototype.handle=function(c,d){c="";if(null!=this.x&&null!=this.y&&null!=this.formulaA){var f=d.getHeight(),k=d.getWidth(),n=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),q=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.round(100*n/k*100)/100;q=Math.round(100*(100-100*q/f))/100;var t=this.formulaA.replace(RegExp("\\s","g"),"").toLowerCase().replace(RegExp("polyline\\(","g"),"").replace(RegExp("\\)","g"),"");var A=t&&t.equals?t.equals("inh"):"inh"===t;if(A)throw Object.defineProperty(Error(),"__classes",{configurable:!0,value:["java.lang.Throwable","java.lang.Object","java.lang.RuntimeException","java.lang.IllegalArgumentException","java.lang.Exception"]});t=t.split(",").slice(0).slice(0);A=parseFloat(t.splice(0,1));parseFloat(t.splice(0,1));for(var C,I;0<t.length;)C=parseFloat(t.splice(0,1))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),-I=parseFloat(t.splice(0,1))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),1===A&&(C=100*C/k),1===A&&(I=100*I/f),I=100-I,C=Math.round(100*C)/100,I=Math.round(100*I)/100,d.setLastX(C),d.setLastY(I),b+='<line x="'+(new String(C)).toString()+'" y="'+(new String(I)).toString()+'"/>';b+='<line x="'+(new String(n)).toString()+'" y="'+(new String(q)).toString()+'"/>';d.getLastMoveX()===n&&d.getLastMoveY()===q&&(b+="<close/>")}return b};return a}(g.mxgraph.io.vsdx.geometry.Row);m.PolylineTo=h;h.__class=+I=parseFloat(t.splice(0,1))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),1===A&&(C=100*C/k),1===A&&(I=100*I/f),I=100-I,C=Math.round(100*C)/100,I=Math.round(100*I)/100,d.setLastX(C),d.setLastY(I),c+='<line x="'+(new String(C)).toString()+'" y="'+(new String(I)).toString()+'"/>';c+='<line x="'+(new String(n)).toString()+'" y="'+(new String(q)).toString()+'"/>';d.getLastMoveX()===n&&d.getLastMoveY()===q&&(c+="<close/>")}return c};return a}(g.mxgraph.io.vsdx.geometry.Row);m.PolylineTo=h;h.__class="com.mxgraph.io.vsdx.geometry.PolylineTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){b=100*this.x;var f=100-100*this.y,k=100*this.a,n=100-100*this.b,q=100*this.c,t=100-100*this.d;b=Math.round(100*b)/100;f=Math.round(100*f)/100;k=Math.round(100*k)/100;n=Math.round(100*n)/100;q=Math.round(100*-q)/100;t=Math.round(100*t)/100;d.setLastX(b);d.setLastY(f);return'<curve x1="'+(new String(k)).toString()+'" y1="'+(new String(n)).toString()+'" x2="'+(new String(q)).toString()+'" y2="'+(new String(t)).toString()+'" x3="'+(new String(b)).toString()+'" y3="'+(new String(f)).toString()+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelCubBezTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelCubBezTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k,n,q,t){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;c.c=q;c.d=t;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){c=100*this.x;var f=100-100*this.y,k=100*this.a,n=100-100*this.b,q=100*this.c,t=100-100*this.d;c=Math.round(100*c)/100;f=Math.round(100*f)/100;k=Math.round(100*k)/100;n=Math.round(100*n)/100;q=Math.round(100*+q)/100;t=Math.round(100*t)/100;d.setLastX(c);d.setLastY(f);return'<curve x1="'+(new String(k)).toString()+'" y1="'+(new String(n)).toString()+'" x2="'+(new String(q)).toString()+'" y2="'+(new String(t)).toString()+'" x3="'+(new String(c)).toString()+'" y3="'+(new String(f)).toString()+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelCubBezTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelCubBezTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y;null!=this.x&&null!=this.y&&(f=100*this.x,k=100-100*this.y);f=Math.round(100*f)/100;k=Math.round(100*k)/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelLineTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelLineTo"})(B.geometry||+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f){return b.call(this,c,d,f)||this}__extends(a,b);a.prototype.handle=function(c,d){var f=c.x,k=c.y;null!=this.x&&null!=this.y&&(f=100*this.x,k=100-100*this.y);f=Math.round(100*f)/100;k=Math.round(100*k)/100;c.x=f;c.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelLineTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelLineTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y;null!=this.x&&null!=this.y&&(f=100*this.x,k=100-100*this.y);f=Math.round(100*f)/100;k=Math.round(100*k)/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);d.setLastMoveX(f);d.setLastMoveY(k);return'<move x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f){return b.call(this,c,d,f)||this}__extends(a,b);a.prototype.handle=function(c,d){var f=c.x,k=c.y;null!=this.x&&null!=this.y&&(f=100*this.x,k=100-100*this.y);f=Math.round(100*f)/100;k=Math.round(100*k)/100;c.x=f;c.y=k;d.setLastX(f);d.setLastY(k);d.setLastMoveX(f);d.setLastMoveY(k);return'<move x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelMoveTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelMoveTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b){b=100*this.x;var f=100-100*this.y,k=100*this.a,n=100-100*this.b;b=Math.round(100*b)/100;f=Math.round(100*f)/100;k=Math.round(100*k)/100;n=Math.round(100*n)/100;d.setLastX(b);d.setLastY(f);return'<quad x1="'+(new String(k)).toString()+'" y1="'+-(new String(n)).toString()+'" x2="'+(new String(b)).toString()+'" y2="'+(new String(f)).toString()+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelQuadBezTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelQuadBezTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k){b=c.call(this,b,d,f)||this;b.a=k;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a){b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();b=Math.round(100*b)/100;f=Math.round(100*(100-f))/100;d.setLastX(b);d.setLastY(f)}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k,n){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b){c=100*this.x;var f=100-100*this.y,k=100*this.a,n=100-100*this.b;c=Math.round(100*c)/100;f=Math.round(100*f)/100;k=Math.round(100*k)/100;n=Math.round(100*n)/100;d.setLastX(c);d.setLastY(f);return'<quad x1="'+(new String(k)).toString()+'" y1="'++(new String(n)).toString()+'" x2="'+(new String(c)).toString()+'" y2="'+(new String(f)).toString()+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelQuadBezTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelQuadBezTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k){c=b.call(this,c,d,f)||this;c.a=k;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a){c=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();c=Math.round(100*c)/100;f=Math.round(100*(100-f))/100;d.setLastX(c);d.setLastY(f)}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.SplineKnot=h;h.__class="com.mxgraph.io.vsdx.geometry.SplineKnot"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){d.getHeight();d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d.setLastKnot(this.c);b=Math.round(100*b)/-100;f=Math.round(100*(100-f))/100;d.getLastX();d.getLastY();d.setLastX(b);d.setLastY(f);return"<curve "}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.SplineStart=h;h.__class="com.mxgraph.io.vsdx.geometry.SplineStart"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a){this.cellElements={};this.sections={};this.styleParents={};this.style=this.pm=this.Id=this.shape=null;this.shape=c;this.pm=a.getPropertiesManager();c=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID);try{this.Id=null!=c&&0!==c.length?parseFloat(c):-1}catch(b){this.Id=-1}this.cacheCells(a);this.stylesheetRefs(a)}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0(),+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k,n,q,t){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;c.c=q;c.d=t;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){d.getHeight();d.getWidth();c=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d.setLastKnot(this.c);c=Math.round(100*c)/+100;f=Math.round(100*(100-f))/100;d.getLastX();d.getLastY();d.setLastX(c);d.setLastY(f);return"<curve "}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.SplineStart=h;h.__class="com.mxgraph.io.vsdx.geometry.SplineStart"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(b,a){this.cellElements={};this.sections={};this.styleParents={};this.style=this.pm=this.Id=this.shape=null;this.shape=b;this.pm=a.getPropertiesManager();b=b.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID);try{this.Id=null!=b&&0!==b.length?parseFloat(b):-1}catch(c){this.Id=-1}this.cacheCells(a);this.stylesheetRefs(a)}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0(),h.__static_initializer_1())};h.styleTypes_$LI$=function(){h.__static_initialize();null==h.styleTypes&&(h.styleTypes={});return h.styleTypes};h.__static_initializer_0=function(){h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND_TRANS]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND_TRANS]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$().QuickStyleFillColor=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$().QuickStyleFillMatrix=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$().QuickStyleLineColor=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$().QuickStyleLineMatrix=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.BOTTOM_MARGIN]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.LEFT_MARGIN]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.RIGHT_MARGIN]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.TOP_MARGIN]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER]=-g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$().QuickStyleFontColor=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$().QuickStyleFontMatrix=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE};h.prototype.getTheme=function(){return null};h.prototype.getQuickStyleVals=function(){return null};h.prototype.isVertex=function(){return!1};h.prototype.styleDebug=function(c){h.vsdxStyleDebug&&console.info(c)};h.prototype.stylesheetRefs=function(c){this.styleParents[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE]=-c.getStylesheet(this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE));this.styleParents[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE]=c.getStylesheet(this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE));this.styleParents[g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE]=c.getStylesheet(this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE));this.style=c.getStylesheet("0")};h.prototype.cacheCells=function(c){if(null!=this.shape){var a=this.shape.childNodes;-if(null!=a)for(a=a.item(0);null!=a;)null!=a&&1==a.nodeType&&this.parseShapeElem(a,c),a=a.nextSibling}};h.prototype.parseShapeElem=function(c,a){a=c.nodeName;(function(b,d){return b&&b.equals?b.equals(d):b===d})(a,"Cell")?this.cellElements[c.getAttribute("N")]=c:function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Section")&&this.parseSection(c)};h.prototype.parseSection=function(c){var a=new g.mxgraph.io.vsdx.Section(c);this.sections[c.getAttribute("N")]=a};h.prototype.hasProperty=function(c,a){return this.cellElements.hasOwnProperty(a)};-h.prototype.getValue=function(c,a){return null!=c?c.getAttribute("V")||"":a};h.prototype.getValueAsDouble=function(c,a){if(null!=c){var b=c.getAttribute("V");if(null!=b){if(function(f,k){return f&&f.equals?f.equals(k):f===k}(b,"Themed"))return 0;try{var d=parseFloat(b);(function(f,k){return f&&f.equals?f.equals(k):f===k})(c.getAttribute("U"),"PT")&&(d*=g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());return Math.round(100*d)/100}catch(f){}}}return a};h.prototype.getScreenNumericalValue$org_w3c_dom_Element$double=-function(c,a){if(null!=c&&(c=c.getAttribute("V"),null!=c))try{var b=parseFloat(c);return this.getScreenNumericalValue$double(b)}catch(d){}return a};h.prototype.getScreenNumericalValue=function(c,a){if((null==c||1!=c.nodeType)&&null!==c||"number"!==typeof a&&null!==a){if("number"!==typeof c&&null!==c||void 0!==a)throw Error("invalid overload");return this.getScreenNumericalValue$double(c)}return this.getScreenNumericalValue$org_w3c_dom_Element$double(c,a)};h.prototype.getScreenNumericalValue$double=-function(c){return c*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()};h.prototype.getAttribute=function(c,a,b){var d=this.cellElements;c=d[c]?d[c]:null;null!=c&&(b=c.getAttribute(a)||"");return b};h.prototype.getChildValues=function(c,a){var b={};for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType){var d=c,f;if((f=d.nodeName)&&f.equals?f.equals("Cell"):"Cell"===f){f=d.getAttribute("N")||"";var k=d.getAttribute("V")||""}else f=d.nodeName,k=d.textContent;if(null!=a){var n=a[f]?a[f]:null;null!=-n&&(k=d.getAttribute(n)||"")}b[f]=k}c=c.nextSibling}return b};h.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(c,a,b){var d=function(q,t){return q[t]?q[t]:null}(this.sections,b),f=null,k=!1;null!=d&&(f=d.getIndexedCell(a,c));if(null!=f){d=f.getAttribute("F");var n=f.getAttribute("V");if(null!=d&&null!=n)if(function(q,t){return q&&q.equals?q.equals(t):q===t}(d,"Inh")&&function(q,t){return q&&q.equals?q.equals(t):q===t}(n,"Themed"))k=!0;else if(function(q,t){return q&&-q.equals?q.equals(t):q===t}(d,"THEMEVAL()")&&function(q,t){return q&&q.equals?q.equals(t):q===t}(n,"Themed")&&null!=this.style){if(function(q,t){return q&&q.equals?q.equals(t):q===t}(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR,c))return f;d=this.style.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,a,b);if(null!=d)return d}}if(null==f||k)if(k=function(q,t){return q[t]?q[t]:null}(h.styleTypes_$LI$(),b),k=function(q,t){return q[t]?q[t]:null}(this.styleParents,k),null!=k&&(c=k.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,-a,b),null!=c))return c;return f};h.prototype.getCellElement=function(c,a,b){if("string"!==typeof c&&null!==c||"string"!==typeof a&&null!==a||"string"!==typeof b&&null!==b){if("string"!==typeof c&&null!==c||void 0!==a||void 0!==b)throw Error("invalid overload");return this.getCellElement$java_lang_String(c)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,a,b)};h.prototype.getCellElement$java_lang_String=function(c){var a=function(k,n){return k[n]?k[n]:null}(this.cellElements,-c),b=!1;if(null!=a){var d=a.getAttribute("F"),f=a.getAttribute("V");if(null!=d&&null!=f)if(function(k,n){return k&&k.equals?k.equals(n):k===n}(d,"Inh")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f,"Themed"))b=!0;else if(-1!=d.indexOf("THEMEVAL()")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f,"Themed")&&null!=this.style){if(function(k,n){return k&&k.equals?k.equals(n):k===n}("FillForegnd",c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR,-c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN,c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE,c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE,c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW,c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW,-c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT,c))return a;d=this.style.getCellElement$java_lang_String(c);if(null!=d)return d}}if(null==a||b)if(b=function(k,n){return k[n]?k[n]:null}(h.styleTypes_$LI$(),c),b=function(k,n){return k[n]?k[n]:null}(this.styleParents,b),null!=b&&(c=b.getCellElement$java_lang_String(c),null!=c))return c;return a};h.prototype.getStrokeColor=function(){var c="";(function(a,b){return a&&a.equals?a.equals(b):a===b})(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),-"1"),"0")?c="none":(c=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR)),function(a,b){return a&&a.equals?a.equals(b):a===b}("Themed",c)&&(c=this.getTheme(),c=null!=c?(this.isVertex()?c.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):c.getConnLineColor(this.getQuickStyleVals())).toHexStr():""));return c};h.prototype.getFillColor=function(){if(function(b,d){return b&&b.equals?b.equals(d):b===d}("1",this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),-"0"))){var c=function(b,d){return b[d]?b[d]:null}(this.sections,"FillGradient");if(null!=c&&(c=this.getColor(c.getIndexedCell("0","GradientStopColor")),null!=c&&0!==c.length))return c}c=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND));(function(b,d){return b&&b.equals?b.equals(d):b===d})("Themed",c)&&(c=this.getTheme(),null!=c?(c=c.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()),c=c.toHexStr()):c="#FFFFFF");var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),-"0");return null!=a&&function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")?"none":c};h.prototype.getColor=function(c){c=this.getValue(c,"");(function(a,b){return a&&a.equals?a.equals(b):a===b})("Themed",c)||function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(c,"#")||(c=this.pm.getColor(c));return c};h.prototype.getTextBkgndColor=function(c){c=this.getValue(c,"");return function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(c,"#")?c:function(a,b){return a&&a.equals?-a.equals(b):a===b}(c,"0")||function(a,b){return a&&a.equals?a.equals(b):a===b}(c,"255")||0===c.length?"none":this.pm.getColor((new String(parseInt(c)-1)).toString())};h.prototype.getLineWeight=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),0)};h.prototype.getStrokeTransparency=function(){return this.getValueAsDouble(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS),-0)};h.prototype.getNameU=function(){return this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||""};h.prototype.getName=function(){return this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME)||""};h.prototype.getUniqueID=function(){return this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.UNIQUE_ID)||""};h.prototype.getId=function(){return this.Id};h.prototype.getTextColor=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR,-c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);c=this.getValue(c,"#000000");(function(a,b){return a&&a.equals?a.equals(b):a===b})("Themed",c)?(c=this.getTheme(),c=null!=c?(this.isVertex()?c.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):c.getConnFontColor(this.getQuickStyleVals())).toHexStr():"#000000"):function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(c,"#")||(c=this.pm.getColor(c));return c};h.prototype.getTextTopMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TOP_MARGIN),+g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$().QuickStyleFontColor=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$().QuickStyleFontMatrix=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE};h.prototype.getTheme=function(){return null};h.prototype.getQuickStyleVals=function(){return null};h.prototype.isVertex=function(){return!1};h.prototype.styleDebug=function(b){h.vsdxStyleDebug&&console.info(b)};h.prototype.stylesheetRefs=function(b){this.styleParents[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE]=+b.getStylesheet(this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE));this.styleParents[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE]=b.getStylesheet(this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE));this.styleParents[g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE]=b.getStylesheet(this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE));this.style=b.getStylesheet("0")};h.prototype.cacheCells=function(b){if(null!=this.shape){var a=this.shape.childNodes;+if(null!=a)for(a=a.item(0);null!=a;)null!=a&&1==a.nodeType&&this.parseShapeElem(a,b),a=a.nextSibling}};h.prototype.parseShapeElem=function(b,a){a=b.nodeName;(function(c,d){return c&&c.equals?c.equals(d):c===d})(a,"Cell")?this.cellElements[b.getAttribute("N")]=b:function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"Section")&&this.parseSection(b)};h.prototype.parseSection=function(b){var a=new g.mxgraph.io.vsdx.Section(b);this.sections[b.getAttribute("N")]=a};h.prototype.hasProperty=function(b,a){return this.cellElements.hasOwnProperty(a)};+h.prototype.getValue=function(b,a){return null!=b?b.getAttribute("V")||"":a};h.prototype.getValueAsDouble=function(b,a){if(null!=b){var c=b.getAttribute("V");if(null!=c){if(function(f,k){return f&&f.equals?f.equals(k):f===k}(c,"Themed"))return 0;try{var d=parseFloat(c);(function(f,k){return f&&f.equals?f.equals(k):f===k})(b.getAttribute("U"),"PT")&&(d*=g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());return Math.round(100*d)/100}catch(f){}}}return a};h.prototype.getScreenNumericalValue$org_w3c_dom_Element$double=+function(b,a){if(null!=b&&(b=b.getAttribute("V"),null!=b))try{var c=parseFloat(b);return this.getScreenNumericalValue$double(c)}catch(d){}return a};h.prototype.getScreenNumericalValue=function(b,a){if((null==b||1!=b.nodeType)&&null!==b||"number"!==typeof a&&null!==a){if("number"!==typeof b&&null!==b||void 0!==a)throw Error("invalid overload");return this.getScreenNumericalValue$double(b)}return this.getScreenNumericalValue$org_w3c_dom_Element$double(b,a)};h.prototype.getScreenNumericalValue$double=+function(b){return b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()};h.prototype.getAttribute=function(b,a,c){var d=this.cellElements;b=d[b]?d[b]:null;null!=b&&(c=b.getAttribute(a)||"");return c};h.prototype.getChildValues=function(b,a){var c={};for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType){var d=b,f;if((f=d.nodeName)&&f.equals?f.equals("Cell"):"Cell"===f){f=d.getAttribute("N")||"";var k=d.getAttribute("V")||""}else f=d.nodeName,k=d.textContent;if(null!=a){var n=a[f]?a[f]:null;null!=+n&&(k=d.getAttribute(n)||"")}c[f]=k}b=b.nextSibling}return c};h.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(b,a,c){var d=function(q,t){return q[t]?q[t]:null}(this.sections,c),f=null,k=!1;null!=d&&(f=d.getIndexedCell(a,b));if(null!=f){d=f.getAttribute("F");var n=f.getAttribute("V");if(null!=d&&null!=n)if(function(q,t){return q&&q.equals?q.equals(t):q===t}(d,"Inh")&&function(q,t){return q&&q.equals?q.equals(t):q===t}(n,"Themed"))k=!0;else if(function(q,t){return q&&+q.equals?q.equals(t):q===t}(d,"THEMEVAL()")&&function(q,t){return q&&q.equals?q.equals(t):q===t}(n,"Themed")&&null!=this.style){if(function(q,t){return q&&q.equals?q.equals(t):q===t}(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR,b))return f;d=this.style.getCellElement$java_lang_String$java_lang_String$java_lang_String(b,a,c);if(null!=d)return d}}if(null==f||k)if(k=function(q,t){return q[t]?q[t]:null}(h.styleTypes_$LI$(),c),k=function(q,t){return q[t]?q[t]:null}(this.styleParents,k),null!=k&&(b=k.getCellElement$java_lang_String$java_lang_String$java_lang_String(b,+a,c),null!=b))return b;return f};h.prototype.getCellElement=function(b,a,c){if("string"!==typeof b&&null!==b||"string"!==typeof a&&null!==a||"string"!==typeof c&&null!==c){if("string"!==typeof b&&null!==b||void 0!==a||void 0!==c)throw Error("invalid overload");return this.getCellElement$java_lang_String(b)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(b,a,c)};h.prototype.getCellElement$java_lang_String=function(b){var a=function(k,n){return k[n]?k[n]:null}(this.cellElements,+b),c=!1;if(null!=a){var d=a.getAttribute("F"),f=a.getAttribute("V");if(null!=d&&null!=f)if(function(k,n){return k&&k.equals?k.equals(n):k===n}(d,"Inh")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f,"Themed"))c=!0;else if(-1!=d.indexOf("THEMEVAL()")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f,"Themed")&&null!=this.style){if(function(k,n){return k&&k.equals?k.equals(n):k===n}("FillForegnd",b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR,+b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN,b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE,b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE,b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW,b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW,+b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT,b))return a;d=this.style.getCellElement$java_lang_String(b);if(null!=d)return d}}if(null==a||c)if(c=function(k,n){return k[n]?k[n]:null}(h.styleTypes_$LI$(),b),c=function(k,n){return k[n]?k[n]:null}(this.styleParents,c),null!=c&&(b=c.getCellElement$java_lang_String(b),null!=b))return b;return a};h.prototype.getStrokeColor=function(){var b="";(function(a,c){return a&&a.equals?a.equals(c):a===c})(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),+"1"),"0")?b="none":(b=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR)),function(a,c){return a&&a.equals?a.equals(c):a===c}("Themed",b)&&(b=this.getTheme(),b=null!=b?(this.isVertex()?b.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):b.getConnLineColor(this.getQuickStyleVals())).toHexStr():""));return b};h.prototype.getFillColor=function(){if(function(c,d){return c&&c.equals?c.equals(d):c===d}("1",this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),+"0"))){var b=function(c,d){return c[d]?c[d]:null}(this.sections,"FillGradient");if(null!=b&&(b=this.getColor(b.getIndexedCell("0","GradientStopColor")),null!=b&&0!==b.length))return b}b=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND));(function(c,d){return c&&c.equals?c.equals(d):c===d})("Themed",b)&&(b=this.getTheme(),null!=b?(b=b.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()),b=b.toHexStr()):b="#FFFFFF");var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),+"0");return null!=a&&function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0")?"none":b};h.prototype.getColor=function(b){b=this.getValue(b,"");(function(a,c){return a&&a.equals?a.equals(c):a===c})("Themed",b)||function(a,c,d){void 0===d&&(d=0);return a.substr(d,c.length)===c}(b,"#")||(b=this.pm.getColor(b));return b};h.prototype.getTextBkgndColor=function(b){b=this.getValue(b,"");return function(a,c,d){void 0===d&&(d=0);return a.substr(d,c.length)===c}(b,"#")?b:function(a,c){return a&&a.equals?+a.equals(c):a===c}(b,"0")||function(a,c){return a&&a.equals?a.equals(c):a===c}(b,"255")||0===b.length?"none":this.pm.getColor((new String(parseInt(b)-1)).toString())};h.prototype.getLineWeight=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),0)};h.prototype.getStrokeTransparency=function(){return this.getValueAsDouble(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS),+0)};h.prototype.getNameU=function(){return this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||""};h.prototype.getName=function(){return this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME)||""};h.prototype.getUniqueID=function(){return this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.UNIQUE_ID)||""};h.prototype.getId=function(){return this.Id};h.prototype.getTextColor=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR,+b,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);b=this.getValue(b,"#000000");(function(a,c){return a&&a.equals?a.equals(c):a===c})("Themed",b)?(b=this.getTheme(),b=null!=b?(this.isVertex()?b.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):b.getConnFontColor(this.getQuickStyleVals())).toHexStr():"#000000"):function(a,c,d){void 0===d&&(d=0);return a.substr(d,c.length)===c}(b,"#")||(b=this.pm.getColor(b));return b};h.prototype.getTextTopMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TOP_MARGIN),0)};h.prototype.getTextBottomMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BOTTOM_MARGIN),0)};h.prototype.getTextLeftMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LEFT_MARGIN),0)};h.prototype.getTextRightMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.RIGHT_MARGIN),-0)};h.prototype.getTextStyle=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE,c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(c,"")};h.prototype.getTextFont=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FONT,c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(c,"")};h.prototype.getTextPos=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.POS,-c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(c,"")};h.prototype.getTextStrike=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.STRIKETHRU,c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);c=(c=this.getValue(c,""))&&c.equals?c.equals("1"):"1"===c;return c};h.prototype.getTextCase=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.CASE,c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);-return this.getValue(c,"")};h.prototype.getHorizontalAlign=function(c,a){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HORIZONTAL_ALIGN,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);switch(this.getValue(c,"")){case "0":a=a?"left":mxConstants.ALIGN_LEFT;break;case "2":a=a?"right":mxConstants.ALIGN_RIGHT;break;case "3":case "4":a=a?"justify":mxConstants.ALIGN_CENTER;break;default:a=a?"center":mxConstants.ALIGN_CENTER}return a};h.prototype.getIndentFirst=-function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.INDENT_FIRST,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,0))).toString()};h.prototype.getIndentLeft=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.INDENT_LEFT,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,-0))|0)).toString()};h.prototype.getIndentRight=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.INDENT_RIGHT,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,0))|0)).toString()};h.prototype.getSpBefore=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SPACE_BEFORE,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);-return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,0))|0)).toString()};h.prototype.getSpAfter=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SPACE_AFTER,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,0))|0)).toString()};h.prototype.getSpLine=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SPACE_LINE,-c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);c=this.getValue(c,"");var a=c&&c.equals?c.equals(""):""===c;return a?0:parseFloat(c)};h.prototype.getFlags=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLAGS,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return this.getValue(c,"0")};h.prototype.getLetterSpace=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LETTER_SPACE,-c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,0))).toString()};h.prototype.getBullet=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BULLET,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return this.getValue(c,"0")};h.prototype.getShape=function(){return this.shape};h.prototype.setShape=function(c){this.shape=c};h.lineDashPatterns_$LI$=function(){h.__static_initialize();-null==h.lineDashPatterns&&(h.lineDashPatterns=[]);return h.lineDashPatterns};h.__static_initializer_1=function(){h.lineDashPatterns_$LI$().push([]);h.lineDashPatterns_$LI$().push([]);h.lineDashPatterns_$LI$().push([]);var c=[];c.push(h.DOT);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DASH);c.push(h.SPACE);c.push(h.DOT);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DASH);c.push(h.SPACE);c.push(h.DOT);c.push(h.SPACE);c.push(h.DOT);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);-c=[];c.push(h.DASH);c.push(h.SPACE);c.push(h.DASH);c.push(h.SPACE);c.push(h.DOT);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.LONG_DASH);c.push(h.SPACE);c.push(h.SHORT_DASH);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.LONG_DASH);c.push(h.SPACE);c.push(h.SHORT_DASH);c.push(h.SPACE);c.push(h.SHORT_DASH);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DOT);c.push(h.SHORT_SPACE);-h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);c.push(h.DOT);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);c.push(h.DOT);c.push(h.SHORT_SPACE);c.push(h.DOT);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);c.push(h.DOT);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DASH);c.push(h.SHORT_SPACE);-c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DASH);c.push(h.SHORT_SPACE);c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.LONG_DASH);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DOT);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.LONG_DASH);c.push(h.LONG_SPACE);c.push(h.DOT);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);-c=[];c.push(h.LONG_DASH);c.push(h.LONG_SPACE);c.push(h.DOT);c.push(h.LONG_SPACE);c.push(h.DOT);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.LONG_DASH);c.push(h.LONG_SPACE);c.push(h.LONG_DASH);c.push(h.LONG_SPACE);c.push(h.DOT);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.XLONG_DASH);c.push(h.LONG_SPACE);c.push(h.DASH);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.XLONG_DASH);c.push(h.LONG_SPACE);c.push(h.DASH);c.push(h.LONG_SPACE);-c.push(h.DASH);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.XSHORT_DASH);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c)};h.getLineDashPattern=function(c){return 0<=c&&23>=c?h.lineDashPatterns_$LI$()[c]:h.lineDashPatterns_$LI$()[0]};return h}();m.__static_initialized=!1;m.vsdxStyleDebug=!1;m.SPACE=4;m.SHORT_SPACE=2;m.LONG_SPACE=6;m.DOT=1;m.DASH=8;m.LONG_DASH=12;m.SHORT_DASH=4;m.XLONG_DASH=20;m.XSHORT_DASH=2;B.Style=m;m.__class="com.mxgraph.io.vsdx.Style"})(z.vsdx||+0)};h.prototype.getTextStyle=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE,b,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};h.prototype.getTextFont=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FONT,b,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};h.prototype.getTextPos=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.POS,+b,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};h.prototype.getTextStrike=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.STRIKETHRU,b,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);b=(b=this.getValue(b,""))&&b.equals?b.equals("1"):"1"===b;return b};h.prototype.getTextCase=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.CASE,b,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);+return this.getValue(b,"")};h.prototype.getHorizontalAlign=function(b,a){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HORIZONTAL_ALIGN,b,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);switch(this.getValue(b,"")){case "0":a=a?"left":mxConstants.ALIGN_LEFT;break;case "2":a=a?"right":mxConstants.ALIGN_RIGHT;break;case "3":case "4":a=a?"justify":mxConstants.ALIGN_CENTER;break;default:a=a?"center":mxConstants.ALIGN_CENTER}return a};h.prototype.getIndentFirst=+function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.INDENT_FIRST,b,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))).toString()};h.prototype.getIndentLeft=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.INDENT_LEFT,b,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,+0))|0)).toString()};h.prototype.getIndentRight=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.INDENT_RIGHT,b,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};h.prototype.getSpBefore=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SPACE_BEFORE,b,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);+return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};h.prototype.getSpAfter=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SPACE_AFTER,b,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};h.prototype.getSpLine=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SPACE_LINE,+b,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);b=this.getValue(b,"");var a=b&&b.equals?b.equals(""):""===b;return a?0:parseFloat(b)};h.prototype.getFlags=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLAGS,b,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return this.getValue(b,"0")};h.prototype.getLetterSpace=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LETTER_SPACE,+b,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))).toString()};h.prototype.getBullet=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BULLET,b,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return this.getValue(b,"0")};h.prototype.getShape=function(){return this.shape};h.prototype.setShape=function(b){this.shape=b};h.lineDashPatterns_$LI$=function(){h.__static_initialize();+null==h.lineDashPatterns&&(h.lineDashPatterns=[]);return h.lineDashPatterns};h.__static_initializer_1=function(){h.lineDashPatterns_$LI$().push([]);h.lineDashPatterns_$LI$().push([]);h.lineDashPatterns_$LI$().push([]);var b=[];b.push(h.DOT);b.push(h.SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.DASH);b.push(h.SPACE);b.push(h.DOT);b.push(h.SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.DASH);b.push(h.SPACE);b.push(h.DOT);b.push(h.SPACE);b.push(h.DOT);b.push(h.SPACE);h.lineDashPatterns_$LI$().push(b);+b=[];b.push(h.DASH);b.push(h.SPACE);b.push(h.DASH);b.push(h.SPACE);b.push(h.DOT);b.push(h.SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.LONG_DASH);b.push(h.SPACE);b.push(h.SHORT_DASH);b.push(h.SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.LONG_DASH);b.push(h.SPACE);b.push(h.SHORT_DASH);b.push(h.SPACE);b.push(h.SHORT_DASH);b.push(h.SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.SHORT_DASH);b.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.DOT);b.push(h.SHORT_SPACE);+h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.SHORT_DASH);b.push(h.SHORT_SPACE);b.push(h.DOT);b.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.SHORT_DASH);b.push(h.SHORT_SPACE);b.push(h.DOT);b.push(h.SHORT_SPACE);b.push(h.DOT);b.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.SHORT_DASH);b.push(h.SHORT_SPACE);b.push(h.SHORT_DASH);b.push(h.SHORT_SPACE);b.push(h.DOT);b.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.DASH);b.push(h.SHORT_SPACE);+b.push(h.SHORT_DASH);b.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.DASH);b.push(h.SHORT_SPACE);b.push(h.SHORT_DASH);b.push(h.SHORT_SPACE);b.push(h.SHORT_DASH);b.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.LONG_DASH);b.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.DOT);b.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.LONG_DASH);b.push(h.LONG_SPACE);b.push(h.DOT);b.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(b);+b=[];b.push(h.LONG_DASH);b.push(h.LONG_SPACE);b.push(h.DOT);b.push(h.LONG_SPACE);b.push(h.DOT);b.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.LONG_DASH);b.push(h.LONG_SPACE);b.push(h.LONG_DASH);b.push(h.LONG_SPACE);b.push(h.DOT);b.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.XLONG_DASH);b.push(h.LONG_SPACE);b.push(h.DASH);b.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.XLONG_DASH);b.push(h.LONG_SPACE);b.push(h.DASH);b.push(h.LONG_SPACE);+b.push(h.DASH);b.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(b);b=[];b.push(h.XSHORT_DASH);b.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(b)};h.getLineDashPattern=function(b){return 0<=b&&23>=b?h.lineDashPatterns_$LI$()[b]:h.lineDashPatterns_$LI$()[0]};return h}();m.__static_initialized=!1;m.vsdxStyleDebug=!1;m.SPACE=4;m.SHORT_SPACE=2;m.LONG_SPACE=6;m.DOT=1;m.DASH=8;m.LONG_DASH=12;m.SHORT_DASH=4;m.XLONG_DASH=20;m.XSHORT_DASH=2;B.Style=m;m.__class="com.mxgraph.io.vsdx.Style"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){var k=c.call(this)||this;k.__com_mxgraph_io_vsdx_theme_HslClr_hue=b/360;k.__com_mxgraph_io_vsdx_theme_HslClr_sat=d/100;k.__com_mxgraph_io_vsdx_theme_HslClr_lum=f/100;k.color=(new g.mxgraph.io.vsdx.theme.HSLColor(b,d,f)).toRgb();return k}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.HslClr=h;h.__class="com.mxgraph.io.vsdx.theme.HslClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||-(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b){var d=c.call(this)||this;d.val=b;d.color=new g.mxgraph.io.vsdx.theme.Color(255,255,255);return d}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.PrstClr=h;h.__class="com.mxgraph.io.vsdx.theme.PrstClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b){var d=c.call(this)||this;d.isDynamic=!0;d.val=b;return d}__extends(a,c);a.prototype.calcColor=function(b,d){var f=this.val;f="phClr".equals?"phClr".equals(f):"phClr"===f;f?this.color=d.getStyleColor(b):(this.color=d.getSchemeColor(this.val),this.isDynamic=!1);c.prototype.calcColor.call(this,b,d)};return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SchemeClr=h;h.__class="com.mxgraph.io.vsdx.theme.SchemeClr"})(B.theme||+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f){var k=b.call(this)||this;k.__com_mxgraph_io_vsdx_theme_HslClr_hue=c/360;k.__com_mxgraph_io_vsdx_theme_HslClr_sat=d/100;k.__com_mxgraph_io_vsdx_theme_HslClr_lum=f/100;k.color=(new g.mxgraph.io.vsdx.theme.HSLColor(c,d,f)).toRgb();return k}__extends(a,b);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.HslClr=h;h.__class="com.mxgraph.io.vsdx.theme.HslClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||+(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c){var d=b.call(this)||this;d.val=c;d.color=new g.mxgraph.io.vsdx.theme.Color(255,255,255);return d}__extends(a,b);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.PrstClr=h;h.__class="com.mxgraph.io.vsdx.theme.PrstClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c){var d=b.call(this)||this;d.isDynamic=!0;d.val=c;return d}__extends(a,b);a.prototype.calcColor=function(c,d){var f=this.val;f="phClr".equals?"phClr".equals(f):"phClr"===f;f?this.color=d.getStyleColor(c):(this.color=d.getSchemeColor(this.val),this.isDynamic=!1);b.prototype.calcColor.call(this,c,d)};return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SchemeClr=h;h.__class="com.mxgraph.io.vsdx.theme.SchemeClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){var k=c.call(this)||this;k.r=0;k.g=0;k.b=0;k.r=b;k.g=d;k.b=f;k.color=new g.mxgraph.io.vsdx.theme.Color(b,d,f);return k}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.ScrgbClr=h;h.__class="com.mxgraph.io.vsdx.theme.ScrgbClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b){var d=c.call(this)||this;d.hexVal=null;d.hexVal=b;d.color=g.mxgraph.io.vsdx.theme.Color.decodeColorHex(b);return d}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SrgbClr=h;h.__class="com.mxgraph.io.vsdx.theme.SrgbClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d){var f=c.call(this)||this;f.lastClr=null;f.val=b;f.lastClr=d;if(null==d)switch(b){case "windowText":d="000000";break;case "window":d="FFFFFF";break;default:d="FFFFFF"}f.color=g.mxgraph.io.vsdx.theme.Color.decodeColorHex(d);return f}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SysClr=h;h.__class="com.mxgraph.io.vsdx.theme.SysClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f){var k=b.call(this)||this;k.r=0;k.g=0;k.b=0;k.r=c;k.g=d;k.b=f;k.color=new g.mxgraph.io.vsdx.theme.Color(c,d,f);return k}__extends(a,b);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.ScrgbClr=h;h.__class="com.mxgraph.io.vsdx.theme.ScrgbClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c){var d=b.call(this)||this;d.hexVal=null;d.hexVal=c;d.color=g.mxgraph.io.vsdx.theme.Color.decodeColorHex(c);return d}__extends(a,b);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SrgbClr=h;h.__class="com.mxgraph.io.vsdx.theme.SrgbClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d){var f=b.call(this)||this;f.lastClr=null;f.val=c;f.lastClr=d;if(null==d)switch(c){case "windowText":d="000000";break;case "window":d="FFFFFF";break;default:d="FFFFFF"}f.color=g.mxgraph.io.vsdx.theme.Color.decodeColorHex(d);return f}__extends(a,b);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SysClr=h;h.__class="com.mxgraph.io.vsdx.theme.SysClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){return c.call(this,b,d,f,k,n,q,t)||this}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var f=d.getHeight()/g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=d.getWidth()/g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();this.x*=k;this.y*=f;this.a*=k;this.b*=f}return c.prototype.handle.call(this,-b,d)};return a}(g.mxgraph.io.vsdx.geometry.EllipticalArcTo);m.RelEllipticalArcTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelEllipticalArcTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(h){function c(a,b){var d=this;d.text=null;d.fields=null;d.geom=null;d.imageData=null;d.theme=null;d.quickStyleVals=null;d=h.call(this,a,b)||this;d.paragraphs=null;d.styleMap={};d.width=0;d.height=0;d.rotation=0;d.lastX=0;d.lastY=0;d.lastMoveX=0;d.lastMoveY=0;d.lastKnot=-1;d.geomList=null;d.geomListProcessed=!1;d.themeVariant=0;d.cp="0";d.pp="0";d.tp="0";d.fld="0";d.width=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(f,-k){return f[k]?f[k]:null}(d.cellElements,g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0);d.height=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(f,k){return f[k]?f[k]:null}(d.cellElements,g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return d}__extends(c,h);c.UNICODE_LINE_SEP_$LI$=function(){null==c.UNICODE_LINE_SEP&&(c.ERROR_IMAGE="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8IS0tIENyZWF0ZWQgd2l0aCBJbmtzY2FwZSAoaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvKSAtLT4NCjxzdmcNCiAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyINCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiDQogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiDQogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIg0KICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiDQogICB3aWR0aD0iMjUwIg0KICAgaGVpZ2h0PSIyNTAiDQogICBpZD0ic3ZnMzMxOSINCiAgIHNvZGlwb2RpOnZlcnNpb249IjAuMzIiDQogICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjQ2Ig0KICAgdmVyc2lvbj0iMS4wIg0KICAgc29kaXBvZGk6ZG9jbmFtZT0ibm9waG90b19pLnN2ZyINCiAgIGlua3NjYXBlOm91dHB1dF9leHRlbnNpb249Im9yZy5pbmtzY2FwZS5vdXRwdXQuc3ZnLmlua3NjYXBlIj4NCiAgPGRlZnMNCiAgICAgaWQ9ImRlZnMzMzIxIj4NCiAgICA8aW5rc2NhcGU6cGVyc3BlY3RpdmUNCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIg0KICAgICAgIGlua3NjYXBlOnZwX3g9IjAgOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnBlcnNwM2Qtb3JpZ2luPSIzNzIuMDQ3MjQgOiAzNTAuNzg3MzkgOiAxIg0KICAgICAgIGlkPSJwZXJzcGVjdGl2ZTMzMjciIC8+DQogICAgPGlua3NjYXBlOnBlcnNwZWN0aXZlDQogICAgICAgaWQ9InBlcnNwZWN0aXZlMzM0MiINCiAgICAgICBpbmtzY2FwZTpwZXJzcDNkLW9yaWdpbj0iMzcyLjA0NzI0IDogMzUwLjc4NzM5IDogMSINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF94PSIwIDogNTI2LjE4MTA5IDogMSINCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIiAvPg0KICA8L2RlZnM+DQogIDxzb2RpcG9kaTpuYW1lZHZpZXcNCiAgICAgaWQ9ImJhc2UiDQogICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiINCiAgICAgYm9yZGVyY29sb3I9IiM2NjY2NjYiDQogICAgIGJvcmRlcm9wYWNpdHk9IjEuMCINCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAuMCINCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiINCiAgICAgaW5rc2NhcGU6em9vbT0iMi4yNDI5NDI3Ig0KICAgICBpbmtzY2FwZTpjeD0iMTIxLjk3NjQ4Ig0KICAgICBpbmtzY2FwZTpjeT0iMTIyLjQ0MTk4Ig0KICAgICBpbmtzY2FwZTpkb2N1bWVudC11bml0cz0icHgiDQogICAgIGlua3NjYXBlOmN1cnJlbnQtbGF5ZXI9ImxheWVyMSINCiAgICAgc2hvd2dyaWQ9ImZhbHNlIg0KICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE2NjQiDQogICAgIGlua3NjYXBlOndpbmRvdy1oZWlnaHQ9Ijg0NCINCiAgICAgaW5rc2NhcGU6d2luZG93LXg9Ii0zIg0KICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTE4IiAvPg0KICA8bWV0YWRhdGENCiAgICAgaWQ9Im1ldGFkYXRhMzMyNCI+DQogICAgPHJkZjpSREY+DQogICAgICA8Y2M6V29yaw0KICAgICAgICAgcmRmOmFib3V0PSIiPg0KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4NCiAgICAgICAgPGRjOnR5cGUNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz4NCiAgICAgICAgPGRjOnRpdGxlPkZvdG9ncmFmaWVydmVyYm90PC9kYzp0aXRsZT4NCiAgICAgICAgPGRjOmRhdGU+MjAwOC0wNi0yOTwvZGM6ZGF0ZT4NCiAgICAgICAgPGRjOmNyZWF0b3I+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnJzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOmNyZWF0b3I+DQogICAgICAgIDxkYzpyaWdodHM+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnN0ZW4gU2tvbXA8L2RjOnRpdGxlPg0KICAgICAgICAgIDwvY2M6QWdlbnQ+DQogICAgICAgIDwvZGM6cmlnaHRzPg0KICAgICAgICA8ZGM6cHVibGlzaGVyPg0KICAgICAgICAgIDxjYzpBZ2VudD4NCiAgICAgICAgICAgIDxkYzp0aXRsZT5Ub3JzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOnB1Ymxpc2hlcj4NCiAgICAgICAgPGRjOmxhbmd1YWdlPmRlX0RFPC9kYzpsYW5ndWFnZT4NCiAgICAgICAgPGRjOnN1YmplY3Q+DQogICAgICAgICAgPHJkZjpCYWc+DQogICAgICAgICAgICA8cmRmOmxpPlBpa3RvZ3JhbW07IEZvdG9ncmFmaWVydmVyYm90PC9yZGY6bGk+DQogICAgICAgICAgPC9yZGY6QmFnPg0KICAgICAgICA8L2RjOnN1YmplY3Q+DQogICAgICAgIDxkYzpkZXNjcmlwdGlvbj5Gb3RvZ3JhZmllcnZlcmJvdCBhbHMgUGlrdG9ncmFtbSA8L2RjOmRlc2NyaXB0aW9uPg0KICAgICAgICA8Y2M6bGljZW5zZQ0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL3B1YmxpY2RvbWFpbi8iIC8+DQogICAgICA8L2NjOldvcms+DQogICAgICA8Y2M6TGljZW5zZQ0KICAgICAgICAgcmRmOmFib3V0PSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9wdWJsaWNkb21haW4vIj4NCiAgICAgICAgPGNjOnBlcm1pdHMNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyNSZXByb2R1Y3Rpb24iIC8+DQogICAgICAgIDxjYzpwZXJtaXRzDQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjRGlzdHJpYnV0aW9uIiAvPg0KICAgICAgICA8Y2M6cGVybWl0cw0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zI0Rlcml2YXRpdmVXb3JrcyIgLz4NCiAgICAgIDwvY2M6TGljZW5zZT4NCiAgICA8L3JkZjpSREY+DQogIDwvbWV0YWRhdGE+DQogIDxnDQogICAgIGlua3NjYXBlOmxhYmVsPSJFYmVuZSAxIg0KICAgICBpbmtzY2FwZTpncm91cG1vZGU9ImxheWVyIg0KICAgICBpZD0ibGF5ZXIxIj4NCiAgICA8cGF0aA0KICAgICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjEiDQogICAgICAgZD0iTSAxNjQuNTMxMjUgNjIuNjg3NSBDIDE2Mi43OTExNSA2Mi42ODc1MDEgMTYxLjM3NSA2NC4wNzI0MTYgMTYxLjM3NSA2NS44MTI1IEwgMTYxLjM3NSA2OC43NSBMIDM4LjM3NSA2OC43NSBDIDM1LjA5MjI5OCA2OC43NDk5OTkgMzIuNDY4NzUgNzEuMzczNTQ4IDMyLjQ2ODc1IDc0LjY1NjI1IEwgMzIuNDY4NzUgMTgxLjM3NSBDIDMyLjQ2ODc1IDE4NC42NTc3IDM1LjA5MjMwNyAxODcuMzEyNTEgMzguMzc1IDE4Ny4zMTI1IEwgMjExLjYyNSAxODcuMzEyNSBDIDIxNC45MDc2OSAxODcuMzEyNSAyMTcuNTMxMjcgMTg0LjY1NzcgMjE3LjUzMTI1IDE4MS4zNzUgTCAyMTcuNTMxMjUgNzQuNjU2MjUgQyAyMTcuNTMxMjUgNzEuMzczNTUxIDIxNC45MDc2OCA2OC43NSAyMTEuNjI1IDY4Ljc1IEwgMjAyLjA2MjUgNjguNzUgTCAyMDIuMDYyNSA2NS44MTI1IEMgMjAyLjA2MjUgNjQuMDcyNDEgMjAwLjY0NjM1IDYyLjY4NzUgMTk4LjkwNjI1IDYyLjY4NzUgTCAxNjQuNTMxMjUgNjIuNjg3NSB6IE0gNDYuODEyNSA3OCBMIDg4LjY1NjI1IDc4IEMgOTAuMzk2MzQyIDc4IDkxLjgxMjUgNzkuMzg0OTA3IDkxLjgxMjUgODEuMTI1IEwgOTEuODEyNSA5Ni4zMTI1IEMgOTEuODEyNSA5OC4wNTI1OTIgOTAuMzk2MzQzIDk5LjQzNzUgODguNjU2MjUgOTkuNDM3NSBMIDQ2LjgxMjUgOTkuNDM3NSBDIDQ1LjA3MjQwOCA5OS40Mzc1IDQzLjY4NzUgOTguMDUyNTkzIDQzLjY4NzUgOTYuMzEyNSBMIDQzLjY4NzUgODEuMTI1IEMgNDMuNjg3NSA3OS4zODQ5MDggNDUuMDcyNDA3IDc4IDQ2LjgxMjUgNzggeiBNIDE0NiA4OC4yMTg3NSBDIDE2Ny43MzQ3NSA4OC4yMTg3NTMgMTg1LjM3NSAxMDYuMTUwNzEgMTg1LjM3NSAxMjguMjUgQyAxODUuMzc0OTkgMTUwLjM0OTI4IDE2Ny43MzQ3NCAxNjguMjgxMjUgMTQ2IDE2OC4yODEyNSBDIDEyNC4yNjUyNyAxNjguMjgxMjYgMTA2LjYyNSAxNTAuMzQ5MjkgMTA2LjYyNSAxMjguMjUgQyAxMDYuNjI1IDEwNi4xNTA3MSAxMjQuMjY1MjYgODguMjE4NzUgMTQ2IDg4LjIxODc1IHogTSAxNDYgOTEuNzE4NzUgQyAxMjYuMTY1NTcgOTEuNzE4NzUgMTEwLjA2MjUgMTA4LjA4Mjg5IDExMC4wNjI1IDEyOC4yNSBDIDExMC4wNjI1IDE0OC40MTcxMSAxMjYuMTY1NTcgMTY0Ljc4MTI2IDE0NiAxNjQuNzgxMjUgQyAxNjUuODM0NDMgMTY0Ljc4MTI1IDE4MS45Mzc1IDE0OC40MTcxIDE4MS45Mzc1IDEyOC4yNSBDIDE4MS45Mzc1IDEwOC4wODI4OSAxNjUuODM0NDMgOTEuNzE4NzUgMTQ2IDkxLjcxODc1IHogTSAxNDYgOTYuNTkzNzUgQyAxNjMuMTc3NjggOTYuNTkzNzUyIDE3Ny4xMjUgMTEwLjc4NDIgMTc3LjEyNSAxMjguMjUgQyAxNzcuMTI0OTkgMTQ1LjcxNTggMTYzLjE3NzY5IDE1OS44NzUgMTQ2IDE1OS44NzUgQyAxMjguODIyMzEgMTU5Ljg3NSAxMTQuODc1IDE0NS43MTU4IDExNC44NzUgMTI4LjI1IEMgMTE0Ljg3NSAxMTAuNzg0MTkgMTI4LjgyMjMxIDk2LjU5Mzc1IDE0NiA5Ni41OTM3NSB6IE0gMTc2LjUgMTcyLjcxODc1IEwgMjA2LjE4NzUgMTcyLjcxODc1IEMgMjA3LjQyMTM4IDE3Mi43MTg3NSAyMDguNDA2MjUgMTczLjEyNzgzIDIwOC40MDYyNSAxNzMuNjI1IEwgMjA4LjQwNjI1IDE3Ny45Njg3NSBDIDIwOC40MDYyNSAxNzguNDY1OTIgMjA3LjQyMTM4IDE3OC44NDM3NSAyMDYuMTg3NSAxNzguODQzNzUgTCAxNzYuNSAxNzguODQzNzUgQyAxNzUuMjY2MTEgMTc4Ljg0Mzc1IDE3NC4yODEyNSAxNzguNDY1OTIgMTc0LjI4MTI1IDE3Ny45Njg3NSBMIDE3NC4yODEyNSAxNzMuNjI1IEMgMTc0LjI4MTI1IDE3My4xMjc4MyAxNzUuMjY2MTIgMTcyLjcxODc1IDE3Ni41IDE3Mi43MTg3NSB6ICINCiAgICAgICBpZD0icmVjdDMyMDkiIC8+DQogICAgPHBhdGgNCiAgICAgICBzdHlsZT0iZmlsbDojYzQyNjFkO2ZpbGwtb3BhY2l0eToxIg0KICAgICAgIGQ9Ik0gMjAgMCBDIDE4LjU1OTkzOCAwIDE3LjE2NDc0NyAwLjE1MDk4NjY2IDE1LjgxMjUgMC40Mzc1IEMgMTUuMjEwMjkxIDAuNTY1MTk1NzggMTQuNjExOTEzIDAuNzI2MjExMjYgMTQuMDMxMjUgMC45MDYyNSBDIDEzLjU1NDc3MyAxLjA1Mzk4NTIgMTMuMDg1MzQ5IDEuMjI0ODUzNiAxMi42MjUgMS40MDYyNSBDIDEyLjMyODc2NiAxLjUyMzA3MzkgMTIuMDM5MDMzIDEuNjUwOTE4MiAxMS43NSAxLjc4MTI1IEMgMTEuMzQ3Mjc4IDEuOTYyMzU5OCAxMC45NTA0MDYgMi4xMzc0MTY1IDEwLjU2MjUgMi4zNDM3NSBDIDEwLjUyMTU1NSAyLjM2NTU2ODggMTAuNDc4MjczIDIuMzg0MTU1NSAxMC40Mzc1IDIuNDA2MjUgQyAxMC40MTY5MzQgMi40MTczNzU0IDEwLjM5NTUyMiAyLjQyNjMwNDkgMTAuMzc1IDIuNDM3NSBDIDkuODMyNjg2MSAyLjczMzM0NDYgOS4zMjI2NDQ4IDMuMDYzMjQ1MiA4LjgxMjUgMy40MDYyNSBDIDguMjgzMTIyMSAzLjc2MjE4NjUgNy43NzI3NzI4IDQuMTU4OTIwOSA3LjI4MTI1IDQuNTYyNSBDIDcuMjc1MDU1IDQuNTY3NTg2NiA3LjI1NjE4ODggNC41NTc0MDYxIDcuMjUgNC41NjI1IEMgNy4yMzg1NDc5IDQuNTcxOTQzNCA3LjIzMDE4MDYgNC41ODQyODE2IDcuMjE4NzUgNC41OTM3NSBDIDcuMTA0NzM1MiA0LjY4ODAxNTkgNi45ODY4NTA3IDQuNzc4MjY4NyA2Ljg3NSA0Ljg3NSBDIDYuNTE1NzAyMSA1LjE4NjQyNjQgNi4xNzk3OTA5IDUuNTA3NzA5MSA1Ljg0Mzc1IDUuODQzNzUgQyA1LjQwNDQwMjUgNi4yODE4MDc4IDQuOTkwNzQ0OSA2Ljc0MTM1NTQgNC41OTM3NSA3LjIxODc1IEMgNC41NzkwMDg2IDcuMjM2NTQ2MiA0LjU3NzE4MDYgNy4yNjM0MDE1IDQuNTYyNSA3LjI4MTI1IEMgMy43Njc0ODk4IDguMjQzOTE4MSAzLjA0MjI3MjEgOS4yNzE4NzA1IDIuNDM3NSAxMC4zNzUgQyAyLjQyNjIyMzIgMTAuMzk1NjM1IDIuNDE3NDU2MSAxMC40MTY4MiAyLjQwNjI1IDEwLjQzNzUgQyAyLjEwODM5MDggMTAuOTg1MzQ4IDEuODQwMjIzMyAxMS41NDcyMTQgMS41OTM3NSAxMi4xMjUgQyAxLjU3NTU4NjUgMTIuMTY3NjY1IDEuNTQ5MTI1NSAxMi4yMDcxODIgMS41MzEyNSAxMi4yNSBDIDEuMjg3NzEzMSAxMi44MzI0MzMgMS4wOTQ2NzU0IDEzLjQyMTgyMiAwLjkwNjI1IDE0LjAzMTI1IEMgMC43Mjk2MzAxNCAxNC42MDI0OTUgMC41NjMwOTYzNCAxNS4xODg4MjggMC40Mzc1IDE1Ljc4MTI1IEMgMC4xNDY5MTQwNCAxNy4xNDI1NzggLTQuMzkwNjEzM2UtMTggMTguNTQ5NDY2IDAgMjAgTCAwIDIzMCBDIDAgMjQxLjA4IDguOTIgMjUwIDIwIDI1MCBMIDIzMCAyNTAgQyAyMzEuNDQwMDYgMjUwIDIzMi44MzUyNSAyNDkuODQ5MDEgMjM0LjE4NzUgMjQ5LjU2MjUgQyAyMzQuNzg5MDMgMjQ5LjQzNDk3IDIzNS4zODg2NiAyNDkuMjczODEgMjM1Ljk2ODc1IDI0OS4wOTM3NSBDIDIzNi40NDQ3NiAyNDguOTQ2IDIzNi45MTUwNSAyNDguNzc1MjYgMjM3LjM3NSAyNDguNTkzNzUgQyAyMzcuNjcxMjMgMjQ4LjQ3NjkzIDIzNy45NjA5NyAyNDguMzQ5MDggMjM4LjI1IDI0OC4yMTg3NSBDIDIzOC4yNzk4MSAyNDguMjA1MzEgMjM4LjMxNDAyIDI0OC4yMDEwOSAyMzguMzQzNzUgMjQ4LjE4NzUgQyAyMzguNzU4MzYgMjQ3Ljk5ODMgMjM5LjE2Mzc0IDI0Ny44MDk4MSAyMzkuNTYyNSAyNDcuNTkzNzUgQyAyMzkuNTgzMTggMjQ3LjU4MjU0IDIzOS42MDQzNiAyNDcuNTczNzggMjM5LjYyNSAyNDcuNTYyNSBDIDI0MC4xNjkyNSAyNDcuMjY1MTIgMjQwLjY3NTU4IDI0Ni45Mzg3MyAyNDEuMTg3NSAyNDYuNTkzNzUgQyAyNDEuNjY4NzggMjQ2LjI2OTQxIDI0Mi4xNDM1OSAyNDUuOTI2MzkgMjQyLjU5Mzc1IDI0NS41NjI1IEMgMjQyLjY0NDc0IDI0NS41MjEyOCAyNDIuNjk5NDMgMjQ1LjQ3OTIxIDI0Mi43NSAyNDUuNDM3NSBDIDI0Mi44NzY1MSAyNDUuMzMzMTggMjQzLjAwMTE1IDI0NS4yMzIzNSAyNDMuMTI1IDI0NS4xMjUgQyAyNDMuNDgyNjUgMjQ0LjgxNTM4IDI0My44MjE1NSAyNDQuNDkwMTkgMjQ0LjE1NjI1IDI0NC4xNTYyNSBDIDI0NC40OTIyOSAyNDMuODIwMjEgMjQ0LjgxMzU3IDI0My40ODQzIDI0NS4xMjUgMjQzLjEyNSBDIDI0NS4yMzE2NyAyNDMuMDAyMzQgMjQ1LjMzMzgxIDI0Mi44NzUyNyAyNDUuNDM3NSAyNDIuNzUgQyAyNDUuNDQyNzYgMjQyLjc0MzYyIDI0NS40MzIyNSAyNDIuNzI1MTMgMjQ1LjQzNzUgMjQyLjcxODc1IEMgMjQ1Ljg0MjQ5IDI0Mi4yMjgzIDI0Ni4yMzY0IDI0MS43MTU3NiAyNDYuNTkzNzUgMjQxLjE4NzUgQyAyNDYuOTM4MTIgMjQwLjY3ODQzIDI0Ny4yNjUzNiAyNDAuMTY2MjIgMjQ3LjU2MjUgMjM5LjYyNSBDIDI0Ny41NzM2MyAyMzkuNjA0NzIgMjQ3LjU4MjY4IDIzOS41ODI4MiAyNDcuNTkzNzUgMjM5LjU2MjUgQyAyNDcuODkxOTcgMjM5LjAxNDggMjQ4LjE1OTMxIDIzOC40NTIzOSAyNDguNDA2MjUgMjM3Ljg3NSBDIDI0OC40MTU1NCAyMzcuODUzMjggMjQ4LjQyODI5IDIzNy44MzQyNiAyNDguNDM3NSAyMzcuODEyNSBDIDI0OC40NDY0NCAyMzcuNzkxMjkgMjQ4LjQ1OTg4IDIzNy43NzEyNSAyNDguNDY4NzUgMjM3Ljc1IEMgMjQ4LjcwOTkyIDIzNy4xNzQ3NiAyNDguOTA2MjggMjM2LjU3MDA4IDI0OS4wOTM3NSAyMzUuOTY4NzUgQyAyNDkuMjczNzUgMjM1LjM5MTM3IDI0OS40MzQ2OCAyMzQuODE3NTQgMjQ5LjU2MjUgMjM0LjIxODc1IEMgMjQ5Ljg1MzA5IDIzMi44NTc0MiAyNTAgMjMxLjQ1MDUzIDI1MCAyMzAgTCAyNTAgMjAgQyAyNTAgOC45MiAyNDEuMDggLTMuMzUzNzk4N2UtMTcgMjMwIDAgTCAyMCAwIHogTSAzNC43ODEyNSAxOS40MDYyNSBMIDIyNS40Njg3NSAxOS40MDYyNSBDIDIyOC4zMDk0NiAxOS40MDYyNSAyMzAuNTkzNzUgMjEuNjkwNTQ0IDIzMC41OTM3NSAyNC41MzEyNSBMIDIzMC41OTM3NSAyMTUuMjUgTCAzNC43ODEyNSAxOS40MDYyNSB6IE0gMTkuNDA2MjUgMzQuNzUgTCAyMTUuMjE4NzUgMjMwLjU5Mzc1IEwgMjQuNTMxMjUgMjMwLjU5Mzc1IEMgMjEuNjkwNTQ0IDIzMC41OTM3NiAxOS40MDYyNSAyMjguMzA5NDYgMTkuNDA2MjUgMjI1LjQ2ODc1IEwgMTkuNDA2MjUgMzQuNzUgeiAiDQogICAgICAgaWQ9InBhdGgzMTk2IiAvPg0KICA8L2c+DQo8L3N2Zz4NCg==",-c.UNICODE_LINE_SEP=String.fromCharCode(8232));return c.UNICODE_LINE_SEP};c.prototype.setThemeAndVariant=function(a,b){this.theme=a;this.themeVariant=b};c.prototype.getTheme=function(){null!=this.theme&&this.theme.setVariant(this.themeVariant);return this.theme};c.prototype.getQuickStyleVals=function(){return this.quickStyleVals};c.prototype.processGeomList=function(a){if(!this.geomListProcessed){this.geomList=new g.mxgraph.io.vsdx.mxVsdxGeometryList(a);if(null!=this.geom)for(a=0;a<this.geom.length;a++)this.geomList.addGeometry(this.geom[a]);-this.geomListProcessed=!0}};c.prototype.parseShapeElem=function(a,b){h.prototype.parseShapeElem.call(this,a,b);var d=a.nodeName;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(d,"ForeignData")){d=function(A,C){for(A=A.firstChild;null!=A;){if(1==A.nodeType){var I=A;if("rel"==I.nodeName.toLowerCase()&&(I=I.getAttribute("r:id"),null!=I&&0!==I.length)){A=C.lastIndexOf("/");var Q="",K="";try{Q=C.substring(0,A),K=C.substring(A,C.length)}catch(L){break}A=b.getRelationship(I,Q+"/_rels"+K+".rels");+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(b){function a(c,d,f,k,n,q,t){return b.call(this,c,d,f,k,n,q,t)||this}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var f=d.getHeight()/g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=d.getWidth()/g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();this.x*=k;this.y*=f;this.a*=k;this.b*=f}return b.prototype.handle.call(this,+c,d)};return a}(g.mxgraph.io.vsdx.geometry.EllipticalArcTo);m.RelEllipticalArcTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelEllipticalArcTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){var m=function(h){function b(a,c){var d=this;d.text=null;d.fields=null;d.geom=null;d.imageData=null;d.theme=null;d.quickStyleVals=null;d=h.call(this,a,c)||this;d.paragraphs=null;d.styleMap={};d.width=0;d.height=0;d.rotation=0;d.lastX=0;d.lastY=0;d.lastMoveX=0;d.lastMoveY=0;d.lastKnot=-1;d.geomList=null;d.geomListProcessed=!1;d.themeVariant=0;d.cp="0";d.pp="0";d.tp="0";d.fld="0";d.width=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(f,+k){return f[k]?f[k]:null}(d.cellElements,g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0);d.height=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(f,k){return f[k]?f[k]:null}(d.cellElements,g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return d}__extends(b,h);b.UNICODE_LINE_SEP_$LI$=function(){null==b.UNICODE_LINE_SEP&&(b.ERROR_IMAGE="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8IS0tIENyZWF0ZWQgd2l0aCBJbmtzY2FwZSAoaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvKSAtLT4NCjxzdmcNCiAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyINCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiDQogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiDQogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIg0KICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiDQogICB3aWR0aD0iMjUwIg0KICAgaGVpZ2h0PSIyNTAiDQogICBpZD0ic3ZnMzMxOSINCiAgIHNvZGlwb2RpOnZlcnNpb249IjAuMzIiDQogICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjQ2Ig0KICAgdmVyc2lvbj0iMS4wIg0KICAgc29kaXBvZGk6ZG9jbmFtZT0ibm9waG90b19pLnN2ZyINCiAgIGlua3NjYXBlOm91dHB1dF9leHRlbnNpb249Im9yZy5pbmtzY2FwZS5vdXRwdXQuc3ZnLmlua3NjYXBlIj4NCiAgPGRlZnMNCiAgICAgaWQ9ImRlZnMzMzIxIj4NCiAgICA8aW5rc2NhcGU6cGVyc3BlY3RpdmUNCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIg0KICAgICAgIGlua3NjYXBlOnZwX3g9IjAgOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnBlcnNwM2Qtb3JpZ2luPSIzNzIuMDQ3MjQgOiAzNTAuNzg3MzkgOiAxIg0KICAgICAgIGlkPSJwZXJzcGVjdGl2ZTMzMjciIC8+DQogICAgPGlua3NjYXBlOnBlcnNwZWN0aXZlDQogICAgICAgaWQ9InBlcnNwZWN0aXZlMzM0MiINCiAgICAgICBpbmtzY2FwZTpwZXJzcDNkLW9yaWdpbj0iMzcyLjA0NzI0IDogMzUwLjc4NzM5IDogMSINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF94PSIwIDogNTI2LjE4MTA5IDogMSINCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIiAvPg0KICA8L2RlZnM+DQogIDxzb2RpcG9kaTpuYW1lZHZpZXcNCiAgICAgaWQ9ImJhc2UiDQogICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiINCiAgICAgYm9yZGVyY29sb3I9IiM2NjY2NjYiDQogICAgIGJvcmRlcm9wYWNpdHk9IjEuMCINCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAuMCINCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiINCiAgICAgaW5rc2NhcGU6em9vbT0iMi4yNDI5NDI3Ig0KICAgICBpbmtzY2FwZTpjeD0iMTIxLjk3NjQ4Ig0KICAgICBpbmtzY2FwZTpjeT0iMTIyLjQ0MTk4Ig0KICAgICBpbmtzY2FwZTpkb2N1bWVudC11bml0cz0icHgiDQogICAgIGlua3NjYXBlOmN1cnJlbnQtbGF5ZXI9ImxheWVyMSINCiAgICAgc2hvd2dyaWQ9ImZhbHNlIg0KICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE2NjQiDQogICAgIGlua3NjYXBlOndpbmRvdy1oZWlnaHQ9Ijg0NCINCiAgICAgaW5rc2NhcGU6d2luZG93LXg9Ii0zIg0KICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTE4IiAvPg0KICA8bWV0YWRhdGENCiAgICAgaWQ9Im1ldGFkYXRhMzMyNCI+DQogICAgPHJkZjpSREY+DQogICAgICA8Y2M6V29yaw0KICAgICAgICAgcmRmOmFib3V0PSIiPg0KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4NCiAgICAgICAgPGRjOnR5cGUNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz4NCiAgICAgICAgPGRjOnRpdGxlPkZvdG9ncmFmaWVydmVyYm90PC9kYzp0aXRsZT4NCiAgICAgICAgPGRjOmRhdGU+MjAwOC0wNi0yOTwvZGM6ZGF0ZT4NCiAgICAgICAgPGRjOmNyZWF0b3I+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnJzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOmNyZWF0b3I+DQogICAgICAgIDxkYzpyaWdodHM+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnN0ZW4gU2tvbXA8L2RjOnRpdGxlPg0KICAgICAgICAgIDwvY2M6QWdlbnQ+DQogICAgICAgIDwvZGM6cmlnaHRzPg0KICAgICAgICA8ZGM6cHVibGlzaGVyPg0KICAgICAgICAgIDxjYzpBZ2VudD4NCiAgICAgICAgICAgIDxkYzp0aXRsZT5Ub3JzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOnB1Ymxpc2hlcj4NCiAgICAgICAgPGRjOmxhbmd1YWdlPmRlX0RFPC9kYzpsYW5ndWFnZT4NCiAgICAgICAgPGRjOnN1YmplY3Q+DQogICAgICAgICAgPHJkZjpCYWc+DQogICAgICAgICAgICA8cmRmOmxpPlBpa3RvZ3JhbW07IEZvdG9ncmFmaWVydmVyYm90PC9yZGY6bGk+DQogICAgICAgICAgPC9yZGY6QmFnPg0KICAgICAgICA8L2RjOnN1YmplY3Q+DQogICAgICAgIDxkYzpkZXNjcmlwdGlvbj5Gb3RvZ3JhZmllcnZlcmJvdCBhbHMgUGlrdG9ncmFtbSA8L2RjOmRlc2NyaXB0aW9uPg0KICAgICAgICA8Y2M6bGljZW5zZQ0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL3B1YmxpY2RvbWFpbi8iIC8+DQogICAgICA8L2NjOldvcms+DQogICAgICA8Y2M6TGljZW5zZQ0KICAgICAgICAgcmRmOmFib3V0PSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9wdWJsaWNkb21haW4vIj4NCiAgICAgICAgPGNjOnBlcm1pdHMNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyNSZXByb2R1Y3Rpb24iIC8+DQogICAgICAgIDxjYzpwZXJtaXRzDQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjRGlzdHJpYnV0aW9uIiAvPg0KICAgICAgICA8Y2M6cGVybWl0cw0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zI0Rlcml2YXRpdmVXb3JrcyIgLz4NCiAgICAgIDwvY2M6TGljZW5zZT4NCiAgICA8L3JkZjpSREY+DQogIDwvbWV0YWRhdGE+DQogIDxnDQogICAgIGlua3NjYXBlOmxhYmVsPSJFYmVuZSAxIg0KICAgICBpbmtzY2FwZTpncm91cG1vZGU9ImxheWVyIg0KICAgICBpZD0ibGF5ZXIxIj4NCiAgICA8cGF0aA0KICAgICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjEiDQogICAgICAgZD0iTSAxNjQuNTMxMjUgNjIuNjg3NSBDIDE2Mi43OTExNSA2Mi42ODc1MDEgMTYxLjM3NSA2NC4wNzI0MTYgMTYxLjM3NSA2NS44MTI1IEwgMTYxLjM3NSA2OC43NSBMIDM4LjM3NSA2OC43NSBDIDM1LjA5MjI5OCA2OC43NDk5OTkgMzIuNDY4NzUgNzEuMzczNTQ4IDMyLjQ2ODc1IDc0LjY1NjI1IEwgMzIuNDY4NzUgMTgxLjM3NSBDIDMyLjQ2ODc1IDE4NC42NTc3IDM1LjA5MjMwNyAxODcuMzEyNTEgMzguMzc1IDE4Ny4zMTI1IEwgMjExLjYyNSAxODcuMzEyNSBDIDIxNC45MDc2OSAxODcuMzEyNSAyMTcuNTMxMjcgMTg0LjY1NzcgMjE3LjUzMTI1IDE4MS4zNzUgTCAyMTcuNTMxMjUgNzQuNjU2MjUgQyAyMTcuNTMxMjUgNzEuMzczNTUxIDIxNC45MDc2OCA2OC43NSAyMTEuNjI1IDY4Ljc1IEwgMjAyLjA2MjUgNjguNzUgTCAyMDIuMDYyNSA2NS44MTI1IEMgMjAyLjA2MjUgNjQuMDcyNDEgMjAwLjY0NjM1IDYyLjY4NzUgMTk4LjkwNjI1IDYyLjY4NzUgTCAxNjQuNTMxMjUgNjIuNjg3NSB6IE0gNDYuODEyNSA3OCBMIDg4LjY1NjI1IDc4IEMgOTAuMzk2MzQyIDc4IDkxLjgxMjUgNzkuMzg0OTA3IDkxLjgxMjUgODEuMTI1IEwgOTEuODEyNSA5Ni4zMTI1IEMgOTEuODEyNSA5OC4wNTI1OTIgOTAuMzk2MzQzIDk5LjQzNzUgODguNjU2MjUgOTkuNDM3NSBMIDQ2LjgxMjUgOTkuNDM3NSBDIDQ1LjA3MjQwOCA5OS40Mzc1IDQzLjY4NzUgOTguMDUyNTkzIDQzLjY4NzUgOTYuMzEyNSBMIDQzLjY4NzUgODEuMTI1IEMgNDMuNjg3NSA3OS4zODQ5MDggNDUuMDcyNDA3IDc4IDQ2LjgxMjUgNzggeiBNIDE0NiA4OC4yMTg3NSBDIDE2Ny43MzQ3NSA4OC4yMTg3NTMgMTg1LjM3NSAxMDYuMTUwNzEgMTg1LjM3NSAxMjguMjUgQyAxODUuMzc0OTkgMTUwLjM0OTI4IDE2Ny43MzQ3NCAxNjguMjgxMjUgMTQ2IDE2OC4yODEyNSBDIDEyNC4yNjUyNyAxNjguMjgxMjYgMTA2LjYyNSAxNTAuMzQ5MjkgMTA2LjYyNSAxMjguMjUgQyAxMDYuNjI1IDEwNi4xNTA3MSAxMjQuMjY1MjYgODguMjE4NzUgMTQ2IDg4LjIxODc1IHogTSAxNDYgOTEuNzE4NzUgQyAxMjYuMTY1NTcgOTEuNzE4NzUgMTEwLjA2MjUgMTA4LjA4Mjg5IDExMC4wNjI1IDEyOC4yNSBDIDExMC4wNjI1IDE0OC40MTcxMSAxMjYuMTY1NTcgMTY0Ljc4MTI2IDE0NiAxNjQuNzgxMjUgQyAxNjUuODM0NDMgMTY0Ljc4MTI1IDE4MS45Mzc1IDE0OC40MTcxIDE4MS45Mzc1IDEyOC4yNSBDIDE4MS45Mzc1IDEwOC4wODI4OSAxNjUuODM0NDMgOTEuNzE4NzUgMTQ2IDkxLjcxODc1IHogTSAxNDYgOTYuNTkzNzUgQyAxNjMuMTc3NjggOTYuNTkzNzUyIDE3Ny4xMjUgMTEwLjc4NDIgMTc3LjEyNSAxMjguMjUgQyAxNzcuMTI0OTkgMTQ1LjcxNTggMTYzLjE3NzY5IDE1OS44NzUgMTQ2IDE1OS44NzUgQyAxMjguODIyMzEgMTU5Ljg3NSAxMTQuODc1IDE0NS43MTU4IDExNC44NzUgMTI4LjI1IEMgMTE0Ljg3NSAxMTAuNzg0MTkgMTI4LjgyMjMxIDk2LjU5Mzc1IDE0NiA5Ni41OTM3NSB6IE0gMTc2LjUgMTcyLjcxODc1IEwgMjA2LjE4NzUgMTcyLjcxODc1IEMgMjA3LjQyMTM4IDE3Mi43MTg3NSAyMDguNDA2MjUgMTczLjEyNzgzIDIwOC40MDYyNSAxNzMuNjI1IEwgMjA4LjQwNjI1IDE3Ny45Njg3NSBDIDIwOC40MDYyNSAxNzguNDY1OTIgMjA3LjQyMTM4IDE3OC44NDM3NSAyMDYuMTg3NSAxNzguODQzNzUgTCAxNzYuNSAxNzguODQzNzUgQyAxNzUuMjY2MTEgMTc4Ljg0Mzc1IDE3NC4yODEyNSAxNzguNDY1OTIgMTc0LjI4MTI1IDE3Ny45Njg3NSBMIDE3NC4yODEyNSAxNzMuNjI1IEMgMTc0LjI4MTI1IDE3My4xMjc4MyAxNzUuMjY2MTIgMTcyLjcxODc1IDE3Ni41IDE3Mi43MTg3NSB6ICINCiAgICAgICBpZD0icmVjdDMyMDkiIC8+DQogICAgPHBhdGgNCiAgICAgICBzdHlsZT0iZmlsbDojYzQyNjFkO2ZpbGwtb3BhY2l0eToxIg0KICAgICAgIGQ9Ik0gMjAgMCBDIDE4LjU1OTkzOCAwIDE3LjE2NDc0NyAwLjE1MDk4NjY2IDE1LjgxMjUgMC40Mzc1IEMgMTUuMjEwMjkxIDAuNTY1MTk1NzggMTQuNjExOTEzIDAuNzI2MjExMjYgMTQuMDMxMjUgMC45MDYyNSBDIDEzLjU1NDc3MyAxLjA1Mzk4NTIgMTMuMDg1MzQ5IDEuMjI0ODUzNiAxMi42MjUgMS40MDYyNSBDIDEyLjMyODc2NiAxLjUyMzA3MzkgMTIuMDM5MDMzIDEuNjUwOTE4MiAxMS43NSAxLjc4MTI1IEMgMTEuMzQ3Mjc4IDEuOTYyMzU5OCAxMC45NTA0MDYgMi4xMzc0MTY1IDEwLjU2MjUgMi4zNDM3NSBDIDEwLjUyMTU1NSAyLjM2NTU2ODggMTAuNDc4MjczIDIuMzg0MTU1NSAxMC40Mzc1IDIuNDA2MjUgQyAxMC40MTY5MzQgMi40MTczNzU0IDEwLjM5NTUyMiAyLjQyNjMwNDkgMTAuMzc1IDIuNDM3NSBDIDkuODMyNjg2MSAyLjczMzM0NDYgOS4zMjI2NDQ4IDMuMDYzMjQ1MiA4LjgxMjUgMy40MDYyNSBDIDguMjgzMTIyMSAzLjc2MjE4NjUgNy43NzI3NzI4IDQuMTU4OTIwOSA3LjI4MTI1IDQuNTYyNSBDIDcuMjc1MDU1IDQuNTY3NTg2NiA3LjI1NjE4ODggNC41NTc0MDYxIDcuMjUgNC41NjI1IEMgNy4yMzg1NDc5IDQuNTcxOTQzNCA3LjIzMDE4MDYgNC41ODQyODE2IDcuMjE4NzUgNC41OTM3NSBDIDcuMTA0NzM1MiA0LjY4ODAxNTkgNi45ODY4NTA3IDQuNzc4MjY4NyA2Ljg3NSA0Ljg3NSBDIDYuNTE1NzAyMSA1LjE4NjQyNjQgNi4xNzk3OTA5IDUuNTA3NzA5MSA1Ljg0Mzc1IDUuODQzNzUgQyA1LjQwNDQwMjUgNi4yODE4MDc4IDQuOTkwNzQ0OSA2Ljc0MTM1NTQgNC41OTM3NSA3LjIxODc1IEMgNC41NzkwMDg2IDcuMjM2NTQ2MiA0LjU3NzE4MDYgNy4yNjM0MDE1IDQuNTYyNSA3LjI4MTI1IEMgMy43Njc0ODk4IDguMjQzOTE4MSAzLjA0MjI3MjEgOS4yNzE4NzA1IDIuNDM3NSAxMC4zNzUgQyAyLjQyNjIyMzIgMTAuMzk1NjM1IDIuNDE3NDU2MSAxMC40MTY4MiAyLjQwNjI1IDEwLjQzNzUgQyAyLjEwODM5MDggMTAuOTg1MzQ4IDEuODQwMjIzMyAxMS41NDcyMTQgMS41OTM3NSAxMi4xMjUgQyAxLjU3NTU4NjUgMTIuMTY3NjY1IDEuNTQ5MTI1NSAxMi4yMDcxODIgMS41MzEyNSAxMi4yNSBDIDEuMjg3NzEzMSAxMi44MzI0MzMgMS4wOTQ2NzU0IDEzLjQyMTgyMiAwLjkwNjI1IDE0LjAzMTI1IEMgMC43Mjk2MzAxNCAxNC42MDI0OTUgMC41NjMwOTYzNCAxNS4xODg4MjggMC40Mzc1IDE1Ljc4MTI1IEMgMC4xNDY5MTQwNCAxNy4xNDI1NzggLTQuMzkwNjEzM2UtMTggMTguNTQ5NDY2IDAgMjAgTCAwIDIzMCBDIDAgMjQxLjA4IDguOTIgMjUwIDIwIDI1MCBMIDIzMCAyNTAgQyAyMzEuNDQwMDYgMjUwIDIzMi44MzUyNSAyNDkuODQ5MDEgMjM0LjE4NzUgMjQ5LjU2MjUgQyAyMzQuNzg5MDMgMjQ5LjQzNDk3IDIzNS4zODg2NiAyNDkuMjczODEgMjM1Ljk2ODc1IDI0OS4wOTM3NSBDIDIzNi40NDQ3NiAyNDguOTQ2IDIzNi45MTUwNSAyNDguNzc1MjYgMjM3LjM3NSAyNDguNTkzNzUgQyAyMzcuNjcxMjMgMjQ4LjQ3NjkzIDIzNy45NjA5NyAyNDguMzQ5MDggMjM4LjI1IDI0OC4yMTg3NSBDIDIzOC4yNzk4MSAyNDguMjA1MzEgMjM4LjMxNDAyIDI0OC4yMDEwOSAyMzguMzQzNzUgMjQ4LjE4NzUgQyAyMzguNzU4MzYgMjQ3Ljk5ODMgMjM5LjE2Mzc0IDI0Ny44MDk4MSAyMzkuNTYyNSAyNDcuNTkzNzUgQyAyMzkuNTgzMTggMjQ3LjU4MjU0IDIzOS42MDQzNiAyNDcuNTczNzggMjM5LjYyNSAyNDcuNTYyNSBDIDI0MC4xNjkyNSAyNDcuMjY1MTIgMjQwLjY3NTU4IDI0Ni45Mzg3MyAyNDEuMTg3NSAyNDYuNTkzNzUgQyAyNDEuNjY4NzggMjQ2LjI2OTQxIDI0Mi4xNDM1OSAyNDUuOTI2MzkgMjQyLjU5Mzc1IDI0NS41NjI1IEMgMjQyLjY0NDc0IDI0NS41MjEyOCAyNDIuNjk5NDMgMjQ1LjQ3OTIxIDI0Mi43NSAyNDUuNDM3NSBDIDI0Mi44NzY1MSAyNDUuMzMzMTggMjQzLjAwMTE1IDI0NS4yMzIzNSAyNDMuMTI1IDI0NS4xMjUgQyAyNDMuNDgyNjUgMjQ0LjgxNTM4IDI0My44MjE1NSAyNDQuNDkwMTkgMjQ0LjE1NjI1IDI0NC4xNTYyNSBDIDI0NC40OTIyOSAyNDMuODIwMjEgMjQ0LjgxMzU3IDI0My40ODQzIDI0NS4xMjUgMjQzLjEyNSBDIDI0NS4yMzE2NyAyNDMuMDAyMzQgMjQ1LjMzMzgxIDI0Mi44NzUyNyAyNDUuNDM3NSAyNDIuNzUgQyAyNDUuNDQyNzYgMjQyLjc0MzYyIDI0NS40MzIyNSAyNDIuNzI1MTMgMjQ1LjQzNzUgMjQyLjcxODc1IEMgMjQ1Ljg0MjQ5IDI0Mi4yMjgzIDI0Ni4yMzY0IDI0MS43MTU3NiAyNDYuNTkzNzUgMjQxLjE4NzUgQyAyNDYuOTM4MTIgMjQwLjY3ODQzIDI0Ny4yNjUzNiAyNDAuMTY2MjIgMjQ3LjU2MjUgMjM5LjYyNSBDIDI0Ny41NzM2MyAyMzkuNjA0NzIgMjQ3LjU4MjY4IDIzOS41ODI4MiAyNDcuNTkzNzUgMjM5LjU2MjUgQyAyNDcuODkxOTcgMjM5LjAxNDggMjQ4LjE1OTMxIDIzOC40NTIzOSAyNDguNDA2MjUgMjM3Ljg3NSBDIDI0OC40MTU1NCAyMzcuODUzMjggMjQ4LjQyODI5IDIzNy44MzQyNiAyNDguNDM3NSAyMzcuODEyNSBDIDI0OC40NDY0NCAyMzcuNzkxMjkgMjQ4LjQ1OTg4IDIzNy43NzEyNSAyNDguNDY4NzUgMjM3Ljc1IEMgMjQ4LjcwOTkyIDIzNy4xNzQ3NiAyNDguOTA2MjggMjM2LjU3MDA4IDI0OS4wOTM3NSAyMzUuOTY4NzUgQyAyNDkuMjczNzUgMjM1LjM5MTM3IDI0OS40MzQ2OCAyMzQuODE3NTQgMjQ5LjU2MjUgMjM0LjIxODc1IEMgMjQ5Ljg1MzA5IDIzMi44NTc0MiAyNTAgMjMxLjQ1MDUzIDI1MCAyMzAgTCAyNTAgMjAgQyAyNTAgOC45MiAyNDEuMDggLTMuMzUzNzk4N2UtMTcgMjMwIDAgTCAyMCAwIHogTSAzNC43ODEyNSAxOS40MDYyNSBMIDIyNS40Njg3NSAxOS40MDYyNSBDIDIyOC4zMDk0NiAxOS40MDYyNSAyMzAuNTkzNzUgMjEuNjkwNTQ0IDIzMC41OTM3NSAyNC41MzEyNSBMIDIzMC41OTM3NSAyMTUuMjUgTCAzNC43ODEyNSAxOS40MDYyNSB6IE0gMTkuNDA2MjUgMzQuNzUgTCAyMTUuMjE4NzUgMjMwLjU5Mzc1IEwgMjQuNTMxMjUgMjMwLjU5Mzc1IEMgMjEuNjkwNTQ0IDIzMC41OTM3NiAxOS40MDYyNSAyMjguMzA5NDYgMTkuNDA2MjUgMjI1LjQ2ODc1IEwgMTkuNDA2MjUgMzQuNzUgeiAiDQogICAgICAgaWQ9InBhdGgzMTk2IiAvPg0KICA8L2c+DQo8L3N2Zz4NCg==",+b.UNICODE_LINE_SEP=String.fromCharCode(8232));return b.UNICODE_LINE_SEP};b.prototype.setThemeAndVariant=function(a,c){this.theme=a;this.themeVariant=c};b.prototype.getTheme=function(){null!=this.theme&&this.theme.setVariant(this.themeVariant);return this.theme};b.prototype.getQuickStyleVals=function(){return this.quickStyleVals};b.prototype.processGeomList=function(a){if(!this.geomListProcessed){this.geomList=new g.mxgraph.io.vsdx.mxVsdxGeometryList(a);if(null!=this.geom)for(a=0;a<this.geom.length;a++)this.geomList.addGeometry(this.geom[a]);+this.geomListProcessed=!0}};b.prototype.parseShapeElem=function(a,c){h.prototype.parseShapeElem.call(this,a,c);var d=a.nodeName;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(d,"ForeignData")){d=function(A,C){for(A=A.firstChild;null!=A;){if(1==A.nodeType){var I=A;if("rel"==I.nodeName.toLowerCase()&&(I=I.getAttribute("r:id"),null!=I&&0!==I.length)){A=C.lastIndexOf("/");var Q="",K="";try{Q=C.substring(0,A),K=C.substring(A,C.length)}catch(L){break}A=c.getRelationship(I,Q+"/_rels"+K+".rels");if(null!=A){C=A.getAttribute("Target")||"";I=A.getAttribute("Type");A=C.lastIndexOf("/");try{C=C.substring(A+1,C.length)}catch(L){break}return{type:I,target:C}}break}}A=A.nextSibling}};var f=a.ownerDocument.vsdxFileName,k=a.getAttribute("ForeignType"),n=a.getAttribute("CompressionType")||"",q=null;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"Bitmap"))n=n.toLowerCase();else if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"MetaFile"))n="png";else if(function(A,C){return A&&A.equals?-A.equals(C):A===C}(k,"Enhanced Metafile")||function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"EnhMetaFile"))n="png";else if("Object"==k){if(q=d(a,f),0<q.type.indexOf("/oleObject"))if(n=b.getRelationship("rId1","visio/embeddings/_rels/"+q.target+".rels"),null!=n){q=n.getAttribute("Target");k=n.getAttribute("Type");try{var t=q.lastIndexOf("/");q=q.substring(t+1,q.length)}catch(A){return}n="png";q={type:k,target:q}}else return}else return;null==q&&(q=d(a,f));k=q.type;q=q.target;null!=k&&function(A,-C){var I=A.length-C.length;A=A.indexOf(C,I);return-1!==A&&A===I}(k,"image")&&(this.imageData={},(a=b.getMedia(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+q))?(this.imageData.iData=a,function(A,C){var I=A.length-C.length;A=A.indexOf(C,I);return-1!==A&&A===I}(q.toLowerCase(),".bmp")&&(n="jpg"),this.imageData.iType=n):(this.imageData.iData=c.ERROR_IMAGE,this.imageData.iType="svg+xml"))}else(function(A,C){return A&&A.equals?A.equals(C):A===C})(d,g.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text=-a)};c.prototype.parseSection=function(a){var b=a.getAttribute("N");if(function(I,Q){return I&&I.equals?I.equals(Q):I===Q}(b,"Geometry"))null==this.geom&&(this.geom=[]),this.geom.push(a);else if(function(I,Q){return I&&I.equals?I.equals(Q):I===Q}(b,"Field")){a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var d=0;d<a.length;d++){b=a[d];var f=b.getAttribute("IX")||"";if(0!==f.length)if(null==this.fields&&(this.fields={}),function(I,Q){return I&&I.equals?I.equals(Q):I===Q}("1",-b.getAttribute("Del")))this.fields[f]="";else{for(var k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Cell"),n="",q="",t=0;t<k.length;t++){var A=k[t];b=A.getAttribute("N");A=A.getAttribute("V")||A.textContent||"";switch(b){case "Value":n=A;break;case "Format":q=A}}if("esc(0)"==q)this.fields[f]=n;else if(0!==n.length){try{var C=isNaN(n)?new Date(n):new Date(c.VSDX_START_TIME+Math.floor(864E5*parseFloat(n)));q="c"==q?0==C.getHours()+C.getMinutes()+C.getSeconds()+C.getMilliseconds()?"m/d/yyyy":-"m/d/yyyy h:MM:ss tt":"ddddd"==q?"m/d/yyyy":"dddddd"==q?"dddd, mmmm dd, yyyy":"C"==q?"dddd, mmmm dd, yyyy h:MM:ss tt":"T"==q?"h:MM:ss tt":q.replace(/am\/pm/g,"tt").replace(/m/g,"@").replace(/M/g,"m").replace(/@/g,"M");n=Graph.prototype.formatDate(C,"UTC:"+q.replace(RegExp("\\{|\\}","g"),""))}catch(I){}this.fields[f]=n}}}}else h.prototype.parseSection.call(this,a)};c.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};c.prototype.getText=function(){return null!=-this.text?this.text.textContent:null};c.prototype.getTextChildren=function(){return null!=this.text?this.text.childNodes:null};c.prototype.getWidth=function(){if(1>this.width&&null!=this.childShapes)try{for(var a=0;a<this.childShapes.entries.length;a++)this.width=Math.max(this.childShapes.entries[a].value.width,this.width)}catch(b){}return 0===this.width&&0<this.height?1:this.width};c.prototype.getHeight=function(){if(1>this.height&&null!=this.childShapes)try{for(var a=0;a<this.childShapes.entries.length;a++)this.height=-Math.max(this.childShapes.entries[a].value.height,this.height)}catch(b){}return 0===this.height&&0<this.width?1:this.height};c.prototype.getRotation=function(){return this.rotation};c.prototype.getStyleMap=function(){return this.styleMap};c.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)};c.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};c.prototype.getPPList=function(a){var b=null;""!=a&&(a=this.getBullet(a),"0"!=a&&(b='<ul style="margin: 0;list-style-type: '+-("4"==a?"square":"disc")+'">'));return b};c.prototype.getTextParagraphFormated=function(a){var b="",d={};d["text-align"]=this.getHorizontalAlign(this.pp,!0);d["margin-left"]=this.getIndentLeft(this.pp);d["margin-right"]=this.getIndentRight(this.pp);d["margin-top"]=this.getSpBefore(this.pp)+"px";d["margin-bottom"]=this.getSpAfter(this.pp)+"px";d["text-indent"]=this.getIndentFirst(this.pp);d["vertical-align"]=this.getAlignVertical();d.direction=this.getTextDirection(this.pp);return b+=this.insertAttributes(a,-d)};c.prototype.getTextCharFormated=function(a){var b="color:"+this.getTextColor(this.cp)+";",d="font-size:"+parseFloat(this.getTextSize(this.cp))+"px;",f="font-family:"+this.getTextFont(this.cp)+";",k="direction:"+this.getRtlText(this.cp)+";",n="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",q="line-height:"+this.getSpcLine(this.pp),t=";opacity:"+this.getTextOpacity(this.cp),A=this.getTextPos(this.cp),C=this.getTextCase(this.cp);(function(I,Q){return I&&I.equals?I.equals(Q):+A.equals(C):A===C}(k,"Enhanced Metafile")||function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"EnhMetaFile"))n="png";else if("Object"==k){if(q=d(a,f),0<q.type.indexOf("/oleObject"))if(n=c.getRelationship("rId1","visio/embeddings/_rels/"+q.target+".rels"),null!=n){q=n.getAttribute("Target");k=n.getAttribute("Type");try{var t=q.lastIndexOf("/");q=q.substring(t+1,q.length)}catch(A){return}n="png";q={type:k,target:q}}else return}else return;null==q&&(q=d(a,f));k=q.type;q=q.target;null!=k&&function(A,+C){var I=A.length-C.length;A=A.indexOf(C,I);return-1!==A&&A===I}(k,"image")&&(this.imageData={},(a=c.getMedia(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+q))?(this.imageData.iData=a,function(A,C){var I=A.length-C.length;A=A.indexOf(C,I);return-1!==A&&A===I}(q.toLowerCase(),".bmp")&&(n="jpg"),this.imageData.iType=n):(this.imageData.iData=b.ERROR_IMAGE,this.imageData.iType="svg+xml"))}else(function(A,C){return A&&A.equals?A.equals(C):A===C})(d,g.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text=+a)};b.prototype.parseSection=function(a){var c=a.getAttribute("N");if(function(I,Q){return I&&I.equals?I.equals(Q):I===Q}(c,"Geometry"))null==this.geom&&(this.geom=[]),this.geom.push(a);else if(function(I,Q){return I&&I.equals?I.equals(Q):I===Q}(c,"Field")){a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var d=0;d<a.length;d++){c=a[d];var f=c.getAttribute("IX")||"";if(0!==f.length)if(null==this.fields&&(this.fields={}),function(I,Q){return I&&I.equals?I.equals(Q):I===Q}("1",+c.getAttribute("Del")))this.fields[f]="";else{for(var k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"Cell"),n="",q="",t=0;t<k.length;t++){var A=k[t];c=A.getAttribute("N");A=A.getAttribute("V")||A.textContent||"";switch(c){case "Value":n=A;break;case "Format":q=A}}if("esc(0)"==q)this.fields[f]=n;else if(0!==n.length){try{var C=isNaN(n)?new Date(n):new Date(b.VSDX_START_TIME+Math.floor(864E5*parseFloat(n)));q="c"==q?0==C.getHours()+C.getMinutes()+C.getSeconds()+C.getMilliseconds()?"m/d/yyyy":+"m/d/yyyy h:MM:ss tt":"ddddd"==q?"m/d/yyyy":"dddddd"==q?"dddd, mmmm dd, yyyy":"C"==q?"dddd, mmmm dd, yyyy h:MM:ss tt":"T"==q?"h:MM:ss tt":q.replace(/am\/pm/g,"tt").replace(/m/g,"@").replace(/M/g,"m").replace(/@/g,"M");n=Graph.prototype.formatDate(C,"UTC:"+q.replace(RegExp("\\{|\\}","g"),""))}catch(I){}this.fields[f]=n}}}}else h.prototype.parseSection.call(this,a)};b.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};b.prototype.getText=function(){return null!=+this.text?this.text.textContent:null};b.prototype.getTextChildren=function(){return null!=this.text?this.text.childNodes:null};b.prototype.getWidth=function(){if(1>this.width&&null!=this.childShapes)try{for(var a=0;a<this.childShapes.entries.length;a++)this.width=Math.max(this.childShapes.entries[a].value.width,this.width)}catch(c){}return 0===this.width&&0<this.height?1:this.width};b.prototype.getHeight=function(){if(1>this.height&&null!=this.childShapes)try{for(var a=0;a<this.childShapes.entries.length;a++)this.height=+Math.max(this.childShapes.entries[a].value.height,this.height)}catch(c){}return 0===this.height&&0<this.width?1:this.height};b.prototype.getRotation=function(){return this.rotation};b.prototype.getStyleMap=function(){return this.styleMap};b.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)};b.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};b.prototype.getPPList=function(a){var c=null;""!=a&&(a=this.getBullet(a),"0"!=a&&(c='<ul style="margin: 0;list-style-type: '++("4"==a?"square":"disc")+'">'));return c};b.prototype.getTextParagraphFormated=function(a){var c="",d={};d["text-align"]=this.getHorizontalAlign(this.pp,!0);d["margin-left"]=this.getIndentLeft(this.pp);d["margin-right"]=this.getIndentRight(this.pp);d["margin-top"]=this.getSpBefore(this.pp)+"px";d["margin-bottom"]=this.getSpAfter(this.pp)+"px";d["text-indent"]=this.getIndentFirst(this.pp);d["vertical-align"]=this.getAlignVertical();d.direction=this.getTextDirection(this.pp);return c+=this.insertAttributes(a,+d)};b.prototype.getTextCharFormated=function(a){var c="color:"+this.getTextColor(this.cp)+";",d="font-size:"+parseFloat(this.getTextSize(this.cp))+"px;",f="font-family:"+this.getTextFont(this.cp)+";",k="direction:"+this.getRtlText(this.cp)+";",n="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",q="line-height:"+this.getSpcLine(this.pp),t=";opacity:"+this.getTextOpacity(this.cp),A=this.getTextPos(this.cp),C=this.getTextCase(this.cp);(function(I,Q){return I&&I.equals?I.equals(Q):I===Q})(C,"1")?a=a.toUpperCase():function(I,Q){return I&&I.equals?I.equals(Q):I===Q}(C,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(I,Q){return I&&I.equals?I.equals(Q):I===Q})(A,"1")?a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(I,Q){return I&&I.equals?I.equals(Q):I===Q}(A,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sub"));a=this.isBold(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"b"):a;a=this.isItalic(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,-"i"):a;a=this.isUnderline(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"u"):a;a=this.getTextStrike(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"s"):a;a=this.isSmallCaps(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.toSmallCaps(a,this.getTextSize(this.cp)):a;return'<font style="'+d+f+b+k+n+q+t+'">'+a+"</font>"};c.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(b,d){return b&&b.equals?b.equals(d):b===d})(a,"0")?a="ltr":function(b,d){return b&&b.equals?b.equals(d):-b===d}(a,"1")&&(a="rtl");return a};c.prototype.getSpcLine=function(a){var b=!1;a=this.getSpLine(a);0<a?a*=g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():(a=0===a?100:100*Math.abs(a),b=!0);return(new String(a)).toString()+(b?"%":"px")};c.prototype.getSpcBefore=function(a){return this.getSpBefore(a)};c.prototype.insertAttributes=function(a,b){if(-1!=a.indexOf(">")){var d=a.indexOf(">"),f=a.substring(d);a=a.substring(0,d);b=' style="'+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,":")+'"';return a+-b+f}return a};c.prototype.getRtlText=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.RTL_TEXT,a,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);a=this.getValue(a,"ltr");(function(b,d){return b&&b.equals?b.equals(d):b===d})(a,"0")?a="ltr":function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1")&&(a="rtl");return a};c.prototype.isBold=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,-"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=1===(parseInt(a)&1));return b};c.prototype.isItalic=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=2===(parseInt(a)&2));return b};c.prototype.isUnderline=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&-d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=4===(parseInt(a)&4));return b};c.prototype.isSmallCaps=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=8===(parseInt(a)&8));return b};c.prototype.getTextOpacity=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR_TRANS,a,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);-a=this.getValue(a,"0");var b="1";null!=a&&0!==a.length&&(a=1-parseFloat(a),b=(new String(a)).toString());return b};c.prototype.getTextSize=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SIZE,a,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getScreenNumericalValue$org_w3c_dom_Element$double(a,12);return""+Math.round(100*a)/100};c.prototype.getAlignVertical=function(){var a=mxConstants.ALIGN_MIDDLE,b=parseInt(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.VERTICAL_ALIGN),-"1"));0===b?a=mxConstants.ALIGN_TOP:2===b&&(a=mxConstants.ALIGN_BOTTOM);return a};c.prototype.getGeomList=function(){return this.geomList};c.prototype.getLastX=function(){return this.lastX};c.prototype.getLastY=function(){return this.lastY};c.prototype.getLastMoveX=function(){return this.lastMoveX};c.prototype.getLastMoveY=function(){return this.lastMoveY};c.prototype.getLastKnot=function(){return this.lastKnot};c.prototype.setLastX=function(a){this.lastX=a};c.prototype.setLastY=function(a){this.lastY=-a};c.prototype.setLastMoveX=function(a){this.lastMoveX=a};c.prototype.setLastMoveY=function(a){this.lastMoveY=a};c.prototype.setLastKnot=function(a){this.lastKnot=a};c.prototype.getConnections=function(){var a=[];if(this.sections&&this.sections.Connection)for(var b=this.getHeight(),d=this.getWidth(),f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Connection.elem,"Row"),k=0;k<f.length;k++){for(var n=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f[k]),q,t,A=0;A<n.length;A++){var C=-n[A],I=C.getAttribute("N");C=this.getScreenNumericalValue$org_w3c_dom_Element$double(C,0);"X"==I?q=mxUtils.format(C/d):"Y"==I&&(t=mxUtils.format(1-C/b))}null!=q&&null!=t&&a.push({x:q,y:t})}0==a.length&&this.master&&this.master.masterShape&&(a=this.master.masterShape.getConnections());return a};return c}(g.mxgraph.io.vsdx.Style);m.VSDX_START_TIME=(new Date("1899-12-30T00:00:00Z")).getTime();B.Shape=m;m.__class="com.mxgraph.io.vsdx.Shape"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=+"i"):a;a=this.isUnderline(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"u"):a;a=this.getTextStrike(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"s"):a;a=this.isSmallCaps(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.toSmallCaps(a,this.getTextSize(this.cp)):a;return'<font style="'+d+f+c+k+n+q+t+'">'+a+"</font>"};b.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(c,d){return c&&c.equals?c.equals(d):c===d})(a,"0")?a="ltr":function(c,d){return c&&c.equals?c.equals(d):+c===d}(a,"1")&&(a="rtl");return a};b.prototype.getSpcLine=function(a){var c=!1;a=this.getSpLine(a);0<a?a*=g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():(a=0===a?100:100*Math.abs(a),c=!0);return(new String(a)).toString()+(c?"%":"px")};b.prototype.getSpcBefore=function(a){return this.getSpBefore(a)};b.prototype.insertAttributes=function(a,c){if(-1!=a.indexOf(">")){var d=a.indexOf(">"),f=a.substring(d);a=a.substring(0,d);c=' style="'+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(c,":")+'"';return a++c+f}return a};b.prototype.getRtlText=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.RTL_TEXT,a,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);a=this.getValue(a,"ltr");(function(c,d){return c&&c.equals?c.equals(d):c===d})(a,"0")?a="ltr":function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"1")&&(a="rtl");return a};b.prototype.isBold=function(a){var c=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,+"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(c=1===(parseInt(a)&1));return c};b.prototype.isItalic=function(a){var c=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(c=2===(parseInt(a)&2));return c};b.prototype.isUnderline=function(a){var c=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&+d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(c=4===(parseInt(a)&4));return c};b.prototype.isSmallCaps=function(a){var c=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(c=8===(parseInt(a)&8));return c};b.prototype.getTextOpacity=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR_TRANS,a,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);+a=this.getValue(a,"0");var c="1";null!=a&&0!==a.length&&(a=1-parseFloat(a),c=(new String(a)).toString());return c};b.prototype.getTextSize=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SIZE,a,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getScreenNumericalValue$org_w3c_dom_Element$double(a,12);return""+Math.round(100*a)/100};b.prototype.getAlignVertical=function(){var a=mxConstants.ALIGN_MIDDLE,c=parseInt(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.VERTICAL_ALIGN),+"1"));0===c?a=mxConstants.ALIGN_TOP:2===c&&(a=mxConstants.ALIGN_BOTTOM);return a};b.prototype.getGeomList=function(){return this.geomList};b.prototype.getLastX=function(){return this.lastX};b.prototype.getLastY=function(){return this.lastY};b.prototype.getLastMoveX=function(){return this.lastMoveX};b.prototype.getLastMoveY=function(){return this.lastMoveY};b.prototype.getLastKnot=function(){return this.lastKnot};b.prototype.setLastX=function(a){this.lastX=a};b.prototype.setLastY=function(a){this.lastY=+a};b.prototype.setLastMoveX=function(a){this.lastMoveX=a};b.prototype.setLastMoveY=function(a){this.lastMoveY=a};b.prototype.setLastKnot=function(a){this.lastKnot=a};b.prototype.getConnections=function(){var a=[];if(this.sections&&this.sections.Connection)for(var c=this.getHeight(),d=this.getWidth(),f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Connection.elem,"Row"),k=0;k<f.length;k++){for(var n=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f[k]),q,t,A=0;A<n.length;A++){var C=+n[A],I=C.getAttribute("N");C=this.getScreenNumericalValue$org_w3c_dom_Element$double(C,0);"X"==I?q=mxUtils.format(C/d):"Y"==I&&(t=mxUtils.format(1-C/c))}null!=q&&null!=t&&a.push({x:q,y:t})}0==a.length&&this.master&&this.master.masterShape&&(a=this.master.masterShape.getConnections());return a};return b}(g.mxgraph.io.vsdx.Style);m.VSDX_START_TIME=(new Date("1899-12-30T00:00:00Z")).getTime();B.Shape=m;m.__class="com.mxgraph.io.vsdx.Shape"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(h){function c(a,b,d,f,k,n){function q(){var I;if(I=2!=a.connectsMap[t.Id])if(I=null!=t.childShapes)I=t.childShapes,null==I.entries&&(I.entries=[]),I=0!=I.entries.length;try{if(1==t.childShapes.entries.length){var Q=t.childShapes.entries[0].value,K=t.fields?Object.values(t.fields).join(""):t.text.textContent,L=Q.fields?Object.values(Q.fields).join(""):Q.text.textContent;K==L&&(I=!1,t.childShapes.entries=[],t.noLabelGroup=!0)}}catch(S){console.log(S)}return I}-var t=this;t.masterShape=null;t.master=null;t.parentHeight=0;t=h.call(this,b,n)||this;t.htmlLabels=!0;t.rootShape=t;t.shapeName=null;t.shapeIndex=0;t.vertex=!0;t.childShapes={};var A=t.getMasterId(),C=t.getShapeMasterId();t.master=null!=A?f[A]?f[A]:null:k;null!=t.master&&(t.masterShape=null==A&&null!=C?t.master.getSubShape(C):t.master.getMasterShape());f=t.getNameU();k=f.lastIndexOf(".");-1!==k&&(f=f.substring(0,k));t.shapeName=f;b=b.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);-null!=b&&0<b.length&&(b=b.item(0),t.childShapes=a.parseShapes(b,t.master,!1));b=t.calcRotation();t.rotation=100*b/100;t.rotation%=360;b=a.getCellIntValue("ThemeIndex",-100);-100===b&&(b=parseInt(t.getValue(t.getCellElement$java_lang_String("ThemeIndex"),"0")));n=function(I,Q){null==I.entries&&(I.entries=[]);for(var K=0;K<I.entries.length;K++)if(null!=I.entries[K].key.equals&&I.entries[K].key.equals(Q)||I.entries[K].key===Q)return I.entries[K].value;return null}(n.getThemes(),b);null==n&&"1"==urlParams.dev&&-console.log("No theme found for index "+b);b=a.getCellIntValue("VariationColorIndex",0);t.setThemeAndVariant(n,b);f=function(I){null==I.entries&&(I.entries=[]);return I.entries}(t.childShapes);for(k=0;k<f.length;k++)A=f[k].getValue(),A.setRootShape(t),null==A.theme&&A.setThemeAndVariant(n,b);t.quickStyleVals=new g.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFillColor"),+(function(g){(function(y){(function(z){(function(B){var m=function(h){function b(a,c,d,f,k,n){function q(){var I;if(I=2!=a.connectsMap[t.Id])if(I=null!=t.childShapes)I=t.childShapes,null==I.entries&&(I.entries=[]),I=0!=I.entries.length;try{if(1==t.childShapes.entries.length){var Q=t.childShapes.entries[0].value,K=t.fields?Object.values(t.fields).join(""):t.text.textContent,L=Q.fields?Object.values(Q.fields).join(""):Q.text.textContent;K==L&&(I=!1,t.childShapes.entries=[],t.noLabelGroup=!0)}}catch(S){console.log(S)}return I}+var t=this;t.masterShape=null;t.master=null;t.parentHeight=0;t=h.call(this,c,n)||this;t.htmlLabels=!0;t.rootShape=t;t.shapeName=null;t.shapeIndex=0;t.vertex=!0;t.childShapes={};var A=t.getMasterId(),C=t.getShapeMasterId();t.master=null!=A?f[A]?f[A]:null:k;null!=t.master&&(t.masterShape=null==A&&null!=C?t.master.getSubShape(C):t.master.getMasterShape());f=t.getNameU();k=f.lastIndexOf(".");-1!==k&&(f=f.substring(0,k));t.shapeName=f;c=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);+null!=c&&0<c.length&&(c=c.item(0),t.childShapes=a.parseShapes(c,t.master,!1));c=t.calcRotation();t.rotation=100*c/100;t.rotation%=360;c=a.getCellIntValue("ThemeIndex",-100);-100===c&&(c=parseInt(t.getValue(t.getCellElement$java_lang_String("ThemeIndex"),"0")));n=function(I,Q){null==I.entries&&(I.entries=[]);for(var K=0;K<I.entries.length;K++)if(null!=I.entries[K].key.equals&&I.entries[K].key.equals(Q)||I.entries[K].key===Q)return I.entries[K].value;return null}(n.getThemes(),c);null==n&&"1"==urlParams.dev&&+console.log("No theme found for index "+c);c=a.getCellIntValue("VariationColorIndex",0);t.setThemeAndVariant(n,c);f=function(I){null==I.entries&&(I.entries=[]);return I.entries}(t.childShapes);for(k=0;k<f.length;k++)A=f[k].getValue(),A.setRootShape(t),null==A.theme&&A.setThemeAndVariant(n,c);t.quickStyleVals=new g.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFillColor"),"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFillMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFontColor"),"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFontMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleLineColor"),"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleLineMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleShadowColor"),"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleType"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleVariation"),"0")));null!=t.masterShape?(t.masterShape.processGeomList(null),t.processGeomList(t.masterShape.getGeomList()),0===t.width&&(t.width=t.getScreenNumericalValue$org_w3c_dom_Element$double(t.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0)),0===t.height&&(t.height=t.getScreenNumericalValue$org_w3c_dom_Element$double(t.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),-0))):t.processGeomList(null);t.vertex=d||q()||null!=t.geomList&&(!t.geomList.isNoFill()||1<t.geomList.getGeoCount());t.layerMember=t.getValue(t.getCellElement$java_lang_String("LayerMember"));t.layerMember&&(t.layerMember=t.layerMember.split(";"));return t}__extends(c,h);c.__static_initialize=function(){c.__static_initialized||(c.__static_initialized=!0,c.__static_initializer_0())};c.OFFSET_ARRAY_$LI$=function(){c.__static_initialize();null==c.OFFSET_ARRAY&&(c.OFFSET_ARRAY=["Organizational unit",-"Domain 3D"].slice(0).slice(0));return c.OFFSET_ARRAY};c.arrowSizes_$LI$=function(){c.__static_initialize();null==c.arrowSizes&&(c.arrowSizes=[2,3,5,7,9,22,45]);return c.arrowSizes};c.arrowTypes_$LI$=function(){c.__static_initialize();return c.arrowTypes};c.__static_initializer_0=function(){c.arrowTypes={};(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,-value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),0,mxConstants.NONE);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),1,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&-(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),2,"blockThin");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,-value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),3,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),4,mxConstants.ARROW_BLOCK);(function(a,b,d){null==-a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),5,mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=-d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),10,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),13,mxConstants.ARROW_BLOCK);-(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),14,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||-a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),17,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),-20,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),22,c.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=-a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),23,"dash");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),24,"ERone");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),25,"ERmandOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=-a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),27,"ERmany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),28,"ERoneToMany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),29,"ERzeroToMany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=-a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),30,"ERzeroToOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),6,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),7,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<-a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),8,mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,-value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),9,"openAsync");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),11,"diamond");(function(a,b,d){null==a.entries&&(a.entries=-[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),12,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,-value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),15,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),16,c.ARROW_NO_FILL_MARKER+-mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),18,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&-a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),19,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),21,c.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),26,"ERmandOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<-a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),31,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,-value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),32,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),33,c.ARROW_NO_FILL_MARKER+-mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),34,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&-a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),35,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),-36,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),37,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||-a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),38,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),-39,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),40,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&-a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),41,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),42,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),43,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<-a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),44,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,-value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),45,mxConstants.ARROW_OPEN)};c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$=function(){c.__static_initialize();null==c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER&&(c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER={});return c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER};c.prototype.getShapeNode=function(a){var b=this.cellElements;b=b[a]?b[a]:null;return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):-b};c.prototype.getTextLabel=function(a){var b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HIDE_TEXT),"0");b="1".equals?"1".equals(b):"1"===b;if(b)return null;b=this.getTextChildren();null==b&&null!=this.masterShape&&(b=this.masterShape.getTextChildren());if(this.htmlLabels){if(null!=b)return this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical(),this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign("0",!1),a||(this.styleMap.overflow=-"width"),this.getHtmlTextContent(b)}else return a=this.getText(),null==a&&null!=this.masterShape?this.masterShape.getText():a;return null};c.prototype.getIndex=function(a){a=a.getAttribute("IX")||"";return 0===a.length?"0":a};c.prototype.initLabels=function(a){this.paragraphs={};for(var b=null,d=null,f=null,k=0;k<a.length;k++){var n=a.item(k);switch(n.nodeName){case "cp":b=this.getIndex(n);break;case "tp":this.getIndex(n);break;case "pp":d=this.getIndex(n);break;case "fld":f=this.getIndex(n);break;-case "#text":n=n.textContent;var q=this.paragraphs;q=q[d]?q[d]:null;null==q?(q=new g.mxgraph.io.vsdx.Paragraph(n,b,d,f),this.paragraphs[d]=q):q.addText(n,b,f)}}};c.prototype.createHybridLabel=function(a){var b=function(q,t){return q[t]?q[t]:null}(this.paragraphs,a);this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign(a,!1);this.styleMap[mxConstants.STYLE_SPACING_LEFT]=this.getIndentLeft(a);this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=this.getIndentRight(a);this.styleMap[mxConstants.STYLE_SPACING_TOP]=-this.getSpBefore(a);this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=this.getSpAfter(a);this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical();this.styleMap.fontColor=this.getTextColor(a);this.styleMap.fontSize=this.getTextSize(a);this.styleMap.fontFamily=this.getTextFont(a);var d=this.isBold(a)?mxConstants.FONT_BOLD:0;d|=this.isItalic(a)?mxConstants.FONT_ITALIC:0;d|=this.isUnderline(a)?mxConstants.FONT_UNDERLINE:0;this.styleMap.fontStyle=(new String(d)).toString();a=b.numValues();-d=null;for(var f=0;f<a;f++){var k=b.getValue(f);if(0===k.length&&null!=this.fields){var n=b.getField(f);null!=n&&(k=function(q,t){return q[t]?q[t]:null}(this.fields,n),null==k&&null!=this.masterShape&&null!=this.masterShape.fields&&(k=function(q,t){return q[t]?q[t]:null}(this.masterShape.fields,n)))}null!=k&&(d=null==d?k:d+k)}return d};c.prototype.getHtmlTextContent=function(a){function b(A){A=g.mxgraph.io.vsdx.mxVsdxUtils.htmlEntities(A);n&&(A="<li>"+A,n=!1);k?(A=A.split("\n"),A[A.length-1]||(A.pop(),+0))):t.processGeomList(null);t.vertex=d||q()||null!=t.geomList&&(!t.geomList.isNoFill()||1<t.geomList.getGeoCount());t.layerMember=t.getValue(t.getCellElement$java_lang_String("LayerMember"));t.layerMember&&(t.layerMember=t.layerMember.split(";"));return t}__extends(b,h);b.__static_initialize=function(){b.__static_initialized||(b.__static_initialized=!0,b.__static_initializer_0())};b.OFFSET_ARRAY_$LI$=function(){b.__static_initialize();null==b.OFFSET_ARRAY&&(b.OFFSET_ARRAY=["Organizational unit",+"Domain 3D"].slice(0).slice(0));return b.OFFSET_ARRAY};b.arrowSizes_$LI$=function(){b.__static_initialize();null==b.arrowSizes&&(b.arrowSizes=[2,3,5,7,9,22,45]);return b.arrowSizes};b.arrowTypes_$LI$=function(){b.__static_initialize();return b.arrowTypes};b.__static_initializer_0=function(){b.arrowTypes={};(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),0,mxConstants.NONE);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),1,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&+(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),2,"blockThin");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),3,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),4,mxConstants.ARROW_BLOCK);(function(a,c,d){null==+a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),5,mxConstants.ARROW_CLASSIC);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=+d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),10,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),13,mxConstants.ARROW_BLOCK);+(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),14,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||+a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),17,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),+20,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),22,b.ARROW_NO_FILL_MARKER+"diamond");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=+a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),23,"dash");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},+getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),24,"ERone");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),25,"ERmandOne");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=+a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),27,"ERmany");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},+getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),28,"ERoneToMany");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),29,"ERzeroToMany");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=+a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),30,"ERzeroToOne");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},+getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),6,mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),7,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<+a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),8,mxConstants.ARROW_CLASSIC);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),9,"openAsync");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),11,"diamond");(function(a,c,d){null==a.entries&&(a.entries=+[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),12,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),15,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),16,b.ARROW_NO_FILL_MARKER++mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),18,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&+a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),19,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},+getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),21,b.ARROW_NO_FILL_MARKER+"diamond");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),26,"ERmandOne");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<+a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),31,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),32,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),33,b.ARROW_NO_FILL_MARKER++mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),34,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&+a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),35,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),+36,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),37,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||+a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),38,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),+39,mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),40,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&+a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),41,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},+getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),42,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),43,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<+a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),44,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),45,mxConstants.ARROW_OPEN)};b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$=function(){b.__static_initialize();null==b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER&&(b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER={});return b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER};b.prototype.getShapeNode=function(a){var c=this.cellElements;c=c[a]?c[a]:null;return null==c&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):+c};b.prototype.getTextLabel=function(a){var c=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HIDE_TEXT),"0");c="1".equals?"1".equals(c):"1"===c;if(c)return null;c=this.getTextChildren();null==c&&null!=this.masterShape&&(c=this.masterShape.getTextChildren());if(this.htmlLabels){if(null!=c)return this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical(),this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign("0",!1),a||(this.styleMap.overflow=+"width"),this.getHtmlTextContent(c)}else return a=this.getText(),null==a&&null!=this.masterShape?this.masterShape.getText():a;return null};b.prototype.getIndex=function(a){a=a.getAttribute("IX")||"";return 0===a.length?"0":a};b.prototype.initLabels=function(a){this.paragraphs={};for(var c=null,d=null,f=null,k=0;k<a.length;k++){var n=a.item(k);switch(n.nodeName){case "cp":c=this.getIndex(n);break;case "tp":this.getIndex(n);break;case "pp":d=this.getIndex(n);break;case "fld":f=this.getIndex(n);break;+case "#text":n=n.textContent;var q=this.paragraphs;q=q[d]?q[d]:null;null==q?(q=new g.mxgraph.io.vsdx.Paragraph(n,c,d,f),this.paragraphs[d]=q):q.addText(n,c,f)}}};b.prototype.createHybridLabel=function(a){var c=function(q,t){return q[t]?q[t]:null}(this.paragraphs,a);this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign(a,!1);this.styleMap[mxConstants.STYLE_SPACING_LEFT]=this.getIndentLeft(a);this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=this.getIndentRight(a);this.styleMap[mxConstants.STYLE_SPACING_TOP]=+this.getSpBefore(a);this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=this.getSpAfter(a);this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical();this.styleMap.fontColor=this.getTextColor(a);this.styleMap.fontSize=this.getTextSize(a);this.styleMap.fontFamily=this.getTextFont(a);var d=this.isBold(a)?mxConstants.FONT_BOLD:0;d|=this.isItalic(a)?mxConstants.FONT_ITALIC:0;d|=this.isUnderline(a)?mxConstants.FONT_UNDERLINE:0;this.styleMap.fontStyle=(new String(d)).toString();a=c.numValues();+d=null;for(var f=0;f<a;f++){var k=c.getValue(f);if(0===k.length&&null!=this.fields){var n=c.getField(f);null!=n&&(k=function(q,t){return q[t]?q[t]:null}(this.fields,n),null==k&&null!=this.masterShape&&null!=this.masterShape.fields&&(k=function(q,t){return q[t]?q[t]:null}(this.masterShape.fields,n)))}null!=k&&(d=null==d?k:d+k)}return d};b.prototype.getHtmlTextContent=function(a){function c(A){A=g.mxgraph.io.vsdx.mxVsdxUtils.htmlEntities(A);n&&(A="<li>"+A,n=!1);k?(A=A.split("\n"),A[A.length-1]||(A.pop(),n=!0),A=A.join("</li><li>")):A=A.replace(RegExp("\n","g"),"<br/>").replace(new RegExp(g.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP,"g"),"<br/>");return this.getTextCharFormated(A)}var d="",f=!0,k=!1,n=!1;if(null!=a&&0<a.length)for(var q=0;q<a.length;q++){var t=a.item(q);(function(A,C){return A&&A.equals?A.equals(C):A===C})(t.nodeName,"cp")?this.cp=this.getIndex(t):function(A,C){return A&&A.equals?A.equals(C):A===C}(t.nodeName,"tp")?this.tp=this.getIndex(t):function(A,C){return A&&A.equals?A.equals(C):A===C}(t.nodeName,"pp")?(this.pp=this.getIndex(t),k&&(d+="</li></ul>"),f?f=!1:d+="</p>",d+=this.getTextParagraphFormated("<p>"),t=this.getPPList(this.pp),n=k=null!=t,d+=k?t:""):function(A,C){return A&&A.equals?A.equals(C):A===C}(t.nodeName,"fld")?(this.fld=this.getIndex(t),t=null,null!=this.fields&&(t=function(A,C){return A[C]?A[C]:null}(this.fields,this.fld)),null==t&&null!=this.masterShape&&null!=this.masterShape.fields&&(t=function(A,C){return A[C]?A[C]:null}(this.masterShape.fields,this.fld)),-null!=t&&(d+=b.call(this,t))):function(A,C){return A&&A.equals?A.equals(C):A===C}(t.nodeName,"#text")&&(t=t.textContent,d+=b.call(this,t))}k&&(d+="</li></ul>");return g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(d+(f?"":"</p>"),"div","font-size: 1px")};c.prototype.isConnectorBigNameU=function(a){return function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree single")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree single")||function(b,d,f){void 0===-f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree double")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree double")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree tail")||-function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 2")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 1")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 3")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Double flexi-arrow")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Fancy arrow")};c.prototype.isVertex=function(){return this.vertex};c.prototype.getOriginPoint=-function(a,b){var d=this.getPinX(),f=this.getPinY(),k=this.getLocPinY(),n=this.getLocPinX(),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),t=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);d-=n;a-=f+(t-k);return!b||k===t/2&&n===q/2||0===this.rotation?new mxPoint(d,a):(b=q/2-n,k-=t/2,t=Math.cos((360-this.rotation)*Math.PI/180),n=Math.sin((360-this.rotation)*-Math.PI/180),new mxPoint(d+b-(b*t-k*n),b*n+k*t+a-k))};c.prototype.getDimensions=function(){var a=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return new mxPoint(0===a&&0<b?1:a,0===b&&0<a?1:b)};c.prototype.getPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.PIN_X),-0)};c.prototype.getPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.PIN_Y),0)};c.prototype.getLocPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_X),0)};c.prototype.getLocPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_Y),0)};c.prototype.getOpacity=-function(a){this.isGroup();a=this.getValueAsDouble(this.getCellElement$java_lang_String(a),0);a=Math.max(100-100*a,0);return a=Math.min(a,100)};c.prototype.getGradient=function(){if(function(d,f){return d&&d.equals?d.equals(f):d===f}("1",this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),"0"))){var a=function(d,f){return d[f]?d[f]:null}(this.sections,"FillGradient");if(null!=a){var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a.elem,-"Row");a=this.getColor(a.getIndexedCell(b[b.length-1].getAttribute("IX"),"GradientStopColor"));if(null!=a&&0!==a.length)return a}}a="";b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");25<=parseInt(b)?a=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND)):(b=this.getTheme(),null!=b&&(b=b.getFillGraientColor(this.getQuickStyleVals()),null!=b&&(a=b.toHexStr())));return a};c.prototype.getGradientDirection=-function(){var a="",b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");(function(d,f){return d&&d.equals?d.equals(f):d===f})(b,"25")?a=mxConstants.DIRECTION_EAST:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"27")?a=mxConstants.DIRECTION_WEST:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"28")?a=mxConstants.DIRECTION_SOUTH:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"30")&&(a=mxConstants.DIRECTION_NORTH);return a};c.prototype.calcRotation=-function(){var a=parseFloat(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.ANGLE),"0"));a=180*a/Math.PI;return 360-a%360*100/100};c.prototype.propagateRotation=function(a){this.rotation+=a;this.rotation%=360;this.rotation=100*this.rotation/100};c.prototype.getTopSpacing=function(){return 100*(this.getTextTopMargin()/2-2.8)/100};c.prototype.getBottomSpacing=function(){return 100*(this.getTextBottomMargin()/2-2.8)/100};c.prototype.getLeftSpacing=function(){return 100*-(this.getTextLeftMargin()/2-2.8)/100};c.prototype.getRightSpacing=function(){return 100*(this.getTextRightMargin()/2-2.8)/100};c.prototype.getLabelRotation=function(){var a=!0,b=this.calcRotation(),d=parseFloat(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),"0"));d=180*d/Math.PI;d-=b;45>Math.abs(d)||270<Math.abs(d)||(a=!1);return a};c.prototype.getHyperlink=function(){var a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("Address",-null,"Hyperlink");a=this.getValue(a,"");var b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("SubAddress",null,"Hyperlink");b=this.getValue(b,"");return{extLink:a,pageLink:b}};c.prototype.getProperties=function(){var a=[];if(this.sections&&this.sections.Property)for(var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Property.elem,"Row"),d=0;d<b.length;d++){var f=b[d],k=f.getAttribute("N"),n=null;f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);-for(var q=0;q<f.length;q++){var t=f[q],A=t.getAttribute("N");"Value"==A?n=t.getAttribute("V"):"Label"==A&&(k=t.getAttribute("V"))}null!=n&&a.push({key:k,val:n})}return a};c.prototype.getStyleFromShape=function(){this.styleMap[g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();this.rotation=Math.round(this.rotation);0!==this.rotation&&(this.styleMap[mxConstants.STYLE_ROTATION]=""+this.rotation);var a=this.getFillColor();(function(n,q){return n&&n.equals?n.equals(q):n===q})(a,"")?this.styleMap[mxConstants.STYLE_FILLCOLOR]=-"none":this.styleMap[mxConstants.STYLE_FILLCOLOR]=a;var b=this.getId();this.styleDebug("ID = "+b+" , Fill Color = "+a);a=this.getGradient();(function(n,q){return n&&n.equals?n.equals(q):n===q})(a,"")?this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]="none":(this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]=a,a=this.getGradientDirection(),function(n,q){return n&&n.equals?n.equals(q):n===q}(a,"")||function(n,q){return n&&n.equals?n.equals(q):n===q}(a,mxConstants.DIRECTION_SOUTH)||(this.styleMap[mxConstants.STYLE_GRADIENT_DIRECTION]=+null!=t&&(d+=c.call(this,t))):function(A,C){return A&&A.equals?A.equals(C):A===C}(t.nodeName,"#text")&&(t=t.textContent,d+=c.call(this,t))}k&&(d+="</li></ul>");return g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(d+(f?"":"</p>"),"div","font-size: 1px")};b.prototype.isConnectorBigNameU=function(a){return function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"60 degree single")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"45 degree single")||function(c,d,f){void 0===+f&&(f=0);return c.substr(f,d.length)===d}(a,"45 degree double")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"60 degree double")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"45 degree tail")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"60 degree tail")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"45 degree tail")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"60 degree tail")||+function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Flexi-arrow 2")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Flexi-arrow 1")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Flexi-arrow 3")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Double flexi-arrow")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Fancy arrow")};b.prototype.isVertex=function(){return this.vertex};b.prototype.getOriginPoint=+function(a,c){var d=this.getPinX(),f=this.getPinY(),k=this.getLocPinY(),n=this.getLocPinX(),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),t=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);d-=n;a-=f+(t-k);return!c||k===t/2&&n===q/2||0===this.rotation?new mxPoint(d,a):(c=q/2-n,k-=t/2,t=Math.cos((360-this.rotation)*Math.PI/180),n=Math.sin((360-this.rotation)*+Math.PI/180),new mxPoint(d+c-(c*t-k*n),c*n+k*t+a-k))};b.prototype.getDimensions=function(){var a=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),c=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return new mxPoint(0===a&&0<c?1:a,0===c&&0<a?1:c)};b.prototype.getPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.PIN_X),+0)};b.prototype.getPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.PIN_Y),0)};b.prototype.getLocPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_X),0)};b.prototype.getLocPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_Y),0)};b.prototype.getOpacity=+function(a){this.isGroup();a=this.getValueAsDouble(this.getCellElement$java_lang_String(a),0);a=Math.max(100-100*a,0);return a=Math.min(a,100)};b.prototype.getGradient=function(){if(function(d,f){return d&&d.equals?d.equals(f):d===f}("1",this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),"0"))){var a=function(d,f){return d[f]?d[f]:null}(this.sections,"FillGradient");if(null!=a){var c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a.elem,+"Row");a=this.getColor(a.getIndexedCell(c[c.length-1].getAttribute("IX"),"GradientStopColor"));if(null!=a&&0!==a.length)return a}}a="";c=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");25<=parseInt(c)?a=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND)):(c=this.getTheme(),null!=c&&(c=c.getFillGraientColor(this.getQuickStyleVals()),null!=c&&(a=c.toHexStr())));return a};b.prototype.getGradientDirection=+function(){var a="",c=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");(function(d,f){return d&&d.equals?d.equals(f):d===f})(c,"25")?a=mxConstants.DIRECTION_EAST:function(d,f){return d&&d.equals?d.equals(f):d===f}(c,"27")?a=mxConstants.DIRECTION_WEST:function(d,f){return d&&d.equals?d.equals(f):d===f}(c,"28")?a=mxConstants.DIRECTION_SOUTH:function(d,f){return d&&d.equals?d.equals(f):d===f}(c,"30")&&(a=mxConstants.DIRECTION_NORTH);return a};b.prototype.calcRotation=+function(){var a=parseFloat(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.ANGLE),"0"));a=180*a/Math.PI;return 360-a%360*100/100};b.prototype.propagateRotation=function(a){this.rotation+=a;this.rotation%=360;this.rotation=100*this.rotation/100};b.prototype.getTopSpacing=function(){return 100*(this.getTextTopMargin()/2-2.8)/100};b.prototype.getBottomSpacing=function(){return 100*(this.getTextBottomMargin()/2-2.8)/100};b.prototype.getLeftSpacing=function(){return 100*+(this.getTextLeftMargin()/2-2.8)/100};b.prototype.getRightSpacing=function(){return 100*(this.getTextRightMargin()/2-2.8)/100};b.prototype.getLabelRotation=function(){var a=!0,c=this.calcRotation(),d=parseFloat(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),"0"));d=180*d/Math.PI;d-=c;45>Math.abs(d)||270<Math.abs(d)||(a=!1);return a};b.prototype.getHyperlink=function(){var a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("Address",+null,"Hyperlink");a=this.getValue(a,"");var c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("SubAddress",null,"Hyperlink");c=this.getValue(c,"");return{extLink:a,pageLink:c}};b.prototype.getProperties=function(){var a=[];if(this.sections&&this.sections.Property)for(var c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Property.elem,"Row"),d=0;d<c.length;d++){var f=c[d],k=f.getAttribute("N"),n=null;f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);+for(var q=0;q<f.length;q++){var t=f[q],A=t.getAttribute("N");"Value"==A?n=t.getAttribute("V"):"Label"==A&&(k=t.getAttribute("V"))}null!=n&&a.push({key:k,val:n})}return a};b.prototype.getStyleFromShape=function(){this.styleMap[g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();this.rotation=Math.round(this.rotation);0!==this.rotation&&(this.styleMap[mxConstants.STYLE_ROTATION]=""+this.rotation);var a=this.getFillColor();(function(n,q){return n&&n.equals?n.equals(q):n===q})(a,"")?this.styleMap[mxConstants.STYLE_FILLCOLOR]=+"none":this.styleMap[mxConstants.STYLE_FILLCOLOR]=a;var c=this.getId();this.styleDebug("ID = "+c+" , Fill Color = "+a);a=this.getGradient();(function(n,q){return n&&n.equals?n.equals(q):n===q})(a,"")?this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]="none":(this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]=a,a=this.getGradientDirection(),function(n,q){return n&&n.equals?n.equals(q):n===q}(a,"")||function(n,q){return n&&n.equals?n.equals(q):n===q}(a,mxConstants.DIRECTION_SOUTH)||(this.styleMap[mxConstants.STYLE_GRADIENT_DIRECTION]=a));a=this.getOpacity(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_FILL_OPACITY]=""+a);a=this.getOpacity(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_STROKE_OPACITY]=""+a);a=this.getForm();a.hasOwnProperty(mxConstants.STYLE_SHAPE)&&function(n,q,t){void 0===t&&(t=0);return n.substr(t,q.length)===q}(function(n,q){return n[q]?n[q]:null}(a,mxConstants.STYLE_SHAPE),"image;")&&(this.styleMap[mxConstants.STYLE_WHITE_SPACE]=-"wrap");for(var d in a)this.styleMap[d]=a[d];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",d=this.getDashPattern(),null!=d&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=d));d=this.getStrokeColor();var f=this.getStrokeTransparency();this.styleDebug("ID = "+b+" , Color = "+d+" , stroke transparency = "+f);(function(n,q){return n&&n.equals?n.equals(q):n===q})(d,"")||1===f||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=d);b=Math.round(this.getLineWidth())|0;1!==b&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=-""+b);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE);b=Math.round(this.getTopSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+b);b=Math.round(this.getBottomSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+b);b=Math.round(this.getLeftSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+b);b=Math.round(this.getRightSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+b);a=-this.getDirection(a);a!==mxConstants.DIRECTION_EAST&&(this.styleMap[mxConstants.STYLE_DIRECTION]=a);a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLIP_X),"0");b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLIP_Y),"0");(function(n,q){return n&&n.equals?n.equals(q):n===q})("1",a)&&(this.styleMap[mxConstants.STYLE_FLIPH]="1");(function(n,q){return n&&n.equals?n.equals(q):n===q})("1",b)&&(this.styleMap[mxConstants.STYLE_FLIPV]=-"1");try{var k=this.getConnections();a=[];for(b=0;b<k.length;b++)a.push("["+k[b].x+","+k[b].y+",0]");this.styleMap.points="["+a.join(",")+"]"}catch(n){console.log(n)}this.resolveCommonStyles();return this.styleMap};c.prototype.getDashPattern=function(){var a=null,b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");(b&&b.equals?b.equals("Themed"):"Themed"===b)?(b=this.getTheme(),null!=b&&(a=this.isVertex()?b.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):-b.getConnLineDashPattern(this.getQuickStyleVals()))):a=B.Style.getLineDashPattern(parseInt(b));if(null!=a&&0!=a.length){b="";for(var d=0;d<a.length;d++)b=b.concat(a[d].toFixed(2)+" ");return b.trim()}return null};c.prototype.isDashed=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Themed")){if(a=this.getTheme(),null!=a)return this.isVertex()?a.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):-a.isConnLineDashed(this.getQuickStyleVals())}else if(!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1"))return!0;return!1};c.prototype.getLineWidth=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),"1"),b=1;try{var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=(this.isVertex()?f.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):-f.getConnLineWidth(this.getQuickStyleVals()))/1E4)}else b=parseFloat(a),b=this.getScreenNumericalValue$double(b)}catch(k){}1>b&&(b*=2);return b};c.prototype.getStartArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE),"4");try{var b=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=this.isVertex()?f.getStartSize(this.getQuickStyleVals()):f.getConnStartSize(this.getQuickStyleVals()))}else b=-parseFloat(a);return c.arrowSizes_$LI$()[b]}catch(k){}return 4};c.prototype.getFinalArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE),"4");try{var b=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=this.isVertex()?f.getEndSize(this.getQuickStyleVals()):f.getConnEndSize(this.getQuickStyleVals()))}else b=parseFloat(a);return c.arrowSizes_$LI$()[b]}catch(k){}return 4};c.prototype.getRounding=-function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.ROUNDING),"0");var b=a;b="Themed".equals?"Themed".equals(b):"Themed"===b;b&&(a="0");return parseFloat(a)};c.prototype.isShadow=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN),"0");return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Themed")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")?!1:!0};c.prototype.getEdgeStyle$java_util_Map=-function(a){var b={};(function(d,f){return d&&d.equals?d.equals(f):d===f})(function(d,f){return d[f]?d[f]:null}(a,mxConstants.STYLE_SHAPE),"mxgraph.lean_mapping.electronic_info_flow_edge")?b[mxConstants.STYLE_EDGE]=mxConstants.NONE:b[mxConstants.STYLE_EDGE]=mxConstants.EDGESTYLE_ELBOW;return b};c.prototype.getEdgeStyle=function(a){if(null!=a&&a instanceof Object||null===a)return this.getEdgeStyle$java_util_Map(a);if(void 0===a)return this.getEdgeStyle$();throw Error("invalid overload");};c.prototype.getMasterId=-function(){return this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER)?this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER):null};c.prototype.getShapeMasterId=function(){return this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE)?this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE):null};c.prototype.isGroup=function(){var a=(a=this.shape.getAttribute("Type"))&&a.equals?a.equals("Group"):"Group"===a;return a};c.getType=function(a){return a.getAttribute("Type")};-c.prototype.getMaster=function(){return this.master};c.prototype.getNameU=function(){var a=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||"",b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getNameU());return a};c.prototype.getName=function(){var a=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME),b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getName());return a};-c.prototype.getMasterName=function(){return this.shapeName};c.prototype.setLabelOffset=function(a,b){var d="",f="";this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(d=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));null!=this.getMaster()&&null!=this.getMaster().getMasterElement()&&this.getMaster().getMasterElement().hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(f=this.getMaster().getMasterElement().getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));+"wrap");for(var d in a)this.styleMap[d]=a[d];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",d=this.getDashPattern(),null!=d&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=d));d=this.getStrokeColor();var f=this.getStrokeTransparency();this.styleDebug("ID = "+c+" , Color = "+d+" , stroke transparency = "+f);(function(n,q){return n&&n.equals?n.equals(q):n===q})(d,"")||1===f||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=d);c=Math.round(this.getLineWidth())|0;1!==c&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=+""+c);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE);c=Math.round(this.getTopSpacing())|0;0!==c&&(this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+c);c=Math.round(this.getBottomSpacing())|0;0!==c&&(this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+c);c=Math.round(this.getLeftSpacing())|0;0!==c&&(this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+c);c=Math.round(this.getRightSpacing())|0;0!==c&&(this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+c);a=+this.getDirection(a);a!==mxConstants.DIRECTION_EAST&&(this.styleMap[mxConstants.STYLE_DIRECTION]=a);a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLIP_X),"0");c=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLIP_Y),"0");(function(n,q){return n&&n.equals?n.equals(q):n===q})("1",a)&&(this.styleMap[mxConstants.STYLE_FLIPH]="1");(function(n,q){return n&&n.equals?n.equals(q):n===q})("1",c)&&(this.styleMap[mxConstants.STYLE_FLIPV]=+"1");try{var k=this.getConnections();a=[];for(c=0;c<k.length;c++)a.push("["+k[c].x+","+k[c].y+",0]");this.styleMap.points="["+a.join(",")+"]"}catch(n){console.log(n)}this.resolveCommonStyles();return this.styleMap};b.prototype.getDashPattern=function(){var a=null,c=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");(c&&c.equals?c.equals("Themed"):"Themed"===c)?(c=this.getTheme(),null!=c&&(a=this.isVertex()?c.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):+c.getConnLineDashPattern(this.getQuickStyleVals()))):a=B.Style.getLineDashPattern(parseInt(c));if(null!=a&&0!=a.length){c="";for(var d=0;d<a.length;d++)c=c.concat(a[d].toFixed(2)+" ");return c.trim()}return null};b.prototype.isDashed=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");if(function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"Themed")){if(a=this.getTheme(),null!=a)return this.isVertex()?a.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):+a.isConnLineDashed(this.getQuickStyleVals())}else if(!function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0")&&!function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"1"))return!0;return!1};b.prototype.getLineWidth=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),"1"),c=1;try{var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(c=(this.isVertex()?f.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):+f.getConnLineWidth(this.getQuickStyleVals()))/1E4)}else c=parseFloat(a),c=this.getScreenNumericalValue$double(c)}catch(k){}1>c&&(c*=2);return c};b.prototype.getStartArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE),"4");try{var c=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(c=this.isVertex()?f.getStartSize(this.getQuickStyleVals()):f.getConnStartSize(this.getQuickStyleVals()))}else c=+parseFloat(a);return b.arrowSizes_$LI$()[c]}catch(k){}return 4};b.prototype.getFinalArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE),"4");try{var c=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(c=this.isVertex()?f.getEndSize(this.getQuickStyleVals()):f.getConnEndSize(this.getQuickStyleVals()))}else c=parseFloat(a);return b.arrowSizes_$LI$()[c]}catch(k){}return 4};b.prototype.getRounding=+function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.ROUNDING),"0");var c=a;c="Themed".equals?"Themed".equals(c):"Themed"===c;c&&(a="0");return parseFloat(a)};b.prototype.isShadow=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN),"0");return function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"Themed")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0")?!1:!0};b.prototype.getEdgeStyle$java_util_Map=+function(a){var c={};(function(d,f){return d&&d.equals?d.equals(f):d===f})(function(d,f){return d[f]?d[f]:null}(a,mxConstants.STYLE_SHAPE),"mxgraph.lean_mapping.electronic_info_flow_edge")?c[mxConstants.STYLE_EDGE]=mxConstants.NONE:c[mxConstants.STYLE_EDGE]=mxConstants.EDGESTYLE_ELBOW;return c};b.prototype.getEdgeStyle=function(a){if(null!=a&&a instanceof Object||null===a)return this.getEdgeStyle$java_util_Map(a);if(void 0===a)return this.getEdgeStyle$();throw Error("invalid overload");};b.prototype.getMasterId=+function(){return this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER)?this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER):null};b.prototype.getShapeMasterId=function(){return this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE)?this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE):null};b.prototype.isGroup=function(){var a=(a=this.shape.getAttribute("Type"))&&a.equals?a.equals("Group"):"Group"===a;return a};b.getType=function(a){return a.getAttribute("Type")};+b.prototype.getMaster=function(){return this.master};b.prototype.getNameU=function(){var a=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||"",c;(c=null==a)||(c=(c=a)&&c.equals?c.equals(""):""===c);c&&null!=this.masterShape&&(a=this.masterShape.getNameU());return a};b.prototype.getName=function(){var a=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME),c;(c=null==a)||(c=(c=a)&&c.equals?c.equals(""):""===c);c&&null!=this.masterShape&&(a=this.masterShape.getName());return a};+b.prototype.getMasterName=function(){return this.shapeName};b.prototype.setLabelOffset=function(a,c){var d="",f="";this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(d=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));null!=this.getMaster()&&null!=this.getMaster().getMasterElement()&&this.getMaster().getMasterElement().hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(f=this.getMaster().getMasterElement().getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));if(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(d,"Organizational unit")||function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(f,"Organizational unit")){var k=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;d="0.0";f=null;f="-0.4";null!=k&&(d=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.hasAttribute("F")?d.getAttribute("F"):d.textContent,f=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),-f=f.hasAttribute("F")?f.getAttribute("F"):f.textContent);k=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");(function(A,C){return A&&A.equals?A.equals(C):A===C})(d,"Inh")&&(d="0.0");(function(A,C){return A&&A.equals?A.equals(C):A===C})(f,"Inh")&&(f="-0.4");-1!=f.indexOf("txtHeight")&&(f="-0.4");b=b.split(";");for(var n="",q=0;q<b.length;q++){var t=b[q];t=t.trim();(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C})(t,"tabHeight=")&&-(n=t.split("tabHeight=").join(""))}(function(A,C){return A&&A.equals?A.equals(C):A===C})(n,"")&&(n="20");b=parseFloat(n);d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f-b/2);a.getGeometry().offset=d}else if(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(d,"Domain 3D")||function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(f,"Domain 3D")){k=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;+f=f.hasAttribute("F")?f.getAttribute("F"):f.textContent);k=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");(function(A,C){return A&&A.equals?A.equals(C):A===C})(d,"Inh")&&(d="0.0");(function(A,C){return A&&A.equals?A.equals(C):A===C})(f,"Inh")&&(f="-0.4");-1!=f.indexOf("txtHeight")&&(f="-0.4");c=c.split(";");for(var n="",q=0;q<c.length;q++){var t=c[q];t=t.trim();(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C})(t,"tabHeight=")&&+(n=t.split("tabHeight=").join(""))}(function(A,C){return A&&A.equals?A.equals(C):A===C})(n,"")&&(n="20");c=parseFloat(n);d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f-c/2);a.getGeometry().offset=d}else if(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(d,"Domain 3D")||function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(f,"Domain 3D")){k=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;d="0.0";f=null;f="-0.4";null!=k&&(d=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.getAttribute("F")||"",f=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),f=f.getAttribute("F")||"");k=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");if(function(A,C){return A&&A.equals?A.equals(C):A===C}(d,"Inh")||function(A,C){return A&&A.equals?A.equals(C):A===C}(d,""))d="0.0";if(function(A,C){return A&&A.equals?A.equals(C):-A===C}(f,"Inh")||function(A,C){return A&&A.equals?A.equals(C):A===C}(f,""))f="-0.4";-1!=f.indexOf("txtHeight")&&(f="-0.4");d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f);a.getGeometry().offset=d}};c.prototype.getForm=function(){var a={};if(this.isVertex())try{var b=c.getType(this.getShape());this.styleDebug("shape type = "+b);if(null!=this.imageData||function(L,S){return L&&L.equals?L.equals(S):L===S}(g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN,b)&&null!=this.masterShape&&+A===C}(f,"Inh")||function(A,C){return A&&A.equals?A.equals(C):A===C}(f,""))f="-0.4";-1!=f.indexOf("txtHeight")&&(f="-0.4");d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f);a.getGeometry().offset=d}};b.prototype.getForm=function(){var a={};if(this.isVertex())try{var c=b.getType(this.getShape());this.styleDebug("shape type = "+c);if(null!=this.imageData||function(L,S){return L&&L.equals?L.equals(S):L===S}(g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN,c)&&null!=this.masterShape&&null!=this.masterShape.imageData){var d=null!=this.imageData?this.imageData:this.masterShape.imageData;a.shape="image";a.aspect="fixed";var f=function(L,S){return L[S]?L[S]:null}(d,"iType"),k=function(L,S){return L[S]?L[S]:null}(d,"iData"),n=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetX"),"0")),q=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetY"),"0")),t=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgWidth"),"0")),A=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgHeight"),"0")),C=parseFloat(this.getValue(this.getCellElement$java_lang_String("Width"),"0")),I=parseFloat(this.getValue(this.getCellElement$java_lang_String("Height"),"0"));0!=n||0!=q||t!=C||A!=I?this.toBeCroppedImg={imgOffsetX:n,imgOffsetY:q,imgWidth:t,imgHeight:A,width:C,height:I,iType:f,iData:k}:a.image="data:image/"+f+","+k;return a}var Q=this.parseGeom();if(function(L,S){return L&&L.equals?L.equals(S):L===S}(Q,""))return this.styleDebug("No geom found"),a;var K=Graph.compress(Q);a[mxConstants.STYLE_SHAPE]=-"stencil("+K+")"}catch(L){}else return this.getEdgeStyle();return a};c.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Off-page reference")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Lined/Shaded process")?!0:!1};c.prototype.isExternal_process=function(){var a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};c.prototype.getDirection=function(a){a=mxResources.get("mxOffset"+-this.shapeName);if(null!=a&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")){if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1"))return mxConstants.DIRECTION_SOUTH;if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"2"))return mxConstants.DIRECTION_WEST;if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"3"))return mxConstants.DIRECTION_NORTH}return mxConstants.DIRECTION_EAST};c.prototype.isSubproces=function(){var a=-(a=this.shapeName)&&a.equals?a.equals("Subproces"):"Subproces"===a;return a};c.prototype.getEdgeStyle$=function(){return{edgeStyle:"none"}};c.prototype.getChildShapes=function(){return this.childShapes};c.prototype.setChildShapes=function(a){this.childShapes=a};c.prototype.isDisplacedLabel=function(){var a=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F",""),b=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F",""),d=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,-"F",""),f=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","");if(null!=this.masterShape){if(""===a||function(k,n){return k&&k.equals?k.equals(n):k===n}(a.toLowerCase(),"inh"))a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F","");if(""===b||function(k,n){return k&&k.equals?k.equals(n):k===n}(b.toLowerCase(),"inh"))b=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F","");if(""===d||function(k,n){return k&&k.equals?k.equals(n):-k===n}(d.toLowerCase(),"inh"))d=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,"F","");if(""===f||function(k,n){return k&&k.equals?k.equals(n):k===n}(f.toLowerCase(),"inh"))f=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","")}return function(k,n){return k&&k.equals?k.equals(n):k===n}(a.toLowerCase(),"width*0.5")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(b.toLowerCase(),"height*0.5")&&function(k,n){return k&&k.equals?k.equals(n):-k===n}(d.toLowerCase(),"width*1")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f.toLowerCase(),"height*1")||!(function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(a.toLowerCase(),"width*")&&function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(b.toLowerCase(),"height*")&&function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(d.toLowerCase(),"width*")&&function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(f.toLowerCase(),"height*")||function(k,-n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(a.toLowerCase(),"controls.row_")||function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(b.toLowerCase(),"controls.row_"))?!1:!0};c.prototype.isVerticalLabel=function(){var a=this.getAttribute("TextDirection","V","");a||null==this.masterShape||(a=this.masterShape.getAttribute("TextDirection","V",""));return"1"==a};c.prototype.isRotatedLabel=function(){if(this.isVerticalLabel())return!0;var a=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,-"V","");null!=this.masterShape&&function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")&&(a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V",""));return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0.0")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")?!1:!0};c.prototype.setRootShape=function(a){this.rootShape=a};c.prototype.getRootShape=function(){return this.rootShape};c.prototype.getStartXY=-function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X),0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_Y),0)))/100);return new mxPoint(b,a)};c.prototype.getEndXY=function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_X),-0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_Y),0)))/100);return new mxPoint(b,a)};c.prototype.getRoutingPoints=function(a,b,d){return null!=this.geomList?this.geomList.getRoutingPoints(a,b,d):null};c.prototype.getControlPoints=function(a){var b=this.getStartXY(a);a=this.getEndXY(a);var d=[];if(null!=this.shape){var f=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.GEOM);-if(0<f.length&&(f=f.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0).getElementsByTagName("E").item(0),null!=f)){f=f.getAttribute("F")||"";f=f.replace(RegExp("NURBS\\(","g"),"");f=f.replace(RegExp("\\)","g"),"");f=f.replace(RegExp(",","g")," ");f=f.replace(RegExp("\\s\\s","g")," ");f=f.split(" ");for(var k=f.length,n=[];0<k--;)n.push(0);for(k=0;k<f.length;k++)n[k]=parseFloat(f[k]);for(k=2;k+4<f.length;k+=4){var q=new mxPoint,t=n[k+3];q.x=Math.floor(Math.round(100*(b.x+-Math.min(100,Math.abs(a.x-b.x))*n[k+2]))/100);q.y=Math.floor(Math.round(100*(b.y-100*t))/100);d.push(q)}return d}}return null};c.prototype.getStyleFromEdgeShape=function(a){this.styleMap[g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();a=this.getForm();if(null!=a&&!function(d,f){return d&&d.equals?d.equals(f):d===f}(a,""))for(var b in a)this.styleMap[b]=a[b];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",b=this.getDashPattern(),null!=b&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=-b));b=this.getEdgeMarker(!0);null!=b&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(b,c.ARROW_NO_FILL_MARKER)&&(b=b.substring(c.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_STARTFILL]="0"),this.styleMap[mxConstants.STYLE_STARTARROW]=b);b=this.getEdgeMarker(!1);null!=b&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(b,c.ARROW_NO_FILL_MARKER)&&(b=b.substring(c.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_ENDFILL]="0"),this.styleMap[mxConstants.STYLE_ENDARROW]=-b);b=Math.round(this.getStartArrowSize())|0;6!==b&&(this.styleMap[mxConstants.STYLE_STARTSIZE]=""+b);b=Math.round(this.getFinalArrowSize())|0;6!==b&&(this.styleMap[mxConstants.STYLE_ENDSIZE]=""+b);b=Math.round(this.getLineWidth())|0;1!==b&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+b);b=this.getStrokeColor();(function(d,f){return d&&d.equals?d.equals(f):d===f})(b,"")||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=b);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE);-this.isConnectorBigNameU(this.getNameU())&&(this.styleMap[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_ARROW,b=this.getFillColor(),function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"")||(this.styleMap[mxConstants.STYLE_FILLCOLOR]=b));b=Math.round(this.getTopSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+b;b=Math.round(this.getBottomSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+b;b=Math.round(this.getLeftSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+-b;b=Math.round(this.getRightSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+b;b=this.getAlignVertical();this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=b;this.styleMap.html="1";this.resolveCommonStyles();return this.styleMap};c.prototype.resolveCommonStyles=function(){var a=this.getTextBkgndColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND));var b=a&&a.equals?a.equals(""):""===a;b||"1"!=this.getValue(this.getCellElement$java_lang_String("TextBkgndTrans"),-"0")&&(this.styleMap[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]=a);this.styleMap[mxConstants.STYLE_ROUNDED]=0<this.getRounding()?g.mxgraph.io.vsdx.mxVsdxConstants.TRUE:g.mxgraph.io.vsdx.mxVsdxConstants.FALSE;return this.styleMap};c.prototype.getEdgeMarker=function(a){var b=this.getValue(this.getCellElement$java_lang_String(a?g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW:g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW),"0"),d=0;try{if(function(k,n){return k&&k.equals?k.equals(n):k===n}(b,"Themed")){var f=-this.getTheme();null!=f&&(d=this.isVertex()?f.getEdgeMarker(a,this.getQuickStyleVals()):f.getConnEdgeMarker(a,this.getQuickStyleVals()))}else d=parseInt(b)}catch(k){}a=function(k,n){null==k.entries&&(k.entries=[]);for(var q=0;q<k.entries.length;q++)if(null!=k.entries[q].key.equals&&k.entries[q].key.equals(n)||k.entries[q].key===n)return k.entries[q].value;return null}(c.arrowTypes_$LI$(),d);0<d&&null==a&&(a=function(k,n){null==k.entries&&(k.entries=[]);for(var q=0;q<k.entries.length;q++)if(null!=-k.entries[q].key.equals&&k.entries[q].key.equals(n)||k.entries[q].key===n)return k.entries[q].value;return null}(c.arrowTypes_$LI$(),1));return a};c.prototype.getCellElement$java_lang_String=function(a){var b=h.prototype.getCellElement$java_lang_String.call(this,a);return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):b};c.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(a,b,d){var f=h.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String.call(this,-a,b,d);return null==f&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,d):f};c.prototype.getCellElement=function(a,b,d){if("string"!==typeof a&&null!==a||"string"!==typeof b&&null!==b||"string"!==typeof d&&null!==d){if("string"!==typeof a&&null!==a||void 0!==b||void 0!==d)throw Error("invalid overload");return this.getCellElement$java_lang_String(a)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,d)};c.prototype.createLabelSubShape=-function(a,b){var d=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth()),f=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),d/2),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),+"stencil("+K+")"}catch(L){}else return this.getEdgeStyle();return a};b.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"Off-page reference")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"Lined/Shaded process")?!0:!1};b.prototype.isExternal_process=function(){var a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};b.prototype.getDirection=function(a){a=mxResources.get("mxOffset"++this.shapeName);if(null!=a&&!function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0")&&!function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"")){if(function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"1"))return mxConstants.DIRECTION_SOUTH;if(function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"2"))return mxConstants.DIRECTION_WEST;if(function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"3"))return mxConstants.DIRECTION_NORTH}return mxConstants.DIRECTION_EAST};b.prototype.isSubproces=function(){var a=+(a=this.shapeName)&&a.equals?a.equals("Subproces"):"Subproces"===a;return a};b.prototype.getEdgeStyle$=function(){return{edgeStyle:"none"}};b.prototype.getChildShapes=function(){return this.childShapes};b.prototype.setChildShapes=function(a){this.childShapes=a};b.prototype.isDisplacedLabel=function(){var a=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F",""),c=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F",""),d=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,+"F",""),f=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","");if(null!=this.masterShape){if(""===a||function(k,n){return k&&k.equals?k.equals(n):k===n}(a.toLowerCase(),"inh"))a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F","");if(""===c||function(k,n){return k&&k.equals?k.equals(n):k===n}(c.toLowerCase(),"inh"))c=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F","");if(""===d||function(k,n){return k&&k.equals?k.equals(n):+k===n}(d.toLowerCase(),"inh"))d=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,"F","");if(""===f||function(k,n){return k&&k.equals?k.equals(n):k===n}(f.toLowerCase(),"inh"))f=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","")}return function(k,n){return k&&k.equals?k.equals(n):k===n}(a.toLowerCase(),"width*0.5")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(c.toLowerCase(),"height*0.5")&&function(k,n){return k&&k.equals?k.equals(n):+k===n}(d.toLowerCase(),"width*1")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f.toLowerCase(),"height*1")||!(function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(a.toLowerCase(),"width*")&&function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(c.toLowerCase(),"height*")&&function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(d.toLowerCase(),"width*")&&function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(f.toLowerCase(),"height*")||function(k,+n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(a.toLowerCase(),"controls.row_")||function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(c.toLowerCase(),"controls.row_"))?!1:!0};b.prototype.isVerticalLabel=function(){var a=this.getAttribute("TextDirection","V","");a||null==this.masterShape||(a=this.masterShape.getAttribute("TextDirection","V",""));return"1"==a};b.prototype.isRotatedLabel=function(){if(this.isVerticalLabel())return!0;var a=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,+"V","");null!=this.masterShape&&function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"")&&(a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V",""));return function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0.0")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"")?!1:!0};b.prototype.setRootShape=function(a){this.rootShape=a};b.prototype.getRootShape=function(){return this.rootShape};b.prototype.getStartXY=+function(a){var c=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X),0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_Y),0)))/100);return new mxPoint(c,a)};b.prototype.getEndXY=function(a){var c=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_X),+0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_Y),0)))/100);return new mxPoint(c,a)};b.prototype.getRoutingPoints=function(a,c,d){return null!=this.geomList?this.geomList.getRoutingPoints(a,c,d):null};b.prototype.getControlPoints=function(a){var c=this.getStartXY(a);a=this.getEndXY(a);var d=[];if(null!=this.shape){var f=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.GEOM);+if(0<f.length&&(f=f.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0).getElementsByTagName("E").item(0),null!=f)){f=f.getAttribute("F")||"";f=f.replace(RegExp("NURBS\\(","g"),"");f=f.replace(RegExp("\\)","g"),"");f=f.replace(RegExp(",","g")," ");f=f.replace(RegExp("\\s\\s","g")," ");f=f.split(" ");for(var k=f.length,n=[];0<k--;)n.push(0);for(k=0;k<f.length;k++)n[k]=parseFloat(f[k]);for(k=2;k+4<f.length;k+=4){var q=new mxPoint,t=n[k+3];q.x=Math.floor(Math.round(100*(c.x++Math.min(100,Math.abs(a.x-c.x))*n[k+2]))/100);q.y=Math.floor(Math.round(100*(c.y-100*t))/100);d.push(q)}return d}}return null};b.prototype.getStyleFromEdgeShape=function(a){this.styleMap[g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();a=this.getForm();if(null!=a&&!function(d,f){return d&&d.equals?d.equals(f):d===f}(a,""))for(var c in a)this.styleMap[c]=a[c];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",c=this.getDashPattern(),null!=c&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=+c));c=this.getEdgeMarker(!0);null!=c&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(c,b.ARROW_NO_FILL_MARKER)&&(c=c.substring(b.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_STARTFILL]="0"),this.styleMap[mxConstants.STYLE_STARTARROW]=c);c=this.getEdgeMarker(!1);null!=c&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(c,b.ARROW_NO_FILL_MARKER)&&(c=c.substring(b.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_ENDFILL]="0"),this.styleMap[mxConstants.STYLE_ENDARROW]=+c);c=Math.round(this.getStartArrowSize())|0;6!==c&&(this.styleMap[mxConstants.STYLE_STARTSIZE]=""+c);c=Math.round(this.getFinalArrowSize())|0;6!==c&&(this.styleMap[mxConstants.STYLE_ENDSIZE]=""+c);c=Math.round(this.getLineWidth())|0;1!==c&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+c);c=this.getStrokeColor();(function(d,f){return d&&d.equals?d.equals(f):d===f})(c,"")||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=c);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE);+this.isConnectorBigNameU(this.getNameU())&&(this.styleMap[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_ARROW,c=this.getFillColor(),function(d,f){return d&&d.equals?d.equals(f):d===f}(c,"")||(this.styleMap[mxConstants.STYLE_FILLCOLOR]=c));c=Math.round(this.getTopSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+c;c=Math.round(this.getBottomSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+c;c=Math.round(this.getLeftSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""++c;c=Math.round(this.getRightSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+c;c=this.getAlignVertical();this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=c;this.styleMap.html="1";this.resolveCommonStyles();return this.styleMap};b.prototype.resolveCommonStyles=function(){var a=this.getTextBkgndColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND));var c=a&&a.equals?a.equals(""):""===a;c||"1"!=this.getValue(this.getCellElement$java_lang_String("TextBkgndTrans"),+"0")&&(this.styleMap[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]=a);this.styleMap[mxConstants.STYLE_ROUNDED]=0<this.getRounding()?g.mxgraph.io.vsdx.mxVsdxConstants.TRUE:g.mxgraph.io.vsdx.mxVsdxConstants.FALSE;return this.styleMap};b.prototype.getEdgeMarker=function(a){var c=this.getValue(this.getCellElement$java_lang_String(a?g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW:g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW),"0"),d=0;try{if(function(k,n){return k&&k.equals?k.equals(n):k===n}(c,"Themed")){var f=+this.getTheme();null!=f&&(d=this.isVertex()?f.getEdgeMarker(a,this.getQuickStyleVals()):f.getConnEdgeMarker(a,this.getQuickStyleVals()))}else d=parseInt(c)}catch(k){}a=function(k,n){null==k.entries&&(k.entries=[]);for(var q=0;q<k.entries.length;q++)if(null!=k.entries[q].key.equals&&k.entries[q].key.equals(n)||k.entries[q].key===n)return k.entries[q].value;return null}(b.arrowTypes_$LI$(),d);0<d&&null==a&&(a=function(k,n){null==k.entries&&(k.entries=[]);for(var q=0;q<k.entries.length;q++)if(null!=+k.entries[q].key.equals&&k.entries[q].key.equals(n)||k.entries[q].key===n)return k.entries[q].value;return null}(b.arrowTypes_$LI$(),1));return a};b.prototype.getCellElement$java_lang_String=function(a){var c=h.prototype.getCellElement$java_lang_String.call(this,a);return null==c&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):c};b.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(a,c,d){var f=h.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String.call(this,+a,c,d);return null==f&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,c,d):f};b.prototype.getCellElement=function(a,c,d){if("string"!==typeof a&&null!==a||"string"!==typeof c&&null!==c||"string"!==typeof d&&null!==d){if("string"!==typeof a&&null!==a||void 0!==c||void 0!==d)throw Error("invalid overload");return this.getCellElement$java_lang_String(a)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,c,d)};b.prototype.createLabelSubShape=+function(a,c){var d=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth()),f=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),d/2),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),f/2),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),k),t=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),n),A=this.getValueAsDouble(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),0),C=this.getTextLabel(1>d||1>f);if(null!=C&&0!==C.length){var I=mxUtils.clone(this.getStyleMap())||{};I[mxConstants.STYLE_FILLCOLOR]=mxConstants.NONE;I[mxConstants.STYLE_STROKECOLOR]=-mxConstants.NONE;I[mxConstants.STYLE_GRADIENTCOLOR]=mxConstants.NONE;I.hasOwnProperty("align")||(I.align="center");I.hasOwnProperty("verticalAlign")||(I.verticalAlign="middle");I.hasOwnProperty("whiteSpace")||(I.whiteSpace="wrap");delete I.shape;delete I.image;this.isVerticalLabel()&&(A+=Math.PI+.01,I.horizontal="0");var Q=this.getRotation();0!==A&&(A=360-180*A/Math.PI,A=Math.round((A+Q)%360*100)/100,0!==A&&(I.rotation=""+A));I="text;"+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(I,"=");n=b.getGeometry().height--(t+f-n);k=q-k;0<Q&&(q=new mxGeometry(k,n,d,f),k=b.getGeometry(),g.mxgraph.online.Utils.rotatedGeometry(q,Q,k.width/2,k.height/2),k=q.x,n=q.y);return a.insertVertex(b,null,C,Math.round(100*k)/100,Math.round(100*n)/100,Math.round(100*d)/100,Math.round(100*f)/100,I+";html=1;")}return null};c.prototype.getLblEdgeOffset=function(a,b){if(null!=b&&1<b.length){var d=new mxCellState;d.absolutePoints=b;a.updateEdgeBounds(d);a=a.getPoint(d);d=b[0];var f=b[b.length-1];b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),+mxConstants.NONE;I[mxConstants.STYLE_GRADIENTCOLOR]=mxConstants.NONE;I.hasOwnProperty("align")||(I.align="center");I.hasOwnProperty("verticalAlign")||(I.verticalAlign="middle");I.hasOwnProperty("whiteSpace")||(I.whiteSpace="wrap");delete I.shape;delete I.image;this.isVerticalLabel()&&(A+=Math.PI+.01,I.horizontal="0");var Q=this.getRotation();0!==A&&(A=360-180*A/Math.PI,A=Math.round((A+Q)%360*100)/100,0!==A&&(I.rotation=""+A));I="text;"+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(I,"=");n=c.getGeometry().height-+(t+f-n);k=q-k;0<Q&&(q=new mxGeometry(k,n,d,f),k=c.getGeometry(),g.mxgraph.online.Utils.rotatedGeometry(q,Q,k.width/2,k.height/2),k=q.x,n=q.y);return a.insertVertex(c,null,C,Math.round(100*k)/100,Math.round(100*n)/100,Math.round(100*d)/100,Math.round(100*f)/100,I+";html=1;")}return null};b.prototype.getLblEdgeOffset=function(a,c){if(null!=c&&1<c.length){var d=new mxCellState;d.absolutePoints=c;a.updateEdgeBounds(d);a=a.getPoint(d);d=c[0];var f=c[c.length-1];c=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth());var k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),0),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),0),t=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),-0),A=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),0);f=(this.getHeight()-(d.y-f.y))/2+d.y-a.y-(A-q+k/2);a=t-n+b/2+(d.x-a.x);return 1E11<Math.abs(a)?null:new mxPoint(Math.floor(Math.round(100*a)/100),Math.floor(Math.round(100*f)/100))}return null};c.prototype.getShapeIndex=function(){return this.shapeIndex};c.prototype.setShapeIndex=function(a){this.shapeIndex=a};return c}(g.mxgraph.io.vsdx.Shape);m.__static_initialized=!1;m.ARROW_NO_FILL_MARKER=+0),A=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),0);f=(this.getHeight()-(d.y-f.y))/2+d.y-a.y-(A-q+k/2);a=t-n+c/2+(d.x-a.x);return 1E11<Math.abs(a)?null:new mxPoint(Math.floor(Math.round(100*a)/100),Math.floor(Math.round(100*f)/100))}return null};b.prototype.getShapeIndex=function(){return this.shapeIndex};b.prototype.setShapeIndex=function(a){this.shapeIndex=a};return b}(g.mxgraph.io.vsdx.Shape);m.__static_initialized=!1;m.ARROW_NO_FILL_MARKER="0";m.maxDp=2;m.USE_SHAPE_MATCH=!1;m.stencilTemplate='<shape h="htemplate" w="wtemplate" aspect="variable" strokewidth="inherit"><connections></connections><background></background><foreground></foreground></shape>';B.VsdxShape=m;m.__class="com.mxgraph.io.vsdx.VsdxShape"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){var B=function(){function m(){}m.__static_initialize=function(){m.__static_initialized||(m.__static_initialized=!0,m.__static_initializer_0())};m.CA_$LI$=function(){m.__static_initialize();null==m.CA&&(m.CA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""));return m.CA};m.IA_$LI$=function(){m.__static_initialize();if(null==m.IA){for(var h=256,c=[];0<h--;)c.push(0);m.IA=c}return m.IA};m.__static_initializer_0=function(){for(var h=m.IA_$LI$(),-c=0;c<h.length;c++)h[c]=-1;h=0;for(c=m.CA_$LI$().length;h<c;h++)m.IA_$LI$()[m.CA_$LI$()[h].charCodeAt(0)]=h;m.IA_$LI$()[61]=0};m.encodeToChar=function(h,c,a){var b=null!=h?h.length-c:0;if(0===b)return[];var d=3*(b/3|0),f=((b-1)/3|0)+1<<2;f+=a?((f-1)/76|0)<<1:0;for(var k=Array(f),n=c,q=0,t=0;n<d+c;){var A=(h[n++]&255)<<16|(h[n++]&255)<<8|h[n++]&255;k[q++]=m.CA_$LI$()[A>>>18&63];k[q++]=m.CA_$LI$()[A>>>12&63];k[q++]=m.CA_$LI$()[A>>>6&63];k[q++]=m.CA_$LI$()[A&63];a&&19===++t&&q<f-2&&(k[q++]="\r",k[q++]=-"\n",t=0)}a=b-d;0<a&&(A=(h[d+c]&255)<<10|(2===a?(h[b+c-1]&255)<<2:0),k[f-4]=m.CA_$LI$()[A>>12],k[f-3]=m.CA_$LI$()[A>>>6&63],k[f-2]=2===a?m.CA_$LI$()[A&63]:"=",k[f-1]="=");return k};m.decode$char_A=function(h){var c=null!=h?h.length:0;if(0===c)return[];for(var a=0,b=0;b<c;b++)0>m.IA_$LI$()[h[b].charCodeAt(0)]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h[--b].charCodeAt(0)];)61==function(q){return null==q.charCodeAt?q:q.charCodeAt(0)}(h[b])&&d++;c=(6*(c-a)>>3)-d;a=function(q){for(var t=-[];0<q--;)t.push(0);return t}(c);for(var f=d=0;f<c;){for(var k=b=0;4>k;k++){var n=m.IA_$LI$()[h[d++].charCodeAt(0)];0<=n?b|=n<<18-6*k:k--}a[f++]=b>>16|0;f<c&&(a[f++]=b>>8|0,f<c&&(a[f++]=b|0))}return a};m.decode=function(h){if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"string"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decode$char_A(h);if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"number"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decode$byte_A(h);-if("string"===typeof h||null===h)return g.mxgraph.online.mxBase64.decode$java_lang_String(h);throw Error("invalid overload");};m.decodeFast$char_A=function(h){var c=h.length;if(0===c)return[];for(var a=0,b=c-1;a<b&&0>m.IA_$LI$()[h[a].charCodeAt(0)];)a++;for(;0<b&&0>m.IA_$LI$()[h[b].charCodeAt(0)];)b--;var d=61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h[b])?61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h[b-1])?2:1:0,f=b-a+1,k=76<c?(13==function(C){return null==C.charCodeAt?-C:C.charCodeAt(0)}(h[76])?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;c=function(C){for(var I=[];0<C--;)I.push(0);return I}(f);for(var n=0,q=0,t=3*(f/3|0);n<t;){var A=m.IA_$LI$()[h[a++].charCodeAt(0)]<<18|m.IA_$LI$()[h[a++].charCodeAt(0)]<<12|m.IA_$LI$()[h[a++].charCodeAt(0)]<<6|m.IA_$LI$()[h[a++].charCodeAt(0)];c[n++]=A>>16|0;c[n++]=A>>8|0;c[n++]=A|0;0<k&&19===++q&&(a+=2,q=0)}if(n<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h[a++].charCodeAt(0)]<<18-6*k;for(h=16;n<f;h-=8)c[n++]=A>>h|0}return c};m.decodeFast=function(h){if(null!=-h&&h instanceof Array&&(0==h.length||null==h[0]||"string"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decodeFast$char_A(h);if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"number"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decodeFast$byte_A(h);if("string"===typeof h||null===h)return g.mxgraph.online.mxBase64.decodeFast$java_lang_String(h);throw Error("invalid overload");};m.encodeToByte=function(h,c){var a=null!=h?h.length:0;if(0===a)return[];for(var b=3*(a/-3|0),d=((a-1)/3|0)+1<<2,f=d+=c?((d-1)/76|0)<<1:0,k=[];0<f--;)k.push(0);for(var n=0,q=0,t=0;n<b;)f=(h[n++]&255)<<16|(h[n++]&255)<<8|h[n++]&255,k[q++]=m.CA_$LI$()[f>>>18&63].charCodeAt(0),k[q++]=m.CA_$LI$()[f>>>12&63].charCodeAt(0),k[q++]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[q++]=m.CA_$LI$()[f&63].charCodeAt(0),c&&19===++t&&q<d-2&&(k[q++]=13,k[q++]=10,t=0);c=a-b;0<c&&(f=(h[b]&255)<<10|(2===c?(h[a-1]&255)<<2:0),k[d-4]=m.CA_$LI$()[f>>12].charCodeAt(0),k[d-3]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[d-2]=-2===c?m.CA_$LI$()[f&63].charCodeAt(0):61,k[d-1]=61);return k};m.decode$byte_A=function(h){for(var c=h.length,a=0,b=0;b<c;b++)0>m.IA_$LI$()[h[b]&255]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h[--b]&255];)61==h[b]&&d++;b=c=(6*(c-a)>>3)-d;for(a=[];0<b--;)a.push(0);for(var f=d=0;f<c;){for(var k=b=0;4>k;k++){var n=m.IA_$LI$()[h[d++]&255];0<=n?b|=n<<18-6*k:k--}a[f++]=b>>16|0;f<c&&(a[f++]=b>>8|0,f<c&&(a[f++]=b|0))}return a};m.decodeFast$byte_A=function(h){var c=h.length;if(0===-c)return[];for(var a=0,b=c-1;a<b&&0>m.IA_$LI$()[h[a]&255];)a++;for(;0<b&&0>m.IA_$LI$()[h[b]&255];)b--;var d=61==h[b]?61==h[b-1]?2:1:0,f=b-a+1,k=76<c?(13==h[76]?f/78|0:0)<<1:0,n=f=(6*(f-k)>>3)-d;for(c=[];0<n--;)c.push(0);for(var q=n=0,t=3*(f/3|0);n<t;){var A=m.IA_$LI$()[h[a++]]<<18|m.IA_$LI$()[h[a++]]<<12|m.IA_$LI$()[h[a++]]<<6|m.IA_$LI$()[h[a++]];c[n++]=A>>16|0;c[n++]=A>>8|0;c[n++]=A|0;0<k&&19===++q&&(a+=2,q=0)}if(n<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h[a++]]<<18-6*k;for(h=16;n<f;h-=8)c[n++]=A>>-h|0}return c};m.encodeToString=function(h,c,a){return m.encodeToChar(h,c,a).join("")};m.decode$java_lang_String=function(h){var c=null!=h?h.length:0;if(0===c)return[];for(var a=0,b=0;b<c;b++)0>m.IA_$LI$()[h.charAt(b).charCodeAt(0)]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h.charAt(--b).charCodeAt(0)];)61==function(q){return null==q.charCodeAt?q:q.charCodeAt(0)}(h.charAt(b))&&d++;c=(6*(c-a)>>3)-d;a=function(q){for(var t=[];0<q--;)t.push(0);return t}(c);for(var f=d=0;f<c;){for(var k=-b=0;4>k;k++){var n=m.IA_$LI$()[h.charAt(d++).charCodeAt(0)];0<=n?b|=n<<18-6*k:k--}a[f++]=b>>16|0;f<c&&(a[f++]=b>>8|0,f<c&&(a[f++]=b|0))}return a};m.decodeFast$java_lang_String=function(h){var c=h.length;if(0===c)return[];for(var a=0,b=c-1;a<b&&0>m.IA_$LI$()[function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(a))&255];)a++;for(;0<b&&0>m.IA_$LI$()[function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(b))&255];)b--;var d=61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(b))?-61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(b-1))?2:1:0,f=b-a+1,k=76<c?(13==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(76))?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;c=function(C){for(var I=[];0<C--;)I.push(0);return I}(f);for(var n=0,q=0,t=3*(f/3|0);n<t;){var A=m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<18|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<12|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<6|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)];c[n++]=A>>16|0;c[n++]=A>>-8|0;c[n++]=A|0;0<k&&19===++q&&(a+=2,q=0)}if(n<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<18-6*k;for(h=16;n<f;h-=8)c[n++]=A>>h|0}return c};return m}();B.__static_initialized=!1;z.mxBase64=B;B.__class="com.mxgraph.online.mxBase64"})(y.online||(y.online={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));com.mxgraph.online.mxBase64.IA_$LI$();com.mxgraph.online.mxBase64.CA_$LI$();com.mxgraph.online.mxBase64.__static_initialize();com.mxgraph.io.vsdx.VsdxShape.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$();+(function(g){(function(y){(function(z){var B=function(){function m(){}m.__static_initialize=function(){m.__static_initialized||(m.__static_initialized=!0,m.__static_initializer_0())};m.CA_$LI$=function(){m.__static_initialize();null==m.CA&&(m.CA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""));return m.CA};m.IA_$LI$=function(){m.__static_initialize();if(null==m.IA){for(var h=256,b=[];0<h--;)b.push(0);m.IA=b}return m.IA};m.__static_initializer_0=function(){for(var h=m.IA_$LI$(),+b=0;b<h.length;b++)h[b]=-1;h=0;for(b=m.CA_$LI$().length;h<b;h++)m.IA_$LI$()[m.CA_$LI$()[h].charCodeAt(0)]=h;m.IA_$LI$()[61]=0};m.encodeToChar=function(h,b,a){var c=null!=h?h.length-b:0;if(0===c)return[];var d=3*(c/3|0),f=((c-1)/3|0)+1<<2;f+=a?((f-1)/76|0)<<1:0;for(var k=Array(f),n=b,q=0,t=0;n<d+b;){var A=(h[n++]&255)<<16|(h[n++]&255)<<8|h[n++]&255;k[q++]=m.CA_$LI$()[A>>>18&63];k[q++]=m.CA_$LI$()[A>>>12&63];k[q++]=m.CA_$LI$()[A>>>6&63];k[q++]=m.CA_$LI$()[A&63];a&&19===++t&&q<f-2&&(k[q++]="\r",k[q++]=+"\n",t=0)}a=c-d;0<a&&(A=(h[d+b]&255)<<10|(2===a?(h[c+b-1]&255)<<2:0),k[f-4]=m.CA_$LI$()[A>>12],k[f-3]=m.CA_$LI$()[A>>>6&63],k[f-2]=2===a?m.CA_$LI$()[A&63]:"=",k[f-1]="=");return k};m.decode$char_A=function(h){var b=null!=h?h.length:0;if(0===b)return[];for(var a=0,c=0;c<b;c++)0>m.IA_$LI$()[h[c].charCodeAt(0)]&&a++;if(0!==(b-a)%4)return null;var d=0;for(c=b;1<c&&0>=m.IA_$LI$()[h[--c].charCodeAt(0)];)61==function(q){return null==q.charCodeAt?q:q.charCodeAt(0)}(h[c])&&d++;b=(6*(b-a)>>3)-d;a=function(q){for(var t=+[];0<q--;)t.push(0);return t}(b);for(var f=d=0;f<b;){for(var k=c=0;4>k;k++){var n=m.IA_$LI$()[h[d++].charCodeAt(0)];0<=n?c|=n<<18-6*k:k--}a[f++]=c>>16|0;f<b&&(a[f++]=c>>8|0,f<b&&(a[f++]=c|0))}return a};m.decode=function(h){if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"string"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decode$char_A(h);if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"number"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decode$byte_A(h);+if("string"===typeof h||null===h)return g.mxgraph.online.mxBase64.decode$java_lang_String(h);throw Error("invalid overload");};m.decodeFast$char_A=function(h){var b=h.length;if(0===b)return[];for(var a=0,c=b-1;a<c&&0>m.IA_$LI$()[h[a].charCodeAt(0)];)a++;for(;0<c&&0>m.IA_$LI$()[h[c].charCodeAt(0)];)c--;var d=61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h[c])?61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h[c-1])?2:1:0,f=c-a+1,k=76<b?(13==function(C){return null==C.charCodeAt?+C:C.charCodeAt(0)}(h[76])?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;b=function(C){for(var I=[];0<C--;)I.push(0);return I}(f);for(var n=0,q=0,t=3*(f/3|0);n<t;){var A=m.IA_$LI$()[h[a++].charCodeAt(0)]<<18|m.IA_$LI$()[h[a++].charCodeAt(0)]<<12|m.IA_$LI$()[h[a++].charCodeAt(0)]<<6|m.IA_$LI$()[h[a++].charCodeAt(0)];b[n++]=A>>16|0;b[n++]=A>>8|0;b[n++]=A|0;0<k&&19===++q&&(a+=2,q=0)}if(n<f){for(k=A=0;a<=c-d;k++)A|=m.IA_$LI$()[h[a++].charCodeAt(0)]<<18-6*k;for(h=16;n<f;h-=8)b[n++]=A>>h|0}return b};m.decodeFast=function(h){if(null!=+h&&h instanceof Array&&(0==h.length||null==h[0]||"string"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decodeFast$char_A(h);if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"number"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decodeFast$byte_A(h);if("string"===typeof h||null===h)return g.mxgraph.online.mxBase64.decodeFast$java_lang_String(h);throw Error("invalid overload");};m.encodeToByte=function(h,b){var a=null!=h?h.length:0;if(0===a)return[];for(var c=3*(a/+3|0),d=((a-1)/3|0)+1<<2,f=d+=b?((d-1)/76|0)<<1:0,k=[];0<f--;)k.push(0);for(var n=0,q=0,t=0;n<c;)f=(h[n++]&255)<<16|(h[n++]&255)<<8|h[n++]&255,k[q++]=m.CA_$LI$()[f>>>18&63].charCodeAt(0),k[q++]=m.CA_$LI$()[f>>>12&63].charCodeAt(0),k[q++]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[q++]=m.CA_$LI$()[f&63].charCodeAt(0),b&&19===++t&&q<d-2&&(k[q++]=13,k[q++]=10,t=0);b=a-c;0<b&&(f=(h[c]&255)<<10|(2===b?(h[a-1]&255)<<2:0),k[d-4]=m.CA_$LI$()[f>>12].charCodeAt(0),k[d-3]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[d-2]=+2===b?m.CA_$LI$()[f&63].charCodeAt(0):61,k[d-1]=61);return k};m.decode$byte_A=function(h){for(var b=h.length,a=0,c=0;c<b;c++)0>m.IA_$LI$()[h[c]&255]&&a++;if(0!==(b-a)%4)return null;var d=0;for(c=b;1<c&&0>=m.IA_$LI$()[h[--c]&255];)61==h[c]&&d++;c=b=(6*(b-a)>>3)-d;for(a=[];0<c--;)a.push(0);for(var f=d=0;f<b;){for(var k=c=0;4>k;k++){var n=m.IA_$LI$()[h[d++]&255];0<=n?c|=n<<18-6*k:k--}a[f++]=c>>16|0;f<b&&(a[f++]=c>>8|0,f<b&&(a[f++]=c|0))}return a};m.decodeFast$byte_A=function(h){var b=h.length;if(0===+b)return[];for(var a=0,c=b-1;a<c&&0>m.IA_$LI$()[h[a]&255];)a++;for(;0<c&&0>m.IA_$LI$()[h[c]&255];)c--;var d=61==h[c]?61==h[c-1]?2:1:0,f=c-a+1,k=76<b?(13==h[76]?f/78|0:0)<<1:0,n=f=(6*(f-k)>>3)-d;for(b=[];0<n--;)b.push(0);for(var q=n=0,t=3*(f/3|0);n<t;){var A=m.IA_$LI$()[h[a++]]<<18|m.IA_$LI$()[h[a++]]<<12|m.IA_$LI$()[h[a++]]<<6|m.IA_$LI$()[h[a++]];b[n++]=A>>16|0;b[n++]=A>>8|0;b[n++]=A|0;0<k&&19===++q&&(a+=2,q=0)}if(n<f){for(k=A=0;a<=c-d;k++)A|=m.IA_$LI$()[h[a++]]<<18-6*k;for(h=16;n<f;h-=8)b[n++]=A>>+h|0}return b};m.encodeToString=function(h,b,a){return m.encodeToChar(h,b,a).join("")};m.decode$java_lang_String=function(h){var b=null!=h?h.length:0;if(0===b)return[];for(var a=0,c=0;c<b;c++)0>m.IA_$LI$()[h.charAt(c).charCodeAt(0)]&&a++;if(0!==(b-a)%4)return null;var d=0;for(c=b;1<c&&0>=m.IA_$LI$()[h.charAt(--c).charCodeAt(0)];)61==function(q){return null==q.charCodeAt?q:q.charCodeAt(0)}(h.charAt(c))&&d++;b=(6*(b-a)>>3)-d;a=function(q){for(var t=[];0<q--;)t.push(0);return t}(b);for(var f=d=0;f<b;){for(var k=+c=0;4>k;k++){var n=m.IA_$LI$()[h.charAt(d++).charCodeAt(0)];0<=n?c|=n<<18-6*k:k--}a[f++]=c>>16|0;f<b&&(a[f++]=c>>8|0,f<b&&(a[f++]=c|0))}return a};m.decodeFast$java_lang_String=function(h){var b=h.length;if(0===b)return[];for(var a=0,c=b-1;a<c&&0>m.IA_$LI$()[function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(a))&255];)a++;for(;0<c&&0>m.IA_$LI$()[function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(c))&255];)c--;var d=61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(c))?+61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(c-1))?2:1:0,f=c-a+1,k=76<b?(13==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(76))?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;b=function(C){for(var I=[];0<C--;)I.push(0);return I}(f);for(var n=0,q=0,t=3*(f/3|0);n<t;){var A=m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<18|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<12|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<6|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)];b[n++]=A>>16|0;b[n++]=A>>+8|0;b[n++]=A|0;0<k&&19===++q&&(a+=2,q=0)}if(n<f){for(k=A=0;a<=c-d;k++)A|=m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<18-6*k;for(h=16;n<f;h-=8)b[n++]=A>>h|0}return b};return m}();B.__static_initialized=!1;z.mxBase64=B;B.__class="com.mxgraph.online.mxBase64"})(y.online||(y.online={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));com.mxgraph.online.mxBase64.IA_$LI$();com.mxgraph.online.mxBase64.CA_$LI$();com.mxgraph.online.mxBase64.__static_initialize();com.mxgraph.io.vsdx.VsdxShape.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$();com.mxgraph.io.vsdx.VsdxShape.arrowTypes_$LI$();com.mxgraph.io.vsdx.VsdxShape.arrowSizes_$LI$();com.mxgraph.io.vsdx.VsdxShape.OFFSET_ARRAY_$LI$();com.mxgraph.io.vsdx.VsdxShape.__static_initialize();com.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP_$LI$();com.mxgraph.io.vsdx.Style.lineDashPatterns_$LI$();com.mxgraph.io.vsdx.Style.styleTypes_$LI$();com.mxgraph.io.vsdx.Style.__static_initialize();com.mxgraph.online.Constants.MAX_AREA_$LI$();com.mxgraph.io.vsdx.theme.Color.NONE_$LI$();com.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.colorIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.themesIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.__static_initialize();com.mxgraph.io.vsdx.mxVsdxConstants.MY_SET_$LI$();com.mxgraph.io.vsdx.mxVsdxConstants.SET_VALUES_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.defaultColors_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.__static_initialize();com.mxgraph.io.mxVsdxCodec.vsdxPlaceholder_$LI$();com.mxgraph.io.mxVsdxCodec.parsererrorNS_$LI$();EditorUi.prototype.doImportVisio=function(g,y,z,B){B=B||g.name;null!=B&&/(\.vs(x|sx?))($|\?)/i.test(B)?(new com.mxgraph.io.mxVssxCodec(this)).decodeVssx(g,y,null,z):(new com.mxgraph.io.mxVsdxCodec(this)).decodeVsdx(g,y,null,z)};function mxGraphMlCodec(){this.cachedRefObj={}}mxGraphMlCodec.prototype.refRegexp=/^\{y:GraphMLReference\s+(\d+)\}$/;mxGraphMlCodec.prototype.staticRegexp=/^\{x:Static\s+(.+)\.(.+)\}$/;-mxGraphMlCodec.prototype.decode=function(g,y,z){try{var B=mxUtils.parseXml(g),m=this.getDirectChildNamedElements(B.documentElement,mxGraphMlConstants.GRAPH);this.initializeKeys(B.documentElement);g='<?xml version="1.0" encoding="UTF-8"?><mxfile>';for(B=0;B<m.length;B++){var h=m[B],c=this.createMxGraph(),a=c.getModel();a.beginUpdate();try{for(this.nodesMap={},this.edges=[],this.importGraph(h,c,c.getDefaultParent()),B=0;B<this.edges.length;B++)for(var b=this.edges[B],d=b.edges,f=b.parent,k=b.dx,n=b.dy,-q=0;q<d.length;q++)this.importEdge(d[q],c,f,k,n)}catch(ca){throw console.log(ca),ca;}finally{a.endUpdate()}a.beginUpdate();try{var t=c.getModel().cells,A;for(A in t){var C=t[A];if(C.edge&&0<C.getChildCount())for(B=0;B<C.getChildCount();B++){var I=C.children[B].geometry;if(I.adjustIt){var Q=c.view.getState(C),K=Q.absolutePoints,L=K[0],S=K[K.length-1],R=I.x,H=I.y;k=S.x-L.x;n=S.y-L.y;var N=L.x+R*k,J=L.y+R*n,M=Math.sqrt(k*k+n*n);k/=M;n/=M;N-=H*n;J+=H*k;var T=c.view.getRelativePoint(Q,N,J);I.x=T.x;I.y=-T.y}}}}catch(ca){throw console.log(ca),ca;}finally{a.endUpdate()}g+=this.processPage(c,B+1)}y&&y(g+"</mxfile>")}catch(ca){z&&z(ca)}};+mxGraphMlCodec.prototype.decode=function(g,y,z){try{var B=mxUtils.parseXml(g),m=this.getDirectChildNamedElements(B.documentElement,mxGraphMlConstants.GRAPH);this.initializeKeys(B.documentElement);g='<?xml version="1.0" encoding="UTF-8"?><mxfile>';for(B=0;B<m.length;B++){var h=m[B],b=this.createMxGraph(),a=b.getModel();a.beginUpdate();try{for(this.nodesMap={},this.edges=[],this.importGraph(h,b,b.getDefaultParent()),B=0;B<this.edges.length;B++)for(var c=this.edges[B],d=c.edges,f=c.parent,k=c.dx,n=c.dy,+q=0;q<d.length;q++)this.importEdge(d[q],b,f,k,n)}catch(ca){throw console.log(ca),ca;}finally{a.endUpdate()}a.beginUpdate();try{var t=b.getModel().cells,A;for(A in t){var C=t[A];if(C.edge&&0<C.getChildCount())for(B=0;B<C.getChildCount();B++){var I=C.children[B].geometry;if(I.adjustIt){var Q=b.view.getState(C),K=Q.absolutePoints,L=K[0],S=K[K.length-1],R=I.x,H=I.y;k=S.x-L.x;n=S.y-L.y;var N=L.x+R*k,J=L.y+R*n,M=Math.sqrt(k*k+n*n);k/=M;n/=M;N-=H*n;J+=H*k;var T=b.view.getRelativePoint(Q,N,J);I.x=T.x;I.y=+T.y}}}}catch(ca){throw console.log(ca),ca;}finally{a.endUpdate()}g+=this.processPage(b,B+1)}y&&y(g+"</mxfile>")}catch(ca){z&&z(ca)}};mxGraphMlCodec.prototype.initializeKeys=function(g){var y=this.getDirectChildNamedElements(g,mxGraphMlConstants.KEY);this.nodesKeys={};this.edgesKeys={};this.portsKeys={};this.sharedData={};this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY]={};this.nodesKeys[mxGraphMlConstants.USER_TAGS]={};this.nodesKeys[mxGraphMlConstants.NODE_STYLE]={};this.nodesKeys[mxGraphMlConstants.NODE_LABELS]={};this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS]={};this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY]={};this.edgesKeys[mxGraphMlConstants.EDGE_STYLE]=-{};this.edgesKeys[mxGraphMlConstants.EDGE_LABELS]={};this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER]={};this.portsKeys[mxGraphMlConstants.PORT_STYLE]={};this.portsKeys[mxGraphMlConstants.PORT_VIEW_STATE]={};for(var z,B=0;B<y.length;B++){var m=this.dataElem2Obj(y[B]),h=m[mxGraphMlConstants.ID],c=m[mxGraphMlConstants.KEY_FOR],a=m[mxGraphMlConstants.KEY_NAME],b=m[mxGraphMlConstants.KEY_YTYPE];a==mxGraphMlConstants.SHARED_DATA&&(z=h);a=a?a:b;switch(c){case mxGraphMlConstants.NODE:this.nodesKeys[a]=-{key:h,keyObj:m};break;case mxGraphMlConstants.EDGE:this.edgesKeys[a]={key:h,keyObj:m};break;case mxGraphMlConstants.PORT:this.portsKeys[a]={key:h,keyObj:m};break;case mxGraphMlConstants.ALL:m={key:h,keyObj:m},this.nodesKeys[a]=m,this.edgesKeys[a]=m,this.portsKeys[a]=m}}g=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA);for(B=0;B<g.length;B++)if(g[B].getAttribute(mxGraphMlConstants.KEY)==z)for(c=this.getDirectChildNamedElements(g[B],mxGraphMlConstants.Y_SHARED_DATA),y=0;y<c.length;y++)for(a=-this.getDirectChildElements(c[y]),m=0;m<a.length;m++)h=a[m].getAttribute(mxGraphMlConstants.X_KEY),this.sharedData[h]=a[m];else for(c=this.getDirectChildNamedElements(g[B],mxGraphMlConstants.Y_RESOURCES),y=0;y<c.length;y++)for(a=this.getDirectChildElements(c[y]),m=0;m<a.length;m++)h=a[m].getAttribute(mxGraphMlConstants.ID),this.sharedData[h]=a[m]};+{};this.edgesKeys[mxGraphMlConstants.EDGE_LABELS]={};this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER]={};this.portsKeys[mxGraphMlConstants.PORT_STYLE]={};this.portsKeys[mxGraphMlConstants.PORT_VIEW_STATE]={};for(var z,B=0;B<y.length;B++){var m=this.dataElem2Obj(y[B]),h=m[mxGraphMlConstants.ID],b=m[mxGraphMlConstants.KEY_FOR],a=m[mxGraphMlConstants.KEY_NAME],c=m[mxGraphMlConstants.KEY_YTYPE];a==mxGraphMlConstants.SHARED_DATA&&(z=h);a=a?a:c;switch(b){case mxGraphMlConstants.NODE:this.nodesKeys[a]=+{key:h,keyObj:m};break;case mxGraphMlConstants.EDGE:this.edgesKeys[a]={key:h,keyObj:m};break;case mxGraphMlConstants.PORT:this.portsKeys[a]={key:h,keyObj:m};break;case mxGraphMlConstants.ALL:m={key:h,keyObj:m},this.nodesKeys[a]=m,this.edgesKeys[a]=m,this.portsKeys[a]=m}}g=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA);for(B=0;B<g.length;B++)if(g[B].getAttribute(mxGraphMlConstants.KEY)==z)for(b=this.getDirectChildNamedElements(g[B],mxGraphMlConstants.Y_SHARED_DATA),y=0;y<b.length;y++)for(a=+this.getDirectChildElements(b[y]),m=0;m<a.length;m++)h=a[m].getAttribute(mxGraphMlConstants.X_KEY),this.sharedData[h]=a[m];else for(b=this.getDirectChildNamedElements(g[B],mxGraphMlConstants.Y_RESOURCES),y=0;y<b.length;y++)for(a=this.getDirectChildElements(b[y]),m=0;m<a.length;m++)h=a[m].getAttribute(mxGraphMlConstants.ID),this.sharedData[h]=a[m]};mxGraphMlCodec.prototype.parseAttributes=function(g,y){if(g=g.attributes)for(var z=0;z<g.length;z++){var B=g[z].nodeValue,m=this.refRegexp.exec(B),h=this.staticRegexp.exec(B);m?(B=m[1],m=this.cachedRefObj[B],m||(m={},m[this.sharedData[B].nodeName]=this.dataElem2Obj(this.sharedData[B]),this.cachedRefObj[B]=m),y[g[z].nodeName]=m):h?(y[g[z].nodeName]={},y[g[z].nodeName][h[1]]=h[2]):y[g[z].nodeName]=B}};-mxGraphMlCodec.prototype.dataElem2Obj=function(g){var y=this.getDirectFirstChildNamedElements(g,mxGraphMlConstants.GRAPHML_REFERENCE)||g.getAttribute(mxGraphMlConstants.REFID),z=null,B=g,m={};if(y){z="string"===typeof y?y:y.getAttribute(mxGraphMlConstants.RESOURCE_KEY);if(y=this.cachedRefObj[z])return this.parseAttributes(g,y),y;g=this.sharedData[z]}this.parseAttributes(g,m);for(y=0;y<g.childNodes.length;y++){var h=g.childNodes[y];if(1==h.nodeType){var c=h.nodeName;if(c==mxGraphMlConstants.X_LIST){var a=-[];h=this.getDirectChildElements(h);for(var b=0;b<h.length;b++)c=h[b].nodeName,a.push(this.dataElem2Obj(h[b]));m[c]=a}else c==mxGraphMlConstants.X_STATIC?(c=h.getAttribute(mxGraphMlConstants.MEMBER),a=c.lastIndexOf("."),m[c.substr(0,a)]=c.substr(a+1)):(a=c.lastIndexOf("."),0<a&&(c=c.substr(a+1)),null!=m[c]?(m[c]instanceof Array||(m[c]=[m[c]]),m[c].push(this.dataElem2Obj(h))):m[c]=this.dataElem2Obj(h))}else 3!=h.nodeType&&4!=h.nodeType||!h.textContent.trim()||(m["#text"]=h.textContent)}return z?(g=+mxGraphMlCodec.prototype.dataElem2Obj=function(g){var y=this.getDirectFirstChildNamedElements(g,mxGraphMlConstants.GRAPHML_REFERENCE)||g.getAttribute(mxGraphMlConstants.REFID),z=null,B=g,m={};if(y){z="string"===typeof y?y:y.getAttribute(mxGraphMlConstants.RESOURCE_KEY);if(y=this.cachedRefObj[z])return this.parseAttributes(g,y),y;g=this.sharedData[z]}this.parseAttributes(g,m);for(y=0;y<g.childNodes.length;y++){var h=g.childNodes[y];if(1==h.nodeType){var b=h.nodeName;if(b==mxGraphMlConstants.X_LIST){var a=+[];h=this.getDirectChildElements(h);for(var c=0;c<h.length;c++)b=h[c].nodeName,a.push(this.dataElem2Obj(h[c]));m[b]=a}else b==mxGraphMlConstants.X_STATIC?(b=h.getAttribute(mxGraphMlConstants.MEMBER),a=b.lastIndexOf("."),m[b.substr(0,a)]=b.substr(a+1)):(a=b.lastIndexOf("."),0<a&&(b=b.substr(a+1)),null!=m[b]?(m[b]instanceof Array||(m[b]=[m[b]]),m[b].push(this.dataElem2Obj(h))):m[b]=this.dataElem2Obj(h))}else 3!=h.nodeType&&4!=h.nodeType||!h.textContent.trim()||(m["#text"]=h.textContent)}return z?(g={},this.parseAttributes(B,g),g[this.sharedData[z].nodeName]=m,this.cachedRefObj[z]=g):m};mxGraphMlCodec.prototype.mapArray=function(g,y,z){for(var B={},m=0;m<g.length;m++)g[m].name&&(B[g[m].name]=g[m].value||g[m]);this.mapObject(B,y,z)};-mxGraphMlCodec.prototype.mapObject=function(g,y,z){if(y.defaults)for(var B in y.defaults)z[B]=y.defaults[B];for(B in y){for(var m=B.split("."),h=g,c=0;c<m.length&&h;c++)h=h[m[c]];null==h&&g&&(h=g[B]);if(null!=h)if(m=y[B],"string"===typeof h)if("string"===typeof m)z[m]=h.toLowerCase();else if("object"===typeof m){c=h.toLowerCase();switch(m.mod){case "color":0==h.indexOf("#")&&9==h.length?c="#"+h.substr(3)+h.substr(1,2):"TRANSPARENT"==h&&(c="none");break;case "shape":c=mxGraphMlShapesMap[h.toLowerCase()];-break;case "bpmnOutline":c=mxGraphMlShapesMap.bpmnOutline[h.toLowerCase()];break;case "bpmnSymbol":c=mxGraphMlShapesMap.bpmnSymbol[h.toLowerCase()];break;case "bool":c="true"==h?"1":"0";break;case "scale":try{c=parseFloat(h)*m.scale}catch(a){}break;case "arrow":c=mxGraphMlArrowsMap[h]}null!=c&&(z[m.key]=c)}else m(h,z);else h instanceof Array?this.mapArray(h,m,z):null!=h.name&&null!=h.value?this.mapArray([h],m,z):this.mapObject(h,m,z)}};mxGraphMlCodec.prototype.createMxGraph=function(){return new mxGraph};-mxGraphMlCodec.prototype.importGraph=function(g,y,z){for(var B=this.getDirectChildNamedElements(g,mxGraphMlConstants.NODE),m=z,h=0,c=0;m&&m.geometry;)h+=m.geometry.x,c+=m.geometry.y,m=m.parent;for(m=0;m<B.length;m++)this.importNode(B[m],y,z,h,c);this.edges.push({edges:this.getDirectChildNamedElements(g,mxGraphMlConstants.EDGE),parent:z,dx:h,dy:c})};-mxGraphMlCodec.prototype.importPort=function(g,y){var z=g.getAttribute(mxGraphMlConstants.PORT_NAME),B={};g=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA);for(var m=0;m<g.length;m++){var h=g[m];h.getAttribute(mxGraphMlConstants.KEY);h=this.dataElem2Obj(h);h.key==this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER].key&&this.mapObject(h,{"y:FreeNodePortLocationModelParameter.Ratio":function(c,a){c=c.split(",");a.pos={x:c[0],y:c[1]}}},B)}y[z]=B};+mxGraphMlCodec.prototype.mapObject=function(g,y,z){if(y.defaults)for(var B in y.defaults)z[B]=y.defaults[B];for(B in y){for(var m=B.split("."),h=g,b=0;b<m.length&&h;b++)h=h[m[b]];null==h&&g&&(h=g[B]);if(null!=h)if(m=y[B],"string"===typeof h)if("string"===typeof m)z[m]=h.toLowerCase();else if("object"===typeof m){b=h.toLowerCase();switch(m.mod){case "color":0==h.indexOf("#")&&9==h.length?b="#"+h.substr(3)+h.substr(1,2):"TRANSPARENT"==h&&(b="none");break;case "shape":b=mxGraphMlShapesMap[h.toLowerCase()];+break;case "bpmnOutline":b=mxGraphMlShapesMap.bpmnOutline[h.toLowerCase()];break;case "bpmnSymbol":b=mxGraphMlShapesMap.bpmnSymbol[h.toLowerCase()];break;case "bool":b="true"==h?"1":"0";break;case "scale":try{b=parseFloat(h)*m.scale}catch(a){}break;case "arrow":b=mxGraphMlArrowsMap[h]}null!=b&&(z[m.key]=b)}else m(h,z);else h instanceof Array?this.mapArray(h,m,z):null!=h.name&&null!=h.value?this.mapArray([h],m,z):this.mapObject(h,m,z)}};mxGraphMlCodec.prototype.createMxGraph=function(){return new mxGraph};+mxGraphMlCodec.prototype.importGraph=function(g,y,z){for(var B=this.getDirectChildNamedElements(g,mxGraphMlConstants.NODE),m=z,h=0,b=0;m&&m.geometry;)h+=m.geometry.x,b+=m.geometry.y,m=m.parent;for(m=0;m<B.length;m++)this.importNode(B[m],y,z,h,b);this.edges.push({edges:this.getDirectChildNamedElements(g,mxGraphMlConstants.EDGE),parent:z,dx:h,dy:b})};+mxGraphMlCodec.prototype.importPort=function(g,y){var z=g.getAttribute(mxGraphMlConstants.PORT_NAME),B={};g=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA);for(var m=0;m<g.length;m++){var h=g[m];h.getAttribute(mxGraphMlConstants.KEY);h=this.dataElem2Obj(h);h.key==this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER].key&&this.mapObject(h,{"y:FreeNodePortLocationModelParameter.Ratio":function(b,a){b=b.split(",");a.pos={x:b[0],y:b[1]}}},B)}y[z]=B};mxGraphMlCodec.prototype.styleMap2Str=function(g){var y="",z="",B;for(B in g)z+=y+B+"="+g[B],y=";";return z};-mxGraphMlCodec.prototype.importNode=function(g,y,z,B,m){var h=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA),c=g.getAttribute(mxGraphMlConstants.ID),a=new mxCell;a.vertex=!0;a.geometry=new mxGeometry(0,0,30,30);y.addCell(a,z);z={graphMlID:c};for(var b=null,d=null,f=null,k=null,n=0;n<h.length;n++){var q=this.dataElem2Obj(h[n]);if(q.key)if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY].key)this.addNodeGeo(a,q,B,m);else if(q.key==this.nodesKeys[mxGraphMlConstants.USER_TAGS].key)f=-q;else if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_STYLE].key)b=q,q["yjs:StringTemplateNodeStyle"]?d=q["yjs:StringTemplateNodeStyle"]["#text"]:this.addNodeStyle(a,q,z);else if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_LABELS].key)k=q;else if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS].key){var t=b=null;for(t in q)if("key"!=t&&"#text"!=t){if("y:ProxyAutoBoundsNode"==t){if(t=q[t]["y:Realizers"])for(var A in t)if("active"!=A&&"#text"!=A){b=t[A][t.active];q={};q[A]=b;break}}else b=-q[t];break}b&&(b[mxGraphMlConstants.GEOMETRY]&&this.addNodeGeo(a,b[mxGraphMlConstants.GEOMETRY],B,m),b[mxGraphMlConstants.NODE_LABEL]&&(k=b[mxGraphMlConstants.NODE_LABEL]));b=q;this.addNodeStyle(a,q,z)}}m=this.getDirectChildNamedElements(g,mxGraphMlConstants.PORT);B={};for(n=0;n<m.length;n++)this.importPort(m[n],B);d&&this.handleTemplates(d,f,a,z);this.handleFixedRatio(a,z);this.handleCompoundShape(a,z,b,null);0==z.strokeWidth&&(z.strokeColor="none");a.style=this.styleMap2Str(z);g=this.getDirectChildNamedElements(g,-mxGraphMlConstants.GRAPH);for(n=0;n<g.length;n++)this.importGraph(g[n],y,a,B);k&&this.addLabels(a,k,z,y);this.nodesMap[c]={node:a,ports:B}};+mxGraphMlCodec.prototype.importNode=function(g,y,z,B,m){var h=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA),b=g.getAttribute(mxGraphMlConstants.ID),a=new mxCell;a.vertex=!0;a.geometry=new mxGeometry(0,0,30,30);y.addCell(a,z);z={graphMlID:b};for(var c=null,d=null,f=null,k=null,n=0;n<h.length;n++){var q=this.dataElem2Obj(h[n]);if(q.key)if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY].key)this.addNodeGeo(a,q,B,m);else if(q.key==this.nodesKeys[mxGraphMlConstants.USER_TAGS].key)f=+q;else if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_STYLE].key)c=q,q["yjs:StringTemplateNodeStyle"]?d=q["yjs:StringTemplateNodeStyle"]["#text"]:this.addNodeStyle(a,q,z);else if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_LABELS].key)k=q;else if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS].key){var t=c=null;for(t in q)if("key"!=t&&"#text"!=t){if("y:ProxyAutoBoundsNode"==t){if(t=q[t]["y:Realizers"])for(var A in t)if("active"!=A&&"#text"!=A){c=t[A][t.active];q={};q[A]=c;break}}else c=+q[t];break}c&&(c[mxGraphMlConstants.GEOMETRY]&&this.addNodeGeo(a,c[mxGraphMlConstants.GEOMETRY],B,m),c[mxGraphMlConstants.NODE_LABEL]&&(k=c[mxGraphMlConstants.NODE_LABEL]));c=q;this.addNodeStyle(a,q,z)}}m=this.getDirectChildNamedElements(g,mxGraphMlConstants.PORT);B={};for(n=0;n<m.length;n++)this.importPort(m[n],B);d&&this.handleTemplates(d,f,a,z);this.handleFixedRatio(a,z);this.handleCompoundShape(a,z,c,null);0==z.strokeWidth&&(z.strokeColor="none");a.style=this.styleMap2Str(z);g=this.getDirectChildNamedElements(g,+mxGraphMlConstants.GRAPH);for(n=0;n<g.length;n++)this.importGraph(g[n],y,a,B);k&&this.addLabels(a,k,z,y);this.nodesMap[b]={node:a,ports:B}};mxGraphMlCodec.prototype.addNodeStyle=function(g,y,z){g=function(R,H){if("line"!=R){H.dashed=1;switch(R){case "DashDot":R="3 1 1 1";break;case "Dot":R="1 1";break;case "DashDotDot":R="3 1 1 1 1 1";break;case "Dash":R="3 1";break;case "dotted":R="1 3";break;case "dashed":R="5 2";break;default:R=R.replace(/0/g,"1")}R&&(0>R.indexOf(" ")&&(R=R+" "+R),H.dashPattern=R)}};g={shape:{key:"shape",mod:"shape"},"y:Shape.type":{key:"shape",mod:"shape"},configuration:{key:"shape",mod:"shape"},type:{key:"shape",mod:"shape"},assetName:{key:"shape",mod:"shape"},activityType:{key:"shape",mod:"shape"},fill:{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"y:Fill":{color:{key:"fillColor",mod:"color"},transparent:function(R,H){"true"==R&&(H.fillColor="none")}},"y:BorderStyle":{color:{key:"strokeColor",mod:"color"},width:"strokeWidth",hasColor:function(R,H){"false"==R&&(H.strokeColor="none")},type:g},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:g,"dashStyle.yjs:DashStyle.dashes":g,fill:{key:"strokeColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"strokeColor",mod:"color"},"thickness.sys:Double":"strokeWidth",thickness:"strokeWidth"}};var B=mxUtils.clone(g);B.defaults={fillColor:"#CCCCCC",strokeColor:"#6881B3"};var m=mxUtils.clone(g);m.defaults={shape:"ext;rounded=1",fillColor:"#FFFFFF",strokeColor:"#000090"};var h=mxUtils.clone(g);h.defaults={shape:"rhombus;fillColor=#FFFFFF;strokeColor=#FFCD28"};-var c=mxUtils.clone(g);c.defaults={shape:"hexagon",strokeColor:"#007000"};var a=mxUtils.clone(g);a.defaults={shape:"mxgraph.bpmn.shape;perimeter=ellipsePerimeter;symbol=general",outline:"standard"};a.characteristic={key:"outline",mod:"bpmnOutline"};var b=mxUtils.clone(g);b.defaults={shape:"js:bpmnDataObject"};var d=mxUtils.clone(g);d.defaults={shape:"datastore"};var f=mxUtils.clone(g);f.defaults={shape:"swimlane;swimlaneLine=0;startSize=20;dashed=1;dashPattern=3 1 1 1;collapsible=0;rounded=1"};var k=+var b=mxUtils.clone(g);b.defaults={shape:"hexagon",strokeColor:"#007000"};var a=mxUtils.clone(g);a.defaults={shape:"mxgraph.bpmn.shape;perimeter=ellipsePerimeter;symbol=general",outline:"standard"};a.characteristic={key:"outline",mod:"bpmnOutline"};var c=mxUtils.clone(g);c.defaults={shape:"js:bpmnDataObject"};var d=mxUtils.clone(g);d.defaults={shape:"datastore"};var f=mxUtils.clone(g);f.defaults={shape:"swimlane;swimlaneLine=0;startSize=20;dashed=1;dashPattern=3 1 1 1;collapsible=0;rounded=1"};var k=mxUtils.clone(g);k.defaults={shape:"js:BpmnChoreography"};var n=mxUtils.clone(g);n.defaults={rounded:"1",glass:"1",strokeColor:"#FFFFFF"};n.inset="strokeWidth";n.radius="arcSize";n.drawShadow={key:"shadow",mod:"bool"};n.color={key:"fillColor",mod:"color",addGradient:"north"};n["color.yjs:Color.value"]=n.color;var q=mxUtils.clone(g);q.defaults={rounded:"1",arcSize:10,glass:"1",shadow:"1",strokeColor:"none"};q.drawShadow={key:"shadow",mod:"bool"};var t=mxUtils.clone(g);t.defaults={shape:"swimlane",startSize:20,strokeWidth:4,spacingLeft:10};t.isCollapsible={key:"collapsible",mod:"bool"};t.borderColor={key:"strokeColor",mod:"color"};t.folderFrontColor={key:"fillColor",mod:"color"};var A=mxUtils.clone(g);A.defaults={shape:"swimlane",startSize:20,spacingLeft:10};A["yjs:PanelNodeStyle"]={color:{key:"swimlaneFillColor",mod:"color"},"color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},labelInsetsColor:{key:"fillColor",mod:"color"},"labelInsetsColor.yjs:Color.value":{key:"fillColor",mod:"color"}};var C=mxUtils.clone(g);C.defaults={shape:"js:table"};var I=mxUtils.clone(g);I.defaults={shape:"image"};I.image=function(R,H){H.image=R};var Q=mxUtils.clone(g);Q.defaults={shape:"image"};Q["y:SVGModel.y:SVGContent.y:Resource.#text"]=function(R,H){H.image="data:image/svg+xml,"+(window.btoa?btoa(R):Base64.encode(R))};var K=mxUtils.clone(g);K.defaults={shape:"swimlane",startSize:20};K["y:Shape.type"]=function(R,H){"roundrectangle"==R&&(H.rounded=1,H.arcSize=5)};var L=mxUtils.clone(g);L.defaults={shape:"js:table2"};var S=mxUtils.clone(g);S.defaults={gradientDirection:"east"};S["y:Fill"].color2={key:"gradientColor",mod:"color"};S["y:StyleProperties.y:Property"]={"com.yworks.bpmn.characteristic":{key:"outline",mod:"bpmnOutline"},"com.yworks.bpmn.icon.fill":{key:"gradientColor",mod:"color"},"com.yworks.bpmn.icon.fill2":{key:"fillColor",mod:"color"},"com.yworks.bpmn.type":{key:"symbol",mod:"bpmnSymbol"},"y.view.ShadowNodePainter.SHADOW_PAINTING":{key:"shadow",mod:"bool"},doubleBorder:{key:"double",mod:"bool"},"com.yworks.sbgn.style.radius":{key:"arcSize",-mod:"scale",scale:2},"com.yworks.sbgn.style.inverse":{key:"flipV",mod:"bool"}};this.mapObject(y,{"yjs:ShapeNodeStyle":g,"demostyle:FlowchartNodeStyle":g,"demostyle:AssetNodeStyle":B,"bpmn:ActivityNodeStyle":m,"bpmn:GatewayNodeStyle":h,"bpmn:ConversationNodeStyle":c,"bpmn:EventNodeStyle":a,"bpmn:DataObjectNodeStyle":b,"bpmn:DataStoreNodeStyle":d,"bpmn:GroupNodeStyle":f,"bpmn:ChoreographyNodeStyle":k,"yjs:BevelNodeStyle":n,"yjs:ShinyPlateNodeStyle":q,"demostyle:DemoGroupStyle":t,"yjs:CollapsibleNodeStyleDecorator":A,+mod:"scale",scale:2},"com.yworks.sbgn.style.inverse":{key:"flipV",mod:"bool"}};this.mapObject(y,{"yjs:ShapeNodeStyle":g,"demostyle:FlowchartNodeStyle":g,"demostyle:AssetNodeStyle":B,"bpmn:ActivityNodeStyle":m,"bpmn:GatewayNodeStyle":h,"bpmn:ConversationNodeStyle":b,"bpmn:EventNodeStyle":a,"bpmn:DataObjectNodeStyle":c,"bpmn:DataStoreNodeStyle":d,"bpmn:GroupNodeStyle":f,"bpmn:ChoreographyNodeStyle":k,"yjs:BevelNodeStyle":n,"yjs:ShinyPlateNodeStyle":q,"demostyle:DemoGroupStyle":t,"yjs:CollapsibleNodeStyleDecorator":A,"bpmn:PoolNodeStyle":C,"yjs:TableNodeStyle":C,"demotablestyle:DemoTableStyle":C,"yjs:ImageNodeStyle":I,"y:ShapeNode":g,"y:GenericNode":S,"y:GenericGroupNode":S,"y:TableNode":L,"y:SVGNode":Q,"y:GroupNode":K},z)};-mxGraphMlCodec.prototype.handleTemplates=function(g,y,z,B){if(g){var m=z.geometry.width,h=z.geometry.height;z='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+m+" "+h+'"><g>';for(var c,a=[],b=/\{TemplateBinding\s+([^}]+)\}/g;null!=(c=b.exec(g));){var d="";switch(c[1]){case "width":d=m;break;case "height":d=h}a.push({match:c[0],repl:d})}if(y&&y["y:Json"])for(y=JSON.parse(y["y:Json"]["#text"]),m=/\{Binding\s+([^}]+)\}/g;null!=(c=m.exec(g));)if(h=c[1].split(","),-b=y[h[0]])1<h.length&&h[1].indexOf("Converter=")&&(d=mxGraphMlConverters[h[1].substr(11)])&&(b=[b],h[2]&&b.push(h[2].substr(11)),b=d.apply(null,b)),a.push({match:c[0],repl:mxUtils.htmlEntities(b)});for(c=0;c<a.length;c++)g=g.replace(a[c].match,a[c].repl);a=[];for(y=/<text.+data-content="([^"]+).+<\/text>/g;null!=(c=y.exec(g));)b=c[0].substr(0,c[0].length-7)+c[1]+"</text>",a.push({match:c[0],repl:b});for(c=0;c<a.length;c++)g=g.replace(a[c].match,a[c].repl);g=z+g+"</g></svg>";B.shape="image";B.image=+mxGraphMlCodec.prototype.handleTemplates=function(g,y,z,B){if(g){var m=z.geometry.width,h=z.geometry.height;z='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+m+" "+h+'"><g>';for(var b,a=[],c=/\{TemplateBinding\s+([^}]+)\}/g;null!=(b=c.exec(g));){var d="";switch(b[1]){case "width":d=m;break;case "height":d=h}a.push({match:b[0],repl:d})}if(y&&y["y:Json"])for(y=JSON.parse(y["y:Json"]["#text"]),m=/\{Binding\s+([^}]+)\}/g;null!=(b=m.exec(g));)if(h=b[1].split(","),+c=y[h[0]])1<h.length&&h[1].indexOf("Converter=")&&(d=mxGraphMlConverters[h[1].substr(11)])&&(c=[c],h[2]&&c.push(h[2].substr(11)),c=d.apply(null,c)),a.push({match:b[0],repl:mxUtils.htmlEntities(c)});for(b=0;b<a.length;b++)g=g.replace(a[b].match,a[b].repl);a=[];for(y=/<text.+data-content="([^"]+).+<\/text>/g;null!=(b=y.exec(g));)c=b[0].substr(0,b[0].length-7)+b[1]+"</text>",a.push({match:b[0],repl:c});for(b=0;b<a.length;b++)g=g.replace(a[b].match,a[b].repl);g=z+g+"</g></svg>";B.shape="image";B.image="data:image/svg+xml,"+(window.btoa?btoa(g):Base64.encode(g))}};mxGraphMlCodec.prototype.handleCompoundShape=function(g,y,z,B){var m=y.shape;if(m&&0==m.indexOf("js:")){switch(m){case "js:bpmnArtifactShadow":y.shadow="1";case "js:bpmnArtifact":y.shape=y.symbol;delete y.fillColor;delete y.strokeColor;delete y.gradientColor;this.handleCompoundShape(g,y,z,B);break;case "js:bpmnDataObjectShadow":case "js:bpmnDataObject":y.shape="note;size=16";z=z["bpmn:DataObjectNodeStyle"]||z["y:GenericNode"]||z["y:GenericGroupNode"];B={};this.mapObject(z,{"y:StyleProperties.y:Property":{"com.yworks.bpmn.dataObjectType":"dataObjectType","com.yworks.bpmn.marker1":"marker1"}},B);if("true"==z.collection||"bpmn_marker_parallel"==B.marker1){var h=new mxCell("",new mxGeometry(.5,1,10,10),"html=1;whiteSpace=wrap;shape=parallelMarker;");h.vertex=!0;h.geometry.relative=!0;h.geometry.offset=new mxPoint(-5,-10);g.insert(h)}if("INPUT"==z.type||"data_object_type_input"==B.dataObjectType)h=new mxCell("",new mxGeometry(0,0,10,10),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;"),h.vertex=!0,h.geometry.relative=!0,h.geometry.offset=new mxPoint(2,2),g.insert(h);else if("OUTPUT"==z.type||"data_object_type_output"==B.dataObjectType)h=new mxCell("",new mxGeometry(0,0,10,10),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;fillColor=#000000;"),h.vertex=!0,h.geometry.relative=!0,h.geometry.offset=new mxPoint(2,2),g.insert(h);break;case "js:BpmnChoreography":this.mapObject(z,{defaults:{shape:"swimlane;collapsible=0;rounded=1",startSize:"20",strokeColor:"#006000",fillColor:"#CCCCCC"}},y);h=g.geometry;h=new mxCell("",new mxGeometry(0,h.height-20,h.width,20),"strokeColor=#006000;fillColor=#777777;rounded=1");h.vertex=!0;g.insert(h);B&&B.lblTxts&&(g.value=B.lblTxts[0],h.value=B.lblTxts[1]);break;case "js:bpmnActivityShadow":case "js:bpmnActivity":y.shape="ext;rounded=1";B={};z=z["y:GenericNode"]||z["y:GenericGroupNode"];this.mapObject(z,{"y:StyleProperties.y:Property":{"com.yworks.bpmn.taskType":"taskType","com.yworks.bpmn.activityType":"activityType","com.yworks.bpmn.marker1":"marker1","com.yworks.bpmn.marker2":"marker2","com.yworks.bpmn.marker3":"marker3",-"com.yworks.bpmn.marker4":"marker4"}},B);switch(B.activityType){case "activity_type_transaction":y["double"]="1"}switch(B.taskType){case "task_type_send":var c=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;fillColor=#000000;strokeColor=#FFFFFF;");c.geometry.offset=new mxPoint(4,7);break;case "task_type_receive":c=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");c.geometry.offset=new mxPoint(4,7);break;case "task_type_user":c=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");-c.geometry.offset=new mxPoint(4,5);break;case "task_type_manual":c=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");c.geometry.offset=new mxPoint(4,7);break;case "task_type_business_rule":c=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");c.geometry.offset=new mxPoint(4,7);break;case "task_type_service":c=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");c.geometry.offset=new mxPoint(4,5);break;case "task_type_script":c=-new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),c.geometry.offset=new mxPoint(4,5)}c&&(c.vertex=!0,c.geometry.relative=!0,g.insert(c),c=null);var a=0;for(h=1;4>=h;h++)B["marker"+h]&&a++;z=-7.5*a-2*(a-1);for(h=1;h<=a;h++){switch(B["marker"+h]){case "bpmn_marker_closed":c=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");c.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_open":c=new mxCell("",new mxGeometry(.5,1,15,15),"shape=rect;part=1;");c.geometry.offset=-new mxPoint(z,-20);var b=new mxCell("",new mxGeometry(.5,.5,8,1),"shape=rect;part=1;");b.geometry.offset=new mxPoint(-4,-1);b.geometry.relative=!0;b.vertex=!0;c.insert(b);break;case "bpmn_marker_loop":c=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");c.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_parallel":c=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");c.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_sequential":c=new mxCell("",-new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");c.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_ad_hoc":c=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;fillColor=#000000");c.geometry.offset=new mxPoint(z,-17);break;case "bpmn_marker_compensation":c=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),c.geometry.offset=new mxPoint(z,-18)}c.geometry.relative=!0;c.vertex=!0;g.insert(c);+"com.yworks.bpmn.marker4":"marker4"}},B);switch(B.activityType){case "activity_type_transaction":y["double"]="1"}switch(B.taskType){case "task_type_send":var b=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;fillColor=#000000;strokeColor=#FFFFFF;");b.geometry.offset=new mxPoint(4,7);break;case "task_type_receive":b=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");b.geometry.offset=new mxPoint(4,7);break;case "task_type_user":b=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");+b.geometry.offset=new mxPoint(4,5);break;case "task_type_manual":b=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");b.geometry.offset=new mxPoint(4,7);break;case "task_type_business_rule":b=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");b.geometry.offset=new mxPoint(4,7);break;case "task_type_service":b=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");b.geometry.offset=new mxPoint(4,5);break;case "task_type_script":b=+new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),b.geometry.offset=new mxPoint(4,5)}b&&(b.vertex=!0,b.geometry.relative=!0,g.insert(b),b=null);var a=0;for(h=1;4>=h;h++)B["marker"+h]&&a++;z=-7.5*a-2*(a-1);for(h=1;h<=a;h++){switch(B["marker"+h]){case "bpmn_marker_closed":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");b.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_open":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=rect;part=1;");b.geometry.offset=+new mxPoint(z,-20);var c=new mxCell("",new mxGeometry(.5,.5,8,1),"shape=rect;part=1;");c.geometry.offset=new mxPoint(-4,-1);c.geometry.relative=!0;c.vertex=!0;b.insert(c);break;case "bpmn_marker_loop":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");b.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_parallel":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");b.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_sequential":b=new mxCell("",+new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");b.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_ad_hoc":b=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;fillColor=#000000");b.geometry.offset=new mxPoint(z,-17);break;case "bpmn_marker_compensation":b=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),b.geometry.offset=new mxPoint(z,-18)}b.geometry.relative=!0;b.vertex=!0;g.insert(b);z+=20}break;case "js:table":y.shape="swimlane;collapsible=0;swimlaneLine=0";B=z["yjs:TableNodeStyle"]||z["demotablestyle:DemoTableStyle"];!B&&z["bpmn:PoolNodeStyle"]&&(B=z["bpmn:PoolNodeStyle"]["yjs:TableNodeStyle"]);this.mapObject(B,{"backgroundStyle.demotablestyle:TableBackgroundStyle":{"insetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableBackgroundFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},"tableBackgroundStroke.yjs:Stroke":{fill:{key:"strokeColor",mod:"color"},thickness:"strokeWidth"}},"backgroundStyle.yjs:ShapeNodeStyle.fill":{key:"fillColor",mod:"color"},"backgroundStyle.yjs:ShapeNodeStyle.fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"}},y);y.swimlaneFillColor=y.fillColor;B=B.table["y:Table"];var d=a=0,f={x:0};z=0;(h=B.Insets)?(h=h.split(","),"0"!=h[0]?(y.startSize=h[0],f.x=parseFloat(h[0]),y.horizontal="0"):"0"!=h[1]&&(y.startSize=h[1],z=parseFloat(h[1]),d+=z)):y.startSize="0";var k={},n={Insets:function(A,C){C.startSize=A.split(",")[0]},"Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill",mod:"color"},backgroundFill:{key:"oddLaneFill",mod:"color"}}},"Style.yjs:NodeStyleStripeStyleAdapter":{"demotablestyle:DemoStripeStyle":{"stripeInsetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableLineFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"strokeColor",-mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"height"};this.mapObject(B.RowDefaults,{defaults:{shape:"swimlane;collapsible=0;horizontal=0",startSize:"0"},"y:StripeDefaults":n},k);c={};b={Insets:function(A,C){C.startSize=A.split(",")[1]},"Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill",+mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"height"};this.mapObject(B.RowDefaults,{defaults:{shape:"swimlane;collapsible=0;horizontal=0",startSize:"0"},"y:StripeDefaults":n},k);b={};c={Insets:function(A,C){C.startSize=A.split(",")[1]},"Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill",mod:"color"},backgroundFill:{key:"oddLaneFill",mod:"color"}}},"Style.yjs:NodeStyleStripeStyleAdapter":{"demotablestyle:DemoStripeStyle":{"stripeInsetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableLineFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"strokeColor",mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"width"};this.mapObject(B.ColumnDefaults,{defaults:{shape:"swimlane;collapsible=0",startSize:"0",fillColor:"none"},-"y:StripeDefaults":b},c);h=g.geometry;a=B.Rows["y:Row"];d+=parseFloat(c.startSize);var q=f.x,t=f.x;f.lx=f.x;if(a)for(a instanceof Array||(a=[a]),h=0;h<a.length;h++)f.x=t,f.lx=t,d=this.addRow(a[h],g,h&1,d,f,n,k),q=Math.max(f.x,q);B=B.Columns["y:Column"];a=q;if(B)for(B instanceof Array||(B=[B]),h=0;h<B.length;h++)a=this.addColumn(B[h],g,h&1,a,z,b,c);break;case "js:table2":y.shape="swimlane;collapsible=0;swimlaneLine=0";B={};this.mapObject(z,{"y:TableNode":{"y:StyleProperties.y:Property":{"yed.table.section.color":{key:"secColor",+"y:StripeDefaults":c},b);h=g.geometry;a=B.Rows["y:Row"];d+=parseFloat(b.startSize);var q=f.x,t=f.x;f.lx=f.x;if(a)for(a instanceof Array||(a=[a]),h=0;h<a.length;h++)f.x=t,f.lx=t,d=this.addRow(a[h],g,h&1,d,f,n,k),q=Math.max(f.x,q);B=B.Columns["y:Column"];a=q;if(B)for(B instanceof Array||(B=[B]),h=0;h<B.length;h++)a=this.addColumn(B[h],g,h&1,a,z,c,b);break;case "js:table2":y.shape="swimlane;collapsible=0;swimlaneLine=0";B={};this.mapObject(z,{"y:TableNode":{"y:StyleProperties.y:Property":{"yed.table.section.color":{key:"secColor",mod:"color"},"yed.table.header.height":"headerH","yed.table.header.color.main":{key:"headerColor",mod:"color"},"yed.table.header.color.alternating":{key:"headerColorAlt",mod:"color"},"yed.table.lane.color.main":{key:"laneColor",mod:"color"},"yed.table.lane.color.alternating":{key:"laneColorAlt",mod:"color"},"yed.table.lane.style":"laneStyle","com.yworks.bpmn.type":"isHorz",POOL_LANE_COLOR_ALTERNATING:{key:"laneColorAlt",mod:"color"},POOL_LANE_COLOR_MAIN:{key:"laneColor",mod:"color"},POOL_LANE_STYLE:"laneStyle",-POOL_HEADER_COLOR_MAIN:{key:"headerColor",mod:"color"},POOL_HEADER_COLOR_ALTERNATING:{key:"headerColorAlt",mod:"color"},POOL_TABLE_SECTION_COLOR:{key:"secColor",mod:"color"}},"y:Table":{"y:DefaultColumnInsets.top":"colHHeight","y:DefaultRowInsets.left":"rowHWidth","y:Insets":{top:"tblHHeight",left:"tblHWidth"}}}},B);y.swimlaneFillColor=y.fillColor;n=c=0;"pool_type_lane_and_column"==B.isHorz||"pool_type_empty"==B.isHorz||"pool_type_lane"==B.isHorz?n=parseFloat(B.tblHWidth):c=parseFloat(B.tblHHeight);-y.startSize=c?c:n;try{a=z["y:TableNode"]["y:Table"]["y:Rows"]["y:Row"];b=z["y:TableNode"]["y:Table"]["y:Columns"]["y:Column"];d="lane.style.rows"==B.laneStyle||"lane_style_rows"==B.laneStyle;a instanceof Array||(a=[a]);b instanceof Array||(b=[b]);f=parseFloat(B.rowHWidth);for(h=0;h<a.length;h++)a[h]["y:Insets"]&&(f=Math.max(f,parseFloat(a[h]["y:Insets"].left)+parseFloat(a[h]["y:Insets"].right)));k=parseFloat(B.colHHeight);for(h=0;h<b.length;h++)b[h]["y:Insets"]&&(k=Math.max(k,parseFloat(b[h]["y:Insets"].top)+-parseFloat(b[h]["y:Insets"].bottom)));d?(this.addTbl2Rows(g,a,c,n,f,k,d,B),this.addTbl2Cols(g,b,c,n,f,k,d,B)):(this.addTbl2Cols(g,b,c,n,f,k,d,B),this.addTbl2Rows(g,a,c,n,f,k,d,B))}catch(A){}break;case "js:relationship_big_entity":y.shape="swimlane;startSize=30;rounded=1;arcSize=5;collapsible=0";if(g=z["y:GenericNode"]["y:Fill"])y.fillColor=g.color2,y.swimlaneFillColor=g.color;break;case "js:relationship_attribute":y.shape="1"==y["double"]?"doubleEllipse":"ellipse"}0<m.indexOf("Shadow")&&(y.shadow=+POOL_HEADER_COLOR_MAIN:{key:"headerColor",mod:"color"},POOL_HEADER_COLOR_ALTERNATING:{key:"headerColorAlt",mod:"color"},POOL_TABLE_SECTION_COLOR:{key:"secColor",mod:"color"}},"y:Table":{"y:DefaultColumnInsets.top":"colHHeight","y:DefaultRowInsets.left":"rowHWidth","y:Insets":{top:"tblHHeight",left:"tblHWidth"}}}},B);y.swimlaneFillColor=y.fillColor;n=b=0;"pool_type_lane_and_column"==B.isHorz||"pool_type_empty"==B.isHorz||"pool_type_lane"==B.isHorz?n=parseFloat(B.tblHWidth):b=parseFloat(B.tblHHeight);+y.startSize=b?b:n;try{a=z["y:TableNode"]["y:Table"]["y:Rows"]["y:Row"];c=z["y:TableNode"]["y:Table"]["y:Columns"]["y:Column"];d="lane.style.rows"==B.laneStyle||"lane_style_rows"==B.laneStyle;a instanceof Array||(a=[a]);c instanceof Array||(c=[c]);f=parseFloat(B.rowHWidth);for(h=0;h<a.length;h++)a[h]["y:Insets"]&&(f=Math.max(f,parseFloat(a[h]["y:Insets"].left)+parseFloat(a[h]["y:Insets"].right)));k=parseFloat(B.colHHeight);for(h=0;h<c.length;h++)c[h]["y:Insets"]&&(k=Math.max(k,parseFloat(c[h]["y:Insets"].top)++parseFloat(c[h]["y:Insets"].bottom)));d?(this.addTbl2Rows(g,a,b,n,f,k,d,B),this.addTbl2Cols(g,c,b,n,f,k,d,B)):(this.addTbl2Cols(g,c,b,n,f,k,d,B),this.addTbl2Rows(g,a,b,n,f,k,d,B))}catch(A){}break;case "js:relationship_big_entity":y.shape="swimlane;startSize=30;rounded=1;arcSize=5;collapsible=0";if(g=z["y:GenericNode"]["y:Fill"])y.fillColor=g.color2,y.swimlaneFillColor=g.color;break;case "js:relationship_attribute":y.shape="1"==y["double"]?"doubleEllipse":"ellipse"}0<m.indexOf("Shadow")&&(y.shadow="1")}};-mxGraphMlCodec.prototype.addTbl2Rows=function(g,y,z,B,m,h,c,a){z+=h;for(var b=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var n={shape:"swimlane;collapsible=0;horizontal=0",startSize:m,fillColor:a.secColor||"none",swimlaneLine:b?"0":"1"};0==parseFloat(n.startSize)&&(n.fillColor="none",n.swimlaneLine="0");if(c){var q=f?a.headerColorAlt:a.headerColor;n.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;n.fillColor=q?q:n.swimlaneFillColor}f=parseFloat(y[d].height);q=b&&0==d?h:0;+mxGraphMlCodec.prototype.addTbl2Rows=function(g,y,z,B,m,h,b,a){z+=h;for(var c=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var n={shape:"swimlane;collapsible=0;horizontal=0",startSize:m,fillColor:a.secColor||"none",swimlaneLine:c?"0":"1"};0==parseFloat(n.startSize)&&(n.fillColor="none",n.swimlaneLine="0");if(b){var q=f?a.headerColorAlt:a.headerColor;n.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;n.fillColor=q?q:n.swimlaneFillColor}f=parseFloat(y[d].height);q=c&&0==d?h:0;k.geometry=new mxGeometry(B,z-q,g.geometry.width-B,f+q);z+=f;k.style=this.styleMap2Str(n);g.insert(k)}};-mxGraphMlCodec.prototype.addTbl2Cols=function(g,y,z,B,m,h,c,a){B=m+B;for(var b=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var n={shape:"swimlane;collapsible=0",startSize:h,fillColor:a.secColor||"none",swimlaneLine:b?"0":"1"};0==parseFloat(n.startSize)&&(n.fillColor="none");if(!c){var q=f?a.headerColorAlt:a.headerColor;n.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;n.fillColor=q?q:n.swimlaneFillColor}f=parseFloat(y[d].width);q=b&&0==d?m:0;k.geometry=new mxGeometry(B-q,+mxGraphMlCodec.prototype.addTbl2Cols=function(g,y,z,B,m,h,b,a){B=m+B;for(var c=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var n={shape:"swimlane;collapsible=0",startSize:h,fillColor:a.secColor||"none",swimlaneLine:c?"0":"1"};0==parseFloat(n.startSize)&&(n.fillColor="none");if(!b){var q=f?a.headerColorAlt:a.headerColor;n.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;n.fillColor=q?q:n.swimlaneFillColor}f=parseFloat(y[d].width);q=c&&0==d?m:0;k.geometry=new mxGeometry(B-q,z,f+q,g.geometry.height-z);B+=f;k.style=this.styleMap2Str(n);g.insert(k)}};-mxGraphMlCodec.prototype.addRow=function(g,y,z,B,m,h,c){var a=new mxCell;a.vertex=!0;var b=mxUtils.clone(c);this.mapObject(g,h,b);z?(b.oddFill&&(b.fillColor=b.oddFill),b.oddLaneFill&&(b.swimlaneFillColor=b.oddLaneFill)):(b.evenFill&&(b.fillColor=b.evenFill),b.evenLaneFill&&(b.swimlaneFillColor=b.evenLaneFill));z=parseFloat(b.height);a.geometry=new mxGeometry(m.lx,B,y.geometry.width-m.lx,z);var d=g.Labels;d&&this.addLabels(a,d,b);a.style=this.styleMap2Str(b);y.insert(a);g=g["y:Row"];m.lx=0;b.startSize&&-(m.lx=parseFloat(b.startSize),m.x+=m.lx);y=b=m.x;d=m.lx;var f=0;if(g){g instanceof Array||(g=[g]);for(var k=0;k<g.length;k++)m.x=b,m.lx=d,f=this.addRow(g[k],a,k&1,f,m,h,c),y=Math.max(m.x,y)}m.x=y;z=Math.max(z,f);a.geometry.height=z;return B+=z};-mxGraphMlCodec.prototype.addColumn=function(g,y,z,B,m,h,c){var a=new mxCell;a.vertex=!0;var b=mxUtils.clone(c);this.mapObject(g,h,b);z?(b.oddFill&&(b.fillColor=b.oddFill),b.oddLaneFill&&(b.swimlaneFillColor=b.oddLaneFill)):(b.evenFill&&(b.fillColor=b.evenFill),b.evenLaneFill&&(b.swimlaneFillColor=b.evenLaneFill));z=parseFloat(b.width);a.geometry=new mxGeometry(B,m,z,y.geometry.height-m);var d=g.Labels;d&&this.addLabels(a,d,b);a.style=this.styleMap2Str(b);y.insert(a);g=g["y:Column"];y=0;if(g)for(g instanceof-Array||(g=[g]),b=0;b<g.length;b++)y=this.addColumn(g[b],a,b&1,y,m,h,c);z=Math.max(z,y);a.geometry.width=z;return B+=z};mxGraphMlCodec.prototype.handleFixedRatio=function(g,y){y=y.shape;g=g.geometry;if(y&&g)if(0<y.indexOf(";aspect=fixed"))y=Math.min(g.height,g.width),y==g.height&&(g.x+=(g.width-y)/2),g.height=y,g.width=y;else if(0<y.indexOf(";rotation=90")||0<y.indexOf(";rotation=-90")){y=g.height;var z=g.width;g.height=z;g.width=y;y=(y-z)/2;g.x-=y;g.y+=y}};-mxGraphMlCodec.prototype.addNodeGeo=function(g,y,z,B){var m=y[mxGraphMlConstants.RECT],h=0,c=0,a=30,b=30;m?(h=m[mxGraphMlConstants.X],c=m[mxGraphMlConstants.Y],a=m[mxGraphMlConstants.WIDTH],b=m[mxGraphMlConstants.HEIGHT]):(h=y[mxGraphMlConstants.X_L]||h,c=y[mxGraphMlConstants.Y_L]||c,a=y[mxGraphMlConstants.WIDTH_L]||a,b=y[mxGraphMlConstants.HEIGHT_L]||b);g=g.geometry;g.x=parseFloat(h)-z;g.y=parseFloat(c)-B;g.width=parseFloat(a);g.height=parseFloat(b)};-mxGraphMlCodec.prototype.importEdge=function(g,y,z,B,m){var h=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA),c=g.getAttribute(mxGraphMlConstants.ID),a=g.getAttribute(mxGraphMlConstants.EDGE_SOURCE),b=g.getAttribute(mxGraphMlConstants.EDGE_TARGET),d=g.getAttribute(mxGraphMlConstants.EDGE_SOURCE_PORT);g=g.getAttribute(mxGraphMlConstants.EDGE_TARGET_PORT);a=this.nodesMap[a];b=this.nodesMap[b];z=y.insertEdge(z,null,"",a.node,b.node,"graphMLId="+c);c={graphMlID:c};for(var f=0;f<h.length;f++){var k=-this.dataElem2Obj(h[f]),n=k["y:PolyLineEdge"]||k["y:GenericEdge"]||k["y:ArcEdge"]||k["y:BezierEdge"]||k["y:QuadCurveEdge"]||k["y:SplineEdge"];k.key==this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY].key?this.addEdgeGeo(z,k,B,m):k.key==this.edgesKeys[mxGraphMlConstants.EDGE_STYLE].key?this.addEdgeStyle(z,k,c):k.key==this.edgesKeys[mxGraphMlConstants.EDGE_LABELS].key?this.addLabels(z,k,c,y):n&&(this.addEdgeStyle(z,k,c),k=this.addEdgePath(z,n["y:Path"],c,B,m),n["y:EdgeLabel"]&&this.addLabels(z,n["y:EdgeLabel"],-c,y,k),null!=c.shape&&0==c.shape.indexOf("link")&&(c.width=c.strokeWidth,c.strokeWidth=1))}a.ports&&d&&(y=a.ports[d],y.pos&&(c.exitX=y.pos.x,c.exitY=y.pos.y));b.ports&&g&&(y=b.ports[g],y.pos&&(c.entryX=y.pos.x,c.entryY=y.pos.y));z.style=this.styleMap2Str(c);return z};-mxGraphMlCodec.prototype.addEdgeGeo=function(g,y,z,B){if(y=y[mxGraphMlConstants.Y_BEND]){for(var m=[],h=0;h<y.length;h++){var c=y[h][mxGraphMlConstants.LOCATION];c&&(c=c.split(","),m.push(new mxPoint(parseFloat(c[0])-z,parseFloat(c[1])-B)))}g.geometry.points=m}};-mxGraphMlCodec.prototype.addEdgePath=function(g,y,z,B,m){var h=[];if(y){var c=parseFloat(y.sx),a=parseFloat(y.sy),b=parseFloat(y.tx),d=parseFloat(y.ty),f=g.source.geometry;0!=c||0!=a?(z.exitX=(c+f.width/2)/f.width,z.exitY=(a+f.height/2)/f.height,h.push(new mxPoint(f.x+z.exitX*f.width-B,f.y+z.exitY*f.height-m))):h.push(new mxPoint(f.x+f.width/2-B,f.y+f.height/2-m));c=g.target.geometry;0!=b||0!=d?(z.entryX=(b+c.width/2)/c.width,z.entryY=(d+c.height/2)/c.height,z=new mxPoint(c.x+z.entryX*c.width-B,c.y+-z.entryY*c.height-m)):z=new mxPoint(c.x+c.width/2-B,c.y+c.height/2-m);if(y=y["y:Point"]){y instanceof Array||(y=[y]);b=[];for(d=0;d<y.length;d++)c=new mxPoint(parseFloat(y[d].x)-B,parseFloat(y[d].y)-m),b.push(c),h.push(c);g.geometry.points=b}h.push(z)}return h};-mxGraphMlCodec.prototype.addEdgeStyle=function(g,y,z){g=function(a,b){b.dashed=1;switch(a){case "DashDot":a="3 1 1 1";break;case "Dot":a="1 1";break;case "DashDotDot":a="3 1 1 1 1 1";break;case "Dash":a="3 1";break;default:a=a.replace(/0/g,"1")}a&&(0>a.indexOf(" ")&&(a=a+" "+a),b.dashPattern=a)};var B=function(a,b){b.endFill="WHITE"==a||0==a.indexOf("white_")||0==a.indexOf("transparent_")?"0":"1"},m=function(a,b){b.startFill="WHITE"==a||0==a.indexOf("white_")||0==a.indexOf("transparent_")?"0":"1"},-h={defaults:{rounded:0,endArrow:"none"},configuration:{key:"shape",mod:"shape"},"y:LineStyle":{color:{key:"strokeColor",mod:"color"},type:function(a,b){"line"!=a&&(b.dashed=1);var d=null;switch(a){case "dashed":d="3 1";break;case "dotted":d="1 1";break;case "dashed_dotted":d="3 2 1 2"}d&&(b.dashPattern=d)},width:"strokeWidth"},"y:Arrows":{source:function(a,b){b.startArrow=mxGraphMlArrowsMap[a]||"classic";m(a,b)},target:function(a,b){b.endArrow=mxGraphMlArrowsMap[a]||"classic";B(a,b)}},"y:BendStyle":{smoothed:{key:"rounded",-mod:"bool"}}},c=mxUtils.clone(h);c.defaults.curved="1";this.mapObject(y,{"yjs:PolylineEdgeStyle":{defaults:{endArrow:"none",rounded:0},smoothingLength:function(a,b){b.rounded=a&&0<parseFloat(a)?"1":"0"},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:g,"dashStyle.yjs:DashStyle.dashes":g,fill:{key:"strokeColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"strokeColor",mod:"color"},"thickness.sys:Double":"strokeWidth",thickness:"strokeWidth"},targetArrow:{key:"endArrow",-mod:"arrow"},"targetArrow.yjs:Arrow":{defaults:{endArrow:"classic",endFill:"1",endSize:"6"},fill:B,scale:{key:"endSize",mod:"scale",scale:5},type:{key:"endArrow",mod:"arrow"}},sourceArrow:{key:"startArrow",mod:"arrow"},"sourceArrow.yjs:Arrow":{defaults:{startArrow:"classic",startFill:"1",startSize:"6"},fill:m,scale:{key:"startSize",mod:"scale",scale:5},type:{key:"startArrow",mod:"arrow"}}},"y:PolyLineEdge":h,"y:GenericEdge":h,"y:ArcEdge":c,"y:BezierEdge":c,"y:QuadCurveEdge":c,"y:SplineEdge":c},z)};-mxGraphMlCodec.prototype.addLabels=function(g,y,z,B,m){z=g.getChildCount();var h=y[mxGraphMlConstants.Y_LABEL]||y;y=[];var c=[],a=[];if(h){h instanceof Array||(h=[h]);for(var b=0;b<h.length;b++){var d=h[b],f={},k=d[mxGraphMlConstants.TEXT]||d;k&&(k=k["#text"]);var n=d[mxGraphMlConstants.LAYOUTPARAMETER]||d||{},q=function(K,L){K&&(K=K.toUpperCase());var S=L.fontStyle||0;switch(K){case "ITALIC":S|=2;break;case "BOLD":S|=1;break;case "UNDERLINE":S|=4}L.fontStyle=S};this.mapObject(d,{"Style.yjs:DefaultLabelStyle":{backgroundFill:{key:"labelBackgroundColor",+mxGraphMlCodec.prototype.addRow=function(g,y,z,B,m,h,b){var a=new mxCell;a.vertex=!0;var c=mxUtils.clone(b);this.mapObject(g,h,c);z?(c.oddFill&&(c.fillColor=c.oddFill),c.oddLaneFill&&(c.swimlaneFillColor=c.oddLaneFill)):(c.evenFill&&(c.fillColor=c.evenFill),c.evenLaneFill&&(c.swimlaneFillColor=c.evenLaneFill));z=parseFloat(c.height);a.geometry=new mxGeometry(m.lx,B,y.geometry.width-m.lx,z);var d=g.Labels;d&&this.addLabels(a,d,c);a.style=this.styleMap2Str(c);y.insert(a);g=g["y:Row"];m.lx=0;c.startSize&&+(m.lx=parseFloat(c.startSize),m.x+=m.lx);y=c=m.x;d=m.lx;var f=0;if(g){g instanceof Array||(g=[g]);for(var k=0;k<g.length;k++)m.x=c,m.lx=d,f=this.addRow(g[k],a,k&1,f,m,h,b),y=Math.max(m.x,y)}m.x=y;z=Math.max(z,f);a.geometry.height=z;return B+=z};+mxGraphMlCodec.prototype.addColumn=function(g,y,z,B,m,h,b){var a=new mxCell;a.vertex=!0;var c=mxUtils.clone(b);this.mapObject(g,h,c);z?(c.oddFill&&(c.fillColor=c.oddFill),c.oddLaneFill&&(c.swimlaneFillColor=c.oddLaneFill)):(c.evenFill&&(c.fillColor=c.evenFill),c.evenLaneFill&&(c.swimlaneFillColor=c.evenLaneFill));z=parseFloat(c.width);a.geometry=new mxGeometry(B,m,z,y.geometry.height-m);var d=g.Labels;d&&this.addLabels(a,d,c);a.style=this.styleMap2Str(c);y.insert(a);g=g["y:Column"];y=0;if(g)for(g instanceof+Array||(g=[g]),c=0;c<g.length;c++)y=this.addColumn(g[c],a,c&1,y,m,h,b);z=Math.max(z,y);a.geometry.width=z;return B+=z};mxGraphMlCodec.prototype.handleFixedRatio=function(g,y){y=y.shape;g=g.geometry;if(y&&g)if(0<y.indexOf(";aspect=fixed"))y=Math.min(g.height,g.width),y==g.height&&(g.x+=(g.width-y)/2),g.height=y,g.width=y;else if(0<y.indexOf(";rotation=90")||0<y.indexOf(";rotation=-90")){y=g.height;var z=g.width;g.height=z;g.width=y;y=(y-z)/2;g.x-=y;g.y+=y}};+mxGraphMlCodec.prototype.addNodeGeo=function(g,y,z,B){var m=y[mxGraphMlConstants.RECT],h=0,b=0,a=30,c=30;m?(h=m[mxGraphMlConstants.X],b=m[mxGraphMlConstants.Y],a=m[mxGraphMlConstants.WIDTH],c=m[mxGraphMlConstants.HEIGHT]):(h=y[mxGraphMlConstants.X_L]||h,b=y[mxGraphMlConstants.Y_L]||b,a=y[mxGraphMlConstants.WIDTH_L]||a,c=y[mxGraphMlConstants.HEIGHT_L]||c);g=g.geometry;g.x=parseFloat(h)-z;g.y=parseFloat(b)-B;g.width=parseFloat(a);g.height=parseFloat(c)};+mxGraphMlCodec.prototype.importEdge=function(g,y,z,B,m){var h=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA),b=g.getAttribute(mxGraphMlConstants.ID),a=g.getAttribute(mxGraphMlConstants.EDGE_SOURCE),c=g.getAttribute(mxGraphMlConstants.EDGE_TARGET),d=g.getAttribute(mxGraphMlConstants.EDGE_SOURCE_PORT);g=g.getAttribute(mxGraphMlConstants.EDGE_TARGET_PORT);a=this.nodesMap[a];c=this.nodesMap[c];z=y.insertEdge(z,null,"",a.node,c.node,"graphMLId="+b);b={graphMlID:b};for(var f=0;f<h.length;f++){var k=+this.dataElem2Obj(h[f]),n=k["y:PolyLineEdge"]||k["y:GenericEdge"]||k["y:ArcEdge"]||k["y:BezierEdge"]||k["y:QuadCurveEdge"]||k["y:SplineEdge"];k.key==this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY].key?this.addEdgeGeo(z,k,B,m):k.key==this.edgesKeys[mxGraphMlConstants.EDGE_STYLE].key?this.addEdgeStyle(z,k,b):k.key==this.edgesKeys[mxGraphMlConstants.EDGE_LABELS].key?this.addLabels(z,k,b,y):n&&(this.addEdgeStyle(z,k,b),k=this.addEdgePath(z,n["y:Path"],b,B,m),n["y:EdgeLabel"]&&this.addLabels(z,n["y:EdgeLabel"],+b,y,k),null!=b.shape&&0==b.shape.indexOf("link")&&(b.width=b.strokeWidth,b.strokeWidth=1))}a.ports&&d&&(y=a.ports[d],y.pos&&(b.exitX=y.pos.x,b.exitY=y.pos.y));c.ports&&g&&(y=c.ports[g],y.pos&&(b.entryX=y.pos.x,b.entryY=y.pos.y));z.style=this.styleMap2Str(b);return z};+mxGraphMlCodec.prototype.addEdgeGeo=function(g,y,z,B){if(y=y[mxGraphMlConstants.Y_BEND]){for(var m=[],h=0;h<y.length;h++){var b=y[h][mxGraphMlConstants.LOCATION];b&&(b=b.split(","),m.push(new mxPoint(parseFloat(b[0])-z,parseFloat(b[1])-B)))}g.geometry.points=m}};+mxGraphMlCodec.prototype.addEdgePath=function(g,y,z,B,m){var h=[];if(y){var b=parseFloat(y.sx),a=parseFloat(y.sy),c=parseFloat(y.tx),d=parseFloat(y.ty),f=g.source.geometry;0!=b||0!=a?(z.exitX=(b+f.width/2)/f.width,z.exitY=(a+f.height/2)/f.height,h.push(new mxPoint(f.x+z.exitX*f.width-B,f.y+z.exitY*f.height-m))):h.push(new mxPoint(f.x+f.width/2-B,f.y+f.height/2-m));b=g.target.geometry;0!=c||0!=d?(z.entryX=(c+b.width/2)/b.width,z.entryY=(d+b.height/2)/b.height,z=new mxPoint(b.x+z.entryX*b.width-B,b.y++z.entryY*b.height-m)):z=new mxPoint(b.x+b.width/2-B,b.y+b.height/2-m);if(y=y["y:Point"]){y instanceof Array||(y=[y]);c=[];for(d=0;d<y.length;d++)b=new mxPoint(parseFloat(y[d].x)-B,parseFloat(y[d].y)-m),c.push(b),h.push(b);g.geometry.points=c}h.push(z)}return h};+mxGraphMlCodec.prototype.addEdgeStyle=function(g,y,z){g=function(a,c){c.dashed=1;switch(a){case "DashDot":a="3 1 1 1";break;case "Dot":a="1 1";break;case "DashDotDot":a="3 1 1 1 1 1";break;case "Dash":a="3 1";break;default:a=a.replace(/0/g,"1")}a&&(0>a.indexOf(" ")&&(a=a+" "+a),c.dashPattern=a)};var B=function(a,c){c.endFill="WHITE"==a||0==a.indexOf("white_")||0==a.indexOf("transparent_")?"0":"1"},m=function(a,c){c.startFill="WHITE"==a||0==a.indexOf("white_")||0==a.indexOf("transparent_")?"0":"1"},+h={defaults:{rounded:0,endArrow:"none"},configuration:{key:"shape",mod:"shape"},"y:LineStyle":{color:{key:"strokeColor",mod:"color"},type:function(a,c){"line"!=a&&(c.dashed=1);var d=null;switch(a){case "dashed":d="3 1";break;case "dotted":d="1 1";break;case "dashed_dotted":d="3 2 1 2"}d&&(c.dashPattern=d)},width:"strokeWidth"},"y:Arrows":{source:function(a,c){c.startArrow=mxGraphMlArrowsMap[a]||"classic";m(a,c)},target:function(a,c){c.endArrow=mxGraphMlArrowsMap[a]||"classic";B(a,c)}},"y:BendStyle":{smoothed:{key:"rounded",+mod:"bool"}}},b=mxUtils.clone(h);b.defaults.curved="1";this.mapObject(y,{"yjs:PolylineEdgeStyle":{defaults:{endArrow:"none",rounded:0},smoothingLength:function(a,c){c.rounded=a&&0<parseFloat(a)?"1":"0"},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:g,"dashStyle.yjs:DashStyle.dashes":g,fill:{key:"strokeColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"strokeColor",mod:"color"},"thickness.sys:Double":"strokeWidth",thickness:"strokeWidth"},targetArrow:{key:"endArrow",+mod:"arrow"},"targetArrow.yjs:Arrow":{defaults:{endArrow:"classic",endFill:"1",endSize:"6"},fill:B,scale:{key:"endSize",mod:"scale",scale:5},type:{key:"endArrow",mod:"arrow"}},sourceArrow:{key:"startArrow",mod:"arrow"},"sourceArrow.yjs:Arrow":{defaults:{startArrow:"classic",startFill:"1",startSize:"6"},fill:m,scale:{key:"startSize",mod:"scale",scale:5},type:{key:"startArrow",mod:"arrow"}}},"y:PolyLineEdge":h,"y:GenericEdge":h,"y:ArcEdge":b,"y:BezierEdge":b,"y:QuadCurveEdge":b,"y:SplineEdge":b},z)};+mxGraphMlCodec.prototype.addLabels=function(g,y,z,B,m){z=g.getChildCount();var h=y[mxGraphMlConstants.Y_LABEL]||y;y=[];var b=[],a=[];if(h){h instanceof Array||(h=[h]);for(var c=0;c<h.length;c++){var d=h[c],f={},k=d[mxGraphMlConstants.TEXT]||d;k&&(k=k["#text"]);var n=d[mxGraphMlConstants.LAYOUTPARAMETER]||d||{},q=function(K,L){K&&(K=K.toUpperCase());var S=L.fontStyle||0;switch(K){case "ITALIC":S|=2;break;case "BOLD":S|=1;break;case "UNDERLINE":S|=4}L.fontStyle=S};this.mapObject(d,{"Style.yjs:DefaultLabelStyle":{backgroundFill:{key:"labelBackgroundColor",mod:"color"},"backgroundFill.yjs:SolidColorFill.color":{key:"labelBackgroundColor",mod:"color"},backgroundStroke:{key:"labelBorderColor",mod:"color"},"backgroundStroke.yjs:Stroke.fill":{key:"labelBorderColor",mod:"color"},textFill:{key:"fontColor",mod:"color"},"textFill.yjs:SolidColorFill.color":{key:"fontColor",mod:"color"},textSize:"fontSize",horizontalTextAlignment:"align",verticalTextAlignment:"verticalAlign",wrapping:function(K,L){K&&(L.whiteSpace="wrap")},"font.yjs:Font":{fontFamily:"fontFamily",-fontSize:"fontSize",fontStyle:q,fontWeight:q,textDecoration:q}},"Style.y:VoidLabelStyle":function(K,L){L.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:q,underlinedText:function(K,L){var S=L.fontStyle||0;"true"==K&&(S|=4);L.fontStyle=S},horizontalTextPosition:"",textColor:{key:"fontColor",mod:"color"},verticalTextPosition:"verticalAlign",hasText:{key:"hasText",mod:"bool"},rotationAngle:"rotation"},f);f.VoidLbl||"0"==f.hasText||(y.push(k),c.push(f),a.push(n))}}for(b=-0;b<y.length;b++)if(y[b]&&(!a[b]||!a[b]["bpmn:ParticipantParameter"])){y[b]=mxUtils.htmlEntities(y[b],!1).replace(/\n/g,"<br/>");n=g.geometry;f=new mxCell(y[b],new mxGeometry(0,0,n.width,n.height),"text;html=1;spacing=0;"+this.styleMap2Str(c[b]));f.vertex=!0;g.insert(f,z);h=f.geometry;if(a[b]["y:RatioAnchoredLabelModelParameter"])n=mxUtils.getSizeForString(y[b],c[b].fontSize,c[b].fontFamily),(d=a[b]["y:RatioAnchoredLabelModelParameter"].LayoutOffset)?(d=d.split(","),h.x=parseFloat(d[0]),h.y=parseFloat(d[1]),-h.width=n.width,h.height=n.height,f.style+=";spacingTop=-4;"):f.style+=";align=center;";else if(a[b]["y:InteriorLabelModel"]){switch(a[b]["y:InteriorLabelModel"]){case "Center":f.style+=";verticalAlign=middle;";break;case "North":h.height=1;break;case "West":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90"}f.style+=";align=center;"}else if(a[b]["y:StretchStripeLabelModel"]||a[b]["y:StripeLabelModelParameter"])switch(a[b]["y:StretchStripeLabelModel"]||a[b]["y:StripeLabelModelParameter"].Position){case "North":h.height=-1;break;case "West":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90;"}else if(a[b]["bpmn:PoolHeaderLabelModel"]){switch(a[b]["bpmn:PoolHeaderLabelModel"]){case "NORTH":h.height=1;break;case "WEST":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90;"}f.style+=";align=center;"}else if(a[b]["y:InteriorStretchLabelModelParameter"])f.style+=";align=center;";else if(a[b]["y:ExteriorLabelModel"])switch(a[b]["y:ExteriorLabelModel"]){case "East":f.style+=-";labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;";break;case "South":f.style+=";labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;";break;case "North":f.style+=";labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;";break;case "West":f.style+=";labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;"}else if(a[b]["y:FreeEdgeLabelModelParameter"]){h.relative=!0;h.adjustIt=!0;n=a[b]["y:FreeEdgeLabelModelParameter"];-d=n.Ratio;q=n.Distance;var t=n.Angle;d&&(h.x=parseFloat(d));q&&(h.y=parseFloat(q));t&&(f.style+=";rotation="+parseFloat(t)*(180/Math.PI));f.style+=";verticalAlign=middle;"}else if(a[b]["y:EdgePathLabelModelParameter"]){h.relative=!0;n=a[b]["y:EdgePathLabelModelParameter"];k=n.SideOfEdge;d=n.SegmentRatio;h.x=d?2*parseFloat(d)-1:0;if(k)switch(k){case "RightOfEdge":h.y=-15;break;case "LeftOfEdge":h.y=15}f.style+=";verticalAlign=middle;"}else if(n=parseFloat(a[b].x),d=parseFloat(a[b].y),a[b].width&&(h.width=-parseFloat(a[b].width)),a[b].height&&(h.height=parseFloat(a[b].height)),g.edge)if(h.relative=!0,h.x=0,h.y=0,f=g.source.geometry.getCenterX()-g.target.geometry.getCenterX(),k=g.source.geometry.getCenterY()-g.target.geometry.getCenterY(),B&&m&&a[b]["y:ModelParameter"]&&a[b]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"]){n=a[b]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"];t=parseFloat(n.angle);q=parseFloat(n.distance);var A=n.position;d=parseFloat(n.ratio);n=parseFloat(n.segment);var C=-new mxCellState;C.absolutePoints=m;B.view.updateEdgeBounds(C);var I="left"==A?1:-1;if(-1==n&&6.283185307179586==t)h.offset=new mxPoint(1>Math.abs(d)?C.segments[0]*d:d,I*q);else{-1==n&&(n=0);for(var Q=t=0;Q<n;Q++)t+=C.segments[Q];t+=C.segments[n]*d;h.x=t/C.length*2-1;h.y=(("center"==A?0:q)+h.height/2*I*(Math.abs(f)>Math.abs(k)?1:-1))*I}}else isNaN(n)||isNaN(d)||(h.offset=new mxPoint(n+f/2+(0<f?-h.width:h.width),d));else h.x=n||0,h.y=d||0;c[b].rotation&&270==c[b].rotation&&(h.x-=h.height/2)}return{lblTxts:y,-lblStyles:c}};mxGraphMlCodec.prototype.processPage=function(g,y){g=(new mxCodec).encode(g.getModel());g.setAttribute("style","default-style2");g=mxUtils.getXml(g);y='<diagram name="Page '+y+'">'+Graph.compress(g);return y+"</diagram>"};mxGraphMlCodec.prototype.getDirectChildNamedElements=function(g,y){var z=[];for(g=g.firstChild;null!=g;g=g.nextSibling)null!=g&&1==g.nodeType&&y==g.nodeName&&z.push(g);return z};+fontSize:"fontSize",fontStyle:q,fontWeight:q,textDecoration:q}},"Style.y:VoidLabelStyle":function(K,L){L.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:q,underlinedText:function(K,L){var S=L.fontStyle||0;"true"==K&&(S|=4);L.fontStyle=S},horizontalTextPosition:"",textColor:{key:"fontColor",mod:"color"},verticalTextPosition:"verticalAlign",hasText:{key:"hasText",mod:"bool"},rotationAngle:"rotation"},f);f.VoidLbl||"0"==f.hasText||(y.push(k),b.push(f),a.push(n))}}for(c=+0;c<y.length;c++)if(y[c]&&(!a[c]||!a[c]["bpmn:ParticipantParameter"])){y[c]=mxUtils.htmlEntities(y[c],!1).replace(/\n/g,"<br/>");n=g.geometry;f=new mxCell(y[c],new mxGeometry(0,0,n.width,n.height),"text;html=1;spacing=0;"+this.styleMap2Str(b[c]));f.vertex=!0;g.insert(f,z);h=f.geometry;if(a[c]["y:RatioAnchoredLabelModelParameter"])n=mxUtils.getSizeForString(y[c],b[c].fontSize,b[c].fontFamily),(d=a[c]["y:RatioAnchoredLabelModelParameter"].LayoutOffset)?(d=d.split(","),h.x=parseFloat(d[0]),h.y=parseFloat(d[1]),+h.width=n.width,h.height=n.height,f.style+=";spacingTop=-4;"):f.style+=";align=center;";else if(a[c]["y:InteriorLabelModel"]){switch(a[c]["y:InteriorLabelModel"]){case "Center":f.style+=";verticalAlign=middle;";break;case "North":h.height=1;break;case "West":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90"}f.style+=";align=center;"}else if(a[c]["y:StretchStripeLabelModel"]||a[c]["y:StripeLabelModelParameter"])switch(a[c]["y:StretchStripeLabelModel"]||a[c]["y:StripeLabelModelParameter"].Position){case "North":h.height=+1;break;case "West":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90;"}else if(a[c]["bpmn:PoolHeaderLabelModel"]){switch(a[c]["bpmn:PoolHeaderLabelModel"]){case "NORTH":h.height=1;break;case "WEST":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90;"}f.style+=";align=center;"}else if(a[c]["y:InteriorStretchLabelModelParameter"])f.style+=";align=center;";else if(a[c]["y:ExteriorLabelModel"])switch(a[c]["y:ExteriorLabelModel"]){case "East":f.style+=+";labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;";break;case "South":f.style+=";labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;";break;case "North":f.style+=";labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;";break;case "West":f.style+=";labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;"}else if(a[c]["y:FreeEdgeLabelModelParameter"]){h.relative=!0;h.adjustIt=!0;n=a[c]["y:FreeEdgeLabelModelParameter"];+d=n.Ratio;q=n.Distance;var t=n.Angle;d&&(h.x=parseFloat(d));q&&(h.y=parseFloat(q));t&&(f.style+=";rotation="+parseFloat(t)*(180/Math.PI));f.style+=";verticalAlign=middle;"}else if(a[c]["y:EdgePathLabelModelParameter"]){h.relative=!0;n=a[c]["y:EdgePathLabelModelParameter"];k=n.SideOfEdge;d=n.SegmentRatio;h.x=d?2*parseFloat(d)-1:0;if(k)switch(k){case "RightOfEdge":h.y=-15;break;case "LeftOfEdge":h.y=15}f.style+=";verticalAlign=middle;"}else if(n=parseFloat(a[c].x),d=parseFloat(a[c].y),a[c].width&&(h.width=+parseFloat(a[c].width)),a[c].height&&(h.height=parseFloat(a[c].height)),g.edge)if(h.relative=!0,h.x=0,h.y=0,f=g.source.geometry.getCenterX()-g.target.geometry.getCenterX(),k=g.source.geometry.getCenterY()-g.target.geometry.getCenterY(),B&&m&&a[c]["y:ModelParameter"]&&a[c]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"]){n=a[c]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"];t=parseFloat(n.angle);q=parseFloat(n.distance);var A=n.position;d=parseFloat(n.ratio);n=parseFloat(n.segment);var C=+new mxCellState;C.absolutePoints=m;B.view.updateEdgeBounds(C);var I="left"==A?1:-1;if(-1==n&&6.283185307179586==t)h.offset=new mxPoint(1>Math.abs(d)?C.segments[0]*d:d,I*q);else{-1==n&&(n=0);for(var Q=t=0;Q<n;Q++)t+=C.segments[Q];t+=C.segments[n]*d;h.x=t/C.length*2-1;h.y=(("center"==A?0:q)+h.height/2*I*(Math.abs(f)>Math.abs(k)?1:-1))*I}}else isNaN(n)||isNaN(d)||(h.offset=new mxPoint(n+f/2+(0<f?-h.width:h.width),d));else h.x=n||0,h.y=d||0;b[c].rotation&&270==b[c].rotation&&(h.x-=h.height/2)}return{lblTxts:y,+lblStyles:b}};mxGraphMlCodec.prototype.processPage=function(g,y){g=(new mxCodec).encode(g.getModel());g.setAttribute("style","default-style2");g=mxUtils.getXml(g);y='<diagram name="Page '+y+'">'+Graph.compress(g);return y+"</diagram>"};mxGraphMlCodec.prototype.getDirectChildNamedElements=function(g,y){var z=[];for(g=g.firstChild;null!=g;g=g.nextSibling)null!=g&&1==g.nodeType&&y==g.nodeName&&z.push(g);return z};mxGraphMlCodec.prototype.getDirectFirstChildNamedElements=function(g,y){for(g=g.firstChild;null!=g;g=g.nextSibling)if(null!=g&&1==g.nodeType&&y==g.nodeName)return g;return null};mxGraphMlCodec.prototype.getDirectChildElements=function(g){var y=[];for(g=g.firstChild;null!=g;g=g.nextSibling)null!=g&&1==g.nodeType&&y.push(g);return y};mxGraphMlCodec.prototype.getDirectFirstChildElement=function(g){for(g=g.firstChild;null!=g;g=g.nextSibling)if(null!=g&&1==g.nodeType)return g;return null};var mxGraphMlConverters={"orgchartconverters.linebreakconverter":function(g,y){if("string"===typeof g){for(var z=g;20<z.length&&-1<z.indexOf(" ");)z=z.substring(0,z.lastIndexOf(" "));return"true"===y?z:g.substring(z.length)}return""},"orgchartconverters.borderconverter":function(g,y){return"boolean"===typeof g?g?"#FFBB33":"rgba(0,0,0,0)":"#FFF"},"orgchartconverters.addhashconverter":function(g,y){return"string"===typeof g?"string"===typeof y?"#"+g+y:"#"+g:g},"orgchartconverters.intermediateconverter":function(g,y){return"string"===typeof g&&17<g.length?g.replace(/^(.)(\S*)(.*)/,"$1.$3"):g},"orgchartconverters.overviewconverter":function(g,y){return"string"===typeof g&&0<g.length?g.replace(/^(.)(\S*)(.*)/,"$1.$3"):""}},mxGraphMlArrowsMap={SIMPLE:"open",TRIANGLE:"block",DIAMOND:"diamond",CIRCLE:"oval",CROSS:"cross",SHORT:"classicThin",DEFAULT:"classic",NONE:"none",none:"none",white_delta_bar:"block",delta:"block",standard:"classic",diamond:"diamond",white_diamond:"diamond",white_delta:"block",plain:"open",diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.jsindex cdd0992f8..10d39b706 100644--- a/src/main/webapp/js/viewer-static.min.js+++ b/src/main/webapp/js/viewer-static.min.js@@ -30,7 +30,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";-window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.0.16",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.1.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||@@ -1970,12 +1970,12 @@ Editor.prototype.setModified=function(b){this.modified=b};Editor.prototype.setFiEditor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,u){e.undoableEditHappened(u.getProperty("edit"))};var g=mxUtils.bind(this,function(m,u){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,g);b.getView().addListener(mxEvent.UNDO,g);g=function(m,u){m=u.getProperty("edit").changes;m=b.getSelectionCellsForChanges(m);u=!1;if(0<m.length){for(var p=[],B=0;B<m.length;B++)null!=b.view.getState(m[B])&&(p.push(m[B]),u||(b.scrollCellToVisible(m[B]),u=!0));b.setSelectionCells(p)}};e.addListener(mxEvent.UNDO,g);e.addListener(mxEvent.REDO,g);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};-function Dialog(b,e,g,m,u,p,B,H,T,G,P){this.editorUi=b;var R=T?57:0,c=g,f=m,l=T?0:64,t=Editor.inlineFullscreen||null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(t.height=window.innerHeight);var z=t.height;t=Math.max(1,Math.round((t.width-g-l)/2));var C=Math.max(1,Math.round((z-m-b.footerHeight)/3));e.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-l):g;m=Math.min(m,z-l);0<b.dialogs.length&&+function Dialog(b,e,g,m,u,p,B,H,S,G,P){this.editorUi=b;var Q=S?57:0,c=g,f=m,l=S?0:64,t=Editor.inlineFullscreen||null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(t.height=window.innerHeight);var z=t.height;t=Math.max(1,Math.round((t.width-g-l)/2));var C=Math.max(1,Math.round((z-m-b.footerHeight)/3));e.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-l):g;m=Math.min(m,z-l);0<b.dialogs.length&&(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("geBackground"),this.bg.style.position="absolute",this.bg.style.height=z+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));var F=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=F.x+"px";this.bg.style.top=F.y+"px";t+=F.x;C+=F.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px",C+=b.embedViewport.y,t+=b.embedViewport.x);-u&&document.body.appendChild(this.bg);var N=b.createDiv(T?"geTransDialog":"geDialog");u=this.getPosition(t,C,g,m);t=u.x;C=u.y;N.style.width=g+"px";N.style.height=m+"px";N.style.left=t+"px";N.style.top=C+"px";N.style.zIndex=this.zIndex;N.appendChild(e);document.body.appendChild(N);!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),p.setAttribute("title",mxResources.get("close")),-p.className="geDialogClose",p.style.top=C+14+"px",p.style.left=t+g+38-R+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!P)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(J){K=!0}),null,mxUtils.bind(this,function(J){K&&(b.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var J=G();null!=J&&(c=g=J.w,f=m=J.h)}J=Editor.inlineFullscreen||+u&&document.body.appendChild(this.bg);var N=b.createDiv(S?"geTransDialog":"geDialog");u=this.getPosition(t,C,g,m);t=u.x;C=u.y;N.style.width=g+"px";N.style.height=m+"px";N.style.left=t+"px";N.style.top=C+"px";N.style.zIndex=this.zIndex;N.appendChild(e);document.body.appendChild(N);!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),p.setAttribute("title",mxResources.get("close")),+p.className="geDialogClose",p.style.top=C+14+"px",p.style.left=t+g+38-Q+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!P)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(J){K=!0}),null,mxUtils.bind(this,function(J){K&&(b.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var J=G();null!=J&&(c=g=J.w,f=m=J.h)}J=Editor.inlineFullscreen||null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);z=J.height;this.bg.style.height=z+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");g=null!=document.body?Math.min(c,document.body.scrollWidth-l):c;m=Math.min(f,z-l);J=Math.max(1,Math.round((J.width-g-l)/2));var da=Math.max(1,Math.round((z-m-b.footerHeight)/3));da=this.getPosition(J,da,g,m);J=da.x;da=da.y;var ea=mxUtils.getDocumentScrollOrigin(document);J+=ea.x;-da+=ea.y;Editor.inlineFullscreen||null==b.embedViewport||(da+=b.embedViewport.y,J+=b.embedViewport.x);N.style.left=J+"px";N.style.top=da+"px";N.style.width=g+"px";N.style.height=m+"px";!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=da+14+"px",this.dialogImg.style.left=J+g+38-R+"px")});null!=b.embedViewport?b.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=+da+=ea.y;Editor.inlineFullscreen||null==b.embedViewport||(da+=b.embedViewport.y,J+=b.embedViewport.x);N.style.left=J+"px";N.style.top=da+"px";N.style.width=g+"px";N.style.height=m+"px";!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=da+14+"px",this.dialogImg.style.left=J+g+38-Q+"px")});null!=b.embedViewport?b.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=B;this.container=N;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";@@ -1983,93 +1983,93 @@ Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKA"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getDocumentSize=function(){return mxUtils.getDocumentSize()};Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&null!=this.dialogImg.parentNode&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);null!=this.editorUi.embedViewport?this.editorUi.removeListener(this.resizeListener):mxEvent.removeListener(window,"resize",this.resizeListener);null!=this.container.parentNode&&this.container.parentNode.removeChild(this.container)};-var ErrorDialog=function(b,e,g,m,u,p,B,H,T,G,P){T=null!=T?T:!0;var R=document.createElement("div");R.style.textAlign="center";if(null!=e){var c=document.createElement("div");c.style.padding="0px";c.style.margin="0px";c.style.fontSize="18px";c.style.paddingBottom="16px";c.style.marginBottom="10px";c.style.borderBottom="1px solid #c0c0c0";c.style.color="gray";c.style.whiteSpace="nowrap";c.style.textOverflow="ellipsis";c.style.overflow="hidden";mxUtils.write(c,e);c.setAttribute("title",e);R.appendChild(c)}e=-document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=Graph.sanitizeHtml(g);R.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=G&&(G=mxUtils.button(G,function(){null!=P&&P()}),G.className="geBtn",g.appendChild(G));-var f=mxUtils.button(m,function(){T&&b.hideDialog();null!=u&&u()});f.className="geBtn";g.appendChild(f);null!=B&&(m=mxUtils.button(B,function(){T&&b.hideDialog();null!=H&&H()}),m.className="geBtn gePrimaryBtn",g.appendChild(m));this.init=function(){f.focus()};R.appendChild(g);this.container=R},PrintDialog=function(b,e,g){this.create(b,e,g)};-PrintDialog.prototype.create=function(b){function e(f){var l=B.checked||G.checked,t=parseInt(R.value)/100;isNaN(t)&&(t=1,R.value="100%");mxClient.IS_SF&&(t*=.75);var z=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,C=1/g.pageScale;if(l){var F=B.checked?1:parseInt(P.value);isNaN(F)||(C=mxUtils.getScaleForPageCount(F,g,z))}var N=F=0;z=mxRectangle.fromRectangle(z);z.width=Math.ceil(z.width*t);z.height=Math.ceil(z.height*t);C*=t;!l&&g.pageVisible?(t=g.getPageLayout(),F-=t.x*z.width,N-=t.y*z.height):-l=!0;l=PrintDialog.createPrintPreview(g,C,z,0,F,N,l);l.open();f&&PrintDialog.printPreview(l)}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var u=document.createElement("tbody");var p=document.createElement("tr");var B=document.createElement("input");B.setAttribute("type","checkbox");var H=document.createElement("td");H.setAttribute("colspan","2");H.style.fontSize="10pt";H.appendChild(B);var T=document.createElement("span");mxUtils.write(T," "+mxResources.get("fitPage"));-H.appendChild(T);mxEvent.addListener(T,"click",function(f){B.checked=!B.checked;G.checked=!B.checked;mxEvent.consume(f)});mxEvent.addListener(B,"change",function(){G.checked=!B.checked});p.appendChild(H);u.appendChild(p);p=p.cloneNode(!1);var G=document.createElement("input");G.setAttribute("type","checkbox");H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(G);T=document.createElement("span");mxUtils.write(T," "+mxResources.get("posterPrint")+":");H.appendChild(T);mxEvent.addListener(T,+var ErrorDialog=function(b,e,g,m,u,p,B,H,S,G,P){S=null!=S?S:!0;var Q=document.createElement("div");Q.style.textAlign="center";if(null!=e){var c=document.createElement("div");c.style.padding="0px";c.style.margin="0px";c.style.fontSize="18px";c.style.paddingBottom="16px";c.style.marginBottom="10px";c.style.borderBottom="1px solid #c0c0c0";c.style.color="gray";c.style.whiteSpace="nowrap";c.style.textOverflow="ellipsis";c.style.overflow="hidden";mxUtils.write(c,e);c.setAttribute("title",e);Q.appendChild(c)}e=+document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=Graph.sanitizeHtml(g);Q.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=G&&(G=mxUtils.button(G,function(){null!=P&&P()}),G.className="geBtn",g.appendChild(G));+var f=mxUtils.button(m,function(){S&&b.hideDialog();null!=u&&u()});f.className="geBtn";g.appendChild(f);null!=B&&(m=mxUtils.button(B,function(){S&&b.hideDialog();null!=H&&H()}),m.className="geBtn gePrimaryBtn",g.appendChild(m));this.init=function(){f.focus()};Q.appendChild(g);this.container=Q},PrintDialog=function(b,e,g,m){this.create(b,e,g,m)};+PrintDialog.prototype.create=function(b){function e(f){var l=B.checked||G.checked,t=parseInt(Q.value)/100;isNaN(t)&&(t=1,Q.value="100%");mxClient.IS_SF&&(t*=.75);var z=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,C=1/g.pageScale;if(l){var F=B.checked?1:parseInt(P.value);isNaN(F)||(C=mxUtils.getScaleForPageCount(F,g,z))}var N=F=0;z=mxRectangle.fromRectangle(z);z.width=Math.ceil(z.width*t);z.height=Math.ceil(z.height*t);C*=t;!l&&g.pageVisible?(t=g.getPageLayout(),F-=t.x*z.width,N-=t.y*z.height):+l=!0;l=PrintDialog.createPrintPreview(g,C,z,0,F,N,l);l.open();f&&PrintDialog.printPreview(l)}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var u=document.createElement("tbody");var p=document.createElement("tr");var B=document.createElement("input");B.setAttribute("type","checkbox");var H=document.createElement("td");H.setAttribute("colspan","2");H.style.fontSize="10pt";H.appendChild(B);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));+H.appendChild(S);mxEvent.addListener(S,"click",function(f){B.checked=!B.checked;G.checked=!B.checked;mxEvent.consume(f)});mxEvent.addListener(B,"change",function(){G.checked=!B.checked});p.appendChild(H);u.appendChild(p);p=p.cloneNode(!1);var G=document.createElement("input");G.setAttribute("type","checkbox");H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(G);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");H.appendChild(S);mxEvent.addListener(S,"click",function(f){G.checked=!G.checked;B.checked=!G.checked;mxEvent.consume(f)});p.appendChild(H);var P=document.createElement("input");P.setAttribute("value","1");P.setAttribute("type","number");P.setAttribute("min","1");P.setAttribute("size","4");P.setAttribute("disabled","disabled");P.style.width="50px";H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(P);mxUtils.write(H," "+mxResources.get("pages")+" (max)");p.appendChild(H);u.appendChild(p);mxEvent.addListener(G,"change",-function(){G.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");B.checked=!G.checked});p=p.cloneNode(!1);H=document.createElement("td");mxUtils.write(H,mxResources.get("pageScale")+":");p.appendChild(H);H=document.createElement("td");var R=document.createElement("input");R.setAttribute("value","100 %");R.setAttribute("size","5");R.style.width="50px";H.appendChild(R);p.appendChild(H);u.appendChild(p);p=document.createElement("tr");H=document.createElement("td");H.colSpan=2;-H.style.paddingTop="20px";H.setAttribute("align","right");T=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});T.className="geBtn";b.editor.cancelFirst&&H.appendChild(T);if(PrintDialog.previewEnabled){var c=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});c.className="geBtn";H.appendChild(c)}c=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});c.className="geBtn gePrimaryBtn";H.appendChild(c);b.editor.cancelFirst||-H.appendChild(T);p.appendChild(H);u.appendChild(p);m.appendChild(u);this.container=m};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(e){}};-PrintDialog.createPrintPreview=function(b,e,g,m,u,p,B){e=new mxPrintPreview(b,e,g,m,u,p);e.title=mxResources.get("preview");e.addPageCss=!mxClient.IS_SF;e.printBackgroundImage=!0;e.autoOrigin=B;B=b.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";e.backgroundColor=B;var H=e.isTextLabel;e.isTextLabel=function(G){return"geHint"==!G.className&&H.apply(this,arguments)};var T=e.getLinkForCellState;e.getLinkForCellState=function(G){return b.getAbsoluteUrl(T.apply(this,arguments))};return e};+function(){G.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");B.checked=!G.checked});p=p.cloneNode(!1);H=document.createElement("td");mxUtils.write(H,mxResources.get("pageScale")+":");p.appendChild(H);H=document.createElement("td");var Q=document.createElement("input");Q.setAttribute("value","100 %");Q.setAttribute("size","5");Q.style.width="50px";H.appendChild(Q);p.appendChild(H);u.appendChild(p);p=document.createElement("tr");H=document.createElement("td");H.colSpan=2;+H.style.paddingTop="20px";H.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&H.appendChild(S);if(PrintDialog.previewEnabled){var c=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});c.className="geBtn";H.appendChild(c)}c=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});c.className="geBtn gePrimaryBtn";H.appendChild(c);b.editor.cancelFirst||+H.appendChild(S);p.appendChild(H);u.appendChild(p);m.appendChild(u);this.container=m};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(e){}};+PrintDialog.createPrintPreview=function(b,e,g,m,u,p,B){e=new mxPrintPreview(b,e,g,m,u,p);e.title=mxResources.get("preview");e.addPageCss=!mxClient.IS_SF;e.printBackgroundImage=!0;e.autoOrigin=B;B=b.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";e.backgroundColor=B;var H=e.isTextLabel;e.isTextLabel=function(G){return"geHint"==!G.className&&H.apply(this,arguments)};var S=e.getLinkForCellState;e.getLinkForCellState=function(G){return b.getAbsoluteUrl(S.apply(this,arguments))};return e};PrintDialog.previewEnabled=!0;-var PageSetupDialog=function(b){function e(){var t=R;null!=t&&null!=t.originalSrc&&(t=b.createImageForPageLink(t.originalSrc,null));null!=t&&null!=t.src?(P.style.backgroundImage="url("+t.src+")",P.style.display="inline-block"):(P.style.backgroundImage="",P.style.display="none");P.style.backgroundColor="";null!=c&&c!=mxConstants.NONE&&(P.style.backgroundColor=c,P.style.display="inline-block")}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var u=document.createElement("tbody");+var PageSetupDialog=function(b){function e(){var t=Q;null!=t&&null!=t.originalSrc&&(t=b.createImageForPageLink(t.originalSrc,null));null!=t&&null!=t.src?(P.style.backgroundImage="url("+t.src+")",P.style.display="inline-block"):(P.style.backgroundImage="",P.style.display="none");P.style.backgroundColor="";null!=c&&c!=mxConstants.NONE&&(P.style.backgroundColor=c,P.style.display="inline-block")}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var u=document.createElement("tbody");var p=document.createElement("tr");var B=document.createElement("td");B.style.verticalAlign="top";B.style.fontSize="10pt";mxUtils.write(B,mxResources.get("paperSize")+":");p.appendChild(B);B=document.createElement("td");B.style.verticalAlign="top";B.style.fontSize="10pt";var H=PageSetupDialog.addPageFormatPanel(B,"pagesetupdialog",g.pageFormat);p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("gridSize")+":");p.appendChild(B);-B=document.createElement("td");B.style.whiteSpace="nowrap";var T=document.createElement("input");T.setAttribute("type","number");T.setAttribute("min","0");T.style.width="40px";T.style.marginLeft="6px";T.value=g.getGridSize();B.appendChild(T);mxEvent.addListener(T,"change",function(){var t=parseInt(T.value);T.value=Math.max(1,isNaN(t)?g.getGridSize():t)});p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("background")+":");+B=document.createElement("td");B.style.whiteSpace="nowrap";var S=document.createElement("input");S.setAttribute("type","number");S.setAttribute("min","0");S.style.width="40px";S.style.marginLeft="6px";S.value=g.getGridSize();B.appendChild(S);mxEvent.addListener(S,"change",function(){var t=parseInt(S.value);S.value=Math.max(1,isNaN(t)?g.getGridSize():t)});p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("background")+":");p.appendChild(B);B=document.createElement("td");var G=document.createElement("button");G.className="geBtn";G.style.margin="0px";mxUtils.write(G,mxResources.get("change")+"...");var P=document.createElement("div");P.style.display="inline-block";P.style.verticalAlign="middle";P.style.backgroundPosition="center center";P.style.backgroundRepeat="no-repeat";P.style.backgroundSize="contain";P.style.border="1px solid lightGray";P.style.borderRadius="4px";P.style.marginRight="14px";P.style.height="32px";-P.style.width="64px";P.style.cursor="pointer";P.style.padding="4px";var R=g.backgroundImage,c=g.background,f=g.shadowVisible,l=function(t){b.showBackgroundImageDialog(function(z,C,F,N){C||(null!=z&&null!=z.src&&Graph.isPageLink(z.src)&&(z={originalSrc:z.src}),R=z,f=N);c=F;e()},R,c,!0);mxEvent.consume(t)};mxEvent.addListener(G,"click",l);mxEvent.addListener(P,"click",l);e();B.appendChild(P);B.appendChild(G);p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");-B.colSpan=2;B.style.paddingTop="16px";B.setAttribute("align","right");G=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});G.className="geBtn";b.editor.cancelFirst&&B.appendChild(G);l=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var t=parseInt(T.value);isNaN(t)||g.gridSize===t||g.setGridSize(t);t=new ChangePageSetup(b,c,R,H.get());t.ignoreColor=g.background==c;t.ignoreImage=(null!=g.backgroundImage?g.backgroundImage.src:null)===(null!=R?R.src:null);null!=f&&+P.style.width="64px";P.style.cursor="pointer";P.style.padding="4px";var Q=g.backgroundImage,c=g.background,f=g.shadowVisible,l=function(t){b.showBackgroundImageDialog(function(z,C,F,N){C||(null!=z&&null!=z.src&&Graph.isPageLink(z.src)&&(z={originalSrc:z.src}),Q=z,f=N);c=F;e()},Q,c,!0);mxEvent.consume(t)};mxEvent.addListener(G,"click",l);mxEvent.addListener(P,"click",l);e();B.appendChild(P);B.appendChild(G);p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");+B.colSpan=2;B.style.paddingTop="16px";B.setAttribute("align","right");G=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});G.className="geBtn";b.editor.cancelFirst&&B.appendChild(G);l=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var t=parseInt(S.value);isNaN(t)||g.gridSize===t||g.setGridSize(t);t=new ChangePageSetup(b,c,Q,H.get());t.ignoreColor=g.background==c;t.ignoreImage=(null!=g.backgroundImage?g.backgroundImage.src:null)===(null!=Q?Q.src:null);null!=f&&(t.shadowVisible=f);g.pageFormat.width==t.previousFormat.width&&g.pageFormat.height==t.previousFormat.height&&t.ignoreColor&&t.ignoreImage&&t.shadowVisible==g.shadowVisible||g.model.execute(t)});l.className="geBtn gePrimaryBtn";B.appendChild(l);b.editor.cancelFirst||B.appendChild(G);p.appendChild(B);u.appendChild(p);m.appendChild(u);this.container=m};PageSetupDialog.addPageFormatPanel=function(b,e,g,m){e="format-"+e;var u=document.createElement("input");u.setAttribute("name",e);u.setAttribute("type","radio");u.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","landscape");var B=document.createElement("select");B.style.marginBottom="4px";B.style.borderRadius="4px";B.style.borderWidth="1px";B.style.borderStyle="solid";B.style.boxSizing="border-box";-B.style.padding="2px";B.style.width="210px";var H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.marginLeft="4px";H.style.width="210px";H.style.height="24px";u.style.marginRight="6px";H.appendChild(u);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));H.appendChild(e);p.style.marginLeft="10px";p.style.marginRight="6px";H.appendChild(p);var T=document.createElement("span");T.style.width="100px";mxUtils.write(T,mxResources.get("landscape"));-H.appendChild(T);var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.marginLeft="4px";G.style.fontSize="12px";G.style.width="210px";G.style.height="24px";var P=document.createElement("input");P.setAttribute("size","7");P.setAttribute("title",mxResources.get("width"));P.style.textAlign="right";G.appendChild(P);mxUtils.write(G," x ");var R=document.createElement("input");R.setAttribute("size","7");R.setAttribute("title",mxResources.get("height"));R.style.textAlign="right";G.appendChild(R);+B.style.padding="2px";B.style.width="210px";var H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.marginLeft="4px";H.style.width="210px";H.style.height="24px";u.style.marginRight="6px";H.appendChild(u);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));H.appendChild(e);p.style.marginLeft="10px";p.style.marginRight="6px";H.appendChild(p);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,mxResources.get("landscape"));+H.appendChild(S);var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.marginLeft="4px";G.style.fontSize="12px";G.style.width="210px";G.style.height="24px";var P=document.createElement("input");P.setAttribute("size","7");P.setAttribute("title",mxResources.get("width"));P.style.textAlign="right";G.appendChild(P);mxUtils.write(G," x ");var Q=document.createElement("input");Q.setAttribute("size","7");Q.setAttribute("title",mxResources.get("height"));Q.style.textAlign="right";G.appendChild(Q);var c=document.createElement("select");c.style.marginLeft="4px";c.style.maxWidth="78px";c.style.width="78px";for(var f=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],l=0;l<f.length;l++){var t=document.createElement("option");t.setAttribute("value",f[l].unit);mxUtils.write(t,f[l].label);c.appendChild(t)}c.value=Editor.pageSizeUnit;G.appendChild(c);H.style.display="none";G.style.display="none";var z={},C=PageSetupDialog.getFormats();for(l=0;l<C.length;l++)f=C[l],z[f.key]=f,t=document.createElement("option"),t.setAttribute("value",f.key),mxUtils.write(t,f.title),B.appendChild(t);var F=function(){B.value="custom";for(var K=0;K<C.length;K++){var J=C[K];null!=J.format&&("a4"==J.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==J.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),g.width=583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),g.width==J.format.width&&g.height==J.format.height?(B.value=J.key,u.setAttribute("checked","checked"),u.defaultChecked=!0,u.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,detected=!0):g.width==J.format.height&&g.height==J.format.width&&(B.value=J.key,u.removeAttribute("checked"),u.defaultChecked=!1,u.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,detected=p.checked=!0))}"custom"==B.value?-(P.value=Editor.toUnit(g.width,c.value),R.value=Editor.toUnit(g.height,c.value),u.setAttribute("checked","checked"),B.value="custom",H.style.display="none",G.style.display=""):(H.style.display="",G.style.display="none")};F();b.appendChild(B);mxUtils.br(b);b.appendChild(H);b.appendChild(G);var N=function(K,J){K=z[B.value];null!=K.format?(P.value=Editor.toUnit(p.checked?K.format.height:K.format.width,c.value),R.value=Editor.toUnit(p.checked?K.format.width:K.format.height,c.value),G.style.display="none",-H.style.display=""):(H.style.display="none",G.style.display="");K=parseFloat(P.value);if(isNaN(K)||0>=K)P.value=Editor.toUnit(g.width,c.value);K=parseFloat(R.value);if(isNaN(K)||0>=K)R.value=Editor.toUnit(g.height,c.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(P.value),c.value)),Math.floor(Editor.fromUnit(parseFloat(R.value),c.value)));J||K.width==g.width&&K.height==g.height||(g=K,null!=m&&m(g))};mxEvent.addListener(e,"click",function(K){u.checked=!0;N(K);mxEvent.consume(K)});-mxEvent.addListener(T,"click",function(K){p.checked=!0;N(K);mxEvent.consume(K)});mxEvent.addListener(P,"blur",N);mxEvent.addListener(P,"click",N);mxEvent.addListener(R,"blur",N);mxEvent.addListener(R,"click",N);mxEvent.addListener(p,"change",N);mxEvent.addListener(u,"change",N);mxEvent.addListener(B,"change",function(K){N(K,"custom"==B.value);mxEvent.consume(K)});mxEvent.addListener(c,"change",function(K){P.value=Editor.toUnit(Editor.fromUnit(P.value,Editor.pageSizeUnit),c.value);R.value=Editor.toUnit(Editor.fromUnit(R.value,-Editor.pageSizeUnit),c.value);Editor.pageSizeUnit=c.value;N(K,!0);mxEvent.consume(K)});N(null,!0);return{set:function(K){g=K;F(null,null,!0)},get:function(){return g},widthInput:P,heightInput:R}};+(P.value=Editor.toUnit(g.width,c.value),Q.value=Editor.toUnit(g.height,c.value),u.setAttribute("checked","checked"),B.value="custom",H.style.display="none",G.style.display=""):(H.style.display="",G.style.display="none")};F();b.appendChild(B);mxUtils.br(b);b.appendChild(H);b.appendChild(G);var N=function(K,J){K=z[B.value];null!=K.format?(P.value=Editor.toUnit(p.checked?K.format.height:K.format.width,c.value),Q.value=Editor.toUnit(p.checked?K.format.width:K.format.height,c.value),G.style.display="none",+H.style.display=""):(H.style.display="none",G.style.display="");K=parseFloat(P.value);if(isNaN(K)||0>=K)P.value=Editor.toUnit(g.width,c.value);K=parseFloat(Q.value);if(isNaN(K)||0>=K)Q.value=Editor.toUnit(g.height,c.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(P.value),c.value)),Math.floor(Editor.fromUnit(parseFloat(Q.value),c.value)));J||K.width==g.width&&K.height==g.height||(g=K,null!=m&&m(g))};mxEvent.addListener(e,"click",function(K){u.checked=!0;N(K);mxEvent.consume(K)});+mxEvent.addListener(S,"click",function(K){p.checked=!0;N(K);mxEvent.consume(K)});mxEvent.addListener(P,"blur",N);mxEvent.addListener(P,"click",N);mxEvent.addListener(Q,"blur",N);mxEvent.addListener(Q,"click",N);mxEvent.addListener(p,"change",N);mxEvent.addListener(u,"change",N);mxEvent.addListener(B,"change",function(K){N(K,"custom"==B.value);mxEvent.consume(K)});mxEvent.addListener(c,"change",function(K){P.value=Editor.toUnit(Editor.fromUnit(P.value,Editor.pageSizeUnit),c.value);Q.value=Editor.toUnit(Editor.fromUnit(Q.value,+Editor.pageSizeUnit),c.value);Editor.pageSizeUnit=c.value;N(K,!0);mxEvent.consume(K)});N(null,!0);return{set:function(K){g=K;F(null,null,!0)},get:function(){return g},widthInput:P,heightInput:Q}};PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};-var FilenameDialog=function(b,e,g,m,u,p,B,H,T,G,P){T=null!=T?T:!0;var R=document.createElement("div"),c=document.createElement("div");c.style.width="100%";c.style.display="grid";c.style.gap="5px 8px";c.style.gridAutoColumns="auto 1fr";c.style.boxSizing="border-box";c.style.padding="3px";var f=document.createElement("div");f.style.display="inline-flex";f.style.alignItems="center";f.style.justifyContent="flex-end";f.style.minWidth="0";var l=document.createElement("div");l.style.display="inline-block";-l.style.textOverflow="ellipsis";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.fontSize="10pt";l.style.padding="2px 0";l.setAttribute("title",u||mxResources.get("filename"));mxUtils.write(l,(u||mxResources.get("filename"))+":");f.appendChild(l);c.appendChild(f);var t=document.createElement("input");t.setAttribute("value",e||"");t.style.flexGrow="1";var z=mxUtils.button(g,function(){if(null==p||p(t.value))T&&b.hideDialog(),m(t.value)});z.className="geBtn gePrimaryBtn";this.init=function(){if(null!=+var FilenameDialog=function(b,e,g,m,u,p,B,H,S,G,P){S=null!=S?S:!0;var Q=document.createElement("div"),c=document.createElement("div");c.style.width="100%";c.style.display="grid";c.style.gap="5px 8px";c.style.gridAutoColumns="auto 1fr";c.style.boxSizing="border-box";c.style.padding="3px";var f=document.createElement("div");f.style.display="inline-flex";f.style.alignItems="center";f.style.justifyContent="flex-end";f.style.minWidth="0";var l=document.createElement("div");l.style.display="inline-block";+l.style.textOverflow="ellipsis";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.fontSize="10pt";l.style.padding="2px 0";l.setAttribute("title",u||mxResources.get("filename"));mxUtils.write(l,(u||mxResources.get("filename"))+":");f.appendChild(l);c.appendChild(f);var t=document.createElement("input");t.setAttribute("value",e||"");t.style.flexGrow="1";var z=mxUtils.button(g,function(){if(null==p||p(t.value))S&&b.hideDialog(),m(t.value)});z.className="geBtn gePrimaryBtn";this.init=function(){if(null!=u||null==B)if(null!=P?Editor.selectFilename(t):(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var C=c.parentNode;if(null!=C){var F=null;mxEvent.addListener(C,"dragleave",function(N){null!=F&&(F.style.backgroundColor="",F=null);N.stopPropagation();N.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(N){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=t,F.style.backgroundColor="#ebf2f9");N.stopPropagation();N.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(N){null!=F&&(F.style.backgroundColor="",F=null);0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")&&(t.value=decodeURIComponent(N.dataTransfer.getData("text/uri-list")),z.click());N.stopPropagation();N.preventDefault()}))}}};f=document.createElement("div");f.style.display="inline-flex";f.style.alignItems="center";f.style.gap="4px";f.style.whiteSpace="nowrap";f.appendChild(t);c.appendChild(f);null==u&&null!=B||null==P||null==b.editor.diagramFileTypes||(f=document.createElement("div"),f.style.display="inline-flex",f.style.alignItems="center",f.style.textOverflow="ellipsis",f.style.justifyContent="flex-end",f.style.fontSize="10pt",mxUtils.write(f,mxResources.get("type")+":"),c.appendChild(f),f=document.createElement("div"),f.style.display="inline-flex",f.style.alignItems="center",f.style.whiteSpace="nowrap",c.appendChild(f),e=FilenameDialog.createFileTypes(b,t,b.editor.diagramFileTypes),e.style.width="100%",f.appendChild(e));null!=B&&c.appendChild(B);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=P?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=G&&G()});f.className="geBtn";null==H||b.isOffline()||row.appendChild(b.createHelpIcon(H));-b.editor.cancelFirst&&row.appendChild(f);mxEvent.addListener(t,"keypress",function(C){13==C.keyCode&&z.click()});row.appendChild(z);b.editor.cancelFirst||row.appendChild(f);c.appendChild(row);R.appendChild(c);this.container=R};FilenameDialog.filenameHelpLink=null;+b.editor.cancelFirst&&row.appendChild(f);mxEvent.addListener(t,"keypress",function(C){13==C.keyCode&&z.click()});row.appendChild(z);b.editor.cancelFirst||row.appendChild(f);c.appendChild(row);Q.appendChild(c);this.container=Q};FilenameDialog.filenameHelpLink=null;FilenameDialog.createFileTypes=function(b,e,g){var m=document.createElement("select");for(b=0;b<g.length;b++){var u=document.createElement("option");u.setAttribute("value",b);mxUtils.write(u,mxResources.get(g[b].description)+" (."+g[b].extension+")");m.appendChild(u)}mxEvent.addListener(m,"change",function(p){p=g[m.value].extension;var B=e.value.lastIndexOf(".drawio.");B=0<B?B:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<B?e.value.substring(0,B+1)+p:e.value+"."+p;"createEvent"in-document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var B=0,H=0;H<g.length;H++){var T=g[H].extension,G=null;"drawio"!=T&&(G=T,T=".drawio."+T);if(p.substring(p.length-T.length-1)=="."+T||null!=G&&p.substring(p.length-G.length-1)=="."+G){B=H;break}}m.value=B};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};-var WrapperWindow=function(b,e,g,m,u,p,B){var H=b.createSidebarContainer();B(H);this.window=new mxWindow(e,H,g,m,u,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(T){null==T&&(T=window.event);return null!=T&&b.isSelectionAllowed(T)}))};-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var B=this.graph;if(null!=B.container&&!B.transparentBackground){if(B.pageVisible){var H=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var T=B.container.firstChild;null!=T&&T.nodeType!=mxConstants.NODETYPE_ELEMENT;)T=T.nextSibling;null!=T&&(this.backgroundPageShape=this.createBackgroundPageShape(H),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,-this.backgroundPageShape.init(B.container),T.style.position="absolute",B.container.insertBefore(this.backgroundPageShape.node,T),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(G){B.dblClick(G)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(G){B.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(G))}),mxUtils.bind(this,function(G){null!=+document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var B=0,H=0;H<g.length;H++){var S=g[H].extension,G=null;"drawio"!=S&&(G=S,S=".drawio."+S);if(p.substring(p.length-S.length-1)=="."+S||null!=G&&p.substring(p.length-G.length-1)=="."+G){B=H;break}}m.value=B};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};+var WrapperWindow=function(b,e,g,m,u,p,B){var H=b.createSidebarContainer();B(H);this.window=new mxWindow(e,H,g,m,u,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(S){null==S&&(S=window.event);return null!=S&&b.isSelectionAllowed(S)}))};+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var B=this.graph;if(null!=B.container&&!B.transparentBackground){if(B.pageVisible){var H=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=B.container.firstChild;null!=S&&S.nodeType!=mxConstants.NODETYPE_ELEMENT;)S=S.nextSibling;null!=S&&(this.backgroundPageShape=this.createBackgroundPageShape(H),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,+this.backgroundPageShape.init(B.container),S.style.position="absolute",B.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(G){B.dblClick(G)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(G){B.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(G))}),mxUtils.bind(this,function(G){null!=B.tooltipHandler&&B.tooltipHandler.isHideOnHover()&&B.tooltipHandler.hide();B.isMouseDown&&!mxEvent.isConsumed(G)&&B.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(G))}),mxUtils.bind(this,function(G){B.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(G))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=H,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};-mxGraphView.prototype.validateBackgroundStyles=function(B,H,T){var G=this.graph;B=null!=B?B:1;var P=mxUtils.getLightDarkColor(null==G.background||G.background==mxConstants.NONE?G.defaultPageBackgroundColor:G.background).cssText,R=mxUtils.getLightDarkColor(G.defaultPageBorderColor).cssText,c=null!=P&&this.gridColor!=P.toLowerCase()?this.gridColor:"#ffffff",f="none",l="";"simple"==G.getAdaptiveColors()&&G.background!=mxConstants.NONE&&null!=G.background&&(P=G.background);if(G.isGridEnabled()||G.gridVisible){l=-10;mxClient.IS_SVG?(f=unescape(encodeURIComponent(this.createSvgGrid(c,B))),f=window.btoa?btoa(f):Base64.encode(f,!0),f="url(data:image/svg+xml;base64,"+f+")",l=G.gridSize*this.scale*this.gridSteps*B):f="url("+this.gridImage+")";var t=c=0;H=null!=H?H-this.translate.x*this.scale:0;T=null!=T?T-this.translate.y*this.scale:0;var z=G.gridSize*this.scale*this.gridSteps,C=H%z;z=T%z;null!=G.view.backgroundPageShape&&(t=this.getBackgroundPageBounds(),c=1+t.x,t=1+t.y);l=-Math.round(l-mxUtils.mod(this.translate.x*-this.scale-c+H,l)+C*B)+"px "+-Math.round(l-mxUtils.mod(this.translate.y*this.scale-t+T,l)+z*B)+"px"}B=G.view.canvas;null!=B.ownerSVGElement&&(B=B.ownerSVGElement);c=!Editor.isDarkMode()&&G.enableDiagramBackground;null!=G.view.backgroundPageShape?(G.view.backgroundPageShape.node.style.backgroundPosition=l,G.view.backgroundPageShape.node.style.backgroundImage=f,G.view.backgroundPageShape.node.style.backgroundColor=P,G.view.backgroundPageShape.node.style.borderColor=R,G.view.backgroundPageShape.node.style.colorScheme=+mxGraphView.prototype.validateBackgroundStyles=function(B,H,S){var G=this.graph;B=null!=B?B:1;var P=mxUtils.getLightDarkColor(null==G.background||G.background==mxConstants.NONE?G.defaultPageBackgroundColor:G.background).cssText,Q=mxUtils.getLightDarkColor(G.defaultPageBorderColor).cssText,c=null!=P&&this.gridColor!=P.toLowerCase()?this.gridColor:"#ffffff",f="none",l="";"simple"==G.getAdaptiveColors()&&G.background!=mxConstants.NONE&&null!=G.background&&(P=G.background);if(G.isGridEnabled()||G.gridVisible){l=+10;mxClient.IS_SVG?(f=unescape(encodeURIComponent(this.createSvgGrid(c,B))),f=window.btoa?btoa(f):Base64.encode(f,!0),f="url(data:image/svg+xml;base64,"+f+")",l=G.gridSize*this.scale*this.gridSteps*B):f="url("+this.gridImage+")";var t=c=0;H=null!=H?H-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var z=G.gridSize*this.scale*this.gridSteps,C=H%z;z=S%z;null!=G.view.backgroundPageShape&&(t=this.getBackgroundPageBounds(),c=1+t.x,t=1+t.y);l=-Math.round(l-mxUtils.mod(this.translate.x*+this.scale-c+H,l)+C*B)+"px "+-Math.round(l-mxUtils.mod(this.translate.y*this.scale-t+S,l)+z*B)+"px"}B=G.view.canvas;null!=B.ownerSVGElement&&(B=B.ownerSVGElement);c=!Editor.isDarkMode()&&G.enableDiagramBackground;null!=G.view.backgroundPageShape?(G.view.backgroundPageShape.node.style.backgroundPosition=l,G.view.backgroundPageShape.node.style.backgroundImage=f,G.view.backgroundPageShape.node.style.backgroundColor=P,G.view.backgroundPageShape.node.style.borderColor=Q,G.view.backgroundPageShape.node.style.colorScheme="none"==G.getAdaptiveColors()?"light":"",G.container.classList.add("geDiagramBackdrop"),B.style.backgroundImage="none",B.style.backgroundColor="",G.container.style.backgroundColor=c?G.diagramBackgroundColor:""):(G.container.classList.remove("geDiagramBackdrop"),B.style.backgroundPosition=l,B.style.backgroundImage=f,"1"==urlParams.transparent?G.container.style.background="transparent":!c||null!=G.background&&G.background!=mxConstants.NONE?B.style.backgroundColor=P:(B.style.backgroundColor=G.diagramBackgroundColor,-G.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(B,H){for(var T=this.graph.gridSize*this.scale*(null!=H?H:1);T<this.minGridSize;)T*=2;H=this.gridSteps*T;for(var G=[],P=1;P<this.gridSteps;P++){var R=P*T;G.push("M 0 "+R+" L "+H+" "+R+" M "+R+" 0 L "+R+" "+H)}B=mxUtils.getLightDarkColor(B);T="color-scheme: light dark;";mxClient.IS_SF&&(T="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+T+'" width="'++G.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(B,H){for(var S=this.graph.gridSize*this.scale*(null!=H?H:1);S<this.minGridSize;)S*=2;H=this.gridSteps*S;for(var G=[],P=1;P<this.gridSteps;P++){var Q=P*S;G.push("M 0 "+Q+" L "+H+" "+Q+" M "+Q+" 0 L "+Q+" "+H)}B=mxUtils.getLightDarkColor(B);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+H+'" height="'+H+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+H+'" height="'+H+'" patternUnits="userSpaceOnUse"><path d="'+G.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" opacity="0.2" stroke-width="1"/><path d="M '+H+" 0 L 0 0 0 "+H+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;-mxGraph.prototype.panGraph=function(B,H){b.apply(this,arguments);if(null!=this.shiftPreview1){var T=this.view.canvas;null!=T.ownerSVGElement&&(T=T.ownerSVGElement);var G=this.gridSize*this.view.scale*this.view.gridSteps;G=-Math.round(G-mxUtils.mod(this.view.translate.x*this.view.scale+B,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*this.view.scale+H,G))+"px";T.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(B,H,T){var G=this.view.scale,P=this.view.translate,R=-this.pageFormat,c=G*this.pageScale,f=this.view.getBackgroundPageBounds();H=f.width;T=f.height;var l=new mxRectangle(G*P.x,G*P.y,R.width*c,R.height*c),t=(B=B&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(T/l.height)-1:0,z=B?Math.ceil(H/l.width)-1:0,C=f.x+H,F=f.y+T;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<z&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(N){if(null!=N){for(var K=N==this.horizontalPageBreaks?t:z,J=+mxGraph.prototype.panGraph=function(B,H){b.apply(this,arguments);if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var G=this.gridSize*this.view.scale*this.view.gridSteps;G=-Math.round(G-mxUtils.mod(this.view.translate.x*this.view.scale+B,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*this.view.scale+H,G))+"px";S.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(B,H,S){var G=this.view.scale,P=this.view.translate,Q=+this.pageFormat,c=G*this.pageScale,f=this.view.getBackgroundPageBounds();H=f.width;S=f.height;var l=new mxRectangle(G*P.x,G*P.y,Q.width*c,Q.height*c),t=(B=B&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(S/l.height)-1:0,z=B?Math.ceil(H/l.width)-1:0,C=f.x+H,F=f.y+S;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<z&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(N){if(null!=N){for(var K=N==this.horizontalPageBreaks?t:z,J=0;J<=K;J++){var da=N==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),Math.round(f.y+(J+1)*l.height)),new mxPoint(Math.round(C),Math.round(f.y+(J+1)*l.height))]:[new mxPoint(Math.round(f.x+(J+1)*l.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(J+1)*l.width),Math.round(F))];null!=N[J]?(N[J].points=da,N[J].redraw()):(da=new mxPolyline(da,this.pageBreakColor),da.dialect=this.dialect,da.isDashed=this.pageBreakDashed,da.pointerEvents=!1,da.init(this.view.backgroundPane),da.redraw(),N[J]=da)}for(J=-K;J<N.length;J++)null!=N[J]&&N[J].destroy();N.splice(K,N.length-K)}});B(this.horizontalPageBreaks);B(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(B,H,T){for(var G=0;G<H.length;G++){if(this.graph.isTableCell(H[G])||this.graph.isTableRow(H[G]))return!1;if(this.graph.getModel().isVertex(H[G])){var P=this.graph.getCellGeometry(H[G]);if(null!=P&&P.relative)return!1}}return e.apply(this,arguments)};var g=-mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var B=g.apply(this,arguments);B.intersects=mxUtils.bind(this,function(H,T){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(B,arguments)});return B};mxGraphView.prototype.createBackgroundPageShape=function(B){return new mxRectangleShape(B,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var B=this.getGraphBounds(),H=0<B.width?B.x/-this.scale-this.translate.x:0,T=0<B.height?B.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,P=this.graph.pageScale,R=G.width*P;G=G.height*P;P=Math.floor(Math.min(0,H)/R);var c=Math.floor(Math.min(0,T)/G);return new mxRectangle(this.scale*(this.translate.x+P*R),this.scale*(this.translate.y+c*G),this.scale*(Math.ceil(Math.max(1,H+B.width/this.scale)/R)-P)*R,this.scale*(Math.ceil(Math.max(1,T+B.height/this.scale)/G)-c)*G)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,-H){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=B+"px",this.view.backgroundPageShape.node.style.marginTop=H+"px")};var u=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(B,H,T,G,P,R){var c=u.apply(this,arguments);null==R||R||mxEvent.addListener(c,"mousedown",function(f){mxEvent.consume(f)});return c};var p=-mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(B,H,T){var G=this.graph.model.getParent(B);if(H){var P=this.graph.model.isEdge(B)?null:this.graph.getCellGeometry(B);P=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(B)&&(null!=P&&P.relative||!this.graph.isContainer(G)||this.graph.isPart(B))}else if(P=p.apply(this,arguments),this.graph.isTableCell(B)||this.graph.isTableRow(B))P=G,this.graph.isTable(P)||(P=this.graph.model.getParent(P)),-P=!this.graph.selectionCellsHandler.isHandled(P)||this.graph.isCellSelected(P)&&this.graph.isToggleEvent(T.getEvent())||this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(T.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(G);return P};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var H=this.graph.getModel(),T=H.getParent(B),G=this.graph.view.getState(T),P=this.graph.isCellSelected(B);null!=G&&(H.isVertex(T)||H.isEdge(T));){var R=this.graph.isCellSelected(T);-P=P||R;if(R||!P&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=T;T=H.getParent(T)}return B}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,u=this.editor.graph;u.lightbox=g;var p=u.getGraphBounds;u.getGraphBounds=function(){var W=p.apply(this,arguments),ba=this.backgroundImage;if(null!=ba&&null!=ba.width&&null!=ba.height){var ha=this.view.translate,la=this.view.scale;W=mxRectangle.fromRectangle(W);W.add(new mxRectangle((ha.x+ba.x)*la,(ha.y+ba.y)*la,ba.width*la,ba.height*la))}return W};u.useCssTransforms&&-(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(W,ba){this.clearSelectionState()});u.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);u.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);u.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=-0;u.isEnabled=function(){return!1};u.panningHandler.isForcePanningEvent=function(W){for(var ba=W.getSource();null!=ba&&ba!=u.container;){if("foreignObject"===ba.nodeName||"text"===ba.nodeName)return!1;ba=ba.parentNode}return!mxEvent.isPopupTrigger(W.getEvent())};var B=u.panningHandler.start;u.panningHandler.start=function(){B.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!u.standalone){var H=!1,T=!1;this.setDefaultStyle=function(W){try{u.getModel().isEdge(W)?-T=u.pasteEdgeStyle=!1:H=!1;var ba=u.getCellStyle(W,!1),ha=[],la=[],Y;for(Y in ba)ha.push(ba[Y]),la.push(Y);u.getModel().isEdge(W)?u.currentEdgeStyle={}:u.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",ha,"cells",[W],"force",!0));u.getModel().isEdge(W)?T=u.pasteEdgeStyle=!0:H=!0}catch(ma){this.handleError(ma)}};this.clearDefaultStyle=function(){u.currentEdgeStyle=mxUtils.clone(u.defaultEdgeStyle);u.currentVertexStyle=mxUtils.clone(u.defaultVertexStyle);H=T=-u.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};u.addListener("cellsInserted",function(W,ba){u.pasteCellStyles(u.includeDescendants(ba.getProperty("cells")))});u.addListener("textInserted",function(W,ba){u.pasteCellStyles(ba.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var G=mxUtils.bind(this,function(W){null==W&&(W=window.event);return u.isEditing()||null!=W&&this.isSelectionAllowed(W)});this.container!=document.body||+K;J<N.length;J++)null!=N[J]&&N[J].destroy();N.splice(K,N.length-K)}});B(this.horizontalPageBreaks);B(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(B,H,S){for(var G=0;G<H.length;G++){if(this.graph.isTableCell(H[G])||this.graph.isTableRow(H[G]))return!1;if(this.graph.getModel().isVertex(H[G])){var P=this.graph.getCellGeometry(H[G]);if(null!=P&&P.relative)return!1}}return e.apply(this,arguments)};var g=+mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var B=g.apply(this,arguments);B.intersects=mxUtils.bind(this,function(H,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(B,arguments)});return B};mxGraphView.prototype.createBackgroundPageShape=function(B){return new mxRectangleShape(B,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var B=this.getGraphBounds(),H=0<B.width?B.x/+this.scale-this.translate.x:0,S=0<B.height?B.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,P=this.graph.pageScale,Q=G.width*P;G=G.height*P;P=Math.floor(Math.min(0,H)/Q);var c=Math.floor(Math.min(0,S)/G);return new mxRectangle(this.scale*(this.translate.x+P*Q),this.scale*(this.translate.y+c*G),this.scale*(Math.ceil(Math.max(1,H+B.width/this.scale)/Q)-P)*Q,this.scale*(Math.ceil(Math.max(1,S+B.height/this.scale)/G)-c)*G)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,+H){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=B+"px",this.view.backgroundPageShape.node.style.marginTop=H+"px")};var u=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(B,H,S,G,P,Q){var c=u.apply(this,arguments);null==Q||Q||mxEvent.addListener(c,"mousedown",function(f){mxEvent.consume(f)});return c};var p=+mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(B,H,S){var G=this.graph.model.getParent(B);if(H){var P=this.graph.model.isEdge(B)?null:this.graph.getCellGeometry(B);P=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(B)&&(null!=P&&P.relative||!this.graph.isContainer(G)||this.graph.isPart(B))}else if(P=p.apply(this,arguments),this.graph.isTableCell(B)||this.graph.isTableRow(B))P=G,this.graph.isTable(P)||(P=this.graph.model.getParent(P)),+P=!this.graph.selectionCellsHandler.isHandled(P)||this.graph.isCellSelected(P)&&this.graph.isToggleEvent(S.getEvent())||this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(G);return P};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var H=this.graph.getModel(),S=H.getParent(B),G=this.graph.view.getState(S),P=this.graph.isCellSelected(B);null!=G&&(H.isVertex(S)||H.isEdge(S));){var Q=this.graph.isCellSelected(S);+P=P||Q;if(Q||!P&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=S;S=H.getParent(S)}return B}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,u=this.editor.graph;u.lightbox=g;var p=u.getGraphBounds;u.getGraphBounds=function(){var X=p.apply(this,arguments),aa=this.backgroundImage;if(null!=aa&&null!=aa.width&&null!=aa.height){var ia=this.view.translate,la=this.view.scale;X=mxRectangle.fromRectangle(X);X.add(new mxRectangle((ia.x+aa.x)*la,(ia.y+aa.y)*la,aa.width*la,aa.height*la))}return X};u.useCssTransforms&&+(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(X,aa){this.clearSelectionState()});u.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);u.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);u.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=+0;u.isEnabled=function(){return!1};u.panningHandler.isForcePanningEvent=function(X){for(var aa=X.getSource();null!=aa&&aa!=u.container;){if("foreignObject"===aa.nodeName||"text"===aa.nodeName)return!1;aa=aa.parentNode}return!mxEvent.isPopupTrigger(X.getEvent())};var B=u.panningHandler.start;u.panningHandler.start=function(){B.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!u.standalone){var H=!1,S=!1;this.setDefaultStyle=function(X){try{u.getModel().isEdge(X)?+S=u.pasteEdgeStyle=!1:H=!1;var aa=u.getCellStyle(X,!1),ia=[],la=[],Y;for(Y in aa)ia.push(aa[Y]),la.push(Y);u.getModel().isEdge(X)?u.currentEdgeStyle={}:u.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",ia,"cells",[X],"force",!0));u.getModel().isEdge(X)?S=u.pasteEdgeStyle=!0:H=!0}catch(ma){this.handleError(ma)}};this.clearDefaultStyle=function(){u.currentEdgeStyle=mxUtils.clone(u.defaultEdgeStyle);u.currentVertexStyle=mxUtils.clone(u.defaultVertexStyle);H=S=+u.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};u.addListener("cellsInserted",function(X,aa){u.pasteCellStyles(u.includeDescendants(aa.getProperty("cells")))});u.addListener("textInserted",function(X,aa){u.pasteCellStyles(aa.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var G=mxUtils.bind(this,function(X){null==X&&(X=window.event);return u.isEditing()||null!=X&&this.isSelectionAllowed(X)});this.container!=document.body||this.editor.chromeless&&!this.editor.editable||(this.menubarContainer.onselectstart=G,this.menubarContainer.onmousedown=G,this.toolbarContainer.onselectstart=G,this.toolbarContainer.onmousedown=G,this.diagramContainer.onselectstart=G,this.diagramContainer.onmousedown=G,this.sidebarContainer.onselectstart=G,this.sidebarContainer.onmousedown=G,this.formatContainer.onselectstart=G,this.formatContainer.onmousedown=G,this.footerContainer.onselectstart=G,this.footerContainer.onmousedown=G,null!=this.tabContainer&&-(this.tabContainer.onselectstart=G),mxClient.IS_IOS&&(e=function(){var W=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var ba=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{W=[parseInt(ba[1],10),parseInt(ba[2],10),parseInt(ba[3]||0,10)]}catch(ha){}}return W}(),null!=e&&16<=e[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect",-"none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(e=function(W){if(null!=W){var ba=mxEvent.getSource(W);if("A"==ba.nodeName)for(;null!=ba;){if("geHint"==ba.className)return!0;ba=ba.parentNode}}return G(W)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||+(this.tabContainer.onselectstart=G),mxClient.IS_IOS&&(e=function(){var X=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var aa=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{X=[parseInt(aa[1],10),parseInt(aa[2],10),parseInt(aa[3]||0,10)]}catch(ia){}}return X}(),null!=e&&16<=e[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect",+"none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(e=function(X){if(null!=X){var aa=mxEvent.getSource(X);if("A"==aa.nodeName)for(;null!=aa;){if("geHint"==aa.className)return!0;aa=aa.parentNode}}return G(X)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):u.panningHandler.usePopupTrigger=!1;u.init(this.diagramContainer);mxClient.IS_SVG&&null!=u.view.getDrawPane()&&(e=u.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=u.graphHandler){var P=u.graphHandler.start;u.graphHandler.start=function(){null!=m.hoverIcons&&m.hoverIcons.reset();P.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,-"mousemove",mxUtils.bind(this,function(W){var ba=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(W)-ba.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(W)-ba.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var R=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(W,ba){return m.isSpaceDown()||R.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,-function(W){16==W.which?this.shiftDown=!0:32!=W.which||u.isEditing()?mxEvent.isConsumed(W)||27!=W.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),u.container.style.cursor="move",u.isEditing()||mxEvent.getSource(W)!=u.container||mxEvent.consume(W))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(W){u.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);-var c=u.panningHandler.isForcePanningEvent;u.panningHandler.isForcePanningEvent=function(W){return c.apply(this,arguments)||m.isSpaceDown()||mxEvent.isMouseEvent(W.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(W.getEvent()))&&(!mxEvent.isControlDown(W.getEvent())&&mxEvent.isRightMouseButton(W.getEvent())||mxEvent.isMiddleMouseButton(W.getEvent()))};var f=u.cellEditor.isStopEditingEvent;u.cellEditor.isStopEditingEvent=function(W){return f.apply(this,arguments)||13==W.keyCode&&(!mxClient.IS_SF&&-mxEvent.isControlDown(W)||mxClient.IS_MAC&&mxEvent.isMetaDown(W)||mxClient.IS_SF&&mxEvent.isShiftDown(W))};var l=u.isZoomWheelEvent;u.isZoomWheelEvent=function(){return m.isSpaceDown()||l.apply(this,arguments)};var t=!1,z=null,C=null,F=null,N=mxUtils.bind(this,function(){if(null!=this.toolbar&&t!=u.cellEditor.isContentEditing()){for(var W=this.toolbar.container.firstChild,ba=[];null!=W;){var ha=W.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,W)&&(W.parentNode.removeChild(W),ba.push(W));-W=ha}W=this.toolbar.fontMenu;ha=this.toolbar.sizeMenu;if(null==F)this.toolbar.createTextToolbar();else{for(var la=0;la<F.length;la++)this.toolbar.container.appendChild(F[la]);this.toolbar.fontMenu=z;this.toolbar.sizeMenu=C}t=u.cellEditor.isContentEditing();z=W;C=ha;F=ba}}),K=u.cellEditor.startEditing;u.cellEditor.startEditing=function(){K.apply(this,arguments);N();if(u.cellEditor.isContentEditing()){var W=!1,ba=function(){W||(W=!0,window.setTimeout(function(){var ha=u.getSelectedEditingElement();-null!=ha&&(ha=mxUtils.getCurrentStyle(ha),null!=ha&&null!=m.toolbar&&(m.toolbar.setFontName(mxUtils.getCssFontFamily(ha.fontFamily)),m.toolbar.setFontSize(parseInt(ha.fontSize))));W=!1},0))};mxEvent.addListener(u.cellEditor.textarea,"input",ba);mxEvent.addListener(u.cellEditor.textarea,"touchend",ba);mxEvent.addListener(u.cellEditor.textarea,"mouseup",ba);mxEvent.addListener(u.cellEditor.textarea,"keyup",ba);ba()}};var J=u.cellEditor.stopEditing;u.cellEditor.stopEditing=function(W,ba){try{J.apply(this,-arguments),N()}catch(ha){m.handleError(ha)}};u.container.setAttribute("tabindex","0");u.container.style.cursor="default";if(window.self===window.top&&null!=u.container.parentNode)try{u.container.focus()}catch(W){}var da=u.fireMouseEvent;u.fireMouseEvent=function(W,ba,ha){try{W==mxEvent.MOUSE_DOWN&&this.container.focus(),da.apply(this,arguments)}catch(la){m.handleError(la)}};var ea=u.foldCells;u.foldCells=function(W,ba,ha,la,Y){try{ea.apply(this,arguments)}catch(ma){m.handleError(ma)}};u.popupMenuHandler.autoExpand=-!0;null!=this.menus&&(u.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(W,ba,ha){this.menus.createPopupMenu(W,ba,ha)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(W){u.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};u.connectionHandler.addListener(mxEvent.CONNECT,function(W,ba){var ha=[ba.getProperty("cell")];ba.getProperty("terminalInserted")&&(ha.push(ba.getProperty("terminal")),window.setTimeout(function(){null!=-m.hoverIcons&&m.hoverIcons.update(u.view.getState(ha[ha.length-1]))},0));u.pasteCellStyles(ha)});this.addListener("styleChanged",mxUtils.bind(this,function(W,ba){W=ba.getProperty("force");(this.updateDefaultStyle||W)&&u.copyCellStyles(ba.getProperty("cells"),ba.getProperty("keys"),ba.getProperty("values"),u.currentVertexStyle,u.currentEdgeStyle,H,T);null!=this.toolbar&&(this.toolbar.setFontName(u.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(u.currentVertexStyle.fontSize||-Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(ba=this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0],ba.style.backgroundPosition="left center",ba.style.backgroundRepeat="no-repeat",ba.className="geAdaptiveAsset",ba.style.height="100%",ba.style.width="100%",ba.style.backgroundImage="orthogonalEdgeStyle"==u.currentEdgeStyle.edgeStyle&&"1"==u.currentEdgeStyle.curved?"url("+Format.curvedImage.src+")":"straight"==u.currentEdgeStyle.edgeStyle||"none"==u.currentEdgeStyle.edgeStyle||+"mousemove",mxUtils.bind(this,function(X){var aa=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(X)-aa.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(X)-aa.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var Q=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(X,aa){return m.isSpaceDown()||Q.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,+function(X){16==X.which?this.shiftDown=!0:32!=X.which||u.isEditing()?mxEvent.isConsumed(X)||27!=X.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),u.container.style.cursor="move",u.isEditing()||mxEvent.getSource(X)!=u.container||mxEvent.consume(X))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(X){u.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);+var c=u.panningHandler.isForcePanningEvent;u.panningHandler.isForcePanningEvent=function(X){return c.apply(this,arguments)||m.isSpaceDown()||mxEvent.isMouseEvent(X.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(X.getEvent()))&&(!mxEvent.isControlDown(X.getEvent())&&mxEvent.isRightMouseButton(X.getEvent())||mxEvent.isMiddleMouseButton(X.getEvent()))};var f=u.cellEditor.isStopEditingEvent;u.cellEditor.isStopEditingEvent=function(X){return f.apply(this,arguments)||13==X.keyCode&&(!mxClient.IS_SF&&+mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X)||mxClient.IS_SF&&mxEvent.isShiftDown(X))};var l=u.isZoomWheelEvent;u.isZoomWheelEvent=function(){return m.isSpaceDown()||l.apply(this,arguments)};var t=!1,z=null,C=null,F=null,N=mxUtils.bind(this,function(){if(null!=this.toolbar&&t!=u.cellEditor.isContentEditing()){for(var X=this.toolbar.container.firstChild,aa=[];null!=X;){var ia=X.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,X)&&(X.parentNode.removeChild(X),aa.push(X));+X=ia}X=this.toolbar.fontMenu;ia=this.toolbar.sizeMenu;if(null==F)this.toolbar.createTextToolbar();else{for(var la=0;la<F.length;la++)this.toolbar.container.appendChild(F[la]);this.toolbar.fontMenu=z;this.toolbar.sizeMenu=C}t=u.cellEditor.isContentEditing();z=X;C=ia;F=aa}}),K=u.cellEditor.startEditing;u.cellEditor.startEditing=function(){K.apply(this,arguments);N();if(u.cellEditor.isContentEditing()){var X=!1,aa=function(){X||(X=!0,window.setTimeout(function(){var ia=u.getSelectedEditingElement();+null!=ia&&(ia=mxUtils.getCurrentStyle(ia),null!=ia&&null!=m.toolbar&&(m.toolbar.setFontName(mxUtils.getCssFontFamily(ia.fontFamily)),m.toolbar.setFontSize(parseInt(ia.fontSize))));X=!1},0))};mxEvent.addListener(u.cellEditor.textarea,"input",aa);mxEvent.addListener(u.cellEditor.textarea,"touchend",aa);mxEvent.addListener(u.cellEditor.textarea,"mouseup",aa);mxEvent.addListener(u.cellEditor.textarea,"keyup",aa);aa()}};var J=u.cellEditor.stopEditing;u.cellEditor.stopEditing=function(X,aa){try{J.apply(this,+arguments),N()}catch(ia){m.handleError(ia)}};u.container.setAttribute("tabindex","0");u.container.style.cursor="default";if(window.self===window.top&&null!=u.container.parentNode)try{u.container.focus()}catch(X){}var da=u.fireMouseEvent;u.fireMouseEvent=function(X,aa,ia){try{X==mxEvent.MOUSE_DOWN&&this.container.focus(),da.apply(this,arguments)}catch(la){m.handleError(la)}};var ea=u.foldCells;u.foldCells=function(X,aa,ia,la,Y){try{ea.apply(this,arguments)}catch(ma){m.handleError(ma)}};u.popupMenuHandler.autoExpand=+!0;null!=this.menus&&(u.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(X,aa,ia){this.menus.createPopupMenu(X,aa,ia)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(X){u.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};u.connectionHandler.addListener(mxEvent.CONNECT,function(X,aa){var ia=[aa.getProperty("cell")];aa.getProperty("terminalInserted")&&(ia.push(aa.getProperty("terminal")),window.setTimeout(function(){null!=+m.hoverIcons&&m.hoverIcons.update(u.view.getState(ia[ia.length-1]))},0));u.pasteCellStyles(ia)});this.addListener("styleChanged",mxUtils.bind(this,function(X,aa){X=aa.getProperty("force");(this.updateDefaultStyle||X)&&u.copyCellStyles(aa.getProperty("cells"),aa.getProperty("keys"),aa.getProperty("values"),u.currentVertexStyle,u.currentEdgeStyle,H,S);null!=this.toolbar&&(this.toolbar.setFontName(u.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(u.currentVertexStyle.fontSize||+Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(aa=this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0],aa.style.backgroundPosition="left center",aa.style.backgroundRepeat="no-repeat",aa.className="geAdaptiveAsset",aa.style.height="100%",aa.style.width="100%",aa.style.backgroundImage="orthogonalEdgeStyle"==u.currentEdgeStyle.edgeStyle&&"1"==u.currentEdgeStyle.curved?"url("+Format.curvedImage.src+")":"straight"==u.currentEdgeStyle.edgeStyle||"none"==u.currentEdgeStyle.edgeStyle||null==u.currentEdgeStyle.edgeStyle?"url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==u.currentEdgeStyle.edgeStyle?"url("+Format.entityImage.src+")":"elbowEdgeStyle"==u.currentEdgeStyle.edgeStyle?"vertical"==u.currentEdgeStyle.elbow?"url("+Format.verticalElbowImage.src+")":"url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==u.currentEdgeStyle.edgeStyle?"vertical"==u.currentEdgeStyle.elbow?"url("+Format.verticalIsometricImage.src+")":"url("+Format.horizontalIsometricImage.src+-")":"url("+Format.orthogonalImage.src+")"),null!=this.toolbar.edgeShapeMenu&&(ba=this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0],ba.style.backgroundPosition="left center",ba.style.backgroundRepeat="no-repeat",ba.className="geAdaptiveAsset",ba.style.height="100%",ba.style.width="100%",ba.style.backgroundImage="link"==u.currentEdgeStyle.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==u.currentEdgeStyle.shape?"url("+Format.arrowImage.src+")":"arrow"==u.currentEdgeStyle.shape?"url("+-Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var W=u.currentVertexStyle.fontFamily||"Helvetica",ba=String(u.currentVertexStyle.fontSize||"12"),ha=u.getView().getState(u.getSelectionCell());null!=ha&&(W=ha.style[mxConstants.STYLE_FONTFAMILY]||W,ba=ha.style[mxConstants.STYLE_FONTSIZE]||ba,10<W.length&&(W=W.substring(0,8)+"..."));this.toolbar.setFontName(W);this.toolbar.setFontSize(ba)}),u.getSelectionModel().addListener(mxEvent.CHANGE,-b),u.getModel().addListener(mxEvent.CHANGE,b));u.addListener(mxEvent.CELLS_ADDED,function(W,ba){W=ba.getProperty("cells");ba=ba.getProperty("parent");null!=ba&&u.getModel().isLayer(ba)&&!u.isCellVisible(ba)&&null!=W&&0<W.length&&u.getModel().setVisible(ba,!0)});Graph.selectParentLayer&&u.selectionModel.addListener(mxEvent.CHANGE,function(){if(u.isEnabled()&&!u.isSelectionEmpty()){var W=u.getLayerForCells(u.getSelectionCells());null!=W&&u.setDefaultParent(W)}});this.gestureHandler=mxUtils.bind(this,-function(W){null!=this.currentMenu&&mxEvent.getSource(W)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ca=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ca&&window.clearTimeout(ca);ca=window.setTimeout(mxUtils.bind(this,function(){ca=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,+")":"url("+Format.orthogonalImage.src+")"),null!=this.toolbar.edgeShapeMenu&&(aa=this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0],aa.style.backgroundPosition="left center",aa.style.backgroundRepeat="no-repeat",aa.className="geAdaptiveAsset",aa.style.height="100%",aa.style.width="100%",aa.style.backgroundImage="link"==u.currentEdgeStyle.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==u.currentEdgeStyle.shape?"url("+Format.arrowImage.src+")":"arrow"==u.currentEdgeStyle.shape?"url("++Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var X=u.currentVertexStyle.fontFamily||"Helvetica",aa=String(u.currentVertexStyle.fontSize||"12"),ia=u.getView().getState(u.getSelectionCell());null!=ia&&(X=ia.style[mxConstants.STYLE_FONTFAMILY]||X,aa=ia.style[mxConstants.STYLE_FONTSIZE]||aa,10<X.length&&(X=X.substring(0,8)+"..."));this.toolbar.setFontName(X);this.toolbar.setFontSize(aa)}),u.getSelectionModel().addListener(mxEvent.CHANGE,+b),u.getModel().addListener(mxEvent.CHANGE,b));u.addListener(mxEvent.CELLS_ADDED,function(X,aa){X=aa.getProperty("cells");aa=aa.getProperty("parent");null!=aa&&u.getModel().isLayer(aa)&&!u.isCellVisible(aa)&&null!=X&&0<X.length&&u.getModel().setVisible(aa,!0)});Graph.selectParentLayer&&u.selectionModel.addListener(mxEvent.CHANGE,function(){if(u.isEnabled()&&!u.isSelectionEmpty()){var X=u.getLayerForCells(u.getSelectionCells());null!=X&&u.setDefaultParent(X)}});this.gestureHandler=mxUtils.bind(this,+function(X){null!=this.currentMenu&&mxEvent.getSource(X)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ca=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ca&&window.clearTimeout(ca);ca=window.setTimeout(mxUtils.bind(this,function(){ca=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){u.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){u.view.validateBackground()}));u.addListener("gridSizeChanged",mxUtils.bind(this,function(){u.isGridEnabled()&&u.view.validateBackground()}));this.editor.resetGraph()}this.init();u.standalone||this.open()};EditorUi.compactUi=!0;-EditorUi.parsePng=function(b,e,g){function m(H,T){var G=p;p+=T;return H.substring(G,p)}function u(H){H=m(H,4);return H.charCodeAt(3)+(H.charCodeAt(2)<<8)+(H.charCodeAt(1)<<16)+(H.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(m(b,4),"IHDR"!=m(b,4))null!=g&&g();else{m(b,17);do{g=u(b);var B=m(b,4);if(null!=e&&e(p-8,B,g))break;value=m(b,g);m(b,4);if("IEND"==B)break}while(g)}};mxUtils.extend(EditorUi,mxEventSource);+EditorUi.parsePng=function(b,e,g){function m(H,S){var G=p;p+=S;return H.substring(G,p)}function u(H){H=m(H,4);return H.charCodeAt(3)+(H.charCodeAt(2)<<8)+(H.charCodeAt(1)<<16)+(H.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(m(b,4),"IHDR"!=m(b,4))null!=g&&g();else{m(b,17);do{g=u(b);var B=m(b,4);if(null!=e&&e(p-8,B,g))break;value=m(b,g);m(b,4);if("IEND"==B)break}while(g)}};mxUtils.extend(EditorUi,mxEventSource);EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.defaultSidebarWidth=Math.min(screen.width/2,"large"!=urlParams["sidebar-entries"]?212:240);EditorUi.prototype.hsplitPosition=screen.width<=Editor.smallScreenWidth?0:EditorUi.prototype.defaultSidebarWidth;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;EditorUi.prototype.updateDefaultStyle=!1;EditorUi.prototype.spaceDown=!1;EditorUi.prototype.shiftDown=!1;EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var m=b.getRubberband();null!=m&&m.cancel()}));mxEvent.addListener(b.container,@@ -2077,31 +2077,31 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"arguments);g.updateActionStates()};b.showLinkDialog=mxUtils.bind(g,g.showLinkDialog);b.editLink=g.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),g=this.initSelectionState(),m=!0,u=0;u<e.length;u++){var p=b.getCurrentCellStyle(e[u]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(g,e[u],e,m),m=!1)}this.updateSelectionStateForTableCells(g);return g};EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,html:!0,rounded:!0,autoSize:!1,image:!1,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,m=g.getParent(e[0]),u=g.getParent(m);if(null!=m&&null!=u){for(var p=m.getIndex(e[0]),B=u.getIndex(m),H=null,T=1,G=1,P=0,R=B<u.getChildCount()-1?g.getChildAt(g.getChildAt(u,B+1),p):null;P<e.length-1;){var c=e[++P];null==R||R!=c||null!=H&&T!=H||(H=T,T=0,G++,m=g.getParent(R),R=B+G<u.getChildCount()?g.getChildAt(g.getChildAt(u,B+G),p):null);var f=this.editor.graph.view.getState(c);-if(c==g.getChildAt(m,p+T)&&null!=f&&1==mxUtils.getValue(f.style,"colspan",1)&&1==mxUtils.getValue(f.style,"rowspan",1))T++;else break}P==G*T-1&&(b.mergeCell=e[0],b.colspan=T,b.rowspan=G)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)};+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,m=g.getParent(e[0]),u=g.getParent(m);if(null!=m&&null!=u){for(var p=m.getIndex(e[0]),B=u.getIndex(m),H=null,S=1,G=1,P=0,Q=B<u.getChildCount()-1?g.getChildAt(g.getChildAt(u,B+1),p):null;P<e.length-1;){var c=e[++P];null==Q||Q!=c||null!=H&&S!=H||(H=S,S=0,G++,m=g.getParent(Q),Q=B+G<u.getChildCount()?g.getChildAt(g.getChildAt(u,B+G),p):null);var f=this.editor.graph.view.getState(c);+if(c==g.getChildAt(m,p+S)&&null!=f&&1==mxUtils.getValue(f.style,"colspan",1)&&1==mxUtils.getValue(f.style,"rowspan",1))S++;else break}P==G*S-1&&(b.mergeCell=e[0],b.colspan=S,b.rowspan=G)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)};EditorUi.prototype.createTimeout=function(b,e,g){var m=!0,u=null,p=mxUtils.bind(this,function(H){u.clear()&&(m=!1,H=null!=H?H:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,e,g)})},null!=g?g(H):this.handleError(H))}),B=window.setTimeout(p,null!=b?b:this.timeout);u={clear:function(){window.clearTimeout(B);return m},isAlive:function(){return m}};null!=e&&this.tryAndHandle(mxUtils.bind(this,function(){e(u)}),p);return u};EditorUi.prototype.tryAndHandle=function(b,e){try{b()}catch(g){null!=e?e(g):this.handleError(g)}};-EditorUi.prototype.removeUserDefinedDarkColors=function(b,e,g){var m=this.editor.graph;b=null!=b?b:m.getSelectionCells();var u=Graph.colorStyles,p=document.createElement("div");m.model.beginUpdate();try{for(var B=0;B<b.length;B++)if(m.model.isEdge(b[B])||m.model.isVertex(b[B])){var H=m.getCellStyle(b[B],!1);if(null!=H)for(var T=0;T<u.length;T++)try{var G=H[u[T]];if(mxUtils.isLightDarkColor(G)){var P=mxUtils.getLightDarkColor(G);m.setCellStyles(u[T],P.light,[b[B]])}}catch(c){}e&&m.isHtmlLabel(b[B])&&-"0"!=mxUtils.getValue(H,"html","0")&&(p.innerHTML=Graph.sanitizeHtml(m.getLabel(b[B])),Graph.addLightDarkColors(p,null,null,function(c,f,l){return mxUtils.isLightDarkColor(l)?(l=mxUtils.getLightDarkColor(l),c.style.setProperty(f,l.light),!0):!1})&&m.cellLabelChanged(b[B],p.innerHTML))}if(g&&mxUtils.isLightDarkColor(m.background)){P=mxUtils.getLightDarkColor(m.background);var R=new ChangePageSetup(this,P.light);R.ignoreImage=!0;m.model.execute(R)}}finally{m.model.endUpdate()}return b};+EditorUi.prototype.removeUserDefinedDarkColors=function(b,e,g){var m=this.editor.graph;b=null!=b?b:m.getSelectionCells();var u=Graph.colorStyles,p=document.createElement("div");m.model.beginUpdate();try{for(var B=0;B<b.length;B++)if(m.model.isEdge(b[B])||m.model.isVertex(b[B])){var H=m.getCellStyle(b[B],!1);if(null!=H)for(var S=0;S<u.length;S++)try{var G=H[u[S]];if(mxUtils.isLightDarkColor(G)){var P=mxUtils.getLightDarkColor(G);m.setCellStyles(u[S],P.light,[b[B]])}}catch(c){}e&&m.isHtmlLabel(b[B])&&+"0"!=mxUtils.getValue(H,"html","0")&&(p.innerHTML=Graph.sanitizeHtml(m.getLabel(b[B])),Graph.addLightDarkColors(p,null,null,function(c,f,l){return mxUtils.isLightDarkColor(l)?(l=mxUtils.getLightDarkColor(l),c.style.setProperty(f,l.light),!0):!1})&&m.cellLabelChanged(b[B],p.innerHTML))}if(g&&mxUtils.isLightDarkColor(m.background)){P=mxUtils.getLightDarkColor(m.background);var Q=new ChangePageSetup(this,P.light);Q.ignoreImage=!0;m.model.execute(Q)}}finally{m.model.endUpdate()}return b};EditorUi.prototype.updateSelectionStateForCell=function(b,e,g,m){g=this.editor.graph;b.cells.push(e);if(g.getModel().isVertex(e)){b.connections=0<g.model.getEdgeCount(e);b.unlocked=b.unlocked&&!g.isCellLocked(e);b.resizable=b.resizable&&g.isCellResizable(e);b.rotatable=b.rotatable&&g.isCellRotatable(e);b.movable=b.movable&&g.isCellMovable(e)&&!g.isTableRow(e)&&!g.isTableCell(e);b.swimlane=b.swimlane||g.isSwimlane(e);b.table=b.table||g.isTable(e);b.cell=b.cell||g.isTableCell(e);b.row=b.row||g.isTableRow(e);b.vertices.push(e);var u=g.getCellGeometry(e);if(null!=u&&(0<u.width?null==b.width?b.width=u.width:b.width!=u.width&&(b.width=""):b.containsLabel=!0,0<u.height?null==b.height?b.height=u.height:b.height!=u.height&&(b.height=""):b.containsLabel=!0,!u.relative||null!=u.offset)){var p=u.relative?u.offset.x:u.x;u=u.relative?u.offset.y:u.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=u:b.y!=u&&(b.y="")}}else g.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=!1);p=g.view.getState(e);null!=p&&(b.html=b.html&&g.isHtmlLabel(e),b.autoSize=b.autoSize||g.isAutoSizeState(p),b.glass=b.glass&&g.isGlassState(p),b.rounded=b.rounded&&g.isRoundedState(p),b.lineJumps=b.lineJumps&&g.isLineJumpState(p),b.image=b.image||g.isImageState(p),b.shadow=b.shadow&&g.isShadowState(p),b.fill=b.fill&&g.isFillState(p),b.gradient=b.fill&&g.isGradientState(p),b.stroke=b.stroke&&g.isStrokeState(p),e=mxUtils.getValue(p.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==e,g.mergeStyle(p.style,b.style,m))};-EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(T,G){"mouseDown"==G.getProperty("eventName")&&e.hideShapePicker()}));var g=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",g);b.addListener(mxEvent.ESCAPE,g);b.view.addListener(mxEvent.SCALE,g);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,g);b.getSelectionModel().addListener(mxEvent.CHANGE,g);var m=b.popupMenuHandler.isMenuShowing;-b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var u=b.dblClick;b.dblClick=function(T,G){if(this.isEnabled())if(null!=G||null==e.sidebar||mxEvent.isShiftDown(T)||b.isCellLocked(b.getDefaultParent()))u.apply(this,arguments);else{var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(T),mxEvent.getClientY(T));mxEvent.consume(T);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(P.x,P.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",-g);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var B=this.hoverIcons.execute;this.hoverIcons.execute=function(T,G,P){var R=P.getEvent();this.graph.isCloneEvent(R)||mxEvent.isShiftDown(R)?B.apply(this,arguments):this.graph.connectVertex(T.cell,G,this.graph.defaultEdgeLength,R,null,null,mxUtils.bind(this,function(c,f,l){var t=b.getCompositeParent(T.cell);c=b.getCellGeometry(t);for(P.consume();null!=t&&b.model.isVertex(t)&&null!=c&&c.relative;)cell=-t,t=b.model.getParent(cell),c=b.getCellGeometry(t);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(P.getGraphX(),P.getGraphY(),t,mxUtils.bind(this,function(z){l(z);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(z))}),G)}),30)}),mxUtils.bind(this,function(c){this.graph.selectCellsForConnectVertex(c,R,this)}))};var H=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(T,G){null!=H&&window.clearTimeout(H);H=window.setTimeout(mxUtils.bind(this,function(){var P=-G.getProperty("arrow"),R=G.getProperty("direction"),c=G.getProperty("event");P=P.getBoundingClientRect();var f=mxUtils.getOffset(b.container),l=b.container.scrollLeft+P.x-f.x;f=b.container.scrollTop+P.y-f.y;var t=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),z=e.showShapePicker(l,f,t,mxUtils.bind(this,function(C){null!=C&&b.connectVertex(t,R,b.defaultEdgeLength,c,!0,!1,function(F,N,K){K(C);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(C))},-function(F){b.selectCellsForConnectVertex(F)},c,this.hoverIcons)}),R,!0);null!=z&&(this.centerShapePicker(z,P,l,f,R),mxUtils.setOpacity(z,30),mxEvent.addListener(z,"mouseenter",function(){mxUtils.setOpacity(z,100)}),mxEvent.addListener(z,"mouseleave",function(){e.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(T,G){null!=H&&window.clearTimeout(H)}))}};+EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,G){"mouseDown"==G.getProperty("eventName")&&e.hideShapePicker()}));var g=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",g);b.addListener(mxEvent.ESCAPE,g);b.view.addListener(mxEvent.SCALE,g);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,g);b.getSelectionModel().addListener(mxEvent.CHANGE,g);var m=b.popupMenuHandler.isMenuShowing;+b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var u=b.dblClick;b.dblClick=function(S,G){if(this.isEnabled())if(null!=G||null==e.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))u.apply(this,arguments);else{var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(P.x,P.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",+g);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var B=this.hoverIcons.execute;this.hoverIcons.execute=function(S,G,P){var Q=P.getEvent();this.graph.isCloneEvent(Q)||mxEvent.isShiftDown(Q)?B.apply(this,arguments):this.graph.connectVertex(S.cell,G,this.graph.defaultEdgeLength,Q,null,null,mxUtils.bind(this,function(c,f,l){var t=b.getCompositeParent(S.cell);c=b.getCellGeometry(t);for(P.consume();null!=t&&b.model.isVertex(t)&&null!=c&&c.relative;)cell=+t,t=b.model.getParent(cell),c=b.getCellGeometry(t);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(P.getGraphX(),P.getGraphY(),t,mxUtils.bind(this,function(z){l(z);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(z))}),G)}),30)}),mxUtils.bind(this,function(c){this.graph.selectCellsForConnectVertex(c,Q,this)}))};var H=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,G){null!=H&&window.clearTimeout(H);H=window.setTimeout(mxUtils.bind(this,function(){var P=+G.getProperty("arrow"),Q=G.getProperty("direction"),c=G.getProperty("event");P=P.getBoundingClientRect();var f=mxUtils.getOffset(b.container),l=b.container.scrollLeft+P.x-f.x;f=b.container.scrollTop+P.y-f.y;var t=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),z=e.showShapePicker(l,f,t,mxUtils.bind(this,function(C){null!=C&&b.connectVertex(t,Q,b.defaultEdgeLength,c,!0,!1,function(F,N,K){K(C);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(C))},+function(F){b.selectCellsForConnectVertex(F)},c,this.hoverIcons)}),Q,!0);null!=z&&(this.centerShapePicker(z,P,l,f,Q),mxUtils.setOpacity(z,30),mxEvent.addListener(z,"mouseenter",function(){mxUtils.setOpacity(z,100)}),mxEvent.addListener(z,"mouseleave",function(){e.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,G){null!=H&&window.clearTimeout(H)}))}};EditorUi.prototype.centerShapePicker=function(b,e,g,m,u){if(u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();u==mxConstants.DIRECTION_NORTH?(g-=p.width/2-10,m-=p.height+6):u==mxConstants.DIRECTION_SOUTH?(g-=p.width/2-10,m+=e.height+6):u==mxConstants.DIRECTION_WEST?(g-=p.width+6,m-=p.height/2-10):u==mxConstants.DIRECTION_EAST&&(g+=e.width+6,m-=p.height/2-10);b.style.left=g+"px";b.style.top=m+"px"};-EditorUi.prototype.showShapePicker=function(b,e,g,m,u,p,B,H,T){var G=null;this.editor.graph.freehand.isDrawing()||(H=H||null==g,G=this.createShapePicker(b,e,g,m,u,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(g,p,H),p,B,H,T),null!=G&&(null==this.hoverIcons||p||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=G));return G};-EditorUi.prototype.createShapePicker=function(b,e,g,m,u,p,B,H,T,G,P){P=null!=P?P:!0;var R=this.editor.graph,c=null;T=null!=T?T:function(t){t=t[0];var z=0,C=0,F=t.geometry;null!=F&&(R.model.isEdge(t)&&(t=F.getTerminalPoint(!1),F=new mxRectangle(0,0,t.x,t.y)),z=F.width/2,C=F.height/2);return new mxPoint(R.snap(Math.round(b/R.view.scale)-R.view.translate.x-z),R.snap(Math.round(e/R.view.scale)-R.view.translate.y-C))};if(null!=B&&0<B.length){var f=this;R=this.editor.graph;c=document.createElement("div");-u=R.view.getState(g);var l=null==g||null!=u&&R.isTransparentState(u)?null:R.copyStyle(g);u=6>B.length?35*B.length:140;c.className="geToolbarContainer geSidebarContainer geShapePicker";c.setAttribute("title",mxResources.get("sidebarTooltip"));c.style.left=Math.round(b)+"px";c.style.top=Math.round(e)+"px";c.style.width=u+"px";mxClient.IS_POINTER&&(c.style.touchAction="none");H||mxUtils.setPrefixedStyle(c.style,"transform","translate(-22px,-22px)");R.container.appendChild(c);u=mxUtils.bind(this,function(t){var z=-document.createElement("a");z.className="geToolbarButton";z.style.display="inline-block";z.style.position="relative";z.style.overflow="hidden";z.style.cursor="pointer";z.style.width="30px";z.style.height="30px";z.style.padding="1px";c.appendChild(z);null!=l&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(l,[t]):this.sidebar.graph.pasteCellStyles([t],R.currentVertexStyle,R.currentEdgeStyle);var C=t.geometry;R.model.isEdge(t)&&(C=C.getTerminalPoint(!1),C=new mxRectangle(0,0,C.x,C.y));null!=C&&-z.appendChild(this.sidebar.createVertexTemplateFromCells([t],C.width,C.height,"",!0,!1,null,!1,mxUtils.bind(this,function(F){if(!mxEvent.isShiftDown(F)||null==g&&R.isSelectionEmpty()){var N=R.cloneCell(t);if(null!=m)m(N);else{var K=T([N]);R.model.isEdge(N)?N.geometry.translate(K.x,K.y):(N.geometry.x=K.x,N.geometry.y=K.y);R.model.beginUpdate();try{R.addCell(N),R.model.isVertex(N)&&R.isAutoSizeCell(N)&&R.updateCellSize(N)}finally{R.model.endUpdate()}R.setSelectionCell(N);R.scrollCellToVisible(N);P&&-R.startEditing(N);null!=f.hoverIcons&&f.hoverIcons.update(R.view.getState(N))}}else N=R.getEditableCells(null!=g?[g]:R.getSelectionCells()),R.updateShapes(t,N);null!=p&&p(F);mxEvent.consume(F)}),25,25,null,null,g))});for(G=0;G<(H?Math.min(B.length,4):B.length);G++)u(B[G]);B=c.offsetTop+c.clientHeight-(R.container.scrollTop+R.container.offsetHeight);0<B&&(c.style.top=Math.max(R.container.scrollTop+22,e-B)+"px");B=c.offsetLeft+c.clientWidth-(R.container.scrollLeft+R.container.offsetWidth);0<B&&(c.style.left=-Math.max(R.container.scrollLeft+22,b-B)+"px")}return c};-EditorUi.prototype.getCellsForShapePicker=function(b,e,g){var m=this.editor.graph,u=mxUtils.bind(this,function(p,B,H,T){return m.createVertex(null,null,T||"",0,0,B||120,H||60,p,!1)});e=mxUtils.bind(this,function(p,B,H){p=new mxCell(H||"",new mxGeometry(0,0,m.defaultEdgeLength+20,0),p);p.geometry.setTerminalPoint(new mxPoint(0,0),!0);p.geometry.setTerminalPoint(new mxPoint(p.geometry.width,null!=B?B:0),!1);p.geometry.points=null!=B?[new mxPoint(p.geometry.width/2,B)]:[];p.geometry.relative=!0;p.edge=+EditorUi.prototype.showShapePicker=function(b,e,g,m,u,p,B,H,S){var G=null;this.editor.graph.freehand.isDrawing()||(H=H||null==g,G=this.createShapePicker(b,e,g,m,u,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(g,p,H),p,B,H,S),null!=G&&(null==this.hoverIcons||p||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=G));return G};+EditorUi.prototype.createShapePicker=function(b,e,g,m,u,p,B,H,S,G,P){P=null!=P?P:!0;var Q=this.editor.graph,c=null;S=null!=S?S:function(t){t=t[0];var z=0,C=0,F=t.geometry;null!=F&&(Q.model.isEdge(t)&&(t=F.getTerminalPoint(!1),F=new mxRectangle(0,0,t.x,t.y)),z=F.width/2,C=F.height/2);return new mxPoint(Q.snap(Math.round(b/Q.view.scale)-Q.view.translate.x-z),Q.snap(Math.round(e/Q.view.scale)-Q.view.translate.y-C))};if(null!=B&&0<B.length){var f=this;Q=this.editor.graph;c=document.createElement("div");+u=Q.view.getState(g);var l=null==g||null!=u&&Q.isTransparentState(u)?null:Q.copyStyle(g);u=6>B.length?35*B.length:140;c.className="geToolbarContainer geSidebarContainer geShapePicker";c.setAttribute("title",mxResources.get("sidebarTooltip"));c.style.left=Math.round(b)+"px";c.style.top=Math.round(e)+"px";c.style.width=u+"px";mxClient.IS_POINTER&&(c.style.touchAction="none");H||mxUtils.setPrefixedStyle(c.style,"transform","translate(-22px,-22px)");Q.container.appendChild(c);u=mxUtils.bind(this,function(t){var z=+document.createElement("a");z.className="geToolbarButton";z.style.display="inline-block";z.style.position="relative";z.style.overflow="hidden";z.style.cursor="pointer";z.style.width="30px";z.style.height="30px";z.style.padding="1px";c.appendChild(z);null!=l&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(l,[t]):this.sidebar.graph.pasteCellStyles([t],Q.currentVertexStyle,Q.currentEdgeStyle);var C=t.geometry;Q.model.isEdge(t)&&(C=C.getTerminalPoint(!1),C=new mxRectangle(0,0,C.x,C.y));null!=C&&+z.appendChild(this.sidebar.createVertexTemplateFromCells([t],C.width,C.height,"",!0,!1,null,!1,mxUtils.bind(this,function(F){if(!mxEvent.isShiftDown(F)||null==g&&Q.isSelectionEmpty()){var N=Q.cloneCell(t);if(null!=m)m(N);else{var K=S([N]);Q.model.isEdge(N)?N.geometry.translate(K.x,K.y):(N.geometry.x=K.x,N.geometry.y=K.y);Q.model.beginUpdate();try{Q.addCell(N),Q.model.isVertex(N)&&Q.isAutoSizeCell(N)&&Q.updateCellSize(N)}finally{Q.model.endUpdate()}Q.setSelectionCell(N);Q.scrollCellToVisible(N);P&&+Q.startEditing(N);null!=f.hoverIcons&&f.hoverIcons.update(Q.view.getState(N))}}else N=Q.getEditableCells(null!=g?[g]:Q.getSelectionCells()),Q.updateShapes(t,N);null!=p&&p(F);mxEvent.consume(F)}),25,25,null,null,g))});for(G=0;G<(H?Math.min(B.length,4):B.length);G++)u(B[G]);B=c.offsetTop+c.clientHeight-(Q.container.scrollTop+Q.container.offsetHeight);0<B&&(c.style.top=Math.max(Q.container.scrollTop+22,e-B)+"px");B=c.offsetLeft+c.clientWidth-(Q.container.scrollLeft+Q.container.offsetWidth);0<B&&(c.style.left=+Math.max(Q.container.scrollLeft+22,b-B)+"px")}return c};+EditorUi.prototype.getCellsForShapePicker=function(b,e,g){var m=this.editor.graph,u=mxUtils.bind(this,function(p,B,H,S){return m.createVertex(null,null,S||"",0,0,B||120,H||60,p,!1)});e=mxUtils.bind(this,function(p,B,H){p=new mxCell(H||"",new mxGeometry(0,0,m.defaultEdgeLength+20,0),p);p.geometry.setTerminalPoint(new mxPoint(0,0),!0);p.geometry.setTerminalPoint(new mxPoint(p.geometry.width,null!=B?B:0),!1);p.geometry.points=null!=B?[new mxPoint(p.geometry.width/2,B)]:[];p.geometry.relative=!0;p.edge=!0;return p});if(null!=b)try{b=m.cloneCell(b),m.model.isVertex(b)&&null!=b.geometry&&(b.geometry.x=0,b.geometry.y=0)}catch(p){b=null}null==b&&(b=u(m.appendFontSize("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",m.vertexFontSize),40,20,"Text"),m.model.isVertex(b)&&m.isAutoSizeCell(b)&&Graph.createOffscreenGraph(m.getStylesheet()).updateCellSize(b));b=[b,u("whiteSpace=wrap;html=1;"),u("ellipse;whiteSpace=wrap;html=1;",80,80),u("rhombus;whiteSpace=wrap;html=1;",80,80),u("rounded=1;whiteSpace=wrap;html=1;"),u("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),u("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),u("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),u("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),u("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),u("triangle;whiteSpace=wrap;html=1;",60,80),u("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),u("shape=tape;whiteSpace=wrap;html=1;",120,100),u("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),u("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),u("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",20,20)];g&&(b=b.concat([e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;startArrow=classic;endSize=8;startSize=8;"),@@ -2117,46 +2117,46 @@ e?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:b==mxConstants.Ae?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:"box"==b?Format.boxMarkerImage.src:"halfCircle"==b?Format.halfCircleMarkerImage.src:"openAsync"==b?Format.openAsyncFilledMarkerImage.src:"async"==b?"1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?Format.dashMarkerImage.src:"baseDash"==b?Format.baseDashMarkerImage.src:"cross"==b?Format.crossMarkerImage.src:"circle"==b?Format.circleMarkerImage.src:"circlePlus"==b?Format.circlePlusMarkerImage.src:"ERone"==b?Format.EROneMarkerImage.src:"ERmandOne"==b?Format.ERmandOneMarkerImage.src:"ERmany"==b?Format.ERmanyMarkerImage.src:"ERoneToMany"==b?Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b?Format.ERzeroToManyMarkerImage.src:null};EditorUi.prototype.createMenus=function(){return null};EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),g=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));g.setEnabled(e.isEnabled())};-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var B=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{B=B||p.getSelectionCells();B=p.getExportableCells(p.model.getTopmostCells(B));for(var H={},T=p.createCellLookup(B),G=p.cloneCells(B,null,H),P=new mxGraphModel,R=P.getChildAt(P.getRoot(),-0),c=0;c<G.length;c++){P.add(R,G[c]);var f=p.view.getState(B[c]);if(null!=f){var l=p.getCellGeometry(G[c]);null!=l&&l.relative&&!P.isEdge(B[c])&&null==T[mxObjectIdentity.get(P.getParent(B[c]))]&&(l.offset=null,l.relative=!1,l.x=f.x/f.view.scale-f.view.translate.x,l.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(H,T),G);mxClipboard.insertCount=1;mxClipboard.setCells(G)}b.updatePasteActionStates();return B};var g=mxClipboard.paste;mxClipboard.paste=function(p){var B=+EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var B=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{B=B||p.getSelectionCells();B=p.getExportableCells(p.model.getTopmostCells(B));for(var H={},S=p.createCellLookup(B),G=p.cloneCells(B,null,H),P=new mxGraphModel,Q=P.getChildAt(P.getRoot(),+0),c=0;c<G.length;c++){P.add(Q,G[c]);var f=p.view.getState(B[c]);if(null!=f){var l=p.getCellGeometry(G[c]);null!=l&&l.relative&&!P.isEdge(B[c])&&null==S[mxObjectIdentity.get(P.getParent(B[c]))]&&(l.offset=null,l.relative=!1,l.x=f.x/f.view.scale-f.view.translate.x,l.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(H,S),G);mxClipboard.insertCount=1;mxClipboard.setCells(G)}b.updatePasteActionStates();return B};var g=mxClipboard.paste;mxClipboard.paste=function(p){var B=null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):B=g.apply(this,arguments);b.updatePasteActionStates();return B};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var u=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,B){u.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;-EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var O=this.graph.getPageLayout(),S=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+O.x*S.width),this.scale*(this.translate.y+O.y*S.height),this.scale*O.width*S.width,-this.scale*O.height*S.height)};b.getPreferredPageSize=function(O,S,X){O=this.getPageLayout();S=this.getPageSize();return new mxRectangle(0,0,O.width*S.width,O.height*S.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(O,S,X,aa){if(null!=b.container&&!b.isViewer()){X=null!=X?X:0;aa=null!=aa?aa:0;var ja=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),pa=mxUtils.hasScrollbars(b.container),sa=b.view.translate,qa=b.view.scale,-wa=mxRectangle.fromRectangle(ja);wa.x=wa.x/qa-sa.x;wa.y=wa.y/qa-sa.y;wa.width/=qa;wa.height/=qa;sa=b.container.scrollTop;var Ba=b.container.scrollLeft,za=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)za+=3;var Ea=b.container.offsetWidth-za;za=b.container.offsetHeight-za;O=O?Math.max(.3,Math.min(S||1,Ea/wa.width)):qa;S=(Ea-O*wa.width)/2/O;var ra=0==this.lightboxVerticalDivider?0:(za-O*wa.height)/this.lightboxVerticalDivider/O;pa&&(S=Math.max(S,0),ra=Math.max(ra,-0));if(pa||ja.width<Ea||ja.height<za)b.view.scaleAndTranslate(O,Math.floor(S-wa.x),Math.floor(ra-wa.y)),b.container.scrollTop=sa*O/qa,b.container.scrollLeft=Ba*O/qa;else if(0!=X||0!=aa)ja=b.view.translate,b.view.setTranslate(Math.floor(ja.x+X/qa),Math.floor(ja.y+aa/qa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,+EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var O=this.graph.getPageLayout(),U=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+O.x*U.width),this.scale*(this.translate.y+O.y*U.height),this.scale*O.width*U.width,+this.scale*O.height*U.height)};b.getPreferredPageSize=function(O,U,V){O=this.getPageLayout();U=this.getPageSize();return new mxRectangle(0,0,O.width*U.width,O.height*U.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(O,U,V,ba){if(null!=b.container&&!b.isViewer()){V=null!=V?V:0;ba=null!=ba?ba:0;var fa=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),pa=mxUtils.hasScrollbars(b.container),sa=b.view.translate,qa=b.view.scale,+wa=mxRectangle.fromRectangle(fa);wa.x=wa.x/qa-sa.x;wa.y=wa.y/qa-sa.y;wa.width/=qa;wa.height/=qa;sa=b.container.scrollTop;var Aa=b.container.scrollLeft,za=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)za+=3;var Da=b.container.offsetWidth-za;za=b.container.offsetHeight-za;O=O?Math.max(.3,Math.min(U||1,Da/wa.width)):qa;U=(Da-O*wa.width)/2/O;var ra=0==this.lightboxVerticalDivider?0:(za-O*wa.height)/this.lightboxVerticalDivider/O;pa&&(U=Math.max(U,0),ra=Math.max(ra,+0));if(pa||fa.width<Da||fa.height<za)b.view.scaleAndTranslate(O,Math.floor(U-wa.x),Math.floor(ra-wa.y)),b.container.scrollTop=sa*O/qa,b.container.scrollLeft=Aa*O/qa;else if(0!=V||0!=ba)fa=b.view.translate,b.view.setTranslate(Math.floor(fa.x+V/qa),Math.floor(fa.y+ba/qa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(O){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(O){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var u=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var O=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=O?parseInt(O["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var B=0;p=mxUtils.bind(this,function(O,S,X){B++;-var aa=document.createElement("span");aa.style.paddingLeft="8px";aa.style.paddingRight="8px";aa.style.cursor="pointer";mxEvent.addListener(aa,"click",O);null!=X&&aa.setAttribute("title",X);O=document.createElement("img");O.setAttribute("border","0");O.setAttribute("src",S);O.style.width="36px";O.style.filter="invert(100%)";aa.appendChild(O);this.chromelessToolbar.appendChild(aa);return aa});if(null!=u.backBtn){var H=Graph.sanitizeLink(u.backBtn.url);null!=H&&p(mxUtils.bind(this,function(O){window.location.href=-H;mxEvent.consume(O)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var T=p(mxUtils.bind(this,function(O){this.actions.get("previousPage").funct();mxEvent.consume(O)}),Editor.previousImage,mxResources.get("previousPage")),G=document.createElement("div");G.style.fontFamily=Editor.defaultHtmlFont;G.style.display="inline-block";G.style.verticalAlign="top";G.style.fontWeight="bold";G.style.marginTop="8px";G.style.fontSize="14px";G.style.cursor="default";G.style.color=-mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(G);var P=p(mxUtils.bind(this,function(O){this.actions.get("nextPage").funct();mxEvent.consume(O)}),Editor.nextImage,mxResources.get("nextPage")),R=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){G.innerText="";var O=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(G,O+1+" / "+this.pages.length);G.setAttribute("title",mxResources.get("currentPage")+": "+this.currentPage.getName());-T.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(O-1,this.pages.length)].getName());P.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(O+1,this.pages.length)].getName())}});T.style.paddingLeft="0px";T.style.paddingRight="4px";P.style.paddingLeft="4px";P.style.paddingRight="0px";var c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(P.style.display="",T.style.display="",G.style.display="inline-block"):-(P.style.display="none",T.style.display="none",G.style.display="none");R()});if(null!=this.menus){var f=this.menus.get("pages");null!=f&&mxEvent.addListener(G,"click",mxUtils.bind(this,function(O){var S=new mxPopupMenu(f.funct);S.div.className+=" geMenubarMenu";S.smartSeparators=!0;S.showDisabled=!0;S.autoExpand=!0;S.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(S,arguments);S.destroy()});var X=mxUtils.getOffset(G);S.popup(X.x,X.y+G.offsetHeight,null,O);mxEvent.addListener(S.div,-"mouseleave",mxUtils.bind(this,function(){S.hideMenu()}))}))}this.editor.addListener("resetGraphView",c);this.editor.addListener("pageSelected",R)}p(mxUtils.bind(this,function(O){this.actions.get("zoomOut").funct();mxEvent.consume(O)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(O){this.actions.get("zoomIn").funct();mxEvent.consume(O)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(O){b.isLightboxView()?+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var O=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=O?parseInt(O["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var B=0;p=mxUtils.bind(this,function(O,U,V){B++;+var ba=document.createElement("span");ba.style.paddingLeft="8px";ba.style.paddingRight="8px";ba.style.cursor="pointer";mxEvent.addListener(ba,"click",O);null!=V&&ba.setAttribute("title",V);O=document.createElement("img");O.setAttribute("border","0");O.setAttribute("src",U);O.style.width="36px";O.style.filter="invert(100%)";ba.appendChild(O);this.chromelessToolbar.appendChild(ba);return ba});if(null!=u.backBtn){var H=Graph.sanitizeLink(u.backBtn.url);null!=H&&p(mxUtils.bind(this,function(O){window.location.href=+H;mxEvent.consume(O)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=p(mxUtils.bind(this,function(O){this.actions.get("previousPage").funct();mxEvent.consume(O)}),Editor.previousImage,mxResources.get("previousPage")),G=document.createElement("div");G.style.fontFamily=Editor.defaultHtmlFont;G.style.display="inline-block";G.style.verticalAlign="top";G.style.fontWeight="bold";G.style.marginTop="8px";G.style.fontSize="14px";G.style.cursor="default";G.style.color=+mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(G);var P=p(mxUtils.bind(this,function(O){this.actions.get("nextPage").funct();mxEvent.consume(O)}),Editor.nextImage,mxResources.get("nextPage")),Q=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){G.innerText="";var O=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(G,O+1+" / "+this.pages.length);G.setAttribute("title",mxResources.get("currentPage")+": "+this.currentPage.getName());+S.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(O-1,this.pages.length)].getName());P.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(O+1,this.pages.length)].getName())}});S.style.paddingLeft="0px";S.style.paddingRight="4px";P.style.paddingLeft="4px";P.style.paddingRight="0px";var c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(P.style.display="",S.style.display="",G.style.display="inline-block"):+(P.style.display="none",S.style.display="none",G.style.display="none");Q()});if(null!=this.menus){var f=this.menus.get("pages");null!=f&&mxEvent.addListener(G,"click",mxUtils.bind(this,function(O){var U=new mxPopupMenu(f.funct);U.div.className+=" geMenubarMenu";U.smartSeparators=!0;U.showDisabled=!0;U.autoExpand=!0;U.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(U,arguments);U.destroy()});var V=mxUtils.getOffset(G);U.popup(V.x,V.y+G.offsetHeight,null,O);mxEvent.addListener(U.div,+"mouseleave",mxUtils.bind(this,function(){U.hideMenu()}))}))}this.editor.addListener("resetGraphView",c);this.editor.addListener("pageSelected",Q)}p(mxUtils.bind(this,function(O){this.actions.get("zoomOut").funct();mxEvent.consume(O)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(O){this.actions.get("zoomIn").funct();mxEvent.consume(O)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(O){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(O)}),Editor.zoomFitImage,mxResources.get("fit"));var l=null,t=null,z=mxUtils.bind(this,function(O){null!=l&&(window.clearTimeout(l),l=null);null!=t&&(window.clearTimeout(t),t=null);l=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);l=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),600)}),O||200)}),C=mxUtils.bind(this,function(O){null!=l&&(window.clearTimeout(l),l=null);null!=t&&(window.clearTimeout(t),t=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,O||30)});if("1"==urlParams.layers){this.layersDialog=null;var F=p(mxUtils.bind(this,function(O){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&-this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var S=F.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=-S.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));S=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=-S.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(O)}),Editor.layersImage,mxResources.get("layers")),N=b.getModel();N.addListener(mxEvent.CHANGE,function(){F.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(O){null!=this.editor.editButtonFunc?+this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var U=F.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=+U.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));U=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=+U.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(O)}),Editor.layersImage,mxResources.get("layers")),N=b.getModel();N.addListener(mxEvent.CHANGE,function(){F.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(O){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(O)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(c=0;c<this.lightboxToolbarActions.length;c++){var K=this.lightboxToolbarActions[c];K.elem=p(K.fn,K.icon,K.tooltip)}if(null!=u.refreshBtn){var J=null==u.refreshBtn.url?null:Graph.sanitizeLink(u.refreshBtn.url);p(mxUtils.bind(this,function(O){null!=J?window.location.href=J:window.location.reload();mxEvent.consume(O)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=u.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(O){u.fullscreenBtn.url?b.openLink(u.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(O)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!u.noCloseBtn&&(u.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(O){"1"==urlParams.close||u.closeBtn?window.close():(this.destroy(),mxEvent.consume(O))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(O){mxEvent.isTouchEvent(O)||(mxEvent.isShiftDown(O)||C(30),z())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(O){mxEvent.consume(O)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(O){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(O)?z():C(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(O){mxEvent.isShiftDown(O)?z():C(100);mxEvent.consume(O)}));mxEvent.addListener(this.chromelessToolbar,-"mouseleave",mxUtils.bind(this,function(O){mxEvent.isTouchEvent(O)||C(30)}));var da=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(O,S){this.startX=S.getGraphX();this.startY=S.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(O,S){},mouseUp:function(O,S){mxEvent.isTouchEvent(S.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<da&&Math.abs(this.scrollTop-b.container.scrollTop)<-da&&Math.abs(this.startX-S.getGraphX())<da&&Math.abs(this.startY-S.getGraphY())<da&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?z():C(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ea=b.view.validate,ca=new mxPoint,W=!1,ba=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&ba!=g.currentPage){ba=g.currentPage;W=!0;var O=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,-!0);null==O&&(O=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));O=b.getPageLayout(O,ca,1);var S=b.getDefaultTranslate(O);this.x0=O.x;this.y0=O.y;if(S.x!=this.translate.x||S.y!=this.translate.y)this.invalidate(),this.translate.x=S.x,this.translate.y=S.y}S=b.getPagePadding();var X=b.getPageSize();O=S.x-(this.x0||0)*X.width;S=S.y-(this.y0||0)*X.height;if(this.translate.x!=O||this.translate.y!=S)this.invalidate(),this.translate.x=O,this.translate.y=S}ea.apply(this,arguments)};-if(!b.isViewer()){var ha=b.sizeDidChange;b.sizeDidChange=function(){var O=W;W=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var S=this.getPageLayout(),X=this.getDefaultTranslate(S),aa=this.view.translate.x,ja=this.view.translate.y;if(X.x!=aa||X.y!=ja){this.view.x0=S.x;this.view.y0=S.y;this.autoTranslate=!0;this.view.setTranslate(X.x,X.y);this.autoTranslate=!1;O||(this.container.scrollLeft+=Math.round((X.x-aa)*this.view.scale),this.container.scrollTop+=-Math.round((X.y-ja)*this.view.scale));return}}ha.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var la=b.view.getBackgroundPane(),Y=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ma=null,Z=null,k=null,A=null,I=null,U=function(O){null!=ma&&window.clearTimeout(ma);0<=O&&window.setTimeout(function(){if(!b.isMouseDown||A)ma=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&+"mouseleave",mxUtils.bind(this,function(O){mxEvent.isTouchEvent(O)||C(30)}));var da=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(O,U){this.startX=U.getGraphX();this.startY=U.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(O,U){},mouseUp:function(O,U){mxEvent.isTouchEvent(U.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<da&&Math.abs(this.scrollTop-b.container.scrollTop)<+da&&Math.abs(this.startX-U.getGraphX())<da&&Math.abs(this.startY-U.getGraphY())<da&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?z():C(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ea=b.view.validate,ca=new mxPoint,X=!1,aa=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&aa!=g.currentPage){aa=g.currentPage;X=!0;var O=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,+!0);null==O&&(O=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));O=b.getPageLayout(O,ca,1);var U=b.getDefaultTranslate(O);this.x0=O.x;this.y0=O.y;if(U.x!=this.translate.x||U.y!=this.translate.y)this.invalidate(),this.translate.x=U.x,this.translate.y=U.y}U=b.getPagePadding();var V=b.getPageSize();O=U.x-(this.x0||0)*V.width;U=U.y-(this.y0||0)*V.height;if(this.translate.x!=O||this.translate.y!=U)this.invalidate(),this.translate.x=O,this.translate.y=U}ea.apply(this,arguments)};+if(!b.isViewer()){var ia=b.sizeDidChange;b.sizeDidChange=function(){var O=X;X=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var U=this.getPageLayout(),V=this.getDefaultTranslate(U),ba=this.view.translate.x,fa=this.view.translate.y;if(V.x!=ba||V.y!=fa){this.view.x0=U.x;this.view.y0=U.y;this.autoTranslate=!0;this.view.setTranslate(V.x,V.y);this.autoTranslate=!1;O||(this.container.scrollLeft+=Math.round((V.x-ba)*this.view.scale),this.container.scrollTop+=+Math.round((V.y-fa)*this.view.scale));return}}ia.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var la=b.view.getBackgroundPane(),Y=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ma=null,Z=null,k=null,A=null,I=null,T=function(O){null!=ma&&window.clearTimeout(ma);0<=O&&window.setTimeout(function(){if(!b.isMouseDown||A)ma=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),Y.style.transformOrigin="",la.style.transformOrigin="",mxClient.IS_SF?(Y.style.transform="scale(1)",la.style.transform="scale(1)",window.setTimeout(function(){Y.style.transform="";la.style.transform=""},0)):(Y.style.transform="",la.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity=-"");var S=new mxPoint(b.container.scrollLeft,b.container.scrollTop),X=mxUtils.getOffset(b.container),aa=b.view.scale,ja=0,pa=0;null!=Z&&(ja=b.container.offsetWidth/2-Z.x+X.x,pa=b.container.offsetHeight/2-Z.y+X.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=aa&&(null!=k&&(ja+=S.x-k.x,pa+=S.y-k.y),null!=e&&g.chromelessResize(!1,null,ja*(b.cumulativeZoomFactor-1),pa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==ja&&0==pa||(b.container.scrollLeft-=-ja*(b.cumulativeZoomFactor-1),b.container.scrollTop-=pa*(b.cumulativeZoomFactor-1)));null!=I&&Y.setAttribute("filter",I);b.cumulativeZoomFactor=1;I=A=Z=k=ma=null}),null!=O?O:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(O,S,X,aa){aa=null!=aa?aa:this.zoomFactor;(S=S||!b.scrollbars)&&(Z=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));O?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=-(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,-160))/this.view.scale;if(b.isFastZoomEnabled()){null==I&&""!=Y.getAttribute("filter")&&(I=Y.getAttribute("filter"),Y.removeAttribute("filter"));k=new mxPoint(b.container.scrollLeft,b.container.scrollTop);O=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);aa=S||null==Z?b.container.scrollLeft+b.container.clientWidth/2:Z.x+b.container.scrollLeft-b.container.offsetLeft;var ja=S||null==Z?b.container.scrollTop+b.container.clientHeight/2:Z.y+b.container.scrollTop--b.container.offsetTop;Y.style.transformOrigin=aa+"px "+ja+"px";Y.style.transform="scale("+O+")";la.style.transformOrigin=aa+"px "+ja+"px";la.style.transform="scale("+O+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(aa=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(aa.style,"transform-origin",(S||null==Z?b.container.clientWidth/2+b.container.scrollLeft-aa.offsetLeft+"px":Z.x+b.container.scrollLeft-aa.offsetLeft-b.container.offsetLeft+"px")+" "+(S||null==Z?b.container.clientHeight/-2+b.container.scrollTop-aa.offsetTop+"px":Z.y+b.container.scrollTop-aa.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(aa.style,"transform","scale("+O+")")):b.view.validateBackgroundStyles(O,aa,ja);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",O))}U(b.isFastZoomEnabled()?X:0)};mxEvent.addGestureListeners(b.container,function(O){null!=ma&&window.clearTimeout(ma)},-null,function(O){1!=b.cumulativeZoomFactor&&U(0)});mxEvent.addListener(b.container,"scroll",function(O){null==ma||b.isMouseDown||1==b.cumulativeZoomFactor||U(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(O,S,X,aa,ja){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!X&&b.isScrollWheelEvent(O))X=b.view.getTranslate(),aa=40/b.view.scale,mxEvent.isShiftDown(O)?b.view.setTranslate(X.x+(S?-aa:aa),X.y):b.view.setTranslate(X.x,X.y+(S?-aa:-aa));else if(X||b.isZoomWheelEvent(O))for(var pa=mxEvent.getSource(O);null!=pa;){if(pa==b.container)return b.tooltipHandler.hideTooltip(),Z=null!=aa&&null!=ja?new mxPoint(aa,ja):new mxPoint(mxEvent.getClientX(O),mxEvent.getClientY(O)),A=X,X=b.zoomFactor,aa=null,O.ctrlKey&&null!=O.deltaY&&40>Math.abs(O.deltaY)&&Math.round(O.deltaY)!=O.deltaY?X=1+Math.abs(O.deltaY)/20*(X-1):null!=O.movementY&&"pointermove"==O.type&&(X=1+Math.max(1,Math.abs(O.movementY))/20*(X-1),aa=-1),b.lazyZoom(S,null,aa,X),mxEvent.consume(O),+"");var U=new mxPoint(b.container.scrollLeft,b.container.scrollTop),V=mxUtils.getOffset(b.container),ba=b.view.scale,fa=0,pa=0;null!=Z&&(fa=b.container.offsetWidth/2-Z.x+V.x,pa=b.container.offsetHeight/2-Z.y+V.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=ba&&(null!=k&&(fa+=U.x-k.x,pa+=U.y-k.y),null!=e&&g.chromelessResize(!1,null,fa*(b.cumulativeZoomFactor-1),pa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==fa&&0==pa||(b.container.scrollLeft-=+fa*(b.cumulativeZoomFactor-1),b.container.scrollTop-=pa*(b.cumulativeZoomFactor-1)));null!=I&&Y.setAttribute("filter",I);b.cumulativeZoomFactor=1;I=A=Z=k=ma=null}),null!=O?O:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(O,U,V,ba){ba=null!=ba?ba:this.zoomFactor;(U=U||!b.scrollbars)&&(Z=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));O?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=+(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ba,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=ba,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,+160))/this.view.scale;if(b.isFastZoomEnabled()){null==I&&""!=Y.getAttribute("filter")&&(I=Y.getAttribute("filter"),Y.removeAttribute("filter"));k=new mxPoint(b.container.scrollLeft,b.container.scrollTop);O=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);ba=U||null==Z?b.container.scrollLeft+b.container.clientWidth/2:Z.x+b.container.scrollLeft-b.container.offsetLeft;var fa=U||null==Z?b.container.scrollTop+b.container.clientHeight/2:Z.y+b.container.scrollTop-+b.container.offsetTop;Y.style.transformOrigin=ba+"px "+fa+"px";Y.style.transform="scale("+O+")";la.style.transformOrigin=ba+"px "+fa+"px";la.style.transform="scale("+O+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(ba=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(ba.style,"transform-origin",(U||null==Z?b.container.clientWidth/2+b.container.scrollLeft-ba.offsetLeft+"px":Z.x+b.container.scrollLeft-ba.offsetLeft-b.container.offsetLeft+"px")+" "+(U||null==Z?b.container.clientHeight/+2+b.container.scrollTop-ba.offsetTop+"px":Z.y+b.container.scrollTop-ba.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(ba.style,"transform","scale("+O+")")):b.view.validateBackgroundStyles(O,ba,fa);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",O))}T(b.isFastZoomEnabled()?V:0)};mxEvent.addGestureListeners(b.container,function(O){null!=ma&&window.clearTimeout(ma)},+null,function(O){1!=b.cumulativeZoomFactor&&T(0)});mxEvent.addListener(b.container,"scroll",function(O){null==ma||b.isMouseDown||1==b.cumulativeZoomFactor||T(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(O,U,V,ba,fa){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!V&&b.isScrollWheelEvent(O))V=b.view.getTranslate(),ba=40/b.view.scale,mxEvent.isShiftDown(O)?b.view.setTranslate(V.x+(U?-ba:ba),V.y):b.view.setTranslate(V.x,V.y+(U?+ba:-ba));else if(V||b.isZoomWheelEvent(O))for(var pa=mxEvent.getSource(O);null!=pa;){if(pa==b.container)return b.tooltipHandler.hideTooltip(),Z=null!=ba&&null!=fa?new mxPoint(ba,fa):new mxPoint(mxEvent.getClientX(O),mxEvent.getClientY(O)),A=V,V=b.zoomFactor,ba=null,O.ctrlKey&&null!=O.deltaY&&40>Math.abs(O.deltaY)&&Math.round(O.deltaY)!=O.deltaY?V=1+Math.abs(O.deltaY)/20*(V-1):null!=O.movementY&&"pointermove"==O.type&&(V=1+Math.max(1,Math.abs(O.movementY))/20*(V-1),ba=-1),b.lazyZoom(U,null,ba,V),mxEvent.consume(O),!1;pa=pa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(O){b.cumulativeZoomFactor=O.scale;b.lazyZoom(0<O.scale,!0);mxEvent.consume(O)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.width=this.formatWidth+"px",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,g=60;null!=e&&(g=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(g,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};@@ -2177,7 +2177,7 @@ e.scrollTop=Math.floor(Math.max(0,g.y-Math.max(20,(e.clientHeight-m)/4)))}else{gEditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,g=mxUtils.hasScrollbars(e.container),m=0,u=0;g&&(m=e.view.translate.x*e.view.scale-e.container.scrollLeft,u=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(g){var p=e.getSelectionCells();e.clearSelection();e.setSelectionCells(p)}e.sizeDidChange();g&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-m,e.container.scrollTop=e.view.translate.y*e.view.scale-u);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};EditorUi.prototype.installResizeHandler=function(b,e,g){e&&(b.window.setSize=function(u,p){if(!this.minimized){var B=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;u=Math.min(u,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,B-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(u,p){var B=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,-H=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,T=parseInt(this.div.style.width),G=parseInt(this.div.style.height);u=Math.max(0,Math.min(u,B-T));p=Math.max(0,Math.min(p,H-G));this.getX()==u&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(T,G)};var m=mxUtils.bind(this,function(){var u=b.window.getX(),p=b.window.getY();b.window.setLocation(u,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,+H=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),G=parseInt(this.div.style.height);u=Math.max(0,Math.min(u,B-S));p=Math.max(0,Math.min(p,H-G));this.getX()==u&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(S,G)};var m=mxUtils.bind(this,function(){var u=b.window.getX(),p=b.window.getY();b.window.setLocation(u,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,"resize",m);b.window.destroy();null!=g&&g()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();function ChangePageSetup(b,e,g,m,u){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=g;this.previousFormat=this.format=m;this.previousPageScale=this.pageScale=u;this.ignoreImage=this.ignoreColor=!1}ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var g=this.previousImage;null!=g&&Graph.isPageLink(g.src)&&(g=this.ui.createImageForPageLink(g.src,this.ui.currentPage));this.ui.setBackgroundImage(g);this.previousImage=e}null!=this.previousFormat&&(this.format=this.previousFormat,@@ -2213,22 +2213,22 @@ EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=Grap"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(g,100);mxUtils.setPrefixedStyle(g.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(g.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(g.style,"transform","scaleX(0)");mxUtils.setOpacity(g,0);window.setTimeout(mxUtils.bind(this,function(){null!=g.parentNode&&g.parentNode.removeChild(g)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[e])};EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.style.textOverflow="ellipsis";e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.minWidth="0";e.setAttribute("title",b);e.innerHTML=Graph.sanitizeHtml(b);return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};-EditorUi.prototype.addSplitHandler=function(b,e,g,m){function u(R){if(null!=B){var c=new mxPoint(mxEvent.getClientX(R),mxEvent.getClientY(R));m(Math.max(0,H+(e?c.x-B.x:B.y-c.y)-g));mxEvent.consume(R);H!=P()&&(T=!0,G=null)}}function p(R){u(R);B=H=null}var B=null,H=null,T=!0,G=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var P=mxUtils.bind(this,function(){var R=parseInt(e?b.style.left:b.style.bottom);e||(R=R+g-this.footerHeight);return R});mxEvent.addGestureListeners(b,function(R){B=new mxPoint(mxEvent.getClientX(R),-mxEvent.getClientY(R));H=P();T=!1;mxEvent.consume(R)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(R){if(!T&&this.hsplitClickEnabled){var c=null!=G?G-g:0;G=P();m(c);mxEvent.consume(R)}}));mxEvent.addGestureListeners(document,null,u,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,u,p)})};+EditorUi.prototype.addSplitHandler=function(b,e,g,m){function u(Q){if(null!=B){var c=new mxPoint(mxEvent.getClientX(Q),mxEvent.getClientY(Q));m(Math.max(0,H+(e?c.x-B.x:B.y-c.y)-g));mxEvent.consume(Q);H!=P()&&(S=!0,G=null)}}function p(Q){u(Q);B=H=null}var B=null,H=null,S=!0,G=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var P=mxUtils.bind(this,function(){var Q=parseInt(e?b.style.left:b.style.bottom);e||(Q=Q+g-this.footerHeight);return Q});mxEvent.addGestureListeners(b,function(Q){B=new mxPoint(mxEvent.getClientX(Q),+mxEvent.getClientY(Q));H=P();S=!1;mxEvent.consume(Q)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(Q){if(!S&&this.hsplitClickEnabled){var c=null!=G?G-g:0;G=P();m(c);mxEvent.consume(Q)}}));mxEvent.addGestureListeners(document,null,u,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,u,p)})};EditorUi.prototype.prompt=function(b,e,g){b=new FilenameDialog(this,e,mxResources.get("apply"),function(m){g(parseFloat(m))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};EditorUi.prototype.handleError=function(b,e,g,m,u){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){u=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(u=mxUtils.htmlEntities(b.message));this.showError(e,u,p,g,null,null,null,null,null,null,null,null,m?g:null)}else null!=g&&g()};-EditorUi.prototype.showError=function(b,e,g,m,u,p,B,H,T,G,P,R,c){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),m,u,p,B,R,H,T);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,G||340,P||100+20*e,!0,!1,c);b.init()};EditorUi.prototype.showDialog=function(b,e,g,m,u,p,B,H,T,G){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,m,u,p,B,H,T,G);this.dialogs.push(this.dialog)};+EditorUi.prototype.showError=function(b,e,g,m,u,p,B,H,S,G,P,Q,c){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),m,u,p,B,Q,H,S);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,G||340,P||100+20*e,!0,!1,c);b.init()};EditorUi.prototype.showDialog=function(b,e,g,m,u,p,B,H,S,G){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,m,u,p,B,H,S,G);this.dialogs.push(this.dialog)};EditorUi.prototype.hideDialog=function(b,e,g){var m=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var u=this.dialogs.length-1;0<=u;u--)if(!this.dialogs[u].closing){m=this.dialogs[u];break}null==m||null!=g&&g!=this.dialog.container.firstChild||(m.closing=!0,0==m.close(b,e)?delete m.closing:(delete m.closing,b=mxUtils.lastIndexOf(this.dialogs,m),0<=b&&this.dialogs.splice(b,1),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog","dialog",m)),null==this.dialog&&null!=this.editor.graph.container&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){null==this.editor||null!=this.dialogs&&0!=this.dialogs.length||(this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus()))}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),g=new mxDictionary,m=[],u=0;u<e.length;u++){var p=b.isTableCell(e[u])?b.model.getParent(e[u]):e[u];null==p||g.get(p)||(g.put(p,!0),m.push(p))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(B){this.handleError(B)}};-EditorUi.prototype.pickColor=function(b,e,g,m,u){var p=this.editor.graph,B=p.cellEditor.saveSelection(),H=(u?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(T){p.cellEditor.restoreSelection(B);e(T)},function(){p.cellEditor.restoreSelection(B)},g,m,u);this.showDialog(b.container,230,H,!0,!1);b.init()};+EditorUi.prototype.pickColor=function(b,e,g,m,u){var p=this.editor.graph,B=p.cellEditor.saveSelection(),H=(u?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(S){p.cellEditor.restoreSelection(B);e(S)},function(){p.cellEditor.restoreSelection(B)},g,m,u);this.showDialog(b.container,230,H,!0,!1);b.init()};EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};-EditorUi.prototype.base64ToBlob=function(b,e){e=e||"";b=atob(b);for(var g=b.length,m=Math.ceil(g/1024),u=Array(m),p=0;p<m;++p){for(var B=1024*p,H=Math.min(B+1024,g),T=Array(H-B),G=0;B<H;++G,++B)T[G]=b[B].charCodeAt(0);u[p]=new Uint8Array(T)}return new Blob(u,{type:e})};+EditorUi.prototype.base64ToBlob=function(b,e){e=e||"";b=atob(b);for(var g=b.length,m=Math.ceil(g/1024),u=Array(m),p=0;p<m;++p){for(var B=1024*p,H=Math.min(B+1024,g),S=Array(H-B),G=0;B<H;++G,++B)S[G]=b[B].charCodeAt(0);u[p]=new Uint8Array(S)}return new Blob(u,{type:e})};EditorUi.prototype.writeImageToClipboard=function(b,e,g,m){var u=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":u,"text/html":new Blob(['<img src="'+b+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](m)};EditorUi.prototype.writeHtmlToClipboard=function(b,e){b=new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(b)],{type:"text/plain"}),"text/html":new Blob([b],{type:"text/html"})});navigator.clipboard.write([b])["catch"](e)};EditorUi.prototype.writeTextToClipboard=function(b,e){navigator.clipboard.writeText(b)["catch"](e)};EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var g=b.indexOf("<mxGraphModel ");if(0<=g){var m=b.lastIndexOf("</mxGraphModel>");m>g&&(e=b.substring(g,m+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(u){}return e};EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(g){if(null!=g){var m=decodeURIComponent(g);this.isCompatibleString(m)&&(g=m)}b(g)}),"text")}),"html")};EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(g){if(null!=g&&0<g.length&&"html"==e&&0<=mxUtils.indexOf(g[0].types,"text/html"))g[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(u){try{var p=this.parseHtmlData(u),B="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var H=B.lastIndexOf("%3E");-0<=H&&H<B.length-3&&(B=B.substring(0,H+3))}catch(P){}try{var T=p.getElementsByTagName("span"),G=null!=T&&0<T.length?mxUtils.trim(decodeURIComponent(T[0].textContent)):decodeURIComponent(B);this.isCompatibleString(G)&&(B=G)}catch(P){}}catch(P){}b(this.isCompatibleString(B)?B:null)}))["catch"](function(u){b(null)})}))["catch"](function(m){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(m){m.text().then(function(u){b(u)})["catch"](function(){b(null)})})["catch"](function(){b(null)});+0<=H&&H<B.length-3&&(B=B.substring(0,H+3))}catch(P){}try{var S=p.getElementsByTagName("span"),G=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(B);this.isCompatibleString(G)&&(B=G)}catch(P){}}catch(P){}b(this.isCompatibleString(B)?B:null)}))["catch"](function(u){b(null)})}))["catch"](function(m){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(m){m.text().then(function(u){b(u)})["catch"](function(){b(null)})})["catch"](function(){b(null)});else b(null)}))["catch"](function(g){b(null)})};EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var g="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(g?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));g=g&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=g&&null==g.nextSibling&&g.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==g.nodeName?(b=g.getAttribute("src"),null!=b&&(Editor.isPngDataUrl(b)&&@@ -2244,14 +2244,14 @@ EditorUi.prototype.showDataDialog=function(b){null!=b&&"undefined"!==typeof windEditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.bind(this,function(m){m=new ChangePageSetup(this,null,m);m.ignoreColor=!0;this.editor.graph.model.execute(m)});var g=mxUtils.prompt(mxResources.get("backgroundImage"),null!=e?e.src:"");null!=g&&0<g.length?(e=new Image,e.onload=function(){b(new mxImage(g,e.width,e.height),!1)},e.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},e.src=g):b(null)};EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,g){mxUtils.confirm(b)?null!=e&&e():null!=g&&g()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};EditorUi.prototype.altShiftActions={65:"connectionArrows",82:"clearWaypoints",76:"editLink",79:"connectionPoints",81:"editConnectionPoints",84:"editTooltip",86:"pasteSize",70:"copySize",66:"copyData",69:"pasteData"};EditorUi.prototype.ctrlAltShiftActions={70:"bringForward",66:"sendBackward"};EditorUi.prototype.ctrlAltActions={88:"copyAsImage"};-EditorUi.prototype.createKeyHandler=function(b){function e(R,c,f){if(!m.isSelectionEmpty()&&m.isEnabled()){c=null!=c?c:1;var l=m.getCompositeParents(m.getSelectionCells()),t=0<l.length?l[0]:null;if(null!=t)if(f){m.getModel().beginUpdate();try{for(t=0;t<l.length;t++)if(m.getModel().isVertex(l[t])&&m.isCellResizable(l[t])){var z=m.getCellGeometry(l[t]);null!=z&&(z=z.clone(),37==R?z.width=Math.max(0,z.width-c):38==R?z.height=Math.max(0,z.height-c):39==R?z.width+=c:40==R&&(z.height+=c),m.getModel().setGeometry(l[t],-z))}}finally{m.getModel().endUpdate()}}else{z=m.model.getParent(t);var C=m.getView().scale;f=null;1==m.getSelectionCount()&&m.model.isVertex(t)&&null!=m.layoutManager&&!m.isCellLocked(t)&&(f=m.layoutManager.getLayout(z));if(null!=f&&f.constructor==mxStackLayout)c=z.getIndex(t),37==R||38==R?m.model.add(z,t,Math.max(0,c-1)):(39==R||40==R)&&m.model.add(z,t,Math.min(m.model.getChildCount(z),c+1));else{var F=m.graphHandler;null!=F&&(null==F.first&&F.start(t,0,0,m.getMovableCells(l)),null!=F.first&&(t=-l=0,37==R?l=-c:38==R?t=-c:39==R?l=c:40==R&&(t=c),F.currentDx+=l*C,F.currentDy+=t*C,F.checkPreview(),F.updatePreview()),null!=B&&window.clearTimeout(B),B=window.setTimeout(function(){if(null!=F.first){var N=F.roundLength(F.currentDx/C),K=F.roundLength(F.currentDy/C);F.moveCells(F.cells,N,K);F.reset()}},400))}}}}var g=this,m=this.editor.graph,u=new mxKeyHandler(m),p=u.isEventIgnored;u.isEventIgnored=function(R){return!(mxEvent.isShiftDown(R)&&9==R.keyCode)&&(!this.isControlDown(R)||mxEvent.isShiftDown(R)||-90!=R.keyCode&&89!=R.keyCode&&188!=R.keyCode&&190!=R.keyCode&&85!=R.keyCode&&83!=R.keyCode)&&(66!=R.keyCode&&73!=R.keyCode||!this.isControlDown(R)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=R.keyCode&&107!=R.keyCode||!this.isControlDown(R)&&!mxEvent.isShiftDown(R)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};u.isEnabledForEvent=function(R){return!mxEvent.isConsumed(R)&&this.isGraphEvent(R)&&this.isEnabled()&&-(null==g.dialogs||0==g.dialogs.length)};u.isControlDown=function(R){return mxEvent.isControlDown(R)||mxClient.IS_MAC&&R.metaKey};var B=null,H={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},T=u.getFunction;mxKeyHandler.prototype.getFunction=function(R){if(m.isEnabled()){var c=null;mxEvent.isShiftDown(R)&&this.isControlDown(R)&&mxEvent.isAltDown(R)?c=g.actions.get(g.ctrlAltShiftActions[R.keyCode]):mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)?-c=g.actions.get(g.altShiftActions[R.keyCode]):this.isControlDown(R)&&mxEvent.isAltDown(R)&&(c=g.actions.get(g.ctrlAltActions[R.keyCode]));if(null!=c)return c.funct;if(null!=H[R.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(R)&&mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)){if(m.model.isVertex(m.getSelectionCell()))return function(){var f=m.connectVertex(m.getSelectionCell(),H[R.keyCode],m.defaultEdgeLength,R,!0);null!=f&&0<f.length&&(1==f.length&&m.model.isEdge(f[0])?m.setSelectionCell(m.model.getTerminal(f[0],-!1)):m.setSelectionCell(f[f.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(R)?function(){e(R.keyCode,mxEvent.isShiftDown(R)?m.gridSize:null,!0)}:function(){e(R.keyCode,mxEvent.isShiftDown(R)?m.gridSize:null)}}return T.apply(this,arguments)};u.bindAction=mxUtils.bind(this,function(R,c,f,l){var t=this.actions.get(f);null!=t&&(f=function(){t.isEnabled()&&t.funct.apply(this,arguments)},-c?l?u.bindControlShiftKey(R,f):u.bindControlKey(R,f):l?u.bindShiftKey(R,f):u.bindKey(R,f))});var G=this,P=u.escape;u.escape=function(R){P.apply(this,arguments)};u.enter=function(){};u.bindControlShiftKey(36,function(){m.exitGroup()});u.bindControlShiftKey(35,function(){m.enterGroup()});u.bindShiftKey(36,function(){m.home()});u.bindKey(35,function(){m.refresh()});u.bindAction(80,!0,"print");u.bindAction(107,!0,"zoomIn");u.bindAction(109,!0,"zoomOut");u.bindAction(61,!0,"zoomIn");u.bindAction(187,!0,+EditorUi.prototype.createKeyHandler=function(b){function e(Q,c,f){if(!m.isSelectionEmpty()&&m.isEnabled()){c=null!=c?c:1;var l=m.getCompositeParents(m.getSelectionCells()),t=0<l.length?l[0]:null;if(null!=t)if(f){m.getModel().beginUpdate();try{for(t=0;t<l.length;t++)if(m.getModel().isVertex(l[t])&&m.isCellResizable(l[t])){var z=m.getCellGeometry(l[t]);null!=z&&(z=z.clone(),37==Q?z.width=Math.max(0,z.width-c):38==Q?z.height=Math.max(0,z.height-c):39==Q?z.width+=c:40==Q&&(z.height+=c),m.getModel().setGeometry(l[t],+z))}}finally{m.getModel().endUpdate()}}else{z=m.model.getParent(t);var C=m.getView().scale;f=null;1==m.getSelectionCount()&&m.model.isVertex(t)&&null!=m.layoutManager&&!m.isCellLocked(t)&&(f=m.layoutManager.getLayout(z));if(null!=f&&f.constructor==mxStackLayout)c=z.getIndex(t),37==Q||38==Q?m.model.add(z,t,Math.max(0,c-1)):(39==Q||40==Q)&&m.model.add(z,t,Math.min(m.model.getChildCount(z),c+1));else{var F=m.graphHandler;null!=F&&(null==F.first&&F.start(t,0,0,m.getMovableCells(l)),null!=F.first&&(t=+l=0,37==Q?l=-c:38==Q?t=-c:39==Q?l=c:40==Q&&(t=c),F.currentDx+=l*C,F.currentDy+=t*C,F.checkPreview(),F.updatePreview()),null!=B&&window.clearTimeout(B),B=window.setTimeout(function(){if(null!=F.first){var N=F.roundLength(F.currentDx/C),K=F.roundLength(F.currentDy/C);F.moveCells(F.cells,N,K);F.reset()}},400))}}}}var g=this,m=this.editor.graph,u=new mxKeyHandler(m),p=u.isEventIgnored;u.isEventIgnored=function(Q){return!(mxEvent.isShiftDown(Q)&&9==Q.keyCode)&&(!this.isControlDown(Q)||mxEvent.isShiftDown(Q)||+90!=Q.keyCode&&89!=Q.keyCode&&188!=Q.keyCode&&190!=Q.keyCode&&85!=Q.keyCode&&83!=Q.keyCode)&&(66!=Q.keyCode&&73!=Q.keyCode||!this.isControlDown(Q)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=Q.keyCode&&107!=Q.keyCode||!this.isControlDown(Q)&&!mxEvent.isShiftDown(Q)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};u.isEnabledForEvent=function(Q){return!mxEvent.isConsumed(Q)&&this.isGraphEvent(Q)&&this.isEnabled()&&+(null==g.dialogs||0==g.dialogs.length)};u.isControlDown=function(Q){return mxEvent.isControlDown(Q)||mxClient.IS_MAC&&Q.metaKey};var B=null,H={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=u.getFunction;mxKeyHandler.prototype.getFunction=function(Q){if(m.isEnabled()){var c=null;mxEvent.isShiftDown(Q)&&this.isControlDown(Q)&&mxEvent.isAltDown(Q)?c=g.actions.get(g.ctrlAltShiftActions[Q.keyCode]):mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)?+c=g.actions.get(g.altShiftActions[Q.keyCode]):this.isControlDown(Q)&&mxEvent.isAltDown(Q)&&(c=g.actions.get(g.ctrlAltActions[Q.keyCode]));if(null!=c)return c.funct;if(null!=H[Q.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(Q)&&mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)){if(m.model.isVertex(m.getSelectionCell()))return function(){var f=m.connectVertex(m.getSelectionCell(),H[Q.keyCode],m.defaultEdgeLength,Q,!0);null!=f&&0<f.length&&(1==f.length&&m.model.isEdge(f[0])?m.setSelectionCell(m.model.getTerminal(f[0],+!1)):m.setSelectionCell(f[f.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(Q)?function(){e(Q.keyCode,mxEvent.isShiftDown(Q)?m.gridSize:null,!0)}:function(){e(Q.keyCode,mxEvent.isShiftDown(Q)?m.gridSize:null)}}return S.apply(this,arguments)};u.bindAction=mxUtils.bind(this,function(Q,c,f,l){var t=this.actions.get(f);null!=t&&(f=function(){t.isEnabled()&&t.funct.apply(this,arguments)},+c?l?u.bindControlShiftKey(Q,f):u.bindControlKey(Q,f):l?u.bindShiftKey(Q,f):u.bindKey(Q,f))});var G=this,P=u.escape;u.escape=function(Q){P.apply(this,arguments)};u.enter=function(){};u.bindControlShiftKey(36,function(){m.exitGroup()});u.bindControlShiftKey(35,function(){m.enterGroup()});u.bindShiftKey(36,function(){m.home()});u.bindKey(35,function(){m.refresh()});u.bindAction(80,!0,"print");u.bindAction(107,!0,"zoomIn");u.bindAction(109,!0,"zoomOut");u.bindAction(61,!0,"zoomIn");u.bindAction(187,!0,"zoomIn");u.bindAction(222,!0,"zoomIn");u.bindAction(173,!0,"zoomOut");u.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)u.bindAction(79,!0,"outline",!0),u.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),u.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),u.bindControlKey(13,function(){G.ctrlEnter()}),u.bindAction(8,!1,"delete"),u.bindAction(8,!0,"deleteAll"),u.bindAction(8,!1,"deleteLabels",!0),u.bindAction(46,!1,"delete"),u.bindAction(46,!0,"deleteAll"),u.bindAction(46,!1,"deleteLabels",!0),u.bindAction(36,!1,"resetView"),u.bindAction(72,!0,"fitWindow",!0),u.bindAction(74,!0,"fitPage"),u.bindAction(74,!0,"fitTwoPages",!0),u.bindAction(48,!0,"customZoom"),u.bindAction(82,!0,"turn"),u.bindAction(82,!0,"clearDefaultStyle",!0),u.bindAction(83,!0,"save"),u.bindAction(83,!0,"saveAs",!0),u.bindAction(65,!0,"selectAll"),u.bindAction(65,!0,"selectNone",!0),u.bindAction(73,!0,"selectVertices",!0),u.bindAction(69,!0,"selectEdges",!0),u.bindAction(69,!0,"editStyle"),u.bindAction(66,!0,"bold"),u.bindAction(66,!0,"toBack",!0),u.bindAction(70,!0,"toFront",!0),u.bindAction(68,!0,"duplicate"),u.bindAction(68,!0,"setAsDefaultStyle",!0),u.bindAction(90,!0,"undo"),u.bindAction(90,!0,"redo",!0),u.bindAction(89,!0,"redo"),u.bindAction(89,!0,"autosize",!0),u.bindAction(88,!0,"cut"),u.bindAction(67,!0,"copy"),u.bindAction(86,!0,"paste"),u.bindAction(71,!0,"group"),u.bindAction(77,!0,"editData"),u.bindAction(71,!0,"grid",!0),u.bindAction(73,!0,"italic"),u.bindAction(76,@@ -2264,41 +2264,41 @@ null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gnull}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(m){for(var u=0;u<b.length;u++)m=m.replace(new RegExp("&"+b[u][0]+";","g"),"&#"+b[u][1]+";");return e(m)};var g=mxUtils.getSizeForString;mxUtils.getSizeForString=function(m,u,p,B){return g(Graph.sanitizeHtml(m),u,p,B)}})();Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},g=Math.pow(2,53)-1;return function(m){var u=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,B;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(B=-arguments[2])}var H=Number(u.length);H=isNaN(H)?0:0!==H&&isFinite(H)?(0<H?1:-1)*Math.floor(Math.abs(H)):H;H=Math.min(Math.max(H,0),g);for(var T=e(this)?Object(new this(H)):Array(H),G=0,P;G<H;)P=u[G],T[G]=p?"undefined"===typeof B?p(P,G):p.call(B,P,G):P,G+=1;T.length=H;return T}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");+arguments[2])}var H=Number(u.length);H=isNaN(H)?0:0!==H&&isFinite(H)?(0<H?1:-1)*Math.floor(Math.abs(H)):H;H=Math.min(Math.max(H,0),g);for(var S=e(this)?Object(new this(H)):Array(H),G=0,P;G<H;)P=u[G],S[G]=p?"undefined"===typeof B?p(P,G):p.call(B,P,G):P,G+=1;S.length=H;return S}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#424242";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.graph.refresh(),this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,g){return null};mxImageShape.prototype.getImageDataUri=function(){var b=String(this.image);if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b),this.clippedImage=b;b=this.clippedSvg}return b};(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(e,g,m,u,p){return"default"==u&&null!=p?"fillcolor"==m.nodeName?p.shapeBackgroundColor:p.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(e,g,m){null==m&&(m=e);return b.apply(this,[e,g,m])}})();-(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,g,m,u,p,B,H,T){var G=b.apply(this,arguments);if(null!=g){var P=G.getElementsByTagName("img");0<P.length&&(P[0].className="geToolbarButton geAdaptiveAsset",P[0].style.margin="4px",P[0].style.width="18px")}return G}})();+(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,g,m,u,p,B,H,S){var G=b.apply(this,arguments);if(null!=g){var P=G.getElementsByTagName("img");0<P.length&&(P[0].className="geToolbarButton geAdaptiveAsset",P[0].style.margin="4px",P[0].style.width="18px")}return G}})();Graph=function(b,e,g,m,u,p){mxGraph.call(this,b,e,g,m);this.themes=u||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(Z){Z=this.getCurrentCellStyle(Z);-return null!=Z?"1"==Z.html||"wrap"==Z[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var B=null,H=null,T=null,G=null,P=!1,R=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();k=this.view.scale;if(!mxEvent.isAltDown(Z.getEvent())&&null!=A&&(R=this.isCellSelected(A.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(Z.getEvent()))){var I=this.selectionCellsHandler.getHandler(A.cell);-if(null==I||null==I.getHandleForEvent(Z)){var U=new mxRectangle(Z.getGraphX()-1,Z.getGraphY()-1),O=mxEvent.isTouchEvent(Z.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;I=O+2;U.grow(O);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&!this.isCellSelected(A.cell)&&!(mxUtils.contains(A,Z.getGraphX()-I,Z.getGraphY()-I)&&mxUtils.contains(A,Z.getGraphX()-I,Z.getGraphY()+I)&&mxUtils.contains(A,Z.getGraphX()+I,Z.getGraphY()+I)&&mxUtils.contains(A,Z.getGraphX()+-I,Z.getGraphY()-I))){var S=this.model.getParent(A.cell);I=this.model.getParent(S);if(!this.isCellSelected(I)){O*=k;var X=2*O;if(this.model.getChildAt(I,0)!=S&&mxUtils.intersects(U,new mxRectangle(A.x,A.y-O,A.width,X))||this.model.getChildAt(S,0)!=A.cell&&mxUtils.intersects(U,new mxRectangle(A.x-O,A.y,X,A.height))||mxUtils.intersects(U,new mxRectangle(A.x,A.y+A.height-O,A.width,X))||mxUtils.intersects(U,new mxRectangle(A.x+A.width-O,A.y,X,A.height)))S=this.selectionCellsHandler.isHandled(I),this.selectCellForEvent(I,-Z.getEvent()),I=this.selectionCellsHandler.getHandler(I),null!=I&&(O=I.getHandleForEvent(Z),null!=O&&(I.start(Z.getGraphX(),Z.getGraphY(),O),I.blockDelayedSelection=!S,Z.consume()))}}for(;!Z.isConsumed()&&null!=A&&(this.isTableCell(A.cell)||this.isTableRow(A.cell)||this.isTable(A.cell));)this.isSwimlane(A.cell)&&this.isCellMovable(A.cell)&&(I=this.getActualStartSize(A.cell),(0<I.x||0<I.width)&&mxUtils.intersects(U,new mxRectangle(A.x+(I.x-I.width-1)*k+(0==I.x?A.width:0),A.y,1,A.height))||(0<I.y||-0<I.height)&&mxUtils.intersects(U,new mxRectangle(A.x,A.y+(I.y-I.height-1)*k+(0==I.y?A.height:0),A.width,1)))&&(this.selectCellForEvent(A.cell,Z.getEvent()),I=this.selectionCellsHandler.getHandler(A.cell),null!=I&&null!=I.customHandles&&(O=mxEvent.CUSTOM_HANDLE-I.customHandles.length+1,I.start(Z.getGraphX(),Z.getGraphY(),O),Z.consume())),A=this.view.getState(this.model.getParent(A.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&-this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();mxEvent.isAltDown(Z.getEvent())||mxEvent.isControlDown(k)||mxEvent.isShiftDown(k)||R||null==A||!this.model.isEdge(A.cell)||(B=new mxPoint(Z.getGraphX(),Z.getGraphY()),P=this.isCellSelected(A.cell),T=A,H=Z,null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,Z.getGraphX(),Z.getGraphY())?G=mxEvent.LABEL_HANDLE:(k=this.selectionCellsHandler.getHandler(A.cell),null!=k&&null!=k.bends&&0<k.bends.length&&(G=k.getHandleForEvent(Z))))}}));-this.addMouseListener({mouseDown:function(Z,k){},mouseMove:mxUtils.bind(this,function(Z,k){Z=this.selectionCellsHandler.handlers.map;for(var A in Z)if(null!=Z[A].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(k.getEvent())){var I=this.tolerance;if(null!=B&&null!=T&&null!=H){if(A=T,null!=G||Math.abs(B.x-k.getGraphX())>I||Math.abs(B.y-k.getGraphY())>I){var U=null;mxEvent.isShiftDown(k.getEvent())||(U=this.selectionCellsHandler.getHandler(A.cell));if(null!=U&&null!=-U.bends&&0<U.bends.length){U.redrawHandles();var O=null!=G?G:U.getHandleForEvent(H),S=this.view.getEdgeStyle(A),X=S==mxEdgeStyle.EntityRelation;I=A.absolutePoints;P||(O=G);O!=mxEvent.LABEL_HANDLE&&null!=I&&(O=G,null==O&&(Z=new mxRectangle(B.x,B.y),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(Z,I[0].x,I[0].y)?O=0:mxUtils.contains(Z,I[I.length-1].x,I[I.length-1].y)?O=U.bends.length-1:null!=I&&(null==S&&null==O||S==mxEdgeStyle.SegmentConnector||S==mxEdgeStyle.OrthConnector)&&-(null!=S&&(2==I.length||3==I.length&&(0==Math.round(I[0].x-I[1].x)&&0==Math.round(I[1].x-I[2].x)||0==Math.round(I[0].y-I[1].y)&&0==Math.round(I[1].y-I[2].y)))?O=2:(O=mxUtils.findNearestSegment(A,B.x,B.y),O=null==S?mxEvent.VIRTUAL_HANDLE-O:O+1))),null==O&&(O=mxEvent.VIRTUAL_HANDLE));Z=O==mxEvent.LABEL_HANDLE||0==O||O==U.bends.length-1;if(!X&&(null!=A.visibleSourceState||null!=A.visibleTargetState)||Z)U.start(k.getGraphX(),k.getGraphX(),O),k.consume(),this.graphHandler.reset()}null!=U&&(this.selectionCellsHandler.isHandlerActive(U)?-this.isCellSelected(A.cell)||(this.selectionCellsHandler.handlers.put(A.cell,U),this.selectCellForEvent(A.cell,k.getEvent())):this.isCellSelected(A.cell)||U.destroy());P=!1;B=H=T=G=null}}else if(A=k.getState(),null!=A&&this.isCellEditable(A.cell)){Z=this.model.getParent(A.cell);U=null;if(this.model.isEdge(A.cell)&&!this.isCellSelected(A.cell)&&!mxEvent.isAltDown(k.getEvent())&&!mxEvent.isShiftDown(k.getEvent())&&!this.isAncestorSelected(A.cell)&&(this.isSwimlane(Z)||this.model.isLayer(Z)||this.getCurrentRoot()==-Z)){if(Z=new mxRectangle(k.getGraphX(),k.getGraphY()),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),I=A.absolutePoints,null!=I)null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,k.getGraphX(),k.getGraphY())?U="move":mxUtils.contains(Z,I[0].x,I[0].y)||mxUtils.contains(Z,I[I.length-1].x,I[I.length-1].y)?U="pointer":(S=this.view.getEdgeStyle(A),S==mxEdgeStyle.EntityRelation||null==A.visibleSourceState&&null==A.visibleTargetState||(U="crosshair",S!=mxEdgeStyle.SegmentConnector&&-S!=mxEdgeStyle.OrthConnector))||(k=mxUtils.findNearestSegment(A,k.getGraphX(),k.getGraphY()),k<I.length-1&&0<=k&&(U=0==Math.round(I[k].x-I[k+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(k.getEvent())){I=mxShape.prototype.svgStrokeTolerance/2;Z=new mxRectangle(k.getGraphX(),k.getGraphY());Z.grow(I);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&(k=this.model.getParent(A.cell),I=this.model.getParent(k),!this.isCellSelected(I)))if(mxUtils.intersects(Z,new mxRectangle(A.x,-A.y-2,A.width,4))&&this.model.getChildAt(I,0)!=k||mxUtils.intersects(Z,new mxRectangle(A.x,A.y+A.height-2,A.width,4)))U="row-resize";else if(mxUtils.intersects(Z,new mxRectangle(A.x-2,A.y,4,A.height))&&this.model.getChildAt(k,0)!=A.cell||mxUtils.intersects(Z,new mxRectangle(A.x+A.width-2,A.y,4,A.height)))U="col-resize";for(k=A;null==U&&null!=k&&(this.isTableCell(k.cell)||this.isTableRow(k.cell)||this.isTable(k.cell));)this.isSwimlane(k.cell)&&this.isCellMovable(k.cell)&&(I=this.getActualStartSize(k.cell),-O=this.view.scale,(0<I.x||0<I.width)&&mxUtils.intersects(Z,new mxRectangle(k.x+(I.x-I.width-1)*O+(0==I.x?k.width*O:0),k.y,1,k.height))?U="col-resize":(0<I.y||0<I.height)&&mxUtils.intersects(Z,new mxRectangle(k.x,k.y+(I.y-I.height-1)*O+(0==I.y?k.height:0),k.width,1))&&(U="row-resize")),k=this.view.getState(this.model.getParent(k.cell))}null!=U&&A.setCursor(U)}}}),mouseUp:mxUtils.bind(this,function(Z,k){G=B=H=T=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var c=document.createElement("div");this.cellRenderer.getLabelValue=+return null!=Z?"1"==Z.html||"wrap"==Z[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var B=null,H=null,S=null,G=null,P=!1,Q=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();k=this.view.scale;if(!mxEvent.isAltDown(Z.getEvent())&&null!=A&&(Q=this.isCellSelected(A.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(Z.getEvent()))){var I=this.selectionCellsHandler.getHandler(A.cell);+if(null==I||null==I.getHandleForEvent(Z)){var T=new mxRectangle(Z.getGraphX()-1,Z.getGraphY()-1),O=mxEvent.isTouchEvent(Z.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;I=O+2;T.grow(O);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&!this.isCellSelected(A.cell)&&!(mxUtils.contains(A,Z.getGraphX()-I,Z.getGraphY()-I)&&mxUtils.contains(A,Z.getGraphX()-I,Z.getGraphY()+I)&&mxUtils.contains(A,Z.getGraphX()+I,Z.getGraphY()+I)&&mxUtils.contains(A,Z.getGraphX()++I,Z.getGraphY()-I))){var U=this.model.getParent(A.cell);I=this.model.getParent(U);if(!this.isCellSelected(I)){O*=k;var V=2*O;if(this.model.getChildAt(I,0)!=U&&mxUtils.intersects(T,new mxRectangle(A.x,A.y-O,A.width,V))||this.model.getChildAt(U,0)!=A.cell&&mxUtils.intersects(T,new mxRectangle(A.x-O,A.y,V,A.height))||mxUtils.intersects(T,new mxRectangle(A.x,A.y+A.height-O,A.width,V))||mxUtils.intersects(T,new mxRectangle(A.x+A.width-O,A.y,V,A.height)))U=this.selectionCellsHandler.isHandled(I),this.selectCellForEvent(I,+Z.getEvent()),I=this.selectionCellsHandler.getHandler(I),null!=I&&(O=I.getHandleForEvent(Z),null!=O&&(I.start(Z.getGraphX(),Z.getGraphY(),O),I.blockDelayedSelection=!U,Z.consume()))}}for(;!Z.isConsumed()&&null!=A&&(this.isTableCell(A.cell)||this.isTableRow(A.cell)||this.isTable(A.cell));)this.isSwimlane(A.cell)&&this.isCellMovable(A.cell)&&(I=this.getActualStartSize(A.cell),(0<I.x||0<I.width)&&mxUtils.intersects(T,new mxRectangle(A.x+(I.x-I.width-1)*k+(0==I.x?A.width:0),A.y,1,A.height))||(0<I.y||+0<I.height)&&mxUtils.intersects(T,new mxRectangle(A.x,A.y+(I.y-I.height-1)*k+(0==I.y?A.height:0),A.width,1)))&&(this.selectCellForEvent(A.cell,Z.getEvent()),I=this.selectionCellsHandler.getHandler(A.cell),null!=I&&null!=I.customHandles&&(O=mxEvent.CUSTOM_HANDLE-I.customHandles.length+1,I.start(Z.getGraphX(),Z.getGraphY(),O),Z.consume())),A=this.view.getState(this.model.getParent(A.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&+this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();mxEvent.isAltDown(Z.getEvent())||mxEvent.isControlDown(k)||mxEvent.isShiftDown(k)||Q||null==A||!this.model.isEdge(A.cell)||(B=new mxPoint(Z.getGraphX(),Z.getGraphY()),P=this.isCellSelected(A.cell),S=A,H=Z,null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,Z.getGraphX(),Z.getGraphY())?G=mxEvent.LABEL_HANDLE:(k=this.selectionCellsHandler.getHandler(A.cell),null!=k&&null!=k.bends&&0<k.bends.length&&(G=k.getHandleForEvent(Z))))}}));+this.addMouseListener({mouseDown:function(Z,k){},mouseMove:mxUtils.bind(this,function(Z,k){Z=this.selectionCellsHandler.handlers.map;for(var A in Z)if(null!=Z[A].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(k.getEvent())){var I=this.tolerance;if(null!=B&&null!=S&&null!=H){if(A=S,null!=G||Math.abs(B.x-k.getGraphX())>I||Math.abs(B.y-k.getGraphY())>I){var T=null;mxEvent.isShiftDown(k.getEvent())||(T=this.selectionCellsHandler.getHandler(A.cell));if(null!=T&&null!=+T.bends&&0<T.bends.length){T.redrawHandles();var O=null!=G?G:T.getHandleForEvent(H),U=this.view.getEdgeStyle(A),V=U==mxEdgeStyle.EntityRelation;I=A.absolutePoints;P||(O=G);O!=mxEvent.LABEL_HANDLE&&null!=I&&(O=G,null==O&&(Z=new mxRectangle(B.x,B.y),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(Z,I[0].x,I[0].y)?O=0:mxUtils.contains(Z,I[I.length-1].x,I[I.length-1].y)?O=T.bends.length-1:null!=I&&(null==U&&null==O||U==mxEdgeStyle.SegmentConnector||U==mxEdgeStyle.OrthConnector)&&+(null!=U&&(2==I.length||3==I.length&&(0==Math.round(I[0].x-I[1].x)&&0==Math.round(I[1].x-I[2].x)||0==Math.round(I[0].y-I[1].y)&&0==Math.round(I[1].y-I[2].y)))?O=2:(O=mxUtils.findNearestSegment(A,B.x,B.y),O=null==U?mxEvent.VIRTUAL_HANDLE-O:O+1))),null==O&&(O=mxEvent.VIRTUAL_HANDLE));Z=O==mxEvent.LABEL_HANDLE||0==O||O==T.bends.length-1;if(!V&&(null!=A.visibleSourceState||null!=A.visibleTargetState)||Z)T.start(k.getGraphX(),k.getGraphX(),O),k.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?+this.isCellSelected(A.cell)||(this.selectionCellsHandler.handlers.put(A.cell,T),this.selectCellForEvent(A.cell,k.getEvent())):this.isCellSelected(A.cell)||T.destroy());P=!1;B=H=S=G=null}}else if(A=k.getState(),null!=A&&this.isCellEditable(A.cell)){Z=this.model.getParent(A.cell);T=null;if(this.model.isEdge(A.cell)&&!this.isCellSelected(A.cell)&&!mxEvent.isAltDown(k.getEvent())&&!mxEvent.isShiftDown(k.getEvent())&&!this.isAncestorSelected(A.cell)&&(this.isSwimlane(Z)||this.model.isLayer(Z)||this.getCurrentRoot()==+Z)){if(Z=new mxRectangle(k.getGraphX(),k.getGraphY()),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),I=A.absolutePoints,null!=I)null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,k.getGraphX(),k.getGraphY())?T="move":mxUtils.contains(Z,I[0].x,I[0].y)||mxUtils.contains(Z,I[I.length-1].x,I[I.length-1].y)?T="pointer":(U=this.view.getEdgeStyle(A),U==mxEdgeStyle.EntityRelation||null==A.visibleSourceState&&null==A.visibleTargetState||(T="crosshair",U!=mxEdgeStyle.SegmentConnector&&+U!=mxEdgeStyle.OrthConnector))||(k=mxUtils.findNearestSegment(A,k.getGraphX(),k.getGraphY()),k<I.length-1&&0<=k&&(T=0==Math.round(I[k].x-I[k+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(k.getEvent())){I=mxShape.prototype.svgStrokeTolerance/2;Z=new mxRectangle(k.getGraphX(),k.getGraphY());Z.grow(I);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&(k=this.model.getParent(A.cell),I=this.model.getParent(k),!this.isCellSelected(I)))if(mxUtils.intersects(Z,new mxRectangle(A.x,+A.y-2,A.width,4))&&this.model.getChildAt(I,0)!=k||mxUtils.intersects(Z,new mxRectangle(A.x,A.y+A.height-2,A.width,4)))T="row-resize";else if(mxUtils.intersects(Z,new mxRectangle(A.x-2,A.y,4,A.height))&&this.model.getChildAt(k,0)!=A.cell||mxUtils.intersects(Z,new mxRectangle(A.x+A.width-2,A.y,4,A.height)))T="col-resize";for(k=A;null==T&&null!=k&&(this.isTableCell(k.cell)||this.isTableRow(k.cell)||this.isTable(k.cell));)this.isSwimlane(k.cell)&&this.isCellMovable(k.cell)&&(I=this.getActualStartSize(k.cell),+O=this.view.scale,(0<I.x||0<I.width)&&mxUtils.intersects(Z,new mxRectangle(k.x+(I.x-I.width-1)*O+(0==I.x?k.width*O:0),k.y,1,k.height))?T="col-resize":(0<I.y||0<I.height)&&mxUtils.intersects(Z,new mxRectangle(k.x,k.y+(I.y-I.height-1)*O+(0==I.y?k.height:0),k.width,1))&&(T="row-resize")),k=this.view.getState(this.model.getParent(k.cell))}null!=T&&A.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(Z,k){G=B=H=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var c=document.createElement("div");this.cellRenderer.getLabelValue=function(Z){var k=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);Z.view.graph.isHtmlLabel(Z.cell)&&("0"==mxUtils.getValue(Z.style,"html","0")?k=mxUtils.htmlEntities(k,!1):(Z.lastLabelValue!=k&&(Z.lastLabelValue=k,Z.lastSanitizedLabelValue=Graph.sanitizeHtml(k),c.innerHTML=Z.lastSanitizedLabelValue,Graph.addLightDarkColors(c,null,"simple"==Z.view.graph.getAdaptiveColors())&&(Z.lastSanitizedLabelValue=c.innerHTML)),k=Z.lastSanitizedLabelValue));return k};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(Z,k){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;-this.graphHandler.getGuideStates=function(){var Z=f.apply(this,arguments);if(this.graph.pageVisible){var k=[],A=this.graph.pageFormat,I=this.graph.pageScale,U=A.width*I;A=A.height*I;I=this.graph.view.translate;for(var O=this.graph.view.scale,S=this.graph.getPageLayout(),X=0;X<S.width;X++)k.push(new mxRectangle(((S.x+X)*U+I.x)*O,(S.y*A+I.y)*O,U*O,A*O));for(X=1;X<S.height;X++)k.push(new mxRectangle((S.x*U+I.x)*O,((S.y+X)*A+I.y)*O,U*O,A*O));Z=k.concat(Z)}return Z};mxDragSource.prototype.dragElementZIndex=-mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(Z,k){return null==Z.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(Z){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var l=this.graphHandler.getCells;this.graphHandler.getCells=function(Z){for(var k=l.apply(this,arguments),A=new mxDictionary,I=[],U=0;U<k.length;U++){var O=-this.graph.isTableCell(Z)&&this.graph.isTableCell(k[U])&&this.graph.isCellSelected(k[U])?this.graph.model.getParent(k[U]):this.graph.isTableRow(Z)&&this.graph.isTableRow(k[U])&&this.graph.isCellSelected(k[U])?k[U]:this.graph.getCompositeParent(k[U]);null==O||A.get(O)||(A.put(O,!0),I.push(O))}return I};var t=this.graphHandler.start;this.graphHandler.start=function(Z,k,A,I){var U=!1;this.graph.isTableCell(Z)&&(this.graph.isCellSelected(Z)?U=!0:Z=this.graph.model.getParent(Z));U||this.graph.isTableRow(Z)&&-this.graph.isCellSelected(Z)||(Z=this.graph.getCompositeParent(Z));t.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(Z,k){k=this.graph.getCompositeParent(k);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(Z,k,A,I,U,O){var S=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=I&&this.graph.applyNewEdgeStyle(I,[S]);return S};var z=new mxRubberband(this);this.getRubberband=function(){return z};+this.graphHandler.getGuideStates=function(){var Z=f.apply(this,arguments);if(this.graph.pageVisible){var k=[],A=this.graph.pageFormat,I=this.graph.pageScale,T=A.width*I;A=A.height*I;I=this.graph.view.translate;for(var O=this.graph.view.scale,U=this.graph.getPageLayout(),V=0;V<U.width;V++)k.push(new mxRectangle(((U.x+V)*T+I.x)*O,(U.y*A+I.y)*O,T*O,A*O));for(V=1;V<U.height;V++)k.push(new mxRectangle((U.x*T+I.x)*O,((U.y+V)*A+I.y)*O,T*O,A*O));Z=k.concat(Z)}return Z};mxDragSource.prototype.dragElementZIndex=+mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(Z,k){return null==Z.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(Z){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var l=this.graphHandler.getCells;this.graphHandler.getCells=function(Z){for(var k=l.apply(this,arguments),A=new mxDictionary,I=[],T=0;T<k.length;T++){var O=+this.graph.isTableCell(Z)&&this.graph.isTableCell(k[T])&&this.graph.isCellSelected(k[T])?this.graph.model.getParent(k[T]):this.graph.isTableRow(Z)&&this.graph.isTableRow(k[T])&&this.graph.isCellSelected(k[T])?k[T]:this.graph.getCompositeParent(k[T]);null==O||A.get(O)||(A.put(O,!0),I.push(O))}return I};var t=this.graphHandler.start;this.graphHandler.start=function(Z,k,A,I){var T=!1;this.graph.isTableCell(Z)&&(this.graph.isCellSelected(Z)?T=!0:Z=this.graph.model.getParent(Z));T||this.graph.isTableRow(Z)&&+this.graph.isCellSelected(Z)||(Z=this.graph.getCompositeParent(Z));t.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(Z,k){k=this.graph.getCompositeParent(k);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(Z,k,A,I,T,O){var U=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=I&&this.graph.applyNewEdgeStyle(I,[U]);return U};var z=new mxRubberband(this);this.getRubberband=function(){return z};var C=(new Date).getTime(),F=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var Z=this.currentState;N.apply(this,arguments);Z!=this.currentState?(C=(new Date).getTime(),F=0):F=(new Date).getTime()-C};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(Z){return mxEvent.isShiftDown(Z.getEvent())&&mxEvent.isAltDown(Z.getEvent())?!1:null!=this.currentState&&Z.getState()==this.currentState&&2E3<F||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var J=this.isToggleEvent;this.isToggleEvent=function(Z){return J.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z)};var da=z.isForceRubberbandEvent;z.isForceRubberbandEvent=function(Z){return da.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==Z.getState()&&mxEvent.isTouchEvent(Z.getEvent())};var ea=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ea=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=ea)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(Z){return mxEvent.isMouseEvent(Z.getEvent())};var ca=this.click;this.click=function(Z){var k=null==Z.state&&-null!=Z.sourceState&&this.isCellLocked(this.getLayerForCell(Z.sourceState.cell));if(this.isEnabled()&&!k||Z.isConsumed())return ca.apply(this,arguments);var A=k?Z.sourceState.cell:Z.getCell();if(null!=A){var I=this.getClickableLinkForCell(A);null!=I?this.isCustomLink(I)?this.customLinkClicked(I,A):this.openLink(I):k&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};var W=this.tooltipHandler.show;this.tooltipHandler.show=function(){W.apply(this,arguments);-if(null!=this.div)for(var Z=this.div.getElementsByTagName("a"),k=0;k<Z.length;k++)null!=Z[k].getAttribute("href")&&null==Z[k].getAttribute("target")&&Z[k].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};this.getCursorForMouseEvent=function(Z){var k=null==Z.state&&null!=Z.sourceState&&this.isCellLocked(Z.sourceState.cell);return this.getCursorForCell(k?Z.sourceState.cell:Z.getCell())};var ba=this.getCursorForCell;this.getCursorForCell=function(Z){if(!this.isEnabled()||-this.isCellLocked(Z)){if(null!=this.getClickableLinkForCell(Z))return"pointer";if(this.isCellLocked(Z))return"default"}return ba.apply(this,arguments)};this.selectRegion=function(Z,k){var A=mxEvent.isAltDown(k)?Z:null;Z=this.getCells(Z.x,Z.y,Z.width,Z.height,null,null,A,null,!0);if(this.isToggleEvent(k))for(A=0;A<Z.length;A++)this.selectCellForEvent(Z[A],k);else this.selectCellsForEvent(Z,k);return Z};var ha=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=-function(Z,k,A){return this.graph.isCellSelected(Z)?!1:ha.apply(this,arguments)};var la=this.updateMouseEvent;this.updateMouseEvent=function(Z){Z=la.apply(this,arguments);null!=Z.state&&this.isCellLocked(this.getLayerForCell(Z.getCell()))&&(null==this.getLinkForCell(Z.getCell())?Z.state=this.view.getState(this.getCellAt(Z.getGraphX(),Z.getGraphY(),null,null,null,mxUtils.bind(this,function(k,A,I){return Z.state==k||this.isCellLocked(this.getLayerForCell(k.cell))&&null==this.getLinkForCell(k.cell)}))):+null!=Z.sourceState&&this.isCellLocked(this.getLayerForCell(Z.sourceState.cell));if(this.isEnabled()&&!k||Z.isConsumed())return ca.apply(this,arguments);var A=k?Z.sourceState.cell:Z.getCell();if(null!=A){var I=this.getClickableLinkForCell(A);null!=I?this.isCustomLink(I)?this.customLinkClicked(I,A):this.openLink(I):k&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};var X=this.tooltipHandler.show;this.tooltipHandler.show=function(){X.apply(this,arguments);+if(null!=this.div)for(var Z=this.div.getElementsByTagName("a"),k=0;k<Z.length;k++)null!=Z[k].getAttribute("href")&&null==Z[k].getAttribute("target")&&Z[k].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};this.getCursorForMouseEvent=function(Z){var k=null==Z.state&&null!=Z.sourceState&&this.isCellLocked(Z.sourceState.cell);return this.getCursorForCell(k?Z.sourceState.cell:Z.getCell())};var aa=this.getCursorForCell;this.getCursorForCell=function(Z){if(!this.isEnabled()||+this.isCellLocked(Z)){if(null!=this.getClickableLinkForCell(Z))return"pointer";if(this.isCellLocked(Z))return"default"}return aa.apply(this,arguments)};this.selectRegion=function(Z,k){var A=mxEvent.isAltDown(k)?Z:null;Z=this.getCells(Z.x,Z.y,Z.width,Z.height,null,null,A,null,!0);if(this.isToggleEvent(k))for(A=0;A<Z.length;A++)this.selectCellForEvent(Z[A],k);else this.selectCellsForEvent(Z,k);return Z};var ia=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=+function(Z,k,A){return this.graph.isCellSelected(Z)?!1:ia.apply(this,arguments)};var la=this.updateMouseEvent;this.updateMouseEvent=function(Z){Z=la.apply(this,arguments);null!=Z.state&&this.isCellLocked(this.getLayerForCell(Z.getCell()))&&(null==this.getLinkForCell(Z.getCell())?Z.state=this.view.getState(this.getCellAt(Z.getGraphX(),Z.getGraphY(),null,null,null,mxUtils.bind(this,function(k,A,I){return Z.state==k||this.isCellLocked(this.getLayerForCell(k.cell))&&null==this.getLinkForCell(k.cell)}))):Z.state=null);return Z};var Y=this.isCellSelectable;this.isCellSelectable=function(Z){return Y.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(Z))};this.isCellLocked=function(Z){for(;null!=Z;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(Z),"locked","0"))return!0;Z=this.model.getParent(Z)}return!1};var ma=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){"mouseDown"==k.getProperty("eventName")&&(Z=k.getProperty("event").getState(),ma=null==Z||this.isSelectionEmpty()||this.isCellSelected(Z.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(Z,k){if(!mxEvent.isMultiTouchEvent(k)){Z=k.getProperty("event");var A=k.getProperty("cell");null==A?(Z=mxUtils.convertPoint(this.container,mxEvent.getClientX(Z),mxEvent.getClientY(Z)),z.start(Z.x,Z.y)):null!=ma?this.addSelectionCells(ma):1<this.getSelectionCount()&&this.isCellSelected(A)&&this.removeSelectionCell(A);ma=null;k.consume()}}));this.connectionHandler.selectCells=function(Z,k){this.graph.setSelectionCell(k||Z)};this.connectionHandler.constraintHandler.isStateIgnored=function(Z,k){var A=Z.view.graph;return k&&(A.isCellSelected(Z.cell)||A.isTableRow(Z.cell)&&A.selectionCellsHandler.isHandled(A.model.getParent(Z.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var Z=this.connectionHandler.constraintHandler;null!=Z.currentFocus&&Z.isStateIgnored(Z.currentFocus,!0)&&(Z.currentFocus=null,Z.constraints=null,Z.destroyIcons());Z.destroyFocusHighlight()}));@@ -2314,37 +2314,37 @@ Graph.createSvgImage=function(b,e,g,m,u){g=unescape(encodeURIComponent(Graph.svgGraph.getSvgFromDataUri=function(b){return null!=b&&"data:image/svg"==b.substring(0,14)?Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+decodeURIComponent(escape(atob(b.substring(b.indexOf(",")+1)))):null};Graph.createSvgNode=function(b,e,g,m,u){var p=mxUtils.createXmlDocument(),B=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=u&&B.setAttribute("style","background: "+u.light+"; background-color: "+u.cssText+";");null==p.createElementNS?(B.setAttribute("xmlns",mxConstants.NS_SVG),B.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):B.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);B.setAttribute("version","1.1");B.setAttribute("width",g+"px");B.setAttribute("height",m+"px");B.setAttribute("viewBox",b+" "+e+" "+g+" "+m);p.appendChild(B);return B};-Graph.htmlToPng=function(b,e,g,m,u,p){u=null!=u?u:"";p=null!=p?p:Editor.htmlRasterScale;var B=document.createElement("canvas");B.width=e*p;B.height=g*p;var H=document.createElement("img");H.onload=mxUtils.bind(this,function(){try{var G=B.getContext("2d");G.scale(p,p);G.drawImage(H,0,0);m(B.toDataURL())}catch(P){m(null)}});var T=mxUtils.createXmlDocument();T=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"svg"):T.createElement("svg");b=(new mxSvgCanvas2D(T)).convertHtml(b);H.onerror=+Graph.htmlToPng=function(b,e,g,m,u,p){u=null!=u?u:"";p=null!=p?p:Editor.htmlRasterScale;var B=document.createElement("canvas");B.width=e*p;B.height=g*p;var H=document.createElement("img");H.onload=mxUtils.bind(this,function(){try{var G=B.getContext("2d");G.scale(p,p);G.drawImage(H,0,0);m(B.toDataURL())}catch(P){m(null)}});var S=mxUtils.createXmlDocument();S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"svg"):S.createElement("svg");b=(new mxSvgCanvas2D(S)).convertHtml(b);H.onerror=function(G){m(null)};H.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+g+'">'+(""!=u?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+u+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+b+"</div></foreignObject></svg>")};-Graph.addLightDarkColors=function(b,e,g,m){function u(c,f,l){return null!=m?m(c,f,l):mxUtils.isValidColor(l)?(null==B&&null!=e&&(B={}),null!=B&&(B[f]=c.style.getPropertyValue(f)),l=mxUtils.getLightDarkColor(l,null,null,g),c.style.setProperty(f,l.cssText),!0):!1}for(var p=b.getElementsByTagName("*"),B=null,H=!1,T=0;T<p.length;T++)if(p[T]!=b&&null!=p[T].style){B=null;for(var G=0;G<p[T].style.length;G++){var P=p[T].style.item(G),R=p[T].style.getPropertyValue(P);H=u(p[T],P,R)||H}"FONT"==p[T].nodeName&&-""==p[T].style.getPropertyValue("color")&&(R=p[T].getAttribute("color"),H=u(p[T],"color",R)||H);null!=e&&null!=B&&p[T].setAttribute(e,JSON.stringify(B))}return H};Graph.removeLightDarkColors=function(b,e){b=b.getElementsByTagName("*");for(var g=!1,m=0;m<b.length;m++)try{var u=b[m].getAttribute(e);if(null!=u){b[m].removeAttribute(e);var p=JSON.parse(u),B;for(B in p){var H=p[B];""==H?(b[m].style[B]=null,""==b[m].getAttribute("style")&&b[m].removeAttribute("style")):b[m].style[B]=H;g=!0}}}catch(T){}return g};+Graph.addLightDarkColors=function(b,e,g,m){function u(c,f,l){return null!=m?m(c,f,l):mxUtils.isValidColor(l)?(null==B&&null!=e&&(B={}),null!=B&&(B[f]=c.style.getPropertyValue(f)),l=mxUtils.getLightDarkColor(l,null,null,g),c.style.setProperty(f,l.cssText),!0):!1}for(var p=b.getElementsByTagName("*"),B=null,H=!1,S=0;S<p.length;S++)if(p[S]!=b&&null!=p[S].style){B=null;for(var G=0;G<p[S].style.length;G++){var P=p[S].style.item(G),Q=p[S].style.getPropertyValue(P);H=u(p[S],P,Q)||H}"FONT"==p[S].nodeName&&+""==p[S].style.getPropertyValue("color")&&(Q=p[S].getAttribute("color"),H=u(p[S],"color",Q)||H);null!=e&&null!=B&&p[S].setAttribute(e,JSON.stringify(B))}return H};Graph.removeLightDarkColors=function(b,e){b=b.getElementsByTagName("*");for(var g=!1,m=0;m<b.length;m++)try{var u=b[m].getAttribute(e);if(null!=u){b[m].removeAttribute(e);var p=JSON.parse(u),B;for(B in p){var H=p[B];""==H?(b[m].style[B]=null,""==b[m].getAttribute("style")&&b[m].removeAttribute("style")):b[m].style[B]=H;g=!0}}}catch(S){}return g};Graph.getGivenColor=function(b,e){var g=null;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){try{var m=b.getAttribute(Graph.backupStyleAttribute);if(null!=m){var u=JSON.parse(m);null!=u&&null!=u[e]&&("color"==e&&"FONT"==b.nodeName&&""==u[e]&&null!=b.getAttribute("color")?g=b.getAttribute("color"):""!=u[e]&&(g=u[e]))}}catch(p){}null==g&&""!=b.style[e]&&(g=b.style[e])}return g};-Graph.setTextColor=function(b,e,g){for(var m=g?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,u=g?"color":"background-color",p=b.getElementsByTagName("*"),B=[],H=0;H<p.length;H++)B.push({node:p[H],value:p[H].style[u]});document.execCommand(g?"forecolor":"backcolor",!1,m);b=b.getElementsByTagName("*");for(H=0;H<b.length;H++){if(H<B.length&&B[H].node==b[H]&&B[H].value!=b[H].style[u]&&""==b[H].style[u])try{if(p=b[H].getAttribute(Graph.backupStyleAttribute),null!=p){var T=JSON.parse(p);T[u]=-"";b[H].setAttribute(Graph.backupStyleAttribute,JSON.stringify(T))}}catch(G){}if(g&&b[H].getAttribute("color")==m||b[H].style[u]==m){g&&b[H].getAttribute("color")==m&&b[H].removeAttribute("color");b[H].style[u]=e!=mxConstants.NONE?mxUtils.getLightDarkColor(e).cssText:null;try{p=b[H].getAttribute(Graph.backupStyleAttribute),T=null!=p?JSON.parse(p):{},T[u]=e!=mxConstants.NONE?e:"",b[H].setAttribute(Graph.backupStyleAttribute,JSON.stringify(T))}catch(G){}if(g&&mxClient.IS_FF){e=b[H];g=e.firstChild;if(null!=+Graph.setTextColor=function(b,e,g){for(var m=g?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,u=g?"color":"background-color",p=b.getElementsByTagName("*"),B=[],H=0;H<p.length;H++)B.push({node:p[H],value:p[H].style[u]});document.execCommand(g?"forecolor":"backcolor",!1,m);b=b.getElementsByTagName("*");for(H=0;H<b.length;H++){if(H<B.length&&B[H].node==b[H]&&B[H].value!=b[H].style[u]&&""==b[H].style[u])try{if(p=b[H].getAttribute(Graph.backupStyleAttribute),null!=p){var S=JSON.parse(p);S[u]=+"";b[H].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}}catch(G){}if(g&&b[H].getAttribute("color")==m||b[H].style[u]==m){g&&b[H].getAttribute("color")==m&&b[H].removeAttribute("color");b[H].style[u]=e!=mxConstants.NONE?mxUtils.getLightDarkColor(e).cssText:null;try{p=b[H].getAttribute(Graph.backupStyleAttribute),S=null!=p?JSON.parse(p):{},S[u]=e!=mxConstants.NONE?e:"",b[H].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}catch(G){}if(g&&mxClient.IS_FF){e=b[H];g=e.firstChild;if(null!=g&&"A"==g.nodeName&&null==g.nextSibling&&null!=g.firstChild){e.parentNode.insertBefore(g,e);for(m=g.firstChild;null!=m;)u=m.nextSibling,e.appendChild(m),m=u;g.appendChild(e)}break}}}};Graph.zapGremlins=function(b){return mxUtils.zapGremlins(b)};Graph.stringToBytes=function(b){for(var e=Array(b.length),g=0;g<b.length;g++)e[g]=b.charCodeAt(g);return e};Graph.bytesToString=function(b){for(var e=Array(b.length),g=0;g<b.length;g++)e[g]=String.fromCharCode(b[g]);return e.join("")};Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(e,g){return String.fromCharCode(parseInt(g,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,e){b=mxUtils.getXml(b);return Graph.compress(e?b:Graph.zapGremlins(b))};Graph.arrayBufferToString=function(b){var e="";b=new Uint8Array(b);for(var g=b.byteLength,m=0;m<g;m++)e+=String.fromCharCode(b[m]);return e};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(e){return e.charCodeAt(0)})};Graph.arrayBufferIndexOfString=function(b,e,g){var m=e.charCodeAt(0),u=1,p=-1;for(g=g||0;g<b.byteLength;g++)if(b[g]==m){p=g;break}for(g=p+1;-1<p&&g<b.byteLength&&g<p+e.length-1;g++){if(b[g]!=e.charCodeAt(u))return Graph.arrayBufferIndexOfString(b,e,p+1);u++}return u==e.length-1?p:-1};Graph.compress=function(b,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=e?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};Graph.decompress=function(b,e,g){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));e=decodeURIComponent(e?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return g?e:Graph.zapGremlins(e)};Graph.fadeNodes=function(b,e,g,m,u){u=null!=u?u:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+u+"ms ease-in-out");Graph.setOpacityForNodes(b,g);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=m&&m()},u)},0)};-Graph.exploreFromCell=function(b,e,g){pageSize=null!=g&&null!=g.pageSize?g.pageSize:8;minSize=null!=g&&null!=g.minSize?g.minSize:180;(function(m,u){function p(P,R){if(P.getModel().isVertex(R)){var c=P.container.scrollWidth/2,f=P.container.scrollHeight/2;P.rootCell=R.referenceCell||R;P.getModel().beginUpdate();try{for(var l=R.referenceCell||R,t=m.model.getCell(l.sourceCellId),z=m.getEdges(t,null,!0,!0,!1,!0),C=[],F=0;F<z.length;F++)null!=z[F].getTerminal(!0)&&null!=z[F].getTerminal(!1)&&m.isCellVisible(z[F])&&-!m.isEdgeIgnored(z[F])&&m.isCellVisible(z[F].getTerminal(!0))&&m.isCellVisible(z[F].getTerminal(!1))&&m.isCellVisible(m.getLayerForCell(z[F]))&&C.push(z[F]);C=z=C;if(null!=R.startIndex||0<pageSize&&z.length>pageSize){var N=R.startIndex||0;C=z.slice(Math.max(0,N),Math.min(z.length,N+pageSize))}C=m.getOpposites(C,t).concat(C);var K=P.cloneCells(C);for(F=0;F<C.length;F++)if(K[F].sourceCellId=C[F].id,P.model.isEdge(K[F]))for(K[F].geometry.x=0,K[F].geometry.y=0,K[F].geometry.points=null,K[F].setStyle(K[F].getStyle()+-";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),K[F].setTerminal(l,null==K[F].getTerminal(!0)),t=0;t<K[F].getChildCount();t++){var J=K[F].getChildAt(t);null!=J.geometry&&J.geometry.relative&&(J.setStyle(J.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),J.geometry.offset=new mxPoint(0,0),J.geometry.y=0,J.geometry.x=.5>J.geometry.x?-.8:.5<J.geometry.x?.8:0)}if(0<R.startIndex){var da=P.createVertex(null,null,mxResources.get("previousPage")+-" ("+Math.ceil((R.startIndex||0)/pageSize)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");da.referenceCell=l;da.startIndex=Math.max(0,(R.startIndex||0)-pageSize);K.splice(0,0,da)}if(z.length>(R.startIndex||0)+pageSize){var ea=P.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((R.startIndex||0)/pageSize)+2)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");-ea.referenceCell=l;ea.startIndex=(R.startIndex||0)+pageSize;K.splice(0,0,ea)}for(var ca in P.getModel().cells){var W=P.getModel().getCell(ca);W!=P.rootCell&&!P.getModel().isAncestor(P.rootCell,W)&&P.getModel().isVertex(W)&&P.removeCells([W])}P.addCells(K);var ba=P.getModel().getGeometry(P.rootCell);null!=ba&&(ba=ba.clone(),ba.x=c-ba.width/2,ba.y=f-ba.height/3,P.getModel().setGeometry(P.rootCell,ba));R=[];for(ca in P.getModel().cells)W=P.getModel().getCell(ca),W!=P.rootCell&&P.getModel().isVertex(W)&&-P.getModel().getParent(W)==P.getDefaultParent()&&(R.push(W),ba=P.getModel().getGeometry(W),null!=ba&&(ba.x=c-ba.width/2,ba.y=f-ba.height/2));var ha=R.length,la=2*Math.PI/ha,Y=Math.max(minSize,Math.min(P.container.scrollWidth/2.5-80,P.container.scrollHeight/2.5-80));for(c=0;c<ha;c++)ba=P.getModel().getGeometry(R[c]),null!=ba&&(ba=ba.clone(),ba.x+=Y*Math.sin(c*la),ba.y+=Y*Math.cos(c*la),P.getModel().setGeometry(R[c],ba))}finally{P.getModel().endUpdate()}}}var B=document.createElement("div");B.style.position=-"absolute";B.style.display="block";B.style.background=Editor.isDarkMode()?Editor.darkColor:"#ffffff";B.style.width="100%";B.style.height="100%";B.style.left="0px";B.style.top="0px";B.style.zIndex=2;var H=document.createElement("img");H.setAttribute("src",Editor.closeBlackImage);H.style.position="absolute";H.style.cursor="pointer";H.style.right="10px";H.style.top="10px";B.appendChild(H);var T=document.createElement("div");T.style.position="absolute";T.style.cursor="pointer";T.style.right="38px";T.style.top=-"14px";T.style.textAlign="right";T.style.verticalAlign="top";mxUtils.write(T,mxResources.get("close"));B.appendChild(T);document.body.appendChild(B);var G=function(P){27==P.keyCode&&H.click()};mxEvent.addListener(document,"keydown",G);(function(P){if(mxClient.isBrowserSupported()){var R=new Graph(P);R.keepEdgesInBackground=!0;R.isCellResizable=function(){return!1};R.isCellRotatable=function(){return!1};R.getCursorForCell=function(C){return this.model.isVertex(C)?"pointer":null};R.getFoldingImage=-function(){return null};var c=function(){mxEvent.removeListener(document,"keydown",G);P.parentNode.removeChild(P);m.scrollCellToVisible(u)};mxEvent.addListener(H,"click",c);mxEvent.addListener(T,"click",c);R.setEnabled(!1);var f=R.click;R.click=function(C){var F=C.getCell(),N=null!=F?null!=F.referenceCell?F.referenceCell:F:null;null!=F&&R.rootCell!=F&&0<R.getEdges(N).length?p(R,F):f.apply(this,arguments)};c=R.container.scrollWidth/2;var l=R.container.scrollHeight/3;R.model.beginUpdate();var t=R.importCells([u])[0];-t.sourceCellId=u.id;t.geometry.x=c-t.geometry.width/2;t.geometry.y=l-t.geometry.height/2;R.model.endUpdate();var z=!1;R.getModel().addListener(mxEvent.CHANGE,function(C,F){z||(C=F.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,R.labelsVisible=!1,z=!0,mxEffects.animateChanges(R,C,function(){var N=new mxParallelEdgeLayout(R);N.spacing=60;var K=N.layout;N.layout=function(J){N.spacing=Math.min(60,Math.max(30,60-5*J.length));K.apply(this,arguments)};N.execute(R.getDefaultParent());mxText.prototype.enableBoundingBox=-!0;R.labelsVisible=!0;R.tooltipHandler.hide();R.refresh();z=!1}))});p(R,t)}else mxUtils.error("Browser is not supported!",200,!1)})(B)})(b,e)};Graph.removeKeys=function(b,e){for(var g in b)e(g)&&delete b[g]};Graph.setTransitionForNodes=function(b,e){for(var g=0;g<b.length;g++)mxUtils.setPrefixedStyle(b[g].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var g=0;g<b.length;g++)b[g].style.opacity=e};+Graph.exploreFromCell=function(b,e,g){pageSize=null!=g&&null!=g.pageSize?g.pageSize:8;minSize=null!=g&&null!=g.minSize?g.minSize:180;(function(m,u){function p(P,Q){if(P.getModel().isVertex(Q)){var c=P.container.scrollWidth/2,f=P.container.scrollHeight/2;P.rootCell=Q.referenceCell||Q;P.getModel().beginUpdate();try{for(var l=Q.referenceCell||Q,t=m.model.getCell(l.sourceCellId),z=m.getEdges(t,null,!0,!0,!1,!0),C=[],F=0;F<z.length;F++)null!=z[F].getTerminal(!0)&&null!=z[F].getTerminal(!1)&&m.isCellVisible(z[F])&&+!m.isEdgeIgnored(z[F])&&m.isCellVisible(z[F].getTerminal(!0))&&m.isCellVisible(z[F].getTerminal(!1))&&m.isCellVisible(m.getLayerForCell(z[F]))&&C.push(z[F]);C=z=C;if(null!=Q.startIndex||0<pageSize&&z.length>pageSize){var N=Q.startIndex||0;C=z.slice(Math.max(0,N),Math.min(z.length,N+pageSize))}C=m.getOpposites(C,t).concat(C);var K=P.cloneCells(C);for(F=0;F<C.length;F++)if(K[F].sourceCellId=C[F].id,P.model.isEdge(K[F]))for(K[F].geometry.x=0,K[F].geometry.y=0,K[F].geometry.points=null,K[F].setStyle(K[F].getStyle()++";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),K[F].setTerminal(l,null==K[F].getTerminal(!0)),t=0;t<K[F].getChildCount();t++){var J=K[F].getChildAt(t);null!=J.geometry&&J.geometry.relative&&(J.setStyle(J.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),J.geometry.offset=new mxPoint(0,0),J.geometry.y=0,J.geometry.x=.5>J.geometry.x?-.8:.5<J.geometry.x?.8:0)}if(0<Q.startIndex){var da=P.createVertex(null,null,mxResources.get("previousPage")++" ("+Math.ceil((Q.startIndex||0)/pageSize)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");da.referenceCell=l;da.startIndex=Math.max(0,(Q.startIndex||0)-pageSize);K.splice(0,0,da)}if(z.length>(Q.startIndex||0)+pageSize){var ea=P.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((Q.startIndex||0)/pageSize)+2)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");+ea.referenceCell=l;ea.startIndex=(Q.startIndex||0)+pageSize;K.splice(0,0,ea)}for(var ca in P.getModel().cells){var X=P.getModel().getCell(ca);X!=P.rootCell&&!P.getModel().isAncestor(P.rootCell,X)&&P.getModel().isVertex(X)&&P.removeCells([X])}P.addCells(K);var aa=P.getModel().getGeometry(P.rootCell);null!=aa&&(aa=aa.clone(),aa.x=c-aa.width/2,aa.y=f-aa.height/3,P.getModel().setGeometry(P.rootCell,aa));Q=[];for(ca in P.getModel().cells)X=P.getModel().getCell(ca),X!=P.rootCell&&P.getModel().isVertex(X)&&+P.getModel().getParent(X)==P.getDefaultParent()&&(Q.push(X),aa=P.getModel().getGeometry(X),null!=aa&&(aa.x=c-aa.width/2,aa.y=f-aa.height/2));var ia=Q.length,la=2*Math.PI/ia,Y=Math.max(minSize,Math.min(P.container.scrollWidth/2.5-80,P.container.scrollHeight/2.5-80));for(c=0;c<ia;c++)aa=P.getModel().getGeometry(Q[c]),null!=aa&&(aa=aa.clone(),aa.x+=Y*Math.sin(c*la),aa.y+=Y*Math.cos(c*la),P.getModel().setGeometry(Q[c],aa))}finally{P.getModel().endUpdate()}}}var B=document.createElement("div");B.style.position=+"absolute";B.style.display="block";B.style.background=Editor.isDarkMode()?Editor.darkColor:"#ffffff";B.style.width="100%";B.style.height="100%";B.style.left="0px";B.style.top="0px";B.style.zIndex=2;var H=document.createElement("img");H.setAttribute("src",Editor.closeBlackImage);H.style.position="absolute";H.style.cursor="pointer";H.style.right="10px";H.style.top="10px";B.appendChild(H);var S=document.createElement("div");S.style.position="absolute";S.style.cursor="pointer";S.style.right="38px";S.style.top=+"14px";S.style.textAlign="right";S.style.verticalAlign="top";mxUtils.write(S,mxResources.get("close"));B.appendChild(S);document.body.appendChild(B);var G=function(P){27==P.keyCode&&H.click()};mxEvent.addListener(document,"keydown",G);(function(P){if(mxClient.isBrowserSupported()){var Q=new Graph(P);Q.keepEdgesInBackground=!0;Q.isCellResizable=function(){return!1};Q.isCellRotatable=function(){return!1};Q.getCursorForCell=function(C){return this.model.isVertex(C)?"pointer":null};Q.getFoldingImage=+function(){return null};var c=function(){mxEvent.removeListener(document,"keydown",G);P.parentNode.removeChild(P);m.scrollCellToVisible(u)};mxEvent.addListener(H,"click",c);mxEvent.addListener(S,"click",c);Q.setEnabled(!1);var f=Q.click;Q.click=function(C){var F=C.getCell(),N=null!=F?null!=F.referenceCell?F.referenceCell:F:null;null!=F&&Q.rootCell!=F&&0<Q.getEdges(N).length?p(Q,F):f.apply(this,arguments)};c=Q.container.scrollWidth/2;var l=Q.container.scrollHeight/3;Q.model.beginUpdate();var t=Q.importCells([u])[0];+t.sourceCellId=u.id;t.geometry.x=c-t.geometry.width/2;t.geometry.y=l-t.geometry.height/2;Q.model.endUpdate();var z=!1;Q.getModel().addListener(mxEvent.CHANGE,function(C,F){z||(C=F.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,Q.labelsVisible=!1,z=!0,mxEffects.animateChanges(Q,C,function(){var N=new mxParallelEdgeLayout(Q);N.spacing=60;var K=N.layout;N.layout=function(J){N.spacing=Math.min(60,Math.max(30,60-5*J.length));K.apply(this,arguments)};N.execute(Q.getDefaultParent());mxText.prototype.enableBoundingBox=+!0;Q.labelsVisible=!0;Q.tooltipHandler.hide();Q.refresh();z=!1}))});p(Q,t)}else mxUtils.error("Browser is not supported!",200,!1)})(B)})(b,e)};Graph.removeKeys=function(b,e){for(var g in b)e(g)&&delete b[g]};Graph.setTransitionForNodes=function(b,e){for(var g=0;g<b.length;g++)mxUtils.setPrefixedStyle(b[g].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var g=0;g<b.length;g++)b[g].style.opacity=e};Graph.removePasteFormatting=function(b,e){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var g=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style){"#000000"==b.style.color&&(b.style.color="");if("SPAN"==b.nodeName&&"Apple-tab-span"==b.className){var m=Graph.createTabNode(4);b.parentNode.replaceChild(m,b);b=m}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=g&&"P"==g.nodeName&&"p1"==g.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.parentNode.removeChild(b)}!e&&null!=b.innerHTML&&0<=b.innerHTML.indexOf("\t")&&(m=Graph.createTabNode(4),b.innerHTML=b.innerHTML.replace(/\t/g,m.outerHTML))}b=g}};Graph.createTabNode=function(b){var e="\t";if(null!=b)for(e="";0<b;)e+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(e));return b};Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){if(null==b)return null;var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};Graph.clipSvgDataUri=function(b){if(null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var e=document.createElement("div");e.style.position="absolute";e.style.visibility="hidden";var g=decodeURIComponent(escape(atob(b.substring(26)))),m=g.indexOf("<svg");if(0<=m){e.innerHTML=Graph.sanitizeHtml(g.substring(m));var u=e.getElementsByTagName("svg");if(0<u.length){document.body.appendChild(e);try{m=g=1;var p=u[0].getAttribute("width"),B=u[0].getAttribute("height");p=null!=p&&"%"!=p.charAt(p.length--1)?parseFloat(p):NaN;B=null!=B&&"%"!=B.charAt(B.length-1)?parseFloat(B):NaN;var H=u[0].getAttribute("viewBox");if(null!=H&&!isNaN(p)&&!isNaN(B)){var T=H.split(" ");4<=H.length&&(g=parseFloat(T[2])/p,m=parseFloat(T[3])/B,new mxRectangle(parseFloat(T[0]),parseFloat(T[1]),parseFloat(T[2]),parseFloat(T[3])))}var G=u[0].getBBox();if(0<G.width&&0<G.height){p=0;var P=u[0].querySelectorAll("[stroke-width]");for(B=0;B<P.length;B++)p=Math.max(p,parseFloat(P[B].getAttribute("stroke-width")));G=new mxRectangle(G.x,-G.y,G.width,G.height);G.grow(p/2);e.getElementsByTagName("svg")[0].setAttribute("viewBox",G.x+" "+G.y+" "+G.width+" "+G.height);e.getElementsByTagName("svg")[0].setAttribute("width",G.width/g);e.getElementsByTagName("svg")[0].setAttribute("height",G.height/m)}}catch(R){}finally{document.body.removeChild(e)}b=Editor.createSvgDataUri(mxUtils.getXml(u[0]))}}}catch(R){}return b};+1)?parseFloat(p):NaN;B=null!=B&&"%"!=B.charAt(B.length-1)?parseFloat(B):NaN;var H=u[0].getAttribute("viewBox");if(null!=H&&!isNaN(p)&&!isNaN(B)){var S=H.split(" ");4<=H.length&&(g=parseFloat(S[2])/p,m=parseFloat(S[3])/B,new mxRectangle(parseFloat(S[0]),parseFloat(S[1]),parseFloat(S[2]),parseFloat(S[3])))}var G=u[0].getBBox();if(0<G.width&&0<G.height){p=0;var P=u[0].querySelectorAll("[stroke-width]");for(B=0;B<P.length;B++)p=Math.max(p,parseFloat(P[B].getAttribute("stroke-width")));G=new mxRectangle(G.x,+G.y,G.width,G.height);G.grow(p/2);e.getElementsByTagName("svg")[0].setAttribute("viewBox",G.x+" "+G.y+" "+G.width+" "+G.height);e.getElementsByTagName("svg")[0].setAttribute("width",G.width/g);e.getElementsByTagName("svg")[0].setAttribute("height",G.height/m)}}catch(Q){}finally{document.body.removeChild(e)}b=Editor.createSvgDataUri(mxUtils.getXml(u[0]))}}}catch(Q){}return b};Graph.createRemoveIcon=function(b,e){var g=document.createElement("img");g.setAttribute("src",Dialog.prototype.clearImage);g.setAttribute("title",b);g.setAttribute("width","13");g.setAttribute("height","10");g.style.marginLeft="4px";g.style.marginBottom="-1px";g.style.cursor="pointer";mxEvent.addListener(g,"click",e);return g};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.rewritePageLinks=function(b,e){function g(u,p){var B=u.getAttribute(p);if(null!=B){Graph.isPageLink(B)&&(B="#"+B.substring(B.indexOf(":")+1));var H=p;e&&"xlink:href"==p&&(u.removeAttribute(p),H="href");u.setAttribute(H,B)}}b=b.getElementsByTagName("a");if(null!=b)for(var m=0;m<b.length;m++)g(b[m],"href"),g(b[m],"xlink:href")};Graph.isLink=function(b){return null!=b&&b.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;@@ -2352,33 +2352,33 @@ Graph.prototype.diagramBackgroundColor="#f0f0f0";Graph.prototype.enableDiagramBaGraph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?mxUtils.removeJavascriptProtocol(decodeURIComponent(urlParams.base)):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");Graph.prototype.vertexFontSize=null;Graph.prototype.edgeFontSize=null;Graph.prototype.adaptiveColors="auto";-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var u=g.view.graph.tolerance,p=!0,B=null,H=mxUtils.bind(this,function(P){p=!0;B=new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P))}),T=mxUtils.bind(this,function(P){p=p&&null!=B&&Math.abs(B.x-mxEvent.getClientX(P))<u&&Math.abs(B.y-mxEvent.getClientY(P))<u}),G=mxUtils.bind(this,function(P){if(p)for(var R=mxEvent.getSource(P);null!=-R&&R!=m.node;){if("a"==R.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,R,P);break}R=R.parentNode}});mxEvent.addGestureListeners(m.node,H,T,G);mxEvent.addListener(m.node,"click",function(P){mxEvent.consume(P)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var m=mxEvent.getSource(g);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var u=g.view.graph.tolerance,p=!0,B=null,H=mxUtils.bind(this,function(P){p=!0;B=new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P))}),S=mxUtils.bind(this,function(P){p=p&&null!=B&&Math.abs(B.x-mxEvent.getClientX(P))<u&&Math.abs(B.y-mxEvent.getClientY(P))<u}),G=mxUtils.bind(this,function(P){if(p)for(var Q=mxEvent.getSource(P);null!=+Q&&Q!=m.node;){if("a"==Q.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,Q,P);break}Q=Q.parentNode}});mxEvent.addGestureListeners(m.node,H,S,G);mxEvent.addListener(m.node,"click",function(P){mxEvent.consume(P)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var m=mxEvent.getSource(g);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=m&&this.graph.isCustomLink(m)&&(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&this.graph.customLinkClicked(m)&&mxEvent.consume(g))}))}}this.initLayoutManager()};(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(B){return!this.isSpecialColor(B.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(B.style,"lineShape",null)&&(this.model.isVertex(B.cell)||"arrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"wire"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(B.style,-mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isGradientState=function(B){return this.isFillState(B)&&"wire"!=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.isStrokeState=function(B){return!0};Graph.prototype.getTextColor=function(B,H){for(var T=H?"color":"background-color",G=B==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(B,-T);null==G&&null!=B&&B!=this.cellEditor.textarea.parentNode;)G=B==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(B,T),B=B.parentNode;if("rgba(0, 0, 0, 0)"==G||"transparent"==G)G=mxConstants.NONE;return G};Graph.prototype.isSpecialColor=function(B){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],B)};Graph.prototype.isGlassState=function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return"label"==B||"rectangle"==+mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isGradientState=function(B){return this.isFillState(B)&&"wire"!=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.isStrokeState=function(B){return!0};Graph.prototype.getTextColor=function(B,H){for(var S=H?"color":"background-color",G=B==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(B,+S);null==G&&null!=B&&B!=this.cellEditor.textarea.parentNode;)G=B==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(B,S),B=B.parentNode;if("rgba(0, 0, 0, 0)"==G||"transparent"==G)G=mxConstants.NONE;return G};Graph.prototype.isSpecialColor=function(B){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],B)};Graph.prototype.isGlassState=function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return"label"==B||"rectangle"==B||"internalStorage"==B||"ext"==B||"umlLifeline"==B||"swimlane"==B||"process"==B};Graph.prototype.isRoundedState=function(B){return null!=B.shape?B.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(B){var H=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(B.style,mxConstants.STYLE_CURVED,!1)&&("connector"==H||"filledEdge"==H||"wire"==H)};Graph.prototype.isAutoSizeState=-function(B){return"1"==mxUtils.getValue(B.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(B){return null!=mxUtils.getValue(B.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(B){return!0};Graph.prototype.getVerticesAndEdges=function(B,H){B=null!=B?B:!0;H=null!=H?H:!0;var T=this.model;return T.filterDescendants(function(G){return B&&T.isVertex(G)||H&&T.isEdge(G)},T.getRoot())};Graph.prototype.applyNewEdgeStyle=function(B,H,T){B=this.getCellStyle(B).newEdgeStyle;-if(null!=B){this.model.beginUpdate();try{var G=JSON.parse(B),P;for(P in G)this.setCellStyles(P,G[P],H),"edgeStyle"==P&&"elbowEdgeStyle"==G[P]&&null!=T&&this.setCellStyles("elbow",T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",H)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(B){for(var H={},T=0;T<B.length;T++){var G=this.view.getState(B[T]);null!=G&&this.mergeStyle(G.style,H,0==T)}return H};Graph.prototype.mergeStyle=function(B,H,T){if(null!=-B){var G={},P;for(P in B){var R=B[P];null!=R&&(G[P]=!0,null==H[P]&&T?H[P]=R:H[P]!=R&&delete H[P])}for(P in H)G[P]||delete H[P]}};Graph.prototype.getStartEditingCell=function(B,H){H=this.getCellStyle(B);H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,0));this.isTable(B)&&(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B)&&(B=this.model.getChildAt(B,0),H=this.getCellStyle(B),H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(B)&&-(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B))for(H=0;H<this.model.getChildCount(B);H++){var T=this.model.getChildAt(B,H);if(this.isCellEditable(T)){B=T;break}}return B};Graph.prototype.copyStyle=function(B){return this.getCellStyle(B,!1)};Graph.prototype.pasteStyle=function(B,H,T,G){null!=B&&(G||(T=null!=T?T:Graph.cellStyles,Graph.removeKeys(B,function(P){return 0>mxUtils.indexOf(T,P)})),this.updateCellStyles(B,H))};Graph.prototype.copyCellStyles=function(B,H,T,-G,P,R,c){var f=!1,l=!1;if(0<B.length)for(var t=0;t<B.length&&(f=this.getModel().isVertex(B[t])||f,!(l=this.getModel().isEdge(B[t])||l)||!f);t++);else l=f=!0;f=f&&!R;l=l&&!c;for(t=0;t<H.length;t++)if(B=0<=mxUtils.indexOf(Graph.textStyles,H[t]),"strokeColor"!=H[t]||null!=T[t]&&"none"!=T[t])if(0<=mxUtils.indexOf(Graph.cellStyles,H[t])||"shape"==H[t])if("shape"!=H[t]&&(f||B)&&(null==T[t]?delete G[H[t]]:G[H[t]]=T[t]),l||B)null==T[t]?delete P[H[t]]:P[H[t]]=T[t]};Graph.prototype.includeDescendants=function(B){for(var H=-[],T=0;T<B.length;T++)H=H.concat(this.model.getDescendants(B[T]));return H};Graph.prototype.pasteCellStyles=function(B,H,T,G,P){H=null!=H?H:this.currentVertexStyle;T=null!=T?T:this.currentEdgeStyle;P=null!=P?P:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var R=0;R<B.length;R++){var c=B[R],f=this.model.getStyle(c),l=!1;null!=c.style&&(pairs=c.style.split(";"),l=l||0<=mxUtils.indexOf(pairs,"text"));if(l)var t=Graph.textStyles;else if(t=Graph.cellStyles.slice(),!G)for(var z=null!=f?f.split(";"):-[],C=0;C<z.length;C++){var F=z[C],N=F.indexOf("=");if(0<=N){var K=F.substring(0,N),J=mxUtils.indexOf(t,K);0<=J&&t.splice(J,1);for(l=0;l<Graph.cellStyleGroups.length;l++){var da=Graph.cellStyleGroups[l];if(0<=mxUtils.indexOf(da,K))for(var ea=0;ea<da.length;ea++){var ca=mxUtils.indexOf(t,da[ea]);0<=ca&&t.splice(ca,1)}}}}var W=this.model.isEdge(c);l=W?T:H;for(C=0;C<t.length;C++){K=t[C];var ba=l[K];null!=ba&&("edgeStyle"!=K||P)&&(W||!W&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(f=mxUtils.setStyle(f,K,-ba),"fontFamily"==K&&null==l.fontSource&&(f=mxUtils.setStyle(f,"fontSource",null)),W&&"rounded"==K&&"1"==ba&&null==l.curved&&(f=mxUtils.setStyle(f,"curved",null)))}Editor.simpleLabels&&(f=mxUtils.setStyle(mxUtils.setStyle(f,"html",null),"whiteSpace",null));this.model.setStyle(c,f)}}finally{this.model.endUpdate()}return B};Graph.prototype.updateCellStyles=function(B,H){this.model.beginUpdate();try{for(var T=0;T<H.length;T++)if(this.model.isVertex(H[T])||this.model.isEdge(H[T])){var G=this.getCellStyle(H[T],-!1),P=G[mxConstants.STYLE_PERIMETER],R=!1;for(f in B){var c=B[f];if(G[f]!=c){if(f==mxConstants.STYLE_SHAPE&&"umlLifeline"==G[f]&&"umlLifeline"!=c){R=!0;var f="participant"}this.setCellStyles(f,c,[H[T]])}}R&&this.setCellStyles(mxConstants.STYLE_PERIMETER,P,[H[T]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=-function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(B,H,T,G,P,R){this.useCssTransforms&&(B=B/this.currentScale-this.currentTranslate.x,H=H/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(B,H,T,G,P,R){G=null!=G?G:!0;P=null!=P?P:!0;null==T&&(T=this.getCurrentRoot(),null==T&&(T=this.getModel().getRoot()));if(null!=T)for(var c=-this.model.getChildCount(T)-1;0<=c;c--){var f=this.model.getChildAt(T,c),l=this.getScaledCellAt(B,H,f,G,P,R);if(null!=l)return l;if(this.isCellVisible(f)&&(P&&this.model.isEdge(f)||G&&this.model.isVertex(f))&&(l=this.view.getState(f),null!=l&&(null==R||!R(l,B,H))&&this.intersects(l,B,H)))return f}return null};Graph.prototype.isRecursiveVertexResize=function(B){return!this.isSwimlane(B.cell)&&0<this.model.getChildCount(B.cell)&&!this.isCellCollapsed(B.cell)&&"1"==mxUtils.getValue(B.style,"recursiveResize",-"1")&&null==mxUtils.getValue(B.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(B){for(var H=this.getCellGeometry(B);null!=H&&H.relative;)B=this.getModel().getParent(B),H=this.getCellGeometry(B);return B};Graph.prototype.isPart=function(B){return"1"==mxUtils.getValue(this.getCurrentCellStyle(B),"part","0")||this.isTableCell(B)||this.isTableRow(B)};Graph.prototype.getCompositeParents=function(B){for(var H=new mxDictionary,T=[],G=0;G<B.length;G++){var P=this.getCompositeParent(B[G]);-this.isTableCell(P)&&(P=this.graph.model.getParent(P));this.isTableRow(P)&&(P=this.graph.model.getParent(P));null==P||H.get(P)||(H.put(P,!0),T.push(P))}return T};Graph.prototype.getReferenceTerminal=function(B){if(null!=B){var H=this.getCellGeometry(B);null!=H&&H.relative&&(B=this.model.getParent(B))}null!=B&&this.model.isEdge(B)&&(B=this.model.getParent(B));null!=B&&(B=this.getCompositeParent(B));return B};Graph.prototype.getCompositeParent=function(B){for(;this.isPart(B);){var H=this.model.getParent(B);-if(!this.model.isVertex(H))break;B=H}return B};Graph.prototype.filterSelectionCells=function(B){var H=this.getSelectionCells();if(null!=B){for(var T=[],G=0;G<H.length;G++)B(H[G])||T.push(H[G]);H=T}return H};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(B){if(this.useCssTransforms){var H=this.currentScale,T=this.currentTranslate;B=new mxRectangle((B.x+2*T.x)*H-T.x,(B.y+2*T.y)*H-T.y,B.width*H,B.height*H)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=-function(B){B=this.strokeWidth;this.graph.useCssTransforms&&(B/=this.graph.currentScale);return B};mxGraphView.prototype.getGraphBounds=function(){var B=this.graphBounds;if(this.graph.useCssTransforms){var H=this.graph.currentTranslate,T=this.graph.currentScale;B=new mxRectangle((B.x+H.x)*T,(B.y+H.y)*T,B.width*T,B.height*T)}return B};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;+function(B){return"1"==mxUtils.getValue(B.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(B){return null!=mxUtils.getValue(B.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(B){return!0};Graph.prototype.getVerticesAndEdges=function(B,H){B=null!=B?B:!0;H=null!=H?H:!0;var S=this.model;return S.filterDescendants(function(G){return B&&S.isVertex(G)||H&&S.isEdge(G)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=function(B,H,S){B=this.getCellStyle(B).newEdgeStyle;+if(null!=B){this.model.beginUpdate();try{var G=JSON.parse(B),P;for(P in G)this.setCellStyles(P,G[P],H),"edgeStyle"==P&&"elbowEdgeStyle"==G[P]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",H)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(B){for(var H={},S=0;S<B.length;S++){var G=this.view.getState(B[S]);null!=G&&this.mergeStyle(G.style,H,0==S)}return H};Graph.prototype.mergeStyle=function(B,H,S){if(null!=+B){var G={},P;for(P in B){var Q=B[P];null!=Q&&(G[P]=!0,null==H[P]&&S?H[P]=Q:H[P]!=Q&&delete H[P])}for(P in H)G[P]||delete H[P]}};Graph.prototype.getStartEditingCell=function(B,H){H=this.getCellStyle(B);H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,0));this.isTable(B)&&(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B)&&(B=this.model.getChildAt(B,0),H=this.getCellStyle(B),H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(B)&&+(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B))for(H=0;H<this.model.getChildCount(B);H++){var S=this.model.getChildAt(B,H);if(this.isCellEditable(S)){B=S;break}}return B};Graph.prototype.copyStyle=function(B){return this.getCellStyle(B,!1)};Graph.prototype.pasteStyle=function(B,H,S,G){null!=B&&(G||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(B,function(P){return 0>mxUtils.indexOf(S,P)})),this.updateCellStyles(B,H))};Graph.prototype.copyCellStyles=function(B,H,S,+G,P,Q,c){var f=!1,l=!1;if(0<B.length)for(var t=0;t<B.length&&(f=this.getModel().isVertex(B[t])||f,!(l=this.getModel().isEdge(B[t])||l)||!f);t++);else l=f=!0;f=f&&!Q;l=l&&!c;for(t=0;t<H.length;t++)if(B=0<=mxUtils.indexOf(Graph.textStyles,H[t]),"strokeColor"!=H[t]||null!=S[t]&&"none"!=S[t])if(0<=mxUtils.indexOf(Graph.cellStyles,H[t])||"shape"==H[t])if("shape"!=H[t]&&(f||B)&&(null==S[t]?delete G[H[t]]:G[H[t]]=S[t]),l||B)null==S[t]?delete P[H[t]]:P[H[t]]=S[t]};Graph.prototype.includeDescendants=function(B){for(var H=+[],S=0;S<B.length;S++)H=H.concat(this.model.getDescendants(B[S]));return H};Graph.prototype.pasteCellStyles=function(B,H,S,G,P){H=null!=H?H:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;P=null!=P?P:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var Q=0;Q<B.length;Q++){var c=B[Q],f=this.model.getStyle(c),l=!1;null!=c.style&&(pairs=c.style.split(";"),l=l||0<=mxUtils.indexOf(pairs,"text"));if(l)var t=Graph.textStyles;else if(t=Graph.cellStyles.slice(),!G)for(var z=null!=f?f.split(";"):+[],C=0;C<z.length;C++){var F=z[C],N=F.indexOf("=");if(0<=N){var K=F.substring(0,N),J=mxUtils.indexOf(t,K);0<=J&&t.splice(J,1);for(l=0;l<Graph.cellStyleGroups.length;l++){var da=Graph.cellStyleGroups[l];if(0<=mxUtils.indexOf(da,K))for(var ea=0;ea<da.length;ea++){var ca=mxUtils.indexOf(t,da[ea]);0<=ca&&t.splice(ca,1)}}}}var X=this.model.isEdge(c);l=X?S:H;for(C=0;C<t.length;C++){K=t[C];var aa=l[K];null!=aa&&("edgeStyle"!=K||P)&&(X||!X&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(f=mxUtils.setStyle(f,K,+aa),"fontFamily"==K&&null==l.fontSource&&(f=mxUtils.setStyle(f,"fontSource",null)),X&&"rounded"==K&&"1"==aa&&null==l.curved&&(f=mxUtils.setStyle(f,"curved",null)))}Editor.simpleLabels&&(f=mxUtils.setStyle(mxUtils.setStyle(f,"html",null),"whiteSpace",null));this.model.setStyle(c,f)}}finally{this.model.endUpdate()}return B};Graph.prototype.updateCellStyles=function(B,H){this.model.beginUpdate();try{for(var S=0;S<H.length;S++)if(this.model.isVertex(H[S])||this.model.isEdge(H[S])){var G=this.getCellStyle(H[S],+!1),P=G[mxConstants.STYLE_PERIMETER],Q=!1;for(f in B){var c=B[f];if(G[f]!=c){if(f==mxConstants.STYLE_SHAPE&&"umlLifeline"==G[f]&&"umlLifeline"!=c){Q=!0;var f="participant"}this.setCellStyles(f,c,[H[S]])}}Q&&this.setCellStyles(mxConstants.STYLE_PERIMETER,P,[H[S]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=+function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(B,H,S,G,P,Q){this.useCssTransforms&&(B=B/this.currentScale-this.currentTranslate.x,H=H/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(B,H,S,G,P,Q){G=null!=G?G:!0;P=null!=P?P:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var c=+this.model.getChildCount(S)-1;0<=c;c--){var f=this.model.getChildAt(S,c),l=this.getScaledCellAt(B,H,f,G,P,Q);if(null!=l)return l;if(this.isCellVisible(f)&&(P&&this.model.isEdge(f)||G&&this.model.isVertex(f))&&(l=this.view.getState(f),null!=l&&(null==Q||!Q(l,B,H))&&this.intersects(l,B,H)))return f}return null};Graph.prototype.isRecursiveVertexResize=function(B){return!this.isSwimlane(B.cell)&&0<this.model.getChildCount(B.cell)&&!this.isCellCollapsed(B.cell)&&"1"==mxUtils.getValue(B.style,"recursiveResize",+"1")&&null==mxUtils.getValue(B.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(B){for(var H=this.getCellGeometry(B);null!=H&&H.relative;)B=this.getModel().getParent(B),H=this.getCellGeometry(B);return B};Graph.prototype.isPart=function(B){return"1"==mxUtils.getValue(this.getCurrentCellStyle(B),"part","0")||this.isTableCell(B)||this.isTableRow(B)};Graph.prototype.getCompositeParents=function(B){for(var H=new mxDictionary,S=[],G=0;G<B.length;G++){var P=this.getCompositeParent(B[G]);+this.isTableCell(P)&&(P=this.graph.model.getParent(P));this.isTableRow(P)&&(P=this.graph.model.getParent(P));null==P||H.get(P)||(H.put(P,!0),S.push(P))}return S};Graph.prototype.getReferenceTerminal=function(B){if(null!=B){var H=this.getCellGeometry(B);null!=H&&H.relative&&(B=this.model.getParent(B))}null!=B&&this.model.isEdge(B)&&(B=this.model.getParent(B));null!=B&&(B=this.getCompositeParent(B));return B};Graph.prototype.getCompositeParent=function(B){for(;this.isPart(B);){var H=this.model.getParent(B);+if(!this.model.isVertex(H))break;B=H}return B};Graph.prototype.filterSelectionCells=function(B){var H=this.getSelectionCells();if(null!=B){for(var S=[],G=0;G<H.length;G++)B(H[G])||S.push(H[G]);H=S}return H};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(B){if(this.useCssTransforms){var H=this.currentScale,S=this.currentTranslate;B=new mxRectangle((B.x+2*S.x)*H-S.x,(B.y+2*S.y)*H-S.y,B.width*H,B.height*H)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=+function(B){B=this.strokeWidth;this.graph.useCssTransforms&&(B/=this.graph.currentScale);return B};mxGraphView.prototype.getGraphBounds=function(){var B=this.graphBounds;if(this.graph.useCssTransforms){var H=this.graph.currentTranslate,S=this.graph.currentScale;B=new mxRectangle((B.x+H.x)*S,(B.y+H.y)*S,B.width*S,B.height*S)}return B};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=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);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var g=mxGraph.prototype.getCellsForGroup;-Graph.prototype.getCellsForGroup=function(B){B=g.apply(this,arguments);for(var H=[],T=0;T<B.length;T++)this.isTableRow(B[T])||this.isTableCell(B[T])||H.push(B[T]);return H};var m=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(B){B=m.apply(this,arguments);for(var H=[],T=0;T<B.length;T++)this.isTable(B[T])||this.isTableRow(B[T])||this.isTableCell(B[T])||H.push(B[T]);return H};Graph.prototype.updateCssTransform=function(){var B=this.view.getDrawPane();if(null!=B)if(B=-B.parentNode,this.useCssTransforms){var H=B.getAttribute("transform");B.setAttribute("transformOrigin","0 0");var T=Math.round(100*this.currentScale)/100;B.setAttribute("transform","scale("+T+","+T+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");H!=B.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",B.getAttribute("transform"))}else B.removeAttribute("transformOrigin"),B.removeAttribute("transform")};-var u=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var B=this.graph.useCssTransforms,H=this.scale,T=this.translate;B&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);u.apply(this,arguments);B&&(this.scale=H,this.translate=T)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(B,H,T){var G=this.useCssTransforms,P=this.view.scale,R=this.view.translate;G&&(this.view.scale=1,this.view.translate=-new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);G&&(this.view.scale=P,this.view.translate=R,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};+Graph.prototype.getCellsForGroup=function(B){B=g.apply(this,arguments);for(var H=[],S=0;S<B.length;S++)this.isTableRow(B[S])||this.isTableCell(B[S])||H.push(B[S]);return H};var m=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(B){B=m.apply(this,arguments);for(var H=[],S=0;S<B.length;S++)this.isTable(B[S])||this.isTableRow(B[S])||this.isTableCell(B[S])||H.push(B[S]);return H};Graph.prototype.updateCssTransform=function(){var B=this.view.getDrawPane();if(null!=B)if(B=+B.parentNode,this.useCssTransforms){var H=B.getAttribute("transform");B.setAttribute("transformOrigin","0 0");var S=Math.round(100*this.currentScale)/100;B.setAttribute("transform","scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");H!=B.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",B.getAttribute("transform"))}else B.removeAttribute("transformOrigin"),B.removeAttribute("transform")};+var u=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var B=this.graph.useCssTransforms,H=this.scale,S=this.translate;B&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);u.apply(this,arguments);B&&(this.scale=H,this.translate=S)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(B,H,S){var G=this.useCssTransforms,P=this.view.scale,Q=this.view.translate;G&&(this.view.scale=1,this.view.translate=+new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);G&&(this.view.scale=P,this.view.translate=Q,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,e,g){var m=e.getAttribute("href");m!=Graph.sanitizeLink(m)&&Graph.sanitizeNode(e);if(null!=m&&!this.isCustomLink(m)&&(mxEvent.isLeftMouseButton(g)&&!mxEvent.isPopupTrigger(g)||mxEvent.isTouchEvent(g))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(m)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(m),b);mxEvent.consume(g)}};Graph.prototype.openLink=function(b,e,g){var m=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var u=b.split("#")[1];window.location.hash=="#"+u&&(window.location.hash="");window.location.hash=u}else m=window.open(b,null!=e?e:"_blank",g?null:"noopener,noreferrer"),null==m||g||(m.opener=null)}catch(p){}return m};Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b,e){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};@@ -2393,7 +2393,7 @@ Graph.prototype.createLayouts=function(b){for(var e=[],g=0;g<b.length;g++)if(0<=Graph.prototype.getDataForCells=function(b,e){for(var g=[],m=0;m<b.length;m++){var u={};u.id=b[m].id;var p=null!=b[m].value?b[m].value.attributes:null;this.isReplacePlaceholders(b[m])&&e&&(u.value=this.getLabel(b[m]));if(null!=p)for(var B=0;B<p.length;B++)u[p[B].nodeName]=p[B].nodeValue;else u.label=this.convertValueToString(b[m]);g.push(u)}return g};Graph.prototype.getNodesForCells=function(b){for(var e=[],g=0;g<b.length;g++){var m=this.view.getState(b[g]);if(null!=m){for(var u=this.cellRenderer.getShapesForState(m),p=0;p<u.length;p++)null!=u[p]&&null!=u[p].node&&e.push(u[p].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e};Graph.prototype.createWipeAnimations=function(b,e){for(var g=[],m=0;m<b.length;m++){var u=this.view.getState(b[m]);null!=u&&null!=u.shape&&(this.model.isEdge(u.cell)&&null!=u.absolutePoints&&1<u.absolutePoints.length?g.push(this.createEdgeWipeAnimation(u,e)):this.model.isVertex(u.cell)&&null!=u.shape.bounds&&g.push(this.createVertexWipeAnimation(u,e)))}return g};-Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),m=b.segments,u=b.length,p=g.length;return{execute:mxUtils.bind(this,function(B,H){if(null!=b.shape){var T=[g[0]];H=B/H;e||(H=1-H);for(var G=u*H,P=1;P<p;P++)if(G<=m[P-1]){T.push(new mxPoint(g[P-1].x+(g[P].x-g[P-1].x)*G/m[P-1],g[P-1].y+(g[P].y-g[P-1].y)*G/m[P-1]));break}else G-=m[P-1],T.push(g[P]);b.shape.points=T;b.shape.redraw();0==B&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=+Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),m=b.segments,u=b.length,p=g.length;return{execute:mxUtils.bind(this,function(B,H){if(null!=b.shape){var S=[g[0]];H=B/H;e||(H=1-H);for(var G=u*H,P=1;P<p;P++)if(G<=m[P-1]){S.push(new mxPoint(g[P-1].x+(g[P].x-g[P-1].x)*G/m[P-1],g[P-1].y+(g[P].y-g[P-1].y)*G/m[P-1]));break}else G-=m[P-1],S.push(g[P]);b.shape.points=S;b.shape.redraw();0==B&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=H)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.createVertexWipeAnimation=function(b,e){var g=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,u){null!=b.shape&&(u=m/u,e||(u=1-u),b.shape.bounds=new mxRectangle(g.x,g.y,g.width*u,g.height),b.shape.redraw(),0==m&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=u))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,g,m){g=null!=g?g:30;m=null!=m?m:30;var u=null,p=0,B=mxUtils.bind(this,function(){if(p==g||this.stoppingCustomActions){window.clearInterval(u);for(var H=0;H<b.length;H++)b[H].stop();null!=e&&e()}else for(H=0;H<b.length;H++)b[H].execute(p,g);p++});u=window.setInterval(B,m);B()};@@ -2408,17 +2408,17 @@ Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);retGraph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};Graph.prototype.formatDate=function(b,e,g){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 m=this.dateFormatCache,u=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,B=function(C,F){C=String(C);for(F=F||2;C.length<F;)C="0"+C;return C};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||-/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var H=g?"getUTC":"get",T=b[H+"Date"](),G=b[H+"Day"](),P=b[H+"Month"](),R=b[H+"FullYear"](),c=b[H+"Hours"](),f=b[H+"Minutes"](),l=b[H+"Seconds"]();H=b[H+"Milliseconds"]();var t=g?0:b.getTimezoneOffset(),z={d:T,dd:B(T),ddd:m.i18n.dayNames[G],dddd:m.i18n.dayNames[G+7],m:P+1,mm:B(P+1),mmm:m.i18n.monthNames[P],mmmm:m.i18n.monthNames[P+-12],yy:String(R).slice(2),yyyy:R,h:c%12||12,hh:B(c%12||12),H:c,HH:B(c),M:f,MM:B(f),s:l,ss:B(l),l:B(H,3),L:B(99<H?Math.round(H/10):H),t:12>c?"a":"p",tt:12>c?"am":"pm",T:12>c?"A":"P",TT:12>c?"AM":"PM",Z:g?"UTC":(String(b).match(u)||[""]).pop().replace(p,""),o:(0<t?"-":"+")+B(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<T%10?0:(10!=T%100-T%10)*T%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(C){return C in z?z[C]:C.slice(1,+/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var H=g?"getUTC":"get",S=b[H+"Date"](),G=b[H+"Day"](),P=b[H+"Month"](),Q=b[H+"FullYear"](),c=b[H+"Hours"](),f=b[H+"Minutes"](),l=b[H+"Seconds"]();H=b[H+"Milliseconds"]();var t=g?0:b.getTimezoneOffset(),z={d:S,dd:B(S),ddd:m.i18n.dayNames[G],dddd:m.i18n.dayNames[G+7],m:P+1,mm:B(P+1),mmm:m.i18n.monthNames[P],mmmm:m.i18n.monthNames[P++12],yy:String(Q).slice(2),yyyy:Q,h:c%12||12,hh:B(c%12||12),H:c,HH:B(c),M:f,MM:B(f),s:l,ss:B(l),l:B(H,3),L:B(99<H?Math.round(H/10):H),t:12>c?"a":"p",tt:12>c?"am":"pm",T:12>c?"A":"P",TT:12>c?"AM":"PM",Z:g?"UTC":(String(b).match(u)||[""]).pop().replace(p,""),o:(0<t?"-":"+")+B(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(C){return C in z?z[C]:C.slice(1,C.length-1)})};Graph.prototype.getLayerForCell=function(b){for(;null!=b&&!this.model.isLayer(b);)b=this.model.getParent(b);return b};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){e=this.getLayerForCell(b[0]);for(var g=1;g<b.length;g++)if(!this.model.isAncestor(e,b[g])){e=null;break}}return e};-Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var m=this.getModel(),u=m.getChildCount(m.root),p=0;p<u;p++)mxUtils.bind(this,function(B){function H(){m.isVisible(B)?(P.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(G,75)):(P.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(G,25))}var T=this.convertValueToString(B)||mxResources.get("background")||"Background",G=document.createElement("div");G.style.overflow=-"hidden";G.style.textOverflow="ellipsis";G.style.padding="2px";G.style.whiteSpace="nowrap";G.style.cursor="pointer";G.setAttribute("title",mxResources.get(m.isVisible(B)?"hideIt":"show",[T]));var P=document.createElement("img");P.setAttribute("draggable","false");P.setAttribute("align","absmiddle");P.setAttribute("border","0");P.style.position="relative";P.style.width="16px";P.style.padding="0px 6px 0 4px";e&&(P.style.filter="invert(100%)",P.style.top="-2px");G.appendChild(P);mxUtils.write(G,T);g.appendChild(G);+Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var m=this.getModel(),u=m.getChildCount(m.root),p=0;p<u;p++)mxUtils.bind(this,function(B){function H(){m.isVisible(B)?(P.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(G,75)):(P.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(G,25))}var S=this.convertValueToString(B)||mxResources.get("background")||"Background",G=document.createElement("div");G.style.overflow=+"hidden";G.style.textOverflow="ellipsis";G.style.padding="2px";G.style.whiteSpace="nowrap";G.style.cursor="pointer";G.setAttribute("title",mxResources.get(m.isVisible(B)?"hideIt":"show",[S]));var P=document.createElement("img");P.setAttribute("draggable","false");P.setAttribute("align","absmiddle");P.setAttribute("border","0");P.style.position="relative";P.style.width="16px";P.style.padding="0px 6px 0 4px";e&&(P.style.filter="invert(100%)",P.style.top="-2px");G.appendChild(P);mxUtils.write(G,S);g.appendChild(G);mxEvent.addListener(G,"click",function(){m.setVisible(B,!m.isVisible(B));H();null!=b&&b(B)});H()})(m.getChildAt(m.root,p));return g};-Graph.prototype.replacePlaceholders=function(b,e,g,m){m=[];if(null!=e){for(var u=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var B=null;if(match.index>u&&"%"==e.charAt(match.index-1))B=p.substring(1);else{var H=p.substring(1,p.length-1),T={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==H)B=b.id;else if("width"===H.substring(0,5)&&this.model.isVertex(b)){var G=this.getCellGeometry(b);-null!=G&&(B=G.width,5<H.length&&(B=Editor.toUnit(B,T[H.substring(6)])))}else if("height"==H.substring(0,6)&&this.model.isVertex(b))G=this.getCellGeometry(b),null!=G&&(B=G.height,6<H.length&&(B=Editor.toUnit(B,T[H.substring(7)])));else if("length"==H.substring(0,6)){for(G=b;null!=G&&!this.model.isEdge(G);)G=this.model.getParent(G);G=this.view.getState(G);null!=G&&(B=Math.round(G.length/this.view.scale),6<H.length&&(B=Editor.toUnit(B,T[H.substring(7)])))}else if(0>H.indexOf("{"))for(T=b;null==B&&null!=-T;)null!=T.value&&"object"==typeof T.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(B=T.getAttribute(H+"_"+Graph.diagramLanguage)),null==B&&(B=T.hasAttribute(H)?null!=T.getAttribute(H)?T.getAttribute(H):"":null)),T=this.model.getParent(T);null==B&&(B=this.getGlobalVariable(H));null==B&&null!=g&&(B=g[H])}m.push(e.substring(u,match.index)+(null!=B?B:p));u=match.index+p.length}}m.push(e.substring(u))}return m.join("")};+Graph.prototype.replacePlaceholders=function(b,e,g,m){m=[];if(null!=e){for(var u=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var B=null;if(match.index>u&&"%"==e.charAt(match.index-1))B=p.substring(1);else{var H=p.substring(1,p.length-1),S={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==H)B=b.id;else if("width"===H.substring(0,5)&&this.model.isVertex(b)){var G=this.getCellGeometry(b);+null!=G&&(B=G.width,5<H.length&&(B=Editor.toUnit(B,S[H.substring(6)])))}else if("height"==H.substring(0,6)&&this.model.isVertex(b))G=this.getCellGeometry(b),null!=G&&(B=G.height,6<H.length&&(B=Editor.toUnit(B,S[H.substring(7)])));else if("length"==H.substring(0,6)){for(G=b;null!=G&&!this.model.isEdge(G);)G=this.model.getParent(G);G=this.view.getState(G);null!=G&&(B=Math.round(G.length/this.view.scale),6<H.length&&(B=Editor.toUnit(B,S[H.substring(7)])))}else if(0>H.indexOf("{"))for(S=b;null==B&&null!=+S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(B=S.getAttribute(H+"_"+Graph.diagramLanguage)),null==B&&(B=S.hasAttribute(H)?null!=S.getAttribute(H)?S.getAttribute(H):"":null)),S=this.model.getParent(S);null==B&&(B=this.getGlobalVariable(H));null==B&&null!=g&&(B=g[H])}m.push(e.substring(u,match.index)+(null!=B?B:p));u=match.index+p.length}}m.push(e.substring(u))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],g=0;g<b.length;g++){var m=this.model.getCell(b[g].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()};Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};-Graph.prototype.selectTableRange=function(b,e){var g=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),u=this.model.getParent(m),p=this.model.getParent(e);if(u==this.model.getParent(p)){b=m.getIndex(b);m=u.getIndex(m);var B=p.getIndex(e),H=u.getIndex(p);p=Math.max(m,H);e=Math.min(b,B);b=Math.max(b,B);B=[];for(m=Math.min(m,H);m<=p;m++){H=this.model.getChildAt(u,m);for(var T=e;T<=b;T++)B.push(this.model.getChildAt(H,T))}0<B.length&&(1<B.length||1<this.getSelectionCount()||+Graph.prototype.selectTableRange=function(b,e){var g=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),u=this.model.getParent(m),p=this.model.getParent(e);if(u==this.model.getParent(p)){b=m.getIndex(b);m=u.getIndex(m);var B=p.getIndex(e),H=u.getIndex(p);p=Math.max(m,H);e=Math.min(b,B);b=Math.max(b,B);B=[];for(m=Math.min(m,H);m<=p;m++){H=this.model.getChildAt(u,m);for(var S=e;S<=b;S++)B.push(this.model.getChildAt(H,S))}0<B.length&&(1<B.length||1<this.getSelectionCount()||!this.isCellSelected(B[0]))&&(this.setSelectionCells(B),g=!0)}}return g};Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var g=0;g<b.length;g++){var m=b[g],u=this.getCellGeometry(m);if(null!=u){u=u.clone();if(this.getModel().isVertex(m))u.x=Math.round(u.x/e)*e,u.y=Math.round(u.y/e)*e,u.width=Math.round(u.width/e)*e,u.height=Math.round(u.height/e)*e;else if(this.getModel().isEdge(m)&&null!=u.points)for(var p=0;p<u.points.length;p++)u.points[p].x=Math.round(u.points[p].x/e)*e,u.points[p].y=Math.round(u.points[p].y/e)*e;this.getModel().setGeometry(m,u)}}}finally{this.getModel().endUpdate()}};Graph.prototype.removeChildCells=function(b){this.model.beginUpdate();try{for(var e=this.model.getChildCount(b);0<=e;e--)this.model.remove(this.model.getChildAt(b,e))}finally{this.model.endUpdate()}};@@ -2426,13 +2426,13 @@ Graph.prototype.updateShapes=function(b,e,g){this.model.beginUpdate();try{var m=this.model.isEdge(b)&&this.model.isEdge(e[p]))if(g){var B=this.model.getStyle(e[p]);if(null!=B){var H=B.split(";");0<H.length&&0>H[0].indexOf("=")&&(H=H.slice(1));this.model.setStyle(e[p],H.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[e[p]]);this.setCellStyles("points",null,[e[p]]);this.pasteStyle(u,[e[p]],null,!0)}else u=this.copyStyle(e[p]),this.model.setStyle(e[p],m),this.pasteStyle(u,[e[p]]);"1"==mxUtils.getValue(this.getCellStyle(e[p],!1),"composite","0")&&this.removeChildCells(e[p])}}finally{this.model.endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,g){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=g&&(mxEvent.isTouchEvent(e)?g.update(g.getState(this.view.getState(b[1]))):g.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};Graph.prototype.insertEdgeBeforeCell=function(b,e){for(var g=e;null!=g.parent&&null!=g.geometry&&g.geometry.relative&&g.parent!=b.parent;)g=this.model.getParent(g);null!=g&&null!=g.parent&&g.parent==b.parent&&(e=g.parent.getIndex(g),this.model.add(g.parent,b,e))};-Graph.prototype.connectVertex=function(b,e,g,m,u,p,B,H){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var T=this.isCloneConnectSource(b),G=T?b:this.getCompositeParent(b),P=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(G.geometry.x,G.geometry.y);e==mxConstants.DIRECTION_NORTH?(P.x+=G.geometry.width/2,P.y-=g):e==-mxConstants.DIRECTION_SOUTH?(P.x+=G.geometry.width/2,P.y+=G.geometry.height+g):(P.x=e==mxConstants.DIRECTION_WEST?P.x-g:P.x+(G.geometry.width+g),P.y+=G.geometry.height/2);var R=this.view.getState(this.model.getParent(b));g=this.view.scale;var c=this.view.translate;G=c.x*g;c=c.y*g;null!=R&&this.model.isVertex(R.cell)&&(G=R.x,c=R.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(P.x+=b.parent.geometry.x,P.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(G+P.x*g,c+P.y*g)).grow(40*g);p=null!=p?-this.getCells(0,0,0,0,null,null,p,null,!0):null;R=this.view.getState(b);var f=null,l=null;if(null!=p){p=p.reverse();for(var t=0;t<p.length;t++)if(!this.isCellLocked(p[t])&&!this.model.isEdge(p[t])&&p[t]!=b)if(!this.model.isAncestor(b,p[t])&&this.isContainer(p[t])&&(null==f||p[t]==this.model.getParent(b)))f=p[t];else if(null==l&&this.isCellConnectable(p[t])&&!this.model.isAncestor(p[t],b)&&!this.isSwimlane(p[t])){var z=this.view.getState(p[t]);null==R||null==z||mxUtils.intersects(R,z)||(l=p[t])}}var C=-!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||u;C&&("1"!=urlParams.sketch||u)&&(e==mxConstants.DIRECTION_NORTH?P.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?P.y+=b.geometry.height/2:P.x=e==mxConstants.DIRECTION_WEST?P.x-b.geometry.width/2:P.x+b.geometry.width/2);var F=[],N=l;l=f;u=mxUtils.bind(this,function(K){if(null==B||null!=K||null==l&&T){this.model.beginUpdate();try{if(null==N&&C){var J=this.getAbsoluteParent(null!=K?K:b);J=T?b:this.getCompositeParent(J);N=null!=K?K:this.duplicateCells([J],-!1)[0];null!=K&&this.addCells([N],this.model.getParent(b),null,null,null,!0);var da=this.getCellGeometry(N);null!=da&&(null!=K&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?P.y-=da.height/2:e==mxConstants.DIRECTION_SOUTH?P.y+=da.height/2:P.x=e==mxConstants.DIRECTION_WEST?P.x-da.width/2:P.x+da.width/2),da.x=P.x-da.width/2,da.y=P.y-da.height/2);null!=f?(this.addCells([N],f,null,null,null,!0),l=null):C&&!T&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var ea=mxEvent.isControlDown(m)&&-mxEvent.isShiftDown(m)&&C||null==l&&T?null:this.insertEdge(this.model.getParent(b),null,"",b,N,this.createCurrentEdgeStyle());null!=ea&&(F.push(ea),this.applyNewEdgeStyle(b,[ea],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ea,b));if(null==l&&null!=N&&null!=b.parent&&T&&e==mxConstants.DIRECTION_WEST){var ca=b.parent.getIndex(b);this.model.add(b.parent,N,ca)}null==l&&null!=N&&F.push(N);null==N&&null!=ea&&ea.geometry.setTerminalPoint(P,!1);null!=ea&&this.fireEvent(new mxEventObject("cellsInserted",-"cells",[ea]))}finally{this.model.endUpdate()}}if(null!=H)H(F);else return F});if(null==B||null!=N||!C||null==l&&T)return u(N);B(G+P.x*g,c+P.y*g,u)};+Graph.prototype.connectVertex=function(b,e,g,m,u,p,B,H){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),G=S?b:this.getCompositeParent(b),P=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(G.geometry.x,G.geometry.y);e==mxConstants.DIRECTION_NORTH?(P.x+=G.geometry.width/2,P.y-=g):e==+mxConstants.DIRECTION_SOUTH?(P.x+=G.geometry.width/2,P.y+=G.geometry.height+g):(P.x=e==mxConstants.DIRECTION_WEST?P.x-g:P.x+(G.geometry.width+g),P.y+=G.geometry.height/2);var Q=this.view.getState(this.model.getParent(b));g=this.view.scale;var c=this.view.translate;G=c.x*g;c=c.y*g;null!=Q&&this.model.isVertex(Q.cell)&&(G=Q.x,c=Q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(P.x+=b.parent.geometry.x,P.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(G+P.x*g,c+P.y*g)).grow(40*g);p=null!=p?+this.getCells(0,0,0,0,null,null,p,null,!0):null;Q=this.view.getState(b);var f=null,l=null;if(null!=p){p=p.reverse();for(var t=0;t<p.length;t++)if(!this.isCellLocked(p[t])&&!this.model.isEdge(p[t])&&p[t]!=b)if(!this.model.isAncestor(b,p[t])&&this.isContainer(p[t])&&(null==f||p[t]==this.model.getParent(b)))f=p[t];else if(null==l&&this.isCellConnectable(p[t])&&!this.model.isAncestor(p[t],b)&&!this.isSwimlane(p[t])){var z=this.view.getState(p[t]);null==Q||null==z||mxUtils.intersects(Q,z)||(l=p[t])}}var C=+!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||u;C&&("1"!=urlParams.sketch||u)&&(e==mxConstants.DIRECTION_NORTH?P.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?P.y+=b.geometry.height/2:P.x=e==mxConstants.DIRECTION_WEST?P.x-b.geometry.width/2:P.x+b.geometry.width/2);var F=[],N=l;l=f;u=mxUtils.bind(this,function(K){if(null==B||null!=K||null==l&&S){this.model.beginUpdate();try{if(null==N&&C){var J=this.getAbsoluteParent(null!=K?K:b);J=S?b:this.getCompositeParent(J);N=null!=K?K:this.duplicateCells([J],+!1)[0];null!=K&&this.addCells([N],this.model.getParent(b),null,null,null,!0);var da=this.getCellGeometry(N);null!=da&&(null!=K&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?P.y-=da.height/2:e==mxConstants.DIRECTION_SOUTH?P.y+=da.height/2:P.x=e==mxConstants.DIRECTION_WEST?P.x-da.width/2:P.x+da.width/2),da.x=P.x-da.width/2,da.y=P.y-da.height/2);null!=f?(this.addCells([N],f,null,null,null,!0),l=null):C&&!S&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var ea=mxEvent.isControlDown(m)&&+mxEvent.isShiftDown(m)&&C||null==l&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,N,this.createCurrentEdgeStyle());null!=ea&&(F.push(ea),this.applyNewEdgeStyle(b,[ea],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ea,b));if(null==l&&null!=N&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST){var ca=b.parent.getIndex(b);this.model.add(b.parent,N,ca)}null==l&&null!=N&&F.push(N);null==N&&null!=ea&&ea.geometry.setTerminalPoint(P,!1);null!=ea&&this.fireEvent(new mxEventObject("cellsInserted",+"cells",[ea]))}finally{this.model.endUpdate()}}if(null!=H)H(F);else return F});if(null==B||null!=N||!C||null==l&&S)return u(N);B(G+P.x*g,c+P.y*g,u)};Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),g=[],m,u=0;u<b.length;u++)if(m=b[u],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=Graph.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&g.push(m);return g.join(" ")};Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var g=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==g&&null!=m;)null!=m.value&&"object"==typeof m.value&&(g=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else g=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(g=e.getAttribute("label_"+Graph.diagramLanguage)),null==g&&(g=e.getAttribute("label")||"");return g||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b,e){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),e||(b=mxUtils.removeJavascriptProtocol(b)),b):null};@@ -2443,8 +2443,8 @@ mxConstants.STYLE_IMAGE_BACKGROUND,b);this.replaceDefaultColor(e,mxConstants.STYGraph.prototype.getDefaultColor=function(b,e,g){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(b=mxUtils.getLightDarkColor(g),g="light-dark("+b.dark+", "+b.light+")");return g};Graph.prototype.setAdaptiveColors=function(b){this.adaptiveColors="default"==b?null:b;"1"==urlParams.embedInline?null!=this.container&&(this.container.style.colorScheme="none"==this.getAdaptiveColors()?"light":""):(b=this.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.colorScheme="none"==this.getAdaptiveColors()?"light":""))};Graph.prototype.getAdaptiveColors=function(){return null!=this.adaptiveColors?this.adaptiveColors:Graph.defaultAdaptiveColors};Graph.prototype.updateAlternateBounds=function(b,e,g){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var m=this.layoutManager.getLayout(this.model.getParent(b));null!=m&&m.constructor==mxStackLayout&&(m.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};-Graph.prototype.foldCells=function(b,e,g,m,u){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<g.length;p++){var B=this.view.getState(g[p]),H=this.getCellGeometry(g[p]);if(null!=B&&null!=H){var T=0,G=0;if(H.alternateBounds)T=H.width-H.alternateBounds.width,G=H.height-H.alternateBounds.height;else{var P=this.useCssTransforms?1:this.view.scale;-T=Math.round(H.width-B.width/P);G=Math.round(H.height-B.height/P)}if(0!=G||0!=T){var R=this.model.getParent(g[p]),c=this.layoutManager.getLayout(R);null==c?null!=u&&this.isMoveCellsEvent(u,B)&&this.moveSiblings(B,R,T,G):null!=u&&mxEvent.isAltDown(u)||c.constructor!=mxStackLayout||c.resizeLast||this.resizeParentStacks(R,c,T,G)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};+Graph.prototype.foldCells=function(b,e,g,m,u){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<g.length;p++){var B=this.view.getState(g[p]),H=this.getCellGeometry(g[p]);if(null!=B&&null!=H){var S=0,G=0;if(H.alternateBounds)S=H.width-H.alternateBounds.width,G=H.height-H.alternateBounds.height;else{var P=this.useCssTransforms?1:this.view.scale;+S=Math.round(H.width-B.width/P);G=Math.round(H.height-B.height/P)}if(0!=G||0!=S){var Q=this.model.getParent(g[p]),c=this.layoutManager.getLayout(Q);null==c?null!=u&&this.isMoveCellsEvent(u,B)&&this.moveSiblings(B,Q,S,G):null!=u&&mxEvent.isAltDown(u)||c.constructor!=mxStackLayout||c.resizeLast||this.resizeParentStacks(Q,c,S,G)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};Graph.prototype.moveSiblings=function(b,e,g,m){this.model.beginUpdate();try{var u=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<u.length;e++)if(u[e]!=b.cell){var p=this.view.getState(u[e]),B=this.getCellGeometry(u[e]);null!=p&&null!=B&&(B=B.clone(),B.translate(Math.round(g*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(u[e],B))}}finally{this.model.endUpdate()}};Graph.prototype.resizeParentStacks=function(b,e,g,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var u=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==u&&!e.resizeLast;){var p=this.getCellGeometry(b),B=this.view.getState(b);null!=B&&null!=p&&(p=p.clone(),e.horizontal?p.width+=g+Math.min(0,B.width/this.view.scale-p.width):p.height+=m+Math.min(0,B.height/this.view.scale-p.height),this.model.setGeometry(b,p));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return!this.isCellLocked(this.getLayerForCell(b))&&(null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments))};@@ -2486,10 +2486,10 @@ HoverIcons.prototype.click=function(b,e,g){var m=g.getEvent(),u=g.getGraphX(),p=HoverIcons.prototype.execute=function(b,e,g){g=g.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,g,this.graph.isCloneEvent(g),this.graph.isCloneEvent(g)),g,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var g=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&-(g=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(H,T,G){if(null!=g){var P=new mxRectangle(T,G,H.clientWidth,H.clientHeight);mxUtils.intersects(P,g)&&(H==this.arrowUp?G-=P.y+P.height-g.y:H==this.arrowRight?T+=g.x+g.width-P.x:H==this.arrowDown?G+=g.y+g.height-P.y:H==this.arrowLeft&&(T-=P.x+P.width-g.x))}H.style.left=T+"px";H.style.top=G+"px";mxUtils.setOpacity(H,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-+(g=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(H,S,G){if(null!=g){var P=new mxRectangle(S,G,H.clientWidth,H.clientHeight);mxUtils.intersects(P,g)&&(H==this.arrowUp?G-=P.y+P.height-g.y:H==this.arrowRight?S+=g.x+g.width-P.x:H==this.arrowDown?G+=g.y+g.height-P.y:H==this.arrowLeft&&(S-=P.x+P.width-g.x))}H.style.left=S+"px";H.style.top=G+"px";mxUtils.setOpacity(H,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());-var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),u=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==u&&u==b&&(b=u=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),B=mxUtils.bind(this,function(H,T){var G=this.graph.model.isVertex(H)&&this.graph.getCellGeometry(H);null==H||this.graph.model.isAncestor(H,-this.currentState.cell)||this.graph.isSwimlane(H)||!(null==G||null==p||G.height<3*p.height&&G.width<3*p.width)?T.style.visibility="visible":T.style.visibility="hidden"});B(e,this.arrowRight);B(m,this.arrowLeft);B(u,this.arrowUp);B(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),+var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),u=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==u&&u==b&&(b=u=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),B=mxUtils.bind(this,function(H,S){var G=this.graph.model.isVertex(H)&&this.graph.getCellGeometry(H);null==H||this.graph.model.isAncestor(H,+this.currentState.cell)||this.graph.isSwimlane(H)||!(null==G||null==p||G.height<3*p.height&&G.width<3*p.width)?S.style.visibility="visible":S.style.visibility="hidden"});B(e,this.arrowRight);B(m,this.arrowLeft);B(u,this.arrowUp);B(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(e){null!=e.parentNode&&(e=new mxRectangle(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight),null==b?b=e:b.add(e))});return b};HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var e=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(b=e)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};@@ -2499,43 +2499,43 @@ b||null==this.bbox||null==e||null==g||!mxUtils.contains(this.bbox,e,g))&&(null!=HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.removeTextStyleForCell=function(b,e){var g=this.getCurrentCellStyle(b),m=!1;this.getModel().beginUpdate();try{if("1"==mxUtils.getValue(g,"html","0")){var u=this.convertValueToString(b);"0"!=mxUtils.getValue(g,"nl2Br","1")&&(u=u.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));u=Editor.convertHtmlToText(u);this.cellLabelChanged(b,u);m=!0}e&&(this.setCellStyles("fontSource",null,[b]),this.setCellStyles(mxConstants.STYLE_FONTFAMILY,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSIZE,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSTYLE,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BORDERCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null,[b]))}finally{this.getModel().endUpdate()}return m};Graph.prototype.createParent=function(b,e,g,m,u){b=this.cloneCell(b);for(var p=0;p<g;p++){var B=this.cloneCell(e),H=this.getCellGeometry(B);null!=H&&(H.x+=p*m,H.y+=p*u);b.insert(B)}return b};-Graph.prototype.createTable=function(b,e,g,m,u,p,B,H,T){g=null!=g?g:60;m=null!=m?m:40;p=null!=p?p:30;H=null!=H?H:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";T=null!=T?T:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,-null,null!=u?u:"",0,0,e*g,b*m+(null!=u?p:0),null!=B?B:"shape=table;startSize="+(null!=u?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*g,m,H),this.createVertex(null,null,"",0,0,g,m,T),e,g,0),b,0,m)};+Graph.prototype.createTable=function(b,e,g,m,u,p,B,H,S){g=null!=g?g:60;m=null!=m?m:40;p=null!=p?p:30;H=null!=H?H:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";S=null!=S?S:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,+null,null!=u?u:"",0,0,e*g,b*m+(null!=u?p:0),null!=B?B:"shape=table;startSize="+(null!=u?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*g,m,H),this.createVertex(null,null,"",0,0,g,m,S),e,g,0),b,0,m)};Graph.prototype.setTableValues=function(b,e,g){for(var m=this.model.getChildCells(b,!0),u=0;u<m.length;u++)if(null!=g&&(m[u].value=g[u]),null!=e)for(var p=this.model.getChildCells(m[u],!0),B=0;B<p.length;B++)null!=e[u][B]&&(p[B].value=e[u][B]);return b};-Graph.prototype.createCrossFunctionalSwimlane=function(b,e,g,m,u,p,B,H,T){g=null!=g?g:120;m=null!=m?m:120;B=null!=B?B:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";H=null!=H?H:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";-T=null!=T?T:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";u=this.createVertex(null,null,null!=u?u:"",0,0,e*g,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==u?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(u),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);u.geometry.width+=p;u.geometry.height+=-p;B=this.createVertex(null,null,"",0,p,e*g+p,m,B);u.insert(this.createParent(B,this.createVertex(null,null,"",p,0,g,m,H),e,g,0));return 1<b?(B.geometry.y=m+p,this.createParent(u,this.createParent(B,this.createVertex(null,null,"",p,0,g,m,T),e,g,0),b-1,0,m)):u};-Graph.prototype.visitTableCells=function(b,e){var g=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var u=0;u<m.length;u++){for(var p=this.getActualStartSize(m[u],!0),B=this.model.getChildCells(m[u],!0),H=this.getCellStyle(m[u],!0),T=null,G=[],P=0;P<B.length;P++){var R=this.getCellGeometry(B[P]),c={cell:B[P],rospan:1,colspan:1,row:u,col:P,geo:R};R=null!=R.alternateBounds?R.alternateBounds:R;c.point=new mxPoint(R.width+(null!=T?T.point.x:b.x+p.x),R.height+(null!=g&&null!=-g[0]?g[0].point.y:b.y+p.y));c.actual=c;null!=g&&null!=g[P]&&1<g[P].rowspan?(c.rowspan=g[P].rowspan-1,c.colspan=g[P].colspan,c.actual=g[P].actual):null!=T&&1<T.colspan?(c.rowspan=T.rowspan,c.colspan=T.colspan-1,c.actual=T.actual):(T=this.getCurrentCellStyle(B[P],!0),null!=T&&(c.rowspan=parseInt(T.rowspan||1),c.colspan=parseInt(T.colspan||1)));T=1==mxUtils.getValue(H,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(H,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(c,B.length,-m.length,b.x+(T?p.x:0),b.y+(T?p.y:0));G.push(c);T=c}g=G}};Graph.prototype.getTableLines=function(b,e,g){var m=[],u=[];(e||g)&&this.visitTableCells(b,mxUtils.bind(this,function(p,B,H,T,G){e&&p.row<H-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(T,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));g&&p.col<B-1&&(null==u[p.col]&&(u[p.col]=[new mxPoint(p.point.x,G)]),1<p.colspan&&u[p.col].push(null),u[p.col].push(p.point))}));return m.concat(u)};+Graph.prototype.createCrossFunctionalSwimlane=function(b,e,g,m,u,p,B,H,S){g=null!=g?g:120;m=null!=m?m:120;B=null!=B?B:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";H=null!=H?H:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";+S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";u=this.createVertex(null,null,null!=u?u:"",0,0,e*g,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==u?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(u),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);u.geometry.width+=p;u.geometry.height+=+p;B=this.createVertex(null,null,"",0,p,e*g+p,m,B);u.insert(this.createParent(B,this.createVertex(null,null,"",p,0,g,m,H),e,g,0));return 1<b?(B.geometry.y=m+p,this.createParent(u,this.createParent(B,this.createVertex(null,null,"",p,0,g,m,S),e,g,0),b-1,0,m)):u};+Graph.prototype.visitTableCells=function(b,e){var g=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var u=0;u<m.length;u++){for(var p=this.getActualStartSize(m[u],!0),B=this.model.getChildCells(m[u],!0),H=this.getCellStyle(m[u],!0),S=null,G=[],P=0;P<B.length;P++){var Q=this.getCellGeometry(B[P]),c={cell:B[P],rospan:1,colspan:1,row:u,col:P,geo:Q};Q=null!=Q.alternateBounds?Q.alternateBounds:Q;c.point=new mxPoint(Q.width+(null!=S?S.point.x:b.x+p.x),Q.height+(null!=g&&null!=+g[0]?g[0].point.y:b.y+p.y));c.actual=c;null!=g&&null!=g[P]&&1<g[P].rowspan?(c.rowspan=g[P].rowspan-1,c.colspan=g[P].colspan,c.actual=g[P].actual):null!=S&&1<S.colspan?(c.rowspan=S.rowspan,c.colspan=S.colspan-1,c.actual=S.actual):(S=this.getCurrentCellStyle(B[P],!0),null!=S&&(c.rowspan=parseInt(S.rowspan||1),c.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(H,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(H,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(c,B.length,+m.length,b.x+(S?p.x:0),b.y+(S?p.y:0));G.push(c);S=c}g=G}};Graph.prototype.getTableLines=function(b,e,g){var m=[],u=[];(e||g)&&this.visitTableCells(b,mxUtils.bind(this,function(p,B,H,S,G){e&&p.row<H-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(S,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));g&&p.col<B-1&&(null==u[p.col]&&(u[p.col]=[new mxPoint(p.point.x,G)]),1<p.colspan&&u[p.col].push(null),u[p.col].push(p.point))}));return m.concat(u)};Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};-Graph.prototype.setTableRowHeight=function(b,e,g){g=null!=g?g:!0;var m=this.getModel();m.beginUpdate();try{var u=this.getCellGeometry(b);if(null!=u){u=u.clone();u.height+=e;m.setGeometry(b,u);var p=m.getParent(b),B=m.getChildCells(p,!0);if(!g){var H=mxUtils.indexOf(B,b);if(H<B.length-1){var T=B[H+1],G=this.getCellGeometry(T);null!=G&&(G=G.clone(),G.y+=e,G.height-=e,m.setGeometry(T,G))}}var P=this.getCellGeometry(p);null!=P&&(g||(g=b==B[B.length-1]),g&&(P=P.clone(),P.height+=e,m.setGeometry(p,P)))}}finally{m.endUpdate()}};-Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var m=this.getModel(),u=m.getParent(b),p=m.getParent(u),B=m.getChildCells(u,!0);b=mxUtils.indexOf(B,b);var H=b==B.length-1;m.beginUpdate();try{for(var T=m.getChildCells(p,!0),G=0;G<T.length;G++){u=T[G];B=m.getChildCells(u,!0);var P=B[b],R=this.getCellGeometry(P);null!=R&&(R=R.clone(),R.width+=e,null!=R.alternateBounds&&(R.alternateBounds.width+=e),m.setGeometry(P,R));b<B.length-1&&(P=B[b+1],R=this.getCellGeometry(P),null!=R&&(R=R.clone(),-R.x+=e,g||(R.width-=e,null!=R.alternateBounds&&(R.alternateBounds.width-=e)),m.setGeometry(P,R)))}if(H||g){var c=this.getCellGeometry(p);null!=c&&(c=c.clone(),c.width+=e,m.setGeometry(p,c))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};+Graph.prototype.setTableRowHeight=function(b,e,g){g=null!=g?g:!0;var m=this.getModel();m.beginUpdate();try{var u=this.getCellGeometry(b);if(null!=u){u=u.clone();u.height+=e;m.setGeometry(b,u);var p=m.getParent(b),B=m.getChildCells(p,!0);if(!g){var H=mxUtils.indexOf(B,b);if(H<B.length-1){var S=B[H+1],G=this.getCellGeometry(S);null!=G&&(G=G.clone(),G.y+=e,G.height-=e,m.setGeometry(S,G))}}var P=this.getCellGeometry(p);null!=P&&(g||(g=b==B[B.length-1]),g&&(P=P.clone(),P.height+=e,m.setGeometry(p,P)))}}finally{m.endUpdate()}};+Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var m=this.getModel(),u=m.getParent(b),p=m.getParent(u),B=m.getChildCells(u,!0);b=mxUtils.indexOf(B,b);var H=b==B.length-1;m.beginUpdate();try{for(var S=m.getChildCells(p,!0),G=0;G<S.length;G++){u=S[G];B=m.getChildCells(u,!0);var P=B[b],Q=this.getCellGeometry(P);null!=Q&&(Q=Q.clone(),Q.width+=e,null!=Q.alternateBounds&&(Q.alternateBounds.width+=e),m.setGeometry(P,Q));b<B.length-1&&(P=B[b+1],Q=this.getCellGeometry(P),null!=Q&&(Q=Q.clone(),+Q.x+=e,g||(Q.width-=e,null!=Q.alternateBounds&&(Q.alternateBounds.width-=e)),m.setGeometry(P,Q)))}if(H||g){var c=this.getCellGeometry(p);null!=c&&(c=c.clone(),c.width+=e,m.setGeometry(p,c))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var g=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var u=this.graph.getCellGeometry(b[m]);null!=u&&(g+=e?u.width:u.height)}return g};TableLayout.prototype.getRowLayout=function(b,e){var g=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(g,!0);e=e-m.x-m.width;var u=[];m=m.x;for(var p=0;p<g.length;p++){var B=this.graph.getCellGeometry(g[p]);null!=B&&(m+=(null!=B.alternateBounds?B.alternateBounds.width:B.width)*e/b,u.push(Math.round(m)))}return u};-TableLayout.prototype.layoutRow=function(b,e,g,m){var u=this.graph.getModel(),p=u.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var B=b.x,H=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var T=0;T<p.length;T++){var G=this.graph.getCellGeometry(p[T]);null!=G&&(G=G.clone(),G.y=b.y,G.height=g-b.y-b.height,null!=e?(G.x=e[T],G.width=e[T+1]-G.x,T==p.length-1&&T<e.length-2&&(G.width=m-G.x-b.x-b.width)):(G.x=B,B+=G.width,T==p.length-1?G.width=m-b.x-b.width-H:H+=G.width),G.alternateBounds=new mxRectangle(0,-0,G.width,G.height),u.setGeometry(p[T],G))}return H};-TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),u="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var B=this.graph.getModel(),H=0;B.beginUpdate();try{for(var T=g.height-e.y-e.height,G=g.width-e.x-e.width,P=B.getChildCells(b,!0),R=0;R<P.length;R++)B.setVisible(P[R],!0);var c=this.getSize(P,!1);if(0<T&&0<G&&0<-P.length&&0<c){if(u){var f=this.graph.getCellGeometry(P[P.length-1]);null!=f&&(f=f.clone(),f.height=T-c+f.height,B.setGeometry(P[P.length-1],f))}var l=p?null:this.getRowLayout(P[0],G),t=[],z=e.y;for(R=0;R<P.length;R++)f=this.graph.getCellGeometry(P[R]),null!=f&&(f=f.clone(),f.x=e.x,f.width=G,f.y=Math.round(z),z=u||m?z+f.height:z+f.height/c*T,f.height=Math.round(z)-f.y,B.setGeometry(P[R],f)),H=Math.max(H,this.layoutRow(P[R],l,f.height,G,t));m&&T<c&&(g=g.clone(),g.height=z+e.height,B.setGeometry(b,-g));p&&G<H+Graph.minTableColumnWidth&&(g=g.clone(),g.width=H+e.width+e.x+Graph.minTableColumnWidth,B.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(C){B.setVisible(C.cell,C.actual.cell==C.cell);if(C.actual.cell!=C.cell){if(C.actual.row==C.row){var F=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo;C.actual.geo.width+=F.width}C.actual.col==C.col&&(F=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo,C.actual.geo.height+=F.height)}}))}else for(R=0;R<P.length;R++)B.setVisible(P[R],+TableLayout.prototype.layoutRow=function(b,e,g,m){var u=this.graph.getModel(),p=u.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var B=b.x,H=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var S=0;S<p.length;S++){var G=this.graph.getCellGeometry(p[S]);null!=G&&(G=G.clone(),G.y=b.y,G.height=g-b.y-b.height,null!=e?(G.x=e[S],G.width=e[S+1]-G.x,S==p.length-1&&S<e.length-2&&(G.width=m-G.x-b.x-b.width)):(G.x=B,B+=G.width,S==p.length-1?G.width=m-b.x-b.width-H:H+=G.width),G.alternateBounds=new mxRectangle(0,+0,G.width,G.height),u.setGeometry(p[S],G))}return H};+TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),u="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var B=this.graph.getModel(),H=0;B.beginUpdate();try{for(var S=g.height-e.y-e.height,G=g.width-e.x-e.width,P=B.getChildCells(b,!0),Q=0;Q<P.length;Q++)B.setVisible(P[Q],!0);var c=this.getSize(P,!1);if(0<S&&0<G&&0<+P.length&&0<c){if(u){var f=this.graph.getCellGeometry(P[P.length-1]);null!=f&&(f=f.clone(),f.height=S-c+f.height,B.setGeometry(P[P.length-1],f))}var l=p?null:this.getRowLayout(P[0],G),t=[],z=e.y;for(Q=0;Q<P.length;Q++)f=this.graph.getCellGeometry(P[Q]),null!=f&&(f=f.clone(),f.x=e.x,f.width=G,f.y=Math.round(z),z=u||m?z+f.height:z+f.height/c*S,f.height=Math.round(z)-f.y,B.setGeometry(P[Q],f)),H=Math.max(H,this.layoutRow(P[Q],l,f.height,G,t));m&&S<c&&(g=g.clone(),g.height=z+e.height,B.setGeometry(b,+g));p&&G<H+Graph.minTableColumnWidth&&(g=g.clone(),g.width=H+e.width+e.x+Graph.minTableColumnWidth,B.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(C){B.setVisible(C.cell,C.actual.cell==C.cell);if(C.actual.cell!=C.cell){if(C.actual.row==C.row){var F=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo;C.actual.geo.width+=F.width}C.actual.col==C.col&&(F=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo,C.actual.geo.height+=F.height)}}))}else for(Q=0;Q<P.length;Q++)B.setVisible(P[Q],!1)}finally{B.endUpdate()}}};-(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(R,c){c=null!=c?c:!0;var f=this.getState(R);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&!f.invalid&&this.updateLineJumps(f)&&this.graph.cellRenderer.redraw(f,!1,this.isRendering());f=e.apply(this,-arguments);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var R=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=-R)for(var c=0;c<R.length;c++)if("hidden"!=R[c].getAttribute("visibility"))return R[c];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(R){g.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var m=mxShape.prototype.createSvgCanvas;-mxShape.prototype.createSvgCanvas=function(R){R=m.apply(this,arguments);null!=this.state&&(R.adaptiveColors=this.state.view.graph.getAdaptiveColors());return R};var u=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(R,c){return u.apply(this,arguments)||null!=R.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,R.routedPoints)};var p=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(R){p.apply(this,arguments);-this.graph.model.isEdge(R.cell)&&1!=R.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(R)};mxGraphView.prototype.updateLineJumps=function(R){var c=R.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=R.routedPoints,l=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(R.style,"jumpStyle","none")){var t=function(Y,ma,Z){var k=new mxPoint(ma,Z);k.type=Y;l.push(k);k=null!=R.routedPoints?R.routedPoints[l.length-1]:null;return null==k||k.type!=Y||k.x!=ma||k.y!=Z},z=.5*this.scale;-f=!1;l=[];for(var C=0;C<c.length-1;C++){for(var F=c[C+1],N=c[C],K=[],J=c[C+2];C<c.length-2&&mxUtils.ptSegDistSq(N.x,N.y,J.x,J.y,F.x,F.y)<1*this.scale*this.scale;)F=J,C++,J=c[C+2];f=t(0,N.x,N.y)||f;for(var da=0;da<this.validEdges.length;da++){var ea=this.validEdges[da],ca=ea.absolutePoints;if(null!=ca&&mxUtils.intersects(R,ea)&&"1"!=ea.style.noJump){var W=null;for(ea=0;ea<ca.length-1;ea++){var ba=ca[ea+1],ha=ca[ea];for(J=ca[ea+2];ea<ca.length-2&&mxUtils.ptSegDistSq(ha.x,ha.y,J.x,J.y,ba.x,ba.y)<1*this.scale*-this.scale;)ba=J,ea++,J=ca[ea+2];var la=mxUtils.intersection(N.x,N.y,F.x,F.y,ha.x,ha.y,ba.x,ba.y);if(null!=la&&(Math.abs(la.x-N.x)>z||Math.abs(la.y-N.y)>z)&&(Math.abs(la.x-F.x)>z||Math.abs(la.y-F.y)>z)&&(null==W||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,W.x,W.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ha.x,ha.y)>z)&&(null==J||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,J.x,J.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ba.x,ba.y)>z)){J=la.x-N.x;W=la.y-N.y;la={distSq:J*J+W*W,x:la.x,y:la.y};for(J=0;J<K.length;J++)if(K[J].distSq>-la.distSq){K.splice(J,0,la);la=null;break}null==la||0!=K.length&&K[K.length-1].x===la.x&&K[K.length-1].y===la.y||K.push(la)}W=ha}}}for(ea=0;ea<K.length;ea++)f=t(1,K[ea].x,K[ea].y)||f}la=c[c.length-1];f=t(0,la.x,la.y)||f}R.routedPoints=l;return f}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(R,c,f){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)B.apply(this,-arguments);else{var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,t=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,z=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,F=null,N=null,K=[],J=null;R.begin();for(var da=0;da<this.state.routedPoints.length;da++){var ea=this.state.routedPoints[da],ca=new mxPoint(ea.x/this.scale,ea.y/this.scale);0==da?ca=c[0]:da==this.state.routedPoints.length-1&&(ca=c[c.length-1]);var W=-!1;if(null!=F&&1==ea.type){var ba=this.state.routedPoints[da+1];ea=ba.x/this.scale-ca.x;ba=ba.y/this.scale-ca.y;ea=ea*ea+ba*ba;null==J&&(J=new mxPoint(ca.x-F.x,ca.y-F.y),N=Math.sqrt(J.x*J.x+J.y*J.y),0<N?(J.x=J.x*t/N,J.y=J.y*t/N):J=null);ea>t*t&&0<N&&(ea=F.x-ca.x,ba=F.y-ca.y,ea=ea*ea+ba*ba,ea>t*t&&(W=new mxPoint(ca.x-J.x,ca.y-J.y),ea=new mxPoint(ca.x+J.x,ca.y+J.y),K.push(W),this.addPoints(R,K,f,l,!1,null,C),K=0>Math.round(J.x)||0==Math.round(J.x)&&0>=Math.round(J.y)?1:-1,C=!1,"sharp"==z?(R.lineTo(W.x--J.y*K,W.y+J.x*K),R.lineTo(ea.x-J.y*K,ea.y+J.x*K),R.lineTo(ea.x,ea.y)):"line"==z?(R.moveTo(W.x+J.y*K,W.y-J.x*K),R.lineTo(W.x-J.y*K,W.y+J.x*K),R.moveTo(ea.x-J.y*K,ea.y+J.x*K),R.lineTo(ea.x+J.y*K,ea.y-J.x*K),R.moveTo(ea.x,ea.y)):"arc"==z?(K*=1.3,R.curveTo(W.x-J.y*K,W.y+J.x*K,ea.x-J.y*K,ea.y+J.x*K,ea.x,ea.y)):(R.moveTo(ea.x,ea.y),C=!0),K=[ea],W=!0))}else J=null;W||(K.push(ca),F=ca)}this.addPoints(R,K,f,l,!1,null,C);R.stroke()}};var H=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=-function(R,c,f,l){return null!=c&&"centerPerimeter"==c.style[mxConstants.STYLE_PERIMETER]?new mxPoint(c.getCenterX(),c.getCenterY()):H.apply(this,arguments)};var T=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(R,c,f,l){if(null==c||null==R||"1"!=c.style.snapToPoint&&"1"!=R.style.snapToPoint)T.apply(this,arguments);else{c=this.getTerminalPort(R,c,l);var t=this.getNextPoint(R,f,l),z=this.graph.isOrthogonal(R),C=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||-"0")),F=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=C){var N=Math.cos(-C),K=Math.sin(-C);t=mxUtils.getRotatedPoint(t,N,K,F)}N=parseFloat(R.style[mxConstants.STYLE_PERIMETER_SPACING]||0);N+=parseFloat(R.style[l?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);t=this.getPerimeterPoint(c,t,0==C&&z,N);0!=C&&(N=Math.cos(C),K=Math.sin(C),t=mxUtils.getRotatedPoint(t,N,K,F));R.setAbsoluteTerminalPoint(this.snapToAnchorPoint(R,c,f,l,t),l)}};mxGraphView.prototype.snapToAnchorPoint=-function(R,c,f,l,t){if(null!=c&&null!=R){R=this.graph.getAllConnectionConstraints(c);l=f=null;if(null!=R)for(var z=0;z<R.length;z++){var C=this.graph.getConnectionPoint(c,R[z]);if(null!=C){var F=(C.x-t.x)*(C.x-t.x)+(C.y-t.y)*(C.y-t.y);if(null==l||F<l)f=C,l=F}}null!=f&&(t=f)}return t};var G=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(R,c,f){var l=G.apply(this,arguments);"1"==R.getAttribute("placeholders")&&null!=f.state&&(l=f.state.view.graph.replacePlaceholders(f.state.cell,-l));return l};var P=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(R){if(null!=R.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(R.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"string"===typeof c&&"stencil("==c.substring(0,8))try{var f=c.substring(8,c.length-1),l=mxUtils.parseXml(Graph.decompress(f));return new mxShape(new mxStencil(l.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return P.apply(this,arguments)}})();+(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(Q,c){c=null!=c?c:!0;var f=this.getState(Q);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&!f.invalid&&this.updateLineJumps(f)&&this.graph.cellRenderer.redraw(f,!1,this.isRendering());f=e.apply(this,+arguments);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var Q=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=+Q)for(var c=0;c<Q.length;c++)if("hidden"!=Q[c].getAttribute("visibility"))return Q[c];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){g.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var m=mxShape.prototype.createSvgCanvas;+mxShape.prototype.createSvgCanvas=function(Q){Q=m.apply(this,arguments);null!=this.state&&(Q.adaptiveColors=this.state.view.graph.getAdaptiveColors());return Q};var u=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(Q,c){return u.apply(this,arguments)||null!=Q.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,Q.routedPoints)};var p=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(Q){p.apply(this,arguments);+this.graph.model.isEdge(Q.cell)&&1!=Q.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(Q)};mxGraphView.prototype.updateLineJumps=function(Q){var c=Q.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=Q.routedPoints,l=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(Q.style,"jumpStyle","none")){var t=function(Y,ma,Z){var k=new mxPoint(ma,Z);k.type=Y;l.push(k);k=null!=Q.routedPoints?Q.routedPoints[l.length-1]:null;return null==k||k.type!=Y||k.x!=ma||k.y!=Z},z=.5*this.scale;+f=!1;l=[];for(var C=0;C<c.length-1;C++){for(var F=c[C+1],N=c[C],K=[],J=c[C+2];C<c.length-2&&mxUtils.ptSegDistSq(N.x,N.y,J.x,J.y,F.x,F.y)<1*this.scale*this.scale;)F=J,C++,J=c[C+2];f=t(0,N.x,N.y)||f;for(var da=0;da<this.validEdges.length;da++){var ea=this.validEdges[da],ca=ea.absolutePoints;if(null!=ca&&mxUtils.intersects(Q,ea)&&"1"!=ea.style.noJump){var X=null;for(ea=0;ea<ca.length-1;ea++){var aa=ca[ea+1],ia=ca[ea];for(J=ca[ea+2];ea<ca.length-2&&mxUtils.ptSegDistSq(ia.x,ia.y,J.x,J.y,aa.x,aa.y)<1*this.scale*+this.scale;)aa=J,ea++,J=ca[ea+2];var la=mxUtils.intersection(N.x,N.y,F.x,F.y,ia.x,ia.y,aa.x,aa.y);if(null!=la&&(Math.abs(la.x-N.x)>z||Math.abs(la.y-N.y)>z)&&(Math.abs(la.x-F.x)>z||Math.abs(la.y-F.y)>z)&&(null==X||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,X.x,X.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ia.x,ia.y)>z)&&(null==J||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,J.x,J.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,aa.x,aa.y)>z)){J=la.x-N.x;X=la.y-N.y;la={distSq:J*J+X*X,x:la.x,y:la.y};for(J=0;J<K.length;J++)if(K[J].distSq>+la.distSq){K.splice(J,0,la);la=null;break}null==la||0!=K.length&&K[K.length-1].x===la.x&&K[K.length-1].y===la.y||K.push(la)}X=ia}}}for(ea=0;ea<K.length;ea++)f=t(1,K[ea].x,K[ea].y)||f}la=c[c.length-1];f=t(0,la.x,la.y)||f}Q.routedPoints=l;return f}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(Q,c,f){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)B.apply(this,+arguments);else{var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,t=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,z=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,F=null,N=null,K=[],J=null;Q.begin();for(var da=0;da<this.state.routedPoints.length;da++){var ea=this.state.routedPoints[da],ca=new mxPoint(ea.x/this.scale,ea.y/this.scale);0==da?ca=c[0]:da==this.state.routedPoints.length-1&&(ca=c[c.length-1]);var X=+!1;if(null!=F&&1==ea.type){var aa=this.state.routedPoints[da+1];ea=aa.x/this.scale-ca.x;aa=aa.y/this.scale-ca.y;ea=ea*ea+aa*aa;null==J&&(J=new mxPoint(ca.x-F.x,ca.y-F.y),N=Math.sqrt(J.x*J.x+J.y*J.y),0<N?(J.x=J.x*t/N,J.y=J.y*t/N):J=null);ea>t*t&&0<N&&(ea=F.x-ca.x,aa=F.y-ca.y,ea=ea*ea+aa*aa,ea>t*t&&(X=new mxPoint(ca.x-J.x,ca.y-J.y),ea=new mxPoint(ca.x+J.x,ca.y+J.y),K.push(X),this.addPoints(Q,K,f,l,!1,null,C),K=0>Math.round(J.x)||0==Math.round(J.x)&&0>=Math.round(J.y)?1:-1,C=!1,"sharp"==z?(Q.lineTo(X.x-+J.y*K,X.y+J.x*K),Q.lineTo(ea.x-J.y*K,ea.y+J.x*K),Q.lineTo(ea.x,ea.y)):"line"==z?(Q.moveTo(X.x+J.y*K,X.y-J.x*K),Q.lineTo(X.x-J.y*K,X.y+J.x*K),Q.moveTo(ea.x-J.y*K,ea.y+J.x*K),Q.lineTo(ea.x+J.y*K,ea.y-J.x*K),Q.moveTo(ea.x,ea.y)):"arc"==z?(K*=1.3,Q.curveTo(X.x-J.y*K,X.y+J.x*K,ea.x-J.y*K,ea.y+J.x*K,ea.x,ea.y)):(Q.moveTo(ea.x,ea.y),C=!0),K=[ea],X=!0))}else J=null;X||(K.push(ca),F=ca)}this.addPoints(Q,K,f,l,!1,null,C);Q.stroke()}};var H=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=+function(Q,c,f,l){return null!=c&&"centerPerimeter"==c.style[mxConstants.STYLE_PERIMETER]?new mxPoint(c.getCenterX(),c.getCenterY()):H.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(Q,c,f,l){if(null==c||null==Q||"1"!=c.style.snapToPoint&&"1"!=Q.style.snapToPoint)S.apply(this,arguments);else{c=this.getTerminalPort(Q,c,l);var t=this.getNextPoint(Q,f,l),z=this.graph.isOrthogonal(Q),C=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||+"0")),F=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=C){var N=Math.cos(-C),K=Math.sin(-C);t=mxUtils.getRotatedPoint(t,N,K,F)}N=parseFloat(Q.style[mxConstants.STYLE_PERIMETER_SPACING]||0);N+=parseFloat(Q.style[l?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);t=this.getPerimeterPoint(c,t,0==C&&z,N);0!=C&&(N=Math.cos(C),K=Math.sin(C),t=mxUtils.getRotatedPoint(t,N,K,F));Q.setAbsoluteTerminalPoint(this.snapToAnchorPoint(Q,c,f,l,t),l)}};mxGraphView.prototype.snapToAnchorPoint=+function(Q,c,f,l,t){if(null!=c&&null!=Q){Q=this.graph.getAllConnectionConstraints(c);l=f=null;if(null!=Q)for(var z=0;z<Q.length;z++){var C=this.graph.getConnectionPoint(c,Q[z]);if(null!=C){var F=(C.x-t.x)*(C.x-t.x)+(C.y-t.y)*(C.y-t.y);if(null==l||F<l)f=C,l=F}}null!=f&&(t=f)}return t};var G=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(Q,c,f){var l=G.apply(this,arguments);"1"==Q.getAttribute("placeholders")&&null!=f.state&&(l=f.state.view.graph.replacePlaceholders(f.state.cell,+l));return l};var P=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(Q){if(null!=Q.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(Q.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"string"===typeof c&&"stencil("==c.substring(0,8))try{var f=c.substring(8,c.length-1),l=mxUtils.parseXml(Graph.decompress(f));return new mxShape(new mxStencil(l.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return P.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(b){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[b]};mxStencilRegistry.setFileLoaded=function(b){mxStencilRegistry.filesLoaded[b]=!0};mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var g=mxStencilRegistry.getBasenameForStencil(b);if(null!=g){e=mxStencilRegistry.libraries[g];if(null!=e){if(null==mxStencilRegistry.packages[g]){for(var m=0;m<e.length;m++){var u=e[m];if(!mxStencilRegistry.isFileLoaded(u))if(mxStencilRegistry.setFileLoaded(u),".xml"==u.toLowerCase().substring(u.length-4,u.length))mxStencilRegistry.loadStencilSet(u,null);else if(".js"==u.toLowerCase().substring(u.length-3,u.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(u);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(B){null!=window.console&&console.log("error in getStencil:",b,g,e,u,B)}}mxStencilRegistry.packages[g]=1}}else g=g.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+g+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};@@ -2544,158 +2544,158 @@ mxStencilRegistry.loadStencilSet=function(b,e,g,m){var u=mxStencilRegistry.packau.documentElement&&mxStencilRegistry.parseStencilSet(u.documentElement,e,p)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(g){e(200<=g.getStatus()&&299>=g.getStatus()?g.getXml():null)}),mxUtils.bind(this,function(g){e(null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};mxStencilRegistry.parseStencilSet=function(b,e,g){if("stencils"==b.nodeName)for(var m=b.firstChild;null!=m;)"shapes"==m.nodeName&&mxStencilRegistry.parseStencilSet(m,e,g),m=m.nextSibling;else{g=null!=g?g:!0;m=b.firstChild;var u="";b=b.getAttribute("name");for(null!=b&&(u=b+".");null!=m;){if(m.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=m.getAttribute("name"),null!=b)){u=u.toLowerCase();var p=b.replace(/ /g,"_");g&&mxStencilRegistry.addStencil(u+p.toLowerCase(),new mxStencil(m));if(null!=e){var B=m.getAttribute("w"),H=m.getAttribute("h");B=null==B?80:parseInt(B,10);H=null==H?80:parseInt(H,10);e(u,p,b,B,H)}}m=m.nextSibling}}};-"undefined"!==typeof mxVertexHandler&&function(){function b(){var x=document.createElement("div");x.className="geHint";x.style.whiteSpace="nowrap";x.style.position="absolute";return x}function e(x,M){switch(M){case mxConstants.POINTS:return x;case mxConstants.MILLIMETERS:return(x/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(x/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(x/mxConstants.PIXELS_PER_INCH).toFixed(3)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";+"undefined"!==typeof mxVertexHandler&&function(){function b(){var x=document.createElement("div");x.className="geHint";x.style.whiteSpace="nowrap";x.style.position="absolute";return x}function e(x,L){switch(L){case mxConstants.POINTS:return x;case mxConstants.MILLIMETERS:return(x/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(x/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(x/mxConstants.PIXELS_PER_INCH).toFixed(3)}}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_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=50;mxConstants.HIGHLIGHT_SIZE=5;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#707070" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.resizeImage=Graph.createSvgImage(10,10,'<path d="Z" stroke="#C0C0C0" stroke-width="1" fill="none"/>').src;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(x){return!mxEvent.isAltDown(x)||mxEvent.isShiftDown(x)};var g=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(x){return g.apply(this,arguments)||this.graph.isTableRow(x)||this.graph.isTableCell(x)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(x){return m.apply(this,arguments)||this.graph.isEdgeIgnored(x)};var u=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(x){return this.graph.isCloneEvent(x)!=u.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var x=new mxEllipse(null,this.highlightColor,this.highlightColor,0);x.opacity=mxConstants.HIGHLIGHT_OPACITY;return x};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=-"crosshair";mxConnectionHandler.prototype.createEdgeState=function(x){x=this.graph.createCurrentEdgeStyle();x=this.graph.createEdge(null,null,null,null,null,x);x=new mxCellState(this.graph.view,x,this.graph.getCellStyle(x));for(var M in this.graph.currentEdgeStyle)x.style[M]=this.graph.currentEdgeStyle[M];if(null!=this.previous){var Q=this.previous.style.newEdgeStyle;if(null!=Q)try{var V=JSON.parse(Q);for(M in V)x.style[M]=V[M]}catch(ia){}}x.style=this.graph.postProcessCellStyle(x.cell,x.style);return x};-var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var x=p.apply(this,arguments);x.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return x};mxConnectionHandler.prototype.updatePreview=function(x){};var B=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var x=B.apply(this,arguments),M=x.getCell;x.getCell=mxUtils.bind(this,function(Q){var V=M.apply(this,arguments);this.error=null;return V});-return x};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var x="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",M="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),Q=0;Q<M.length;Q++)null!=-this.currentEdgeStyle[M[Q]]&&(x+=M[Q]+"="+this.currentEdgeStyle[M[Q]]+";");null!=this.currentEdgeStyle.orthogonalLoop?x+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(x+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?x+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(x+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize++"crosshair";mxConnectionHandler.prototype.createEdgeState=function(x){x=this.graph.createCurrentEdgeStyle();x=this.graph.createEdge(null,null,null,null,null,x);x=new mxCellState(this.graph.view,x,this.graph.getCellStyle(x));for(var L in this.graph.currentEdgeStyle)x.style[L]=this.graph.currentEdgeStyle[L];if(null!=this.previous){var R=this.previous.style.newEdgeStyle;if(null!=R)try{var W=JSON.parse(R);for(L in W)x.style[L]=W[L]}catch(ja){}}x.style=this.graph.postProcessCellStyle(x.cell,x.style);return x};+var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var x=p.apply(this,arguments);x.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return x};mxConnectionHandler.prototype.updatePreview=function(x){};var B=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var x=B.apply(this,arguments),L=x.getCell;x.getCell=mxUtils.bind(this,function(R){var W=L.apply(this,arguments);this.error=null;return W});+return x};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var x="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",L="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),R=0;R<L.length;R++)null!=+this.currentEdgeStyle[L[R]]&&(x+=L[R]+"="+this.currentEdgeStyle[L[R]]+";");null!=this.currentEdgeStyle.orthogonalLoop?x+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(x+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?x+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(x+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(x+="elbow="+this.currentEdgeStyle.elbow+";");return x=null!=this.currentEdgeStyle.html?x+("html="+this.currentEdgeStyle.html+";"):x+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var x=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=-x&&(new mxCodec(x.ownerDocument)).decode(x,this.getStylesheet())};Graph.prototype.createCellLookup=function(x,M){M=null!=M?M:{};for(var Q=0;Q<x.length;Q++){var V=x[Q];M[mxObjectIdentity.get(V)]=V.getId();for(var ia=this.model.getChildCount(V),ka=0;ka<ia;ka++)this.createCellLookup([this.model.getChildAt(V,ka)],M)}return M};Graph.prototype.createCellMapping=function(x,M,Q){Q=null!=Q?Q:{};for(var V in x){var ia=M[V];null==Q[ia]&&(Q[ia]=x[V].getId()||"")}return Q};Graph.prototype.importGraphModel=function(x,-M,Q,V){M=null!=M?M:0;Q=null!=Q?Q:0;var ia=new mxCodec(x.ownerDocument),ka=new mxGraphModel;ia.decode(x,ka);x=[];ia={};var oa={},xa=ka.getChildren(this.cloneCell(ka.root,this.isCloneInvalidEdges(),ia));if(null!=xa){var ta=this.createCellLookup([ka.root]);xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ka=0;ka<xa.length;ka++)ua=this.model.getChildren(this.moveCells([xa[ka]],M,Q,!1,this.model.getRoot())[0]),null!=ua&&(x=x.concat(ua));else{var ua=-ka.getChildren(xa[0]);null!=ua&&(x=this.moveCells(ua,M,Q,!1,this.getDefaultParent()),oa[ka.getChildAt(ka.root,0).getId()]=this.getDefaultParent().getId())}if(null!=x&&(this.createCellMapping(ia,ta,oa),this.updateCustomLinks(oa,x),V)){this.isGridEnabled()&&(M=this.snap(M),Q=this.snap(Q));var Fa=this.getBoundingBoxFromGeometry(x,!0);null!=Fa&&this.moveCells(x,M-Fa.x,Q-Fa.y)}}finally{this.model.endUpdate()}}return x};Graph.prototype.encodeCells=function(x){for(var M={},Q=this.cloneCells(x,null,M),V=-new mxDictionary,ia=0;ia<x.length;ia++)V.put(x[ia],!0);var ka=new mxCodec,oa=new mxGraphModel,xa=oa.getChildAt(oa.getRoot(),0);for(ia=0;ia<Q.length;ia++){oa.add(xa,Q[ia]);var ta=this.view.getState(x[ia]);if(null!=ta){var ua=this.getCellGeometry(Q[ia]);null!=ua&&ua.relative&&!this.model.isEdge(x[ia])&&null==V.get(this.model.getParent(x[ia]))&&(ua.offset=null,ua.relative=!1,ua.x=ta.x/ta.view.scale-ta.view.translate.x,ua.y=ta.y/ta.view.scale-ta.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(M,-this.createCellLookup(x)),Q);return ka.encode(oa)};Graph.prototype.isSwimlane=function(x,M){var Q=null;null==x||this.model.isEdge(x)||this.model.getParent(x)==this.model.getRoot()||(Q=this.getCurrentCellStyle(x,M)[mxConstants.STYLE_SHAPE]);return Q==mxConstants.SHAPE_SWIMLANE||"table"==Q||"tableRow"==Q};var H=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(x){return null!=x&&H.apply(this,arguments)?this.isTableCell(x)||this.isTableRow(x)?this.isCellEditable(this.model.getParent(x)):-!0:!1};var T=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(x){return null!=x&&T.apply(this,arguments)?this.isTableCell(x)||this.isTableRow(x)?this.isCellMovable(this.model.getParent(x)):!0:!1};var G=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(x){var M=this.model.getParent(x);if(null!=M){var Q=this.getCurrentCellStyle(M);if(null!=Q.expand)return"0"!=Q.expand}return G.apply(this,arguments)&&(null==M||!this.isTable(M))};var P=Graph.prototype.splitEdge;-Graph.prototype.splitEdge=function(x,M,Q,V,ia,ka,oa,xa){null==xa&&(xa=this.model.getParent(x),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ka,oa,null,!0,!1));Q=null;this.model.beginUpdate();try{Q=P.apply(this,[x,M,Q,V,ia,ka,oa,xa]);this.model.setValue(Q,"");var ta=this.getChildCells(Q,!0);for(M=0;M<ta.length;M++){var ua=this.getCellGeometry(ta[M]);null!=ua&&ua.relative&&0<ua.x&&this.model.remove(ta[M])}var Fa=this.getChildCells(x,!0);for(M=0;M<Fa.length;M++)ua=this.getCellGeometry(Fa[M]),-null!=ua&&ua.relative&&0>=ua.x&&this.model.remove(Fa[M]);var Na=this.model.getTerminal(Q,!1);if(null!=Na){var Wa=this.getCurrentCellStyle(Na);null!=Wa&&"1"==Wa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[x]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[x]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[Q]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[Q]))}}finally{this.model.endUpdate()}return Q};var R=Graph.prototype.selectCell;Graph.prototype.selectCell=function(x,-M,Q){if(M||Q)R.apply(this,arguments);else{var V=this.getSelectionCell(),ia=null,ka=[],oa=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ka.push(xa),xa==V)ia=ka.length-1;else if(x&&null==V&&0<ka.length||null!=ia&&x&&ka.length>ia||!x&&0<ia)return;for(var ta=0;ta<this.model.getChildCount(xa);ta++)oa(this.model.getChildAt(xa,ta))});oa(this.model.root);0<ka.length&&(ia=null!=ia?mxUtils.mod(ia+(x?1:-1),ka.length):0,this.setSelectionCell(ka[ia]))}};-Graph.prototype.swapShapes=function(x,M){if(this.model.isVertex(x)&&this.model.isVertex(M)&&2==this.getMovableCells([x,M]).length){var Q=this.getCellGeometry(x),V=this.getCellGeometry(M);if(null!=Q&&null!=V){var ia=Q.clone(),ka=V.clone();this.model.beginUpdate();try{ia.x=V.getCenterX()-Q.width/2,ia.y=V.getCenterY()-Q.height/2,ka.x=Q.getCenterX()-V.width/2,ka.y=Q.getCenterY()-V.height/2,this.model.setGeometry(x,ia),this.model.setGeometry(M,ka)}finally{this.model.endUpdate()}}}};var c=Graph.prototype.moveCells;-Graph.prototype.moveCells=function(x,M,Q,V,ia,ka,oa){oa=null!=oa?oa:{};if(this.isTable(ia)){for(var xa=[],ta=0;ta<x.length;ta++)this.isTable(x[ta])?xa=xa.concat(this.model.getChildCells(x[ta],!0).reverse()):xa.push(x[ta]);x=xa}this.model.beginUpdate();try{xa=[];for(ta=0;ta<x.length;ta++)if(null!=ia&&this.isTableRow(x[ta])){var ua=this.model.getParent(x[ta]),Fa=this.getCellGeometry(x[ta]);this.isTable(ua)&&xa.push(ua);if(null!=ua&&null!=Fa&&this.isTable(ua)&&this.isTable(ia)&&(V||ua!=ia)){if(!V){var Na=-this.getCellGeometry(ua);null!=Na&&(Na=Na.clone(),Na.height-=Fa.height,this.model.setGeometry(ua,Na))}Na=this.getCellGeometry(ia);null!=Na&&(Na=Na.clone(),Na.height+=Fa.height,this.model.setGeometry(ia,Na));var Wa=this.model.getChildCells(ia,!0);if(0<Wa.length){x[ta]=V?this.cloneCell(x[ta]):x[ta];var Xa=this.model.getChildCells(x[ta],!0),ab=this.model.getChildCells(Wa[0],!0),Oa=ab.length-Xa.length;if(0<Oa)for(var Qa=0;Qa<Oa;Qa++){var kb=this.cloneCell(Xa[Xa.length-1]);null!=kb&&(kb.value="",this.model.add(x[ta],-kb))}else if(0>Oa)for(Qa=0;Qa>Oa;Qa--)this.model.remove(Xa[Xa.length+Qa-1]);Xa=this.model.getChildCells(x[ta],!0);for(Qa=0;Qa<ab.length;Qa++){var cb=this.getCellGeometry(ab[Qa]),Ya=this.getCellGeometry(Xa[Qa]);null!=cb&&null!=Ya&&(Ya=Ya.clone(),Ya.width=cb.width,this.model.setGeometry(Xa[Qa],Ya))}}}}var gb=c.apply(this,arguments);for(ta=0;ta<xa.length;ta++)!V&&this.model.contains(xa[ta])&&0==this.model.getChildCount(xa[ta])&&this.model.remove(xa[ta]);V&&this.updateCustomLinks(this.createCellMapping(oa,-this.createCellLookup(x)),gb)}finally{this.model.endUpdate()}return gb};var f=Graph.prototype.removeCells;Graph.prototype.removeCells=function(x,M){var Q=[];this.model.beginUpdate();try{for(var V=0;V<x.length;V++)if(this.isTableCell(x[V])){var ia=this.model.getParent(x[V]),ka=this.model.getParent(ia);1==this.model.getChildCount(ia)&&1==this.model.getChildCount(ka)?0>mxUtils.indexOf(x,ka)&&0>mxUtils.indexOf(Q,ka)&&Q.push(ka):this.labelChanged(x[V],"")}else{if(this.isTableRow(x[V])&&(ka=this.model.getParent(x[V]),-0>mxUtils.indexOf(x,ka)&&0>mxUtils.indexOf(Q,ka))){for(var oa=this.model.getChildCells(ka,!0),xa=0,ta=0;ta<oa.length;ta++)0<=mxUtils.indexOf(x,oa[ta])&&xa++;xa==oa.length&&Q.push(ka)}Q.push(x[V])}Q=f.apply(this,[Q,M])}finally{this.model.endUpdate()}return Q};Graph.prototype.updateCustomLinks=function(x,M,Q){Q=null!=Q?Q:new Graph;for(var V=0;V<M.length;V++)null!=M[V]&&Q.updateCustomLinksForCell(x,M[V],Q)};Graph.prototype.updateCustomLinksForCell=function(x,M){this.doUpdateCustomLinksForCell(x,M);for(var Q=-this.model.getChildCount(M),V=0;V<Q;V++)this.updateCustomLinksForCell(x,this.model.getChildAt(M,V))};Graph.prototype.doUpdateCustomLinksForCell=function(x,M){};Graph.prototype.getAllConnectionConstraints=function(x,M){if(null!=x){M=mxUtils.getValue(x.style,"points",null);if(null!=M){x=[];try{var Q=JSON.parse(M);for(M=0;M<Q.length;M++){var V=Q[M];x.push(new mxConnectionConstraint(new mxPoint(V[0],V[1]),2<V.length?"0"!=V[2]:!0,null,3<V.length?V[3]:0,4<V.length?V[4]:0))}}catch(ka){}return x}if(null!=-x.shape&&null!=x.shape.bounds){V=x.shape.direction;M=x.shape.bounds;var ia=x.shape.scale;Q=M.width/ia;M=M.height/ia;if(V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_SOUTH)V=Q,Q=M,M=V;M=x.shape.getConstraints(x.style,Q,M);if(null!=M)return M;if(null!=x.shape.stencil&&null!=x.shape.stencil.constraints)return x.shape.stencil.constraints;if(null!=x.shape.constraints)return x.shape.constraints}}return null};Graph.prototype.flipEdge=function(x){if(null!=x){var M=this.getCurrentCellStyle(x);M=-mxUtils.getValue(M,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,M,[x])}};Graph.prototype.isValidRoot=function(x){for(var M=this.model.getChildCount(x),Q=0,V=0;V<M;V++){var ia=this.model.getChildAt(x,V);this.model.isVertex(ia)&&(ia=this.getCellGeometry(ia),null==ia||ia.relative||Q++)}return 0<Q||this.isContainer(x)};Graph.prototype.isValidDropTarget=function(x,M,-Q){for(var V=this.getCurrentCellStyle(x),ia=!0,ka=!0,oa=0;oa<M.length&&ka;oa++)ia=ia&&this.isTable(M[oa]),ka=ka&&this.isTableRow(M[oa]);return!this.isCellLocked(x)&&(this.isTargetShape(x,M,Q)||("1"!=mxUtils.getValue(V,"part","0")||this.isContainer(x))&&"0"!=mxUtils.getValue(V,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(x))&&!this.isTableRow(x)&&(!this.isTable(x)||ka||ia))};Graph.prototype.createGroupCell=function(){var x=mxGraph.prototype.createGroupCell.apply(this,-arguments);x.setStyle("group");return x};Graph.prototype.isExtendParentsOnAdd=function(x){var M=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(M&&null!=x&&null!=this.layoutManager){var Q=this.model.getParent(x);null!=Q&&(Q=this.layoutManager.getLayout(Q),null!=Q&&Q.constructor==mxStackLayout&&(M=!1))}return M};Graph.prototype.getPreferredSizeForCell=function(x,M,Q){Q=null!=Q?Q:this.gridEnabled;var V=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=V&&(V.width+=-10,V.height+=4,Q&&(V.width=this.snap(V.width),V.height=this.snap(V.height)));return V};Graph.prototype.turnShapes=function(x,M){var Q=this.getModel(),V=[];Q.beginUpdate();try{for(var ia=0;ia<x.length;ia++){var ka=x[ia];if(Q.isEdge(ka)){var oa=Q.getTerminal(ka,!0),xa=Q.getTerminal(ka,!1);Q.setTerminal(ka,xa,!0);Q.setTerminal(ka,oa,!1);var ta=Q.getGeometry(ka);if(null!=ta){ta=ta.clone();null!=ta.points&&ta.points.reverse();var ua=ta.getTerminalPoint(!0),Fa=ta.getTerminalPoint(!1);ta.setTerminalPoint(ua,-!1);ta.setTerminalPoint(Fa,!0);Q.setGeometry(ka,ta);var Na=this.view.getState(ka),Wa=this.view.getState(oa),Xa=this.view.getState(xa);if(null!=Na){var ab=null!=Wa?this.getConnectionConstraint(Na,Wa,!0):null,Oa=null!=Xa?this.getConnectionConstraint(Na,Xa,!1):null;this.setConnectionConstraint(ka,oa,!0,Oa);this.setConnectionConstraint(ka,xa,!1,ab);var Qa=mxUtils.getValue(Na.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Na.style,-mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ka]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Qa,[ka])}V.push(ka)}}else if(Q.isVertex(ka)&&(ta=this.getCellGeometry(ka),null!=ta)){if(!(this.isTable(ka)||this.isTableRow(ka)||this.isTableCell(ka)||this.isSwimlane(ka))){ta=ta.clone();ta.x+=ta.width/2-ta.height/2;ta.y+=ta.height/2-ta.width/2;var kb=ta.width;ta.width=ta.height;ta.height=kb;Q.setGeometry(ka,ta)}var cb=this.view.getState(ka);if(null!=cb){var Ya=[mxConstants.DIRECTION_EAST,-mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],gb=mxUtils.getValue(cb.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Ya[mxUtils.mod(mxUtils.indexOf(Ya,gb)+(M?-1:1),Ya.length)],[ka])}V.push(ka)}}}finally{Q.endUpdate()}return V};Graph.prototype.stencilHasPlaceholders=function(x){if(null!=x&&null!=x.fgNode)for(x=x.fgNode.firstChild;null!=x;){if("text"==x.nodeName&&"1"==x.getAttribute("placeholders"))return!0;-x=x.nextSibling}return!1};var l=Graph.prototype.processChange;Graph.prototype.processChange=function(x){if(x instanceof mxGeometryChange&&(this.isTableCell(x.cell)||this.isTableRow(x.cell))&&(null==x.previous&&null!=x.geometry||null!=x.previous&&!x.previous.equals(x.geometry))){var M=x.cell;this.isTableCell(M)&&(M=this.model.getParent(M));this.isTableRow(M)&&(M=this.model.getParent(M));var Q=this.view.getState(M);null!=Q&&null!=Q.shape&&(this.view.invalidate(M),Q.shape.bounds=null)}l.apply(this,arguments);-x instanceof mxValueChange&&null!=x.cell&&null!=x.cell.value&&"object"==typeof x.cell.value&&this.invalidateDescendantsWithPlaceholders(x.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(x){x=this.model.getDescendants(x);if(0<x.length)for(var M=0;M<x.length;M++){var Q=this.view.getState(x[M]);null!=Q&&null!=Q.shape&&null!=Q.shape.stencil&&this.stencilHasPlaceholders(Q.shape.stencil)?this.removeStateForCell(x[M]):this.isReplacePlaceholders(x[M])&&this.view.invalidate(x[M],!1,!1)}};-Graph.prototype.replaceElement=function(x,M){M=x.ownerDocument.createElement(null!=M?M:"span");for(var Q=Array.prototype.slice.call(x.attributes);attr=Q.pop();)M.setAttribute(attr.nodeName,attr.nodeValue);M.innerHTML=x.innerHTML;x.parentNode.replaceChild(M,x)};Graph.prototype.processElements=function(x,M){if(null!=x){x=x.getElementsByTagName("*");for(var Q=0;Q<x.length;Q++)null!=x[Q]&&M(x[Q])}};Graph.prototype.updateLabelElements=function(x,M,Q){x=null!=x?x:this.getSelectionCells();for(var V=document.createElement("div"),-ia=0;ia<x.length;ia++){var ka=this.getCurrentCellStyle(x[ia]);if(null!=ka&&"1"==ka.html&&(ka=this.convertValueToString(x[ia]),null!=ka&&0<ka.length)){V.innerHTML=Graph.sanitizeHtml(ka);for(var oa=V.getElementsByTagName(null!=Q?Q:"*"),xa=0;xa<oa.length;xa++)M(oa[xa]);V.innerHTML!=ka&&this.cellLabelChanged(x[ia],V.innerHTML)}}};Graph.prototype.cellLabelChanged=function(x,M,Q){M=Graph.zapGremlins(M);this.model.beginUpdate();try{if(null!=x.value&&"object"==typeof x.value){if(this.isReplacePlaceholders(x)&&-null!=x.getAttribute("placeholder"))for(var V=x.getAttribute("placeholder"),ia=x;null!=ia;){if(ia==this.model.getRoot()||null!=ia.value&&"object"==typeof ia.value&&ia.hasAttribute(V)){this.setAttributeForCell(ia,V,M);break}ia=this.model.getParent(ia)}var ka=x.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ka.hasAttribute("label_"+Graph.diagramLanguage)?ka.setAttribute("label_"+Graph.diagramLanguage,M):ka.setAttribute("label",M);M=ka}mxGraph.prototype.cellLabelChanged.apply(this,-arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(x){if(null!=x){for(var M=new mxDictionary,Q=0;Q<x.length;Q++)M.put(x[Q],!0);var V=[];for(Q=0;Q<x.length;Q++){var ia=this.model.getParent(x[Q]);null==ia||M.get(ia)||(M.put(ia,!0),V.push(ia))}for(Q=0;Q<V.length;Q++)if(ia=this.view.getState(V[Q]),null!=ia&&(this.model.isEdge(ia.cell)||this.model.isVertex(ia.cell))&&this.isCellDeletable(ia.cell)&&this.isTransparentState(ia)){for(var ka=!0,oa=0;oa<this.model.getChildCount(ia.cell)&&-ka;oa++)M.get(this.model.getChildAt(ia.cell,oa))||(ka=!1);ka&&x.push(ia.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(x){for(var M=[],Q=0;Q<x.length;Q++)this.isCellDeletable(x[Q])&&this.isTransparentState(this.view.getState(x[Q]))&&M.push(x[Q]);x=M;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(x,M){this.setAttributeForCell(x,"link",M)};Graph.prototype.setTooltipForCell=function(x,-M){var Q="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(x.value)&&x.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(Q="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(x,Q,M)};Graph.prototype.getAttributeForCell=function(x,M,Q){x=null!=x.value&&"object"===typeof x.value?x.value.getAttribute(M):null;return null!=x?x:Q};Graph.prototype.setAttributeForCell=function(x,M,Q){if(null!=x.value&&"object"==typeof x.value)var V=x.value.cloneNode(!0);else V=mxUtils.createXmlDocument().createElement("UserObject"),-V.setAttribute("label",x.value||"");null!=Q?V.setAttribute(M,Q):V.removeAttribute(M);this.model.setValue(x,V)};Graph.prototype.isTargetShape=function(x,M,Q){x=mxUtils.getValue(this.getCurrentCellStyle(x),mxConstants.STYLE_SHAPE,"");for(Q=0;Q<M.length;Q++){var V=mxUtils.getValue(this.getCurrentCellStyle(M[Q]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(V,x))return!0}return!1};var t=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(x,M,Q,V){if(mxEvent.isAltDown(M))return null;-for(var ia=0;ia<x.length;ia++){var ka=this.model.getParent(x[ia]);if(this.model.isEdge(ka)&&0>mxUtils.indexOf(x,ka))return null}ka=t.apply(this,arguments);var oa=!0;for(ia=0;ia<x.length&&oa;ia++)oa=oa&&this.isTableRow(x[ia]);oa&&(this.isTableCell(ka)&&(ka=this.model.getParent(ka)),this.isTableRow(ka)&&(ka=this.model.getParent(ka)),this.isTable(ka)||(ka=null));return ka};Graph.prototype.click=function(x){mxGraph.prototype.click.call(this,x);this.firstClickState=x.getState();this.firstClickSource=x.getSource()};-Graph.prototype.dblClick=function(x,M){this.isEnabled()&&(M=this.insertTextForEvent(x,M),mxGraph.prototype.dblClick.call(this,x,M))};Graph.prototype.insertTextForEvent=function(x,M){var Q=mxUtils.convertPoint(this.container,mxEvent.getClientX(x),mxEvent.getClientY(x));if(null!=x&&!this.model.isVertex(M)){var V=this.model.isEdge(M)?this.view.getState(M):null,ia=mxEvent.getSource(x);this.firstClickState!=V||this.firstClickSource!=ia||null!=V&&null!=V.text&&null!=V.text.node&&null!=V.text.boundingBox&&-(mxUtils.contains(V.text.boundingBox,Q.x,Q.y)||mxUtils.isAncestorNode(V.text.node,mxEvent.getSource(x)))||(null!=V||this.isCellLocked(this.getDefaultParent()))&&(null==V||this.isCellLocked(V.cell))||!(null!=V||mxClient.IS_SVG&&ia==this.view.getCanvas().ownerSVGElement)||(null==V&&(V=this.view.getState(this.getCellAt(Q.x,Q.y))),M=this.addText(Q.x,Q.y,V))}return M};Graph.prototype.getInsertPoint=function(){var x=this.getGridSize(),M=this.container.scrollLeft/this.view.scale-this.view.translate.x,Q=-this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var V=this.getPageLayout(),ia=this.getPageSize();M=Math.max(M,V.x*ia.width);Q=Math.max(Q,V.y*ia.height)}return new mxPoint(this.snap(M+x),this.snap(Q+x))};Graph.prototype.getFreeInsertPoint=function(){var x=this.view,M=this.getGraphBounds(),Q=this.getInsertPoint(),V=this.snap(Math.round(Math.max(Q.x,M.x/x.scale-x.translate.x+(0==M.width?2*this.gridSize:0))));x=this.snap(Math.round(Math.max(Q.y,(M.y+M.height)/x.scale--x.translate.y+2*this.gridSize)));return new mxPoint(V,x)};Graph.prototype.getCenterInsertPoint=function(x){x=null!=x?x:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-x.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/-2/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-x.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(x,M){x=null!=x?x:"";null!=M&&(0<x.length&&";"!=x.charAt(x.length-1)&&(x+=";"),x+="fontSize="+M+";");return x};Graph.prototype.addText=function(x,M,Q){var V=new mxCell;V.value="Text";V.geometry=new mxGeometry(0,0,0,0);V.vertex=!0;if(null!=Q&&this.model.isEdge(Q.cell)){V.style=-"edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);V.geometry.relative=!0;V.connectable=!1;var ia=this.view.getRelativePoint(Q,x,M);V.geometry.x=Math.round(1E4*ia.x)/1E4;V.geometry.y=Math.round(ia.y);V.geometry.offset=new mxPoint(0,0);ia=this.view.getPoint(Q,V.geometry);var ka=this.view.scale;V.geometry.offset=new mxPoint(Math.round((x-ia.x)/ka),Math.round((M-ia.y)/ka))}else ia=this.view.translate,V.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",-this.vertexFontSize),V.geometry.width=40,V.geometry.height=20,V.geometry.x=Math.round(x/this.view.scale)-ia.x-(null!=Q?Q.origin.x:0),V.geometry.y=Math.round(M/this.view.scale)-ia.y-(null!=Q?Q.origin.y:0),V.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([V],null!=Q?Q.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[V])),this.autoSizeCell(V)}finally{this.getModel().endUpdate()}return V};Graph.prototype.addClickHandler=function(x,M,Q){var V=mxUtils.bind(this,-function(){var ta=this.container.getElementsByTagName("a");if(null!=ta)for(var ua=0;ua<ta.length;ua++){var Fa=this.getAbsoluteUrl(ta[ua].getAttribute("href"));null!=Fa&&(ta[ua].setAttribute("rel",this.linkRelation),ta[ua].setAttribute("href",Fa),null!=M&&mxEvent.addGestureListeners(ta[ua],null,null,M))}});this.model.addListener(mxEvent.CHANGE,V);V();var ia=this.container.style.cursor,ka=this.getTolerance(),oa=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=x&&""!=x&&-x!=mxConstants.NONE?new mxCellHighlight(oa,x,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ta){var ua=ta.sourceState;if(null==ua||null==oa.getLinkForCell(ua.cell))ta=oa.getCellAt(ta.getGraphX(),ta.getGraphY(),null,null,null,function(Fa,Na,Wa){return null==oa.getLinkForCell(Fa.cell)}),ua=null==ua||oa.model.isAncestor(ta,ua.cell)?oa.view.getState(ta):null;ua!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ua,null!=this.currentState&&this.activate(this.currentState))},-mouseDown:function(ta,ua){this.startX=ua.getGraphX();this.startY=ua.getGraphY();this.scrollLeft=oa.container.scrollLeft;this.scrollTop=oa.container.scrollTop;null==this.currentLink&&"auto"==oa.container.style.overflow&&(oa.container.style.cursor="move");this.updateCurrentState(ua)},mouseMove:function(ta,ua){if(oa.isMouseDown)null!=this.currentLink&&(ta=Math.abs(this.startX-ua.getGraphX()),ua=Math.abs(this.startY-ua.getGraphY()),(ta>ka||ua>ka)&&this.clear());else{for(ta=ua.getSource();null!=ta&&"a"!=-ta.nodeName.toLowerCase();)ta=ta.parentNode;null!=ta?this.clear():(null!=oa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&oa.tooltipHandler.reset(ua,!0,this.currentState),(null==this.currentState||ua.getState()!=this.currentState&&null!=ua.sourceState||!oa.intersects(this.currentState,ua.getGraphX(),ua.getGraphY()))&&this.updateCurrentState(ua))}},mouseUp:function(ta,ua){var Fa=ua.getSource();for(ta=ua.getEvent();null!=Fa&&"a"!=Fa.nodeName.toLowerCase();)Fa=Fa.parentNode;null==-Fa&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-oa.container.scrollTop)<ka&&(null==ua.sourceState||!ua.isSource(ua.sourceState.control))&&((mxEvent.isLeftMouseButton(ta)||mxEvent.isMiddleMouseButton(ta))&&!mxEvent.isPopupTrigger(ta)||mxEvent.isTouchEvent(ta))&&(null!=this.currentLink?(Fa=oa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Fa||null==M||M(ta,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ta)||-(ta=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ta)?"_blank":Fa?oa.linkTarget:"_top",oa.openLink(this.currentLink,ta),ua.consume())):null!=Q&&!ua.isConsumed()&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-oa.container.scrollTop)<ka&&Math.abs(this.startX-ua.getGraphX())<ka&&Math.abs(this.startY-ua.getGraphY())<ka&&Q(ua.getEvent()));this.clear()},activate:function(ta){this.currentLink=oa.getAbsoluteUrl(oa.getLinkForCell(ta.cell));null!=this.currentLink&&-(this.currentTarget=oa.getLinkTargetForCell(ta.cell),oa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ta))},clear:function(){null!=oa.container&&(oa.container.style.cursor=ia);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=oa.tooltipHandler&&oa.tooltipHandler.hide()}};oa.click=function(ta){};oa.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ta){xa.clear()})};Graph.prototype.duplicateCells=-function(x,M){x=null!=x?x:this.getSelectionCells();M=null!=M?M:!0;for(var Q=0;Q<x.length;Q++)this.isTableCell(x[Q])&&(x[Q]=this.model.getParent(x[Q]));x=this.model.getTopmostCells(x);var V=this.getModel(),ia=this.gridSize,ka=[];V.beginUpdate();try{var oa={},xa=this.createCellLookup(x),ta=this.cloneCells(x,!1,oa,!0);for(Q=0;Q<x.length;Q++){var ua=V.getParent(x[Q]);if(null!=ua){var Fa=this.moveCells([ta[Q]],ia,ia,!1)[0];ka.push(Fa);if(M)V.add(ua,ta[Q]);else{var Na=ua.getIndex(x[Q]);V.add(ua,ta[Q],Na+-1)}if(this.isTable(ua)){var Wa=this.getCellGeometry(ta[Q]),Xa=this.getCellGeometry(ua);null!=Wa&&null!=Xa&&(Xa=Xa.clone(),Xa.height+=Wa.height,V.setGeometry(ua,Xa))}}else ka.push(ta[Q])}this.updateCustomLinks(this.createCellMapping(oa,xa),ta,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ta))}finally{V.endUpdate()}return ka};Graph.prototype.insertImage=function(x,M,Q){if(null!=x&&null!=this.cellEditor.textarea){for(var V=this.cellEditor.textarea.getElementsByTagName("img"),ia=-[],ka=0;ka<V.length;ka++)ia.push(V[ka]);document.execCommand("insertimage",!1,x);x=this.cellEditor.textarea.getElementsByTagName("img");if(x.length==ia.length+1)for(ka=x.length-1;0<=ka;ka--)if(0==ka||x[ka]!=ia[ka-1]){x[ka].setAttribute("width",M);x[ka].setAttribute("height",Q);break}}};Graph.prototype.insertLink=function(x){if(null!=this.cellEditor.textarea)if(0==x.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var M=this.cellEditor.textarea.getElementsByTagName("a"),Q=[],V=-0;V<M.length;V++)Q.push(M[V]);document.execCommand("createlink",!1,mxUtils.trim(x));M=this.cellEditor.textarea.getElementsByTagName("a");if(M.length==Q.length+1)for(V=M.length-1;0<=V;V--)if(M[V]!=Q[V-1]){for(M=M[V].getElementsByTagName("a");0<M.length;){for(Q=M[0].parentNode;null!=M[0].firstChild;)Q.insertBefore(M[0].firstChild,M[0]);Q.removeChild(M[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(x))};Graph.prototype.isCellResizable=function(x){var M=mxGraph.prototype.isCellResizable.apply(this,-arguments),Q=this.getCurrentCellStyle(x);return!this.isTableCell(x)&&!this.isTableRow(x)&&(M||"0"!=mxUtils.getValue(Q,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==Q[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(x,M,Q){null==M&&(M=this.getSelectionCells());if(null!=M&&1<M.length){for(var V=[],ia=null,ka=null,oa=0,xa=0;xa<M.length;xa++)if(this.getModel().isVertex(M[xa])){var ta=this.view.getState(M[xa]);if(null!=ta){var ua=x?ta.getCenterX():ta.getCenterY();ia=null!=ia?Math.max(ia,-ua):ua;ka=null!=ka?Math.min(ka,ua):ua;Q&&(oa+=x?ta.width:ta.height);V.push(ta)}}if(2<V.length){V.sort(function(ab,Oa){return x?ab.x-Oa.x:ab.y-Oa.y});Q&&(oa-=x?V[0].width/2+V[V.length-1].width/2:V[0].height/2+V[V.length-1].height/2);ta=this.view.translate;ua=this.view.scale;ka=ka/ua-(x?ta.x:ta.y);ia=ia/ua-(x?ta.x:ta.y);this.getModel().beginUpdate();try{var Fa=(ia-ka-oa)/(V.length-1),Na=ka+(Q?x?V[0].width/2:V[0].height/2:0);for(xa=1;xa<V.length-1;xa++){var Wa=this.view.getState(this.model.getParent(V[xa].cell)),-Xa=this.getCellGeometry(V[xa].cell);Na+=Fa;null!=Xa&&null!=Wa&&(Xa=Xa.clone(),x?Xa.x=Math.round(Na-(Q?0:Xa.width/2))-Wa.origin.x:Xa.y=Math.round(Na-(Q?0:Xa.height/2))-Wa.origin.y,this.getModel().setGeometry(V[xa].cell,Xa));Q&&(Na+=x?V[xa].width:V[xa].height)}}finally{this.getModel().endUpdate()}}}return M};Graph.prototype.isCloneEvent=function(x){return mxClient.IS_MAC&&mxEvent.isMetaDown(x)||mxEvent.isControlDown(x)};Graph.prototype.createSvgImageExport=function(x){x=new mxImageExport;x.addCellData=-function(Q,V,ia){V.setAttribute("data-cell-id",Q.id);if(ia)if(mxUtils.isNode(Q.value))for(ia=0;ia<Q.value.attributes.length;ia++){var ka=Q.value.attributes[ia];V.setAttribute("data-cell-"+ka.name,ka.value)}else if("object"===typeof Q.value)for(ka in Q.value)V.setAttribute("data-cell-"+ka,Q.value[ka]);else null!=Q.value&&V.setAttribute("data-cell-value",Q.value);return V};var M=x.visitStatesRecursive;x.visitStatesRecursive=function(Q,V,ia){if(null!=Q){var ka=V.root,oa=V.root.ownerDocument;V.root=this.addCellData(Q.cell,-null!=oa.createElementNS?oa.createElementNS(mxConstants.NS_SVG,"g"):oa.createElement("g"),Editor.addSvgMetadata);ka.appendChild(V.root);M.apply(this,arguments);V.root=ka}};x.getLinkForCellState=mxUtils.bind(this,function(Q,V){return this.getLinkForCell(Q.cell)});x.getTitleForCellState=mxUtils.bind(this,function(Q,V){return Editor.convertHtmlToText(this.convertValueToTooltip(Q.cell))});return x};Graph.prototype.parseBackgroundImage=function(x){var M=null;null!=x&&0<x.length&&(x=JSON.parse(x),M=new mxImage(x.src,-x.width,x.height));return M};Graph.prototype.getBackgroundImageObject=function(x){return x};Graph.prototype.getSvg=function(x,M,Q,V,ia,ka,oa,xa,ta,ua,Fa,Na,Wa,Xa,ab,Oa){var Qa=null;if(null!=Xa)for(Qa=new mxDictionary,Fa=0;Fa<Xa.length;Fa++)Qa.put(Xa[Fa],!0);Xa=this.useCssTransforms;var kb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Xa&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{M=null!=M?M:1;Q=null!=Q?Q:0;ia=null!=ia?ia:!0;ka=null!=ka?ka:!0;oa=null!=oa?oa:-!0;ua=null!=ua?ua:!1;var cb="page"==Wa?this.view.getBackgroundPageBounds():ka&&null==Qa||V||"diagram"==Wa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ya=this.backgroundImage,gb=this.view.translate,hb=this.view.scale;"diagram"==Wa&&null!=Ya&&null!=Ya.width&&null!=Ya.height&&(cb=mxRectangle.fromRectangle(cb),cb.add(new mxRectangle((gb.x+Ya.x)*hb,(gb.y+Ya.y)*hb,Ya.width*hb,Ya.height*hb)));if(null==cb)throw Error(mxResources.get("drawingEmpty"));V=M/hb;var vb=Math.max(1,Math.ceil(cb.width*-V)+2*Q)+(ua&&0==Q?5:0),mb=Math.max(1,Math.ceil(cb.height*V)+2*Q)+(ua&&0==Q?5:0);ua=ia?-.5:0;var pb=mxUtils.getLightDarkColor(x),db=Graph.createSvgNode(ua,ua,vb,mb,pb),qb=db.ownerDocument;if(null!=x){var nb=mxUtils.createElementNs(qb,mxConstants.NS_SVG,"rect");nb.setAttribute("fill",pb.light);nb.style.fill=pb.cssText;nb.setAttribute("width","100%");nb.setAttribute("height","100%");nb.setAttribute("x","0");nb.setAttribute("y","0");db.appendChild(nb)}var lb=mxUtils.createElementNs(qb,mxConstants.NS_SVG,-"g");db.appendChild(lb);var eb=this.createSvgCanvas(lb);eb.foOffset=ia?-.5:0;eb.textOffset=ia?-.5:0;eb.imageOffset=ia?-.5:0;eb.translate(Math.floor(Q/M-cb.x/hb),Math.floor(Q/M-cb.y/hb));eb.idPrefix="drawio-svg-"+Editor.guid();var tb=document.createElement("div"),ob=eb.getAlternateText;eb.getAlternateText=function(ib,Bb,sb,xb,zb,rb,Cb,d,n,y,q,v,D){if(null!=rb&&0<this.state.fontSize)try{mxUtils.isNode(rb)?rb=rb.innerText:(tb.innerHTML=rb,rb=mxUtils.extractTextWithWhitespace(tb.childNodes));for(var E=-Math.ceil(2*xb/this.state.fontSize),fa=[],L=0,va=0;(0==E||L<E)&&va<rb.length;){var na=rb.charCodeAt(va);if(10==na||13==na){if(0<L)break}else fa.push(rb.charAt(va)),255>na&&L++;va++}fa.length<rb.length&&1<rb.length-fa.length&&(rb=mxUtils.trim(fa.join(""))+"...");return rb}catch(Va){return ob.apply(this,arguments)}else return ob.apply(this,arguments)};null!=Ya&&null!=Ya.width&&null!=Ya.height&&(x=hb/M,ua=new mxRectangle((Ya.x+gb.x)*x,(Ya.y+gb.y)*x,Ya.width*x,Ya.height*x),mxUtils.intersects(cb,ua)&&-eb.image(Ya.x+gb.x,Ya.y+gb.y,Ya.width,Ya.height,Ya.src,!0));eb.scale(V);eb.textEnabled=oa;xa=null!=xa?xa:this.createSvgImageExport();var ub=xa.getLinkForCellState;xa.getLinkForCellState=function(ib,Bb){var sb=ib.view.graph.getAbsoluteUrl(ub.apply(this,arguments));return null==sb||ib.view.graph.isCustomLink(sb)?null:sb};xa.getLinkTargetForCellState=function(ib,Bb){return ib.view.graph.getLinkTargetForCell(ib.cell)};var Ab=xa.drawCellState,yb=null,wb=mxUtils.bind(this,function(){if(null==yb){yb="ge-flow-animation-"+-Editor.guid();var ib=null!=qb.createElementNS?qb.createElementNS(mxConstants.NS_SVG,"style"):qb.createElement("style");ib.innerHTML=this.createFlowAnimationCss(yb);qb.getElementsByTagName("defs")[0].appendChild(ib)}return yb});xa.drawCellState=function(ib,Bb){for(var sb=ib.view.graph,xb=null!=Qa?Qa.get(ib.cell):sb.isCellSelected(ib.cell),zb=sb.model.getParent(ib.cell);!(ka&&null==Qa||xb)&&null!=zb;)xb=null!=Qa?Qa.get(zb):sb.isCellSelected(zb),zb=sb.model.getParent(zb);if(null!=ib.shape)try{var rb=-ib.shape.isFlowAnimationEnabled,Cb=ib.shape.addFlowAnimationToShape;ib.shape.isFlowAnimationEnabled=function(){return kb&&sb.model.isEdge(ib.cell)&&"1"==mxUtils.getValue(ib.style,"flowAnimation","0")};ib.shape.addFlowAnimationToShape=function(){sb.addFlowAnimationToNode(this.getFlowAnimationPath(),ib.style,M,wb())};if(ka&&null==Qa||xb)sb.view.redrawEnumerationState(ib),Ab.apply(this,arguments),this.doDrawShape(ib.secondLabel,Bb)}finally{ib.shape.isFlowAnimationEnabled=rb,ib.shape.addFlowAnimationToShape=-Cb}};var jb=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;xa.drawState(this.getView().getState(jb),eb);this.addForeignObjectWarning(eb,db);Oa?this.disableSvgLinks(db):this.updateSvgLinks(db,ta,!0);return db}finally{this.enableFlowAnimation=kb,Xa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(x,M){if("0"!=urlParams["svg-warning"]&&0<M.getElementsByTagName("foreignObject").length){var Q=x.createElement("switch"),-V=x.createElement("g");V.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ia=x.createElement("a");ia.setAttribute("transform","translate(0,-5)");null==ia.setAttributeNS||M.ownerDocument!=document&&null==document.documentMode?(ia.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ia.setAttribute("target","_blank")):(ia.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ia.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));-x=x.createElement("text");x.setAttribute("text-anchor","middle");x.setAttribute("font-size","10px");x.setAttribute("x","50%");x.setAttribute("y","100%");mxUtils.write(x,Graph.foreignObjectWarningText);Q.appendChild(V);ia.appendChild(x);Q.appendChild(ia);M.appendChild(Q)}};Graph.prototype.disableSvgLinks=function(x,M){x=x.getElementsByTagName("a");for(var Q=0;Q<x.length;Q++){var V=x[Q].getAttribute("href");null==V&&(V=x[Q].getAttribute("xlink:href"));null!=V&&(x[Q].style.pointerEvents="none",x[Q].setAttribute("href",-""));M&&M(x[Q])}};Graph.prototype.updateSvgLinks=function(x,M,Q){x=x.getElementsByTagName("a");for(var V=0;V<x.length;V++)if(null==x[V].getAttribute("target")){var ia=x[V].getAttribute("href");null==ia&&(ia=x[V].getAttribute("xlink:href"));null!=ia&&(null!=M&&/^https?:\/\//.test(ia)?x[V].setAttribute("target",M):Q&&this.isCustomLink(ia)&&x[V].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(x){x=new mxSvgCanvas2D(x);x.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;-x.adaptiveColors=this.getAdaptiveColors();x.pointerEvents=!0;return x};Graph.prototype.getSelectedElement=function(){var x=null;if(window.getSelection){var M=window.getSelection();M.getRangeAt&&M.rangeCount&&(x=M.getRangeAt(0).commonAncestorContainer)}else document.selection&&(x=document.selection.createRange().parentElement());return x};Graph.prototype.getSelectedEditingElement=function(){var x=null;if(null!=this.cellEditor.textarea)for(x=this.getSelectedElement();null!=x&&x.nodeType!=mxConstants.NODETYPE_ELEMENT;)x=-x.parentNode;return x};Graph.prototype.getParentByName=function(x,M,Q){for(;null!=x&&x.nodeName!=M;){if(x==Q)return null;x=x.parentNode}return x};Graph.prototype.getParentByNames=function(x,M,Q){for(;null!=x&&!(0<=mxUtils.indexOf(M,x.nodeName));){if(x==Q)return null;x=x.parentNode}return x};Graph.prototype.selectNode=function(x){var M=null;if(window.getSelection){if(M=window.getSelection(),M.getRangeAt&&M.rangeCount){var Q=document.createRange();Q.selectNode(x);M.removeAllRanges();M.addRange(Q)}}else(M=-document.selection)&&"Control"!=M.type&&(x=M.createRange(),x.collapse(!0),Q=M.createRange(),Q.setEndPoint("StartToStart",x),Q.select())};Graph.prototype.flipEdgePoints=function(x,M,Q){var V=this.getCellGeometry(x);if(null!=V){V=V.clone();if(null!=V.points)for(var ia=0;ia<V.points.length;ia++)M?V.points[ia].x=Q+(Q-V.points[ia].x):V.points[ia].y=Q+(Q-V.points[ia].y);ia=function(ka){null!=ka&&(M?ka.x=Q+(Q-ka.x):ka.y=Q+(Q-ka.y))};ia(V.getTerminalPoint(!0));ia(V.getTerminalPoint(!1));this.model.setGeometry(x,-V)}};Graph.prototype.flipChildren=function(x,M,Q){this.model.beginUpdate();try{for(var V=this.model.getChildCount(x),ia=0;ia<V;ia++){var ka=this.model.getChildAt(x,ia);if(this.model.isEdge(ka))this.flipEdgePoints(ka,M,Q);else{var oa=this.getCellGeometry(ka);null!=oa&&(oa=oa.clone(),M?oa.x=Q+(Q-oa.x-oa.width):oa.y=Q+(Q-oa.y-oa.height),this.model.setGeometry(ka,oa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(x,M){this.model.beginUpdate();try{x=this.model.getTopmostCells(x);-for(var Q=[],V=0;V<x.length;V++)if(this.model.isEdge(x[V])){var ia=this.view.getState(x[V]);null!=ia&&this.flipEdgePoints(x[V],M,(M?ia.getCenterX():ia.getCenterY())/this.view.scale-(M?ia.origin.x:ia.origin.y)-(M?this.view.translate.x:this.view.translate.y))}else{var ka=this.getCellGeometry(x[V]);null!=ka&&this.flipChildren(x[V],M,M?ka.getCenterX()-ka.x:ka.getCenterY()-ka.y);Q.push(x[V])}this.toggleCellStyles(M?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,Q)}finally{this.model.endUpdate()}};-Graph.prototype.deleteCells=function(x,M){var Q=null;if(null!=x&&0<x.length){this.model.beginUpdate();try{for(var V=0;V<x.length;V++){var ia=this.model.getParent(x[V]);if(this.isTable(ia)){var ka=this.getCellGeometry(x[V]),oa=this.getCellGeometry(ia);null!=ka&&null!=oa&&(oa=oa.clone(),oa.height-=ka.height,this.model.setGeometry(ia,oa))}}var xa=this.selectParentAfterDelete?this.model.getParents(x):null;this.removeCells(x,M)}finally{this.model.endUpdate()}if(null!=xa)for(Q=[],V=0;V<xa.length;V++)this.model.contains(xa[V])&&-(this.model.isVertex(xa[V])||this.model.isEdge(xa[V]))&&Q.push(xa[V])}return Q};Graph.prototype.insertTableColumn=function(x,M){var Q=this.getModel();Q.beginUpdate();try{var V=x,ia=0;if(this.isTableCell(x)){var ka=Q.getParent(x);V=Q.getParent(ka);ia=mxUtils.indexOf(Q.getChildCells(ka,!0),x)}else this.isTableRow(x)?V=Q.getParent(x):x=Q.getChildCells(V,!0)[0],M||(ia=Q.getChildCells(x,!0).length-1);var oa=Q.getChildCells(V,!0),xa=Graph.minTableColumnWidth;for(x=0;x<oa.length;x++){var ta=Q.getChildCells(oa[x],-!0)[ia],ua=Q.cloneCell(ta,!1);null==ua&&(ua=this.createVertex());var Fa=this.getCellGeometry(ua);ua.value=null;ua.style=mxUtils.setStyle(mxUtils.setStyle(ua.style,"rowspan",null),"colspan",null);if(null!=Fa){null!=Fa.alternateBounds&&(Fa.width=Fa.alternateBounds.width,Fa.height=Fa.alternateBounds.height,Fa.alternateBounds=null);xa=Fa.width;var Na=this.getCellGeometry(oa[x]);null!=Na&&(Fa.height=Na.height)}Q.add(oa[x],ua,ia+(M?0:1))}var Wa=this.getCellGeometry(V);null!=Wa&&(Wa=Wa.clone(),Wa.width+=-xa,Q.setGeometry(V,Wa))}finally{Q.endUpdate()}};Graph.prototype.deleteLane=function(x){var M=this.getModel();M.beginUpdate();try{var Q=null;Q="stackLayout"==this.getCurrentCellStyle(x).childLayout?x:M.getParent(x);var V=M.getChildCells(Q,!0);0==V.length?M.remove(Q):(Q==x&&(x=V[V.length-1]),M.remove(x))}finally{M.endUpdate()}};Graph.prototype.insertLane=function(x,M){var Q=this.getModel();Q.beginUpdate();try{var V=null;if("stackLayout"==this.getCurrentCellStyle(x).childLayout){V=x;var ia=Q.getChildCells(V,-!0);x=ia[M?0:ia.length-1]}else V=Q.getParent(x);var ka=V.getIndex(x);x=Q.cloneCell(x,!1);x.value=null;Q.add(V,x,ka+(M?0:1))}finally{Q.endUpdate()}};Graph.prototype.insertTableRow=function(x,M){var Q=this.getModel();Q.beginUpdate();try{var V=x,ia=x;if(this.isTableCell(x))ia=Q.getParent(x),V=Q.getParent(ia);else if(this.isTableRow(x))V=Q.getParent(x);else{var ka=Q.getChildCells(V,!0);ia=ka[M?0:ka.length-1]}var oa=Q.getChildCells(ia,!0),xa=V.getIndex(ia);ia=Q.cloneCell(ia,!1);ia.value=null;var ta=this.getCellGeometry(ia);-if(null!=ta){for(ka=0;ka<oa.length;ka++){x=Q.cloneCell(oa[ka],!1);x.value=null;x.style=mxUtils.setStyle(mxUtils.setStyle(x.style,"rowspan",null),"colspan",null);var ua=this.getCellGeometry(x);null!=ua&&(null!=ua.alternateBounds&&(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null),ua.height=ta.height);ia.insert(x)}Q.add(V,ia,xa+(M?0:1));var Fa=this.getCellGeometry(V);null!=Fa&&(Fa=Fa.clone(),Fa.height+=ta.height,Q.setGeometry(V,Fa))}}finally{Q.endUpdate()}};-Graph.prototype.deleteTableColumn=function(x){var M=this.getModel();M.beginUpdate();try{var Q=x,V=x;this.isTableCell(x)&&(V=M.getParent(x));this.isTableRow(V)&&(Q=M.getParent(V));var ia=M.getChildCells(Q,!0);if(0==ia.length)M.remove(Q);else{this.isTableRow(V)||(V=ia[0]);var ka=M.getChildCells(V,!0);if(1>=ka.length)M.remove(Q);else{var oa=ka.length-1;this.isTableCell(x)&&(oa=mxUtils.indexOf(ka,x));for(V=x=0;V<ia.length;V++){var xa=M.getChildCells(ia[V],!0)[oa];M.remove(xa);var ta=this.getCellGeometry(xa);-null!=ta&&(x=Math.max(x,ta.width))}var ua=this.getCellGeometry(Q);null!=ua&&(ua=ua.clone(),ua.width-=x,M.setGeometry(Q,ua))}}}finally{M.endUpdate()}};Graph.prototype.deleteTableRow=function(x){var M=this.getModel();M.beginUpdate();try{var Q=x,V=x;this.isTableCell(x)&&(x=V=M.getParent(x));this.isTableRow(x)&&(Q=M.getParent(V));var ia=M.getChildCells(Q,!0);if(1>=ia.length)M.remove(Q);else{this.isTableRow(V)||(V=ia[ia.length-1]);M.remove(V);x=0;var ka=this.getCellGeometry(V);null!=ka&&(x=ka.height);-var oa=this.getCellGeometry(Q);null!=oa&&(oa=oa.clone(),oa.height-=x,M.setGeometry(Q,oa))}}finally{M.endUpdate()}};Graph.prototype.insertRow=function(x,M){for(var Q=x.tBodies[0],V=Q.rows[0].cells,ia=x=0;ia<V.length;ia++){var ka=V[ia].getAttribute("colspan");x+=null!=ka?parseInt(ka):1}M=Q.insertRow(M);for(ia=0;ia<x;ia++)mxUtils.br(M.insertCell(-1));return M.cells[0]};Graph.prototype.deleteRow=function(x,M){x.tBodies[0].deleteRow(M)};Graph.prototype.insertColumn=function(x,M){var Q=x.tHead;if(null!=-Q)for(var V=0;V<Q.rows.length;V++){var ia=document.createElement("th");Q.rows[V].appendChild(ia);mxUtils.br(ia)}x=x.tBodies[0];for(Q=0;Q<x.rows.length;Q++)V=x.rows[Q].insertCell(M),mxUtils.br(V);return x.rows[0].cells[0<=M?M:x.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(x,M){if(0<=M){x=x.tBodies[0].rows;for(var Q=0;Q<x.length;Q++)x[Q].cells.length>M&&x[Q].deleteCell(M)}};Graph.prototype.pasteHtmlAtCaret=function(x){if(window.getSelection){var M=window.getSelection();if(M.getRangeAt&&-M.rangeCount){M=M.getRangeAt(0);M.deleteContents();var Q=document.createElement("div");Q.innerHTML=x;x=document.createDocumentFragment();for(var V;V=Q.firstChild;)lastNode=x.appendChild(V);M.insertNode(x)}}else(M=document.selection)&&"Control"!=M.type&&M.createRange().pasteHTML(x)};Graph.prototype.createLinkForHint=function(x,M,Q){function V(ka,oa){ka.length>oa&&(ka=ka.substring(0,Math.round(oa/2))+"..."+ka.substring(ka.length-Math.round(oa/4)));return ka}x=null!=x?x:"javascript:void(0);";if(null==-M||0==M.length)M=this.isCustomLink(x)?this.getLinkTitle(x):x;var ia=document.createElement("a");ia.setAttribute("rel",this.linkRelation);ia.setAttribute("href",this.getAbsoluteUrl(x));ia.setAttribute("title",V(this.isCustomLink(x)?this.getLinkTitle(x):x,80));null!=this.linkTarget&&ia.setAttribute("target",this.linkTarget);mxUtils.write(ia,V(M,40));this.isCustomLink(x)&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ka){this.customLinkClicked(x,Q);mxEvent.consume(ka)}));return ia};Graph.prototype.initTouch=+x&&(new mxCodec(x.ownerDocument)).decode(x,this.getStylesheet())};Graph.prototype.createCellLookup=function(x,L){L=null!=L?L:{};for(var R=0;R<x.length;R++){var W=x[R];L[mxObjectIdentity.get(W)]=W.getId();for(var ja=this.model.getChildCount(W),ka=0;ka<ja;ka++)this.createCellLookup([this.model.getChildAt(W,ka)],L)}return L};Graph.prototype.createCellMapping=function(x,L,R){R=null!=R?R:{};for(var W in x){var ja=L[W];null==R[ja]&&(R[ja]=x[W].getId()||"")}return R};Graph.prototype.importGraphModel=function(x,+L,R,W){L=null!=L?L:0;R=null!=R?R:0;var ja=new mxCodec(x.ownerDocument),ka=new mxGraphModel;ja.decode(x,ka);x=[];ja={};var oa={},va=ka.getChildren(this.cloneCell(ka.root,this.isCloneInvalidEdges(),ja));if(null!=va){var ta=this.createCellLookup([ka.root]);va=va.slice();this.model.beginUpdate();try{if(1!=va.length||this.isCellLocked(this.getDefaultParent()))for(ka=0;ka<va.length;ka++)xa=this.model.getChildren(this.moveCells([va[ka]],L,R,!1,this.model.getRoot())[0]),null!=xa&&(x=x.concat(xa));else{var xa=+ka.getChildren(va[0]);null!=xa&&(x=this.moveCells(xa,L,R,!1,this.getDefaultParent()),oa[ka.getChildAt(ka.root,0).getId()]=this.getDefaultParent().getId())}if(null!=x&&(this.createCellMapping(ja,ta,oa),this.updateCustomLinks(oa,x),W)){this.isGridEnabled()&&(L=this.snap(L),R=this.snap(R));var Fa=this.getBoundingBoxFromGeometry(x,!0);null!=Fa&&this.moveCells(x,L-Fa.x,R-Fa.y)}}finally{this.model.endUpdate()}}return x};Graph.prototype.encodeCells=function(x){for(var L={},R=this.cloneCells(x,null,L),W=+new mxDictionary,ja=0;ja<x.length;ja++)W.put(x[ja],!0);var ka=new mxCodec,oa=new mxGraphModel,va=oa.getChildAt(oa.getRoot(),0);for(ja=0;ja<R.length;ja++){oa.add(va,R[ja]);var ta=this.view.getState(x[ja]);if(null!=ta){var xa=this.getCellGeometry(R[ja]);null!=xa&&xa.relative&&!this.model.isEdge(x[ja])&&null==W.get(this.model.getParent(x[ja]))&&(xa.offset=null,xa.relative=!1,xa.x=ta.x/ta.view.scale-ta.view.translate.x,xa.y=ta.y/ta.view.scale-ta.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(L,+this.createCellLookup(x)),R);return ka.encode(oa)};Graph.prototype.isSwimlane=function(x,L){var R=null;null==x||this.model.isEdge(x)||this.model.getParent(x)==this.model.getRoot()||(R=this.getCurrentCellStyle(x,L)[mxConstants.STYLE_SHAPE]);return R==mxConstants.SHAPE_SWIMLANE||"table"==R||"tableRow"==R};var H=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(x){return null!=x&&H.apply(this,arguments)?this.isTableCell(x)||this.isTableRow(x)?this.isCellEditable(this.model.getParent(x)):+!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(x){return null!=x&&S.apply(this,arguments)?this.isTableCell(x)||this.isTableRow(x)?this.isCellMovable(this.model.getParent(x)):!0:!1};var G=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(x){var L=this.model.getParent(x);if(null!=L){var R=this.getCurrentCellStyle(L);if(null!=R.expand)return"0"!=R.expand}return G.apply(this,arguments)&&(null==L||!this.isTable(L))};var P=Graph.prototype.splitEdge;+Graph.prototype.splitEdge=function(x,L,R,W,ja,ka,oa,va){null==va&&(va=this.model.getParent(x),this.isTable(va)||this.isTableRow(va))&&(va=this.getCellAt(ka,oa,null,!0,!1));R=null;this.model.beginUpdate();try{R=P.apply(this,[x,L,R,W,ja,ka,oa,va]);this.model.setValue(R,"");var ta=this.getChildCells(R,!0);for(L=0;L<ta.length;L++){var xa=this.getCellGeometry(ta[L]);null!=xa&&xa.relative&&0<xa.x&&this.model.remove(ta[L])}var Fa=this.getChildCells(x,!0);for(L=0;L<Fa.length;L++)xa=this.getCellGeometry(Fa[L]),+null!=xa&&xa.relative&&0>=xa.x&&this.model.remove(Fa[L]);var Ma=this.model.getTerminal(R,!1);if(null!=Ma){var Wa=this.getCurrentCellStyle(Ma);null!=Wa&&"1"==Wa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[x]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[x]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{this.model.endUpdate()}return R};var Q=Graph.prototype.selectCell;Graph.prototype.selectCell=function(x,+L,R){if(L||R)Q.apply(this,arguments);else{var W=this.getSelectionCell(),ja=null,ka=[],oa=mxUtils.bind(this,function(va){if(null!=this.view.getState(va)&&(this.model.isVertex(va)||this.model.isEdge(va)))if(ka.push(va),va==W)ja=ka.length-1;else if(x&&null==W&&0<ka.length||null!=ja&&x&&ka.length>ja||!x&&0<ja)return;for(var ta=0;ta<this.model.getChildCount(va);ta++)oa(this.model.getChildAt(va,ta))});oa(this.model.root);0<ka.length&&(ja=null!=ja?mxUtils.mod(ja+(x?1:-1),ka.length):0,this.setSelectionCell(ka[ja]))}};+Graph.prototype.swapShapes=function(x,L){if(this.model.isVertex(x)&&this.model.isVertex(L)&&2==this.getMovableCells([x,L]).length){var R=this.getCellGeometry(x),W=this.getCellGeometry(L);if(null!=R&&null!=W){var ja=R.clone(),ka=W.clone();this.model.beginUpdate();try{ja.x=W.getCenterX()-R.width/2,ja.y=W.getCenterY()-R.height/2,ka.x=R.getCenterX()-W.width/2,ka.y=R.getCenterY()-W.height/2,this.model.setGeometry(x,ja),this.model.setGeometry(L,ka)}finally{this.model.endUpdate()}}}};var c=Graph.prototype.moveCells;+Graph.prototype.moveCells=function(x,L,R,W,ja,ka,oa){oa=null!=oa?oa:{};if(this.isTable(ja)){for(var va=[],ta=0;ta<x.length;ta++)this.isTable(x[ta])?va=va.concat(this.model.getChildCells(x[ta],!0).reverse()):va.push(x[ta]);x=va}this.model.beginUpdate();try{va=[];for(ta=0;ta<x.length;ta++)if(null!=ja&&this.isTableRow(x[ta])){var xa=this.model.getParent(x[ta]),Fa=this.getCellGeometry(x[ta]);this.isTable(xa)&&va.push(xa);if(null!=xa&&null!=Fa&&this.isTable(xa)&&this.isTable(ja)&&(W||xa!=ja)){if(!W){var Ma=+this.getCellGeometry(xa);null!=Ma&&(Ma=Ma.clone(),Ma.height-=Fa.height,this.model.setGeometry(xa,Ma))}Ma=this.getCellGeometry(ja);null!=Ma&&(Ma=Ma.clone(),Ma.height+=Fa.height,this.model.setGeometry(ja,Ma));var Wa=this.model.getChildCells(ja,!0);if(0<Wa.length){x[ta]=W?this.cloneCell(x[ta]):x[ta];var Xa=this.model.getChildCells(x[ta],!0),ab=this.model.getChildCells(Wa[0],!0),Oa=ab.length-Xa.length;if(0<Oa)for(var Ra=0;Ra<Oa;Ra++){var kb=this.cloneCell(Xa[Xa.length-1]);null!=kb&&(kb.value="",this.model.add(x[ta],+kb))}else if(0>Oa)for(Ra=0;Ra>Oa;Ra--)this.model.remove(Xa[Xa.length+Ra-1]);Xa=this.model.getChildCells(x[ta],!0);for(Ra=0;Ra<ab.length;Ra++){var cb=this.getCellGeometry(ab[Ra]),Za=this.getCellGeometry(Xa[Ra]);null!=cb&&null!=Za&&(Za=Za.clone(),Za.width=cb.width,this.model.setGeometry(Xa[Ra],Za))}}}}var gb=c.apply(this,arguments);for(ta=0;ta<va.length;ta++)!W&&this.model.contains(va[ta])&&0==this.model.getChildCount(va[ta])&&this.model.remove(va[ta]);W&&this.updateCustomLinks(this.createCellMapping(oa,+this.createCellLookup(x)),gb)}finally{this.model.endUpdate()}return gb};var f=Graph.prototype.removeCells;Graph.prototype.removeCells=function(x,L){var R=[];this.model.beginUpdate();try{for(var W=0;W<x.length;W++)if(this.isTableCell(x[W])){var ja=this.model.getParent(x[W]),ka=this.model.getParent(ja);1==this.model.getChildCount(ja)&&1==this.model.getChildCount(ka)?0>mxUtils.indexOf(x,ka)&&0>mxUtils.indexOf(R,ka)&&R.push(ka):this.labelChanged(x[W],"")}else{if(this.isTableRow(x[W])&&(ka=this.model.getParent(x[W]),+0>mxUtils.indexOf(x,ka)&&0>mxUtils.indexOf(R,ka))){for(var oa=this.model.getChildCells(ka,!0),va=0,ta=0;ta<oa.length;ta++)0<=mxUtils.indexOf(x,oa[ta])&&va++;va==oa.length&&R.push(ka)}R.push(x[W])}R=f.apply(this,[R,L])}finally{this.model.endUpdate()}return R};Graph.prototype.updateCustomLinks=function(x,L,R){R=null!=R?R:new Graph;for(var W=0;W<L.length;W++)null!=L[W]&&R.updateCustomLinksForCell(x,L[W],R)};Graph.prototype.updateCustomLinksForCell=function(x,L){this.doUpdateCustomLinksForCell(x,L);for(var R=+this.model.getChildCount(L),W=0;W<R;W++)this.updateCustomLinksForCell(x,this.model.getChildAt(L,W))};Graph.prototype.doUpdateCustomLinksForCell=function(x,L){};Graph.prototype.getAllConnectionConstraints=function(x,L){if(null!=x){L=mxUtils.getValue(x.style,"points",null);if(null!=L){x=[];try{var R=JSON.parse(L);for(L=0;L<R.length;L++){var W=R[L];x.push(new mxConnectionConstraint(new mxPoint(W[0],W[1]),2<W.length?"0"!=W[2]:!0,null,3<W.length?W[3]:0,4<W.length?W[4]:0))}}catch(ka){}return x}if(null!=+x.shape&&null!=x.shape.bounds){W=x.shape.direction;L=x.shape.bounds;var ja=x.shape.scale;R=L.width/ja;L=L.height/ja;if(W==mxConstants.DIRECTION_NORTH||W==mxConstants.DIRECTION_SOUTH)W=R,R=L,L=W;L=x.shape.getConstraints(x.style,R,L);if(null!=L)return L;if(null!=x.shape.stencil&&null!=x.shape.stencil.constraints)return x.shape.stencil.constraints;if(null!=x.shape.constraints)return x.shape.constraints}}return null};Graph.prototype.flipEdge=function(x){if(null!=x){var L=this.getCurrentCellStyle(x);L=+mxUtils.getValue(L,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,L,[x])}};Graph.prototype.isValidRoot=function(x){for(var L=this.model.getChildCount(x),R=0,W=0;W<L;W++){var ja=this.model.getChildAt(x,W);this.model.isVertex(ja)&&(ja=this.getCellGeometry(ja),null==ja||ja.relative||R++)}return 0<R||this.isContainer(x)};Graph.prototype.isValidDropTarget=function(x,L,+R){for(var W=this.getCurrentCellStyle(x),ja=!0,ka=!0,oa=0;oa<L.length&&ka;oa++)ja=ja&&this.isTable(L[oa]),ka=ka&&this.isTableRow(L[oa]);return!this.isCellLocked(x)&&(this.isTargetShape(x,L,R)||("1"!=mxUtils.getValue(W,"part","0")||this.isContainer(x))&&"0"!=mxUtils.getValue(W,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(x))&&!this.isTableRow(x)&&(!this.isTable(x)||ka||ja))};Graph.prototype.createGroupCell=function(){var x=mxGraph.prototype.createGroupCell.apply(this,+arguments);x.setStyle("group");return x};Graph.prototype.isExtendParentsOnAdd=function(x){var L=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(L&&null!=x&&null!=this.layoutManager){var R=this.model.getParent(x);null!=R&&(R=this.layoutManager.getLayout(R),null!=R&&R.constructor==mxStackLayout&&(L=!1))}return L};Graph.prototype.getPreferredSizeForCell=function(x,L,R){R=null!=R?R:this.gridEnabled;var W=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=W&&(W.width+=+10,W.height+=4,R&&(W.width=this.snap(W.width),W.height=this.snap(W.height)));return W};Graph.prototype.turnShapes=function(x,L){var R=this.getModel(),W=[];R.beginUpdate();try{for(var ja=0;ja<x.length;ja++){var ka=x[ja];if(R.isEdge(ka)){var oa=R.getTerminal(ka,!0),va=R.getTerminal(ka,!1);R.setTerminal(ka,va,!0);R.setTerminal(ka,oa,!1);var ta=R.getGeometry(ka);if(null!=ta){ta=ta.clone();null!=ta.points&&ta.points.reverse();var xa=ta.getTerminalPoint(!0),Fa=ta.getTerminalPoint(!1);ta.setTerminalPoint(xa,+!1);ta.setTerminalPoint(Fa,!0);R.setGeometry(ka,ta);var Ma=this.view.getState(ka),Wa=this.view.getState(oa),Xa=this.view.getState(va);if(null!=Ma){var ab=null!=Wa?this.getConnectionConstraint(Ma,Wa,!0):null,Oa=null!=Xa?this.getConnectionConstraint(Ma,Xa,!1):null;this.setConnectionConstraint(ka,oa,!0,Oa);this.setConnectionConstraint(ka,va,!1,ab);var Ra=mxUtils.getValue(Ma.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ma.style,+mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ka]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ra,[ka])}W.push(ka)}}else if(R.isVertex(ka)&&(ta=this.getCellGeometry(ka),null!=ta)){if(!(this.isTable(ka)||this.isTableRow(ka)||this.isTableCell(ka)||this.isSwimlane(ka))){ta=ta.clone();ta.x+=ta.width/2-ta.height/2;ta.y+=ta.height/2-ta.width/2;var kb=ta.width;ta.width=ta.height;ta.height=kb;R.setGeometry(ka,ta)}var cb=this.view.getState(ka);if(null!=cb){var Za=[mxConstants.DIRECTION_EAST,+mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],gb=mxUtils.getValue(cb.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Za[mxUtils.mod(mxUtils.indexOf(Za,gb)+(L?-1:1),Za.length)],[ka])}W.push(ka)}}}finally{R.endUpdate()}return W};Graph.prototype.stencilHasPlaceholders=function(x){if(null!=x&&null!=x.fgNode)for(x=x.fgNode.firstChild;null!=x;){if("text"==x.nodeName&&"1"==x.getAttribute("placeholders"))return!0;+x=x.nextSibling}return!1};var l=Graph.prototype.processChange;Graph.prototype.processChange=function(x){if(x instanceof mxGeometryChange&&(this.isTableCell(x.cell)||this.isTableRow(x.cell))&&(null==x.previous&&null!=x.geometry||null!=x.previous&&!x.previous.equals(x.geometry))){var L=x.cell;this.isTableCell(L)&&(L=this.model.getParent(L));this.isTableRow(L)&&(L=this.model.getParent(L));var R=this.view.getState(L);null!=R&&null!=R.shape&&(this.view.invalidate(L),R.shape.bounds=null)}l.apply(this,arguments);+x instanceof mxValueChange&&null!=x.cell&&null!=x.cell.value&&"object"==typeof x.cell.value&&this.invalidateDescendantsWithPlaceholders(x.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(x){x=this.model.getDescendants(x);if(0<x.length)for(var L=0;L<x.length;L++){var R=this.view.getState(x[L]);null!=R&&null!=R.shape&&null!=R.shape.stencil&&this.stencilHasPlaceholders(R.shape.stencil)?this.removeStateForCell(x[L]):this.isReplacePlaceholders(x[L])&&this.view.invalidate(x[L],!1,!1)}};+Graph.prototype.replaceElement=function(x,L){L=x.ownerDocument.createElement(null!=L?L:"span");for(var R=Array.prototype.slice.call(x.attributes);attr=R.pop();)L.setAttribute(attr.nodeName,attr.nodeValue);L.innerHTML=x.innerHTML;x.parentNode.replaceChild(L,x)};Graph.prototype.processElements=function(x,L){if(null!=x){x=x.getElementsByTagName("*");for(var R=0;R<x.length;R++)null!=x[R]&&L(x[R])}};Graph.prototype.updateLabelElements=function(x,L,R){x=null!=x?x:this.getSelectionCells();for(var W=document.createElement("div"),+ja=0;ja<x.length;ja++){var ka=this.getCurrentCellStyle(x[ja]);if(null!=ka&&"1"==ka.html&&(ka=this.convertValueToString(x[ja]),null!=ka&&0<ka.length)){W.innerHTML=Graph.sanitizeHtml(ka);for(var oa=W.getElementsByTagName(null!=R?R:"*"),va=0;va<oa.length;va++)L(oa[va]);W.innerHTML!=ka&&this.cellLabelChanged(x[ja],W.innerHTML)}}};Graph.prototype.cellLabelChanged=function(x,L,R){L=Graph.zapGremlins(L);this.model.beginUpdate();try{if(null!=x.value&&"object"==typeof x.value){if(this.isReplacePlaceholders(x)&&+null!=x.getAttribute("placeholder"))for(var W=x.getAttribute("placeholder"),ja=x;null!=ja;){if(ja==this.model.getRoot()||null!=ja.value&&"object"==typeof ja.value&&ja.hasAttribute(W)){this.setAttributeForCell(ja,W,L);break}ja=this.model.getParent(ja)}var ka=x.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ka.hasAttribute("label_"+Graph.diagramLanguage)?ka.setAttribute("label_"+Graph.diagramLanguage,L):ka.setAttribute("label",L);L=ka}mxGraph.prototype.cellLabelChanged.apply(this,+arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(x){if(null!=x){for(var L=new mxDictionary,R=0;R<x.length;R++)L.put(x[R],!0);var W=[];for(R=0;R<x.length;R++){var ja=this.model.getParent(x[R]);null==ja||L.get(ja)||(L.put(ja,!0),W.push(ja))}for(R=0;R<W.length;R++)if(ja=this.view.getState(W[R]),null!=ja&&(this.model.isEdge(ja.cell)||this.model.isVertex(ja.cell))&&this.isCellDeletable(ja.cell)&&this.isTransparentState(ja)){for(var ka=!0,oa=0;oa<this.model.getChildCount(ja.cell)&&+ka;oa++)L.get(this.model.getChildAt(ja.cell,oa))||(ka=!1);ka&&x.push(ja.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(x){for(var L=[],R=0;R<x.length;R++)this.isCellDeletable(x[R])&&this.isTransparentState(this.view.getState(x[R]))&&L.push(x[R]);x=L;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(x,L){this.setAttributeForCell(x,"link",L)};Graph.prototype.setTooltipForCell=function(x,+L){var R="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(x.value)&&x.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(x,R,L)};Graph.prototype.getAttributeForCell=function(x,L,R){x=null!=x.value&&"object"===typeof x.value?x.value.getAttribute(L):null;return null!=x?x:R};Graph.prototype.setAttributeForCell=function(x,L,R){if(null!=x.value&&"object"==typeof x.value)var W=x.value.cloneNode(!0);else W=mxUtils.createXmlDocument().createElement("UserObject"),+W.setAttribute("label",x.value||"");null!=R?W.setAttribute(L,R):W.removeAttribute(L);this.model.setValue(x,W)};Graph.prototype.isTargetShape=function(x,L,R){x=mxUtils.getValue(this.getCurrentCellStyle(x),mxConstants.STYLE_SHAPE,"");for(R=0;R<L.length;R++){var W=mxUtils.getValue(this.getCurrentCellStyle(L[R]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(W,x))return!0}return!1};var t=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(x,L,R,W){if(mxEvent.isAltDown(L))return null;+for(var ja=0;ja<x.length;ja++){var ka=this.model.getParent(x[ja]);if(this.model.isEdge(ka)&&0>mxUtils.indexOf(x,ka))return null}ka=t.apply(this,arguments);var oa=!0;for(ja=0;ja<x.length&&oa;ja++)oa=oa&&this.isTableRow(x[ja]);oa&&(this.isTableCell(ka)&&(ka=this.model.getParent(ka)),this.isTableRow(ka)&&(ka=this.model.getParent(ka)),this.isTable(ka)||(ka=null));return ka};Graph.prototype.click=function(x){mxGraph.prototype.click.call(this,x);this.firstClickState=x.getState();this.firstClickSource=x.getSource()};+Graph.prototype.dblClick=function(x,L){this.isEnabled()&&(L=this.insertTextForEvent(x,L),mxGraph.prototype.dblClick.call(this,x,L))};Graph.prototype.insertTextForEvent=function(x,L){var R=mxUtils.convertPoint(this.container,mxEvent.getClientX(x),mxEvent.getClientY(x));if(null!=x&&!this.model.isVertex(L)){var W=this.model.isEdge(L)?this.view.getState(L):null,ja=mxEvent.getSource(x);this.firstClickState!=W||this.firstClickSource!=ja||null!=W&&null!=W.text&&null!=W.text.node&&null!=W.text.boundingBox&&+(mxUtils.contains(W.text.boundingBox,R.x,R.y)||mxUtils.isAncestorNode(W.text.node,mxEvent.getSource(x)))||(null!=W||this.isCellLocked(this.getDefaultParent()))&&(null==W||this.isCellLocked(W.cell))||!(null!=W||mxClient.IS_SVG&&ja==this.view.getCanvas().ownerSVGElement)||(null==W&&(W=this.view.getState(this.getCellAt(R.x,R.y))),L=this.addText(R.x,R.y,W))}return L};Graph.prototype.getInsertPoint=function(){var x=this.getGridSize(),L=this.container.scrollLeft/this.view.scale-this.view.translate.x,R=+this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var W=this.getPageLayout(),ja=this.getPageSize();L=Math.max(L,W.x*ja.width);R=Math.max(R,W.y*ja.height)}return new mxPoint(this.snap(L+x),this.snap(R+x))};Graph.prototype.getFreeInsertPoint=function(){var x=this.view,L=this.getGraphBounds(),R=this.getInsertPoint(),W=this.snap(Math.round(Math.max(R.x,L.x/x.scale-x.translate.x+(0==L.width?2*this.gridSize:0))));x=this.snap(Math.round(Math.max(R.y,(L.y+L.height)/x.scale-+x.translate.y+2*this.gridSize)));return new mxPoint(W,x)};Graph.prototype.getCenterInsertPoint=function(x){x=null!=x?x:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-x.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/+2/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-x.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(x,L){x=null!=x?x:"";null!=L&&(0<x.length&&";"!=x.charAt(x.length-1)&&(x+=";"),x+="fontSize="+L+";");return x};Graph.prototype.addText=function(x,L,R){var W=new mxCell;W.value="Text";W.geometry=new mxGeometry(0,0,0,0);W.vertex=!0;if(null!=R&&this.model.isEdge(R.cell)){W.style=+"edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);W.geometry.relative=!0;W.connectable=!1;var ja=this.view.getRelativePoint(R,x,L);W.geometry.x=Math.round(1E4*ja.x)/1E4;W.geometry.y=Math.round(ja.y);W.geometry.offset=new mxPoint(0,0);ja=this.view.getPoint(R,W.geometry);var ka=this.view.scale;W.geometry.offset=new mxPoint(Math.round((x-ja.x)/ka),Math.round((L-ja.y)/ka))}else ja=this.view.translate,W.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",+this.vertexFontSize),W.geometry.width=40,W.geometry.height=20,W.geometry.x=Math.round(x/this.view.scale)-ja.x-(null!=R?R.origin.x:0),W.geometry.y=Math.round(L/this.view.scale)-ja.y-(null!=R?R.origin.y:0),W.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([W],null!=R?R.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[W])),this.autoSizeCell(W)}finally{this.getModel().endUpdate()}return W};Graph.prototype.addClickHandler=function(x,L,R){var W=mxUtils.bind(this,+function(){var ta=this.container.getElementsByTagName("a");if(null!=ta)for(var xa=0;xa<ta.length;xa++){var Fa=this.getAbsoluteUrl(ta[xa].getAttribute("href"));null!=Fa&&(ta[xa].setAttribute("rel",this.linkRelation),ta[xa].setAttribute("href",Fa),null!=L&&mxEvent.addGestureListeners(ta[xa],null,null,L))}});this.model.addListener(mxEvent.CHANGE,W);W();var ja=this.container.style.cursor,ka=this.getTolerance(),oa=this,va={currentState:null,currentLink:null,currentTarget:null,highlight:null!=x&&""!=x&&+x!=mxConstants.NONE?new mxCellHighlight(oa,x,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ta){var xa=ta.sourceState;if(null==xa||null==oa.getLinkForCell(xa.cell))ta=oa.getCellAt(ta.getGraphX(),ta.getGraphY(),null,null,null,function(Fa,Ma,Wa){return null==oa.getLinkForCell(Fa.cell)}),xa=null==xa||oa.model.isAncestor(ta,xa.cell)?oa.view.getState(ta):null;xa!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=xa,null!=this.currentState&&this.activate(this.currentState))},+mouseDown:function(ta,xa){this.startX=xa.getGraphX();this.startY=xa.getGraphY();this.scrollLeft=oa.container.scrollLeft;this.scrollTop=oa.container.scrollTop;null==this.currentLink&&"auto"==oa.container.style.overflow&&(oa.container.style.cursor="move");this.updateCurrentState(xa)},mouseMove:function(ta,xa){if(oa.isMouseDown)null!=this.currentLink&&(ta=Math.abs(this.startX-xa.getGraphX()),xa=Math.abs(this.startY-xa.getGraphY()),(ta>ka||xa>ka)&&this.clear());else{for(ta=xa.getSource();null!=ta&&"a"!=+ta.nodeName.toLowerCase();)ta=ta.parentNode;null!=ta?this.clear():(null!=oa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&oa.tooltipHandler.reset(xa,!0,this.currentState),(null==this.currentState||xa.getState()!=this.currentState&&null!=xa.sourceState||!oa.intersects(this.currentState,xa.getGraphX(),xa.getGraphY()))&&this.updateCurrentState(xa))}},mouseUp:function(ta,xa){var Fa=xa.getSource();for(ta=xa.getEvent();null!=Fa&&"a"!=Fa.nodeName.toLowerCase();)Fa=Fa.parentNode;null==+Fa&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-oa.container.scrollTop)<ka&&(null==xa.sourceState||!xa.isSource(xa.sourceState.control))&&((mxEvent.isLeftMouseButton(ta)||mxEvent.isMiddleMouseButton(ta))&&!mxEvent.isPopupTrigger(ta)||mxEvent.isTouchEvent(ta))&&(null!=this.currentLink?(Fa=oa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Fa||null==L||L(ta,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ta)||+(ta=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ta)?"_blank":Fa?oa.linkTarget:"_top",oa.openLink(this.currentLink,ta),xa.consume())):null!=R&&!xa.isConsumed()&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-oa.container.scrollTop)<ka&&Math.abs(this.startX-xa.getGraphX())<ka&&Math.abs(this.startY-xa.getGraphY())<ka&&R(xa.getEvent()));this.clear()},activate:function(ta){this.currentLink=oa.getAbsoluteUrl(oa.getLinkForCell(ta.cell));null!=this.currentLink&&+(this.currentTarget=oa.getLinkTargetForCell(ta.cell),oa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ta))},clear:function(){null!=oa.container&&(oa.container.style.cursor=ja);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=oa.tooltipHandler&&oa.tooltipHandler.hide()}};oa.click=function(ta){};oa.addMouseListener(va);mxEvent.addListener(document,"mouseleave",function(ta){va.clear()})};Graph.prototype.duplicateCells=+function(x,L){x=null!=x?x:this.getSelectionCells();L=null!=L?L:!0;for(var R=0;R<x.length;R++)this.isTableCell(x[R])&&(x[R]=this.model.getParent(x[R]));x=this.model.getTopmostCells(x);var W=this.getModel(),ja=this.gridSize,ka=[];W.beginUpdate();try{var oa={},va=this.createCellLookup(x),ta=this.cloneCells(x,!1,oa,!0);for(R=0;R<x.length;R++){var xa=W.getParent(x[R]);if(null!=xa){var Fa=this.moveCells([ta[R]],ja,ja,!1)[0];ka.push(Fa);if(L)W.add(xa,ta[R]);else{var Ma=xa.getIndex(x[R]);W.add(xa,ta[R],Ma++1)}if(this.isTable(xa)){var Wa=this.getCellGeometry(ta[R]),Xa=this.getCellGeometry(xa);null!=Wa&&null!=Xa&&(Xa=Xa.clone(),Xa.height+=Wa.height,W.setGeometry(xa,Xa))}}else ka.push(ta[R])}this.updateCustomLinks(this.createCellMapping(oa,va),ta,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ta))}finally{W.endUpdate()}return ka};Graph.prototype.insertImage=function(x,L,R){if(null!=x&&null!=this.cellEditor.textarea){for(var W=this.cellEditor.textarea.getElementsByTagName("img"),ja=+[],ka=0;ka<W.length;ka++)ja.push(W[ka]);document.execCommand("insertimage",!1,x);x=this.cellEditor.textarea.getElementsByTagName("img");if(x.length==ja.length+1)for(ka=x.length-1;0<=ka;ka--)if(0==ka||x[ka]!=ja[ka-1]){x[ka].setAttribute("width",L);x[ka].setAttribute("height",R);break}}};Graph.prototype.insertLink=function(x){if(null!=this.cellEditor.textarea)if(0==x.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var L=this.cellEditor.textarea.getElementsByTagName("a"),R=[],W=+0;W<L.length;W++)R.push(L[W]);document.execCommand("createlink",!1,mxUtils.trim(x));L=this.cellEditor.textarea.getElementsByTagName("a");if(L.length==R.length+1)for(W=L.length-1;0<=W;W--)if(L[W]!=R[W-1]){for(L=L[W].getElementsByTagName("a");0<L.length;){for(R=L[0].parentNode;null!=L[0].firstChild;)R.insertBefore(L[0].firstChild,L[0]);R.removeChild(L[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(x))};Graph.prototype.isCellResizable=function(x){var L=mxGraph.prototype.isCellResizable.apply(this,+arguments),R=this.getCurrentCellStyle(x);return!this.isTableCell(x)&&!this.isTableRow(x)&&(L||"0"!=mxUtils.getValue(R,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==R[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(x,L,R){null==L&&(L=this.getSelectionCells());if(null!=L&&1<L.length){for(var W=[],ja=null,ka=null,oa=0,va=0;va<L.length;va++)if(this.getModel().isVertex(L[va])){var ta=this.view.getState(L[va]);if(null!=ta){var xa=x?ta.getCenterX():ta.getCenterY();ja=null!=ja?Math.max(ja,+xa):xa;ka=null!=ka?Math.min(ka,xa):xa;R&&(oa+=x?ta.width:ta.height);W.push(ta)}}if(2<W.length){W.sort(function(ab,Oa){return x?ab.x-Oa.x:ab.y-Oa.y});R&&(oa-=x?W[0].width/2+W[W.length-1].width/2:W[0].height/2+W[W.length-1].height/2);ta=this.view.translate;xa=this.view.scale;ka=ka/xa-(x?ta.x:ta.y);ja=ja/xa-(x?ta.x:ta.y);this.getModel().beginUpdate();try{var Fa=(ja-ka-oa)/(W.length-1),Ma=ka+(R?x?W[0].width/2:W[0].height/2:0);for(va=1;va<W.length-1;va++){var Wa=this.view.getState(this.model.getParent(W[va].cell)),+Xa=this.getCellGeometry(W[va].cell);Ma+=Fa;null!=Xa&&null!=Wa&&(Xa=Xa.clone(),x?Xa.x=Math.round(Ma-(R?0:Xa.width/2))-Wa.origin.x:Xa.y=Math.round(Ma-(R?0:Xa.height/2))-Wa.origin.y,this.getModel().setGeometry(W[va].cell,Xa));R&&(Ma+=x?W[va].width:W[va].height)}}finally{this.getModel().endUpdate()}}}return L};Graph.prototype.isCloneEvent=function(x){return mxClient.IS_MAC&&mxEvent.isMetaDown(x)||mxEvent.isControlDown(x)};Graph.prototype.createSvgImageExport=function(x){x=new mxImageExport;x.addCellData=+function(R,W,ja){W.setAttribute("data-cell-id",R.id);if(ja)if(mxUtils.isNode(R.value))for(ja=0;ja<R.value.attributes.length;ja++){var ka=R.value.attributes[ja];W.setAttribute("data-cell-"+ka.name,ka.value)}else if("object"===typeof R.value)for(ka in R.value)W.setAttribute("data-cell-"+ka,R.value[ka]);else null!=R.value&&W.setAttribute("data-cell-value",R.value);return W};var L=x.visitStatesRecursive;x.visitStatesRecursive=function(R,W,ja){if(null!=R){var ka=W.root,oa=W.root.ownerDocument;W.root=this.addCellData(R.cell,+null!=oa.createElementNS?oa.createElementNS(mxConstants.NS_SVG,"g"):oa.createElement("g"),Editor.addSvgMetadata);ka.appendChild(W.root);L.apply(this,arguments);W.root=ka}};x.getLinkForCellState=mxUtils.bind(this,function(R,W){return this.getLinkForCell(R.cell)});x.getTitleForCellState=mxUtils.bind(this,function(R,W){return Editor.convertHtmlToText(this.convertValueToTooltip(R.cell))});return x};Graph.prototype.parseBackgroundImage=function(x){var L=null;null!=x&&0<x.length&&(x=JSON.parse(x),L=new mxImage(x.src,+x.width,x.height));return L};Graph.prototype.getBackgroundImageObject=function(x){return x};Graph.prototype.getSvg=function(x,L,R,W,ja,ka,oa,va,ta,xa,Fa,Ma,Wa,Xa,ab,Oa){var Ra=null;if(null!=Xa)for(Ra=new mxDictionary,Fa=0;Fa<Xa.length;Fa++)Ra.put(Xa[Fa],!0);Xa=this.useCssTransforms;var kb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Xa&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{L=null!=L?L:1;R=null!=R?R:0;ja=null!=ja?ja:!0;ka=null!=ka?ka:!0;oa=null!=oa?oa:+!0;xa=null!=xa?xa:!1;var cb="page"==Wa?this.view.getBackgroundPageBounds():ka&&null==Ra||W||"diagram"==Wa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Za=this.backgroundImage,gb=this.view.translate,hb=this.view.scale;"diagram"==Wa&&null!=Za&&null!=Za.width&&null!=Za.height&&(cb=mxRectangle.fromRectangle(cb),cb.add(new mxRectangle((gb.x+Za.x)*hb,(gb.y+Za.y)*hb,Za.width*hb,Za.height*hb)));if(null==cb)throw Error(mxResources.get("drawingEmpty"));W=L/hb;var vb=Math.max(1,Math.ceil(cb.width*+W)+2*R)+(xa&&0==R?5:0),mb=Math.max(1,Math.ceil(cb.height*W)+2*R)+(xa&&0==R?5:0);xa=ja?-.5:0;var pb=mxUtils.getLightDarkColor(x),db=Graph.createSvgNode(xa,xa,vb,mb,pb),qb=db.ownerDocument;if(null!=x){var nb=mxUtils.createElementNs(qb,mxConstants.NS_SVG,"rect");nb.setAttribute("fill",pb.light);nb.style.fill=pb.cssText;nb.setAttribute("width","100%");nb.setAttribute("height","100%");nb.setAttribute("x","0");nb.setAttribute("y","0");db.appendChild(nb)}var lb=mxUtils.createElementNs(qb,mxConstants.NS_SVG,+"g");db.appendChild(lb);var eb=this.createSvgCanvas(lb);eb.foOffset=ja?-.5:0;eb.textOffset=ja?-.5:0;eb.imageOffset=ja?-.5:0;eb.translate(Math.floor(R/L-cb.x/hb),Math.floor(R/L-cb.y/hb));eb.idPrefix="drawio-svg-"+Editor.guid();var tb=document.createElement("div"),ob=eb.getAlternateText;eb.getAlternateText=function(ib,Bb,sb,xb,zb,rb,Cb,d,n,y,q,v,D){if(null!=rb&&0<this.state.fontSize)try{mxUtils.isNode(rb)?rb=rb.innerText:(tb.innerHTML=rb,rb=mxUtils.extractTextWithWhitespace(tb.childNodes));for(var E=+Math.ceil(2*xb/this.state.fontSize),ha=[],M=0,ua=0;(0==E||M<E)&&ua<rb.length;){var na=rb.charCodeAt(ua);if(10==na||13==na){if(0<M)break}else ha.push(rb.charAt(ua)),255>na&&M++;ua++}ha.length<rb.length&&1<rb.length-ha.length&&(rb=mxUtils.trim(ha.join(""))+"...");return rb}catch(Va){return ob.apply(this,arguments)}else return ob.apply(this,arguments)};null!=Za&&null!=Za.width&&null!=Za.height&&(x=hb/L,xa=new mxRectangle((Za.x+gb.x)*x,(Za.y+gb.y)*x,Za.width*x,Za.height*x),mxUtils.intersects(cb,xa)&&+eb.image(Za.x+gb.x,Za.y+gb.y,Za.width,Za.height,Za.src,!0));eb.scale(W);eb.textEnabled=oa;va=null!=va?va:this.createSvgImageExport();var ub=va.getLinkForCellState;va.getLinkForCellState=function(ib,Bb){var sb=ib.view.graph.getAbsoluteUrl(ub.apply(this,arguments));return null==sb||ib.view.graph.isCustomLink(sb)?null:sb};va.getLinkTargetForCellState=function(ib,Bb){return ib.view.graph.getLinkTargetForCell(ib.cell)};var Ab=va.drawCellState,yb=null,wb=mxUtils.bind(this,function(){if(null==yb){yb="ge-flow-animation-"++Editor.guid();var ib=null!=qb.createElementNS?qb.createElementNS(mxConstants.NS_SVG,"style"):qb.createElement("style");ib.innerHTML=this.createFlowAnimationCss(yb);qb.getElementsByTagName("defs")[0].appendChild(ib)}return yb});va.drawCellState=function(ib,Bb){for(var sb=ib.view.graph,xb=null!=Ra?Ra.get(ib.cell):sb.isCellSelected(ib.cell),zb=sb.model.getParent(ib.cell);!(ka&&null==Ra||xb)&&null!=zb;)xb=null!=Ra?Ra.get(zb):sb.isCellSelected(zb),zb=sb.model.getParent(zb);if(null!=ib.shape)try{var rb=+ib.shape.isFlowAnimationEnabled,Cb=ib.shape.addFlowAnimationToShape;ib.shape.isFlowAnimationEnabled=function(){return kb&&sb.model.isEdge(ib.cell)&&"1"==mxUtils.getValue(ib.style,"flowAnimation","0")};ib.shape.addFlowAnimationToShape=function(){sb.addFlowAnimationToNode(this.getFlowAnimationPath(),ib.style,L,wb())};if(ka&&null==Ra||xb)sb.view.redrawEnumerationState(ib),Ab.apply(this,arguments),this.doDrawShape(ib.secondLabel,Bb)}finally{ib.shape.isFlowAnimationEnabled=rb,ib.shape.addFlowAnimationToShape=+Cb}};var jb=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;va.drawState(this.getView().getState(jb),eb);this.addForeignObjectWarning(eb,db);Oa?this.disableSvgLinks(db):this.updateSvgLinks(db,ta,!0);return db}finally{this.enableFlowAnimation=kb,Xa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(x,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var R=x.createElement("switch"),+W=x.createElement("g");W.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ja=x.createElement("a");ja.setAttribute("transform","translate(0,-5)");null==ja.setAttributeNS||L.ownerDocument!=document&&null==document.documentMode?(ja.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ja.setAttribute("target","_blank")):(ja.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ja.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));+x=x.createElement("text");x.setAttribute("text-anchor","middle");x.setAttribute("font-size","10px");x.setAttribute("x","50%");x.setAttribute("y","100%");mxUtils.write(x,Graph.foreignObjectWarningText);R.appendChild(W);ja.appendChild(x);R.appendChild(ja);L.appendChild(R)}};Graph.prototype.disableSvgLinks=function(x,L){x=x.getElementsByTagName("a");for(var R=0;R<x.length;R++){var W=x[R].getAttribute("href");null==W&&(W=x[R].getAttribute("xlink:href"));null!=W&&(x[R].style.pointerEvents="none",x[R].setAttribute("href",+""));L&&L(x[R])}};Graph.prototype.updateSvgLinks=function(x,L,R){x=x.getElementsByTagName("a");for(var W=0;W<x.length;W++)if(null==x[W].getAttribute("target")){var ja=x[W].getAttribute("href");null==ja&&(ja=x[W].getAttribute("xlink:href"));null!=ja&&(null!=L&&/^https?:\/\//.test(ja)?x[W].setAttribute("target",L):R&&this.isCustomLink(ja)&&x[W].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(x){x=new mxSvgCanvas2D(x);x.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;+x.adaptiveColors=this.getAdaptiveColors();x.pointerEvents=!0;return x};Graph.prototype.getSelectedElement=function(){var x=null;if(window.getSelection){var L=window.getSelection();L.getRangeAt&&L.rangeCount&&(x=L.getRangeAt(0).commonAncestorContainer)}else document.selection&&(x=document.selection.createRange().parentElement());return x};Graph.prototype.getSelectedEditingElement=function(){var x=null;if(null!=this.cellEditor.textarea)for(x=this.getSelectedElement();null!=x&&x.nodeType!=mxConstants.NODETYPE_ELEMENT;)x=+x.parentNode;return x};Graph.prototype.getParentByName=function(x,L,R){for(;null!=x&&x.nodeName!=L;){if(x==R)return null;x=x.parentNode}return x};Graph.prototype.getParentByNames=function(x,L,R){for(;null!=x&&!(0<=mxUtils.indexOf(L,x.nodeName));){if(x==R)return null;x=x.parentNode}return x};Graph.prototype.selectNode=function(x){var L=null;if(window.getSelection){if(L=window.getSelection(),L.getRangeAt&&L.rangeCount){var R=document.createRange();R.selectNode(x);L.removeAllRanges();L.addRange(R)}}else(L=+document.selection)&&"Control"!=L.type&&(x=L.createRange(),x.collapse(!0),R=L.createRange(),R.setEndPoint("StartToStart",x),R.select())};Graph.prototype.flipEdgePoints=function(x,L,R){var W=this.getCellGeometry(x);if(null!=W){W=W.clone();if(null!=W.points)for(var ja=0;ja<W.points.length;ja++)L?W.points[ja].x=R+(R-W.points[ja].x):W.points[ja].y=R+(R-W.points[ja].y);ja=function(ka){null!=ka&&(L?ka.x=R+(R-ka.x):ka.y=R+(R-ka.y))};ja(W.getTerminalPoint(!0));ja(W.getTerminalPoint(!1));this.model.setGeometry(x,+W)}};Graph.prototype.flipChildren=function(x,L,R){this.model.beginUpdate();try{for(var W=this.model.getChildCount(x),ja=0;ja<W;ja++){var ka=this.model.getChildAt(x,ja);if(this.model.isEdge(ka))this.flipEdgePoints(ka,L,R);else{var oa=this.getCellGeometry(ka);null!=oa&&(oa=oa.clone(),L?oa.x=R+(R-oa.x-oa.width):oa.y=R+(R-oa.y-oa.height),this.model.setGeometry(ka,oa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(x,L){this.model.beginUpdate();try{x=this.model.getTopmostCells(x);+for(var R=[],W=0;W<x.length;W++)if(this.model.isEdge(x[W])){var ja=this.view.getState(x[W]);null!=ja&&this.flipEdgePoints(x[W],L,(L?ja.getCenterX():ja.getCenterY())/this.view.scale-(L?ja.origin.x:ja.origin.y)-(L?this.view.translate.x:this.view.translate.y))}else{var ka=this.getCellGeometry(x[W]);null!=ka&&this.flipChildren(x[W],L,L?ka.getCenterX()-ka.x:ka.getCenterY()-ka.y);R.push(x[W])}this.toggleCellStyles(L?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,R)}finally{this.model.endUpdate()}};+Graph.prototype.deleteCells=function(x,L){var R=null;if(null!=x&&0<x.length){this.model.beginUpdate();try{for(var W=0;W<x.length;W++){var ja=this.model.getParent(x[W]);if(this.isTable(ja)){var ka=this.getCellGeometry(x[W]),oa=this.getCellGeometry(ja);null!=ka&&null!=oa&&(oa=oa.clone(),oa.height-=ka.height,this.model.setGeometry(ja,oa))}}var va=this.selectParentAfterDelete?this.model.getParents(x):null;this.removeCells(x,L)}finally{this.model.endUpdate()}if(null!=va)for(R=[],W=0;W<va.length;W++)this.model.contains(va[W])&&+(this.model.isVertex(va[W])||this.model.isEdge(va[W]))&&R.push(va[W])}return R};Graph.prototype.insertTableColumn=function(x,L){var R=this.getModel();R.beginUpdate();try{var W=x,ja=0;if(this.isTableCell(x)){var ka=R.getParent(x);W=R.getParent(ka);ja=mxUtils.indexOf(R.getChildCells(ka,!0),x)}else this.isTableRow(x)?W=R.getParent(x):x=R.getChildCells(W,!0)[0],L||(ja=R.getChildCells(x,!0).length-1);var oa=R.getChildCells(W,!0),va=Graph.minTableColumnWidth;for(x=0;x<oa.length;x++){var ta=R.getChildCells(oa[x],+!0)[ja],xa=R.cloneCell(ta,!1);null==xa&&(xa=this.createVertex());var Fa=this.getCellGeometry(xa);xa.value=null;xa.style=mxUtils.setStyle(mxUtils.setStyle(xa.style,"rowspan",null),"colspan",null);if(null!=Fa){null!=Fa.alternateBounds&&(Fa.width=Fa.alternateBounds.width,Fa.height=Fa.alternateBounds.height,Fa.alternateBounds=null);va=Fa.width;var Ma=this.getCellGeometry(oa[x]);null!=Ma&&(Fa.height=Ma.height)}R.add(oa[x],xa,ja+(L?0:1))}var Wa=this.getCellGeometry(W);null!=Wa&&(Wa=Wa.clone(),Wa.width+=+va,R.setGeometry(W,Wa))}finally{R.endUpdate()}};Graph.prototype.deleteLane=function(x){var L=this.getModel();L.beginUpdate();try{var R=null;R="stackLayout"==this.getCurrentCellStyle(x).childLayout?x:L.getParent(x);var W=L.getChildCells(R,!0);0==W.length?L.remove(R):(R==x&&(x=W[W.length-1]),L.remove(x))}finally{L.endUpdate()}};Graph.prototype.insertLane=function(x,L){var R=this.getModel();R.beginUpdate();try{var W=null;if("stackLayout"==this.getCurrentCellStyle(x).childLayout){W=x;var ja=R.getChildCells(W,+!0);x=ja[L?0:ja.length-1]}else W=R.getParent(x);var ka=W.getIndex(x);x=R.cloneCell(x,!1);x.value=null;R.add(W,x,ka+(L?0:1))}finally{R.endUpdate()}};Graph.prototype.insertTableRow=function(x,L){var R=this.getModel();R.beginUpdate();try{var W=x,ja=x;if(this.isTableCell(x))ja=R.getParent(x),W=R.getParent(ja);else if(this.isTableRow(x))W=R.getParent(x);else{var ka=R.getChildCells(W,!0);ja=ka[L?0:ka.length-1]}var oa=R.getChildCells(ja,!0),va=W.getIndex(ja);ja=R.cloneCell(ja,!1);ja.value=null;var ta=this.getCellGeometry(ja);+if(null!=ta){for(ka=0;ka<oa.length;ka++){x=R.cloneCell(oa[ka],!1);x.value=null;x.style=mxUtils.setStyle(mxUtils.setStyle(x.style,"rowspan",null),"colspan",null);var xa=this.getCellGeometry(x);null!=xa&&(null!=xa.alternateBounds&&(xa.width=xa.alternateBounds.width,xa.height=xa.alternateBounds.height,xa.alternateBounds=null),xa.height=ta.height);ja.insert(x)}R.add(W,ja,va+(L?0:1));var Fa=this.getCellGeometry(W);null!=Fa&&(Fa=Fa.clone(),Fa.height+=ta.height,R.setGeometry(W,Fa))}}finally{R.endUpdate()}};+Graph.prototype.deleteTableColumn=function(x){var L=this.getModel();L.beginUpdate();try{var R=x,W=x;this.isTableCell(x)&&(W=L.getParent(x));this.isTableRow(W)&&(R=L.getParent(W));var ja=L.getChildCells(R,!0);if(0==ja.length)L.remove(R);else{this.isTableRow(W)||(W=ja[0]);var ka=L.getChildCells(W,!0);if(1>=ka.length)L.remove(R);else{var oa=ka.length-1;this.isTableCell(x)&&(oa=mxUtils.indexOf(ka,x));for(W=x=0;W<ja.length;W++){var va=L.getChildCells(ja[W],!0)[oa];L.remove(va);var ta=this.getCellGeometry(va);+null!=ta&&(x=Math.max(x,ta.width))}var xa=this.getCellGeometry(R);null!=xa&&(xa=xa.clone(),xa.width-=x,L.setGeometry(R,xa))}}}finally{L.endUpdate()}};Graph.prototype.deleteTableRow=function(x){var L=this.getModel();L.beginUpdate();try{var R=x,W=x;this.isTableCell(x)&&(x=W=L.getParent(x));this.isTableRow(x)&&(R=L.getParent(W));var ja=L.getChildCells(R,!0);if(1>=ja.length)L.remove(R);else{this.isTableRow(W)||(W=ja[ja.length-1]);L.remove(W);x=0;var ka=this.getCellGeometry(W);null!=ka&&(x=ka.height);+var oa=this.getCellGeometry(R);null!=oa&&(oa=oa.clone(),oa.height-=x,L.setGeometry(R,oa))}}finally{L.endUpdate()}};Graph.prototype.insertRow=function(x,L){for(var R=x.tBodies[0],W=R.rows[0].cells,ja=x=0;ja<W.length;ja++){var ka=W[ja].getAttribute("colspan");x+=null!=ka?parseInt(ka):1}L=R.insertRow(L);for(ja=0;ja<x;ja++)mxUtils.br(L.insertCell(-1));return L.cells[0]};Graph.prototype.deleteRow=function(x,L){x.tBodies[0].deleteRow(L)};Graph.prototype.insertColumn=function(x,L){var R=x.tHead;if(null!=+R)for(var W=0;W<R.rows.length;W++){var ja=document.createElement("th");R.rows[W].appendChild(ja);mxUtils.br(ja)}x=x.tBodies[0];for(R=0;R<x.rows.length;R++)W=x.rows[R].insertCell(L),mxUtils.br(W);return x.rows[0].cells[0<=L?L:x.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(x,L){if(0<=L){x=x.tBodies[0].rows;for(var R=0;R<x.length;R++)x[R].cells.length>L&&x[R].deleteCell(L)}};Graph.prototype.pasteHtmlAtCaret=function(x){if(window.getSelection){var L=window.getSelection();if(L.getRangeAt&&+L.rangeCount){L=L.getRangeAt(0);L.deleteContents();var R=document.createElement("div");R.innerHTML=x;x=document.createDocumentFragment();for(var W;W=R.firstChild;)lastNode=x.appendChild(W);L.insertNode(x)}}else(L=document.selection)&&"Control"!=L.type&&L.createRange().pasteHTML(x)};Graph.prototype.createLinkForHint=function(x,L,R){function W(ka,oa){ka.length>oa&&(ka=ka.substring(0,Math.round(oa/2))+"..."+ka.substring(ka.length-Math.round(oa/4)));return ka}x=null!=x?x:"javascript:void(0);";if(null==+L||0==L.length)L=this.isCustomLink(x)?this.getLinkTitle(x):x;var ja=document.createElement("a");ja.setAttribute("rel",this.linkRelation);ja.setAttribute("href",this.getAbsoluteUrl(x));ja.setAttribute("title",W(this.isCustomLink(x)?this.getLinkTitle(x):x,80));null!=this.linkTarget&&ja.setAttribute("target",this.linkTarget);mxUtils.write(ja,W(L,40));this.isCustomLink(x)&&mxEvent.addListener(ja,"click",mxUtils.bind(this,function(ka){this.customLinkClicked(x,R);mxEvent.consume(ka)}));return ja};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ka,oa){this.popupMenuHandler.hideMenu()});var x=this.updateMouseEvent;this.updateMouseEvent=function(ka){ka=x.apply(this,arguments);if(mxEvent.isTouchEvent(ka.getEvent())&&null==ka.getState()){var oa=this.getCellAt(ka.graphX,ka.graphY);null!=oa&&this.isSwimlane(oa)&&this.hitsSwimlaneContent(oa,ka.graphX,ka.graphY)||(ka.state=this.view.getState(oa),-null!=ka.state&&null!=ka.state.shape&&(this.container.style.cursor=ka.state.shape.node.style.cursor))}null==ka.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ka};var M=!1,Q=!1,V=!1,ia=this.fireMouseEvent;this.fireMouseEvent=function(ka,oa,xa){ka==mxEvent.MOUSE_DOWN&&(oa=this.updateMouseEvent(oa),M=this.isCellSelected(oa.getCell()),Q=this.isSelectionEmpty(),V=this.popupMenuHandler.isMenuShowing());ia.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,-function(ka,oa){if(null!=this.freehand&&!this.freehand.isDrawing()){var xa=mxEvent.isMouseEvent(oa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==oa.getState()||!oa.isSource(oa.getState().control))&&(this.popupMenuHandler.popupTrigger||!V&&!xa&&(Q&&null==oa.getCell()&&this.isSelectionEmpty()||M&&this.isCellSelected(oa.getCell())));xa=!M||xa?null:mxUtils.bind(this,function(ta){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ua=mxUtils.getScrollOrigin();-this.popupMenuHandler.popup(oa.getX()+ua.x+1,oa.getY()+ua.y+1,ta,oa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ka,oa,xa])}})};mxCellEditor.prototype.isContentEditing=function(){var x=this.graph.view.getState(this.editingCell);return null!=x&&1==x.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var x=-"";window.getSelection?x=window.getSelection():document.getSelection?x=document.getSelection():document.selection&&(x=document.selection.createRange().text);return""!=x};mxCellEditor.prototype.insertTab=function(x){var M=this.textarea.ownerDocument.defaultView.getSelection(),Q=M.getRangeAt(0);x=Graph.createTabNode(x);Q.insertNode(x);Q.setStartAfter(x);Q.setEndAfter(x);M.removeAllRanges();M.addRange(Q)};mxCellEditor.prototype.alignText=function(x,M){var Q=this.graph.getView().getState(this.editingCell);-if(null!=Q){Q=mxUtils.getValue(Q.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var V=null!=Q&&"vertical-"==Q.substring(0,9),ia=null!=M&&mxEvent.isShiftDown(M);if(ia||null!=window.getSelection&&null!=window.getSelection().containsNode){var ka=!0;this.graph.processElements(this.textarea,function(oa){ia||V||window.getSelection().containsNode(oa,!0)?(oa.removeAttribute("align"),oa.style.textAlign=null):ka=!1});(ka||V)&&this.graph.cellEditor.setAlign(x)}V||document.execCommand("justify"+-x.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var x=window.getSelection();if(x.getRangeAt&&x.rangeCount){for(var M=[],Q=0,V=x.rangeCount;Q<V;++Q)M.push(x.getRangeAt(Q));return M}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(x){try{if(x)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var M=0,Q=x.length;M<-Q;++M)sel.addRange(x[M])}else document.selection&&x.select&&x.select()}catch(V){}};var z=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(x){null!=x.text&&(x.text.replaceLinefeeds="0"!=mxUtils.getValue(x.style,"nl2Br","1"));z.apply(this,arguments)};var C=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(x,M){this.isKeepFocusEvent(x)||!mxEvent.isAltDown(x.getEvent())?C.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=-function(x){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var F=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(x,M){x=this.graph.getStartEditingCell(x,M);F.apply(this,arguments);var Q=this.graph.view.getState(x);this.textarea.className=null!=Q&&1==Q.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?-"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(x)};mxCellEditor.prototype.toggleViewMode=function(){var x=this.graph.view.getState(this.editingCell);if(null!=x){var M=null!=x&&"0"!=mxUtils.getValue(x.style,"nl2Br","1"),Q=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,-xa.length-1));xa=Graph.sanitizeHtml(M?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ta=mxUtils.getValue(x.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);M=mxUtils.getValue(x.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var V=mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ia=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ka=(mxUtils.getValue(x.style,+null!=ka.state&&null!=ka.state.shape&&(this.container.style.cursor=ka.state.shape.node.style.cursor))}null==ka.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ka};var L=!1,R=!1,W=!1,ja=this.fireMouseEvent;this.fireMouseEvent=function(ka,oa,va){ka==mxEvent.MOUSE_DOWN&&(oa=this.updateMouseEvent(oa),L=this.isCellSelected(oa.getCell()),R=this.isSelectionEmpty(),W=this.popupMenuHandler.isMenuShowing());ja.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,+function(ka,oa){if(null!=this.freehand&&!this.freehand.isDrawing()){var va=mxEvent.isMouseEvent(oa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==oa.getState()||!oa.isSource(oa.getState().control))&&(this.popupMenuHandler.popupTrigger||!W&&!va&&(R&&null==oa.getCell()&&this.isSelectionEmpty()||L&&this.isCellSelected(oa.getCell())));va=!L||va?null:mxUtils.bind(this,function(ta){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var xa=mxUtils.getScrollOrigin();+this.popupMenuHandler.popup(oa.getX()+xa.x+1,oa.getY()+xa.y+1,ta,oa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ka,oa,va])}})};mxCellEditor.prototype.isContentEditing=function(){var x=this.graph.view.getState(this.editingCell);return null!=x&&1==x.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var x=+"";window.getSelection?x=window.getSelection():document.getSelection?x=document.getSelection():document.selection&&(x=document.selection.createRange().text);return""!=x};mxCellEditor.prototype.insertTab=function(x){var L=this.textarea.ownerDocument.defaultView.getSelection(),R=L.getRangeAt(0);x=Graph.createTabNode(x);R.insertNode(x);R.setStartAfter(x);R.setEndAfter(x);L.removeAllRanges();L.addRange(R)};mxCellEditor.prototype.alignText=function(x,L){var R=this.graph.getView().getState(this.editingCell);+if(null!=R){R=mxUtils.getValue(R.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var W=null!=R&&"vertical-"==R.substring(0,9),ja=null!=L&&mxEvent.isShiftDown(L);if(ja||null!=window.getSelection&&null!=window.getSelection().containsNode){var ka=!0;this.graph.processElements(this.textarea,function(oa){ja||W||window.getSelection().containsNode(oa,!0)?(oa.removeAttribute("align"),oa.style.textAlign=null):ka=!1});(ka||W)&&this.graph.cellEditor.setAlign(x)}W||document.execCommand("justify"++x.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var x=window.getSelection();if(x.getRangeAt&&x.rangeCount){for(var L=[],R=0,W=x.rangeCount;R<W;++R)L.push(x.getRangeAt(R));return L}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(x){try{if(x)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var L=0,R=x.length;L<+R;++L)sel.addRange(x[L])}else document.selection&&x.select&&x.select()}catch(W){}};var z=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(x){null!=x.text&&(x.text.replaceLinefeeds="0"!=mxUtils.getValue(x.style,"nl2Br","1"));z.apply(this,arguments)};var C=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(x,L){this.isKeepFocusEvent(x)||!mxEvent.isAltDown(x.getEvent())?C.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=+function(x){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var F=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(x,L){x=this.graph.getStartEditingCell(x,L);F.apply(this,arguments);var R=this.graph.view.getState(x);this.textarea.className=null!=R&&1==R.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?+"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(x)};mxCellEditor.prototype.toggleViewMode=function(){var x=this.graph.view.getState(this.editingCell);if(null!=x){var L=null!=x&&"0"!=mxUtils.getValue(x.style,"nl2Br","1"),R=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);va=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<va.length&&"\n"==va.charAt(va.length-1)&&(va=va.substring(0,+va.length-1));va=Graph.sanitizeHtml(L?va.replace(/\n/g,"<br/>"):va,!0);this.textarea.className="mxCellEditor geContentEditable";ta=mxUtils.getValue(x.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);L=mxUtils.getValue(x.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var W=mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ja=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ka=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,oa=[];(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&oa.push("underline");(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&oa.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ta*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=-Math.round(ta)+"px";this.textarea.style.textDecoration=oa.join(" ");this.textarea.style.fontWeight=ia?"bold":"normal";this.textarea.style.fontStyle=ka?"italic":"";this.textarea.style.fontFamily=M;this.textarea.style.textAlign=V;this.textarea.style.padding="0px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,-"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var xa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(xa=mxUtils.replaceTrailingNewlines(xa,"<div><br></div>"));xa=Graph.sanitizeHtml(M?xa.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):xa,!0);this.textarea.className=+Math.round(ta)+"px";this.textarea.style.textDecoration=oa.join(" ");this.textarea.style.fontWeight=ja?"bold":"normal";this.textarea.style.fontStyle=ka?"italic":"";this.textarea.style.fontFamily=L;this.textarea.style.textAlign=W;this.textarea.style.padding="0px";this.textarea.innerHTML!=va&&(this.textarea.innerHTML=va,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,+"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var va=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(va=mxUtils.replaceTrailingNewlines(va,"<div><br></div>"));va=Graph.sanitizeHtml(L?va.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):va,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ta=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ta*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ta)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding=-"2px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=Q;this.resize()}};var N=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(x,M){if(null!=this.textarea)if(x=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=x){var Q=x.view.scale;this.bounds=mxRectangle.fromRectangle(x);if(0==this.bounds.width&&-0==this.bounds.height){this.bounds.width=160*Q;this.bounds.height=60*Q;var V=null!=x.text?x.text.margin:null;null==V&&(V=mxUtils.getAlignmentAsPoint(mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(x.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=V.x*this.bounds.width;this.bounds.y+=V.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/Q)+"px";this.textarea.style.height=Math.round((this.bounds.height--4)/Q)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/Q)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*Q);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/Q)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*-Q);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+Q+","+Q+")")}else this.textarea.style.height="",this.textarea.style.overflow="",N.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(x,M){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);-var Q=this.graph.getEditingValue(x.cell,M);"1"==mxUtils.getValue(x.style,"nl2Br","1")&&(Q=Q.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(Q,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=function(x,M){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(x.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;-mxCellEditor.prototype.getCurrentValue=function(x){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var M=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(x.style,"nl2Br","1")?(M=M.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<M.length&&("<br/>"==M.substring(M.length-5)||"<br>"==M.substring(M.length-4))&&(M=M.substring(0,M.lastIndexOf("<br"))+"<div><br/></div>")):-M=M.replace(/\r\n/g,"").replace(/\n/g,"");return M};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(x){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(x){}};var J=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(x,M){this.graph.getModel().beginUpdate();try{J.apply(this,arguments),""==M&&this.graph.isCellDeletable(x.cell)&&+"2px";this.textarea.innerHTML!=va&&(this.textarea.innerHTML=va);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=R;this.resize()}};var N=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(x,L){if(null!=this.textarea)if(x=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=x){var R=x.view.scale;this.bounds=mxRectangle.fromRectangle(x);if(0==this.bounds.width&&+0==this.bounds.height){this.bounds.width=160*R;this.bounds.height=60*R;var W=null!=x.text?x.text.margin:null;null==W&&(W=mxUtils.getAlignmentAsPoint(mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(x.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=W.x*this.bounds.width;this.bounds.y+=W.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/R)+"px";this.textarea.style.height=Math.round((this.bounds.height-+4)/R)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/R)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*R);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/R)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*+R);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+R+","+R+")")}else this.textarea.style.height="",this.textarea.style.overflow="",N.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(x,L){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);+var R=this.graph.getEditingValue(x.cell,L);"1"==mxUtils.getValue(x.style,"nl2Br","1")&&(R=R.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(R,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=function(x,L){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(x.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;+mxCellEditor.prototype.getCurrentValue=function(x){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var L=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(x.style,"nl2Br","1")?(L=L.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<L.length&&("<br/>"==L.substring(L.length-5)||"<br>"==L.substring(L.length-4))&&(L=L.substring(0,L.lastIndexOf("<br"))+"<div><br/></div>")):+L=L.replace(/\r\n/g,"").replace(/\n/g,"");return L};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(x){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(x){}};var J=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(x,L){this.graph.getModel().beginUpdate();try{J.apply(this,arguments),""==L&&this.graph.isCellDeletable(x.cell)&&0==this.graph.model.getChildCount(x.cell)&&this.graph.isTransparentState(x)&&this.graph.removeCells([x.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(x){x=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);x==mxConstants.NONE&&(x=null);return x};mxCellEditor.prototype.getBorderColor=function(x){x=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);x==mxConstants.NONE&&(x=null);return x};mxCellEditor.prototype.getMinimumSize=-function(x){var M=this.graph.getView().scale;return new mxRectangle(0,0,null==x.text?30:x.text.size*M+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(x,M){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(M.getEvent)};mxGraphView.prototype.formatUnitText=function(x){return x?e(x,this.unit):x};mxGraphHandler.prototype.updateHint=function(x){if(null!=this.pBounds&&(null!=this.shape||-this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var M=this.graph.view.translate,Q=this.graph.view.scale;x=this.roundLength((this.bounds.x+this.currentDx)/Q-M.x);M=this.roundLength((this.bounds.y+this.currentDy)/Q-M.y);Q=this.graph.view.unit;this.hint.innerHTML=e(x,Q)+", "+e(M,Q);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+-Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var da=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,M){da.apply(this,arguments);var Q=this.graph.getCellStyle(x);if(null==Q.childLayout){var V=this.graph.model.getParent(x),ia=null!=V?this.graph.getCellGeometry(V):null;if(null!=ia&&(Q=this.graph.getCellStyle(V),"stackLayout"==Q.childLayout)){var ka=-parseFloat(mxUtils.getValue(Q,"stackBorder",mxStackLayout.prototype.border));Q="1"==mxUtils.getValue(Q,"horizontalStack","1");var oa=this.graph.getActualStartSize(V);ia=ia.clone();Q?ia.height=M.height+oa.y+oa.height+2*ka:ia.width=M.width+oa.x+oa.width+2*ka;this.graph.model.setGeometry(V,ia)}}};var ea=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function x(xa){Q.get(xa)||(Q.put(xa,!0),ia.push(xa))}for(var M=ea.apply(this,-arguments),Q=new mxDictionary,V=this.graph.model,ia=[],ka=0;ka<M.length;ka++){var oa=M[ka];this.graph.isTableCell(oa)?x(V.getParent(V.getParent(oa))):this.graph.isTableRow(oa)&&x(V.getParent(oa));x(oa)}return ia};var ca=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(x){return ca.apply(this,arguments)&&!mxEvent.isControlDown(x.getEvent())&&!mxEvent.isShiftDown(x.getEvent())};var W=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=-function(){return W.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var ba=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(x){var M=ba.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};var ha=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=-function(x){var M=ha.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var x=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+x.x/2,this.bounds.y+this.rotationHandleVSpacing-x.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(x,M){return this.graph.isRecursiveVertexResize(x)&&!mxEvent.isAltDown(M.getEvent())};-mxVertexHandler.prototype.isCenteredEvent=function(x,M){return mxEvent.isControlDown(M.getEvent())||mxEvent.isMetaDown(M.getEvent())};var la=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return la.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?+function(x){var L=this.graph.getView().scale;return new mxRectangle(0,0,null==x.text?30:x.text.size*L+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(x,L){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(L.getEvent)};mxGraphView.prototype.formatUnitText=function(x){return x?e(x,this.unit):x};mxGraphHandler.prototype.updateHint=function(x){if(null!=this.pBounds&&(null!=this.shape||+this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var L=this.graph.view.translate,R=this.graph.view.scale;x=this.roundLength((this.bounds.x+this.currentDx)/R-L.x);L=this.roundLength((this.bounds.y+this.currentDy)/R-L.y);R=this.graph.view.unit;this.hint.innerHTML=e(x,R)+", "+e(L,R);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height++Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var da=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,L){da.apply(this,arguments);var R=this.graph.getCellStyle(x);if(null==R.childLayout){var W=this.graph.model.getParent(x),ja=null!=W?this.graph.getCellGeometry(W):null;if(null!=ja&&(R=this.graph.getCellStyle(W),"stackLayout"==R.childLayout)){var ka=+parseFloat(mxUtils.getValue(R,"stackBorder",mxStackLayout.prototype.border));R="1"==mxUtils.getValue(R,"horizontalStack","1");var oa=this.graph.getActualStartSize(W);ja=ja.clone();R?ja.height=L.height+oa.y+oa.height+2*ka:ja.width=L.width+oa.x+oa.width+2*ka;this.graph.model.setGeometry(W,ja)}}};var ea=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function x(va){R.get(va)||(R.put(va,!0),ja.push(va))}for(var L=ea.apply(this,+arguments),R=new mxDictionary,W=this.graph.model,ja=[],ka=0;ka<L.length;ka++){var oa=L[ka];this.graph.isTableCell(oa)?x(W.getParent(W.getParent(oa))):this.graph.isTableRow(oa)&&x(W.getParent(oa));x(oa)}return ja};var ca=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(x){return ca.apply(this,arguments)&&!mxEvent.isControlDown(x.getEvent())&&!mxEvent.isShiftDown(x.getEvent())};var X=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=+function(){return X.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var aa=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(x){var L=aa.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};var ia=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=+function(x){var L=ia.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var x=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+x.x/2,this.bounds.y+this.rotationHandleVSpacing-x.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(x,L){return this.graph.isRecursiveVertexResize(x)&&!mxEvent.isAltDown(L.getEvent())};+mxVertexHandler.prototype.isCenteredEvent=function(x,L){return mxEvent.isControlDown(L.getEvent())||mxEvent.isMetaDown(L.getEvent())};var la=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return la.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var Y=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return Y.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var ma=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(x){return x.tableHandle||ma.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var x=0;this.graph.isTableRow(this.state.cell)?x=1:this.graph.isTableCell(this.state.cell)&&(x=2);return x};var Z=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return Z.apply(this,arguments).grow(-this.getSelectionBorderInset())};var k=null,A=mxVertexHandler.prototype.createCustomHandles;-mxVertexHandler.prototype.createCustomHandles=function(){null==k&&(k=mxCellRenderer.defaultShapes.tableLine);var x=A.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var M=function(ab,Oa,Qa){for(var kb=[],cb=0;cb<ab.length;cb++){var Ya=ab[cb];kb.push(null==Ya?null:new mxPoint((ta+Ya.x+Oa)*ka,(ua+Ya.y+Qa)*ka))}return kb},Q=this,V=this.graph,ia=V.model,ka=V.view.scale,oa=this.state,xa=this.selectionBorder,ta=this.state.origin.x+V.view.translate.x,-ua=this.state.origin.y+V.view.translate.y;null==x&&(x=[]);var Fa=V.view.getCellStates(ia.getChildCells(this.state.cell,!0));if(0<Fa.length){var Na=ia.getChildCells(Fa[0].cell,!0),Wa=V.getTableLines(this.state.cell,!1,!0),Xa=V.getTableLines(this.state.cell,!0,!1);for(ia=0;ia<Fa.length;ia++)mxUtils.bind(this,function(ab){var Oa=Fa[ab],Qa=null;if(V.isCellMovable(Oa.cell)){Qa=ab<Fa.length-1?Fa[ab+1]:null;Qa=null!=Qa?V.getCellGeometry(Qa.cell):null;var kb=null!=Qa&&null!=Qa.alternateBounds?Qa.alternateBounds:-Qa;Qa=null!=Xa[ab]?new k(Xa[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Qa.isDashed=xa.isDashed;Qa.svgStrokeTolerance++;Qa=new mxHandle(Oa,"row-resize",null,Qa);Qa.tableHandle=!0;var cb=0;Qa.shape.node.parentNode.insertBefore(Qa.shape.node,Qa.shape.node.parentNode.firstChild);Qa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==cb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==k)this.shape.line=M(Xa[ab],0,cb),this.shape.updateBoundsFromLine();else{var gb=-V.getActualStartSize(oa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+cb*ka;this.shape.bounds.x=oa.x+(ab==Fa.length-1?0:gb.x*ka);this.shape.bounds.width=oa.width-(ab==Fa.length-1?0:gb.width+gb.x+ka)}this.shape.redraw()}};var Ya=!1;Qa.setPosition=function(gb,hb,vb){cb=Math.max(Graph.minTableRowHeight-gb.height,hb.y-gb.y-gb.height);Ya=mxEvent.isShiftDown(vb.getEvent());null!=kb&&Ya&&(cb=Math.min(cb,kb.height-Graph.minTableRowHeight))};Qa.execute=function(gb){if(0!=-cb)V.setTableRowHeight(this.state.cell,cb,!Ya);else if(!Q.blockDelayedSelection){var hb=V.getCellAt(gb.getGraphX(),gb.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(hb,gb)}cb=0};Qa.reset=function(){cb=0}}x.push(Qa)})(ia);for(ia=0;ia<Na.length;ia++)mxUtils.bind(this,function(ab){var Oa=V.view.getState(Na[ab]),Qa=V.getCellGeometry(Na[ab]),kb=null!=Qa.alternateBounds?Qa.alternateBounds:Qa;null==Oa&&(Oa=new mxCellState(V.view,Na[ab],V.getCellStyle(Na[ab])),Oa.x=oa.x+Qa.x*ka,Oa.y=oa.y+Qa.y*ka,-Oa.width=kb.width*ka,Oa.height=kb.height*ka,Oa.updateCachedBounds());Qa=ab<Na.length-1?Na[ab+1]:null;Qa=null!=Qa?V.getCellGeometry(Qa):null;var cb=null!=Qa&&null!=Qa.alternateBounds?Qa.alternateBounds:Qa;Qa=null!=Wa[ab]?new k(Wa[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Qa.isDashed=xa.isDashed;Qa.svgStrokeTolerance++;Oa=new mxHandle(Oa,"col-resize",null,Qa);Oa.tableHandle=!0;var Ya=0;Oa.shape.node.parentNode.insertBefore(Oa.shape.node,Oa.shape.node.parentNode.firstChild);-Oa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ya?mxConstants.NONE:xa.stroke;if(this.shape.constructor==k)this.shape.line=M(Wa[ab],Ya,0),this.shape.updateBoundsFromLine();else{var hb=V.getActualStartSize(oa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(kb.width+Ya)*ka;this.shape.bounds.y=oa.y+(ab==Na.length-1?0:hb.y*ka);this.shape.bounds.height=oa.height-(ab==Na.length-1?0:(hb.height+hb.y)*ka)}this.shape.redraw()}};var gb=!1;Oa.setPosition=function(hb,vb,mb){Ya=-Math.max(Graph.minTableColumnWidth-kb.width,vb.x-hb.x-kb.width);gb=mxEvent.isShiftDown(mb.getEvent());null==cb||gb||(Ya=Math.min(Ya,cb.width-Graph.minTableColumnWidth))};Oa.execute=function(hb){if(0!=Ya)V.setTableColumnWidth(this.state.cell,Ya,gb);else if(!Q.blockDelayedSelection){var vb=V.getCellAt(hb.getGraphX(),hb.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(vb,hb)}Ya=0};Oa.positionChanged=function(){};Oa.reset=function(){Ya=0};x.push(Oa)})(ia)}}return null!=x?x.reverse():null};var I=-mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(x){I.apply(this,arguments);if(null!=this.moveHandles)for(var M=0;M<this.moveHandles.length;M++)null!=this.moveHandles[M]&&(this.moveHandles[M].node.style.visibility=x?"":"hidden");if(null!=this.cornerHandles)for(M=0;M<this.cornerHandles.length;M++)this.cornerHandles[M].node.style.visibility=x?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&+mxVertexHandler.prototype.createCustomHandles=function(){null==k&&(k=mxCellRenderer.defaultShapes.tableLine);var x=A.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var L=function(ab,Oa,Ra){for(var kb=[],cb=0;cb<ab.length;cb++){var Za=ab[cb];kb.push(null==Za?null:new mxPoint((ta+Za.x+Oa)*ka,(xa+Za.y+Ra)*ka))}return kb},R=this,W=this.graph,ja=W.model,ka=W.view.scale,oa=this.state,va=this.selectionBorder,ta=this.state.origin.x+W.view.translate.x,+xa=this.state.origin.y+W.view.translate.y;null==x&&(x=[]);var Fa=W.view.getCellStates(ja.getChildCells(this.state.cell,!0));if(0<Fa.length){var Ma=ja.getChildCells(Fa[0].cell,!0),Wa=W.getTableLines(this.state.cell,!1,!0),Xa=W.getTableLines(this.state.cell,!0,!1);for(ja=0;ja<Fa.length;ja++)mxUtils.bind(this,function(ab){var Oa=Fa[ab],Ra=null;if(W.isCellMovable(Oa.cell)){Ra=ab<Fa.length-1?Fa[ab+1]:null;Ra=null!=Ra?W.getCellGeometry(Ra.cell):null;var kb=null!=Ra&&null!=Ra.alternateBounds?Ra.alternateBounds:+Ra;Ra=null!=Xa[ab]?new k(Xa[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ra.isDashed=va.isDashed;Ra.svgStrokeTolerance++;Ra=new mxHandle(Oa,"row-resize",null,Ra);Ra.tableHandle=!0;var cb=0;Ra.shape.node.parentNode.insertBefore(Ra.shape.node,Ra.shape.node.parentNode.firstChild);Ra.redraw=function(){if(null!=this.shape){this.shape.stroke=0==cb?mxConstants.NONE:va.stroke;if(this.shape.constructor==k)this.shape.line=L(Xa[ab],0,cb),this.shape.updateBoundsFromLine();else{var gb=+W.getActualStartSize(oa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+cb*ka;this.shape.bounds.x=oa.x+(ab==Fa.length-1?0:gb.x*ka);this.shape.bounds.width=oa.width-(ab==Fa.length-1?0:gb.width+gb.x+ka)}this.shape.redraw()}};var Za=!1;Ra.setPosition=function(gb,hb,vb){cb=Math.max(Graph.minTableRowHeight-gb.height,hb.y-gb.y-gb.height);Za=mxEvent.isShiftDown(vb.getEvent());null!=kb&&Za&&(cb=Math.min(cb,kb.height-Graph.minTableRowHeight))};Ra.execute=function(gb){if(0!=+cb)W.setTableRowHeight(this.state.cell,cb,!Za);else if(!R.blockDelayedSelection){var hb=W.getCellAt(gb.getGraphX(),gb.getGraphY())||oa.cell;W.graphHandler.selectCellForEvent(hb,gb)}cb=0};Ra.reset=function(){cb=0}}x.push(Ra)})(ja);for(ja=0;ja<Ma.length;ja++)mxUtils.bind(this,function(ab){var Oa=W.view.getState(Ma[ab]),Ra=W.getCellGeometry(Ma[ab]),kb=null!=Ra.alternateBounds?Ra.alternateBounds:Ra;null==Oa&&(Oa=new mxCellState(W.view,Ma[ab],W.getCellStyle(Ma[ab])),Oa.x=oa.x+Ra.x*ka,Oa.y=oa.y+Ra.y*ka,+Oa.width=kb.width*ka,Oa.height=kb.height*ka,Oa.updateCachedBounds());Ra=ab<Ma.length-1?Ma[ab+1]:null;Ra=null!=Ra?W.getCellGeometry(Ra):null;var cb=null!=Ra&&null!=Ra.alternateBounds?Ra.alternateBounds:Ra;Ra=null!=Wa[ab]?new k(Wa[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ra.isDashed=va.isDashed;Ra.svgStrokeTolerance++;Oa=new mxHandle(Oa,"col-resize",null,Ra);Oa.tableHandle=!0;var Za=0;Oa.shape.node.parentNode.insertBefore(Oa.shape.node,Oa.shape.node.parentNode.firstChild);+Oa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Za?mxConstants.NONE:va.stroke;if(this.shape.constructor==k)this.shape.line=L(Wa[ab],Za,0),this.shape.updateBoundsFromLine();else{var hb=W.getActualStartSize(oa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(kb.width+Za)*ka;this.shape.bounds.y=oa.y+(ab==Ma.length-1?0:hb.y*ka);this.shape.bounds.height=oa.height-(ab==Ma.length-1?0:(hb.height+hb.y)*ka)}this.shape.redraw()}};var gb=!1;Oa.setPosition=function(hb,vb,mb){Za=+Math.max(Graph.minTableColumnWidth-kb.width,vb.x-hb.x-kb.width);gb=mxEvent.isShiftDown(mb.getEvent());null==cb||gb||(Za=Math.min(Za,cb.width-Graph.minTableColumnWidth))};Oa.execute=function(hb){if(0!=Za)W.setTableColumnWidth(this.state.cell,Za,gb);else if(!R.blockDelayedSelection){var vb=W.getCellAt(hb.getGraphX(),hb.getGraphY())||oa.cell;W.graphHandler.selectCellForEvent(vb,hb)}Za=0};Oa.positionChanged=function(){};Oa.reset=function(){Za=0};x.push(Oa)})(ja)}}return null!=x?x.reverse():null};var I=+mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(x){I.apply(this,arguments);if(null!=this.moveHandles)for(var L=0;L<this.moveHandles.length;L++)null!=this.moveHandles[L]&&(this.moveHandles[L].node.style.visibility=x?"":"hidden");if(null!=this.cornerHandles)for(L=0;L<this.cornerHandles.length;L++)this.cornerHandles[L].node.style.visibility=x?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var x=this.isMoveHandlesVisible();x&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():x||null==this.moveHandles||this.destroyMoveHandles();if(x&&null==this.moveHandles){for(x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&this.moveHandles[x].parentNode.removeChild(this.moveHandles[x]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var x=-this.graph,M=x.model,Q=[],V=0;V<M.getChildCount(this.state.cell);V++)mxUtils.bind(this,function(ia){if(null!=ia&&M.isVertex(ia.cell)&&x.isCellMovable(ia.cell)){var ka=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ka=new mxImageShape(ka,this.rowHandleImage.src);ka.rowState=ia;ka.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ka.init(this.graph.getView().getOverlayPane());ka.node.style.cursor="move";mxEvent.addGestureListeners(ka.node,-mxUtils.bind(this,function(oa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(oa)&&this.graph.isCellSelected(ia.cell)||this.graph.selectCellForEvent(ia.cell,oa);mxEvent.isPopupTrigger(oa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(oa),mxEvent.getClientY(oa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(oa),this.graph.isMouseDown=!0);mxEvent.consume(oa)}),-null,mxUtils.bind(this,function(oa){mxEvent.isPopupTrigger(oa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(oa),mxEvent.getClientY(oa),ia.cell,oa),mxEvent.consume(oa))}));Q.push(ka)}else Q.push(null)})(this.graph.view.getState(M.getChildAt(this.state.cell,V)));return Q};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&this.moveHandles[x].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=-function(){if(null!=this.cornerHandles){for(var x=0;x<this.cornerHandles.length;x++)null!=this.cornerHandles[x]&&null!=this.cornerHandles[x].node&&null!=this.cornerHandles[x].node.parentNode&&this.cornerHandles[x].node.parentNode.removeChild(this.cornerHandles[x].node);this.cornerHandles=null}};var U=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){U.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();-else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var x=0;4>x;x++){var M=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);M.dialect=mxConstants.DIALECT_SVG;M.init(this.graph.view.getOverlayPane());this.cornerHandles.push(M)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();-x=this.graph.getLinkForCell(this.state.cell);M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var O=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var x=new mxPoint(0,0),M=this.tolerance,Q=this.state.style.shape;null==mxCellRenderer.defaultShapes[Q]&&mxStencilRegistry.getStencil(Q);Q=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!Q&&null!=this.customHandles)for(var V=0;V<this.customHandles.length;V++)if(null!=-this.customHandles[V]&&null!=this.customHandles[V].shape&&null!=this.customHandles[V].shape.bounds){var ia=this.customHandles[V].shape.bounds,ka=ia.getCenterX(),oa=ia.getCenterY();if(Math.abs(this.state.x-ka)<ia.width/2||Math.abs(this.state.y-oa)<ia.height/2||Math.abs(this.state.x+this.state.width-ka)<ia.width/2||Math.abs(this.state.y+this.state.height-oa)<ia.height/2){Q=!0;break}}Q&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(M/=2,this.graph.isTable(this.state.cell)&&(M+=7),x.x=-this.sizers[0].bounds.width+M,x.y=this.sizers[0].bounds.height+M):x=O.apply(this,arguments);return x};mxVertexHandler.prototype.updateHint=function(x){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{x=this.state.view.scale;var M=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/x),M)+" x "+e(this.roundLength(this.bounds.height/-x),M)}x=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==x&&(x=this.bounds);this.hint.style.left=x.x+Math.round((x.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=x.y+x.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display=-"")};var S=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){S.apply(this,arguments);var x=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var X=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,M){X.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};-var aa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(x,M){aa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(x,M,Q){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var V=this.graph.view.translate,ia=this.graph.view.scale,ka=this.roundLength(M.x/ia-V.x);V=this.roundLength(M.y/ia-V.y);var oa=-this.graph.view.unit;this.hint.innerHTML=e(ka,oa)+", "+e(V,oa);this.hint.style.visibility="visible";null!=Q&&(Q.view.updateEdgeBounds(Q),this.hint.innerHTML+=" ("+(oa==mxConstants.POINTS?Math.round(Q.length/ia):e(Q.length/ia,oa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(Q=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*Q.x)+"%, "+Math.round(100*-Q.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(x.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(x.getGraphY(),M.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');+this.graph,L=x.model,R=[],W=0;W<L.getChildCount(this.state.cell);W++)mxUtils.bind(this,function(ja){if(null!=ja&&L.isVertex(ja.cell)&&x.isCellMovable(ja.cell)){var ka=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ka=new mxImageShape(ka,this.rowHandleImage.src);ka.rowState=ja;ka.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ka.init(this.graph.getView().getOverlayPane());ka.node.style.cursor="move";mxEvent.addGestureListeners(ka.node,+mxUtils.bind(this,function(oa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(oa)&&this.graph.isCellSelected(ja.cell)||this.graph.selectCellForEvent(ja.cell,oa);mxEvent.isPopupTrigger(oa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(oa),mxEvent.getClientY(oa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(oa),this.graph.isMouseDown=!0);mxEvent.consume(oa)}),+null,mxUtils.bind(this,function(oa){mxEvent.isPopupTrigger(oa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(oa),mxEvent.getClientY(oa),ja.cell,oa),mxEvent.consume(oa))}));R.push(ka)}else R.push(null)})(this.graph.view.getState(L.getChildAt(this.state.cell,W)));return R};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&this.moveHandles[x].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=+function(){if(null!=this.cornerHandles){for(var x=0;x<this.cornerHandles.length;x++)null!=this.cornerHandles[x]&&null!=this.cornerHandles[x].node&&null!=this.cornerHandles[x].node.parentNode&&this.cornerHandles[x].node.parentNode.removeChild(this.cornerHandles[x].node);this.cornerHandles=null}};var T=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){T.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();+else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var x=0;4>x;x++){var L=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);L.dialect=mxConstants.DIALECT_SVG;L.init(this.graph.view.getOverlayPane());this.cornerHandles.push(L)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();+x=this.graph.getLinkForCell(this.state.cell);L=this.graph.getLinksForState(this.state);this.updateLinkHint(x,L)};var O=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var x=new mxPoint(0,0),L=this.tolerance,R=this.state.style.shape;null==mxCellRenderer.defaultShapes[R]&&mxStencilRegistry.getStencil(R);R=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!R&&null!=this.customHandles)for(var W=0;W<this.customHandles.length;W++)if(null!=+this.customHandles[W]&&null!=this.customHandles[W].shape&&null!=this.customHandles[W].shape.bounds){var ja=this.customHandles[W].shape.bounds,ka=ja.getCenterX(),oa=ja.getCenterY();if(Math.abs(this.state.x-ka)<ja.width/2||Math.abs(this.state.y-oa)<ja.height/2||Math.abs(this.state.x+this.state.width-ka)<ja.width/2||Math.abs(this.state.y+this.state.height-oa)<ja.height/2){R=!0;break}}R&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(L/=2,this.graph.isTable(this.state.cell)&&(L+=7),x.x=+this.sizers[0].bounds.width+L,x.y=this.sizers[0].bounds.height+L):x=O.apply(this,arguments);return x};mxVertexHandler.prototype.updateHint=function(x){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{x=this.state.view.scale;var L=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/x),L)+" x "+e(this.roundLength(this.bounds.height/+x),L)}x=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==x&&(x=this.bounds);this.hint.style.left=x.x+Math.round((x.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=x.y+x.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display=+"")};var U=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){U.apply(this,arguments);var x=this.graph.getLinkForCell(this.state.cell),L=this.graph.getLinksForState(this.state);this.updateLinkHint(x,L)};var V=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,L){V.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};+var ba=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(x,L){ba.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(x,L,R){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var W=this.graph.view.translate,ja=this.graph.view.scale,ka=this.roundLength(L.x/ja-W.x);W=this.roundLength(L.y/ja-W.y);var oa=+this.graph.view.unit;this.hint.innerHTML=e(ka,oa)+", "+e(W,oa);this.hint.style.visibility="visible";null!=R&&(R.view.updateEdgeBounds(R),this.hint.innerHTML+=" ("+(oa==mxConstants.POINTS?Math.round(R.length/ja):e(R.length/ja,oa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(R=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*R.x)+"%, "+Math.round(100*+R.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(x.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(x.getGraphY(),L.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="'+@@ -2706,65 +2706,65 @@ HoverIcons.prototype.endTerminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxGraphHandler.prototype.previewColor="light-dark(#000000, #cccccc)";mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(x){return!mxEvent.isShiftDown(x.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(x){return!mxEvent.isShiftDown(x.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(x){return mxEvent.isMouseEvent(x.getEvent())?-4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(x){var M=x.getEvent();return null==x.getState()&&!mxEvent.isMouseEvent(M)||mxEvent.isPopupTrigger(M)&&(null==x.getState()||mxEvent.isControlDown(M)||mxEvent.isShiftDown(M))}}else mxPanningHandler.prototype.isPanningTrigger=function(x){var M=x.getEvent();return mxEvent.isLeftMouseButton(M)&&(this.useLeftButtonForPanning&&null==x.getState()||mxEvent.isControlDown(M)&&!mxEvent.isShiftDown(M))||this.usePopupTrigger&&mxEvent.isPopupTrigger(M)};-mxRubberband.prototype.isSpaceEvent=function(x){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(x.getEvent())||mxEvent.isMetaDown(x.getEvent()))&&mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(x,M){if(this.cancelled)this.cancelled=!1,M.consume();else{var Q=-null!=this.div&&"none"!=this.div.style.display,V=null,ia=null,ka=x=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(V=this.first.x,ia=this.first.y,x=(this.currentX-V)/this.graph.view.scale,ka=(this.currentY-ia)/this.graph.view.scale,mxEvent.isAltDown(M.getEvent())||(x=this.graph.snap(x),ka=this.graph.snap(ka),this.graph.isGridEnabled()||(Math.abs(x)<this.graph.tolerance&&(x=0),Math.abs(ka)<this.graph.tolerance&&(ka=0))));this.reset();if(Q){if(this.isSpaceEvent(M)){this.graph.model.beginUpdate();-try{var oa=this.graph.getCellsBeyond(V,ia,this.graph.getDefaultParent(),!0,!0);for(Q=0;Q<oa.length;Q++)if(this.graph.isCellMovable(oa[Q])){var xa=this.graph.view.getState(oa[Q]),ta=this.graph.getCellGeometry(oa[Q]);null!=xa&&null!=ta&&(ta=ta.clone(),ta.translate(x,ka),this.graph.model.setGeometry(oa[Q],ta))}}finally{this.graph.model.endUpdate()}}else oa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(oa,M.getEvent());M.consume()}}};mxRubberband.prototype.mouseMove=function(x,-M){if(!M.isConsumed()&&null!=this.first){var Q=mxUtils.getScrollOrigin(this.graph.container);x=mxUtils.getOffset(this.graph.container);Q.x-=x.x;Q.y-=x.y;x=M.getX()+Q.x;Q=M.getY()+Q.y;var V=this.first.x-x,ia=this.first.y-Q,ka=this.graph.tolerance;if(null!=this.div||Math.abs(V)>ka||Math.abs(ia)>ka)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(x,Q),this.isSpaceEvent(M)?(x=this.x+this.width,Q=this.y+this.height,V=this.graph.view.scale,mxEvent.isAltDown(M.getEvent())||-(this.width=this.graph.snap(this.width/V)*V,this.height=this.graph.snap(this.height/V)*V,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=x-this.width),this.y<this.first.y&&(this.y=Q-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=+4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(x){var L=x.getEvent();return null==x.getState()&&!mxEvent.isMouseEvent(L)||mxEvent.isPopupTrigger(L)&&(null==x.getState()||mxEvent.isControlDown(L)||mxEvent.isShiftDown(L))}}else mxPanningHandler.prototype.isPanningTrigger=function(x){var L=x.getEvent();return mxEvent.isLeftMouseButton(L)&&(this.useLeftButtonForPanning&&null==x.getState()||mxEvent.isControlDown(L)&&!mxEvent.isShiftDown(L))||this.usePopupTrigger&&mxEvent.isPopupTrigger(L)};+mxRubberband.prototype.isSpaceEvent=function(x){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(x.getEvent())||mxEvent.isMetaDown(x.getEvent()))&&mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(x,L){if(this.cancelled)this.cancelled=!1,L.consume();else{var R=+null!=this.div&&"none"!=this.div.style.display,W=null,ja=null,ka=x=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(W=this.first.x,ja=this.first.y,x=(this.currentX-W)/this.graph.view.scale,ka=(this.currentY-ja)/this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(x=this.graph.snap(x),ka=this.graph.snap(ka),this.graph.isGridEnabled()||(Math.abs(x)<this.graph.tolerance&&(x=0),Math.abs(ka)<this.graph.tolerance&&(ka=0))));this.reset();if(R){if(this.isSpaceEvent(L)){this.graph.model.beginUpdate();+try{var oa=this.graph.getCellsBeyond(W,ja,this.graph.getDefaultParent(),!0,!0);for(R=0;R<oa.length;R++)if(this.graph.isCellMovable(oa[R])){var va=this.graph.view.getState(oa[R]),ta=this.graph.getCellGeometry(oa[R]);null!=va&&null!=ta&&(ta=ta.clone(),ta.translate(x,ka),this.graph.model.setGeometry(oa[R],ta))}}finally{this.graph.model.endUpdate()}}else oa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(oa,L.getEvent());L.consume()}}};mxRubberband.prototype.mouseMove=function(x,+L){if(!L.isConsumed()&&null!=this.first){var R=mxUtils.getScrollOrigin(this.graph.container);x=mxUtils.getOffset(this.graph.container);R.x-=x.x;R.y-=x.y;x=L.getX()+R.x;R=L.getY()+R.y;var W=this.first.x-x,ja=this.first.y-R,ka=this.graph.tolerance;if(null!=this.div||Math.abs(W)>ka||Math.abs(ja)>ka)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(x,R),this.isSpaceEvent(L)?(x=this.x+this.width,R=this.y+this.height,W=this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||+(this.width=this.graph.snap(this.width/W)*W,this.height=this.graph.snap(this.height/W)*W,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=x-this.width),this.y<this.first.y&&(this.y=R-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)),M.consume()}};var ja=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);ja.apply(this,arguments)};var pa=(new Date).getTime(),sa=0,qa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=-function(x,M,Q,V){qa.apply(this,arguments);Q!=this.currentTerminalState?(pa=(new Date).getTime(),sa=0):sa=(new Date).getTime()-pa;this.currentTerminalState=Q};var wa=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(x){return mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())?!1:null!=this.currentTerminalState&&x.getState()==this.currentTerminalState&&2E3<sa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,-"outlineConnect","1"))&&wa.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(x,M,Q){M=null!=x&&0==x;var V=this.state.getVisibleTerminalState(M);x=null!=x&&null!=this.state.absolutePoints&&(0==x||x>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==x)?this.graph.getConnectionConstraint(this.state,V,M):null;Q=null!=(null!=x?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(M),x):null)?Q?this.endFixedHandleImage:this.fixedHandleImage:-null!=x&&null!=V?Q?this.endTerminalHandleImage:this.terminalHandleImage:Q?this.endHandleImage:this.handleImage;if(null!=Q)return Q=new mxImageShape(new mxRectangle(0,0,Q.width,Q.height),Q.src),Q.preserveImageAspect=!1,Q;Q=mxConstants.HANDLE_SIZE;this.preferHtml&&--Q;return new mxRectangleShape(new mxRectangle(0,0,Q,Q),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Ba=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(x,M,Q,V){V=M==mxEvent.ROTATION_HANDLE?-HoverIcons.prototype.rotationHandle:M==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:V;return Ba.apply(this,arguments)};var za=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(x){if(null!=x&&1==x.length){var M=this.graph.getModel(),Q=M.getParent(x[0]),V=this.graph.getCellGeometry(x[0]);if(M.isEdge(Q)&&null!=V&&V.relative&&(M=this.graph.view.getState(x[0]),null!=M&&2>M.width&&2>M.height&&null!=M.text&&null!=M.text.boundingBox))return mxRectangle.fromRectangle(M.text.boundingBox)}return za.apply(this,-arguments)};var Ea=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var x=Ea.apply(this,arguments),M=[],Q=0;Q<x.length;Q++)"1"!=mxUtils.getValue(x[Q].style,"part","0")&&M.push(x[Q]);return M};var ra=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(x){var M=this.graph.getModel(),Q=M.getParent(x.cell),V=this.graph.getCellGeometry(x.cell);return M.isEdge(Q)&&null!=V&&V.relative&&2>x.width&&2>x.height&&null!=-x.text&&null!=x.text.boundingBox?(M=x.text.unrotatedBoundingBox||x.text.boundingBox,new mxRectangle(Math.round(M.x),Math.round(M.y),Math.round(M.width),Math.round(M.height))):ra.apply(this,arguments)};var ya=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(x,M){var Q=this.graph.getModel(),V=Q.getParent(this.state.cell),ia=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(M)==mxEvent.ROTATION_HANDLE||!Q.isEdge(V)||null==ia||!ia.relative||null==this.state||-2<=this.state.width||2<=this.state.height)&&ya.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var x=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),M=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&x==mxConstants.NONE&&M==mxConstants.NONE?(x=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,-x,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(x,M){Ca.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ma=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=-function(x,M){Ma.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(x,M){try{if(null==x&&(null==M||0==M.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),-this.linkHint=null);else if(null!=x||null!=M&&0<M.length){var Q=document.createElement("img");Q.className="geAdaptiveAsset";Q.setAttribute("src",Editor.editImage);Q.setAttribute("title",mxResources.get("editLink"));Q.setAttribute("width","14");Q.setAttribute("height","14");Q.style.paddingLeft="8px";Q.style.marginLeft="auto";Q.style.marginBottom="-1px";Q.style.cursor="pointer";var V=Q.cloneNode(!0);V.setAttribute("src",Editor.trashImage);V.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));-V.style.paddingLeft="4px";V.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=x){var ia=document.createElement("div");-ia.style.display="flex";ia.style.alignItems="center";ia.appendChild(this.graph.createLinkForHint(x,null,this.state.cell));this.linkHint.appendChild(ia);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ka=Q.cloneNode(!0);ia.appendChild(ka);mxEvent.addListener(ka,"click",mxUtils.bind(this,function(xa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(xa)}));var oa=V.cloneNode(!0);ia.appendChild(oa);mxEvent.addListener(oa,-"click",mxUtils.bind(this,function(xa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(xa)}))}}if(null!=M)for(ia=0;ia<M.length;ia++)mxUtils.bind(this,function(xa,ta){var ua=document.createElement("div");ua.style.display="flex";ua.style.alignItems="center";ua.style.marginTop=null!=x||0<ta?"6px":"0px";ua.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Fa=Q.cloneNode(!0);ua.appendChild(Fa);var Na=mxUtils.bind(this,function(Wa){var Xa=-document.createElement("div");Xa.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var ab=Xa.getElementsByTagName("a")[ta];if(null!=ab){if(null==Wa||""==Wa){for(Wa=ab.cloneNode(!0).firstChild;null!=Wa;)ab.parentNode.insertBefore(Wa.cloneNode(!0),ab),Wa=Wa.nextSibling;ab.parentNode.removeChild(ab)}else ab.setAttribute("href",Wa);this.graph.labelChanged(this.state.cell,Xa.innerHTML)}});mxEvent.addListener(Fa,"click",mxUtils.bind(this,function(Wa){this.graph.showLinkDialog(xa.getAttribute("href")||-"",mxResources.get("ok"),Na);mxEvent.consume(Wa)}));Fa=V.cloneNode(!0);ua.appendChild(Fa);mxEvent.addListener(Fa,"click",mxUtils.bind(this,function(Wa){Na();mxEvent.consume(Wa)}));this.linkHint.appendChild(ua)})(M[ia],ia)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Ha=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var x=Ha.apply(this,-arguments);x.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return x};var Aa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Aa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Ra=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var x=0;x<this.moveHandles.length;x++)null!=-this.moveHandles[x]&&(this.moveHandles[x].bounds.x=Math.round(this.moveHandles[x].rowState.x+this.moveHandles[x].rowState.width-this.moveHandles[x].bounds.width/2),this.moveHandles[x].bounds.y=Math.round(this.moveHandles[x].rowState.y+(this.moveHandles[x].rowState.height-this.moveHandles[x].bounds.height)/2),this.moveHandles[x].redraw());if(null!=this.cornerHandles){x=this.getSelectionBorderInset();var M=this.cornerHandles,Q=M[0].bounds.height/2;M[0].bounds.x=this.state.x-M[0].bounds.width/2+x;M[0].bounds.y=-this.state.y-Q+x;M[0].redraw();M[1].bounds.x=M[0].bounds.x+this.state.width-2*x;M[1].bounds.y=M[0].bounds.y;M[1].redraw();M[2].bounds.x=M[0].bounds.x;M[2].bounds.y=this.state.y+this.state.height-2*x;M[2].redraw();M[3].bounds.x=M[1].bounds.x;M[3].bounds.y=M[2].bounds.y;M[3].redraw();for(x=0;x<this.cornerHandles.length;x++)this.cornerHandles[x].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",-mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Ra.apply(this);null!=this.state&&null!=this.linkHint&&(x=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),M=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),Q=mxUtils.getBoundingBox(M,this.state.style[mxConstants.STYLE_ROTATION]||"0",x),x=null!=Q?mxUtils.getBoundingBox(this.state,-this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,M=null!=this.state.text?this.state.text.boundingBox:null,null==Q&&(Q=this.state),Q=Q.y+Q.height,null!=M&&(Q=Math.max(Q,M.y+M.height)),this.linkHint.style.left=x.x+x.width/2+"px",this.linkHint.style.top=Math.round(Q+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Za=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Za.apply(this,arguments);-this.destroyMoveHandles();this.destroyCornerHandles();null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var La=mxEdgeHandler.prototype.redrawHandles;-mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(La.apply(this),null!=this.state&&null!=this.linkHint)){var x=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(x=new mxRectangle(x.x,x.y,x.width,x.height),x.add(this.state.text.bounds));this.linkHint.style.left=x.x+x.width/2+"px";this.linkHint.style.top=Math.round(x.y+x.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var $a=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=-function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Da=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Da.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,n,y){mxShape.call(this);this.line=d;this.stroke=n;this.strokewidth=null!=y?y:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function u(){mxConnector.call(this)}function p(){mxCylinder.call(this)}function B(){mxActor.call(this)}function H(){mxCylinder.call(this)}function T(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function R(){mxShape.call(this)}+(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),L.consume()}};var fa=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);fa.apply(this,arguments)};var pa=(new Date).getTime(),sa=0,qa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=+function(x,L,R,W){qa.apply(this,arguments);R!=this.currentTerminalState?(pa=(new Date).getTime(),sa=0):sa=(new Date).getTime()-pa;this.currentTerminalState=R};var wa=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(x){return mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())?!1:null!=this.currentTerminalState&&x.getState()==this.currentTerminalState&&2E3<sa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,+"outlineConnect","1"))&&wa.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(x,L,R){L=null!=x&&0==x;var W=this.state.getVisibleTerminalState(L);x=null!=x&&null!=this.state.absolutePoints&&(0==x||x>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==x)?this.graph.getConnectionConstraint(this.state,W,L):null;R=null!=(null!=x?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(L),x):null)?R?this.endFixedHandleImage:this.fixedHandleImage:+null!=x&&null!=W?R?this.endTerminalHandleImage:this.terminalHandleImage:R?this.endHandleImage:this.handleImage;if(null!=R)return R=new mxImageShape(new mxRectangle(0,0,R.width,R.height),R.src),R.preserveImageAspect=!1,R;R=mxConstants.HANDLE_SIZE;this.preferHtml&&--R;return new mxRectangleShape(new mxRectangle(0,0,R,R),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Aa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(x,L,R,W){W=L==mxEvent.ROTATION_HANDLE?+HoverIcons.prototype.rotationHandle:L==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:W;return Aa.apply(this,arguments)};var za=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(x){if(null!=x&&1==x.length){var L=this.graph.getModel(),R=L.getParent(x[0]),W=this.graph.getCellGeometry(x[0]);if(L.isEdge(R)&&null!=W&&W.relative&&(L=this.graph.view.getState(x[0]),null!=L&&2>L.width&&2>L.height&&null!=L.text&&null!=L.text.boundingBox))return mxRectangle.fromRectangle(L.text.boundingBox)}return za.apply(this,+arguments)};var Da=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var x=Da.apply(this,arguments),L=[],R=0;R<x.length;R++)"1"!=mxUtils.getValue(x[R].style,"part","0")&&L.push(x[R]);return L};var ra=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(x){var L=this.graph.getModel(),R=L.getParent(x.cell),W=this.graph.getCellGeometry(x.cell);return L.isEdge(R)&&null!=W&&W.relative&&2>x.width&&2>x.height&&null!=+x.text&&null!=x.text.boundingBox?(L=x.text.unrotatedBoundingBox||x.text.boundingBox,new mxRectangle(Math.round(L.x),Math.round(L.y),Math.round(L.width),Math.round(L.height))):ra.apply(this,arguments)};var ya=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(x,L){var R=this.graph.getModel(),W=R.getParent(this.state.cell),ja=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(L)==mxEvent.ROTATION_HANDLE||!R.isEdge(W)||null==ja||!ja.relative||null==this.state||+2<=this.state.width||2<=this.state.height)&&ya.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var x=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),L=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&x==mxConstants.NONE&&L==mxConstants.NONE?(x=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,+x,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(x,L){Ca.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ka=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=+function(x,L){Ka.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(x,L){try{if(null==x&&(null==L||0==L.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),+this.linkHint=null);else if(null!=x||null!=L&&0<L.length){var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("editLink"));R.setAttribute("width","14");R.setAttribute("height","14");R.style.paddingLeft="8px";R.style.marginLeft="auto";R.style.marginBottom="-1px";R.style.cursor="pointer";var W=R.cloneNode(!0);W.setAttribute("src",Editor.trashImage);W.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));+W.style.paddingLeft="4px";W.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=x){var ja=document.createElement("div");+ja.style.display="flex";ja.style.alignItems="center";ja.appendChild(this.graph.createLinkForHint(x,null,this.state.cell));this.linkHint.appendChild(ja);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ka=R.cloneNode(!0);ja.appendChild(ka);mxEvent.addListener(ka,"click",mxUtils.bind(this,function(va){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(va)}));var oa=W.cloneNode(!0);ja.appendChild(oa);mxEvent.addListener(oa,+"click",mxUtils.bind(this,function(va){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(va)}))}}if(null!=L)for(ja=0;ja<L.length;ja++)mxUtils.bind(this,function(va,ta){var xa=document.createElement("div");xa.style.display="flex";xa.style.alignItems="center";xa.style.marginTop=null!=x||0<ta?"6px":"0px";xa.appendChild(this.graph.createLinkForHint(va.getAttribute("href"),mxUtils.getTextContent(va),this.state.cell));var Fa=R.cloneNode(!0);xa.appendChild(Fa);var Ma=mxUtils.bind(this,function(Wa){var Xa=+document.createElement("div");Xa.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var ab=Xa.getElementsByTagName("a")[ta];if(null!=ab){if(null==Wa||""==Wa){for(Wa=ab.cloneNode(!0).firstChild;null!=Wa;)ab.parentNode.insertBefore(Wa.cloneNode(!0),ab),Wa=Wa.nextSibling;ab.parentNode.removeChild(ab)}else ab.setAttribute("href",Wa);this.graph.labelChanged(this.state.cell,Xa.innerHTML)}});mxEvent.addListener(Fa,"click",mxUtils.bind(this,function(Wa){this.graph.showLinkDialog(va.getAttribute("href")||+"",mxResources.get("ok"),Ma);mxEvent.consume(Wa)}));Fa=W.cloneNode(!0);xa.appendChild(Fa);mxEvent.addListener(Fa,"click",mxUtils.bind(this,function(Wa){Ma();mxEvent.consume(Wa)}));this.linkHint.appendChild(xa)})(L[ja],ja)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(va){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Ha=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var x=Ha.apply(this,+arguments);x.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return x};var Ba=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ba.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Pa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var x=0;x<this.moveHandles.length;x++)null!=+this.moveHandles[x]&&(this.moveHandles[x].bounds.x=Math.round(this.moveHandles[x].rowState.x+this.moveHandles[x].rowState.width-this.moveHandles[x].bounds.width/2),this.moveHandles[x].bounds.y=Math.round(this.moveHandles[x].rowState.y+(this.moveHandles[x].rowState.height-this.moveHandles[x].bounds.height)/2),this.moveHandles[x].redraw());if(null!=this.cornerHandles){x=this.getSelectionBorderInset();var L=this.cornerHandles,R=L[0].bounds.height/2;L[0].bounds.x=this.state.x-L[0].bounds.width/2+x;L[0].bounds.y=+this.state.y-R+x;L[0].redraw();L[1].bounds.x=L[0].bounds.x+this.state.width-2*x;L[1].bounds.y=L[0].bounds.y;L[1].redraw();L[2].bounds.x=L[0].bounds.x;L[2].bounds.y=this.state.y+this.state.height-2*x;L[2].redraw();L[3].bounds.x=L[1].bounds.x;L[3].bounds.y=L[2].bounds.y;L[3].redraw();for(x=0;x<this.cornerHandles.length;x++)this.cornerHandles[x].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",+mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Pa.apply(this);null!=this.state&&null!=this.linkHint&&(x=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),L=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),R=mxUtils.getBoundingBox(L,this.state.style[mxConstants.STYLE_ROTATION]||"0",x),x=null!=R?mxUtils.getBoundingBox(this.state,+this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,L=null!=this.state.text?this.state.text.boundingBox:null,null==R&&(R=this.state),R=R.y+R.height,null!=L&&(R=Math.max(R,L.y+L.height)),this.linkHint.style.left=x.x+x.width/2+"px",this.linkHint.style.top=Math.round(R+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var $a=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){$a.apply(this,arguments);+this.destroyMoveHandles();this.destroyCornerHandles();null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Na=mxEdgeHandler.prototype.redrawHandles;+mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Na.apply(this),null!=this.state&&null!=this.linkHint)){var x=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(x=new mxRectangle(x.x,x.y,x.width,x.height),x.add(this.state.text.bounds));this.linkHint.style.left=x.x+x.width/2+"px";this.linkHint.style.top=Math.round(x.y+x.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var Ya=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=+function(){Ya.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ea=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ea.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,n,y){mxShape.call(this);this.line=d;this.stroke=n;this.strokewidth=null!=y?y:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function u(){mxConnector.call(this)}function p(){mxCylinder.call(this)}function B(){mxActor.call(this)}function H(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function Q(){mxShape.call(this)}function c(){mxShape.call(this)}function f(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1}function l(){mxActor.call(this)}function t(){mxCylinder.call(this)}function z(){mxCylinder.call(this)}function C(){mxActor.call(this)}function F(){mxActor.call(this)}function N(){mxActor.call(this)}function K(){mxActor.call(this)}function J(){mxActor.call(this)}function da(){mxActor.call(this)}function ea(){mxActor.call(this)}function ca(d,n){this.canvas=d;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=n;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ca.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ca.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ca.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ca.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=-mxUtils.bind(this,ca.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ca.prototype.arcTo)}function W(){mxRectangleShape.call(this)}function ba(){mxRectangleShape.call(this)}function ha(){mxActor.call(this)}function la(){mxActor.call(this)}function Y(){mxActor.call(this)}function ma(){mxRectangleShape.call(this)}function Z(){mxRectangleShape.call(this)}function k(){mxCylinder.call(this)}function A(){mxShape.call(this)}function I(){mxShape.call(this)}function U(){mxEllipse.call(this)}-function O(){mxShape.call(this)}function S(){mxShape.call(this)}function X(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function ja(){mxShape.call(this)}function pa(){mxShape.call(this)}function sa(){mxShape.call(this)}function qa(){mxShape.call(this)}function wa(){mxCylinder.call(this)}function Ba(){mxCylinder.call(this)}function za(){mxRectangleShape.call(this)}function Ea(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function ya(){mxArrowConnector.call(this);-this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ma(){mxActor.call(this)}function Ha(){mxRectangleShape.call(this)}function Aa(){mxActor.call(this)}function Ra(){mxActor.call(this)}function Za(){mxActor.call(this)}function La(){mxActor.call(this)}function $a(){mxActor.call(this)}function Da(){mxActor.call(this)}function x(){mxActor.call(this)}function M(){mxActor.call(this)}function Q(){mxActor.call(this)}function V(){mxActor.call(this)}function ia(){mxEllipse.call(this)}-function ka(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function Na(){mxEllipse.call(this)}function Wa(){mxActor.call(this)}function Xa(){mxActor.call(this)}function ab(){mxActor.call(this)}function Oa(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=-!0;this.indent=2;this.rectOutline="single"}function Qa(){mxConnector.call(this)}function kb(d,n,y,q,v,D,E,fa,L,va){E+=L;var na=q.clone();q.x-=v*(2*E+L);q.y-=D*(2*E+L);v*=E+L;D*=E+L;return function(){d.ellipse(na.x-v-E,na.y-D-E,2*E,2*E);va?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var n=0;n<this.line.length;n++){var y=this.line[n];null!=y&&(y=new mxRectangle(y.x,y.y,this.strokewidth,this.strokewidth),null==+mxUtils.bind(this,ca.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ca.prototype.arcTo)}function X(){mxRectangleShape.call(this)}function aa(){mxRectangleShape.call(this)}function ia(){mxActor.call(this)}function la(){mxActor.call(this)}function Y(){mxActor.call(this)}function ma(){mxRectangleShape.call(this)}function Z(){mxRectangleShape.call(this)}function k(){mxCylinder.call(this)}function A(){mxShape.call(this)}function I(){mxShape.call(this)}function T(){mxEllipse.call(this)}+function O(){mxShape.call(this)}function U(){mxShape.call(this)}function V(){mxRectangleShape.call(this)}function ba(){mxShape.call(this)}function fa(){mxShape.call(this)}function pa(){mxShape.call(this)}function sa(){mxShape.call(this)}function qa(){mxShape.call(this)}function wa(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function za(){mxRectangleShape.call(this)}function Da(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function ya(){mxArrowConnector.call(this);+this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ka(){mxActor.call(this)}function Ha(){mxRectangleShape.call(this)}function Ba(){mxActor.call(this)}function Pa(){mxActor.call(this)}function $a(){mxActor.call(this)}function Na(){mxActor.call(this)}function Ya(){mxActor.call(this)}function Ea(){mxActor.call(this)}function x(){mxActor.call(this)}function L(){mxActor.call(this)}function R(){mxActor.call(this)}function W(){mxActor.call(this)}function ja(){mxEllipse.call(this)}+function ka(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function va(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Wa(){mxActor.call(this)}function Xa(){mxActor.call(this)}function ab(){mxActor.call(this)}function Oa(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=+!0;this.indent=2;this.rectOutline="single"}function Ra(){mxConnector.call(this)}function kb(d,n,y,q,v,D,E,ha,M,ua){E+=M;var na=q.clone();q.x-=v*(2*E+M);q.y-=D*(2*E+M);v*=E+M;D*=E+M;return function(){d.ellipse(na.x-v-E,na.y-D-E,2*E,2*E);ua?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var n=0;n<this.line.length;n++){var y=this.line[n];null!=y&&(y=new mxRectangle(y.x,y.y,this.strokewidth,this.strokewidth),null==d?d=y:d.add(y))}this.bounds=null!=d?d:new mxRectangle};b.prototype.paintVertexShape=function(d,n,y,q,v){this.paintTableLine(d,this.line,0,0)};b.prototype.paintTableLine=function(d,n,y,q){if(null!=n){var v=null;d.begin();for(var D=0;D<n.length;D++){var E=n[D];null!=E&&(null==v?d.moveTo(E.x+y,E.y+q):null!=v&&d.lineTo(E.x+y,E.y+q));v=E}d.end();d.stroke()}};b.prototype.intersectsRectangle=function(d){var n=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var y=null,q=0;q<this.line.length&&!n;q++){var v=this.line[q];null!=v&&null!=y&&(n=mxUtils.rectangleIntersectsSegment(d,y,v));y=v}return n};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(d){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(d,n,y,q,v){var D=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):-!1,E=this.isHorizontal(),fa=this.getTitleSize();0==fa||this.outline?Fa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-n,-y));D||this.outline||!(E&&fa<v||!E&&fa<q)||this.paintForeground(d,n,y,q,v)};e.prototype.paintForeground=function(d,n,y,q,v){if(null!=this.state){var D=this.flipH,E=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var fa=D;D=E;E=fa}d.rotate(-this.getShapeRotation(),+!1,E=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Fa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-n,-y));D||this.outline||!(E&&ha<v||!E&&ha<q)||this.paintForeground(d,n,y,q,v)};e.prototype.paintForeground=function(d,n,y,q,v){if(null!=this.state){var D=this.flipH,E=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=D;D=E;E=ha}d.rotate(-this.getShapeRotation(),D,E,n+q/2,y+v/2);s=this.scale;n=this.bounds.x/s;y=this.bounds.y/s;q=this.bounds.width/s;v=this.bounds.height/s;this.paintTableForeground(d,n,y,q,v)}};e.prototype.paintTableForeground=function(d,n,y,q,v){q=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(v=0;v<q.length;v++)b.prototype.paintTableLine(d,q[v],n,y)};e.prototype.configurePointerEvents=function(d){0==this.getTitleSize()?d.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",e);mxUtils.extend(g,e);g.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",g);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(q,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),E=Math.max(-1,Math.min(1,-parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),fa=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));d.translate(n,y);d.begin();d.moveTo(0,0);d.lineTo(q-D,0);d.lineTo(q,D);d.lineTo(q,v);d.lineTo(D,v);d.lineTo(0,v-D);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=E&&(d.setFillAlpha(Math.abs(E)),d.setFillColor(0>E?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(q-D,0),d.lineTo(q,D),-d.lineTo(D,D),d.close(),d.fill()),0!=fa&&(d.setFillAlpha(Math.abs(fa)),d.setFillColor(0>fa?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(D,D),d.lineTo(D,v),d.lineTo(0,v-D),d.close(),d.fill()),d.begin(),d.moveTo(D,v),d.lineTo(D,D),d.lineTo(0,0),d.moveTo(D,D),d.lineTo(q,D),d.end(),d.stroke())};m.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)?(d=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(d,d,0,0)):null};mxCellRenderer.registerShape("cube",-m);var cb=Math.tan(mxUtils.toRadians(30)),Ya=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",B);mxUtils.extend(u,mxConnector);u.prototype.paintEdgeShape=function(d,n){var y=this.createMarker(d,n,!0),q=this.createMarker(d,n,!1);d.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&d.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);d.setShadow(!1);d.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this,+parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));d.translate(n,y);d.begin();d.moveTo(0,0);d.lineTo(q-D,0);d.lineTo(q,D);d.lineTo(q,v);d.lineTo(D,v);d.lineTo(0,v-D);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=E&&(d.setFillAlpha(Math.abs(E)),d.setFillColor(0>E?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(q-D,0),d.lineTo(q,D),+d.lineTo(D,D),d.close(),d.fill()),0!=ha&&(d.setFillAlpha(Math.abs(ha)),d.setFillColor(0>ha?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(D,D),d.lineTo(D,v),d.lineTo(0,v-D),d.close(),d.fill()),d.begin(),d.moveTo(D,v),d.lineTo(D,D),d.lineTo(0,0),d.moveTo(D,D),d.lineTo(q,D),d.end(),d.stroke())};m.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)?(d=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(d,d,0,0)):null};mxCellRenderer.registerShape("cube",+m);var cb=Math.tan(mxUtils.toRadians(30)),Za=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",B);mxUtils.extend(u,mxConnector);u.prototype.paintEdgeShape=function(d,n){var y=this.createMarker(d,n,!0),q=this.createMarker(d,n,!1);d.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&d.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);d.setShadow(!1);d.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);d.setStrokeColor(this.stroke);d.setFillColor(this.stroke);d.setDashed(!1);null!=y&&y();null!=q&&q()};mxCellRenderer.registerShape("wire",u);mxUtils.extend(p,mxCylinder);p.prototype.size=6;p.prototype.paintVertexShape=function(d,n,y,q,v){d.setFillColor(this.stroke);var D=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;d.ellipse(n+.5*(q-D),y+.5*(v-D),D,D);d.fill();d.setFillColor(mxConstants.NONE);d.rect(n,y,q,v);d.fill()};mxCellRenderer.registerShape("waypoint",-p);mxUtils.extend(B,mxActor);B.prototype.size=20;B.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(q,v/cb);d.translate((q-n)/2,(v-n)/2+n/4);d.moveTo(0,.25*n);d.lineTo(.5*n,n*Ya);d.lineTo(n,.25*n);d.lineTo(.5*n,(.5-Ya)*n);d.lineTo(0,.25*n);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",B);mxUtils.extend(H,mxCylinder);H.prototype.size=20;H.prototype.redrawPath=function(d,n,y,q,v,D){n=Math.min(q,v/(.5+cb));D?(d.moveTo(0,.25*n),d.lineTo(.5*n,(.5-Ya)*n),d.lineTo(n,.25*n),d.moveTo(.5*-n,(.5-Ya)*n),d.lineTo(.5*n,(1-Ya)*n)):(d.translate((q-n)/2,(v-n)/2),d.moveTo(0,.25*n),d.lineTo(.5*n,n*Ya),d.lineTo(n,.25*n),d.lineTo(n,.75*n),d.lineTo(.5*n,(1-Ya)*n),d.lineTo(0,.75*n),d.close());d.end()};mxCellRenderer.registerShape("isoCube",H);mxUtils.extend(T,mxCylinder);T.prototype.redrawPath=function(d,n,y,q,v,D){n=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(D&&null!=this.fill||!D&&null==this.fill)d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,n/2),d.moveTo(0,-n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,n/2),d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,-n);D||(d.moveTo(0,n),d.curveTo(0,-n/3,q,-n/3,q,n),d.lineTo(q,v-n),d.curveTo(q,v+n/3,0,v+n/3,0,v-n),d.close())};T.prototype.getLabelMargins=function(d){return new mxRectangle(0,2.5*Math.min(d.height/2,Math.round(d.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",T);mxUtils.extend(G,mxCylinder);G.prototype.size=30;G.prototype.darkOpacity=+p);mxUtils.extend(B,mxActor);B.prototype.size=20;B.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(q,v/cb);d.translate((q-n)/2,(v-n)/2+n/4);d.moveTo(0,.25*n);d.lineTo(.5*n,n*Za);d.lineTo(n,.25*n);d.lineTo(.5*n,(.5-Za)*n);d.lineTo(0,.25*n);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",B);mxUtils.extend(H,mxCylinder);H.prototype.size=20;H.prototype.redrawPath=function(d,n,y,q,v,D){n=Math.min(q,v/(.5+cb));D?(d.moveTo(0,.25*n),d.lineTo(.5*n,(.5-Za)*n),d.lineTo(n,.25*n),d.moveTo(.5*+n,(.5-Za)*n),d.lineTo(.5*n,(1-Za)*n)):(d.translate((q-n)/2,(v-n)/2),d.moveTo(0,.25*n),d.lineTo(.5*n,n*Za),d.lineTo(n,.25*n),d.lineTo(n,.75*n),d.lineTo(.5*n,(1-Za)*n),d.lineTo(0,.75*n),d.close());d.end()};mxCellRenderer.registerShape("isoCube",H);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(d,n,y,q,v,D){n=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(D&&null!=this.fill||!D&&null==this.fill)d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,n/2),d.moveTo(0,+n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,n/2),d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,-n);D||(d.moveTo(0,n),d.curveTo(0,-n/3,q,-n/3,q,n),d.lineTo(q,v-n),d.curveTo(q,v+n/3,0,v+n/3,0,v-n),d.close())};S.prototype.getLabelMargins=function(d){return new mxRectangle(0,2.5*Math.min(d.height/2,Math.round(d.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",S);mxUtils.extend(G,mxCylinder);G.prototype.size=30;G.prototype.darkOpacity=0;G.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(q,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),E=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));d.translate(n,y);d.begin();d.moveTo(0,0);d.lineTo(q-D,0);d.lineTo(q,D);d.lineTo(q,v);d.lineTo(0,v);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=E&&(d.setFillAlpha(Math.abs(E)),d.setFillColor(0>E?"#FFFFFF":"#000000"),-d.begin(),d.moveTo(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.close(),d.fill()),d.begin(),d.moveTo(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.end(),d.stroke())};mxCellRenderer.registerShape("note",G);mxUtils.extend(P,G);mxCellRenderer.registerShape("note2",P);P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,0)}return null};mxUtils.extend(R,mxShape);R.prototype.isoAngle=-15;R.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;D=Math.min(q*Math.tan(D),.5*v);d.translate(n,y);d.begin();d.moveTo(.5*q,0);d.lineTo(q,D);d.lineTo(q,v-D);d.lineTo(.5*q,v);d.lineTo(0,v-D);d.lineTo(0,D);d.close();d.fillAndStroke();d.setShadow(!1);d.begin();d.moveTo(0,D);d.lineTo(.5*q,2*D);d.lineTo(q,D);d.moveTo(.5*q,2*D);d.lineTo(.5*q,v);d.stroke()};mxCellRenderer.registerShape("isoCube2",-R);mxUtils.extend(c,mxShape);c.prototype.size=15;c.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.translate(n,y);0==D?(d.rect(0,0,q,v),d.fillAndStroke()):(d.begin(),d.moveTo(0,D),d.arcTo(.5*q,D,0,0,1,.5*q,0),d.arcTo(.5*q,D,0,0,1,q,D),d.lineTo(q,v-D),d.arcTo(.5*q,D,0,0,1,.5*q,v),d.arcTo(.5*q,D,0,0,1,0,v-D),d.close(),d.fillAndStroke(),d.setShadow(!1),d.begin(),d.moveTo(q,D),d.arcTo(.5*q,D,0,0,1,.5*q,2*D),d.arcTo(.5*+d.begin(),d.moveTo(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.close(),d.fill()),d.begin(),d.moveTo(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.end(),d.stroke())};mxCellRenderer.registerShape("note",G);mxUtils.extend(P,G);mxCellRenderer.registerShape("note2",P);P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,0)}return null};mxUtils.extend(Q,mxShape);Q.prototype.isoAngle=+15;Q.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;D=Math.min(q*Math.tan(D),.5*v);d.translate(n,y);d.begin();d.moveTo(.5*q,0);d.lineTo(q,D);d.lineTo(q,v-D);d.lineTo(.5*q,v);d.lineTo(0,v-D);d.lineTo(0,D);d.close();d.fillAndStroke();d.setShadow(!1);d.begin();d.moveTo(0,D);d.lineTo(.5*q,2*D);d.lineTo(q,D);d.moveTo(.5*q,2*D);d.lineTo(.5*q,v);d.stroke()};mxCellRenderer.registerShape("isoCube2",+Q);mxUtils.extend(c,mxShape);c.prototype.size=15;c.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.translate(n,y);0==D?(d.rect(0,0,q,v),d.fillAndStroke()):(d.begin(),d.moveTo(0,D),d.arcTo(.5*q,D,0,0,1,.5*q,0),d.arcTo(.5*q,D,0,0,1,q,D),d.lineTo(q,v-D),d.arcTo(.5*q,D,0,0,1,.5*q,v),d.arcTo(.5*q,D,0,0,1,0,v-D),d.close(),d.fillAndStroke(),d.setShadow(!1),d.begin(),d.moveTo(q,D),d.arcTo(.5*q,D,0,0,1,.5*q,2*D),d.arcTo(.5*q,D,0,0,1,0,D),d.stroke())};mxCellRenderer.registerShape("cylinder2",c);mxUtils.extend(f,mxCylinder);f.prototype.size=15;f.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"lid",!0);d.translate(n,y);0==D?(d.rect(0,0,q,v),d.fillAndStroke()):(d.begin(),E?(d.moveTo(0,D),d.arcTo(.5*q,D,0,0,1,.5*q,0),d.arcTo(.5*q,D,0,0,1,q,D)):(d.moveTo(0,0),d.arcTo(.5*q,D,0,0,0,.5*q,D),d.arcTo(.5*q,D,0,0,0,q,0)),d.lineTo(q,v-D),d.arcTo(.5*q,D,0,0,1,.5*q,v),d.arcTo(.5*q,D,0,0,1,0,v-D),d.close(),d.fillAndStroke(),d.setShadow(!1),E&&(d.begin(),d.moveTo(q,D),d.arcTo(.5*q,D,0,0,1,.5*q,2*D),d.arcTo(.5*q,D,0,0,1,0,D),d.stroke()))};mxCellRenderer.registerShape("cylinder3",f);mxUtils.extend(l,mxActor);l.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.quadTo(q/2,.5*v,q,0);d.quadTo(.5*q,v/2,q,v);d.quadTo(q/2,.5*v,0,v);d.quadTo(.5*q,v/2,0,0);d.end()};mxCellRenderer.registerShape("switch",l);mxUtils.extend(t,-mxCylinder);t.prototype.tabWidth=60;t.prototype.tabHeight=20;t.prototype.tabPosition="right";t.prototype.arcSize=.1;t.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var D=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),E=mxUtils.getValue(this.style,"rounded",!1),fa=mxUtils.getValue(this.style,-"absoluteArcSize",!1),L=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));fa||(L*=Math.min(q,v));L=Math.min(L,.5*q,.5*(v-y));n=Math.max(n,L);n=Math.min(q-L,n);E||(L=0);d.begin();"left"==D?(d.moveTo(Math.max(L,0),y),d.lineTo(Math.max(L,0),0),d.lineTo(n,0),d.lineTo(n,y)):(d.moveTo(q-n,y),d.lineTo(q-n,0),d.lineTo(q-Math.max(L,0),0),d.lineTo(q-Math.max(L,0),y));E?(d.moveTo(0,L+y),d.arcTo(L,L,0,0,1,L,y),d.lineTo(q-L,y),d.arcTo(L,L,0,0,1,q,L+y),d.lineTo(q,v-L),d.arcTo(L,L,0,0,1,q-L,v),d.lineTo(L,-v),d.arcTo(L,L,0,0,1,0,v-L)):(d.moveTo(0,y),d.lineTo(q,y),d.lineTo(q,v),d.lineTo(0,v));d.close();d.fillAndStroke();d.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(d.begin(),d.moveTo(q-30,y+20),d.lineTo(q-20,y+10),d.lineTo(q-10,y+20),d.close(),d.stroke())};mxCellRenderer.registerShape("folder",t);t.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,+mxCylinder);t.prototype.tabWidth=60;t.prototype.tabHeight=20;t.prototype.tabPosition="right";t.prototype.arcSize=.1;t.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var D=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),E=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style,+"absoluteArcSize",!1),M=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ha||(M*=Math.min(q,v));M=Math.min(M,.5*q,.5*(v-y));n=Math.max(n,M);n=Math.min(q-M,n);E||(M=0);d.begin();"left"==D?(d.moveTo(Math.max(M,0),y),d.lineTo(Math.max(M,0),0),d.lineTo(n,0),d.lineTo(n,y)):(d.moveTo(q-n,y),d.lineTo(q-n,0),d.lineTo(q-Math.max(M,0),0),d.lineTo(q-Math.max(M,0),y));E?(d.moveTo(0,M+y),d.arcTo(M,M,0,0,1,M,y),d.lineTo(q-M,y),d.arcTo(M,M,0,0,1,q,M+y),d.lineTo(q,v-M),d.arcTo(M,M,0,0,1,q-M,v),d.lineTo(M,+v),d.arcTo(M,M,0,0,1,0,v-M)):(d.moveTo(0,y),d.lineTo(q,y),d.lineTo(q,v),d.lineTo(0,v));d.close();d.fillAndStroke();d.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(d.begin(),d.moveTo(q-30,y+20),d.lineTo(q-20,y+10),d.lineTo(q-10,y+20),d.close(),d.stroke())};mxCellRenderer.registerShape("folder",t);t.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var y=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var q=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),D=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(D*=Math.min(d.width,d.height));D=Math.min(D,.5*d.width,.5*(d.height-n));q||(D=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(D,0,Math.min(d.width,d.width-y),Math.min(d.height,d.height-n)):new mxRectangle(Math.min(d.width,d.width-y),0,D,Math.min(d.height,d.height-n))}return new mxRectangle(0,Math.min(d.height,n),0,0)}return null};mxUtils.extend(z,mxCylinder);z.prototype.arcSize=.1;z.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);var D=mxUtils.getValue(this.style,"rounded",!1),E=mxUtils.getValue(this.style,"absoluteArcSize",!1);n=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));y=mxUtils.getValue(this.style,"umlStateConnection",null);E||(n*=Math.min(q,v));n=Math.min(n,.5*q,.5*v);D||(n=0);D=0;null!=y&&(D=10);d.begin();d.moveTo(D,n);d.arcTo(n,n,0,0,1,D+n,0);d.lineTo(q-n,0);d.arcTo(n,n,0,0,1,q,n);d.lineTo(q,v-n);d.arcTo(n,n,0,0,1,q-n,v);d.lineTo(D+n,v);d.arcTo(n,n,0,0,1,D,v-n);d.close();d.fillAndStroke();d.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(d.roundrect(q-40,v-20,10,10,3,3),d.stroke(),d.roundrect(q-20,v-20,10,10,3,3),d.stroke(),d.begin(),d.moveTo(q-30,v-15),d.lineTo(q-20,v-15),@@ -2782,181 +2782,181 @@ n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.minda.prototype.size=.5;da.prototype.redrawPath=function(d,n,y,q,v){d.setFillColor(null);n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(q,0),new mxPoint(n,0),new mxPoint(n,v/2),new mxPoint(0,v/2),new mxPoint(n,v/2),new mxPoint(n,v),new mxPoint(q,v)],this.isRounded,y,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",da);mxUtils.extend(ea,mxActor);ea.prototype.redrawPath=function(d,n,y,q,v){d.setStrokeWidth(1);d.setFillColor(this.stroke);n=q/5;d.rect(0,0,n,v);d.fillAndStroke();d.rect(2*n,0,n,v);d.fillAndStroke();d.rect(4*n,0,n,v);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",ea);ca.prototype.moveTo=function(d,n){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;this.firstX=d;this.firstY=n};ca.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)};ca.prototype.quadTo=function(d,n,y,q){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=y;this.lastY=q};ca.prototype.curveTo=function(d,n,y,q,v,D){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=D};ca.prototype.arcTo=function(d,n,y,q,v,D,E){this.originalArcTo.apply(this.canvas,arguments);this.lastX=D;this.lastY=E};ca.prototype.lineTo=function(d,n){if(null!=this.lastX&&null!=this.lastY){var y=function(na){return"number"===-typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},q=Math.abs(d-this.lastX),v=Math.abs(n-this.lastY),D=Math.sqrt(q*q+v*v);if(2>D){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;return}var E=Math.round(D/10),fa=this.defaultVariation;5>E&&(E=5,fa/=3);var L=y(d-this.lastX)*q/E;y=y(n-this.lastY)*v/E;q/=D;v/=D;for(D=0;D<E;D++){var va=(Math.random()-.5)*fa;this.originalLineTo.call(this.canvas,L*D+this.lastX-va*v,y*D+this.lastY-va*q)}this.originalLineTo.call(this.canvas,d,n)}else this.originalLineTo.apply(this.canvas,+typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},q=Math.abs(d-this.lastX),v=Math.abs(n-this.lastY),D=Math.sqrt(q*q+v*v);if(2>D){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;return}var E=Math.round(D/10),ha=this.defaultVariation;5>E&&(E=5,ha/=3);var M=y(d-this.lastX)*q/E;y=y(n-this.lastY)*v/E;q/=D;v/=D;for(D=0;D<E;D++){var ua=(Math.random()-.5)*ha;this.originalLineTo.call(this.canvas,M*D+this.lastX-ua*v,y*D+this.lastY-ua*q)}this.originalLineTo.call(this.canvas,d,n)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n};ca.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 hb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(d){hb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var vb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(d){vb.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new ca(d,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(d){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(d)};var mb=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&mb.apply(this,arguments)};var pb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(d,n,y,q,v){if(null==d.handJiggle||d.handJiggle.constructor!=ca)pb.apply(this,arguments);else{var D=!0;null!=this.style&&(D="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(D||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)D||null!=this.fill&&this.fill!=mxConstants.NONE||(d.pointerEvents=!1),d.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?D=Math.min(q/2,Math.min(v/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,D=Math.min(q*D,v*D)),d.moveTo(n+-D,y),d.lineTo(n+q-D,y),d.quadTo(n+q,y,n+q,y+D),d.lineTo(n+q,y+v-D),d.quadTo(n+q,y+v,n+q-D,y+v),d.lineTo(n+D,y+v),d.quadTo(n,y+v,n,y+v-D),d.lineTo(n,y+D),d.quadTo(n,y,n+D,y)):(d.moveTo(n,y),d.lineTo(n+q,y),d.lineTo(n+q,y+v),d.lineTo(n,y+v),d.lineTo(n,y)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(W,mxRectangleShape);W.prototype.size=.1;W.prototype.fixedSize=!1;W.prototype.isHtmlAllowed=function(){return!1};W.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,-!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var n=d.width,y=d.height;d=new mxRectangle(d.x,d.y,n,y);var q=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;q=Math.max(q,Math.min(n*v,y*v))}d.x+=Math.round(q);d.width-=Math.round(2*q);return d}return d};W.prototype.paintForeground=+D,y),d.lineTo(n+q-D,y),d.quadTo(n+q,y,n+q,y+D),d.lineTo(n+q,y+v-D),d.quadTo(n+q,y+v,n+q-D,y+v),d.lineTo(n+D,y+v),d.quadTo(n,y+v,n,y+v-D),d.lineTo(n,y+D),d.quadTo(n,y,n+D,y)):(d.moveTo(n,y),d.lineTo(n+q,y),d.lineTo(n+q,y+v),d.lineTo(n,y+v),d.lineTo(n,y)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(X,mxRectangleShape);X.prototype.size=.1;X.prototype.fixedSize=!1;X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,+!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var n=d.width,y=d.height;d=new mxRectangle(d.x,d.y,n,y);var q=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;q=Math.max(q,Math.min(n*v,y*v))}d.x+=Math.round(q);d.width-=Math.round(2*q);return d}return d};X.prototype.paintForeground=function(d,n,y,q,v){var D=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),E=parseFloat(mxUtils.getValue(this.style,"size",this.size));E=D?Math.max(0,Math.min(q,E)):q*Math.max(0,Math.min(1,E));this.isRounded&&(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,E=Math.max(E,Math.min(q*D,v*D)));E=Math.round(E);d.begin();d.moveTo(n+E,y);d.lineTo(n+E,y+v);d.moveTo(n+q-E,y);d.lineTo(n+q-E,y+v);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,-arguments)};mxCellRenderer.registerShape("process",W);mxCellRenderer.registerShape("process2",W);mxUtils.extend(ba,mxRectangleShape);ba.prototype.paintBackground=function(d,n,y,q,v){d.setFillColor(mxConstants.NONE);d.rect(n,y,q,v);d.fill()};ba.prototype.paintForeground=function(d,n,y,q,v){};mxCellRenderer.registerShape("transparent",ba);mxUtils.extend(ha,mxHexagon);ha.prototype.size=30;ha.prototype.position=.5;ha.prototype.position2=.5;ha.prototype.base=20;ha.prototype.getLabelMargins=function(){return new mxRectangle(0,-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(d,n,y,q,v){n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var D=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),E=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",-this.position2)))),fa=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,v-y),new mxPoint(Math.min(q,D+fa),v-y),new mxPoint(E,v),new mxPoint(Math.max(0,D),v-y),new mxPoint(0,v-y)],this.isRounded,n,!0,[4])};mxCellRenderer.registerShape("callout",ha);mxUtils.extend(la,mxActor);la.prototype.size=.2;la.prototype.fixedSize=20;la.prototype.isRoundable=function(){return!0};la.prototype.redrawPath=function(d,+arguments)};mxCellRenderer.registerShape("process",X);mxCellRenderer.registerShape("process2",X);mxUtils.extend(aa,mxRectangleShape);aa.prototype.paintBackground=function(d,n,y,q,v){d.setFillColor(mxConstants.NONE);d.rect(n,y,q,v);d.fill()};aa.prototype.paintForeground=function(d,n,y,q,v){};mxCellRenderer.registerShape("transparent",aa);mxUtils.extend(ia,mxHexagon);ia.prototype.size=30;ia.prototype.position=.5;ia.prototype.position2=.5;ia.prototype.base=20;ia.prototype.getLabelMargins=function(){return new mxRectangle(0,+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(d,n,y,q,v){n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var D=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),E=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",+this.position2)))),ha=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,v-y),new mxPoint(Math.min(q,D+ha),v-y),new mxPoint(E,v),new mxPoint(Math.max(0,D),v-y),new mxPoint(0,v-y)],this.isRounded,n,!0,[4])};mxCellRenderer.registerShape("callout",ia);mxUtils.extend(la,mxActor);la.prototype.size=.2;la.prototype.fixedSize=20;la.prototype.isRoundable=function(){return!0};la.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q-n,0),new mxPoint(q,v/2),new mxPoint(q-n,v),new mxPoint(0,v),new mxPoint(n,v/2)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("step",la);mxUtils.extend(Y,mxHexagon);Y.prototype.size=.25;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,.5*v),new mxPoint(q-n,v),new mxPoint(n,v),new mxPoint(0,.5*v)],this.isRounded,y,!0)};mxCellRenderer.registerShape("hexagon",Y);mxUtils.extend(ma,mxRectangleShape);ma.prototype.isHtmlAllowed=function(){return!1};ma.prototype.paintForeground=function(d,n,y,q,v){var D=Math.min(q/5,v/5)+1;d.begin();d.moveTo(n+q/2,y+D);d.lineTo(n+q/2,y+v-D);d.moveTo(n+D,y+v/2);d.lineTo(n+q-D,y+v/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",ma);var db=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var n=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+n,d.y+n,d.width-2*n,d.height-2*n)}return d};mxRhombus.prototype.paintVertexShape=function(d,n,y,q,v){db.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var D=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);n+=D;y+=D;q-=2*D;v-=2*D;0<q&&0<v&&(d.setShadow(!1),db.apply(this,[d,n,y,q,v]))}};mxUtils.extend(Z,mxRectangleShape);Z.prototype.isHtmlAllowed=function(){return!1};Z.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var n=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+n,d.y+n,d.width-2*n,d.height-2*n)}return d};Z.prototype.paintForeground=function(d,n,y,q,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var D=-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);n+=D;y+=D;q-=2*D;v-=2*D;0<q&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);D=0;do{var E=mxCellRenderer.defaultShapes[this.style["symbol"+D]];if(null!=E){var fa=this.style["symbol"+D+"Align"],L=this.style["symbol"+D+"VerticalAlign"],va=this.style["symbol"+D+"Width"],na=this.style["symbol"+D+"Height"],Va=this.style["symbol"+D+"Spacing"]||0,fb=this.style["symbol"+D+"VSpacing"]||-Va,bb=this.style["symbol"+D+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(q+this.strokewidth,v+this.strokewidth),Va+=bb,fb+=bb);bb=n;var Ga=y;bb=fa==mxConstants.ALIGN_CENTER?bb+(q-va)/2:fa==mxConstants.ALIGN_RIGHT?bb+(q-va-Va):bb+Va;Ga=L==mxConstants.ALIGN_MIDDLE?Ga+(v-na)/2:L==mxConstants.ALIGN_BOTTOM?Ga+(v-na-fb):Ga+fb;d.save();fa=new E;fa.style=this.style;E.prototype.paintVertexShape.call(fa,d,bb,Ga,va,na);d.restore()}D++}while(null!=E)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);n+=D;y+=D;q-=2*D;v-=2*D;0<q&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);D=0;do{var E=mxCellRenderer.defaultShapes[this.style["symbol"+D]];if(null!=E){var ha=this.style["symbol"+D+"Align"],M=this.style["symbol"+D+"VerticalAlign"],ua=this.style["symbol"+D+"Width"],na=this.style["symbol"+D+"Height"],Va=this.style["symbol"+D+"Spacing"]||0,fb=this.style["symbol"+D+"VSpacing"]||+Va,bb=this.style["symbol"+D+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(q+this.strokewidth,v+this.strokewidth),Va+=bb,fb+=bb);bb=n;var Ga=y;bb=ha==mxConstants.ALIGN_CENTER?bb+(q-ua)/2:ha==mxConstants.ALIGN_RIGHT?bb+(q-ua-Va):bb+Va;Ga=M==mxConstants.ALIGN_MIDDLE?Ga+(v-na)/2:M==mxConstants.ALIGN_BOTTOM?Ga+(v-na-fb):Ga+fb;d.save();ha=new E;ha.style=this.style;E.prototype.paintVertexShape.call(ha,d,bb,Ga,ua,na);d.restore()}D++}while(null!=E)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",Z);mxUtils.extend(k,mxCylinder);k.prototype.redrawPath=function(d,n,y,q,v,D){D?(d.moveTo(0,0),d.lineTo(q/2,v/2),d.lineTo(q,0),d.end()):(d.moveTo(0,0),d.lineTo(q,0),d.lineTo(q,v),d.lineTo(0,v),d.close())};mxCellRenderer.registerShape("message",k);mxUtils.extend(A,mxShape);A.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.ellipse(q/4,0,q/2,v/4);d.fillAndStroke();d.begin();d.moveTo(q/2,v/4);d.lineTo(q/2,2*v/3);d.moveTo(q/2,v/3);d.lineTo(0,v/3);d.moveTo(q/2,v/3);d.lineTo(q,v/3);d.moveTo(q/2,2*v/3);d.lineTo(0,v);d.moveTo(q/2,2*v/3);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",A);mxUtils.extend(I,mxShape);I.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};I.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(0,v/4);d.lineTo(0,3*v/4);d.end();d.stroke();d.begin();d.moveTo(0,v/2);d.lineTo(q/6,v/2);d.end();d.stroke();d.ellipse(q/6,0,5*q/6,v);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",-I);mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(n+q/8,y+v);d.lineTo(n+7*q/8,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",U);mxUtils.extend(O,mxShape);O.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(q,0);d.lineTo(0,v);d.moveTo(0,0);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",O);mxUtils.extend(S,mxShape);-S.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};S.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,0);d.end();d.stroke();d.ellipse(0,v/8,q,7*v/8);d.fillAndStroke()};S.prototype.paintForeground=function(d,n,y,q,v){d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,v/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",S);mxUtils.extend(X,mxRectangleShape);X.prototype.size=-40;X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(d){var n=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,n)};X.prototype.paintBackground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"participant");null==E||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,n,-y,q,D):(E=this.state.view.graph.cellRenderer.getShape(E),null!=E&&E!=X&&(E=new E,E.apply(this.state),d.save(),E.paintVertexShape(d,n,y,q,D),d.restore()));D<v&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(n+q/2,y+D),d.lineTo(n+q/2,y+v),d.end(),d.stroke())};X.prototype.paintForeground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,n,y,q,Math.min(v,-D))};mxCellRenderer.registerShape("umlLifeline",X);mxUtils.extend(aa,mxShape);aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.configurePointerEvents=function(d){var n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=n&&n!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};aa.prototype.getLabelMargins=function(d){return new mxRectangle(0,-0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};aa.prototype.paintBackground=function(d,n,y,q,v){var D=this.corner,E=Math.min(q,Math.max(D,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),fa=Math.min(v,Math.max(1.5*D,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),L=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);L!=mxConstants.NONE&&-(d.setFillColor(L),d.rect(n,y,q,v),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,n,y,q,v),d.setGradient(this.fill,this.gradient,n,y,q,v,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;d.begin();d.moveTo(n,y);d.lineTo(n+E,y);d.lineTo(n+E,y+Math.max(0,fa-1.5*D));d.lineTo(n+Math.max(0,E-D),y+fa);d.lineTo(n,y+fa);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(n+E,y);-d.lineTo(n+q,y);d.lineTo(n+q,y+v);d.lineTo(n,y+v);d.lineTo(n,y+fa);d.stroke()};mxCellRenderer.registerShape("umlFrame",aa);mxPerimeter.CenterPerimeter=function(d,n,y,q){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(d,n,y,q){q=X.prototype.size;null!=n&&(q=mxUtils.getValue(n.style,"size",q)*n.view.scale);n=parseFloat(n.style[mxConstants.STYLE_STROKEWIDTH]||1)*n.view.scale/2-1;y.x<d.getCenterX()&&+I);mxUtils.extend(T,mxEllipse);T.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(n+q/8,y+v);d.lineTo(n+7*q/8,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",T);mxUtils.extend(O,mxShape);O.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(q,0);d.lineTo(0,v);d.moveTo(0,0);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",O);mxUtils.extend(U,mxShape);+U.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};U.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,0);d.end();d.stroke();d.ellipse(0,v/8,q,7*v/8);d.fillAndStroke()};U.prototype.paintForeground=function(d,n,y,q,v){d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,v/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",U);mxUtils.extend(V,mxRectangleShape);V.prototype.size=+40;V.prototype.isHtmlAllowed=function(){return!1};V.prototype.getLabelBounds=function(d){var n=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,n)};V.prototype.paintBackground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"participant");null==E||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,n,+y,q,D):(E=this.state.view.graph.cellRenderer.getShape(E),null!=E&&E!=V&&(E=new E,E.apply(this.state),d.save(),E.paintVertexShape(d,n,y,q,D),d.restore()));D<v&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(n+q/2,y+D),d.lineTo(n+q/2,y+v),d.end(),d.stroke())};V.prototype.paintForeground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,n,y,q,Math.min(v,+D))};mxCellRenderer.registerShape("umlLifeline",V);mxUtils.extend(ba,mxShape);ba.prototype.width=60;ba.prototype.height=30;ba.prototype.corner=10;ba.prototype.configurePointerEvents=function(d){var n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=n&&n!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};ba.prototype.getLabelMargins=function(d){return new mxRectangle(0,+0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};ba.prototype.paintBackground=function(d,n,y,q,v){var D=this.corner,E=Math.min(q,Math.max(D,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),ha=Math.min(v,Math.max(1.5*D,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),M=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);M!=mxConstants.NONE&&+(d.setFillColor(M),d.rect(n,y,q,v),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,n,y,q,v),d.setGradient(this.fill,this.gradient,n,y,q,v,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;d.begin();d.moveTo(n,y);d.lineTo(n+E,y);d.lineTo(n+E,y+Math.max(0,ha-1.5*D));d.lineTo(n+Math.max(0,E-D),y+ha);d.lineTo(n,y+ha);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(n+E,y);+d.lineTo(n+q,y);d.lineTo(n+q,y+v);d.lineTo(n,y+v);d.lineTo(n,y+ha);d.stroke()};mxCellRenderer.registerShape("umlFrame",ba);mxPerimeter.CenterPerimeter=function(d,n,y,q){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(d,n,y,q){q=V.prototype.size;null!=n&&(q=mxUtils.getValue(n.style,"size",q)*n.view.scale);n=parseFloat(n.style[mxConstants.STYLE_STROKEWIDTH]||1)*n.view.scale/2-1;y.x<d.getCenterX()&&(n=-1*(n+1));return new mxPoint(d.getCenterX()+n,Math.min(d.y+d.height,Math.max(d.y+q,y.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(d,n,y,q){q=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,n,y,q){q=parseFloat(n.style[mxConstants.STYLE_STROKEWIDTH]||1)*n.view.scale/2-1;null!=n.style.backboneSize&&(q+=parseFloat(n.style.backboneSize)*n.view.scale/2-1);if("south"==n.style[mxConstants.STYLE_DIRECTION]||"north"==n.style[mxConstants.STYLE_DIRECTION])return y.x<d.getCenterX()&&(q=-1*(q+1)),new mxPoint(d.getCenterX()+q,Math.min(d.y+d.height,Math.max(d.y,y.y)));y.y<d.getCenterY()&&(q=-1*(q+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,y.x)),d.getCenterY()+q)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,n,y,q){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,-new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(n.style,"size",ha.prototype.size))*n.view.scale))),n.style),n,y,q)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?K.prototype.fixedSize:K.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height;n=null!=n?mxUtils.getValue(n.style,-mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_NORTH||n==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa)]):(v=v?Math.max(0,Math.min(.5*L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L,fa),new mxPoint(E+L-v,fa+va),new mxPoint(E,fa+va),new mxPoint(E+v,fa)]);va=d.getCenterX();-d=d.getCenterY();d=new mxPoint(va,d);q&&(y.x<E||y.x>E+L?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(fa,d,y)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?J.prototype.fixedSize:J.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height;n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,-mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L-v,fa),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va),new mxPoint(E+v,fa)]):n==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa),new mxPoint(E+L-v,fa+va),new mxPoint(E+v,fa+va),new mxPoint(E,fa)]):n==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,-Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa+v),new mxPoint(E+L,fa),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa+v)]):(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va-v),new mxPoint(E,fa+va),new mxPoint(E,fa)]);va=d.getCenterX();d=d.getCenterY();d=new mxPoint(va,d);q&&(y.x<E||y.x>E+L?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(fa,d,y)};mxStyleRegistry.putValue("trapezoidPerimeter",-mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?la.prototype.fixedSize:la.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,-Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L-v,fa),new mxPoint(E+L,d),new mxPoint(E+L-v,fa+va),new mxPoint(E,fa+va),new mxPoint(E+v,d),new mxPoint(E,fa)]):n==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L,fa),new mxPoint(E+L-v,d),new mxPoint(E+L,fa+va),new mxPoint(E+v,fa+va),new mxPoint(E,d),new mxPoint(E+v,fa)]):n==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,-fa+v),new mxPoint(na,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va),new mxPoint(na,fa+va-v),new mxPoint(E,fa+va),new mxPoint(E,fa+v)]):(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(na,fa+v),new mxPoint(E+L,fa),new mxPoint(E+L,fa+va-v),new mxPoint(na,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa)]);na=new mxPoint(na,d);q&&(y.x<E||y.x>E+L?na.y=y.y:na.x=y.x);return mxUtils.getPerimeterPoint(fa,na,y)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);-mxPerimeter.HexagonPerimeter2=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?Y.prototype.fixedSize:Y.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_NORTH||n==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(va,D)):va*-Math.max(0,Math.min(1,D)),fa=[new mxPoint(na,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va-v),new mxPoint(na,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa+v),new mxPoint(na,fa)]):(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L-v,fa),new mxPoint(E+L,d),new mxPoint(E+L-v,fa+va),new mxPoint(E+v,fa+va),new mxPoint(E,d),new mxPoint(E+v,fa)]);na=new mxPoint(na,d);q&&(y.x<E||y.x>E+L?na.y=y.y:na.x=y.x);return mxUtils.getPerimeterPoint(fa,na,y)};mxStyleRegistry.putValue("hexagonPerimeter2",-mxPerimeter.HexagonPerimeter2);mxUtils.extend(ja,mxShape);ja.prototype.size=10;ja.prototype.paintBackground=function(d,n,y,q,v){var D=parseFloat(mxUtils.getValue(this.style,"size",this.size));d.translate(n,y);d.ellipse((q-D)/2,0,D,D);d.fillAndStroke();d.begin();d.moveTo(q/2,D);d.lineTo(q/2,v);d.end();d.stroke()};mxCellRenderer.registerShape("lollipop",ja);mxUtils.extend(pa,mxShape);pa.prototype.size=10;pa.prototype.inset=2;pa.prototype.paintBackground=function(d,n,y,q,v){var D=parseFloat(mxUtils.getValue(this.style,+new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(n.style,"size",ia.prototype.size))*n.view.scale))),n.style),n,y,q)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?K.prototype.fixedSize:K.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,ha=d.y,M=d.width,ua=d.height;n=null!=n?mxUtils.getValue(n.style,+mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_NORTH||n==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(ua,D)):ua*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha),new mxPoint(E+M,ha+v),new mxPoint(E+M,ha+ua),new mxPoint(E,ha+ua-v),new mxPoint(E,ha)]):(v=v?Math.max(0,Math.min(.5*M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E+v,ha),new mxPoint(E+M,ha),new mxPoint(E+M-v,ha+ua),new mxPoint(E,ha+ua),new mxPoint(E+v,ha)]);ua=d.getCenterX();+d=d.getCenterY();d=new mxPoint(ua,d);q&&(y.x<E||y.x>E+M?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(ha,d,y)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?J.prototype.fixedSize:J.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,ha=d.y,M=d.width,ua=d.height;n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,+mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E+v,ha),new mxPoint(E+M-v,ha),new mxPoint(E+M,ha+ua),new mxPoint(E,ha+ua),new mxPoint(E+v,ha)]):n==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha),new mxPoint(E+M,ha),new mxPoint(E+M-v,ha+ua),new mxPoint(E+v,ha+ua),new mxPoint(E,ha)]):n==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,+Math.min(ua,D)):ua*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha+v),new mxPoint(E+M,ha),new mxPoint(E+M,ha+ua),new mxPoint(E,ha+ua-v),new mxPoint(E,ha+v)]):(v=v?Math.max(0,Math.min(ua,D)):ua*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha),new mxPoint(E+M,ha+v),new mxPoint(E+M,ha+ua-v),new mxPoint(E,ha+ua),new mxPoint(E,ha)]);ua=d.getCenterX();d=d.getCenterY();d=new mxPoint(ua,d);q&&(y.x<E||y.x>E+M?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(ha,d,y)};mxStyleRegistry.putValue("trapezoidPerimeter",+mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?la.prototype.fixedSize:la.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,ha=d.y,M=d.width,ua=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(M,D)):M*Math.max(0,+Math.min(1,D)),ha=[new mxPoint(E,ha),new mxPoint(E+M-v,ha),new mxPoint(E+M,d),new mxPoint(E+M-v,ha+ua),new mxPoint(E,ha+ua),new mxPoint(E+v,d),new mxPoint(E,ha)]):n==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E+v,ha),new mxPoint(E+M,ha),new mxPoint(E+M-v,d),new mxPoint(E+M,ha+ua),new mxPoint(E+v,ha+ua),new mxPoint(E,d),new mxPoint(E+v,ha)]):n==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(ua,D)):ua*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,+ha+v),new mxPoint(na,ha),new mxPoint(E+M,ha+v),new mxPoint(E+M,ha+ua),new mxPoint(na,ha+ua-v),new mxPoint(E,ha+ua),new mxPoint(E,ha+v)]):(v=v?Math.max(0,Math.min(ua,D)):ua*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha),new mxPoint(na,ha+v),new mxPoint(E+M,ha),new mxPoint(E+M,ha+ua-v),new mxPoint(na,ha+ua),new mxPoint(E,ha+ua-v),new mxPoint(E,ha)]);na=new mxPoint(na,d);q&&(y.x<E||y.x>E+M?na.y=y.y:na.x=y.x);return mxUtils.getPerimeterPoint(ha,na,y)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);+mxPerimeter.HexagonPerimeter2=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?Y.prototype.fixedSize:Y.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,ha=d.y,M=d.width,ua=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_NORTH||n==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(ua,D)):ua*+Math.max(0,Math.min(1,D)),ha=[new mxPoint(na,ha),new mxPoint(E+M,ha+v),new mxPoint(E+M,ha+ua-v),new mxPoint(na,ha+ua),new mxPoint(E,ha+ua-v),new mxPoint(E,ha+v),new mxPoint(na,ha)]):(v=v?Math.max(0,Math.min(M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E+v,ha),new mxPoint(E+M-v,ha),new mxPoint(E+M,d),new mxPoint(E+M-v,ha+ua),new mxPoint(E+v,ha+ua),new mxPoint(E,d),new mxPoint(E+v,ha)]);na=new mxPoint(na,d);q&&(y.x<E||y.x>E+M?na.y=y.y:na.x=y.x);return mxUtils.getPerimeterPoint(ha,na,y)};mxStyleRegistry.putValue("hexagonPerimeter2",+mxPerimeter.HexagonPerimeter2);mxUtils.extend(fa,mxShape);fa.prototype.size=10;fa.prototype.paintBackground=function(d,n,y,q,v){var D=parseFloat(mxUtils.getValue(this.style,"size",this.size));d.translate(n,y);d.ellipse((q-D)/2,0,D,D);d.fillAndStroke();d.begin();d.moveTo(q/2,D);d.lineTo(q/2,v);d.end();d.stroke()};mxCellRenderer.registerShape("lollipop",fa);mxUtils.extend(pa,mxShape);pa.prototype.size=10;pa.prototype.inset=2;pa.prototype.paintBackground=function(d,n,y,q,v){var D=parseFloat(mxUtils.getValue(this.style,"size",this.size)),E=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(n,y);d.begin();d.moveTo(q/2,D+E);d.lineTo(q/2,v);d.end();d.stroke();d.begin();d.moveTo((q-D)/2-E,D/2);d.quadTo((q-D)/2-E,D+E,q/2,D+E);d.quadTo((q+D)/2+E,D+E,(q+D)/2+E,D/2);d.end();d.stroke()};mxCellRenderer.registerShape("requires",pa);mxUtils.extend(sa,mxShape);sa.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(0,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,0,v);d.end();d.stroke()};mxCellRenderer.registerShape("requiredInterface",sa);mxUtils.extend(qa,mxShape);qa.prototype.inset=2;qa.prototype.paintBackground=function(d,n,y,q,v){var D=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(n,y);d.ellipse(0,D,q-2*D,v-2*D);d.fillAndStroke();d.begin();d.moveTo(q/2,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,q/2,v);d.end();d.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",qa);mxUtils.extend(wa,mxCylinder);wa.prototype.jettyWidth=-20;wa.prototype.jettyHeight=10;wa.prototype.redrawPath=function(d,n,y,q,v,D){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));n=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));y=E/2;E=y+E/2;var fa=Math.min(n,v-n),L=Math.min(fa+2*n,v-n);D?(d.moveTo(y,fa),d.lineTo(E,fa),d.lineTo(E,fa+n),d.lineTo(y,fa+n),d.moveTo(y,L),d.lineTo(E,L),d.lineTo(E,L+n),d.lineTo(y,L+n)):(d.moveTo(y,0),d.lineTo(q,0),d.lineTo(q,v),d.lineTo(y,v),d.lineTo(y,L+n),d.lineTo(0,L+-n),d.lineTo(0,L),d.lineTo(y,L),d.lineTo(y,fa+n),d.lineTo(0,fa+n),d.lineTo(0,fa),d.lineTo(y,fa),d.close());d.end()};mxCellRenderer.registerShape("module",wa);mxUtils.extend(Ba,mxCylinder);Ba.prototype.jettyWidth=32;Ba.prototype.jettyHeight=12;Ba.prototype.redrawPath=function(d,n,y,q,v,D){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));n=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));y=E/2;E=y+E/2;var fa=.3*v-n/2,L=.7*v-n/2;D?(d.moveTo(y,fa),d.lineTo(E,-fa),d.lineTo(E,fa+n),d.lineTo(y,fa+n),d.moveTo(y,L),d.lineTo(E,L),d.lineTo(E,L+n),d.lineTo(y,L+n)):(d.moveTo(y,0),d.lineTo(q,0),d.lineTo(q,v),d.lineTo(y,v),d.lineTo(y,L+n),d.lineTo(0,L+n),d.lineTo(0,L),d.lineTo(y,L),d.lineTo(y,fa+n),d.lineTo(0,fa+n),d.lineTo(0,fa),d.lineTo(y,fa),d.close());d.end()};mxCellRenderer.registerShape("component",Ba);mxUtils.extend(za,mxRectangleShape);za.prototype.paintForeground=function(d,n,y,q,v){var D=q/2,E=v/2,fa=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,-mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,[new mxPoint(n+D,y),new mxPoint(n+q,y+E),new mxPoint(n+D,y+v),new mxPoint(n,y+E)],this.isRounded,fa,!0);d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",za);mxUtils.extend(Ea,mxDoubleEllipse);Ea.prototype.outerStroke=!0;Ea.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.min(4,Math.min(q/5,v/5));0<q&&0<v&&(d.ellipse(n+D,y+D,q-2*D,v-2*D),d.fillAndStroke());d.setShadow(!1);-this.outerStroke&&(d.ellipse(n,y,q,v),d.stroke())};mxCellRenderer.registerShape("endState",Ea);mxUtils.extend(ra,Ea);ra.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ra);mxUtils.extend(ya,mxArrowConnector);ya.prototype.defaultWidth=4;ya.prototype.isOpenEnded=function(){return!0};ya.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ya.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",+20;wa.prototype.jettyHeight=10;wa.prototype.redrawPath=function(d,n,y,q,v,D){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));n=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));y=E/2;E=y+E/2;var ha=Math.min(n,v-n),M=Math.min(ha+2*n,v-n);D?(d.moveTo(y,ha),d.lineTo(E,ha),d.lineTo(E,ha+n),d.lineTo(y,ha+n),d.moveTo(y,M),d.lineTo(E,M),d.lineTo(E,M+n),d.lineTo(y,M+n)):(d.moveTo(y,0),d.lineTo(q,0),d.lineTo(q,v),d.lineTo(y,v),d.lineTo(y,M+n),d.lineTo(0,M++n),d.lineTo(0,M),d.lineTo(y,M),d.lineTo(y,ha+n),d.lineTo(0,ha+n),d.lineTo(0,ha),d.lineTo(y,ha),d.close());d.end()};mxCellRenderer.registerShape("module",wa);mxUtils.extend(Aa,mxCylinder);Aa.prototype.jettyWidth=32;Aa.prototype.jettyHeight=12;Aa.prototype.redrawPath=function(d,n,y,q,v,D){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));n=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));y=E/2;E=y+E/2;var ha=.3*v-n/2,M=.7*v-n/2;D?(d.moveTo(y,ha),d.lineTo(E,+ha),d.lineTo(E,ha+n),d.lineTo(y,ha+n),d.moveTo(y,M),d.lineTo(E,M),d.lineTo(E,M+n),d.lineTo(y,M+n)):(d.moveTo(y,0),d.lineTo(q,0),d.lineTo(q,v),d.lineTo(y,v),d.lineTo(y,M+n),d.lineTo(0,M+n),d.lineTo(0,M),d.lineTo(y,M),d.lineTo(y,ha+n),d.lineTo(0,ha+n),d.lineTo(0,ha),d.lineTo(y,ha),d.close());d.end()};mxCellRenderer.registerShape("component",Aa);mxUtils.extend(za,mxRectangleShape);za.prototype.paintForeground=function(d,n,y,q,v){var D=q/2,E=v/2,ha=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,+mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,[new mxPoint(n+D,y),new mxPoint(n+q,y+E),new mxPoint(n+D,y+v),new mxPoint(n,y+E)],this.isRounded,ha,!0);d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",za);mxUtils.extend(Da,mxDoubleEllipse);Da.prototype.outerStroke=!0;Da.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.min(4,Math.min(q/5,v/5));0<q&&0<v&&(d.ellipse(n+D,y+D,q-2*D,v-2*D),d.fillAndStroke());d.setShadow(!1);+this.outerStroke&&(d.ellipse(n,y,q,v),d.stroke())};mxCellRenderer.registerShape("endState",Da);mxUtils.extend(ra,Da);ra.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ra);mxUtils.extend(ya,mxArrowConnector);ya.prototype.defaultWidth=4;ya.prototype.isOpenEnded=function(){return!0};ya.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ya.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",ya);mxUtils.extend(Ca,mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth--1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Ma,mxActor);Ma.prototype.size=30;Ma.prototype.isRoundable=function(){return!0};Ma.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(0,n),new mxPoint(q,0),new mxPoint(q,v)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("manualInput",-Ma);mxUtils.extend(Ha,mxRectangleShape);Ha.prototype.dx=20;Ha.prototype.dy=20;Ha.prototype.isHtmlAllowed=function(){return!1};Ha.prototype.paintForeground=function(d,n,y,q,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var D=0;if(this.isRounded){var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;D=Math.max(D,Math.min(q*E,v*E))}E=Math.max(D,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));D=Math.max(D,Math.min(v,-parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.begin();d.moveTo(n,y+D);d.lineTo(n+q,y+D);d.end();d.stroke();d.begin();d.moveTo(n+E,y);d.lineTo(n+E,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("internalStorage",Ha);mxUtils.extend(Aa,mxActor);Aa.prototype.dx=20;Aa.prototype.dy=20;Aa.prototype.redrawPath=function(d,n,y,q,v){n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));-parseFloat(mxUtils.getValue(this.style,"size",this.size));var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,y),new mxPoint(n,y),new mxPoint(n,v),new mxPoint(0,v)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("corner",Aa);mxUtils.extend(Ra,mxActor);Ra.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.lineTo(0,v);d.end();d.moveTo(q,0);d.lineTo(q,v);d.end();d.moveTo(0,v/2);d.lineTo(q,-v/2);d.end()};mxCellRenderer.registerShape("crossbar",Ra);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(d,n,y,q,v){n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,-0),new mxPoint(q,0),new mxPoint(q,y),new mxPoint((q+n)/2,y),new mxPoint((q+n)/2,v),new mxPoint((q-n)/2,v),new mxPoint((q-n)/2,y),new mxPoint(0,y)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("tee",Za);mxUtils.extend(La,mxActor);La.prototype.arrowWidth=.3;La.prototype.arrowSize=.2;La.prototype.redrawPath=function(d,n,y,q,v){var D=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,-"arrowSize",this.arrowSize))));y=(v-D)/2;D=y+D;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,y),new mxPoint(q-n,y),new mxPoint(q-n,0),new mxPoint(q,v/2),new mxPoint(q-n,v),new mxPoint(q-n,D),new mxPoint(0,D)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("singleArrow",La);mxUtils.extend($a,mxActor);$a.prototype.redrawPath=function(d,n,y,q,v){var D=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",-La.prototype.arrowWidth))));n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",La.prototype.arrowSize))));y=(v-D)/2;D=y+D;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v/2),new mxPoint(n,0),new mxPoint(n,y),new mxPoint(q-n,y),new mxPoint(q-n,0),new mxPoint(q,v/2),new mxPoint(q-n,v),new mxPoint(q-n,D),new mxPoint(n,D),new mxPoint(n,v)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",-$a);mxUtils.extend(Da,mxActor);Da.prototype.size=.1;Da.prototype.fixedSize=20;Da.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(n,0);d.lineTo(q,0);d.quadTo(q-2*n,v/2,q,v);d.lineTo(n,v);d.quadTo(n-2*n,v/2,n,0);d.close();d.end()};mxCellRenderer.registerShape("dataStorage",Da);-mxUtils.extend(x,mxActor);x.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,0,v);d.close();d.end()};mxCellRenderer.registerShape("or",x);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,0,v);d.quadTo(q/2,v/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",M);mxUtils.extend(Q,mxActor);Q.prototype.size=20;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(d,-n,y,q,v){n=Math.min(q/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,.8*n),new mxPoint(q,v),new mxPoint(0,v),new mxPoint(0,.8*n)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("loopLimit",Q);mxUtils.extend(V,mxActor);V.prototype.size=.375;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(d,-n,y,q,v){n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,v-n),new mxPoint(q/2,v),new mxPoint(0,v-n)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",V);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);-d.begin();d.moveTo(n+q/2,y+v);d.lineTo(n+q,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ia);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n,y+v/2);d.lineTo(n+q,y+v/2);d.end();d.stroke();d.begin();d.moveTo(n+q/2,y);d.lineTo(n+q/2,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",ka);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=-function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n+.145*q,y+.145*v);d.lineTo(n+.855*q,y+.855*v);d.end();d.stroke();d.begin();d.moveTo(n+.855*q,y+.145*v);d.lineTo(n+.145*q,y+.855*v);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",oa);mxUtils.extend(xa,mxRhombus);xa.prototype.paintVertexShape=function(d,n,y,q,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n,y+v/2);d.lineTo(n+-q,y+v/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(d,n,y,q,v){d.begin();d.moveTo(n,y);d.lineTo(n+q,y);d.lineTo(n+q/2,y+v/2);d.close();d.fillAndStroke();d.begin();d.moveTo(n,y+v);d.lineTo(n+q,y+v);d.lineTo(n+q/2,y+v/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(d,n,y,q,v){var D=d.state.strokeWidth/2,E=10+2*D,fa=y+-v-E/2;d.begin();d.moveTo(n,y);d.lineTo(n,y+v);d.moveTo(n+D,fa);d.lineTo(n+D+E,fa-E/2);d.moveTo(n+D,fa);d.lineTo(n+D+E,fa+E/2);d.moveTo(n+D,fa);d.lineTo(n+q-D,fa);d.moveTo(n+q,y);d.lineTo(n+q,y+v);d.moveTo(n+q-D,fa);d.lineTo(n+q-E-D,fa-E/2);d.moveTo(n+q-D,fa);d.lineTo(n+q-E-D,fa+E/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",ua);mxUtils.extend(Fa,mxEllipse);Fa.prototype.drawHidden=!0;Fa.prototype.paintVertexShape=function(d,n,y,q,v){this.outline||d.setStrokeColor(null);if(null!=-this.style){var D=d.pointerEvents,E=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||E||(d.pointerEvents=!1);var fa="1"==mxUtils.getValue(this.style,"top","1"),L="1"==mxUtils.getValue(this.style,"left","1"),va="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||E||this.outline||fa||va||na||L?(d.rect(n,y,q,v),d.fill(),d.pointerEvents=D,d.setStrokeColor(this.stroke),d.setLineCap("square"),-d.begin(),d.moveTo(n,y),this.outline||fa?d.lineTo(n+q,y):d.moveTo(n+q,y),this.outline||va?d.lineTo(n+q,y+v):d.moveTo(n+q,y+v),this.outline||na?d.lineTo(n,y+v):d.moveTo(n,y+v),(this.outline||L)&&d.lineTo(n,y),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(Na,mxEllipse);Na.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();"vertical"==-mxUtils.getValue(this.style,"line")?(d.moveTo(n+q/2,y),d.lineTo(n+q/2,y+v)):(d.moveTo(n,y+v/2),d.lineTo(n+q,y+v/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Na);mxUtils.extend(Wa,mxActor);Wa.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(q,v/2);d.moveTo(0,0);d.lineTo(q-n,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,q-n,v);d.lineTo(0,v);d.close();d.end()};mxCellRenderer.registerShape("delay",Wa);mxUtils.extend(Xa,mxActor);Xa.prototype.size=.2;Xa.prototype.redrawPath=function(d,n,+1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Ka,mxActor);Ka.prototype.size=30;Ka.prototype.isRoundable=function(){return!0};Ka.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(0,n),new mxPoint(q,0),new mxPoint(q,v)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("manualInput",+Ka);mxUtils.extend(Ha,mxRectangleShape);Ha.prototype.dx=20;Ha.prototype.dy=20;Ha.prototype.isHtmlAllowed=function(){return!1};Ha.prototype.paintForeground=function(d,n,y,q,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var D=0;if(this.isRounded){var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;D=Math.max(D,Math.min(q*E,v*E))}E=Math.max(D,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));D=Math.max(D,Math.min(v,+parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.begin();d.moveTo(n,y+D);d.lineTo(n+q,y+D);d.end();d.stroke();d.begin();d.moveTo(n+E,y);d.lineTo(n+E,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("internalStorage",Ha);mxUtils.extend(Ba,mxActor);Ba.prototype.dx=20;Ba.prototype.dy=20;Ba.prototype.redrawPath=function(d,n,y,q,v){n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));+parseFloat(mxUtils.getValue(this.style,"size",this.size));var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,y),new mxPoint(n,y),new mxPoint(n,v),new mxPoint(0,v)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("corner",Ba);mxUtils.extend(Pa,mxActor);Pa.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.lineTo(0,v);d.end();d.moveTo(q,0);d.lineTo(q,v);d.end();d.moveTo(0,v/2);d.lineTo(q,+v/2);d.end()};mxCellRenderer.registerShape("crossbar",Pa);mxUtils.extend($a,mxActor);$a.prototype.dx=20;$a.prototype.dy=20;$a.prototype.redrawPath=function(d,n,y,q,v){n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,+0),new mxPoint(q,0),new mxPoint(q,y),new mxPoint((q+n)/2,y),new mxPoint((q+n)/2,v),new mxPoint((q-n)/2,v),new mxPoint((q-n)/2,y),new mxPoint(0,y)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("tee",$a);mxUtils.extend(Na,mxActor);Na.prototype.arrowWidth=.3;Na.prototype.arrowSize=.2;Na.prototype.redrawPath=function(d,n,y,q,v){var D=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,+"arrowSize",this.arrowSize))));y=(v-D)/2;D=y+D;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,y),new mxPoint(q-n,y),new mxPoint(q-n,0),new mxPoint(q,v/2),new mxPoint(q-n,v),new mxPoint(q-n,D),new mxPoint(0,D)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("singleArrow",Na);mxUtils.extend(Ya,mxActor);Ya.prototype.redrawPath=function(d,n,y,q,v){var D=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",+Na.prototype.arrowWidth))));n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));y=(v-D)/2;D=y+D;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v/2),new mxPoint(n,0),new mxPoint(n,y),new mxPoint(q-n,y),new mxPoint(q-n,0),new mxPoint(q,v/2),new mxPoint(q-n,v),new mxPoint(q-n,D),new mxPoint(n,D),new mxPoint(n,v)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",+Ya);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.1;Ea.prototype.fixedSize=20;Ea.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(n,0);d.lineTo(q,0);d.quadTo(q-2*n,v/2,q,v);d.lineTo(n,v);d.quadTo(n-2*n,v/2,n,0);d.close();d.end()};mxCellRenderer.registerShape("dataStorage",Ea);+mxUtils.extend(x,mxActor);x.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,0,v);d.close();d.end()};mxCellRenderer.registerShape("or",x);mxUtils.extend(L,mxActor);L.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,0,v);d.quadTo(q/2,v/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",L);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(d,+n,y,q,v){n=Math.min(q/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,.8*n),new mxPoint(q,v),new mxPoint(0,v),new mxPoint(0,.8*n)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("loopLimit",R);mxUtils.extend(W,mxActor);W.prototype.size=.375;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(d,+n,y,q,v){n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,v-n),new mxPoint(q/2,v),new mxPoint(0,v-n)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",W);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);+d.begin();d.moveTo(n+q/2,y+v);d.lineTo(n+q,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ja);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n,y+v/2);d.lineTo(n+q,y+v/2);d.end();d.stroke();d.begin();d.moveTo(n+q/2,y);d.lineTo(n+q/2,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",ka);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=+function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n+.145*q,y+.145*v);d.lineTo(n+.855*q,y+.855*v);d.end();d.stroke();d.begin();d.moveTo(n+.855*q,y+.145*v);d.lineTo(n+.145*q,y+.855*v);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",oa);mxUtils.extend(va,mxRhombus);va.prototype.paintVertexShape=function(d,n,y,q,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n,y+v/2);d.lineTo(n++q,y+v/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",va);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(d,n,y,q,v){d.begin();d.moveTo(n,y);d.lineTo(n+q,y);d.lineTo(n+q/2,y+v/2);d.close();d.fillAndStroke();d.begin();d.moveTo(n,y+v);d.lineTo(n+q,y+v);d.lineTo(n+q/2,y+v/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(d,n,y,q,v){var D=d.state.strokeWidth/2,E=10+2*D,ha=y++v-E/2;d.begin();d.moveTo(n,y);d.lineTo(n,y+v);d.moveTo(n+D,ha);d.lineTo(n+D+E,ha-E/2);d.moveTo(n+D,ha);d.lineTo(n+D+E,ha+E/2);d.moveTo(n+D,ha);d.lineTo(n+q-D,ha);d.moveTo(n+q,y);d.lineTo(n+q,y+v);d.moveTo(n+q-D,ha);d.lineTo(n+q-E-D,ha-E/2);d.moveTo(n+q-D,ha);d.lineTo(n+q-E-D,ha+E/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",xa);mxUtils.extend(Fa,mxEllipse);Fa.prototype.drawHidden=!0;Fa.prototype.paintVertexShape=function(d,n,y,q,v){this.outline||d.setStrokeColor(null);if(null!=+this.style){var D=d.pointerEvents,E=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||E||(d.pointerEvents=!1);var ha="1"==mxUtils.getValue(this.style,"top","1"),M="1"==mxUtils.getValue(this.style,"left","1"),ua="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||E||this.outline||ha||ua||na||M?(d.rect(n,y,q,v),d.fill(),d.pointerEvents=D,d.setStrokeColor(this.stroke),d.setLineCap("square"),+d.begin(),d.moveTo(n,y),this.outline||ha?d.lineTo(n+q,y):d.moveTo(n+q,y),this.outline||ua?d.lineTo(n+q,y+v):d.moveTo(n+q,y+v),this.outline||na?d.lineTo(n,y+v):d.moveTo(n,y+v),(this.outline||M)&&d.lineTo(n,y),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();"vertical"==+mxUtils.getValue(this.style,"line")?(d.moveTo(n+q/2,y),d.lineTo(n+q/2,y+v)):(d.moveTo(n,y+v/2),d.lineTo(n+q,y+v/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Ma);mxUtils.extend(Wa,mxActor);Wa.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(q,v/2);d.moveTo(0,0);d.lineTo(q-n,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,q-n,v);d.lineTo(0,v);d.close();d.end()};mxCellRenderer.registerShape("delay",Wa);mxUtils.extend(Xa,mxActor);Xa.prototype.size=.2;Xa.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(v,q);var D=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(v-D)/2;y=n+D;var E=(q-D)/2;D=E+D;d.moveTo(0,n);d.lineTo(E,n);d.lineTo(E,0);d.lineTo(D,0);d.lineTo(D,n);d.lineTo(q,n);d.lineTo(q,y);d.lineTo(D,y);d.lineTo(D,v);d.lineTo(E,v);d.lineTo(E,y);d.lineTo(0,y);d.close();d.end()};mxCellRenderer.registerShape("cross",Xa);mxUtils.extend(ab,mxActor);ab.prototype.size=.25;ab.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(q,v/2);y=Math.min(q-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*q);d.moveTo(0,v/2);d.lineTo(y,0);d.lineTo(q-n,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,q-n,v);d.lineTo(y,v);d.close();d.end()};mxCellRenderer.registerShape("display",ab);mxUtils.extend(Oa,mxActor);Oa.prototype.cst={RECT2:"mxgraph.basic.rect"};Oa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},-{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Oa.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);this.strictDrawShape(d,0,0,q,v)};Oa.prototype.strictDrawShape=function(d,n,y,q,v,D){var E=D&&D.rectStyle?D.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),fa=D&&D.absoluteCornerSize?D.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",-this.absoluteCornerSize),L=D&&D.size?D.size:Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),va=D&&D.rectOutline?D.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=D&&D.indent?D.indent:Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Va=D&&D.dashed?D.dashed:mxUtils.getValue(this.style,"dashed",!1),fb=D&&D.dashPattern?D.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=D&&D.relIndent?D.relIndent:-Math.max(0,Math.min(50,na)),Ga=D&&D.top?D.top:mxUtils.getValue(this.style,"top",!0),Ka=D&&D.right?D.right:mxUtils.getValue(this.style,"right",!0),Ja=D&&D.bottom?D.bottom:mxUtils.getValue(this.style,"bottom",!0),Ia=D&&D.left?D.left:mxUtils.getValue(this.style,"left",!0),Pa=D&&D.topLeftStyle?D.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Sa=D&&D.topRightStyle?D.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ta=D&&D.bottomRightStyle?D.bottomRightStyle:mxUtils.getValue(this.style,+{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Oa.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);this.strictDrawShape(d,0,0,q,v)};Oa.prototype.strictDrawShape=function(d,n,y,q,v,D){var E=D&&D.rectStyle?D.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ha=D&&D.absoluteCornerSize?D.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",+this.absoluteCornerSize),M=D&&D.size?D.size:Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),ua=D&&D.rectOutline?D.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=D&&D.indent?D.indent:Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Va=D&&D.dashed?D.dashed:mxUtils.getValue(this.style,"dashed",!1),fb=D&&D.dashPattern?D.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=D&&D.relIndent?D.relIndent:+Math.max(0,Math.min(50,na)),Ga=D&&D.top?D.top:mxUtils.getValue(this.style,"top",!0),La=D&&D.right?D.right:mxUtils.getValue(this.style,"right",!0),Ja=D&&D.bottom?D.bottom:mxUtils.getValue(this.style,"bottom",!0),Ia=D&&D.left?D.left:mxUtils.getValue(this.style,"left",!0),Qa=D&&D.topLeftStyle?D.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Sa=D&&D.topRightStyle?D.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ta=D&&D.bottomRightStyle?D.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Ua=D&&D.bottomLeftStyle?D.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=D&&D.fillColor?D.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");D&&D.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Gb=D&&D.strokeWidth?D.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Db=D&&D.fillColor2?D.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Eb=D&&D.gradientColor2?D.gradientColor2:mxUtils.getValue(this.style,-"gradientColor2","none"),Hb=D&&D.gradientDirection2?D.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Ib=D&&D.opacity?D.opacity:mxUtils.getValue(this.style,"opacity","100"),Jb=Math.max(0,Math.min(50,L));D=Oa.prototype;d.setDashed(Va);fb&&""!=fb&&d.setDashPattern(fb);d.setStrokeWidth(Gb);L=Math.min(.5*v,.5*q,L);fa||(L=Jb*Math.min(q,v)/100);L=Math.min(L,.5*Math.min(q,v));fa||(na=Math.min(bb*Math.min(q,v)/100));na=Math.min(na,.5*Math.min(q,v)-L);(Ga||Ka||Ja||Ia)&&"frame"!=-va&&(d.begin(),Ga?D.moveNW(d,n,y,q,v,E,Pa,L,Ia):d.moveTo(0,0),Ga&&D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),Ka&&D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),Ja&&D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),Ia&&D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Db),Va=fa=Ib,"none"==Db&&(fa=0),"none"==Eb&&(Va=0),d.setGradient(Db,Eb,0,0,q,v,Hb,fa,Va),d.begin(),Ga?D.moveNWInner(d,-n,y,q,v,E,Pa,L,na,Ga,Ia):d.moveTo(na,0),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),Ia&&Ja&&D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),Ja&&Ka&&D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),Ka&&Ga&&D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),Ga&&Ia&&D.paintNWInner(d,n,y,q,v,E,Pa,L,na),d.fill(),"none"==Fb&&(d.begin(),D.paintFolds(d,n,y,q,v,E,Pa,Sa,Ta,Ua,L,Ga,Ka,Ja,Ia),d.stroke()));Ga||Ka||-Ja||!Ia?Ga||Ka||!Ja||Ia?!Ga&&!Ka&&Ja&&Ia?"frame"!=va?(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),"double"==va&&(D.moveNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,-n,y,q,v,E,Pa,L,Ga),D.lineNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),d.close(),d.fillAndStroke()):Ga||!Ka||Ja||Ia?!Ga&&Ka&&!Ja&&Ia?"frame"!=va?(d.begin(),D.moveSW(d,n,y,q,v,E,Pa,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),"double"==va&&(D.moveNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia)),d.stroke(),d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,-n,y,q,v,E,Ta,L,Ja),"double"==va&&(D.moveSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,Pa,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.lineNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close(),d.fillAndStroke(),d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.lineSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),d.close(),d.fillAndStroke()):-!Ga&&Ka&&Ja&&!Ia?"frame"!=va?(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),"double"==va&&(D.moveSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),-D.lineSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),d.close(),d.fillAndStroke()):!Ga&&Ka&&Ja&&Ia?"frame"!=va?(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),"double"==va&&(D.moveNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,-n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.lineNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,-n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),d.close(),d.fillAndStroke()):!Ga||Ka||Ja||Ia?Ga&&!Ka&&!Ja&&Ia?"frame"!=va?(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),"double"==va&&(D.moveNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,-n,y,q,v,E,Ua,L,na,Ja,Ia)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.lineNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close(),d.fillAndStroke()):Ga&&!Ka&&Ja&&!Ia?"frame"!=va?(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),"double"==va&&(D.moveNEInner(d,n,y,-q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga)),d.stroke(),d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),"double"==va&&(D.moveSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.lineNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),d.close(),d.fillAndStroke(),d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,-q,v,E,Ua,L,Ia),D.lineSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),d.close(),d.fillAndStroke()):Ga&&!Ka&&Ja&&Ia?"frame"!=va?(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),"double"==va&&(D.moveNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,-n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.lineNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,-n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),d.close(),d.fillAndStroke()):Ga&&Ka&&!Ja&&!Ia?"frame"!=va?(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),"double"==va&&(D.moveSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,-n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.lineSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),d.close(),d.fillAndStroke()):Ga&&Ka&&!Ja&&Ia?"frame"!=va?(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,-Ja),"double"==va&&(D.moveSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.lineSEInner(d,n,y,q,v,E,-Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close(),d.fillAndStroke()):Ga&&Ka&&Ja&&!Ia?"frame"!=va?(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),"double"==va&&(D.moveSWInner(d,-n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.lineSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,-n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),d.close(),d.fillAndStroke()):Ga&&Ka&&Ja&&Ia&&("frame"!=va?(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,-L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),d.close(),"double"==va&&(D.moveSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close()),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintNW(d,-n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),d.close(),D.moveSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,-n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close(),d.fillAndStroke())):"frame"!=va?(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),"double"==va&&(D.moveNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.lineNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),d.close(),d.fillAndStroke()):-"frame"!=va?(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),"double"==va&&(D.moveSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.lineSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),d.close(),d.fillAndStroke()):"frame"!=va?(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),"double"==va&&(D.moveSWInner(d,-n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.lineSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),d.close(),d.fillAndStroke()):"frame"!=va?(d.begin(),D.moveSW(d,n,y,q,v,E,Pa,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),"double"==va&&(D.moveNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,-Pa,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.lineNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close(),d.fillAndStroke());d.begin();D.paintFolds(d,n,y,q,v,E,Pa,Sa,Ta,Ua,L,Ga,Ka,Ja,Ia);d.stroke()};Oa.prototype.moveNW=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.moveTo(0,0):d.moveTo(0,fa)};Oa.prototype.moveNE=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.moveTo(q,0):d.moveTo(q-fa,0)};Oa.prototype.moveSE=function(d,-n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.moveTo(q,v):d.moveTo(q,v-fa)};Oa.prototype.moveSW=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.moveTo(0,v):d.moveTo(fa,v)};Oa.prototype.paintNW=function(d,n,y,q,v,D,E,fa,L){if(L)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(fa,fa,0,0,n,fa,0)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==E&&-"fold"==D)&&d.lineTo(fa,0);else d.lineTo(0,0)};Oa.prototype.paintTop=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.lineTo(q,0):d.lineTo(q-fa,0)};Oa.prototype.paintNE=function(d,n,y,q,v,D,E,fa,L){if(L)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(fa,fa,0,0,n,q,fa)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q,fa);else d.lineTo(q,-0)};Oa.prototype.paintRight=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.lineTo(q,v):d.lineTo(q,v-fa)};Oa.prototype.paintLeft=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.lineTo(0,0):d.lineTo(0,fa)};Oa.prototype.paintSE=function(d,n,y,q,v,D,E,fa,L){if(L)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(fa,fa,0,0,n,q-fa,v)}else("snip"==E||"default"==-E&&"snip"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-fa,v);else d.lineTo(q,v)};Oa.prototype.paintBottom=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.lineTo(0,v):d.lineTo(fa,v)};Oa.prototype.paintSW=function(d,n,y,q,v,D,E,fa,L){if(L)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(fa,fa,0,0,n,0,v-fa)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==-E&&"fold"==D)&&d.lineTo(0,v-fa);else d.lineTo(0,v)};Oa.prototype.paintNWInner=function(d,n,y,q,v,D,E,fa,L){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(fa-.5*L,fa-.5*L,0,0,0,L,.5*L+fa);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(fa+L,fa+L,0,0,1,L,L+fa);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(L,.5*L+fa);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(L+fa,L+fa),d.lineTo(L,L+fa)};Oa.prototype.paintTopInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.lineTo(0,-L):va&&!na?d.lineTo(L,0):va?"square"==E||"default"==E&&"square"==D?d.lineTo(L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(fa+.5*L,L):d.lineTo(fa+L,L):d.lineTo(0,L):d.lineTo(0,0)};Oa.prototype.paintNEInner=function(d,n,y,q,v,D,E,fa,L){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(fa-.5*L,fa-.5*L,0,0,0,q-fa-.5*L,L);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(fa+L,fa+L,0,0,1,q-fa-L,L);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(q--fa-.5*L,L);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(q-fa-L,fa+L),d.lineTo(q-fa-L,L)};Oa.prototype.paintRightInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.lineTo(q-L,0):va&&!na?d.lineTo(q,L):va?"square"==E||"default"==E&&"square"==D?d.lineTo(q-L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-L,fa+.5*L):d.lineTo(q-L,fa+L):d.lineTo(q-L,0):d.lineTo(q,0)};Oa.prototype.paintLeftInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.lineTo(L,-v):va&&!na?d.lineTo(0,v-L):va?"square"==E||"default"==E&&"square"==D?d.lineTo(L,v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(L,v-fa-.5*L):d.lineTo(L,v-fa-L):d.lineTo(L,v):d.lineTo(0,v)};Oa.prototype.paintSEInner=function(d,n,y,q,v,D,E,fa,L){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(fa-.5*L,fa-.5*L,0,0,0,q-L,v-fa-.5*L);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(fa+L,fa+L,0,0,1,q-L,v-fa-L);else if("snip"==E||"default"==E&&"snip"==-D)d.lineTo(q-L,v-fa-.5*L);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(q-fa-L,v-fa-L),d.lineTo(q-L,v-fa-L)};Oa.prototype.paintBottomInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.lineTo(q,v-L):va&&!na?d.lineTo(q-L,v):"square"==E||"default"==E&&"square"==D||!va?d.lineTo(q-L,v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-fa-.5*L,v-L):d.lineTo(q-fa-L,v-L):d.lineTo(q,v)};Oa.prototype.paintSWInner=function(d,n,y,q,v,D,E,fa,L,va){if(!va)d.lineTo(L,-v);else if("square"==E||"default"==E&&"square"==D)d.lineTo(L,v-L);else if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(fa-.5*L,fa-.5*L,0,0,0,fa+.5*L,v-L);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(fa+L,fa+L,0,0,1,fa+L,v-L);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(fa+.5*L,v-L);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(L+fa,v-fa-L),d.lineTo(L+fa,v-L)};Oa.prototype.moveSWInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D?d.moveTo(L,-v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(L,v-fa-.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(L,v-fa-L):d.moveTo(0,v-L)};Oa.prototype.lineSWInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D?d.lineTo(L,v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(L,v-fa-.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==-E&&"fold"==D)&&d.lineTo(L,v-fa-L):d.lineTo(0,v-L)};Oa.prototype.moveSEInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D?d.moveTo(q-L,v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(q-L,v-fa-.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(q-L,v-fa-L):d.moveTo(q-L,v)};Oa.prototype.lineSEInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D?d.lineTo(q-L,-v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-L,v-fa-.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-L,v-fa-L):d.lineTo(q-L,v)};Oa.prototype.moveNEInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D||va?d.moveTo(q-L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(q-L,fa+.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==-E&&"fold"==D)&&d.moveTo(q-L,fa+L):d.moveTo(q,L)};Oa.prototype.lineNEInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D||va?d.lineTo(q-L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-L,fa+.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-L,fa+L):d.lineTo(q,L)};Oa.prototype.moveNWInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.moveTo(L,0):va&&!na?d.moveTo(0,L):"square"==-E||"default"==E&&"square"==D?d.moveTo(L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(L,fa+.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(L,fa+L):d.moveTo(0,0)};Oa.prototype.lineNWInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.lineTo(L,0):va&&!na?d.lineTo(0,L):"square"==E||"default"==E&&"square"==D?d.lineTo(L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(L,-fa+.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(L,fa+L):d.lineTo(0,0)};Oa.prototype.paintFolds=function(d,n,y,q,v,D,E,fa,L,va,na,Va,fb,bb,Ga){if("fold"==D||"fold"==E||"fold"==fa||"fold"==L||"fold"==va)("fold"==E||"default"==E&&"fold"==D)&&Va&&Ga&&(d.moveTo(0,na),d.lineTo(na,na),d.lineTo(na,0)),("fold"==fa||"default"==fa&&"fold"==D)&&Va&&fb&&(d.moveTo(q-na,0),d.lineTo(q-na,na),d.lineTo(q,na)),("fold"==L||"default"==L&&"fold"==D)&&bb&&fb&&(d.moveTo(q--na,v),d.lineTo(q-na,v-na),d.lineTo(q,v-na)),("fold"==va||"default"==va&&"fold"==D)&&bb&&Ga&&(d.moveTo(0,v-na),d.lineTo(na,v-na),d.lineTo(na,v))};mxCellRenderer.registerShape(Oa.prototype.cst.RECT2,Oa);Oa.prototype.constraints=null;mxUtils.extend(Qa,mxConnector);Qa.prototype.origPaintEdgeShape=Qa.prototype.paintEdgeShape;Qa.prototype.paintEdgeShape=function(d,n,y){for(var q=[],v=0;v<n.length;v++)q.push(mxUtils.clone(n[v]));v=d.state.dashed;var D=d.state.fixDash;Qa.prototype.origPaintEdgeShape.apply(this,-[d,q,y]);3<=d.state.strokeWidth&&(q=mxUtils.getValue(this.style,"fillColor",null),null!=q&&(d.setStrokeColor(q),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(v,D),Qa.prototype.origPaintEdgeShape.apply(this,[d,n,y])))};mxCellRenderer.registerShape("filledEdge",Qa);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var n=this.editorUi.getSelectionState(),y=d.apply(this,arguments);"umlFrame"==-n.style.shape&&y.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return y}}();mxMarker.addMarker("dash",function(d,n,y,q,v,D,E,fa,L,va){var na=v*(E+L+1),Va=D*(E+L+1);return function(){d.begin();d.moveTo(q.x-na/2-Va/2,q.y-Va/2+na/2);d.lineTo(q.x+Va/2-3*na/2,q.y-3*Va/2-na/2);d.stroke()}});mxMarker.addMarker("box",function(d,n,y,q,v,D,E,fa,L,va){var na=v*(E+L+1),Va=D*(E+L+1),fb=q.x+na/2,bb=q.y+Va/2;q.x-=na;q.y-=Va;return function(){d.begin();d.moveTo(fb-na/2--Va/2,bb-Va/2+na/2);d.lineTo(fb-na/2+Va/2,bb-Va/2-na/2);d.lineTo(fb+Va/2-3*na/2,bb-3*Va/2-na/2);d.lineTo(fb-Va/2-3*na/2,bb-3*Va/2+na/2);d.close();va?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",function(d,n,y,q,v,D,E,fa,L,va){var na=v*(E+L+1),Va=D*(E+L+1);return function(){d.begin();d.moveTo(q.x-na/2-Va/2,q.y-Va/2+na/2);d.lineTo(q.x+Va/2-3*na/2,q.y-3*Va/2-na/2);d.moveTo(q.x-na/2+Va/2,q.y-Va/2-na/2);d.lineTo(q.x-Va/2-3*na/2,q.y-3*Va/2+na/2);d.stroke()}});mxMarker.addMarker("circle",kb);-mxMarker.addMarker("circlePlus",function(d,n,y,q,v,D,E,fa,L,va){var na=q.clone(),Va=kb.apply(this,arguments),fb=v*(E+2*L),bb=D*(E+2*L);return function(){Va.apply(this,arguments);d.begin();d.moveTo(na.x-v*L,na.y-D*L);d.lineTo(na.x-2*fb+v*L,na.y-2*bb+D*L);d.moveTo(na.x-fb-bb+D*L,na.y-bb+fb-v*L);d.lineTo(na.x+bb-fb-D*L,na.y-bb-fb+v*L);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,n,y,q,v,D,E,fa,L,va){var na=v*(E+L+1),Va=D*(E+L+1),fb=q.clone();q.x-=na;q.y-=Va;return function(){d.begin();d.moveTo(fb.x--Va,fb.y+na);d.quadTo(q.x-Va,q.y+na,q.x,q.y);d.quadTo(q.x+Va,q.y-na,fb.x+Va,fb.y-na);d.stroke()}});mxMarker.addMarker("async",function(d,n,y,q,v,D,E,fa,L,va){n=v*L*1.118;y=D*L*1.118;v*=E+L;D*=E+L;var na=q.clone();na.x-=n;na.y-=y;q.x+=-v-n;q.y+=-D-y;return function(){d.begin();d.moveTo(na.x,na.y);fa?d.lineTo(na.x-v-D/2,na.y-D+v/2):d.lineTo(na.x+D/2-v,na.y-D-v/2);d.lineTo(na.x-v,na.y-D);d.close();va?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:2;return function(n,-y,q,v,D,E,fa,L,va,na){D*=fa+va;E*=fa+va;var Va=v.clone();return function(){n.begin();n.moveTo(Va.x,Va.y);L?n.lineTo(Va.x-D-E/d,Va.y-E+D/d):n.lineTo(Va.x+E/d-D,Va.y-E-D/d);n.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var qb=function(d,n,y){return nb(d,["width"],n,function(q,v,D,E,fa){fa=d.shape.getEdgeWidth()*d.view.scale+y;return new mxPoint(E.x+v*q/4+D*fa/2,E.y+D*q/4-v*fa/2)},function(q,v,D,E,fa,L){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));d.style.width=Math.round(2*-q)/d.view.scale-y})},nb=function(d,n,y,q,v){return jb(d,n,function(D){var E=d.absolutePoints;if(null!=E&&0<E.length){var fa=E.length-1;D=d.view.translate;var L=d.view.scale,va=y?E[0]:E[fa];E=y?E[1]:E[fa-1];fa=E.x-va.x;var na=E.y-va.y,Va=Math.sqrt(fa*fa+na*na);va=q.call(this,Va,fa/Va,na/Va,va,E);return new mxPoint(va.x/L-D.x,va.y/L-D.y)}return null},function(D,E,fa){var L=d.absolutePoints,va=L.length-1;D=d.view.translate;var na=d.view.scale,Va=y?L[0]:L[va];L=y?L[1]:L[va-1];va=L.x-Va.x;var fb=L.y-Va.y,-bb=Math.sqrt(va*va+fb*fb);E.x=(E.x+D.x)*na;E.y=(E.y+D.y)*na;v.call(this,bb,va/bb,fb/bb,Va,L,E,fa)})},lb=function(d,n){return function(y){return[nb(y,["startWidth"],!0,function(q,v,D,E,fa){fa=mxUtils.getNumber(y.style,"startWidth",d)*y.view.scale+n;return new mxPoint(E.x+v*q/4+D*fa/2,E.y+D*q/4-v*fa/2)},function(q,v,D,E,fa,L){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));y.style.startWidth=Math.round(2*q)/y.view.scale-n})]}},eb=function(d){return function(n){return[jb(n,["arrowWidth",-"arrowSize"],function(y){var q=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",La.prototype.arrowWidth))),v=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",La.prototype.arrowSize)));return new mxPoint(y.x+(1-v)*y.width,y.y+(1-q)*y.height/2)},function(y,q){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(y.y+y.height/2-q.y)/y.height*2));this.state.style.arrowSize=Math.max(0,Math.min(d,(y.x+y.width-q.x)/y.width))})]}},tb=function(d){return function(n){return[jb(n,+"gradientColor2","none"),Hb=D&&D.gradientDirection2?D.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Ib=D&&D.opacity?D.opacity:mxUtils.getValue(this.style,"opacity","100"),Jb=Math.max(0,Math.min(50,M));D=Oa.prototype;d.setDashed(Va);fb&&""!=fb&&d.setDashPattern(fb);d.setStrokeWidth(Gb);M=Math.min(.5*v,.5*q,M);ha||(M=Jb*Math.min(q,v)/100);M=Math.min(M,.5*Math.min(q,v));ha||(na=Math.min(bb*Math.min(q,v)/100));na=Math.min(na,.5*Math.min(q,v)-M);(Ga||La||Ja||Ia)&&"frame"!=+ua&&(d.begin(),Ga?D.moveNW(d,n,y,q,v,E,Qa,M,Ia):d.moveTo(0,0),Ga&&D.paintNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),La&&D.paintNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),Ja&&D.paintSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),Ia&&D.paintSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Db),Va=ha=Ib,"none"==Db&&(ha=0),"none"==Eb&&(Va=0),d.setGradient(Db,Eb,0,0,q,v,Hb,ha,Va),d.begin(),Ga?D.moveNWInner(d,+n,y,q,v,E,Qa,M,na,Ga,Ia):d.moveTo(na,0),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),Ia&&Ja&&D.paintSWInner(d,n,y,q,v,E,Ua,M,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),Ja&&La&&D.paintSEInner(d,n,y,q,v,E,Ta,M,na),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),La&&Ga&&D.paintNEInner(d,n,y,q,v,E,Sa,M,na),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),Ga&&Ia&&D.paintNWInner(d,n,y,q,v,E,Qa,M,na),d.fill(),"none"==Fb&&(d.begin(),D.paintFolds(d,n,y,q,v,E,Qa,Sa,Ta,Ua,M,Ga,La,Ja,Ia),d.stroke()));Ga||La||+Ja||!Ia?Ga||La||!Ja||Ia?!Ga&&!La&&Ja&&Ia?"frame"!=ua?(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),D.paintSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),"double"==ua&&(D.moveNWInner(d,n,y,q,v,E,Qa,M,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,M,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),D.paintSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,+n,y,q,v,E,Qa,M,Ga),D.lineNWInner(d,n,y,q,v,E,Qa,M,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,M,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),d.close(),d.fillAndStroke()):Ga||!La||Ja||Ia?!Ga&&La&&!Ja&&Ia?"frame"!=ua?(d.begin(),D.moveSW(d,n,y,q,v,E,Qa,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),"double"==ua&&(D.moveNWInner(d,n,y,q,v,E,Qa,M,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia)),d.stroke(),d.begin(),D.moveNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,+n,y,q,v,E,Ta,M,Ja),"double"==ua&&(D.moveSEInner(d,n,y,q,v,E,Ta,M,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,Qa,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),D.lineNWInner(d,n,y,q,v,E,Qa,M,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),d.close(),d.fillAndStroke(),d.begin(),D.moveNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.lineSEInner(d,n,y,q,v,E,Ta,M,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),d.close(),d.fillAndStroke()):+!Ga&&La&&Ja&&!Ia?"frame"!=ua?(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.paintSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),"double"==ua&&(D.moveSWInner(d,n,y,q,v,E,Ua,M,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,M,na),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.paintSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),+D.lineSWInner(d,n,y,q,v,E,Ua,M,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,M,na),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),d.close(),d.fillAndStroke()):!Ga&&La&&Ja&&Ia?"frame"!=ua?(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.paintSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),D.paintSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),"double"==ua&&(D.moveNWInner(d,n,y,q,v,E,Qa,M,na,Ga,Ia),D.paintLeftInner(d,+n,y,q,v,E,Ua,M,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,M,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,M,na),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.paintSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),D.paintSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),D.lineNWInner(d,n,y,q,v,E,Qa,M,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),D.paintSWInner(d,+n,y,q,v,E,Ua,M,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,M,na),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),d.close(),d.fillAndStroke()):!Ga||La||Ja||Ia?Ga&&!La&&!Ja&&Ia?"frame"!=ua?(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),D.paintNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),"double"==ua&&(D.moveNEInner(d,n,y,q,v,E,Sa,M,na,La),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Qa,M,na),D.paintLeftInner(d,+n,y,q,v,E,Ua,M,na,Ja,Ia)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),D.paintNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.lineNEInner(d,n,y,q,v,E,Sa,M,na,La),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Qa,M,na),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),d.close(),d.fillAndStroke()):Ga&&!La&&Ja&&!Ia?"frame"!=ua?(d.begin(),D.moveNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),"double"==ua&&(D.moveNEInner(d,n,y,+q,v,E,Sa,M,na,La),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga)),d.stroke(),d.begin(),D.moveSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),"double"==ua&&(D.moveSWInner(d,n,y,q,v,E,Ua,M,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.lineNEInner(d,n,y,q,v,E,Sa,M,na,La),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),d.close(),d.fillAndStroke(),d.begin(),D.moveSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,+q,v,E,Ua,M,Ia),D.lineSWInner(d,n,y,q,v,E,Ua,M,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),d.close(),d.fillAndStroke()):Ga&&!La&&Ja&&Ia?"frame"!=ua?(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),D.paintSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),D.paintNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),"double"==ua&&(D.moveNEInner(d,n,y,q,v,E,Sa,M,na,La),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Qa,M,na),D.paintLeftInner(d,+n,y,q,v,E,Ua,M,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,M,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),D.paintSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),D.paintNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.lineNEInner(d,n,y,q,v,E,Sa,M,na,La),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Qa,M,na),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),D.paintSWInner(d,+n,y,q,v,E,Ua,M,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),d.close(),d.fillAndStroke()):Ga&&La&&!Ja&&!Ia?"frame"!=ua?(d.begin(),D.moveNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.paintNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),"double"==ua&&(D.moveSEInner(d,n,y,q,v,E,Ta,M,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),D.paintNEInner(d,n,y,q,v,E,Sa,M,na),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,+n,y,q,v,E,Sa,M,La),D.paintNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.lineSEInner(d,n,y,q,v,E,Ta,M,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),D.paintNEInner(d,n,y,q,v,E,Sa,M,na),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),d.close(),d.fillAndStroke()):Ga&&La&&!Ja&&Ia?"frame"!=ua?(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),D.paintNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.paintNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,+Ja),"double"==ua&&(D.moveSEInner(d,n,y,q,v,E,Ta,M,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),D.paintNEInner(d,n,y,q,v,E,Sa,M,na),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Qa,M,na),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),D.paintNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.paintNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.lineSEInner(d,n,y,q,v,E,+Ta,M,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),D.paintNEInner(d,n,y,q,v,E,Sa,M,na),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Qa,M,na),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),d.close(),d.fillAndStroke()):Ga&&La&&Ja&&!Ia?"frame"!=ua?(d.begin(),D.moveNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.paintNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.paintSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),"double"==ua&&(D.moveSWInner(d,+n,y,q,v,E,Ua,M,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,M,na),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),D.paintNEInner(d,n,y,q,v,E,Sa,M,na),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.paintNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.paintSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),D.lineSWInner(d,n,y,q,v,E,Ua,M,na,Ia),D.paintBottomInner(d,+n,y,q,v,E,Ta,M,na,La,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,M,na),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),D.paintNEInner(d,n,y,q,v,E,Sa,M,na),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),d.close(),d.fillAndStroke()):Ga&&La&&Ja&&Ia&&("frame"!=ua?(d.begin(),D.moveNW(d,n,y,q,v,E,Qa,M,Ia),D.paintNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.paintNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.paintSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),D.paintSW(d,n,y,q,v,E,Ua,+M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),d.close(),"double"==ua&&(D.moveSWInner(d,n,y,q,v,E,Ua,M,na,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,M,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,M,na),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),D.paintNEInner(d,n,y,q,v,E,Sa,M,na),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Qa,M,na),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),d.close()),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Qa,M,Ia),D.paintNW(d,+n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.paintNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.paintSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),D.paintSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),d.close(),D.moveSWInner(d,n,y,q,v,E,Ua,M,na,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,M,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,M,na),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),D.paintNEInner(d,n,y,q,v,E,Sa,M,na),D.paintTopInner(d,+n,y,q,v,E,Qa,M,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Qa,M,na),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),d.close(),d.fillAndStroke())):"frame"!=ua?(d.begin(),D.moveNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),"double"==ua&&(D.moveNEInner(d,n,y,q,v,E,Sa,M,na,La),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.lineNEInner(d,n,y,q,v,E,Sa,M,na,La),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),d.close(),d.fillAndStroke()):+"frame"!=ua?(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),"double"==ua&&(D.moveSEInner(d,n,y,q,v,E,Ta,M,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.lineSEInner(d,n,y,q,v,E,Ta,M,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),d.close(),d.fillAndStroke()):"frame"!=ua?(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),"double"==ua&&(D.moveSWInner(d,+n,y,q,v,E,Ua,M,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),D.lineSWInner(d,n,y,q,v,E,Ua,M,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),d.close(),d.fillAndStroke()):"frame"!=ua?(d.begin(),D.moveSW(d,n,y,q,v,E,Qa,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),"double"==ua&&(D.moveNWInner(d,n,y,q,v,E,Qa,M,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,+Qa,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),D.lineNWInner(d,n,y,q,v,E,Qa,M,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),d.close(),d.fillAndStroke());d.begin();D.paintFolds(d,n,y,q,v,E,Qa,Sa,Ta,Ua,M,Ga,La,Ja,Ia);d.stroke()};Oa.prototype.moveNW=function(d,n,y,q,v,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.moveTo(0,0):d.moveTo(0,ha)};Oa.prototype.moveNE=function(d,n,y,q,v,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.moveTo(q,0):d.moveTo(q-ha,0)};Oa.prototype.moveSE=function(d,+n,y,q,v,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.moveTo(q,v):d.moveTo(q,v-ha)};Oa.prototype.moveSW=function(d,n,y,q,v,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.moveTo(0,v):d.moveTo(ha,v)};Oa.prototype.paintNW=function(d,n,y,q,v,D,E,ha,M){if(M)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(ha,ha,0,0,n,ha,0)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==E&&+"fold"==D)&&d.lineTo(ha,0);else d.lineTo(0,0)};Oa.prototype.paintTop=function(d,n,y,q,v,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.lineTo(q,0):d.lineTo(q-ha,0)};Oa.prototype.paintNE=function(d,n,y,q,v,D,E,ha,M){if(M)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(ha,ha,0,0,n,q,ha)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q,ha);else d.lineTo(q,+0)};Oa.prototype.paintRight=function(d,n,y,q,v,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.lineTo(q,v):d.lineTo(q,v-ha)};Oa.prototype.paintLeft=function(d,n,y,q,v,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.lineTo(0,0):d.lineTo(0,ha)};Oa.prototype.paintSE=function(d,n,y,q,v,D,E,ha,M){if(M)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(ha,ha,0,0,n,q-ha,v)}else("snip"==E||"default"==+E&&"snip"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-ha,v);else d.lineTo(q,v)};Oa.prototype.paintBottom=function(d,n,y,q,v,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.lineTo(0,v):d.lineTo(ha,v)};Oa.prototype.paintSW=function(d,n,y,q,v,D,E,ha,M){if(M)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(ha,ha,0,0,n,0,v-ha)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==+E&&"fold"==D)&&d.lineTo(0,v-ha);else d.lineTo(0,v)};Oa.prototype.paintNWInner=function(d,n,y,q,v,D,E,ha,M){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(ha-.5*M,ha-.5*M,0,0,0,M,.5*M+ha);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(ha+M,ha+M,0,0,1,M,M+ha);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(M,.5*M+ha);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(M+ha,M+ha),d.lineTo(M,M+ha)};Oa.prototype.paintTopInner=function(d,n,y,q,v,D,E,ha,M,ua,na){ua||na?!ua&&na?d.lineTo(0,+M):ua&&!na?d.lineTo(M,0):ua?"square"==E||"default"==E&&"square"==D?d.lineTo(M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(ha+.5*M,M):d.lineTo(ha+M,M):d.lineTo(0,M):d.lineTo(0,0)};Oa.prototype.paintNEInner=function(d,n,y,q,v,D,E,ha,M){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(ha-.5*M,ha-.5*M,0,0,0,q-ha-.5*M,M);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(ha+M,ha+M,0,0,1,q-ha-M,M);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(q-+ha-.5*M,M);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(q-ha-M,ha+M),d.lineTo(q-ha-M,M)};Oa.prototype.paintRightInner=function(d,n,y,q,v,D,E,ha,M,ua,na){ua||na?!ua&&na?d.lineTo(q-M,0):ua&&!na?d.lineTo(q,M):ua?"square"==E||"default"==E&&"square"==D?d.lineTo(q-M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-M,ha+.5*M):d.lineTo(q-M,ha+M):d.lineTo(q-M,0):d.lineTo(q,0)};Oa.prototype.paintLeftInner=function(d,n,y,q,v,D,E,ha,M,ua,na){ua||na?!ua&&na?d.lineTo(M,+v):ua&&!na?d.lineTo(0,v-M):ua?"square"==E||"default"==E&&"square"==D?d.lineTo(M,v-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(M,v-ha-.5*M):d.lineTo(M,v-ha-M):d.lineTo(M,v):d.lineTo(0,v)};Oa.prototype.paintSEInner=function(d,n,y,q,v,D,E,ha,M){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(ha-.5*M,ha-.5*M,0,0,0,q-M,v-ha-.5*M);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(ha+M,ha+M,0,0,1,q-M,v-ha-M);else if("snip"==E||"default"==E&&"snip"==+D)d.lineTo(q-M,v-ha-.5*M);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(q-ha-M,v-ha-M),d.lineTo(q-M,v-ha-M)};Oa.prototype.paintBottomInner=function(d,n,y,q,v,D,E,ha,M,ua,na){ua||na?!ua&&na?d.lineTo(q,v-M):ua&&!na?d.lineTo(q-M,v):"square"==E||"default"==E&&"square"==D||!ua?d.lineTo(q-M,v-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-ha-.5*M,v-M):d.lineTo(q-ha-M,v-M):d.lineTo(q,v)};Oa.prototype.paintSWInner=function(d,n,y,q,v,D,E,ha,M,ua){if(!ua)d.lineTo(M,+v);else if("square"==E||"default"==E&&"square"==D)d.lineTo(M,v-M);else if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(ha-.5*M,ha-.5*M,0,0,0,ha+.5*M,v-M);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(ha+M,ha+M,0,0,1,ha+M,v-M);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(ha+.5*M,v-M);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(M+ha,v-ha-M),d.lineTo(M+ha,v-M)};Oa.prototype.moveSWInner=function(d,n,y,q,v,D,E,ha,M,ua){ua?"square"==E||"default"==E&&"square"==D?d.moveTo(M,+v-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(M,v-ha-.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(M,v-ha-M):d.moveTo(0,v-M)};Oa.prototype.lineSWInner=function(d,n,y,q,v,D,E,ha,M,ua){ua?"square"==E||"default"==E&&"square"==D?d.lineTo(M,v-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(M,v-ha-.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==+E&&"fold"==D)&&d.lineTo(M,v-ha-M):d.lineTo(0,v-M)};Oa.prototype.moveSEInner=function(d,n,y,q,v,D,E,ha,M,ua){ua?"square"==E||"default"==E&&"square"==D?d.moveTo(q-M,v-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(q-M,v-ha-.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(q-M,v-ha-M):d.moveTo(q-M,v)};Oa.prototype.lineSEInner=function(d,n,y,q,v,D,E,ha,M,ua){ua?"square"==E||"default"==E&&"square"==D?d.lineTo(q-M,+v-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-M,v-ha-.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-M,v-ha-M):d.lineTo(q-M,v)};Oa.prototype.moveNEInner=function(d,n,y,q,v,D,E,ha,M,ua){ua?"square"==E||"default"==E&&"square"==D||ua?d.moveTo(q-M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(q-M,ha+.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==+E&&"fold"==D)&&d.moveTo(q-M,ha+M):d.moveTo(q,M)};Oa.prototype.lineNEInner=function(d,n,y,q,v,D,E,ha,M,ua){ua?"square"==E||"default"==E&&"square"==D||ua?d.lineTo(q-M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-M,ha+.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-M,ha+M):d.lineTo(q,M)};Oa.prototype.moveNWInner=function(d,n,y,q,v,D,E,ha,M,ua,na){ua||na?!ua&&na?d.moveTo(M,0):ua&&!na?d.moveTo(0,M):"square"==+E||"default"==E&&"square"==D?d.moveTo(M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(M,ha+.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(M,ha+M):d.moveTo(0,0)};Oa.prototype.lineNWInner=function(d,n,y,q,v,D,E,ha,M,ua,na){ua||na?!ua&&na?d.lineTo(M,0):ua&&!na?d.lineTo(0,M):"square"==E||"default"==E&&"square"==D?d.lineTo(M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(M,+ha+.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(M,ha+M):d.lineTo(0,0)};Oa.prototype.paintFolds=function(d,n,y,q,v,D,E,ha,M,ua,na,Va,fb,bb,Ga){if("fold"==D||"fold"==E||"fold"==ha||"fold"==M||"fold"==ua)("fold"==E||"default"==E&&"fold"==D)&&Va&&Ga&&(d.moveTo(0,na),d.lineTo(na,na),d.lineTo(na,0)),("fold"==ha||"default"==ha&&"fold"==D)&&Va&&fb&&(d.moveTo(q-na,0),d.lineTo(q-na,na),d.lineTo(q,na)),("fold"==M||"default"==M&&"fold"==D)&&bb&&fb&&(d.moveTo(q-+na,v),d.lineTo(q-na,v-na),d.lineTo(q,v-na)),("fold"==ua||"default"==ua&&"fold"==D)&&bb&&Ga&&(d.moveTo(0,v-na),d.lineTo(na,v-na),d.lineTo(na,v))};mxCellRenderer.registerShape(Oa.prototype.cst.RECT2,Oa);Oa.prototype.constraints=null;mxUtils.extend(Ra,mxConnector);Ra.prototype.origPaintEdgeShape=Ra.prototype.paintEdgeShape;Ra.prototype.paintEdgeShape=function(d,n,y){for(var q=[],v=0;v<n.length;v++)q.push(mxUtils.clone(n[v]));v=d.state.dashed;var D=d.state.fixDash;Ra.prototype.origPaintEdgeShape.apply(this,+[d,q,y]);3<=d.state.strokeWidth&&(q=mxUtils.getValue(this.style,"fillColor",null),null!=q&&(d.setStrokeColor(q),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(v,D),Ra.prototype.origPaintEdgeShape.apply(this,[d,n,y])))};mxCellRenderer.registerShape("filledEdge",Ra);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var n=this.editorUi.getSelectionState(),y=d.apply(this,arguments);"umlFrame"==+n.style.shape&&y.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return y}}();mxMarker.addMarker("dash",function(d,n,y,q,v,D,E,ha,M,ua){var na=v*(E+M+1),Va=D*(E+M+1);return function(){d.begin();d.moveTo(q.x-na/2-Va/2,q.y-Va/2+na/2);d.lineTo(q.x+Va/2-3*na/2,q.y-3*Va/2-na/2);d.stroke()}});mxMarker.addMarker("box",function(d,n,y,q,v,D,E,ha,M,ua){var na=v*(E+M+1),Va=D*(E+M+1),fb=q.x+na/2,bb=q.y+Va/2;q.x-=na;q.y-=Va;return function(){d.begin();d.moveTo(fb-na/2-+Va/2,bb-Va/2+na/2);d.lineTo(fb-na/2+Va/2,bb-Va/2-na/2);d.lineTo(fb+Va/2-3*na/2,bb-3*Va/2-na/2);d.lineTo(fb-Va/2-3*na/2,bb-3*Va/2+na/2);d.close();ua?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",function(d,n,y,q,v,D,E,ha,M,ua){var na=v*(E+M+1),Va=D*(E+M+1);return function(){d.begin();d.moveTo(q.x-na/2-Va/2,q.y-Va/2+na/2);d.lineTo(q.x+Va/2-3*na/2,q.y-3*Va/2-na/2);d.moveTo(q.x-na/2+Va/2,q.y-Va/2-na/2);d.lineTo(q.x-Va/2-3*na/2,q.y-3*Va/2+na/2);d.stroke()}});mxMarker.addMarker("circle",kb);+mxMarker.addMarker("circlePlus",function(d,n,y,q,v,D,E,ha,M,ua){var na=q.clone(),Va=kb.apply(this,arguments),fb=v*(E+2*M),bb=D*(E+2*M);return function(){Va.apply(this,arguments);d.begin();d.moveTo(na.x-v*M,na.y-D*M);d.lineTo(na.x-2*fb+v*M,na.y-2*bb+D*M);d.moveTo(na.x-fb-bb+D*M,na.y-bb+fb-v*M);d.lineTo(na.x+bb-fb-D*M,na.y-bb-fb+v*M);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,n,y,q,v,D,E,ha,M,ua){var na=v*(E+M+1),Va=D*(E+M+1),fb=q.clone();q.x-=na;q.y-=Va;return function(){d.begin();d.moveTo(fb.x-+Va,fb.y+na);d.quadTo(q.x-Va,q.y+na,q.x,q.y);d.quadTo(q.x+Va,q.y-na,fb.x+Va,fb.y-na);d.stroke()}});mxMarker.addMarker("async",function(d,n,y,q,v,D,E,ha,M,ua){n=v*M*1.118;y=D*M*1.118;v*=E+M;D*=E+M;var na=q.clone();na.x-=n;na.y-=y;q.x+=-v-n;q.y+=-D-y;return function(){d.begin();d.moveTo(na.x,na.y);ha?d.lineTo(na.x-v-D/2,na.y-D+v/2):d.lineTo(na.x+D/2-v,na.y-D-v/2);d.lineTo(na.x-v,na.y-D);d.close();ua?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:2;return function(n,+y,q,v,D,E,ha,M,ua,na){D*=ha+ua;E*=ha+ua;var Va=v.clone();return function(){n.begin();n.moveTo(Va.x,Va.y);M?n.lineTo(Va.x-D-E/d,Va.y-E+D/d):n.lineTo(Va.x+E/d-D,Va.y-E-D/d);n.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var qb=function(d,n,y){return nb(d,["width"],n,function(q,v,D,E,ha){ha=d.shape.getEdgeWidth()*d.view.scale+y;return new mxPoint(E.x+v*q/4+D*ha/2,E.y+D*q/4-v*ha/2)},function(q,v,D,E,ha,M){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));d.style.width=Math.round(2*+q)/d.view.scale-y})},nb=function(d,n,y,q,v){return jb(d,n,function(D){var E=d.absolutePoints;if(null!=E&&0<E.length){var ha=E.length-1;D=d.view.translate;var M=d.view.scale,ua=y?E[0]:E[ha];E=y?E[1]:E[ha-1];ha=E.x-ua.x;var na=E.y-ua.y,Va=Math.sqrt(ha*ha+na*na);ua=q.call(this,Va,ha/Va,na/Va,ua,E);return new mxPoint(ua.x/M-D.x,ua.y/M-D.y)}return null},function(D,E,ha){var M=d.absolutePoints,ua=M.length-1;D=d.view.translate;var na=d.view.scale,Va=y?M[0]:M[ua];M=y?M[1]:M[ua-1];ua=M.x-Va.x;var fb=M.y-Va.y,+bb=Math.sqrt(ua*ua+fb*fb);E.x=(E.x+D.x)*na;E.y=(E.y+D.y)*na;v.call(this,bb,ua/bb,fb/bb,Va,M,E,ha)})},lb=function(d,n){return function(y){return[nb(y,["startWidth"],!0,function(q,v,D,E,ha){ha=mxUtils.getNumber(y.style,"startWidth",d)*y.view.scale+n;return new mxPoint(E.x+v*q/4+D*ha/2,E.y+D*q/4-v*ha/2)},function(q,v,D,E,ha,M){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));y.style.startWidth=Math.round(2*q)/y.view.scale-n})]}},eb=function(d){return function(n){return[jb(n,["arrowWidth",+"arrowSize"],function(y){var q=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Na.prototype.arrowWidth))),v=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",Na.prototype.arrowSize)));return new mxPoint(y.x+(1-v)*y.width,y.y+(1-q)*y.height/2)},function(y,q){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(y.y+y.height/2-q.y)/y.height*2));this.state.style.arrowSize=Math.max(0,Math.min(d,(y.x+y.width-q.x)/y.width))})]}},tb=function(d){return function(n){return[jb(n,["size"],function(y){var q=Math.max(0,Math.min(.5*y.height,parseFloat(mxUtils.getValue(this.state.style,"size",d))));return new mxPoint(y.x,y.y+q)},function(y,q){this.state.style.size=Math.max(0,q.y-y.y)},!0)]}},ob=function(d,n,y){return function(q){var v=[jb(q,["size"],function(D){var E=Math.max(0,Math.min(D.width,Math.min(D.height,parseFloat(mxUtils.getValue(this.state.style,"size",n)))))*d;return new mxPoint(D.x+E,D.y+E)},function(D,E){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(D.width,-E.x-D.x),Math.min(D.height,E.y-D.y)))/d)},!1)];y&&mxUtils.getValue(q.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(wb(q));return v}},ub=function(d,n,y,q,v){y=null!=y?y:.5;return function(D){var E=[jb(D,["size"],function(fa){var L=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,va=parseFloat(mxUtils.getValue(this.state.style,"size",L?v:d));return new mxPoint(fa.x+Math.max(0,Math.min(.5*fa.width,va*(L?1:fa.width))),fa.getCenterY())},function(fa,L,va){fa=null!=v&&"0"!=mxUtils.getValue(this.state.style,-"fixedSize","0")?L.x-fa.x:Math.max(0,Math.min(y,(L.x-fa.x)/fa.width));this.state.style.size=fa},!1,q)];n&&mxUtils.getValue(D.style,mxConstants.STYLE_ROUNDED,!1)&&E.push(wb(D));return E}},Ab=function(d,n,y){d=null!=d?d:.5;return function(q){var v=[jb(q,["size"],function(D){var E=null!=y?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,fa=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",E?y:n)));return new mxPoint(D.x+Math.min(.75*D.width*d,fa*(E?.75:.75*D.width)),D.y+D.height/+E.x-D.x),Math.min(D.height,E.y-D.y)))/d)},!1)];y&&mxUtils.getValue(q.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(wb(q));return v}},ub=function(d,n,y,q,v){y=null!=y?y:.5;return function(D){var E=[jb(D,["size"],function(ha){var M=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ua=parseFloat(mxUtils.getValue(this.state.style,"size",M?v:d));return new mxPoint(ha.x+Math.max(0,Math.min(.5*ha.width,ua*(M?1:ha.width))),ha.getCenterY())},function(ha,M,ua){ha=null!=v&&"0"!=mxUtils.getValue(this.state.style,+"fixedSize","0")?M.x-ha.x:Math.max(0,Math.min(y,(M.x-ha.x)/ha.width));this.state.style.size=ha},!1,q)];n&&mxUtils.getValue(D.style,mxConstants.STYLE_ROUNDED,!1)&&E.push(wb(D));return E}},Ab=function(d,n,y){d=null!=d?d:.5;return function(q){var v=[jb(q,["size"],function(D){var E=null!=y?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ha=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",E?y:n)));return new mxPoint(D.x+Math.min(.75*D.width*d,ha*(E?.75:.75*D.width)),D.y+D.height/4)},function(D,E){D=null!=y&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?E.x-D.x:Math.max(0,Math.min(d,(E.x-D.x)/D.width*.75));this.state.style.size=D},!1,!0)];mxUtils.getValue(q.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(wb(q));return v}},yb=function(){return function(d){var n=[];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n}},wb=function(d,n){return jb(d,[mxConstants.STYLE_ARCSIZE],function(y){var q=null!=n?n:y.height/8;if("1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(y.x+y.width-Math.min(y.width/2,v),y.y+q)}v=Math.max(0,parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(y.x+y.width-Math.min(Math.max(y.width/2,y.height/2),Math.min(y.width,y.height)*v),y.y+q)},function(y,q,v){"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?-this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(y.width,2*(y.x+y.width-q.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(y.width-q.x+y.x)/Math.min(y.width,y.height))))})},jb=function(d,n,y,q,v,D,E){var fa=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);fa.execute=function(va){for(var na=0;na<n.length;na++)this.copyStyle(n[na]);E&&E(va)};fa.getPosition=y;fa.setPosition=q;fa.ignoreGrid=null!=v?v:!0;if(D){var L=fa.positionChanged;-fa.positionChanged=function(){L.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return fa},ib={link:function(d){return[qb(d,!0,10),qb(d,!1,10)]},flexArrow:function(d){var n=d.view.graph.gridSize/d.view.scale,y=[];mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(y.push(nb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(q,v,D,E,fa){q=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;fa=3*mxUtils.getNumber(d.style,-mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(fa+d.shape.strokewidth*d.view.scale)+D*q/2,E.y+D*(fa+d.shape.strokewidth*d.view.scale)-v*q/2)},function(q,v,D,E,fa,L,va){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,L.x,L.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*q)/d.view.scale;if(mxEvent.isShiftDown(va.getEvent())||-mxEvent.isControlDown(va.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<n/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE])})),y.push(nb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(q,v,D,E,fa){q=(d.shape.getStartArrowWidth()-d.shape.strokewidth)*d.view.scale;-fa=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(fa+d.shape.strokewidth*d.view.scale)+D*q/2,E.y+D*(fa+d.shape.strokewidth*d.view.scale)-v*q/2)},function(q,v,D,E,fa,L,va){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,L.x,L.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*q)-d.shape.getEdgeWidth())/-d.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE],d.style.endWidth=d.style.startWidth;mxEvent.isAltDown(va.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<n/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(d.style.startWidth)-parseFloat(d.style.endWidth))<n&&(d.style.startWidth=-d.style.endWidth))})));mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(y.push(nb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(q,v,D,E,fa){q=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;fa=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(fa+d.shape.strokewidth*d.view.scale)-D*q/2,E.y+D*(fa+d.shape.strokewidth*d.view.scale)+v*q/2)},function(q,-v,D,E,fa,L,va){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,L.x,L.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*q)/d.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<-n/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),y.push(nb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(q,v,D,E,fa){q=(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;fa=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(fa+d.shape.strokewidth*d.view.scale)-D*q/2,E.y+D*(fa+d.shape.strokewidth*d.view.scale)+v*q/2)},function(q,v,D,E,fa,L,-va){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,L.x,L.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.endWidth=Math.max(0,Math.round(2*q)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(va.getEvent())||+this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(y.width,2*(y.x+y.width-q.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(y.width-q.x+y.x)/Math.min(y.width,y.height))))})},jb=function(d,n,y,q,v,D,E){var ha=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);ha.execute=function(ua){for(var na=0;na<n.length;na++)this.copyStyle(n[na]);E&&E(ua)};ha.getPosition=y;ha.setPosition=q;ha.ignoreGrid=null!=v?v:!0;if(D){var M=ha.positionChanged;+ha.positionChanged=function(){M.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return ha},ib={link:function(d){return[qb(d,!0,10),qb(d,!1,10)]},flexArrow:function(d){var n=d.view.graph.gridSize/d.view.scale,y=[];mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(y.push(nb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(q,v,D,E,ha){q=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ha=3*mxUtils.getNumber(d.style,+mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(ha+d.shape.strokewidth*d.view.scale)+D*q/2,E.y+D*(ha+d.shape.strokewidth*d.view.scale)-v*q/2)},function(q,v,D,E,ha,M,ua){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,M.x,M.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*q)/d.view.scale;if(mxEvent.isShiftDown(ua.getEvent())||+mxEvent.isControlDown(ua.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(ua.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<n/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE])})),y.push(nb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(q,v,D,E,ha){q=(d.shape.getStartArrowWidth()-d.shape.strokewidth)*d.view.scale;+ha=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(ha+d.shape.strokewidth*d.view.scale)+D*q/2,E.y+D*(ha+d.shape.strokewidth*d.view.scale)-v*q/2)},function(q,v,D,E,ha,M,ua){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,M.x,M.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*q)-d.shape.getEdgeWidth())/+d.view.scale;if(mxEvent.isShiftDown(ua.getEvent())||mxEvent.isControlDown(ua.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE],d.style.endWidth=d.style.startWidth;mxEvent.isAltDown(ua.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<n/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(d.style.startWidth)-parseFloat(d.style.endWidth))<n&&(d.style.startWidth=+d.style.endWidth))})));mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(y.push(nb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(q,v,D,E,ha){q=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ha=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(ha+d.shape.strokewidth*d.view.scale)-D*q/2,E.y+D*(ha+d.shape.strokewidth*d.view.scale)+v*q/2)},function(q,+v,D,E,ha,M,ua){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,M.x,M.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*q)/d.view.scale;if(mxEvent.isShiftDown(ua.getEvent())||mxEvent.isControlDown(ua.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(ua.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<+n/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),y.push(nb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(q,v,D,E,ha){q=(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;ha=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(ha+d.shape.strokewidth*d.view.scale)-D*q/2,E.y+D*(ha+d.shape.strokewidth*d.view.scale)+v*q/2)},function(q,v,D,E,ha,M,+ua){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,M.x,M.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.endWidth=Math.max(0,Math.round(2*q)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(ua.getEvent())||mxEvent.isControlDown(ua.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(ua.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<n/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(d.style.endWidth)-parseFloat(d.style.startWidth))<n&&(d.style.endWidth=d.style.startWidth))})));return y},swimlane:function(d){var n=[];if(mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED)){var y=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));n.push(wb(d,y/2))}n.push(jb(d,[mxConstants.STYLE_STARTSIZE],function(q){var v=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(q.getCenterX(),q.y+Math.max(0,Math.min(q.height,v))):new mxPoint(q.x+Math.max(0,Math.min(q.width,v)),q.getCenterY())},function(q,v){d.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,-Math.min(q.height,v.y-q.y))):Math.round(Math.max(0,Math.min(q.width,v.x-q.x)))},!1,null,function(q){var v=d.view.graph;if(!mxEvent.isShiftDown(q.getEvent())&&!mxEvent.isControlDown(q.getEvent())&&(v.isTableRow(d.cell)||v.isTableCell(d.cell))){q=v.getSwimlaneDirection(d.style);var D=v.model.getParent(d.cell);D=v.model.getChildCells(D,!0);for(var E=[],fa=0;fa<D.length;fa++)D[fa]!=d.cell&&v.isSwimlane(D[fa])&&v.getSwimlaneDirection(v.getCurrentCellStyle(D[fa]))==q&&E.push(D[fa]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,-d.style[mxConstants.STYLE_STARTSIZE],E)}}));return n},label:yb(),ext:yb(),rectangle:yb(),triangle:yb(),rhombus:yb(),umlLifeline:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size))));return new mxPoint(n.getCenterX(),n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},umlFrame:function(d){return[jb(d,["width","height"],function(n){var y=Math.max(aa.prototype.corner,-Math.min(n.width,mxUtils.getValue(this.state.style,"width",aa.prototype.width))),q=Math.max(1.5*aa.prototype.corner,Math.min(n.height,mxUtils.getValue(this.state.style,"height",aa.prototype.height)));return new mxPoint(n.x+y,n.y+q)},function(n,y){this.state.style.width=Math.round(Math.max(aa.prototype.corner,Math.min(n.width,y.x-n.x)));this.state.style.height=Math.round(Math.max(1.5*aa.prototype.corner,Math.min(n.height,y.y-n.y)))},!1)]},process:function(d){var n=[jb(d,["size"],function(y){var q=-"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size));return q?new mxPoint(y.x+v,y.y+y.height/4):new mxPoint(y.x+y.width*v,y.y+y.height/4)},function(y,q){y="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*y.width,q.x-y.x)):Math.max(0,Math.min(.5,(q.x-y.x)/y.width));this.state.style.size=y},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},cross:function(d){return[jb(d,+Math.min(q.height,v.y-q.y))):Math.round(Math.max(0,Math.min(q.width,v.x-q.x)))},!1,null,function(q){var v=d.view.graph;if(!mxEvent.isShiftDown(q.getEvent())&&!mxEvent.isControlDown(q.getEvent())&&(v.isTableRow(d.cell)||v.isTableCell(d.cell))){q=v.getSwimlaneDirection(d.style);var D=v.model.getParent(d.cell);D=v.model.getChildCells(D,!0);for(var E=[],ha=0;ha<D.length;ha++)D[ha]!=d.cell&&v.isSwimlane(D[ha])&&v.getSwimlaneDirection(v.getCurrentCellStyle(D[ha]))==q&&E.push(D[ha]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,+d.style[mxConstants.STYLE_STARTSIZE],E)}}));return n},label:yb(),ext:yb(),rectangle:yb(),triangle:yb(),rhombus:yb(),umlLifeline:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",V.prototype.size))));return new mxPoint(n.getCenterX(),n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},umlFrame:function(d){return[jb(d,["width","height"],function(n){var y=Math.max(ba.prototype.corner,+Math.min(n.width,mxUtils.getValue(this.state.style,"width",ba.prototype.width))),q=Math.max(1.5*ba.prototype.corner,Math.min(n.height,mxUtils.getValue(this.state.style,"height",ba.prototype.height)));return new mxPoint(n.x+y,n.y+q)},function(n,y){this.state.style.width=Math.round(Math.max(ba.prototype.corner,Math.min(n.width,y.x-n.x)));this.state.style.height=Math.round(Math.max(1.5*ba.prototype.corner,Math.min(n.height,y.y-n.y)))},!1)]},process:function(d){var n=[jb(d,["size"],function(y){var q=+"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size));return q?new mxPoint(y.x+v,y.y+y.height/4):new mxPoint(y.x+y.width*v,y.y+y.height/4)},function(y,q){y="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*y.width,q.x-y.x)):Math.max(0,Math.min(.5,(q.x-y.x)/y.width));this.state.style.size=y},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},cross:function(d){return[jb(d,["size"],function(n){var y=Math.min(n.width,n.height);y=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Xa.prototype.size)))*y/2;return new mxPoint(n.getCenterX()-y,n.getCenterY()-y)},function(n,y){var q=Math.min(n.width,n.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,n.getCenterY()-y.y)/q*2,Math.max(0,n.getCenterX()-y.x)/q*2)))})]},note:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",G.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},note2:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,-n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},manualInput:function(d){var n=[jb(d,["size"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",Ma.prototype.size)));return new mxPoint(y.x+y.width/4,y.y+3*q/4)},function(y,q){this.state.style.size=Math.round(Math.max(0,Math.min(y.height,4*(q.y-y.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},dataStorage:function(d){return[jb(d,["size"],function(n){var y="0"!=mxUtils.getValue(this.state.style,-"fixedSize","0"),q=parseFloat(mxUtils.getValue(this.state.style,"size",y?Da.prototype.fixedSize:Da.prototype.size));return new mxPoint(n.x+n.width-q*(y?1:n.width),n.getCenterY())},function(n,y){n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(n.width,n.x+n.width-y.x)):Math.max(0,Math.min(1,(n.x+n.width-y.x)/n.width));this.state.style.size=n},!1)]},callout:function(d){var n=[jb(d,["size","position"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,-"size",ha.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ha.prototype.position)));mxUtils.getValue(this.state.style,"base",ha.prototype.base);return new mxPoint(y.x+v*y.width,y.y+y.height-q)},function(y,q){mxUtils.getValue(this.state.style,"base",ha.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(y.height,y.y+y.height-q.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(q.x-y.x)/y.width)))/100},!1),jb(d,["position2"],function(y){var q=-Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ha.prototype.position2)));return new mxPoint(y.x+q*y.width,y.y+y.height)},function(y,q){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(q.x-y.x)/y.width)))/100},!1),jb(d,["base"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",ha.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ha.prototype.position))),D=Math.max(0,Math.min(y.width,mxUtils.getValue(this.state.style,-"base",ha.prototype.base)));return new mxPoint(y.x+Math.min(y.width,v*y.width+D),y.y+y.height-q)},function(y,q){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ha.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(y.width,q.x-y.x-v*y.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},internalStorage:function(d){var n=[jb(d,["dx","dy"],function(y){var q=Math.max(0,Math.min(y.width,mxUtils.getValue(this.state.style,+n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},manualInput:function(d){var n=[jb(d,["size"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",Ka.prototype.size)));return new mxPoint(y.x+y.width/4,y.y+3*q/4)},function(y,q){this.state.style.size=Math.round(Math.max(0,Math.min(y.height,4*(q.y-y.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},dataStorage:function(d){return[jb(d,["size"],function(n){var y="0"!=mxUtils.getValue(this.state.style,+"fixedSize","0"),q=parseFloat(mxUtils.getValue(this.state.style,"size",y?Ea.prototype.fixedSize:Ea.prototype.size));return new mxPoint(n.x+n.width-q*(y?1:n.width),n.getCenterY())},function(n,y){n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(n.width,n.x+n.width-y.x)):Math.max(0,Math.min(1,(n.x+n.width-y.x)/n.width));this.state.style.size=n},!1)]},callout:function(d){var n=[jb(d,["size","position"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,+"size",ia.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ia.prototype.position)));mxUtils.getValue(this.state.style,"base",ia.prototype.base);return new mxPoint(y.x+v*y.width,y.y+y.height-q)},function(y,q){mxUtils.getValue(this.state.style,"base",ia.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(y.height,y.y+y.height-q.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(q.x-y.x)/y.width)))/100},!1),jb(d,["position2"],function(y){var q=+Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ia.prototype.position2)));return new mxPoint(y.x+q*y.width,y.y+y.height)},function(y,q){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(q.x-y.x)/y.width)))/100},!1),jb(d,["base"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",ia.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ia.prototype.position))),D=Math.max(0,Math.min(y.width,mxUtils.getValue(this.state.style,+"base",ia.prototype.base)));return new mxPoint(y.x+Math.min(y.width,v*y.width+D),y.y+y.height-q)},function(y,q){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ia.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(y.width,q.x-y.x-v*y.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},internalStorage:function(d){var n=[jb(d,["dx","dy"],function(y){var q=Math.max(0,Math.min(y.width,mxUtils.getValue(this.state.style,"dx",Ha.prototype.dx))),v=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"dy",Ha.prototype.dy)));return new mxPoint(y.x+q,y.y+v)},function(y,q){this.state.style.dx=Math.round(Math.max(0,Math.min(y.width,q.x-y.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(y.height,q.y-y.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},module:function(d){return[jb(d,["jettyWidth","jettyHeight"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,-"jettyWidth",wa.prototype.jettyWidth))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"jettyHeight",wa.prototype.jettyHeight)));return new mxPoint(n.x+y/2,n.y+2*q)},function(n,y){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(n.width,y.x-n.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(n.height,y.y-n.y))/2)})]},corner:function(d){return[jb(d,["dx","dy"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,"dx",Aa.prototype.dx))),-q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"dy",Aa.prototype.dy)));return new mxPoint(n.x+y,n.y+q)},function(n,y){this.state.style.dx=Math.round(Math.max(0,Math.min(n.width,y.x-n.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},tee:function(d){return[jb(d,["dx","dy"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));+"jettyWidth",wa.prototype.jettyWidth))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"jettyHeight",wa.prototype.jettyHeight)));return new mxPoint(n.x+y/2,n.y+2*q)},function(n,y){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(n.width,y.x-n.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(n.height,y.y-n.y))/2)})]},corner:function(d){return[jb(d,["dx","dy"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,"dx",Ba.prototype.dx))),+q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"dy",Ba.prototype.dy)));return new mxPoint(n.x+y,n.y+q)},function(n,y){this.state.style.dx=Math.round(Math.max(0,Math.min(n.width,y.x-n.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},tee:function(d){return[jb(d,["dx","dy"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,"dx",$a.prototype.dx))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"dy",$a.prototype.dy)));return new mxPoint(n.x+(n.width+y)/2,n.y+q)},function(n,y){this.state.style.dx=Math.round(Math.max(0,2*Math.min(n.width/2,y.x-n.x-n.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},singleArrow:eb(1),doubleArrow:eb(.5),"mxgraph.arrows2.wedgeArrow":lb(20,20),"mxgraph.arrows2.wedgeArrowDashed":lb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":lb(20,20),folder:function(d){return[jb(d,["tabWidth","tabHeight"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,"tabWidth",t.prototype.tabWidth))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"tabHeight",t.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",t.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(y=n.width-y);return new mxPoint(n.x+y,n.y+q)},function(n,y){var q=Math.max(0,Math.min(n.width,y.x-n.x));mxUtils.getValue(this.state.style,"tabPosition",t.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(q=n.width-q);this.state.style.tabWidth=Math.round(q);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},document:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(n.x+3*n.width/4,n.y+(1-y)*n.height)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(n.y+n.height-y.y)/n.height))},!1)]},tape:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));-return new mxPoint(n.getCenterX(),n.y+y*n.height/2)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(y.y-n.y)/n.height*2))},!1)]},isoCube2:function(d){return[jb(d,["isoAngle"],function(n){var y=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",R.isoAngle))))*Math.PI/200;return new mxPoint(n.x,n.y+Math.min(n.width*Math.tan(y),.5*n.height))},function(n,y){this.state.style.isoAngle=Math.max(0,50*(y.y-n.y)/n.height)},!0)]},cylinder2:tb(c.prototype.size),cylinder3:tb(f.prototype.size),-offPageConnector:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",V.prototype.size))));return new mxPoint(n.getCenterX(),n.y+(1-y)*n.height)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(n.y+n.height-y.y)/n.height))},!1)]},"mxgraph.basic.rect":function(d){var n=[Graph.createHandle(d,["size"],function(y){var q=Math.max(0,Math.min(y.width/2,y.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));+return new mxPoint(n.getCenterX(),n.y+y*n.height/2)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(y.y-n.y)/n.height*2))},!1)]},isoCube2:function(d){return[jb(d,["isoAngle"],function(n){var y=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",Q.isoAngle))))*Math.PI/200;return new mxPoint(n.x,n.y+Math.min(n.width*Math.tan(y),.5*n.height))},function(n,y){this.state.style.isoAngle=Math.max(0,50*(y.y-n.y)/n.height)},!0)]},cylinder2:tb(c.prototype.size),cylinder3:tb(f.prototype.size),+offPageConnector:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));return new mxPoint(n.getCenterX(),n.y+(1-y)*n.height)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(n.y+n.height-y.y)/n.height))},!1)]},"mxgraph.basic.rect":function(d){var n=[Graph.createHandle(d,["size"],function(y){var q=Math.max(0,Math.min(y.width/2,y.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(y.x+q,y.y+q)},function(y,q){this.state.style.size=Math.round(100*Math.max(0,Math.min(y.height/2,y.width/2,q.x-y.x)))/100})];d=Graph.createHandle(d,["indent"],function(y){var q=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(y.x+.75*y.width,y.y+q*y.height/200)},function(y,q){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(q.y-y.y)/y.height)))/100});n.push(d);return n},step:ub(la.prototype.size,!0,null,-!0,la.prototype.fixedSize),hexagon:ub(Y.prototype.size,!0,.5,!0,Y.prototype.fixedSize),curlyBracket:ub(da.prototype.size,!1),display:ub(ab.prototype.size,!1),cube:ob(1,m.prototype.size,!1),card:ob(.5,C.prototype.size,!0),loopLimit:ob(.5,Q.prototype.size,!0),trapezoid:Ab(.5,J.prototype.size,J.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=jb;Graph.handleFactory=ib;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=+!0,la.prototype.fixedSize),hexagon:ub(Y.prototype.size,!0,.5,!0,Y.prototype.fixedSize),curlyBracket:ub(da.prototype.size,!1),display:ub(ab.prototype.size,!1),cube:ob(1,m.prototype.size,!1),card:ob(.5,C.prototype.size,!0),loopLimit:ob(.5,R.prototype.size,!0),trapezoid:Ab(.5,J.prototype.size,J.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=jb;Graph.handleFactory=ib;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=Bb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var n=this.state.style.shape;null==mxCellRenderer.defaultShapes[n]&&null==mxStencilRegistry.getStencil(n)?n=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(n=mxConstants.SHAPE_SWIMLANE);n=ib[n];null==n&&null!=this.state.shape&&this.state.shape.isRoundable()&&(n=ib[mxConstants.SHAPE_RECTANGLE]);null!=n&&(n=n(this.state),null!=n&&(d=null==d?n:d.concat(n)))}return d};mxEdgeHandler.prototype.createCustomHandles=function(){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_CONNECTOR);d=ib[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var sb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);sb=mxUtils.getRotatedPoint(sb,Math.cos(zb),Math.sin(zb));var rb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(rb),Math.sin(rb));mxEdgeStyle.IsometricConnector=function(d,-n,y,q,v){var D=d.view;q=null!=q&&0<q.length?q[0]:null;var E=d.absolutePoints,fa=E[0];E=E[E.length-1];null!=q&&(q=D.transformControlPoint(d,q));null==fa&&null!=n&&(fa=new mxPoint(n.getCenterX(),n.getCenterY()));null==E&&null!=y&&(E=new mxPoint(y.getCenterX(),y.getCenterY()));var L=sb.x,va=sb.y,na=xb.x,Va=xb.y,fb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=E&&null!=fa){d=function(Ga,Ka,Ja){Ga-=bb.x;var Ia=Ka-bb.y;Ka=(Va*Ga-na*Ia)/(L*Va-va*na);Ga=(va*Ga-L*Ia)/(va*na-L*Va);fb?-(Ja&&(bb=new mxPoint(bb.x+L*Ka,bb.y+va*Ka),v.push(bb)),bb=new mxPoint(bb.x+na*Ga,bb.y+Va*Ga)):(Ja&&(bb=new mxPoint(bb.x+na*Ga,bb.y+Va*Ga),v.push(bb)),bb=new mxPoint(bb.x+L*Ka,bb.y+va*Ka));v.push(bb)};var bb=fa;null==q&&(q=new mxPoint(fa.x+(E.x-fa.x)/2,fa.y+(E.y-fa.y)/2));d(q.x,q.y,!0);d(E.x,E.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Cb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,n){if(n==mxEdgeStyle.IsometricConnector){var y=+n,y,q,v){var D=d.view;q=null!=q&&0<q.length?q[0]:null;var E=d.absolutePoints,ha=E[0];E=E[E.length-1];null!=q&&(q=D.transformControlPoint(d,q));null==ha&&null!=n&&(ha=new mxPoint(n.getCenterX(),n.getCenterY()));null==E&&null!=y&&(E=new mxPoint(y.getCenterX(),y.getCenterY()));var M=sb.x,ua=sb.y,na=xb.x,Va=xb.y,fb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=E&&null!=ha){d=function(Ga,La,Ja){Ga-=bb.x;var Ia=La-bb.y;La=(Va*Ga-na*Ia)/(M*Va-ua*na);Ga=(ua*Ga-M*Ia)/(ua*na-M*Va);fb?+(Ja&&(bb=new mxPoint(bb.x+M*La,bb.y+ua*La),v.push(bb)),bb=new mxPoint(bb.x+na*Ga,bb.y+Va*Ga)):(Ja&&(bb=new mxPoint(bb.x+na*Ga,bb.y+Va*Ga),v.push(bb)),bb=new mxPoint(bb.x+M*La,bb.y+ua*La));v.push(bb)};var bb=ha;null==q&&(q=new mxPoint(ha.x+(E.x-ha.x)/2,ha.y+(E.y-ha.y)/2));d(q.x,q.y,!0);d(E.x,E.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Cb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,n){if(n==mxEdgeStyle.IsometricConnector){var y=new mxElbowEdgeHandler(d);y.snapToTerminals=!1;return y}return Cb.apply(this,arguments)};B.prototype.constraints=[];H.prototype.getConstraints=function(d,n,y){d=[];var q=Math.tan(mxUtils.toRadians(30)),v=(.5-q)/2;q=Math.min(n,y/(.5+q));n=(n-q)/2;y=(y-q)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y+.25*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n+.5*q,y+q*v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n+q,y+.25*q));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,n+q,y+.75*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n+.5*q,y+(1-v)*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y+.75*q));return d};R.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;q=Math.min(n*Math.tan(q),.5*y);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(1,-.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y-q));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));return d};ha.prototype.getConstraints=function(d,n,y){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var q=Math.max(0,Math.min(y,parseFloat(mxUtils.getValue(this.style,+0),!1,null,n+q,y+.75*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n+.5*q,y+(1-v)*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y+.75*q));return d};Q.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;q=Math.min(n*Math.tan(q),.5*y);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(1,+.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y-q));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));return d};ia.prototype.getConstraints=function(d,n,y){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var q=Math.max(0,Math.min(y,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(y-q)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(y-q)));n>=2*q&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};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),@@ -2973,69 +2973,69 @@ function(d,n,y){d=[];var q=Math.max(0,Math.min(n,Math.min(y,parseFloat(mxUtils.g"tabPosition",this.tabPosition)?(d.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,v)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),v))):(d.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-.5*q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,v)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.25*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.75*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y));d.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,-1),!1));return d};Ha.prototype.constraints=mxRectangleShape.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;oa.prototype.constraints=mxEllipse.prototype.constraints;Na.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxRectangleShape.prototype.constraints;Wa.prototype.constraints=mxRectangleShape.prototype.constraints;+1),!1));return d};Ha.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.constraints=mxRectangleShape.prototype.constraints;ja.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;oa.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxEllipse.prototype.constraints;Ka.prototype.constraints=mxRectangleShape.prototype.constraints;Wa.prototype.constraints=mxRectangleShape.prototype.constraints;ab.prototype.getConstraints=function(d,n,y){d=[];var q=Math.min(n,y/2),v=Math.min(n-q,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+n-q),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+n-q),y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));return d};wa.prototype.getConstraints=function(d,n,y){n=parseFloat(mxUtils.getValue(d,"jettyWidth",wa.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",wa.prototype.jettyHeight));var q=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,n),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,n),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(y-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(y-.5*d,3.5*d))];y>5*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,n));y>8*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,n));y>15*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,n));return q};Q.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;+!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(y-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(y-.5*d,3.5*d))];y>5*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,n));y>8*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,n));y>15*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,n));return q};R.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];A.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)];Ba.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,+.5),!1)];Aa.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)];l.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)];F.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)];la.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)];ja.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=+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)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];K.prototype.constraints=mxRectangleShape.prototype.constraints;J.prototype.constraints=mxRectangleShape.prototype.constraints;N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),-!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Za.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(y,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,+!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;$a.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(y,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*n+.25*q,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),.5*(y+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),y));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,.5*(n-q),y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),.5*(y+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*n-.25*q,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return d};Aa.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,+0),!1,null,.5*(n-q),y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),.5*(y+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*n-.25*q,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return d};Ba.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(y,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),v));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,q,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,.5*(y+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*q,y));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return d};Ra.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,-1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];La.prototype.getConstraints=function(d,n,y){d=[];var q=y*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,+0),!1,null,q,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,.5*(y+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*q,y));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return d};Pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,+1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Na.prototype.getConstraints=function(d,n,y){d=[];var q=y*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));q=(y-q)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-v),q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-v,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-v),y-q));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,0,y-q));return d};$a.prototype.getConstraints=function(d,n,y){d=[];var q=y*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",La.prototype.arrowWidth)))),v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",La.prototype.arrowSize))));q=(y-q)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,q));d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,0,y-q));return d};Ya.prototype.getConstraints=function(d,n,y){d=[];var q=y*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth)))),v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));q=(y-q)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-v,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));return d};Xa.prototype.getConstraints=function(d,n,y){d=[];var q=Math.min(y,n),v=Math.max(0,Math.min(q,q*parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=(y-v)/2;var D=q+v,E=(n-v)/2;v=E+v;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,0));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,y-.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,y));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y-.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+v),q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,D));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,.5*(n+v),D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,q));return d};X.prototype.constraints=-null;x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,+0),!1,null,.5*(n+v),D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,q));return d};V.prototype.constraints=+null;x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}-Actions.prototype.init=function(){function b(G){p.escape();G=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),G);null!=G&&p.setSelectionCells(G)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),P=0;P<G.length;P++)p.cellLabelChanged(G[P],"")}finally{p.getModel().endUpdate()}}}function g(G,P,R,c,f){f.getModel().beginUpdate();try{var l=f.getCellGeometry(G);null!=l&&R&&c&&(R/=c,l=l.clone(),1<R?l.height=l.width/R:l.width=l.height*R,f.getModel().setGeometry(G,+Actions.prototype.init=function(){function b(G){p.escape();G=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),G);null!=G&&p.setSelectionCells(G)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),P=0;P<G.length;P++)p.cellLabelChanged(G[P],"")}finally{p.getModel().endUpdate()}}}function g(G,P,Q,c,f){f.getModel().beginUpdate();try{var l=f.getCellGeometry(G);null!=l&&Q&&c&&(Q/=c,l=l.clone(),1<Q?l.height=l.width/Q:l.width=l.height*Q,f.getModel().setGeometry(G,l));f.setCellStyles(mxConstants.STYLE_CLIP_PATH,P,[G]);f.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[G])}finally{f.getModel().endUpdate()}}var m=this.editorUi,u=m.editor,p=u.graph,B=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.put("smartFit",new Action(mxResources.get("fitWindow")+" / "+mxResources.get("resetView"),-function(){p.popupMenuHandler.hideMenu();var G=p.view.scale,P=p.container.scrollLeft,R=p.container.scrollTop,c=p.view.translate.x,f=p.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(G-p.view.scale)&&5>Math.abs(P-p.container.scrollLeft)&&5>Math.abs(R-p.container.scrollTop)&&c==p.view.translate.x&&f==p.view.translate.y&&m.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){p.isSelectionEmpty()?m.actions.get("smartFit").funct():p.isEnabled()&&-p.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){m.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(G,P){try{var R=mxUtils.parseXml(G);u.graph.setSelectionCells(u.graph.importGraphModel(R.documentElement))}catch(c){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+c.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=+function(){p.popupMenuHandler.hideMenu();var G=p.view.scale,P=p.container.scrollLeft,Q=p.container.scrollTop,c=p.view.translate.x,f=p.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(G-p.view.scale)&&5>Math.abs(P-p.container.scrollLeft)&&5>Math.abs(Q-p.container.scrollTop)&&c==p.view.translate.x&&f==p.view.translate.y&&m.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){p.isSelectionEmpty()?m.actions.get("smartFit").funct():p.isEnabled()&&+p.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){m.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(G,P){try{var Q=mxUtils.parseXml(G);u.graph.setSelectionCells(u.graph.importGraphModel(Q.documentElement))}catch(c){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+c.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=B;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=B;this.addAction("saveAs...",function(){m.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S");this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var G=new EditDiagramDialog(m);m.showDialog(G.container,620,420,!0,!1);G.init()}).isEnabled=B;this.addAction("pageSetup...",function(){m.showDialog((new PageSetupDialog(m)).container,320,240,!0,!0)}).isEnabled=B;this.addAction("print...",function(){m.showPrintDialog()},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){m.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){m.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var G=null;try{G=m.copyXml(),null!=G&&p.removeCells(G,!1)}catch(P){}try{null==G&&mxClipboard.cut(p)}catch(P){m.handleError(P)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(G){}try{mxClipboard.copy(p)}catch(G){m.handleError(G)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(P){if(null!=P){p.getModel().beginUpdate();try{m.pasteXml(P,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),G=!0)}catch(P){}G||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(G){function P(c){if(null!=c){for(var f=!0,l=0;l<c.length&&f;l++)f=f&&p.model.isEdge(c[l]);var t=p.view.translate;l=p.view.scale;var z=t.x,C=t.y;t=null;if(1==c.length&&f){var F=p.getCellGeometry(c[0]);null!=F&&(t=F.getTerminalPoint(!0))}t=null!=t?t:p.getBoundingBoxFromGeometry(c,f);null!=t&&(f=Math.round(p.snap(p.popupMenuHandler.triggerX/l-z)),l=Math.round(p.snap(p.popupMenuHandler.triggerY/-l-C)),p.cellsMoved(c,f-t.x,l-t.y))}}function R(){p.getModel().beginUpdate();try{P(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){G=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(c){if(null!=c){p.getModel().beginUpdate();try{P(m.pasteXml(c,!0))}finally{p.getModel().endUpdate()}}else R()}),G=!0)}catch(c){}G||R()}});this.addAction("swap",function(){var G=p.getSelectionCells();2==G.length&&p.swapShapes(G[0],-G[1])});this.addAction("copySize",function(){var G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.getModel().isVertex(G)&&(G=p.getCellGeometry(G),null!=G&&(m.copiedSize=new mxRectangle(G.x,G.y,G.width,G.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var G=p.getResizableCells(p.getSelectionCells()),P=0;P<G.length;P++)if(p.getModel().isVertex(G[P])){var R=p.getCellGeometry(G[P]);-null!=R&&(R=R.clone(),R.width=m.copiedSize.width,R.height=m.copiedSize.height,p.getModel().setGeometry(G[P],R))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var G=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&null!=G&&(G=G.cloneValue(),null==G||isNaN(G.nodeType)||(m.copiedValue=G))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G)try{p.isHtmlLabel(G)?m.writeHtmlToClipboard(p.getLabel(G),-mxUtils.bind(this,function(P){m.handleError(P)})):m.writeTextToClipboard(p.getLabel(G),mxUtils.bind(this,function(P){m.handleError(P)}))}catch(P){m.handleError(P)}});this.addAction("pasteData",function(G,P){function R(l,t){var z=c.getValue(l);t=l.cloneValue(t);t.removeAttribute("placeholders");null==z||isNaN(z.nodeType)||t.setAttribute("placeholders",z.getAttribute("placeholders"));null!=G&&mxEvent.isShiftDown(G)||t.setAttribute("label",p.convertValueToString(l));c.setValue(l,t)}G=null!=P?P:G;var c=-p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){c.beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());if(0==f.length)R(c.getRoot(),m.copiedValue);else for(P=0;P<f.length;P++)R(f[P],m.copiedValue)}finally{c.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(G,P){G=null!=P?P:G;null!=G&&mxEvent.isShiftDown(G)?e():b(null!=G&&(mxEvent.isControlDown(G)||mxEvent.isMetaDown(G)||mxEvent.isAltDown(G)))},null,null,"Delete");this.addAction("deleteAll",+l-C)),p.cellsMoved(c,f-t.x,l-t.y))}}function Q(){p.getModel().beginUpdate();try{P(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){G=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(c){if(null!=c){p.getModel().beginUpdate();try{P(m.pasteXml(c,!0))}finally{p.getModel().endUpdate()}}else Q()}),G=!0)}catch(c){}G||Q()}});this.addAction("swap",function(){var G=p.getSelectionCells();2==G.length&&p.swapShapes(G[0],+G[1])});this.addAction("copySize",function(){var G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.getModel().isVertex(G)&&(G=p.getCellGeometry(G),null!=G&&(m.copiedSize=new mxRectangle(G.x,G.y,G.width,G.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var G=p.getResizableCells(p.getSelectionCells()),P=0;P<G.length;P++)if(p.getModel().isVertex(G[P])){var Q=p.getCellGeometry(G[P]);+null!=Q&&(Q=Q.clone(),Q.width=m.copiedSize.width,Q.height=m.copiedSize.height,p.getModel().setGeometry(G[P],Q))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var G=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&null!=G&&(G=G.cloneValue(),null==G||isNaN(G.nodeType)||(m.copiedValue=G))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G)try{p.isHtmlLabel(G)?m.writeHtmlToClipboard(p.getLabel(G),+mxUtils.bind(this,function(P){m.handleError(P)})):m.writeTextToClipboard(p.getLabel(G),mxUtils.bind(this,function(P){m.handleError(P)}))}catch(P){m.handleError(P)}});this.addAction("pasteData",function(G,P){function Q(l,t){var z=c.getValue(l);t=l.cloneValue(t);t.removeAttribute("placeholders");null==z||isNaN(z.nodeType)||t.setAttribute("placeholders",z.getAttribute("placeholders"));null!=G&&mxEvent.isShiftDown(G)||t.setAttribute("label",p.convertValueToString(l));c.setValue(l,t)}G=null!=P?P:G;var c=+p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){c.beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());if(0==f.length)Q(c.getRoot(),m.copiedValue);else for(P=0;P<f.length;P++)Q(f[P],m.copiedValue)}finally{c.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(G,P){G=null!=P?P:G;null!=G&&mxEvent.isShiftDown(G)?e():b(null!=G&&(mxEvent.isControlDown(G)||mxEvent.isMetaDown(G)||mxEvent.isAltDown(G)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(G){m.handleError(G)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var G=m.getSelectionState();if(null!=G.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",G.rowspan,[G.mergeCell]),p.setCellStyles("colspan",G.colspan,[G.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",new Action(mxResources.get("unmerge"),function(){var G=m.getSelectionState();if(0<G.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,G.cells),p.setCellStyles("colspan",null,G.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(G,P){G=null!=P?P:G;p.turnShapes(p.getResizableCells(p.getSelectionCells()),null!=G?mxEvent.isShiftDown(G):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(G){G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.addSelectionCells(p.getEdges(G))}));this.addAction("selectVertices",function(){p.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){p.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){p.selectAll(null,-!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),P=p.getCurrentCellStyle(p.getSelectionCell()),R=1==mxUtils.getValue(P,mxConstants.STYLE_EDITABLE,1)?0:1;p.setCellStyles(mxConstants.STYLE_MOVABLE,R,G);p.setCellStyles(mxConstants.STYLE_RESIZABLE,R,G);p.setCellStyles(mxConstants.STYLE_ROTATABLE,R,-G);p.setCellStyles(mxConstants.STYLE_DELETABLE,R,G);p.setCellStyles(mxConstants.STYLE_EDITABLE,R,G);p.setCellStyles("locked",1==R?0:1,G);p.setCellStyles("connectable",R,G)}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("explore",function(){p.model.isVertex(p.getSelectionCell())&&Graph.exploreFromCell(m.editor.graph,m.editor.graph.getSelectionCell())});this.addAction("home",function(){p.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){p.exitGroup()},+!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),P=p.getCurrentCellStyle(p.getSelectionCell()),Q=1==mxUtils.getValue(P,mxConstants.STYLE_EDITABLE,1)?0:1;p.setCellStyles(mxConstants.STYLE_MOVABLE,Q,G);p.setCellStyles(mxConstants.STYLE_RESIZABLE,Q,G);p.setCellStyles(mxConstants.STYLE_ROTATABLE,Q,+G);p.setCellStyles(mxConstants.STYLE_DELETABLE,Q,G);p.setCellStyles(mxConstants.STYLE_EDITABLE,Q,G);p.setCellStyles("locked",1==Q?0:1,G);p.setCellStyles("connectable",Q,G)}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("explore",function(){p.model.isVertex(p.getSelectionCell())&&Graph.exploreFromCell(m.editor.graph,m.editor.graph.getSelectionCell())});this.addAction("home",function(){p.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){p.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){p.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){p.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){p.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){p.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){p.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(G){p.orderCells(!1,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+F");this.addAction("sendBackward",function(G){p.orderCells(!0,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+B");this.addAction("group",function(){if(p.isEnabled()){var G=mxUtils.sortCells(p.getSelectionCells(),!0);1!=G.length||p.isTable(G[0])||p.isTableRow(G[0])?(G=p.getCellsForGroup(G),1<G.length&&p.setSelectionCell(p.groupCells(null,0,G))):p.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",-function(){if(p.isEnabled()){var G=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var P=p.ungroupCells();if(null!=G)for(var R=0;R<G.length;R++)p.model.contains(G[R])&&(0==p.model.getChildCount(G[R])&&p.model.isVertex(G[R])&&p.setCellStyles("container","0",[G[R]]),P.push(G[R]))}finally{p.model.endUpdate()}0<P.length&&p.setSelectionCells(P)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var G=p.getSelectionCells();if(null!=G){for(var P=-[],R=0;R<G.length;R++)p.isTableRow(G[R])||p.isTableCell(G[R])||P.push(G[R]);p.removeCellsFromParent(P);0<P.length&&p.scrollCellToVisible(P[0])}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var G=p.getSelectionCell()||p.getModel().getRoot();m.showDataDialog(G)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var P=-"";if(mxUtils.isNode(G.value)){var R=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&G.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R=G.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==R&&(R=G.value.getAttribute("tooltip"));null!=R&&(P=R)}P=new TextareaDialog(m,mxResources.get("editTooltip")+":",P,function(c){p.setTooltipForCell(G,c)});m.showDialog(P.container,320,200,!0,!0);P.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var G=p.getLinkForCell(p.getSelectionCell());-null!=G&&p.openLink(G)});this.addAction("editLink...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var P=p.getLinkForCell(G,!0)||"";m.showLinkDialog(P,mxResources.get("ok"),function(R,c,f){p.getModel().beginUpdate();try{p.setLinkForCell(G,0<R.length?R:null),p.setAttributeForCell(G,"linkTarget",f)}finally{p.getModel().endUpdate()}},!0,p.getLinkTargetForCell(G))}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&-!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=B;this.addAction("editImage...",function(){m.actions.get("image").funct()});this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("ok"),function(G,P,R){G=mxUtils.trim(G);if(0<G.length){var c=null,f=p.getLinkTitle(G);null!=P&&0<P.length&&(c=P[0].iconUrl,f=P[0].name||P[0].type,f=f.charAt(0).toUpperCase()+-f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));P=new mxCell(f,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c:"spacing=10;"));P.vertex=!0;c=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([P],!0));P.geometry.x=c.x;P.geometry.y=c.y;p.setAttributeForCell(P,"linkTarget",R);p.setLinkForCell(P,G);p.cellSizeUpdated(P,!0);p.getModel().beginUpdate();try{P=p.addCell(P),-p.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{p.getModel().endUpdate()}p.setSelectionCell(P);p.scrollCellToVisible(p.getSelectionCell())}},!0)},null,null,"L")).isEnabled=B;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var G=p.getSelectedElement(),P=p.getParentByName(G,"A",p.cellEditor.textarea),R="";if(null==P&&null!=G&&null!=G.getElementsByTagName)for(var c=G.getElementsByTagName("a"),f=0;f<c.length&&null==P;f++)c[f].textContent==-G.textContent&&(P=c[f]);null!=P&&"A"==P.nodeName&&(R=P.getAttribute("href")||"",p.selectNode(P));var l=p.cellEditor.saveSelection();m.showLinkDialog(R,mxResources.get("ok"),mxUtils.bind(this,function(t){p.cellEditor.restoreSelection(l);null!=t&&p.insertLink(t)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=B;this.addAction("autosize",function(){var G=p.getSelectionCells();if(null!=G){p.getModel().beginUpdate();try{for(var P=0;P<G.length;P++){var R=-G[P];p.getModel().isVertex(R)&&(0<p.getModel().getChildCount(R)?p.updateGroupBounds([R],0,!0):p.updateCellSize(R))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var G=p.getCommonStyle(p.getSelectionCells());G="1"==mxUtils.getValue(G,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var P=p.getEditableCells(p.getSelectionCells()),-R=0;R<P.length;R++)if(state=p.getView().getState(P[R]),null!=state){var c=mxUtils.getValue(state.style,"html","0");if("1"==c&&null==G)p.removeTextStyleForCell(state.cell),p.setCellStyles("html",G,[P[R]]);else if("0"==c&&"1"==G){var f=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>"));p.cellLabelChanged(state.cell,Graph.sanitizeHtml(f));p.setCellStyles("html",G,[P[R]])}}m.fireEvent(new mxEventObject("styleChanged",+function(){if(p.isEnabled()){var G=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var P=p.ungroupCells();if(null!=G)for(var Q=0;Q<G.length;Q++)p.model.contains(G[Q])&&(0==p.model.getChildCount(G[Q])&&p.model.isVertex(G[Q])&&p.setCellStyles("container","0",[G[Q]]),P.push(G[Q]))}finally{p.model.endUpdate()}0<P.length&&p.setSelectionCells(P)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var G=p.getSelectionCells();if(null!=G){for(var P=+[],Q=0;Q<G.length;Q++)p.isTableRow(G[Q])||p.isTableCell(G[Q])||P.push(G[Q]);p.removeCellsFromParent(P);0<P.length&&p.scrollCellToVisible(P[0])}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var G=p.getSelectionCell()||p.getModel().getRoot();m.showDataDialog(G)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var P=+"";if(mxUtils.isNode(G.value)){var Q=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&G.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(Q=G.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==Q&&(Q=G.value.getAttribute("tooltip"));null!=Q&&(P=Q)}P=new TextareaDialog(m,mxResources.get("editTooltip")+":",P,function(c){p.setTooltipForCell(G,c)});m.showDialog(P.container,320,200,!0,!0);P.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var G=p.getLinkForCell(p.getSelectionCell());+null!=G&&p.openLink(G)});this.addAction("editLink...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var P=p.getLinkForCell(G,!0)||"";m.showLinkDialog(P,mxResources.get("ok"),function(Q,c,f){p.getModel().beginUpdate();try{p.setLinkForCell(G,0<Q.length?Q:null),p.setAttributeForCell(G,"linkTarget",f)}finally{p.getModel().endUpdate()}},!0,p.getLinkTargetForCell(G))}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&+!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=B;this.addAction("editImage...",function(){m.actions.get("image").funct()});this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("ok"),function(G,P,Q){G=mxUtils.trim(G);if(0<G.length){var c=null,f=p.getLinkTitle(G);null!=P&&0<P.length&&(c=P[0].iconUrl,f=P[0].name||P[0].type,f=f.charAt(0).toUpperCase()++f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));P=new mxCell(f,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c:"spacing=10;"));P.vertex=!0;c=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([P],!0));P.geometry.x=c.x;P.geometry.y=c.y;p.setAttributeForCell(P,"linkTarget",Q);p.setLinkForCell(P,G);p.cellSizeUpdated(P,!0);p.getModel().beginUpdate();try{P=p.addCell(P),+p.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{p.getModel().endUpdate()}p.setSelectionCell(P);p.scrollCellToVisible(p.getSelectionCell())}},!0)},null,null,"L")).isEnabled=B;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var G=p.getSelectedElement(),P=p.getParentByName(G,"A",p.cellEditor.textarea),Q="";if(null==P&&null!=G&&null!=G.getElementsByTagName)for(var c=G.getElementsByTagName("a"),f=0;f<c.length&&null==P;f++)c[f].textContent==+G.textContent&&(P=c[f]);null!=P&&"A"==P.nodeName&&(Q=P.getAttribute("href")||"",p.selectNode(P));var l=p.cellEditor.saveSelection();m.showLinkDialog(Q,mxResources.get("ok"),mxUtils.bind(this,function(t){p.cellEditor.restoreSelection(l);null!=t&&p.insertLink(t)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=B;this.addAction("autosize",function(){var G=p.getSelectionCells();if(null!=G){p.getModel().beginUpdate();try{for(var P=0;P<G.length;P++){var Q=+G[P];p.getModel().isVertex(Q)&&(0<p.getModel().getChildCount(Q)?p.updateGroupBounds([Q],0,!0):p.updateCellSize(Q))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var G=p.getCommonStyle(p.getSelectionCells());G="1"==mxUtils.getValue(G,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var P=p.getEditableCells(p.getSelectionCells()),+Q=0;Q<P.length;Q++)if(state=p.getView().getState(P[Q]),null!=state){var c=mxUtils.getValue(state.style,"html","0");if("1"==c&&null==G)p.removeTextStyleForCell(state.cell),p.setCellStyles("html",G,[P[Q]]);else if("0"==c&&"1"==G){var f=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>"));p.cellLabelChanged(state.cell,Graph.sanitizeHtml(f));p.setCellStyles("html",G,[P[Q]])}}m.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=G?G:"0"],"cells",P))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var G=p.getView().getState(p.getSelectionCell()),P="wrap";p.stopEditing();null!=G&&"wrap"==G.style[mxConstants.STYLE_WHITE_SPACE]&&(P=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,P)});this.addAction("rotation",function(){var G="0",P=p.getView().getState(p.getSelectionCell());null!=P&&(G=P.style[mxConstants.STYLE_ROTATION]||G);G=new FilenameDialog(m,G,mxResources.get("apply"),-function(R){null!=R&&0<R.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,R)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(G.container,375,80,!0,!0);G.init()});this.addAction("resetView",function(){p.zoomTo(1);m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(G){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(G){p.isFastZoomEnabled()?+function(Q){null!=Q&&0<Q.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,Q)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(G.container,375,80,!0,!0);G.init()});this.addAction("resetView",function(){p.zoomTo(1);m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(G){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(G){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,m.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - / Alt+Mousewheel");this.addAction("fitWindow",function(){p.pageVisible&&p.isSelectionEmpty()?p.fitPages():m.fitDiagramToWindow()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(1):this.get("pageView").funct()}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(2):this.get("pageView").funct()}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(1,!0):this.get("pageView").funct()}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(P){P=parseInt(P);!isNaN(P)&&0<P&&p.zoomTo(P/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(G.container,300,80,!0,!0);G.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(P){P=parseInt(P);!isNaN(P)&&0<P&&(P=new ChangePageSetup(m,null,null,null,P/100),P.ignoreColor=!0,P.ignoreImage=!0,p.model.execute(P))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(G.container,300,80,!0,!0);G.init()}));var H=null;H=this.addAction("grid",@@ -3044,7 +3044,7 @@ H.setEnabled(!1);H=this.addAction("animations",function(){Editor.enableAnimationH=this.addAction("collapseExpand",function(){var G=new ChangePageSetup(m);G.ignoreColor=!0;G.ignoreImage=!0;G.foldingEnabled=!p.foldingEnabled;p.model.execute(G)});H.setToggleAction(!0);H.setSelectedCallback(function(){return p.foldingEnabled});H.isEnabled=B;H=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));H.setToggleAction(!0);H.setSelectedCallback(function(){return p.pageVisible});H=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");H.setToggleAction(!0);H.setSelectedCallback(function(){return p.connectionArrowsEnabled});H=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+O");H.setToggleAction(!0);H.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});H=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());m.fireEvent(new mxEventObject("copyConnectChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});H.isEnabled=B;H=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});H.setToggleAction(!0);H.setSelectedCallback(function(){return m.editor.autosave});H.isEnabled=B;H.visible=!1;this.addAction("help",function(){var G="";mxResources.isLanguageSupported(mxClient.language)&&-(G="_"+mxClient.language);p.openLink(RESOURCES_PATH+"/help"+G+".html")});var T=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){T||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){T=!1}),T=!0)}));H=mxUtils.bind(this,function(G,P,R,c){return this.addAction(G,function(){if(null!=R&&p.cellEditor.isContentEditing())R();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,+(G="_"+mxClient.language);p.openLink(RESOURCES_PATH+"/help"+G+".html")});var S=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){S||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){S=!1}),S=!0)}));H=mxUtils.bind(this,function(G,P,Q,c){return this.addAction(G,function(){if(null!=Q&&p.cellEditor.isContentEditing())Q();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,P,f);(P&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?p.updateLabelElements(f,function(t){t.style.fontWeight=null;"B"==t.nodeName&&p.replaceElement(t)}):(P&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(f,function(t){t.style.fontStyle=null;"I"==t.nodeName&&p.replaceElement(t)}):(P&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(f,function(t){t.style.textDecoration=null;"U"==t.nodeName&&p.replaceElement(t)});for(var l=0;l<f.length;l++)0==p.model.getChildCount(f[l])&&p.autoSizeCell(f[l],!1)}finally{p.getModel().endUpdate()}}},null,null,c)});H("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");H("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");H("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000","default",p.shapeForegroundColor)});this.addAction("strokeColor...",function(){m.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",p.shapeForegroundColor)});this.addAction("fillColor...",function(){m.menus.pickColor(mxConstants.STYLE_FILLCOLOR,null,null,"default",p.shapeBackgroundColor)});this.addAction("gradientColor...",function(){m.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR,null,null,"default",p.shapeForegroundColor)});this.addAction("backgroundColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,@@ -3053,19 +3053,19 @@ p.autoSizeCell(f[l],!1)}finally{p.getModel().endUpdate()}}},null,null,c)});H("botry{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dotted",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("sharp",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!p.isSelectionEmpty()&&p.isEnabled()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),P=p.getCurrentCellStyle(G[0]),-R="1"==mxUtils.getValue(P,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,R);p.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[R,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,+Q="1"==mxUtils.getValue(P,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,Q);p.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[Q,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,"1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var G=p.view.getState(p.getSelectionCell()),P="1";null!=G&&null!=p.getFoldingImage(G)&&(P="0");p.setCellStyles("collapsible",P);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[P],"cells",p.getSelectionCells()))});this.addAction("editStyle...",-mxUtils.bind(this,function(){var G=p.getEditableCells(p.getSelectionCells());if(null!=G&&0<G.length){var P=p.getModel();P=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",P.getStyle(G[0])||"",function(R){null!=R&&p.setCellStyle(mxUtils.trim(R),G)},null,null,400,220);this.editorUi.showDialog(P.container,420,300,!0,!0);P.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())},-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var G=p.getSelectionCell();if(null!=G&&p.getModel().isEdge(G)){var P=u.graph.selectionCellsHandler.getHandler(G);if(P instanceof mxEdgeHandler){var R=p.view.translate,c=p.view.scale,f=R.x;R=R.y;G=p.getModel().getParent(G);for(var l=p.getCellGeometry(G);p.getModel().isVertex(G)&&null!=l;)f+=l.x,R+=l.y,G=-p.getModel().getParent(G),l=p.getCellGeometry(G);f=Math.round(p.snap(p.popupMenuHandler.triggerX/c-f));c=Math.round(p.snap(p.popupMenuHandler.triggerY/c-R));P.addPointAt(P.state,f,c)}}});this.addAction("removeWaypoint",function(){var G=m.actions.get("removeWaypoint");null!=G.handler&&G.handler.removePoint(G.handler.state,G.index)});this.addAction("clearAnchors",function(){var G=p.getSelectionCells();if(null!=G){G=p.getEditableCells(p.addAllEdges(G));p.getModel().beginUpdate();try{for(var P=0;P<G.length;P++){var R=-G[P];p.getModel().isEdge(R)&&(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[R]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[R]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{p.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var G=p.getSelectionCells();if(null!=G){G=p.getEditableCells(p.addAllEdges(G));p.getModel().beginUpdate();try{for(var P=0;P<G.length;P++){var R=G[P];if(p.getModel().isEdge(R)){var c=p.getCellGeometry(R);-null!=c&&(c=c.clone(),c.points=null,c.x=0,c.y=0,c.offset=null,p.getModel().setGeometry(R,c))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+R");H=this.addAction("subscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");H=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");H=this.addAction("decreaseFontSize",+mxUtils.bind(this,function(){var G=p.getEditableCells(p.getSelectionCells());if(null!=G&&0<G.length){var P=p.getModel();P=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",P.getStyle(G[0])||"",function(Q){null!=Q&&p.setCellStyle(mxUtils.trim(Q),G)},null,null,400,220);this.editorUi.showDialog(P.container,420,300,!0,!0);P.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())},+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var G=p.getSelectionCell();if(null!=G&&p.getModel().isEdge(G)){var P=u.graph.selectionCellsHandler.getHandler(G);if(P instanceof mxEdgeHandler){var Q=p.view.translate,c=p.view.scale,f=Q.x;Q=Q.y;G=p.getModel().getParent(G);for(var l=p.getCellGeometry(G);p.getModel().isVertex(G)&&null!=l;)f+=l.x,Q+=l.y,G=+p.getModel().getParent(G),l=p.getCellGeometry(G);f=Math.round(p.snap(p.popupMenuHandler.triggerX/c-f));c=Math.round(p.snap(p.popupMenuHandler.triggerY/c-Q));P.addPointAt(P.state,f,c)}}});this.addAction("removeWaypoint",function(){var G=m.actions.get("removeWaypoint");null!=G.handler&&G.handler.removePoint(G.handler.state,G.index)});this.addAction("clearAnchors",function(){var G=p.getSelectionCells();if(null!=G){G=p.getEditableCells(p.addAllEdges(G));p.getModel().beginUpdate();try{for(var P=0;P<G.length;P++){var Q=+G[P];p.getModel().isEdge(Q)&&(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[Q]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[Q]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[Q]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[Q]))}}finally{p.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var G=p.getSelectionCells();if(null!=G){G=p.getEditableCells(p.addAllEdges(G));p.getModel().beginUpdate();try{for(var P=0;P<G.length;P++){var Q=G[P];if(p.getModel().isEdge(Q)){var c=p.getCellGeometry(Q);+null!=c&&(c=c.clone(),c.points=null,c.x=0,c.y=0,c.offset=null,p.getModel().setGeometry(Q,c))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+R");H=this.addAction("subscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");H=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");H=this.addAction("decreaseFontSize",mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var G=p.getCurrentCellStyle(p.getSelectionCell());G=mxUtils.getValue(G,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,G-1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift + (Numpad)");H=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var G=p.getCurrentCellStyle(p.getSelectionCell());G=mxUtils.getValue(G,mxConstants.STYLE_FONTSIZE,-mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,G+1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=mxResources.get("image")+" ("+mxResources.get("url")+"):",P=p.getView().getState(p.getSelectionCell()),R="",c=null;null!=P&&(R=P.style[mxConstants.STYLE_IMAGE]||R,c=P.style[mxConstants.STYLE_CLIP_PATH]||c);var f=p.cellEditor.saveSelection();-m.showImageDialog(G,R,function(l,t,z,C,F,N){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(l,t,z);else{var K=p.getSelectionCells();if(null!=l&&(0<l.length||0<K.length)){var J=null;p.getModel().beginUpdate();try{if(0==K.length){K=[p.insertVertex(p.getDefaultParent(),null,"",0,0,t,z,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var da=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=da.x;K[0].geometry.y=-da.y;null!=C&&g(K[0],C,F,N,p);J=K;p.fireEvent(new mxEventObject("cellsInserted","cells",J))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<l.length?l:null,K);var ea=p.getCurrentCellStyle(K[0]);"image"!=ea[mxConstants.STYLE_SHAPE]&&"label"!=ea[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==l.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==C&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=t&&null!=z)for(l=0;l<K.length;l++){var ca=K[l];if("0"!=p.getCurrentCellStyle(ca).expand){var W=-p.getModel().getGeometry(ca);null!=W&&(W=W.clone(),W.width=t,W.height=z,p.getModel().setGeometry(ca,W))}null!=C&&g(ca,C,F,N,p)}}finally{p.getModel().endUpdate()}null!=J&&(p.setSelectionCells(J),p.scrollCellToVisible(J[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,c)}}).isEnabled=B;this.addAction("crop...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G){var P=p.getCurrentCellStyle(G),R=P[mxConstants.STYLE_IMAGE],-c=P[mxConstants.STYLE_SHAPE];R&&"image"==c&&(P=new CropImageDialog(m,R,P[mxConstants.STYLE_CLIP_PATH],function(f,l,t){g(G,f,l,t,p)}),m.showDialog(P.container,300,390,!0,!0))}}).isEnabled=B;H=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",+mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,G+1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=mxResources.get("image")+" ("+mxResources.get("url")+"):",P=p.getView().getState(p.getSelectionCell()),Q="",c=null;null!=P&&(Q=P.style[mxConstants.STYLE_IMAGE]||Q,c=P.style[mxConstants.STYLE_CLIP_PATH]||c);var f=p.cellEditor.saveSelection();+m.showImageDialog(G,Q,function(l,t,z,C,F,N){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(l,t,z);else{var K=p.getSelectionCells();if(null!=l&&(0<l.length||0<K.length)){var J=null;p.getModel().beginUpdate();try{if(0==K.length){K=[p.insertVertex(p.getDefaultParent(),null,"",0,0,t,z,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var da=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=da.x;K[0].geometry.y=+da.y;null!=C&&g(K[0],C,F,N,p);J=K;p.fireEvent(new mxEventObject("cellsInserted","cells",J))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<l.length?l:null,K);var ea=p.getCurrentCellStyle(K[0]);"image"!=ea[mxConstants.STYLE_SHAPE]&&"label"!=ea[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==l.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==C&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=t&&null!=z)for(l=0;l<K.length;l++){var ca=K[l];if("0"!=p.getCurrentCellStyle(ca).expand){var X=+p.getModel().getGeometry(ca);null!=X&&(X=X.clone(),X.width=t,X.height=z,p.getModel().setGeometry(ca,X))}null!=C&&g(ca,C,F,N,p)}}finally{p.getModel().endUpdate()}null!=J&&(p.setSelectionCells(J),p.scrollCellToVisible(J[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,c)}}).isEnabled=B;this.addAction("crop...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G){var P=p.getCurrentCellStyle(G),Q=P[mxConstants.STYLE_IMAGE],+c=P[mxConstants.STYLE_SHAPE];Q&&"image"==c&&(P=new CropImageDialog(m,Q,P[mxConstants.STYLE_CLIP_PATH],function(f,l,t){g(G,f,l,t,p)}),m.showDialog(P.container,300,390,!0,!0))}}).isEnabled=B;H=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));H=this.addAction("format",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return m.isFormatPanelVisible()}));H=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G&&null!=G.geometry){var P=@@ -3079,25 +3079,25 @@ DrawioFile.prototype.synchronizeFile=function(b,e){if(this.savingFile)null!=e&&efunction(B){g&&(window.clearTimeout(m),this.sync.cleanup(b,e,B))}),u,p):this.updateFile(mxUtils.bind(this,function(){g&&(window.clearTimeout(m),null!=b&&b())}),u,p)}};DrawioFile.prototype.updateFile=function(b,e,g,m,u){null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",u,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(p){try{null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[p]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=p?this.mergeFile(p,b,e,m,u):this.reloadFile(b,e))}catch(B){null!=e&&e(B)}}),e))};-DrawioFile.prototype.mergeFile=function(b,e,g,m,u){try{var p=b.getShadowPages();if(null!=p&&0<p.length){var B=this.getShadowPages(),H=[this.ui.diffPages(null!=m?m:B,p)],T=this.ignorePatches(H);if(T)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",T),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var G=this.isModified()?this.ui.diffPages(B,-this.isRealtime()?this.ownPages:this.ui.pages):null,P=this.ui.patchPages(this.ui.clonePages(B),H[0]),R=this.ui.getHashValueForPages(P,{}),c=this.ui.getHashValueForPages(p,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",B,"pages",p,"patched",P,"patches",H,"changes",G,"checksum",R,"current",c,"valid",R==c,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",u);if(null!=R&&R!=c)this.checksumError(g,H,null,null,"mergeFile",-R,c,b.getCurrentRevisionId());else{this.setShadowPages(p);if(null!=this.sync){var f=this.sync.patchRealtime(H,DrawioFile.LAST_WRITE_WINS?G:null,null,u);null==f||mxUtils.isEmptyObject(f)||H.push(f)}this.patch(H,DrawioFile.LAST_WRITE_WINS?G:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=e&&e()}}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(z);try{var l=this.getCurrentUser(),t=null!=l?+DrawioFile.prototype.mergeFile=function(b,e,g,m,u){try{var p=b.getShadowPages();if(null!=p&&0<p.length){var B=this.getShadowPages(),H=[this.ui.diffPages(null!=m?m:B,p)],S=this.ignorePatches(H);if(S)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var G=this.isModified()?this.ui.diffPages(B,+this.isRealtime()?this.ownPages:this.ui.pages):null,P=this.ui.patchPages(this.ui.clonePages(B),H[0]),Q=this.ui.getHashValueForPages(P,{}),c=this.ui.getHashValueForPages(p,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",B,"pages",p,"patched",P,"patches",H,"changes",G,"checksum",Q,"current",c,"valid",Q==c,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",u);if(null!=Q&&Q!=c)this.checksumError(g,H,null,null,"mergeFile",+Q,c,b.getCurrentRevisionId());else{this.setShadowPages(p);if(null!=this.sync){var f=this.sync.patchRealtime(H,DrawioFile.LAST_WRITE_WINS?G:null,null,u);null==f||mxUtils.isEmptyObject(f)||H.push(f)}this.patch(H,DrawioFile.LAST_WRITE_WINS?G:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=e&&e()}}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(z);try{var l=this.getCurrentUser(),t=null!=l?l.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),t,z)}catch(C){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(z){null!=g&&g(z)}};DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),g=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var u=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(u=this.ui.anonymizeNode(u,!0));u.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,u,!0);g.appendChild(u)}return mxUtils.getPrettyXml(g)};DrawioFile.prototype.compressReportData=function(b,e,g){e=null!=e?e:1E4;null!=g&&null!=b&&b.length>g?b=b.substring(0,g)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};-DrawioFile.prototype.checksumError=function(b,e,g,m,u,p,B,H){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var T=this.getCurrentUser(),G=null!=T?T.id:"unknown",P=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",R=JSON.stringify(e).length,c=null;if(null!=e&&1E3>R){for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);c=JSON.stringify(e);c=null!=c&&1E3>c.length?Graph.compress(c):+DrawioFile.prototype.checksumError=function(b,e,g,m,u,p,B,H){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var S=this.getCurrentUser(),G=null!=S?S.id:"unknown",P=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",Q=JSON.stringify(e).length,c=null;if(null!=e&&1E3>Q){for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);c=JSON.stringify(e);c=null!=c&&1E3>c.length?Graph.compress(c):null}this.getLatestVersion(mxUtils.bind(this,function(f){try{var l=null!=c?"report":"error",t=this.ui.getHashValueForPages(f.getShadowPages()),z="unknown",C="unknown",F="unknown";try{var N=null!=f.initialData&&0<f.initialData.length?mxUtils.parseXml(f.initialData).documentElement:null;null!=N&&(null!=N.getAttribute("version")&&(z=N.getAttribute("version")),null!=N.getAttribute("agent")&&(C=N.getAttribute("agent")),null!=N.getAttribute("type")&&(F=N.getAttribute("type")))}catch(K){}EditorUi.logError("Checksum "+-l+" in "+u,null,this.getMode()+"."+P,"user_"+G+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+R+"-patches_"+e.length+(null!=c?"-json_"+c:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=B?"-current_"+B:"")+(null!=H?"-rev_"+this.ui.hashValue(H):"")+(null!=t?"-latest_"+t:"")+"-latestRev_"+this.ui.hashValue(f.getCurrentRevisionId())+("-latestVersion_"+z)+("-latestAgent_"+C)+("-latestType_"+F));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+P,action:u,label:"user_"+-G+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+R+"-patches_"+e.length+"-size_"+this.getSize()})}catch(K){}}),function(){})}catch(f){}};-DrawioFile.prototype.sendErrorReport=function(b,e,g,m){try{var u=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),B=this.getCurrentUser(),H=null!=B?this.ui.hashValue(B.id):"unknown",T=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",G=this.getTitle(),P=G.lastIndexOf(".");B="xml";0<P&&(B=G.substring(P));var R=null!=g?g.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+B+")\nUser="+H+T+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:-"")+(null!=g?"\n\nError: "+g.message:"")+"\n\nStack:\n"+R+"\n\nShadow:\n"+u+"\n\nData:\n"+p,m)}catch(c){}};+l+" in "+u,null,this.getMode()+"."+P,"user_"+G+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+Q+"-patches_"+e.length+(null!=c?"-json_"+c:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=B?"-current_"+B:"")+(null!=H?"-rev_"+this.ui.hashValue(H):"")+(null!=t?"-latest_"+t:"")+"-latestRev_"+this.ui.hashValue(f.getCurrentRevisionId())+("-latestVersion_"+z)+("-latestAgent_"+C)+("-latestType_"+F));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+P,action:u,label:"user_"++G+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+Q+"-patches_"+e.length+"-size_"+this.getSize()})}catch(K){}}),function(){})}catch(f){}};+DrawioFile.prototype.sendErrorReport=function(b,e,g,m){try{var u=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),B=this.getCurrentUser(),H=null!=B?this.ui.hashValue(B.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",G=this.getTitle(),P=G.lastIndexOf(".");B="xml";0<P&&(B=G.substring(P));var Q=null!=g?g.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()++":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+B+")\nUser="+H+S+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:+"")+(null!=g?"\n\nError: "+g.message:"")+"\n\nStack:\n"+Q+"\n\nShadow:\n"+u+"\n\nData:\n"+p,m)}catch(c){}};DrawioFile.prototype.reloadFile=function(b,e){try{this.stats.fileReloaded++;var g=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),m=this.ui.editor.graph,u=m.getSelectionCells(),p=m.getViewState(),B=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(H){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[g],"viewState",[p],"latestFile",H);null!=H?(this.ui.replaceFileData(H.getData(),-[g]),this.ui.restoreViewState(B,p,u),this.setDescriptor(H.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var T=this.ui.getCurrentFile();null!=T&&(T.stats=this.stats,T.patch([g]),T.fileChanged());this.ui.restoreViewState(B,p,u);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(H){null!=e&&e(H)}};+[g]),this.ui.restoreViewState(B,p,u),this.setDescriptor(H.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var S=this.ui.getCurrentFile();null!=S&&(S.stats=this.stats,S.patch([g]),S.fileChanged());this.ui.restoreViewState(B,p,u);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(H){null!=e&&e(H)}};DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var g=0;g<b.length&&e;g++)e=e&&mxUtils.isEmptyObject(b[g]);return e};-DrawioFile.prototype.patch=function(b,e,g,m){if(null!=b){var u=this.ui.editor.undoManager,p=u.history.slice(),B=u.indexOfNextAdd,H=this.ui.editor.graph;H.container.style.visibility="hidden";var T=this.changeListenerEnabled;this.changeListenerEnabled=g;var G=H.foldingEnabled,P=H.mathEnabled,R=H.cellRenderer.redraw;H.cellRenderer.redraw=function(C){C.view.graph.isEditing(C.cell)&&(C.view.graph.scrollCellToVisible(C.cell),C.view.graph.cellEditor.resize());R.apply(this,arguments)};H.model.beginUpdate();+DrawioFile.prototype.patch=function(b,e,g,m){if(null!=b){var u=this.ui.editor.undoManager,p=u.history.slice(),B=u.indexOfNextAdd,H=this.ui.editor.graph;H.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=g;var G=H.foldingEnabled,P=H.mathEnabled,Q=H.cellRenderer.redraw;H.cellRenderer.redraw=function(C){C.view.graph.isEditing(C.cell)&&(C.view.graph.scrollCellToVisible(C.cell),C.view.graph.cellEditor.resize());Q.apply(this,arguments)};H.model.beginUpdate();try{if(g){for(var c=this.ui.pages.slice(),f=this.ui.currentPage,l=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),t=0;t<l.length;t++){var z=mxUtils.indexOf(this.ui.pages,l[t]);0>z?this.ui.insertPage(l[t],Math.min(t,this.ui.pages.length)):this.ui.movePage(z,t)}for(t=0;t<c.length;t++)0>mxUtils.indexOf(l,c[t])&&this.ui.removePage(c[t]);0<=mxUtils.indexOf(this.ui.pages,f)&&this.ui.selectPage(f,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified());0==this.ui.pages.length&&-this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);H.checkDefaultParent()}finally{H.container.style.visibility="";H.model.endUpdate();H.cellRenderer.redraw=R;this.changeListenerEnabled=T;g||(u.history=p,u.indexOfNextAdd=B,u.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)P!=H.mathEnabled?(this.ui.editor.updateGraphComponents(),H.refresh()):(G!=H.foldingEnabled?+this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);H.checkDefaultParent()}finally{H.container.style.visibility="";H.model.endUpdate();H.cellRenderer.redraw=Q;this.changeListenerEnabled=S;g||(u.history=p,u.indexOfNextAdd=B,u.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)P!=H.mathEnabled?(this.ui.editor.updateGraphComponents(),H.refresh()):(G!=H.foldingEnabled?H.view.revalidate():H.view.validate(),H.sizeDidChange());null!=this.sync&&this.isRealtime()&&!m&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",g)}return b};DrawioFile.prototype.save=function(b,e,g,m,u,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",u,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!u&&this.invalidChecksum)if(null!=g)g({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=g)g({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(B){if(null!=g)g(B);else throw B;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};@@ -3148,7 +3148,7 @@ DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=newmxUtils.bind(this,function(e){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(e,mxUtils.bind(this,function(g){EditorUi.debug("DrawioFile.createSecret",[this],"secret",e,"token",g);b(e,g)}),mxUtils.bind(this,function(){b(e)})):b(e)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};DrawioFile.prototype.fileSaved=function(b,e,g,m,u,p,B){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;p=null!=p?p:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=g&&g()):this.sync.fileSaved(p,e,g,m,u,B)}catch(G){this.invalidChecksum=-this.inConflictState=!0;this.descriptorChanged();null!=m&&m(G);try{var H=this.getCurrentUser(),T=null!=H?H.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),T,G)}catch(P){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(G){this.descriptorChanged(),null!=m&&m(G)}};+this.inConflictState=!0;this.descriptorChanged();null!=m&&m(G);try{var H=this.getCurrentUser(),S=null!=H?H.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,G)}catch(P){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(G){this.descriptorChanged(),null!=m&&m(G)}};DrawioFile.prototype.autosave=function(b,e,g,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());var u=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var p=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==p&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",p,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var B=this.isAutosaveRevision();B&&(this.lastAutosaveRevision=(new Date).getTime());this.save(B,mxUtils.bind(this,function(H){this.autosaveCompleted();null!=g&&g(H)}),mxUtils.bind(this,function(H){null!=m&&m(H)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=g&&g(null)}catch(H){null!=m&&m(H)}}),u);this.autosaveThread=p;EditorUi.debug("DrawioFile.autosave",[this],"thread",p,"delay",b,"maxDelay",e,"actualDelay",u,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};@@ -3157,10 +3157,10 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(thisDrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,g){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,g,m,u,p,B){DrawioFile.call(this,b,e);this.title=g;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=u;this.desc=p;this.editable=B};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,e,g,m,u){this.saveAs(this.title,e,g,m,u)};LocalFile.prototype.saveAs=function(b,e,g,m,u){this.saveFile(b,!1,e,g,null,m,u)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?null!=e&&e({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};-LocalFile.prototype.saveFile=function(b,e,g,m,u,p,B){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;u||this.updateFileData();var H=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var T=this.getData(),G=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),P=mxUtils.bind(this,function(R){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=-!0;var c=mxUtils.bind(this,function(l){this.savingFile=!1;null!=m&&m({error:l})});this.saveDraft(T);this.fileHandle.createWritable().then(mxUtils.bind(this,function(l){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[t],"conflict",this.desc.lastModified!=t.lastModified);B||this.desc.lastModified==t.lastModified?l.write(H?this.ui.base64ToBlob(R,"image/png"):R).then(mxUtils.bind(this,function(){l.close().then(mxUtils.bind(this,-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(z){try{var C=this.desc;this.savingFile=!1;this.desc=z;this.fileSaved(T,C,G,c);this.removeDraft()}catch(F){c(F)}}),c)}),c)}),c):(this.inConflictState=!0,c())}),mxUtils.bind(this,function(t){this.invalidFileHandle=!0;c(t)}))}),c)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(R,b,H?"image/png":"text/xml",H);else if(R.length<MAX_REQUEST_SIZE){var f=b.lastIndexOf(".");f=0<f?b.substring(f+1):"xml";-(new mxXmlRequest(SAVE_URL,"format="+f+"&xml="+encodeURIComponent(R)+"&filename="+encodeURIComponent(b)+(H?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(R)}));G()}});H?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(R){P(R)}),m,this.ui.getCurrentFile()!=this?T:null,e.scale,e.border)):P(T)};+LocalFile.prototype.saveFile=function(b,e,g,m,u,p,B){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;u||this.updateFileData();var H=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),G=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),P=mxUtils.bind(this,function(Q){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=+!0;var c=mxUtils.bind(this,function(l){this.savingFile=!1;null!=m&&m({error:l})});this.saveDraft(S);this.fileHandle.createWritable().then(mxUtils.bind(this,function(l){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[t],"conflict",this.desc.lastModified!=t.lastModified);B||this.desc.lastModified==t.lastModified?l.write(H?this.ui.base64ToBlob(Q,"image/png"):Q).then(mxUtils.bind(this,function(){l.close().then(mxUtils.bind(this,+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(z){try{var C=this.desc;this.savingFile=!1;this.desc=z;this.fileSaved(S,C,G,c);this.removeDraft()}catch(F){c(F)}}),c)}),c)}),c):(this.inConflictState=!0,c())}),mxUtils.bind(this,function(t){this.invalidFileHandle=!0;c(t)}))}),c)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(Q,b,H?"image/png":"text/xml",H);else if(Q.length<MAX_REQUEST_SIZE){var f=b.lastIndexOf(".");f=0<f?b.substring(f+1):"xml";+(new mxXmlRequest(SAVE_URL,"format="+f+"&xml="+encodeURIComponent(Q)+"&filename="+encodeURIComponent(b)+(H?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Q)}));G()}});H?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(Q){P(Q)}),m,this.ui.getCurrentFile()!=this?S:null,e.scale,e.border)):P(S)};LocalFile.prototype.rename=function(b,e,g){this.title=b;this.descriptorChanged();null!=e&&e()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";@@ -3241,34 +3241,34 @@ type:"bool",defVal:!1,isVisible:function(k,A){A=A.editorUi.editor.graph.model;redefVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(k,A){var I=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||A.editorUi.editor.graph.isSwimlane(k.vertices[0])||null==I||I==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(k,A){return 0<k.vertices.length&&A.editorUi.editor.graph.isContainer(k.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## An optional data object can be specified to define the metadata for the connector.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto, width or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,[email protected],default,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';-Editor.createRoughCanvas=function(k){var A=rough.canvas({getContext:function(){return k}});A.draw=function(I){var U=I.sets||[];I=I.options||this.getDefaultOptions();for(var O=0;O<U.length;O++){var S=U[O];switch(S.type){case "path":null!=I.stroke&&this._drawToContext(k,S,I);break;case "fillPath":this._drawToContext(k,S,I);break;case "fillSketch":this.fillSketch(k,S,I)}}};A.fillSketch=function(I,U,O){var S=k.state.strokeColor,X=k.state.strokeWidth,aa=k.state.strokeAlpha,ja=k.state.dashed,pa=O.fillWeight;-0>pa&&(pa=O.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(O.fill||"");k.setStrokeWidth(pa);k.setDashed(!1);this._drawToContext(I,U,O);k.setDashed(ja);k.setStrokeWidth(X);k.setStrokeColor(S);k.setStrokeAlpha(aa)};A._drawToContext=function(I,U,O){I.begin();for(var S=0;S<U.ops.length;S++){var X=U.ops[S],aa=X.data;switch(X.op){case "move":I.moveTo(aa[0],aa[1]);break;case "bcurveTo":I.curveTo(aa[0],aa[1],aa[2],aa[3],aa[4],aa[5]);break;case "lineTo":I.lineTo(aa[0],aa[1])}}I.end();-"fillPath"===U.type&&O.filled?I.fill():I.stroke()};return A};(function(){function k(S,X,aa){this.canvas=S;this.rc=X;this.shape=aa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;+Editor.createRoughCanvas=function(k){var A=rough.canvas({getContext:function(){return k}});A.draw=function(I){var T=I.sets||[];I=I.options||this.getDefaultOptions();for(var O=0;O<T.length;O++){var U=T[O];switch(U.type){case "path":null!=I.stroke&&this._drawToContext(k,U,I);break;case "fillPath":this._drawToContext(k,U,I);break;case "fillSketch":this.fillSketch(k,U,I)}}};A.fillSketch=function(I,T,O){var U=k.state.strokeColor,V=k.state.strokeWidth,ba=k.state.strokeAlpha,fa=k.state.dashed,pa=O.fillWeight;+0>pa&&(pa=O.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(O.fill||"");k.setStrokeWidth(pa);k.setDashed(!1);this._drawToContext(I,T,O);k.setDashed(fa);k.setStrokeWidth(V);k.setStrokeColor(U);k.setStrokeAlpha(ba)};A._drawToContext=function(I,T,O){I.begin();for(var U=0;U<T.ops.length;U++){var V=T.ops[U],ba=V.data;switch(V.op){case "move":I.moveTo(ba[0],ba[1]);break;case "bcurveTo":I.curveTo(ba[0],ba[1],ba[2],ba[3],ba[4],ba[5]);break;case "lineTo":I.lineTo(ba[0],ba[1])}}I.end();+"fillPath"===T.type&&O.filled?I.fill():I.stroke()};return A};(function(){function k(U,V,ba){this.canvas=U;this.rc=V;this.shape=ba;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,k.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,k.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,k.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,k.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,k.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,k.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,k.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,k.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,k.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,-k.prototype.fillAndStroke);this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(S,X){var aa=1;if(null!=this.shape.state){var ja=this.shape.state.cell.id;if(null!=ja)for(var pa=0;pa<ja.length;pa++)aa=(aa<<5)-aa+ja.charCodeAt(pa)<<0}aa={strokeWidth:this.canvas.state.strokeWidth,seed:aa,preserveVertices:!0};ja=this.rc.getDefaultOptions();aa.stroke=S?this.canvas.state.strokeColor===-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;S=null;(aa.filled=X)?(aa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,S=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):aa.fill="";aa.bowing=mxUtils.getValue(this.shape.style,"bowing",ja.bowing);aa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ja.hachureAngle);aa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ja.curveFitting);-aa.roughness=mxUtils.getValue(this.shape.style,"jiggle",ja.roughness);aa.simplification=mxUtils.getValue(this.shape.style,"simplification",ja.simplification);aa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ja.disableMultiStroke);aa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ja.disableMultiStrokeFill);X=mxUtils.getValue(this.shape.style,"hachureGap",-1);aa.hachureGap="auto"==X?-1:X;aa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",-X);aa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",X);aa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",X);X=mxUtils.getValue(this.shape.style,"fillWeight",-1);aa.fillWeight="auto"==X?-1:X;X=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==X&&(X="auto");"auto"==X&&(X=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&X.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&X.push(mxUtils.hex2rgb(Editor.darkColor)),X=-null!=aa.fill&&(null!=S||0<=mxUtils.indexOf(X,mxUtils.hex2rgb(aa.fill)))?"solid":ja.fillStyle);aa.fillStyle=X;return aa};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var S=2;S<arguments.length;S+=2)this.lastX=arguments[S-1],this.lastY=arguments[S],-this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};k.prototype.lineTo=function(S,X){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,S,X),this.lastX=S,this.lastY=X)};k.prototype.moveTo=function(S,X){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,S,X),this.lastX=S,this.lastY=X,this.firstX=S,this.firstY=X)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,-arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(S,X,aa,ja){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,S,X,aa,ja),this.lastX=aa,this.lastY=ja)};k.prototype.curveTo=function(S,X,aa,ja,pa,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,S,X,aa,ja,pa,sa),this.lastX=pa,this.lastY=sa)};k.prototype.arcTo=function(S,X,aa,ja,pa,sa,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);-else{var wa=mxUtils.arcToCurves(this.lastX,this.lastY,S,X,aa,ja,pa,sa,qa);if(null!=wa)for(var Ba=0;Ba<wa.length;Ba+=6)this.curveTo(wa[Ba],wa[Ba+1],wa[Ba+2],wa[Ba+3],wa[Ba+4],wa[Ba+5]);this.lastX=sa;this.lastY=qa}};k.prototype.rect=function(S,X,aa,ja){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(S,X,aa,ja,this.getStyle(!0,!0)))};k.prototype.ellipse=function(S,X,aa,ja){this.passThrough?this.originalEllipse.apply(this.canvas,-arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(S+aa/2,X+ja/2,aa,ja,this.getStyle(!0,!0)))};k.prototype.roundrect=function(S,X,aa,ja,pa,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(S+pa,X),this.lineTo(S+aa-pa,X),this.quadTo(S+aa,X,S+aa,X+sa),this.lineTo(S+aa,X+ja-sa),this.quadTo(S+aa,X+ja,S+aa-pa,X+ja),this.lineTo(S+pa,X+ja),this.quadTo(S,X+ja,S,X+ja-sa),this.lineTo(S,X+sa),this.quadTo(S,X,S+pa,X))};k.prototype.drawPath=function(S){if(0<-this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),S)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var X in S)this.nextShape.options[X]=S[X];S.stroke!=mxConstants.NONE&&null!=S.stroke||delete this.nextShape.options.stroke;S.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,+k.prototype.fillAndStroke);this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(U,V){var ba=1;if(null!=this.shape.state){var fa=this.shape.state.cell.id;if(null!=fa)for(var pa=0;pa<fa.length;pa++)ba=(ba<<5)-ba+fa.charCodeAt(pa)<<0}ba={strokeWidth:this.canvas.state.strokeWidth,seed:ba,preserveVertices:!0};fa=this.rc.getDefaultOptions();ba.stroke=U?this.canvas.state.strokeColor===+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;U=null;(ba.filled=V)?(ba.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,U=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):ba.fill="";ba.bowing=mxUtils.getValue(this.shape.style,"bowing",fa.bowing);ba.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",fa.hachureAngle);ba.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",fa.curveFitting);+ba.roughness=mxUtils.getValue(this.shape.style,"jiggle",fa.roughness);ba.simplification=mxUtils.getValue(this.shape.style,"simplification",fa.simplification);ba.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",fa.disableMultiStroke);ba.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",fa.disableMultiStrokeFill);V=mxUtils.getValue(this.shape.style,"hachureGap",-1);ba.hachureGap="auto"==V?-1:V;ba.dashGap=mxUtils.getValue(this.shape.style,"dashGap",+V);ba.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",V);ba.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",V);V=mxUtils.getValue(this.shape.style,"fillWeight",-1);ba.fillWeight="auto"==V?-1:V;V=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==V&&(V="auto");"auto"==V&&(V=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&V.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&V.push(mxUtils.hex2rgb(Editor.darkColor)),V=+null!=ba.fill&&(null!=U||0<=mxUtils.indexOf(V,mxUtils.hex2rgb(ba.fill)))?"solid":fa.fillStyle);ba.fillStyle=V;return ba};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var U=2;U<arguments.length;U+=2)this.lastX=arguments[U-1],this.lastY=arguments[U],+this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};k.prototype.lineTo=function(U,V){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,U,V),this.lastX=U,this.lastY=V)};k.prototype.moveTo=function(U,V){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,U,V),this.lastX=U,this.lastY=V,this.firstX=U,this.firstY=V)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,+arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(U,V,ba,fa){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,U,V,ba,fa),this.lastX=ba,this.lastY=fa)};k.prototype.curveTo=function(U,V,ba,fa,pa,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,U,V,ba,fa,pa,sa),this.lastX=pa,this.lastY=sa)};k.prototype.arcTo=function(U,V,ba,fa,pa,sa,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);+else{var wa=mxUtils.arcToCurves(this.lastX,this.lastY,U,V,ba,fa,pa,sa,qa);if(null!=wa)for(var Aa=0;Aa<wa.length;Aa+=6)this.curveTo(wa[Aa],wa[Aa+1],wa[Aa+2],wa[Aa+3],wa[Aa+4],wa[Aa+5]);this.lastX=sa;this.lastY=qa}};k.prototype.rect=function(U,V,ba,fa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(U,V,ba,fa,this.getStyle(!0,!0)))};k.prototype.ellipse=function(U,V,ba,fa){this.passThrough?this.originalEllipse.apply(this.canvas,+arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(U+ba/2,V+fa/2,ba,fa,this.getStyle(!0,!0)))};k.prototype.roundrect=function(U,V,ba,fa,pa,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(U+pa,V),this.lineTo(U+ba-pa,V),this.quadTo(U+ba,V,U+ba,V+sa),this.lineTo(U+ba,V+fa-sa),this.quadTo(U+ba,V+fa,U+ba-pa,V+fa),this.lineTo(U+pa,V+fa),this.quadTo(U,V+fa,U,V+fa-sa),this.lineTo(U,V+sa),this.quadTo(U,V,U+pa,V))};k.prototype.drawPath=function(U){if(0<+this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),U)}catch(ba){}this.passThrough=!1}else if(null!=this.nextShape){for(var V in U)this.nextShape.options[V]=U[V];U.stroke!=mxConstants.NONE&&null!=U.stroke||delete this.nextShape.options.stroke;U.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};k.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;-this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(S){return new k(S,Editor.createRoughCanvas(S),this)};var A=mxShape.prototype.createHandJiggle;-mxShape.prototype.createHandJiggle=function(S){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?A.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(S):this.createRoughCanvas(S)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(S,X,aa,ja,pa){null!=S.handJiggle&&S.handJiggle.passThrough||I.apply(this,arguments)};var U=mxShape.prototype.paint;mxShape.prototype.paint=-function(S){var X=S.addTolerance,aa=!0;null!=this.style&&(aa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=S.handJiggle&&S.handJiggle.constructor==k&&!this.outline){S.save();var ja=this.fill,pa=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,qa=S.setStrokeColor;S.setStrokeColor=function(){};var wa=S.setFillColor;S.setFillColor=function(){};aa||null==ja||(this.configurePointerEvents=function(){});S.handJiggle.passThrough=!0;U.apply(this,-arguments);S.handJiggle.passThrough=!1;S.setFillColor=wa;S.setStrokeColor=qa;this.configurePointerEvents=sa;this.stroke=pa;this.fill=ja;S.restore();aa&&null!=ja&&(S.addTolerance=function(){})}U.apply(this,arguments);S.addTolerance=X};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(S,X,aa,ja,pa,sa){null!=S.handJiggle&&S.handJiggle.constructor==k?(S.handJiggle.passThrough=!0,O.apply(this,arguments),S.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=-function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,A,I){if(null!=k&&"undefined"!==typeof pako){var U=k.ownerDocument.getElementsByTagName("div"),O=[];if(null!=U&&0<U.length)for(var S=0;S<U.length;S++)if("mxgraph"==U[S].getAttribute("class")){O.push(U[S]);-break}0<O.length&&(U=O[0].getAttribute("data-mxgraph"),null!=U?(O=JSON.parse(U),null!=O&&null!=O.xml&&(k=mxUtils.parseXml(O.xml),k=k.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&(U=mxUtils.getTextContent(O[0]),U=Graph.decompress(U,null,I),0<U.length&&(k=mxUtils.parseXml(U),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(U=k.getAttribute("content"),null!=U&&"<"!=U.charAt(0)&&"%"!=U.charAt(0)&&(U=unescape(window.atob?atob(U):Base64.decode(cont,U))),null!=U&&"%"==U.charAt(0)&&-(U=decodeURIComponent(U)),null!=U&&0<U.length)k=mxUtils.parseXml(U).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||A||(O=null,"diagram"==k.nodeName?O=k:"mxfile"==k.nodeName&&(U=k.getElementsByTagName("diagram"),0<U.length&&(O=U[Math.max(0,Math.min(U.length-1,urlParams.page||0))])),null!=O&&(k=Editor.parseDiagramNode(O,I)));null==k||"mxGraphModel"==k.nodeName||A&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,A,I){Editor.validateDiagramNode(k);-var U=mxUtils.trim(mxUtils.getTextContent(k)),O=null;0<U.length?(A=Graph.decompress(U,null,A),null!=A&&0<A.length&&(O=mxUtils.parseXml(A).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(O=k[0],I&&(O=Editor.parseDiagramNode(O,A,!1)),A=mxUtils.createXmlDocument(),A.appendChild(A.importNode(O,!0)),O=A.documentElement));return O};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var A=mxUtils.getNodeValue(k),I=null;0<A.length?I=Graph.decompress(A):(k=k.getElementsByTagName("mxGraphModel"),-null!=k&&0<k.length&&(I=mxUtils.getXml(k[0])));return I};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var A=new mxCodec,I=new mxGraphModel;k.appendChild(A.encode(I))}return k};Editor.extractGraphModelFromPdf=function(k){var A=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var I=k.indexOf("EmbeddedFile");if(-1<I){var U=k.indexOf("stream",-I)+9;if(0<k.substring(I,U).indexOf("application#2Fvnd.jgraph.mxfile")){var O=k.indexOf("endstream",U-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(U,O)),{to:"string"})}}for(I=k.indexOf("/ObjStm");0<I;){U=k.indexOf("stream",I)+9;O=k.indexOf("endstream",U-1);U=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(U,O)),{to:"string"});O=U.indexOf("/Subject <");if(0<O){I=U.substring(O+14,U.indexOf(">",O));if(null!=I){A=I;I=[];for(U=0;U<A.length;U+=2)O=A.substr(U,2),"00"!=O&&I.push(String.fromCharCode(parseInt(O,-16)));A=I.join("")}break}I=k.indexOf("/ObjStm",I+1)}}if(null==A&&"%PDF-1.4"==k.substring(0,8)){I="";O=U=0;for(var S=[],X=null;O<k.length;){var aa=k.charCodeAt(O);O+=1;10!=aa&&(I+=String.fromCharCode(aa));aa=="/Subject (%3Cmxfile".charCodeAt(U)?U++:U=0;if(19==U){var ja=k.indexOf("%3C%2Fmxfile%3E",O)+15;O-=9;if(ja>O){A=k.substring(O,ja);break}}10==aa&&("endobj"==I?X=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(X=[],S[I.split(" ")[0]]=X):null!=X&&X.push(I),I="")}}null==A&&null!=-S&&(A=Editor.extractGraphModelFromXref(S));null!=A&&(A=decodeURIComponent(A.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return A};Editor.extractGraphModelFromXref=function(k){var A=k.trailer,I=null;null!=A&&(A=/.* \/Info (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(A=k[A[1]],null!=A&&(A=/.* \/Subject (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(k=k[A[1]],null!=k&&(k=k.join("\n"),I=k.substring(1,k.length-1))))));return I};Editor.extractParserError=function(k,A){var I=null;k=+this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(U){return new k(U,Editor.createRoughCanvas(U),this)};var A=mxShape.prototype.createHandJiggle;+mxShape.prototype.createHandJiggle=function(U){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?A.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(U):this.createRoughCanvas(U)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(U,V,ba,fa,pa){null!=U.handJiggle&&U.handJiggle.passThrough||I.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=+function(U){var V=U.addTolerance,ba=!0;null!=this.style&&(ba="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=U.handJiggle&&U.handJiggle.constructor==k&&!this.outline){U.save();var fa=this.fill,pa=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,qa=U.setStrokeColor;U.setStrokeColor=function(){};var wa=U.setFillColor;U.setFillColor=function(){};ba||null==fa||(this.configurePointerEvents=function(){});U.handJiggle.passThrough=!0;T.apply(this,+arguments);U.handJiggle.passThrough=!1;U.setFillColor=wa;U.setStrokeColor=qa;this.configurePointerEvents=sa;this.stroke=pa;this.fill=fa;U.restore();ba&&null!=fa&&(U.addTolerance=function(){})}T.apply(this,arguments);U.addTolerance=V};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(U,V,ba,fa,pa,sa){null!=U.handJiggle&&U.handJiggle.constructor==k?(U.handJiggle.passThrough=!0,O.apply(this,arguments),U.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=+function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,A,I){if(null!=k&&"undefined"!==typeof pako){var T=k.ownerDocument.getElementsByTagName("div"),O=[];if(null!=T&&0<T.length)for(var U=0;U<T.length;U++)if("mxgraph"==T[U].getAttribute("class")){O.push(T[U]);+break}0<O.length&&(T=O[0].getAttribute("data-mxgraph"),null!=T?(O=JSON.parse(T),null!=O&&null!=O.xml&&(k=mxUtils.parseXml(O.xml),k=k.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&(T=mxUtils.getTextContent(O[0]),T=Graph.decompress(T,null,I),0<T.length&&(k=mxUtils.parseXml(T),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(T=k.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&+(T=decodeURIComponent(T)),null!=T&&0<T.length)k=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||A||(O=null,"diagram"==k.nodeName?O=k:"mxfile"==k.nodeName&&(T=k.getElementsByTagName("diagram"),0<T.length&&(O=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=O&&(k=Editor.parseDiagramNode(O,I)));null==k||"mxGraphModel"==k.nodeName||A&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,A,I){Editor.validateDiagramNode(k);+var T=mxUtils.trim(mxUtils.getTextContent(k)),O=null;0<T.length?(A=Graph.decompress(T,null,A),null!=A&&0<A.length&&(O=mxUtils.parseXml(A).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(O=k[0],I&&(O=Editor.parseDiagramNode(O,A,!1)),A=mxUtils.createXmlDocument(),A.appendChild(A.importNode(O,!0)),O=A.documentElement));return O};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var A=mxUtils.getNodeValue(k),I=null;0<A.length?I=Graph.decompress(A):(k=k.getElementsByTagName("mxGraphModel"),+null!=k&&0<k.length&&(I=mxUtils.getXml(k[0])));return I};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var A=new mxCodec,I=new mxGraphModel;k.appendChild(A.encode(I))}return k};Editor.extractGraphModelFromPdf=function(k){var A=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var I=k.indexOf("EmbeddedFile");if(-1<I){var T=k.indexOf("stream",+I)+9;if(0<k.substring(I,T).indexOf("application#2Fvnd.jgraph.mxfile")){var O=k.indexOf("endstream",T-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(T,O)),{to:"string"})}}for(I=k.indexOf("/ObjStm");0<I;){T=k.indexOf("stream",I)+9;O=k.indexOf("endstream",T-1);T=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(T,O)),{to:"string"});O=T.indexOf("/Subject <");if(0<O){I=T.substring(O+14,T.indexOf(">",O));if(null!=I){A=I;I=[];for(T=0;T<A.length;T+=2)O=A.substr(T,2),"00"!=O&&I.push(String.fromCharCode(parseInt(O,+16)));A=I.join("")}break}I=k.indexOf("/ObjStm",I+1)}}if(null==A&&"%PDF-1.4"==k.substring(0,8)){I="";O=T=0;for(var U=[],V=null;O<k.length;){var ba=k.charCodeAt(O);O+=1;10!=ba&&(I+=String.fromCharCode(ba));ba=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var fa=k.indexOf("%3C%2Fmxfile%3E",O)+15;O-=9;if(fa>O){A=k.substring(O,fa);break}}10==ba&&("endobj"==I?V=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(V=[],U[I.split(" ")[0]]=V):null!=V&&V.push(I),I="")}}null==A&&null!=+U&&(A=Editor.extractGraphModelFromXref(U));null!=A&&(A=decodeURIComponent(A.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return A};Editor.extractGraphModelFromXref=function(k){var A=k.trailer,I=null;null!=A&&(A=/.* \/Info (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(A=k[A[1]],null!=A&&(A=/.* \/Subject (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(k=k[A[1]],null!=k&&(k=k.join("\n"),I=k.substring(1,k.length-1))))));return I};Editor.extractParserError=function(k,A){var I=null;k=null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(I=A||mxResources.get("invalidChars"),A=k[0].getElementsByTagName("div"),0<A.length&&(I=mxUtils.getTextContent(A[0])));return null!=I?mxUtils.trim(I):I};Editor.addRetryToError=function(k,A){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=A))};Editor.mermaidToDrawio=function(k,A,I){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,A,I)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=k.version;k.debug&&(urlParams.test="1");null!=k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);null!=k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);null!=k.selectParentLayer&&(Graph.selectParentLayer=k.selectParentLayer);null!=k.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=k.autosaveDelay);null!=k.templateFile&&(EditorUi.templateFile=k.templateFile);null!=k.styles&&(Array.isArray(k.styles)?Editor.styles=k.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=k.globalVars&&(Editor.globalVars=k.globalVars);null!=k.compressXml&&(Editor.defaultCompressed=k.compressXml,Editor.compressXml=k.compressXml);null!=k.includeDiagram&&@@ -3284,52 +3284,52 @@ k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight)(EditorUi.prototype.maxImageBytes=k.maxImageBytes);null!=k.maxImageSize&&(EditorUi.prototype.maxImageSize=k.maxImageSize);null!=k.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=k.shareCursorPosition);null!=k.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=k.showRemoteCursors);null!=k.restrictExport&&(DrawioFile.RESTRICT_EXPORT=k.restrictExport);null!=k.replaceSvgDataUris&&(Editor.replaceSvgDataUris=k.replaceSvgDataUris);null!=k.foreignObjectImages&&(Editor.foreignObjectImages=k.foreignObjectImages);null!=k.shadowColor&&(mxConstants.SHADOW_COLOR=k.shadowColor);null!=k.shadowOpacity&&(mxConstants.SHADOW_OPACITY=k.shadowOpacity);null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&(Editor.gptApiKey=k.gptApiKey);null!=k.gptModel&&(Editor.gptModel=k.gptModel);null!=k.gptUrl&&(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var A=document.getElementsByTagName("script")[0];if(null!=A&&null!=A.parentNode){var I=document.createElement("style");I.setAttribute("type","text/css");I.appendChild(document.createTextNode(k));-A.parentNode.insertBefore(I,A);k=k.split("url(");for(I=1;I<k.length;I++){var U=k[I].indexOf(")");U=Editor.trimCssUrl(k[I].substring(0,U));var O=document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",U);O.setAttribute("as","font");O.setAttribute("crossorigin","");A.parentNode.insertBefore(O,A)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";+A.parentNode.insertBefore(I,A);k=k.split("url(");for(I=1;I<k.length;I++){var T=k[I].indexOf(")");T=Editor.trimCssUrl(k[I].substring(0,T));var O=document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",T);O.setAttribute("as","font");O.setAttribute("crossorigin","");A.parentNode.insertBefore(O,A)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;for(var A=[],I=0;I<k;I++)A.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return A.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(k){k=null!=k&&"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var A=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(A)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[k],"cause",[A]),Error(mxResources.get("notADiagramFile")+-" ("+A+")");if("mxGraphModel"==k.nodeName){A=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=A&&""!=A)A!=this.graph.currentStyle&&(I=null!=this.graph.themes?this.graph.themes[A]:mxUtils.load(STYLE_PATH+"/"+A+".xml").getDocumentElement(),null!=I&&(U=new mxCodec(I.ownerDocument),U.decode(I,this.graph.getStylesheet())));else{var I=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=I){var U=new mxCodec(I.ownerDocument);-U.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=A;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));A=k.getAttribute("backgroundImage");null!=A?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(A)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==+" ("+A+")");if("mxGraphModel"==k.nodeName){A=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=A&&""!=A)A!=this.graph.currentStyle&&(I=null!=this.graph.themes?this.graph.themes[A]:mxUtils.load(STYLE_PATH+"/"+A+".xml").getDocumentElement(),null!=I&&(T=new mxCodec(I.ownerDocument),T.decode(I,this.graph.getStylesheet())));else{var I=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=I){var T=new mxCodec(I.ownerDocument);+T.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=A;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));A=k.getAttribute("backgroundImage");null!=A?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(A)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==k.getAttribute("shadow"),!1);if(A=k.getAttribute("extFonts"))try{for(A=A.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),I=0;I<A.length;I++)this.graph.addExtFont(A[I].name,A[I].url)}catch(O){console.log("ExtFonts format error: "+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;-Editor.prototype.getGraphXml=function(k,A){k=null!=k?k:!0;var I=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",this.graph.currentStyle);var U=this.graph.getBackgroundImageObject(this.graph.backgroundImage,A);null!=U&&I.setAttribute("backgroundImage",JSON.stringify(U));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?I.setAttribute("adaptiveColors",-this.graph.adaptiveColors):I.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(U=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),I.setAttribute("extFonts",U.join("|")));return I};Editor.prototype.isDataSvg=function(k){try{var A=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=A&&(null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(cont,A))),null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A)),-null!=A&&0<A.length)){var I=mxUtils.parseXml(A).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(U){}return!1};Editor.prototype.extractGraphModel=function(k,A,I){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&-this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,A){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var I=function(){U=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());-else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var U=null;Editor.doMathJaxRender=function(X){try{null==U?(MathJax.typesetClear([X]),MathJax.typeset([X]),I()):U!=X&&Editor.mathJaxQueue.push(X)}catch(aa){MathJax.typesetClear([X]),null!=aa.retry?(U=X,aa.retry.then(function(){MathJax.typesetPromise([X]).then(I)["catch"](function(ja){console.log("Error in MathJax.typesetPromise: "+ja.toString());I()})})["catch"](function(ja){console.log("Error in MathJax.retry: "+-ja.toString());I()})):null!=window.console&&console.log("Error in MathJax.typeset: "+aa.toString())}};window.MathJax=null!=A?A:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var X=0;X<Editor.mathJaxQueue.length;X++)Editor.doMathJaxRender(Editor.mathJaxQueue[X])}}};Editor.MathJaxRender=function(X){"undefined"!==typeof MathJax&&-"function"===typeof MathJax.typeset?Editor.doMathJaxRender(X):Editor.mathJaxQueue.push(X)};Editor.onMathJaxDone=function(){};var O=Editor.prototype.init;Editor.prototype.init=function(){O.apply(this,arguments);var X=mxUtils.bind(this,function(aa,ja){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,X);this.graph.addListener(mxEvent.REFRESH,X)};A=document.getElementsByTagName("script");if(null!=A&&0<A.length){var S=-document.createElement("script");S.setAttribute("type","text/javascript");S.setAttribute("src",k);A[0].parentNode.appendChild(S)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var A="",I=[""],U=0,O=!0,S;k=$jscomp.makeIterator(k);for(S=k.next();!S.done;S=k.next())S=S.value,'"'===S?(O&&S===A&&(I[U]+=S),O=!O):","===S&&O?S=I[++U]="":I[U]+=S,A=S;return I}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&+Editor.prototype.getGraphXml=function(k,A){k=null!=k?k:!0;var I=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,A);null!=T&&I.setAttribute("backgroundImage",JSON.stringify(T));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?I.setAttribute("adaptiveColors",+this.graph.adaptiveColors):I.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),I.setAttribute("extFonts",T.join("|")));return I};Editor.prototype.isDataSvg=function(k){try{var A=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=A&&(null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(cont,A))),null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A)),+null!=A&&0<A.length)){var I=mxUtils.parseXml(A).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(k,A,I){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&+this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,A){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var I=function(){T=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());+else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var T=null;Editor.doMathJaxRender=function(V){try{null==T?(MathJax.typesetClear([V]),MathJax.typeset([V]),I()):T!=V&&Editor.mathJaxQueue.push(V)}catch(ba){MathJax.typesetClear([V]),null!=ba.retry?(T=V,ba.retry.then(function(){MathJax.typesetPromise([V]).then(I)["catch"](function(fa){console.log("Error in MathJax.typesetPromise: "+fa.toString());I()})})["catch"](function(fa){console.log("Error in MathJax.retry: "++fa.toString());I()})):null!=window.console&&console.log("Error in MathJax.typeset: "+ba.toString())}};window.MathJax=null!=A?A:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var V=0;V<Editor.mathJaxQueue.length;V++)Editor.doMathJaxRender(Editor.mathJaxQueue[V])}}};Editor.MathJaxRender=function(V){"undefined"!==typeof MathJax&&+"function"===typeof MathJax.typeset?Editor.doMathJaxRender(V):Editor.mathJaxQueue.push(V)};Editor.onMathJaxDone=function(){};var O=Editor.prototype.init;Editor.prototype.init=function(){O.apply(this,arguments);var V=mxUtils.bind(this,function(ba,fa){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,V);this.graph.addListener(mxEvent.REFRESH,V)};A=document.getElementsByTagName("script");if(null!=A&&0<A.length){var U=+document.createElement("script");U.setAttribute("type","text/javascript");U.setAttribute("src",k);A[0].parentNode.appendChild(U)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var A="",I=[""],T=0,O=!0,U;k=$jscomp.makeIterator(k);for(U=k.next();!U.done;U=k.next())U=U.value,'"'===U?(O&&U===A&&(I[T]+=U),O=!O):","===U&&O?U=I[++T]="":I[T]+=U,A=U;return I}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var A=EditorUi.isVisioFilename(k);A=/\.png$/i.test(k)||/\.pdf$/i.test(k)||A;var I="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+I+(A?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));-return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var A=k.convert,I=this;k.convert=function(U){null!=U&&navigator.onLine&&("http://"!=U.substring(0,7)&&"https://"!=U.substring(0,8)||U.substring(0,k.baseUrl.length)==k.baseUrl||I.crossOriginImages&&-I.isCorsEnabledForUrl(U)?"chrome-extension://"!=U.substring(0,19)&&(U=A.apply(this,arguments)):U=PROXY_URL+"?url="+encodeURIComponent(U));return U};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,A,I,U,O){try{var S=!0,X=window.setTimeout(mxUtils.bind(this,function(){S=!1;A(k)}),this.timeout),aa=mxUtils.bind(this,function(){null!=U?this.convertImageToDataUri(k,A,I,U,!0):A(k)});-if(/(\.svg)$/i.test(k)&&!O)mxUtils.get(k,mxUtils.bind(this,function(pa){window.clearTimeout(X);S&&(200>pa.getStatus()||299<pa.getStatus()?aa():A(Editor.createSvgDataUri(pa.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(X);S&&aa()}));else{var ja=new Image;this.crossOriginImages&&(ja.crossOrigin="anonymous");ja.onload=function(){window.clearTimeout(X);if(S)try{U=null!=U&&O?U:1;var pa=document.createElement("canvas"),sa=pa.getContext("2d");sa.scale(U,U);pa.height=ja.height*U;pa.width=-ja.width*U;sa.drawImage(ja,0,0);A(pa.toDataURL())}catch(qa){A(k)}};ja.onerror=function(){window.clearTimeout(X);S&&(null!=I?I():A(k))};ja.src=k}}catch(pa){null!=I?I():A(k)}};Editor.prototype.convertImages=function(k,A,I,U){function O(){0<S.length?S.shift()():A(k)}null==U&&(U=this.createImageUrlConverter());var S=[],X=I||{};I=mxUtils.bind(this,function(aa,ja){aa=k.getElementsByTagName(aa);for(var pa=0;pa<aa.length;pa++)mxUtils.bind(this,function(sa){S.push(mxUtils.bind(this,function(){try{if(null!=-sa){var qa=U.convert(sa.getAttribute(ja));if(null!=qa&&"data:"!=qa.substring(0,5)){var wa=X[qa];null==wa?this.convertImageToDataUri(qa,function(Ba){null!=Ba&&(X[qa]=Ba,sa.setAttribute(ja,Ba));O()},null,Editor.svgRasterScale):(sa.setAttribute(ja,wa),O())}else null!=qa&&sa.setAttribute(ja,qa),O()}}catch(Ba){O()}}))})(aa[pa])});I("image","xlink:href");I("img","src");O()};Editor.base64Encode=function(k){for(var A="",I=0,U=k.length,O,S,X;I<U;){O=k.charCodeAt(I++)&255;if(I==U){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>-2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4);A+="==";break}S=k.charCodeAt(I++);if(I==U){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(S&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((S&15)<<2);A+="=";break}X=k.charCodeAt(I++);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>-2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(S&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((S&15)<<2|(X&192)>>6);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(X&63)}return A};Editor.prototype.loadUrl=function(k,A,I,U,O,S,X,aa){try{var ja=!X&&(U||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));O=null!=O?O:!0;var pa=mxUtils.bind(this,-function(){mxUtils.get(k,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&299>=sa.getStatus()){if(null!=A){var qa=sa.getText();if(ja){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();qa=Array(sa.length);for(var wa=0;wa<sa.length;wa++)qa[wa]=String.fromCharCode(sa[wa]);qa=qa.join("")}S=null!=S?S:"data:image/png;base64,";qa=S+Editor.base64Encode(qa)}A(qa)}}else null!=I&&(0==sa.getStatus()?-I({message:mxResources.get("accessDenied")},sa):404==sa.getStatus()?I({message:mxResources.get("fileNotFound"),code:sa.getStatus()},sa):I({message:this.getErrorMessage(sa)},sa))}),function(sa){null!=I&&I({message:mxResources.get("error")+" "+sa.getStatus()})},ja,this.timeout,function(){O&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:pa})},aa)});pa()}catch(sa){null!=I&&I(sa)}};Editor.prototype.getErrorMessage=function(k){var A=mxResources.get("error")+" "+k.getStatus();try{var I=k.getText(),U=JSON.parse(I);-null!=U&&null!=U.error&&null!=U.error.message&&(A=U.error.message+" ("+A+")")}catch(O){}return A};Editor.prototype.absoluteCssFonts=function(k){var A=null;if(null!=k){var I=k.split("url(");if(0<I.length){A=[I[0]];k=window.location.pathname;var U=null!=k?k.lastIndexOf("/"):-1;0<=U&&(k=k.substring(0,U+1));U=document.getElementsByTagName("base");var O=null;null!=U&&0<U.length&&(O=U[0].getAttribute("href"));for(var S=1;S<I.length;S++)if(U=I[S].indexOf(")"),0<U){var X=Editor.trimCssUrl(I[S].substring(0,-U));this.graph.isRelativeUrl(X)&&(X=null!=O?O+X:window.location.protocol+"//"+window.location.hostname+("/"==X.charAt(0)?"":k)+X);A.push('url("'+X+'"'+I[S].substring(U))}else A.push(I[S])}else A=[k]}return null!=A?A.join(""):null};Editor.prototype.mapFontUrl=function(k,A,I){/^https?:\/\//.test(A)&&!this.isCorsEnabledForUrl(A)&&(A=PROXY_URL+"?url="+encodeURIComponent(A));I(k,A)};Editor.prototype.embedCssFonts=function(k,A){var I=k.split("url("),U=0;null==this.cachedFonts&&(this.cachedFonts={});var O=-mxUtils.bind(this,function(){if(0==U){for(var ja=[I[0]],pa=1;pa<I.length;pa++){var sa=I[pa].indexOf(")");ja.push('url("');ja.push(this.cachedFonts[Editor.trimCssUrl(I[pa].substring(0,sa))]);ja.push('"'+I[pa].substring(sa))}A(ja.join(""))}});if(0<I.length){for(k=1;k<I.length;k++){var S=I[k].indexOf(")"),X=null,aa=I[k].indexOf("format(",S);0<aa&&(X=Editor.trimCssUrl(I[k].substring(aa+7,I[k].indexOf(")",aa))));mxUtils.bind(this,function(ja){if(null==this.cachedFonts[ja]){this.cachedFonts[ja]=ja;U++;-var pa="application/x-font-ttf";if("svg"==X||/(\.svg)($|\?)/i.test(ja))pa="image/svg+xml";else if("otf"==X||"embedded-opentype"==X||/(\.otf)($|\?)/i.test(ja))pa="application/x-font-opentype";else if("woff"==X||/(\.woff)($|\?)/i.test(ja))pa="application/font-woff";else if("woff2"==X||/(\.woff2)($|\?)/i.test(ja))pa="application/font-woff2";else if("eot"==X||/(\.eot)($|\?)/i.test(ja))pa="application/vnd.ms-fontobject";else if("sfnt"==X||/(\.sfnt)($|\?)/i.test(ja))pa="application/font-sfnt";this.mapFontUrl(pa,-ja,mxUtils.bind(this,function(sa,qa){this.loadUrl(qa,mxUtils.bind(this,function(wa){this.cachedFonts[ja]=wa;U--;O()}),mxUtils.bind(this,function(wa){U--;O()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[k].substring(0,S)),X)}O()}else A(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(A){this.resolvedFontCss=A;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=-function(){var k={},A;for(A in Graph.fontMapping)Graph.isCssFontUrl(A)&&(k[A]=Graph.fontMapping[A]);return k};Editor.prototype.embedExtFonts=function(k){var A=this.graph.getCustomFonts();if(0<A.length){var I=[],U=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==U&&this.embedCssFonts(I.join(""),k)}),S=0;S<A.length;S++)mxUtils.bind(this,function(X,aa){Graph.isCssFontUrl(aa)?null==this.cachedGoogleFonts[aa]?(U++,this.loadUrl(Graph.rewriteGoogleFontUrl(aa),-mxUtils.bind(this,function(ja){this.cachedGoogleFonts[aa]=ja;I.push(ja+"\n");U--;O()}),mxUtils.bind(this,function(ja){U--;I.push("@import url("+aa+");\n");O()}))):I.push(this.cachedGoogleFonts[aa]+"\n"):I.push('@font-face {font-family: "'+X+'";src: url("'+aa+'")}\n')})(A[S].name,A[S].url);O()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var A=document.getElementsByTagName("style"),I=0;I<A.length;I++){var U=mxUtils.getTextContent(A[I]);-0>U.indexOf("mxPageSelector")&&0<U.indexOf("MathJax")&&k[0].appendChild(A[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,A){A=null!=A?A:this.absoluteCssFonts(this.fontCss);if(null!=A){var I=mxUtils.getSvgDefs(k),U=A.split("\n");A=[];for(var O=[],S=0;S<U.length;S++)"@import"==U[S].substring(0,7)?A.push(U[S]):O.push(U[S]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<A.length&&(mxUtils.setTextContent(k,-A.join("\n")),I.appendChild(k));0<O.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,O.join("\n")),I.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,A,I){var U=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(U/k,U/A))};Editor.prototype.exportToCanvas=function(k,A,I,U,O,S,X,aa,ja,pa,sa,qa,wa,Ba,za,Ea,ra,ya){try{S=null!=S?S:!0;X=null!=X?X:!0;qa=null!=qa?qa:this.graph;wa=null!=-wa?wa:0;var Ca=ja?null:qa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=U);null==Ca&&0==ja&&(Ca="dark"==Ea&&"none"!=qa.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(qa.getSvg(null,null,wa,Ba,null,X,null,null,null,pa,null,Ea,ra,ya),mxUtils.bind(this,function(Ma){try{var Ha=new Image;Ha.onload=mxUtils.bind(this,function(){try{var Ra=function(){mxClient.IS_SF?window.setTimeout(function(){Da.drawImage(Ha,0,0);k(Za,Ma)},0):(Da.drawImage(Ha,0,0),k(Za,Ma))},Za=document.createElement("canvas"),-La=parseInt(Ma.getAttribute("width")),$a=parseInt(Ma.getAttribute("height"));aa=null!=aa?aa:1;null!=A&&(aa=S?Math.min(1,Math.min(3*A/(4*$a),A/La)):A/La);aa=this.getMaxCanvasScale(La,$a,aa);La=Math.ceil(aa*La);$a=Math.ceil(aa*$a);Za.setAttribute("width",La);Za.setAttribute("height",$a);var Da=Za.getContext("2d");null!=Ca&&(Da.beginPath(),Da.rect(0,0,La,$a),Da.fillStyle=Ca,Da.fill());1!=aa&&Da.scale(aa,aa);if(za){var x=qa.view,M=x.scale;x.scale=1;var Q=btoa(unescape(encodeURIComponent(x.createSvgGrid(x.gridColor))));-x.scale=M;Q="data:image/svg+xml;base64,"+Q;var V=qa.gridSize*x.gridSteps*aa,ia=qa.getGraphBounds(),ka=x.translate.x*M,oa=x.translate.y*M,xa=ka+(ia.x-ka)/M-wa,ta=oa+(ia.y-oa)/M-wa,ua=new Image;ua.onload=function(){try{for(var Fa=-Math.round(V-mxUtils.mod((ka-xa)*aa,V)),Na=-Math.round(V-mxUtils.mod((oa-ta)*aa,V));Fa<La;Fa+=V)for(var Wa=Na;Wa<$a;Wa+=V)Da.drawImage(ua,Fa/aa,Wa/aa);Ra()}catch(Xa){null!=O&&O(Xa)}};ua.onerror=function(Fa){null!=O&&O(Fa)};ua.src=Q}else Ra()}catch(Fa){null!=O&&O(Fa)}});Ha.onerror=-function(Ra){null!=O&&O(Ra)};pa&&this.graph.addSvgShadow(Ma);this.graph.mathEnabled&&this.addMathCss(Ma);var Aa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ma,this.resolvedFontCss),Ha.src=Editor.createSvgDataUri(mxUtils.getXml(Ma))}catch(Ra){null!=O&&O(Ra)}});this.embedExtFonts(mxUtils.bind(this,function(Ra){try{null!=Ra&&this.addFontCss(Ma,Ra),this.loadFonts(Aa)}catch(Za){null!=O&&O(Za)}}))}catch(Ra){null!=O&&O(Ra)}}),I,sa)}catch(Ma){null!=O&&O(Ma)}};Editor.crcTable=-[];for(var u=0;256>u;u++)for(var p=u,B=0;8>B;B++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[u]=p;Editor.updateCRC=function(k,A,I,U){for(var O=0;O<U;O++)k=Editor.crcTable[(k^A.charCodeAt(I+O))&255]^k>>>8;return k};Editor.crc32=function(k){for(var A=-1,I=0;I<k.length;I++)A=A>>>8^Editor.crcTable[(A^k.charCodeAt(I))&255];return(A^-1)>>>0};Editor.writeGraphModelToPng=function(k,A,I,U,O){function S(sa,qa){var wa=ja;ja+=qa;return sa.substring(wa,ja)}function X(sa){sa=S(sa,4);return sa.charCodeAt(3)+-(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function aa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var ja=0;if(S(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(S(k,4),"IHDR"!=S(k,4))null!=O&&O();else{S(k,17);O=k.substring(0,ja);do{var pa=X(k);if("IDAT"==S(k,4)){O=k.substring(0,ja-8);"pHYs"==A&&"dpi"==I?(I=Math.round(U/.0254),I=aa(I)+-aa(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==A?String.fromCharCode(0):"")+U;U=4294967295;U=Editor.updateCRC(U,A,0,4);U=Editor.updateCRC(U,I,0,I.length);O+=aa(I.length)+A+I+aa(U^4294967295);O+=k.substring(ja-8,k.length);break}O+=k.substring(ja-8,ja-4+pa);S(k,pa);S(k,4)}while(pa);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var H=ColorDialog.addRecentColor;-ColorDialog.addRecentColor=function(k,A){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var T=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){T.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,A){var I=null;null!=k.editor.graph.getModel().getParent(A)?I=A.getId():null!=k.currentPage&&(I=k.currentPage.getId());+return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var A=k.convert,I=this;k.convert=function(T){null!=T&&navigator.onLine&&("http://"!=T.substring(0,7)&&"https://"!=T.substring(0,8)||T.substring(0,k.baseUrl.length)==k.baseUrl||I.crossOriginImages&&+I.isCorsEnabledForUrl(T)?"chrome-extension://"!=T.substring(0,19)&&(T=A.apply(this,arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T));return T};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,A,I,T,O){try{var U=!0,V=window.setTimeout(mxUtils.bind(this,function(){U=!1;A(k)}),this.timeout),ba=mxUtils.bind(this,function(){null!=T?this.convertImageToDataUri(k,A,I,T,!0):A(k)});+if(/(\.svg)$/i.test(k)&&!O)mxUtils.get(k,mxUtils.bind(this,function(pa){window.clearTimeout(V);U&&(200>pa.getStatus()||299<pa.getStatus()?ba():A(Editor.createSvgDataUri(pa.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(V);U&&ba()}));else{var fa=new Image;this.crossOriginImages&&(fa.crossOrigin="anonymous");fa.onload=function(){window.clearTimeout(V);if(U)try{T=null!=T&&O?T:1;var pa=document.createElement("canvas"),sa=pa.getContext("2d");sa.scale(T,T);pa.height=fa.height*T;pa.width=+fa.width*T;sa.drawImage(fa,0,0);A(pa.toDataURL())}catch(qa){A(k)}};fa.onerror=function(){window.clearTimeout(V);U&&(null!=I?I():A(k))};fa.src=k}}catch(pa){null!=I?I():A(k)}};Editor.prototype.convertImages=function(k,A,I,T){function O(){0<U.length?U.shift()():A(k)}null==T&&(T=this.createImageUrlConverter());var U=[],V=I||{};I=mxUtils.bind(this,function(ba,fa){ba=k.getElementsByTagName(ba);for(var pa=0;pa<ba.length;pa++)mxUtils.bind(this,function(sa){U.push(mxUtils.bind(this,function(){try{if(null!=+sa){var qa=T.convert(sa.getAttribute(fa));if(null!=qa&&"data:"!=qa.substring(0,5)){var wa=V[qa];null==wa?this.convertImageToDataUri(qa,function(Aa){null!=Aa&&(V[qa]=Aa,sa.setAttribute(fa,Aa));O()},null,Editor.svgRasterScale):(sa.setAttribute(fa,wa),O())}else null!=qa&&sa.setAttribute(fa,qa),O()}}catch(Aa){O()}}))})(ba[pa])});I("image","xlink:href");I("img","src");O()};Editor.base64Encode=function(k){for(var A="",I=0,T=k.length,O,U,V;I<T;){O=k.charCodeAt(I++)&255;if(I==T){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>+2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4);A+="==";break}U=k.charCodeAt(I++);if(I==T){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(U&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&15)<<2);A+="=";break}V=k.charCodeAt(I++);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>+2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(U&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&15)<<2|(V&192)>>6);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(V&63)}return A};Editor.prototype.loadUrl=function(k,A,I,T,O,U,V,ba){try{var fa=!V&&(T||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));O=null!=O?O:!0;var pa=mxUtils.bind(this,+function(){mxUtils.get(k,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&299>=sa.getStatus()){if(null!=A){var qa=sa.getText();if(fa){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();qa=Array(sa.length);for(var wa=0;wa<sa.length;wa++)qa[wa]=String.fromCharCode(sa[wa]);qa=qa.join("")}U=null!=U?U:"data:image/png;base64,";qa=U+Editor.base64Encode(qa)}A(qa)}}else null!=I&&(0==sa.getStatus()?+I({message:mxResources.get("accessDenied")},sa):404==sa.getStatus()?I({message:mxResources.get("fileNotFound"),code:sa.getStatus()},sa):I({message:this.getErrorMessage(sa)},sa))}),function(sa){null!=I&&I({message:mxResources.get("error")+" "+sa.getStatus()})},fa,this.timeout,function(){O&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:pa})},ba)});pa()}catch(sa){null!=I&&I(sa)}};Editor.prototype.getErrorMessage=function(k){var A=mxResources.get("error")+" "+k.getStatus();try{var I=k.getText(),T=JSON.parse(I);+null!=T&&null!=T.error&&null!=T.error.message&&(A=T.error.message+" ("+A+")")}catch(O){}return A};Editor.prototype.absoluteCssFonts=function(k){var A=null;if(null!=k){var I=k.split("url(");if(0<I.length){A=[I[0]];k=window.location.pathname;var T=null!=k?k.lastIndexOf("/"):-1;0<=T&&(k=k.substring(0,T+1));T=document.getElementsByTagName("base");var O=null;null!=T&&0<T.length&&(O=T[0].getAttribute("href"));for(var U=1;U<I.length;U++)if(T=I[U].indexOf(")"),0<T){var V=Editor.trimCssUrl(I[U].substring(0,+T));this.graph.isRelativeUrl(V)&&(V=null!=O?O+V:window.location.protocol+"//"+window.location.hostname+("/"==V.charAt(0)?"":k)+V);A.push('url("'+V+'"'+I[U].substring(T))}else A.push(I[U])}else A=[k]}return null!=A?A.join(""):null};Editor.prototype.mapFontUrl=function(k,A,I){/^https?:\/\//.test(A)&&!this.isCorsEnabledForUrl(A)&&(A=PROXY_URL+"?url="+encodeURIComponent(A));I(k,A)};Editor.prototype.embedCssFonts=function(k,A){var I=k.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var O=+mxUtils.bind(this,function(){if(0==T){for(var fa=[I[0]],pa=1;pa<I.length;pa++){var sa=I[pa].indexOf(")");fa.push('url("');fa.push(this.cachedFonts[Editor.trimCssUrl(I[pa].substring(0,sa))]);fa.push('"'+I[pa].substring(sa))}A(fa.join(""))}});if(0<I.length){for(k=1;k<I.length;k++){var U=I[k].indexOf(")"),V=null,ba=I[k].indexOf("format(",U);0<ba&&(V=Editor.trimCssUrl(I[k].substring(ba+7,I[k].indexOf(")",ba))));mxUtils.bind(this,function(fa){if(null==this.cachedFonts[fa]){this.cachedFonts[fa]=fa;T++;+var pa="application/x-font-ttf";if("svg"==V||/(\.svg)($|\?)/i.test(fa))pa="image/svg+xml";else if("otf"==V||"embedded-opentype"==V||/(\.otf)($|\?)/i.test(fa))pa="application/x-font-opentype";else if("woff"==V||/(\.woff)($|\?)/i.test(fa))pa="application/font-woff";else if("woff2"==V||/(\.woff2)($|\?)/i.test(fa))pa="application/font-woff2";else if("eot"==V||/(\.eot)($|\?)/i.test(fa))pa="application/vnd.ms-fontobject";else if("sfnt"==V||/(\.sfnt)($|\?)/i.test(fa))pa="application/font-sfnt";this.mapFontUrl(pa,+fa,mxUtils.bind(this,function(sa,qa){this.loadUrl(qa,mxUtils.bind(this,function(wa){this.cachedFonts[fa]=wa;T--;O()}),mxUtils.bind(this,function(wa){T--;O()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[k].substring(0,U)),V)}O()}else A(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(A){this.resolvedFontCss=A;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=+function(){var k={},A;for(A in Graph.fontMapping)Graph.isCssFontUrl(A)&&(k[A]=Graph.fontMapping[A]);return k};Editor.prototype.embedExtFonts=function(k){var A=this.graph.getCustomFonts();if(0<A.length){var I=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(I.join(""),k)}),U=0;U<A.length;U++)mxUtils.bind(this,function(V,ba){Graph.isCssFontUrl(ba)?null==this.cachedGoogleFonts[ba]?(T++,this.loadUrl(Graph.rewriteGoogleFontUrl(ba),+mxUtils.bind(this,function(fa){this.cachedGoogleFonts[ba]=fa;I.push(fa+"\n");T--;O()}),mxUtils.bind(this,function(fa){T--;I.push("@import url("+ba+");\n");O()}))):I.push(this.cachedGoogleFonts[ba]+"\n"):I.push('@font-face {font-family: "'+V+'";src: url("'+ba+'")}\n')})(A[U].name,A[U].url);O()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var A=document.getElementsByTagName("style"),I=0;I<A.length;I++){var T=mxUtils.getTextContent(A[I]);+0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&k[0].appendChild(A[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,A){A=null!=A?A:this.absoluteCssFonts(this.fontCss);if(null!=A){var I=mxUtils.getSvgDefs(k),T=A.split("\n");A=[];for(var O=[],U=0;U<T.length;U++)"@import"==T[U].substring(0,7)?A.push(T[U]):O.push(T[U]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<A.length&&(mxUtils.setTextContent(k,+A.join("\n")),I.appendChild(k));0<O.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,O.join("\n")),I.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,A,I){var T=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(T/k,T/A))};Editor.prototype.exportToCanvas=function(k,A,I,T,O,U,V,ba,fa,pa,sa,qa,wa,Aa,za,Da,ra,ya){try{U=null!=U?U:!0;V=null!=V?V:!0;qa=null!=qa?qa:this.graph;wa=null!=+wa?wa:0;var Ca=fa?null:qa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=T);null==Ca&&0==fa&&(Ca="dark"==Da&&"none"!=qa.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(qa.getSvg(null,null,wa,Aa,null,V,null,null,null,pa,null,Da,ra,ya),mxUtils.bind(this,function(Ka){try{var Ha=new Image;Ha.onload=mxUtils.bind(this,function(){try{var Pa=function(){mxClient.IS_SF?window.setTimeout(function(){Ea.drawImage(Ha,0,0);k($a,Ka)},0):(Ea.drawImage(Ha,0,0),k($a,Ka))},$a=document.createElement("canvas"),+Na=parseInt(Ka.getAttribute("width")),Ya=parseInt(Ka.getAttribute("height"));ba=null!=ba?ba:1;null!=A&&(ba=U?Math.min(1,Math.min(3*A/(4*Ya),A/Na)):A/Na);ba=this.getMaxCanvasScale(Na,Ya,ba);Na=Math.ceil(ba*Na);Ya=Math.ceil(ba*Ya);$a.setAttribute("width",Na);$a.setAttribute("height",Ya);var Ea=$a.getContext("2d");null!=Ca&&(Ea.beginPath(),Ea.rect(0,0,Na,Ya),Ea.fillStyle=Ca,Ea.fill());1!=ba&&Ea.scale(ba,ba);if(za){var x=qa.view,L=x.scale;x.scale=1;var R=btoa(unescape(encodeURIComponent(x.createSvgGrid(x.gridColor))));+x.scale=L;R="data:image/svg+xml;base64,"+R;var W=qa.gridSize*x.gridSteps*ba,ja=qa.getGraphBounds(),ka=x.translate.x*L,oa=x.translate.y*L,va=ka+(ja.x-ka)/L-wa,ta=oa+(ja.y-oa)/L-wa,xa=new Image;xa.onload=function(){try{for(var Fa=-Math.round(W-mxUtils.mod((ka-va)*ba,W)),Ma=-Math.round(W-mxUtils.mod((oa-ta)*ba,W));Fa<Na;Fa+=W)for(var Wa=Ma;Wa<Ya;Wa+=W)Ea.drawImage(xa,Fa/ba,Wa/ba);Pa()}catch(Xa){null!=O&&O(Xa)}};xa.onerror=function(Fa){null!=O&&O(Fa)};xa.src=R}else Pa()}catch(Fa){null!=O&&O(Fa)}});Ha.onerror=+function(Pa){null!=O&&O(Pa)};pa&&this.graph.addSvgShadow(Ka);this.graph.mathEnabled&&this.addMathCss(Ka);var Ba=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ka,this.resolvedFontCss),Ha.src=Editor.createSvgDataUri(mxUtils.getXml(Ka))}catch(Pa){null!=O&&O(Pa)}});this.embedExtFonts(mxUtils.bind(this,function(Pa){try{null!=Pa&&this.addFontCss(Ka,Pa),this.loadFonts(Ba)}catch($a){null!=O&&O($a)}}))}catch(Pa){null!=O&&O(Pa)}}),I,sa)}catch(Ka){null!=O&&O(Ka)}};Editor.crcTable=+[];for(var u=0;256>u;u++)for(var p=u,B=0;8>B;B++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[u]=p;Editor.updateCRC=function(k,A,I,T){for(var O=0;O<T;O++)k=Editor.crcTable[(k^A.charCodeAt(I+O))&255]^k>>>8;return k};Editor.crc32=function(k){for(var A=-1,I=0;I<k.length;I++)A=A>>>8^Editor.crcTable[(A^k.charCodeAt(I))&255];return(A^-1)>>>0};Editor.writeGraphModelToPng=function(k,A,I,T,O){function U(sa,qa){var wa=fa;fa+=qa;return sa.substring(wa,fa)}function V(sa){sa=U(sa,4);return sa.charCodeAt(3)++(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function ba(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var fa=0;if(U(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(U(k,4),"IHDR"!=U(k,4))null!=O&&O();else{U(k,17);O=k.substring(0,fa);do{var pa=V(k);if("IDAT"==U(k,4)){O=k.substring(0,fa-8);"pHYs"==A&&"dpi"==I?(I=Math.round(T/.0254),I=ba(I)++ba(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==A?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,A,0,4);T=Editor.updateCRC(T,I,0,I.length);O+=ba(I.length)+A+I+ba(T^4294967295);O+=k.substring(fa-8,k.length);break}O+=k.substring(fa-8,fa-4+pa);U(k,pa);U(k,4)}while(pa);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var H=ColorDialog.addRecentColor;+ColorDialog.addRecentColor=function(k,A){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,A){var I=null;null!=k.editor.graph.getModel().getParent(A)?I=A.getId():null!=k.currentPage&&(I=k.currentPage.getId());return I});if(null!=window.StyleFormatPanel){var G=Format.prototype.init;Format.prototype.init=function(){G.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var P=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?P.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||-"min"==Editor.currentTheme};var R=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=R.apply(this,arguments);var A=this.editorUi,I=A.editor.graph;if(I.isEnabled()){var U=A.getCurrentFile();null!=U&&U.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return A.editor.autosave},function(X){A.editor.setAutosave(X);A.editor.autosave&&U.isModified()&&U.fileChanged()},{install:function(X){this.listener=function(){X(A.editor.autosave)};-A.editor.addListener("autosaveChanged",this.listener)},destroy:function(){A.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){var O=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(X){A.actions.get("mathematicalTypesetting").funct()},{install:function(X){this.listener=function(){X(I.mathEnabled)};A.addListener("mathEnabledChanged",this.listener)},destroy:function(){A.removeListener(this.listener)}});-k.appendChild(O);if(!A.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var S=A.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");S.style.position="absolute";S.style.left="85%";O.appendChild(S)}}return k};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=+"min"==Editor.currentTheme};var Q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=Q.apply(this,arguments);var A=this.editorUi,I=A.editor.graph;if(I.isEnabled()){var T=A.getCurrentFile();null!=T&&T.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return A.editor.autosave},function(V){A.editor.setAutosave(V);A.editor.autosave&&T.isModified()&&T.fileChanged()},{install:function(V){this.listener=function(){V(A.editor.autosave)};+A.editor.addListener("autosaveChanged",this.listener)},destroy:function(){A.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){var O=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(V){A.actions.get("mathematicalTypesetting").funct()},{install:function(V){this.listener=function(){V(I.mathEnabled)};A.addListener("mathEnabledChanged",this.listener)},destroy:function(){A.removeListener(this.listener)}});+k.appendChild(O);if(!A.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var U=A.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");U.style.position="absolute";U.style.left="85%";O.appendChild(U)}}return k};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},@@ -3353,94 +3353,94 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispNamestroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=-function(k,A,I,U){if(null!=A){var O=mxUtils.bind(this,function(X){if(null!=X)if(I)for(var aa=0;aa<X.length;aa++){if("function"!==typeof X[aa].isVisible||X[aa].isVisible(U,this))A[X[aa].name]=X[aa]}else for(var ja in A){var pa=!1;for(aa=0;aa<X.length;aa++)if(X[aa].name==ja&&X[aa].type==A[ja].type){pa=!0;break}pa||delete A[ja]}}),S=this.editorUi.editor.graph.view.getState(k);null!=S&&null!=S.shape&&(S.shape.commonCustomPropAdded||(S.shape.commonCustomPropAdded=!0,S.shape.customProperties=S.shape.customProperties||-[],S.cell.vertex?Array.prototype.push.apply(S.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(S.shape.customProperties,Editor.commonEdgeProperties)),O(S.shape.customProperties));k=k.getAttribute("customProperties");if(null!=k)try{O(JSON.parse(k))}catch(X){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&-!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var A={},I=k.vertices,U=k.edges,O=0;O<I.length;O++)this.findCommonProperties(I[O],A,0==O,k);for(O=0;O<U.length;O++)this.findCommonProperties(U[O],A,0==I.length&&0==O,k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(A).length&&this.container.appendChild(this.addProperties(this.createPanel(),A,k))}};var f=StyleFormatPanel.prototype.addStyleOps;-StyleFormatPanel.prototype.addStyleOps=function(k){var A=this.editorUi.getSelectionState();1==A.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=A.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);f.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,A,I,U){function O(Da,x,M,Q,V){if(null!=M.valueChanged)M.valueChanged(x,V);else{wa.getModel().beginUpdate();try{V=[];var ia=[];if(null!=M.index){for(var ka=-[],oa=M.parentRow.nextSibling;oa&&oa.getAttribute("data-pName")==Da;)ka.push(oa.getAttribute("data-pValue")),oa=oa.nextSibling;M.index<ka.length?null!=Q?ka.splice(Q,1):ka[M.index]=x:ka.push(x);null!=M.size&&ka.length>M.size&&(ka=ka.slice(0,M.size));x=ka.join(",");null!=M.countProperty&&(wa.setCellStyles(M.countProperty,ka.length,wa.getSelectionCells()),V.push(M.countProperty),ia.push(ka.length))}wa.setCellStyles(Da,x,wa.getSelectionCells());V.push(Da);ia.push(x);if(null!=M.dependentProps)for(Da=0;Da<-M.dependentProps.length;Da++){var xa=M.dependentPropsDefVal[Da],ta=M.dependentPropsVals[Da];if(ta.length>x)ta=ta.slice(0,x);else for(var ua=ta.length;ua<x;ua++)ta.push(xa);ta=ta.join(",");wa.setCellStyles(M.dependentProps[Da],ta,wa.getSelectionCells());V.push(M.dependentProps[Da]);ia.push(ta)}if("function"==typeof M.onChange)M.onChange(wa,x);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",V,"values",ia,"cells",wa.getSelectionCells()))}finally{wa.getModel().endUpdate()}}}function S(Da,-x,M){var Q=mxUtils.getOffset(k,!0),V=mxUtils.getOffset(Da,!0);x.style.position="absolute";x.style.left=V.x-Q.x+"px";x.style.top=V.y-Q.y+"px";x.style.width=Da.offsetWidth+"px";x.style.height=Da.offsetHeight-(M?4:0)+"px";x.style.zIndex=5}function X(Da,x,M){function Q(ia){if(null==ia||ia==mxConstants.NONE)V.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==ia)V.style.background="";else{var ka=mxUtils.getLightDarkColor(ia);mxUtils.isLightDarkColor(ia)&&ka.light!=ka.dark?V.style.background=-"linear-gradient(to right bottom, "+ka.cssText+" 50%, "+mxUtils.invertLightDarkColor(ka).cssText+" 50.3%)":V.style.background=ia}}var V=document.createElement("div");V.style.width="32px";V.style.height="8px";V.style.margin="2px";V.style.borderStyle="solid";V.style.borderWidth="1px";Q(x);btn=mxUtils.button("",mxUtils.bind(qa,function(ia){this.editorUi.pickColor(x,function(ka){O(Da,ka,M);Q(ka)});mxEvent.consume(ia)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft=-"1px";btn.className="geColorBtn";btn.appendChild(V);return btn}function aa(Da,x,M,Q,V,ia,ka){null!=x&&(x=x.split(","),Ba.push({name:Da,values:x,type:M,defVal:Q,countProperty:V,parentRow:ia,isDeletable:!0,flipBkg:ka}));btn=mxUtils.button("+",mxUtils.bind(qa,function(oa){for(var xa=ia,ta=0;null!=xa.nextSibling;)if(xa.nextSibling.getAttribute("data-pName")==Da)xa=xa.nextSibling,ta++;else break;var ua={type:M,parentRow:ia,index:ta,isDeletable:!0,defVal:Q,countProperty:V};ta=sa(Da,"",ua,0==ta%2,ka);O(Da,-Q,ua);xa.parentNode.insertBefore(ta,xa.nextSibling);mxEvent.consume(oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ja(Da,x,M,Q,V,ia,ka){if(0<V){var oa=Array(V);x=null!=x?x.split(","):[];for(var xa=0;xa<V;xa++)oa[xa]=null!=x[xa]?x[xa]:null!=Q?Q:"";Ba.push({name:Da,values:oa,type:M,defVal:Q,parentRow:ia,flipBkg:ka,size:V})}return document.createElement("div")}function pa(Da,x,M){var Q=document.createElement("input");Q.type="checkbox";Q.checked="1"==-x;mxEvent.addListener(Q,"change",function(){O(Da,Q.checked?"1":"0",M)});return Q}function sa(Da,x,M,Q,V){var ia=M.dispName,ka=M.type,oa=document.createElement("tr");oa.className="gePropRow"+(V?"Dark":"")+(Q?"Alt":"")+" gePropNonHeaderRow";oa.setAttribute("data-pName",Da);oa.setAttribute("data-pValue",x);Q=!1;null!=M.index&&(oa.setAttribute("data-index",M.index),ia=(null!=ia?ia:"")+"["+M.index+"]",Q=!0);var xa=document.createElement("td");xa.className="gePropRowCell";ia=mxResources.get(ia,null,ia);-mxUtils.write(xa,ia);xa.setAttribute("title",ia);Q&&(xa.style.textAlign="right");oa.appendChild(xa);xa=document.createElement("td");xa.className="gePropRowCell";xa.setAttribute("title",null!=x?x:mxResources.get("none"));if("color"==ka)xa.appendChild(X(Da,x,M));else if("bool"==ka||"boolean"==ka)xa.appendChild(pa(Da,x,M));else if("enum"==ka){var ta=M.enumList;for(V=0;V<ta.length;V++)if(ia=ta[V],ia.val==x){mxUtils.write(xa,mxResources.get(ia.dispName,null,ia.dispName));break}mxEvent.addListener(xa,"click",-mxUtils.bind(qa,function(){var ua=document.createElement("select"),Fa=null;S(xa,ua);for(var Na=0;Na<ta.length;Na++){var Wa=ta[Na],Xa=document.createElement("option");Xa.value=mxUtils.htmlEntities(Wa.val);mxUtils.write(Xa,mxResources.get(Wa.dispName,null,Wa.dispName));ua.appendChild(Xa);null==Wa.val&&(Xa.value="null",Fa=Xa)}ua.value=null==x&&null!=Fa?"null":x;k.appendChild(ua);mxEvent.addListener(ua,"change",function(){var ab=mxUtils.htmlEntities(ua.value);if(ua[ua.selectedIndex]==Fa||"null"==ab.value)ab=-null;O(Da,ab,M)});ua.focus();mxEvent.addListener(ua,"blur",function(){k.removeChild(ua)})}))}else"dynamicArr"==ka?xa.appendChild(aa(Da,x,M.subType,M.subDefVal,M.countProperty,oa,V)):"staticArr"==ka?xa.appendChild(ja(Da,x,M.subType,M.subDefVal,M.size,oa,V)):"readOnly"==ka?(V=document.createElement("input"),V.setAttribute("readonly",""),V.value=x,V.style.borderWidth="0px","id"==Da?(V.style.width="190px",V.style.position="relative",V.style.right="6px",V.style.float="right",V.style.background="none",-V.style.textAlign="right",oa.firstChild.setAttribute("colspan","2"),V.setAttribute("title",x),oa.firstChild.appendChild(V)):(V.style.width="96px",xa.appendChild(V))):(xa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(x)),mxEvent.addListener(xa,"click",mxUtils.bind(qa,function(){function ua(){var Na=Fa.value;Na=0==Na.length&&"string"!=ka&&"numbers"!=ka?0:Na;M.allowAuto&&(null!=Na.trim&&"auto"==Na.trim().toLowerCase()?(Na="auto",ka="string"):(Na=parseFloat(Na),Na=isNaN(Na)?0:Na));null!=M.min&&Na<-M.min?Na=M.min:null!=M.max&&Na>M.max&&(Na=M.max);var Wa=null;try{Wa="numbers"==ka?Na.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ka?parseInt(Na):Na)+"")}catch(Xa){}O(Da,Wa,M,null,Fa)}var Fa=document.createElement("input");S(xa,Fa,!0);Fa.value=decodeURIComponent(x);Fa.className="gePropEditor";"int"!=ka&&"float"!=ka||M.allowAuto||(Fa.type="number",Fa.step="int"==ka?"1":"any",null!=M.min&&(Fa.min=parseFloat(M.min)),null!=M.max&&(Fa.max=parseFloat(M.max)));k.appendChild(Fa);mxEvent.addListener(Fa,-"keypress",function(Na){13==Na.keyCode&&ua()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){ua()})})));M.isDeletable&&(V=mxUtils.button("-",mxUtils.bind(qa,function(ua){O(Da,"",M,M.index);mxEvent.consume(ua)})),V.style.height="16px",V.style.width="25px",V.style.float="right",V.className="geColorBtn",xa.appendChild(V));oa.appendChild(xa);return oa}var qa=this,wa=this.editorUi.editor.graph,Ba=[];k.style.position="relative";k.style.padding="0";var za=document.createElement("table");za.className=-"geProperties";za.style.whiteSpace="nowrap";za.style.width="100%";var Ea=document.createElement("tr");Ea.className="gePropHeader";var ra=document.createElement("th");ra.className="gePropHeaderCell";ra.style.paddingLeft="16px";ra.style.backgroundRepeat="no-repeat";ra.style.backgroundPosition="-2px 50%";ra.style.backgroundSize="20px";mxUtils.write(ra,mxResources.get("property"));Ea.style.cursor="pointer";var ya=function(){var Da=za.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){ra.style.backgroundImage=-"url('"+Editor.arrowRightImage+"')";var x="none";for(var M=k.childNodes.length-1;0<=M;M--)try{var Q=k.childNodes[M],V=Q.nodeName.toUpperCase();"INPUT"!=V&&"SELECT"!=V||k.removeChild(Q)}catch(ia){}}else ra.style.backgroundImage="url('"+Editor.arrowDownImage+"')",x="";for(M=0;M<Da.length;M++)Da[M].style.display=x};mxEvent.addListener(Ea,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;ya()});Ea.appendChild(ra);var Ca=document.createElement("th");Ca.className="gePropHeaderCell";-Ca.style.paddingLeft="4px";mxUtils.write(Ca,mxResources.get("value"));Ea.appendChild(Ca);za.appendChild(Ea);var Ma=Ca=!1;Ea=null;1==I.vertices.length&&0==I.edges.length?Ea=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(Ea=I.edges[0].id);null==Ea||U||za.appendChild(sa("id",mxUtils.htmlEntities(Ea),{dispName:"id",type:"readOnly"},!0,!1));for(var Ha in A)if(U=A[Ha],"function"!=typeof U.isVisible||U.isVisible(I,this)){var Aa=null!=U.getValue?U.getValue():null!=I.style[Ha]?mxUtils.htmlEntities(I.style[Ha]+-""):null!=U.getDefaultValue?U.getDefaultValue(I,this):U.defVal;if("separator"==U.type)Ma=!Ma;else{if("staticArr"==U.type)U.size=parseInt(I.style[U.sizeProperty]||A[U.sizeProperty].defVal)||0;else if(null!=U.dependentProps){var Ra=U.dependentProps,Za=[],La=[];for(Ea=0;Ea<Ra.length;Ea++){var $a=I.style[Ra[Ea]];La.push(A[Ra[Ea]].subDefVal);Za.push(null!=$a?$a.split(","):[])}U.dependentPropsDefVal=La;U.dependentPropsVals=Za}za.appendChild(sa(Ha,Aa,U,Ca,Ma));Ca=!Ca}}for(Ea=0;Ea<Ba.length;Ea++)for(U=Ba[Ea],-A=U.parentRow,I=0;I<U.values.length;I++)Ha=sa(U.name,U.values[I],{type:U.type,parentRow:U.parentRow,isDeletable:U.isDeletable,index:I,defVal:U.defVal,countProperty:U.countProperty,size:U.size},0==I%2,U.flipBkg),A.parentNode.insertBefore(Ha,A.nextSibling),A=Ha;k.appendChild(za);ya();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var A=function(Ba){mxEvent.addListener(Ba,"mouseenter",function(){Ba.style.opacity="1"});mxEvent.addListener(Ba,"mouseleave",-function(){Ba.style.opacity="0.5"})},I=this.editorUi,U=I.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px";O.style.paddingRight="20px";k.style.paddingLeft="16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(O);var S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.position="relative";S.style.textAlign="center";S.style.width="210px";for(var X=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var ja=document.createElement("div");-ja.style.display="inline-block";ja.style.width="6px";ja.style.height="6px";ja.style.marginLeft="4px";ja.style.marginRight="3px";ja.style.borderRadius="3px";ja.style.cursor="pointer";ja.style.background="transparent";ja.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Ba){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){pa(Ba)}))})(aa);X.push(ja);S.appendChild(ja)}var pa=mxUtils.bind(this,function(Ba){null!=X[Ba]&&(null!=this.format.currentScheme&&null!=X[this.format.currentScheme]&&-(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ba,sa(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),sa=mxUtils.bind(this,function(Ba){var za=mxUtils.clone(U.defaultVertexStyle);za[mxConstants.STYLE_STROKECOLOR]=null!=za[mxConstants.STYLE_STROKECOLOR]?za[mxConstants.STYLE_STROKECOLOR]:"default";za[mxConstants.STYLE_FILLCOLOR]=null!=za[mxConstants.STYLE_FILLCOLOR]?za[mxConstants.STYLE_FILLCOLOR]:-"default";za[mxConstants.STYLE_FONTCOLOR]=null!=za[mxConstants.STYLE_FONTCOLOR]?za[mxConstants.STYLE_FONTCOLOR]:"default";U.replaceDefaultColors(new mxCell,za);var Ea=mxUtils.bind(this,function(ya){var Ca=mxUtils.button("",mxUtils.bind(this,function(Aa){U.getModel().beginUpdate();try{for(var Ra=I.getSelectionState().cells,Za=0;Za<Ra.length;Za++){var La=U.getModel().getStyle(Ra[Za]);null!=ya?(mxEvent.isShiftDown(Aa)||(La=""==ya.fill||null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null):-mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,ya.fill),La=""==ya.gradient||null==ya.gradient?mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,ya.gradient),mxEvent.isControlDown(Aa)||mxClient.IS_MAC&&mxEvent.isMetaDown(Aa)||!U.getModel().isVertex(Ra[Za])||(La=""==ya.font||null==ya.font?mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,ya.font))),mxEvent.isAltDown(Aa)||(La=""==ya.stroke||-null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,ya.stroke))):(La=mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null),La=mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,null),La=mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null),U.getModel().isVertex(Ra[Za])&&(La=mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null)));U.getModel().setStyle(Ra[Za],La)}}finally{U.getModel().endUpdate()}}));Ca.className="geStyleButton";-Ca.style.width="36px";Ca.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ca.style.margin="0px 6px 6px 0px";if(null!=ya){var Ma="1px solid";null!=ya.border&&(Ma=ya.border);if(null!=ya.gradient)Ca.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(ya.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(ya.gradient).cssText+" 100%)";else if(ya.fill==mxConstants.NONE)Ca.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==ya.fill||""==ya.fill)Ca.style.backgroundColor=-mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var Ha=mxUtils.getLightDarkColor(ya.fill);Ca.style.backgroundImage="linear-gradient(to right bottom, "+Ha.cssText+" 50%, "+Ha.light+" 50.3%)"}null==ya.stroke||ya.stroke==mxConstants.NONE?Ca.style.border=Ma+" transparent":""==ya.stroke?Ca.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(Ha=mxUtils.getLightDarkColor(ya.stroke),Ca.style.border=-Ma+" "+Ha.cssText,Ca.style.borderRightColor=Ha.light,Ca.style.borderBottomColor=Ca.style.borderRightColor);null!=ya.title&&Ca.setAttribute("title",ya.title)}else Ma=mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff"),Ha=mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000"),Ca.style.backgroundColor=Ma,Ca.style.border="1px solid "+Ha;Ca.style.borderRadius="0";O.appendChild(Ca);null!=ya&&null!=ya.gradient&&(Ma=Ca.cloneNode(!1),Ma.style.backgroundImage="linear-gradient(light-dark(transparent, "+-mxUtils.getLightDarkColor(ya.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ya.gradient).light+") 100%)",Ma.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ma.style.backgroundColor="transparent",O.appendChild(Ma),Ma.style.marginLeft="-42px",mxEvent.addListener(Ma,"click",function(){Ca.click()}))});O.innerText="";if(null!=Ba)for(var ra=0;ra<Ba.length;ra++)0<ra&&0==mxUtils.mod(ra,4)&&mxUtils.br(O),Ea(Ba[ra])});null==this.format.currentScheme?pa(Math.min(X.length-1,Editor.isDarkMode()?-1:"1"==urlParams.sketch?5:0)):pa(this.format.currentScheme);aa=10>=this.defaultColorSchemes.length?28:8;var qa=document.createElement("div");qa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";-mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var wa=document.createElement("div");wa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";-1<this.defaultColorSchemes.length&&(k.appendChild(qa),k.appendChild(wa));mxEvent.addListener(wa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));A(qa);A(wa);sa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(S)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};+function(k,A,I,T){if(null!=A){var O=mxUtils.bind(this,function(V){if(null!=V)if(I)for(var ba=0;ba<V.length;ba++){if("function"!==typeof V[ba].isVisible||V[ba].isVisible(T,this))A[V[ba].name]=V[ba]}else for(var fa in A){var pa=!1;for(ba=0;ba<V.length;ba++)if(V[ba].name==fa&&V[ba].type==A[fa].type){pa=!0;break}pa||delete A[fa]}}),U=this.editorUi.editor.graph.view.getState(k);null!=U&&null!=U.shape&&(U.shape.commonCustomPropAdded||(U.shape.commonCustomPropAdded=!0,U.shape.customProperties=U.shape.customProperties||+[],U.cell.vertex?Array.prototype.push.apply(U.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(U.shape.customProperties,Editor.commonEdgeProperties)),O(U.shape.customProperties));k=k.getAttribute("customProperties");if(null!=k)try{O(JSON.parse(k))}catch(V){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&+!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var A={},I=k.vertices,T=k.edges,O=0;O<I.length;O++)this.findCommonProperties(I[O],A,0==O,k);for(O=0;O<T.length;O++)this.findCommonProperties(T[O],A,0==I.length&&0==O,k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(A).length&&this.container.appendChild(this.addProperties(this.createPanel(),A,k))}};var f=StyleFormatPanel.prototype.addStyleOps;+StyleFormatPanel.prototype.addStyleOps=function(k){var A=this.editorUi.getSelectionState();1==A.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=A.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);f.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,A,I,T){function O(Ea,x,L,R,W){if(null!=L.valueChanged)L.valueChanged(x,W);else{wa.getModel().beginUpdate();try{W=[];var ja=[];if(null!=L.index){for(var ka=+[],oa=L.parentRow.nextSibling;oa&&oa.getAttribute("data-pName")==Ea;)ka.push(oa.getAttribute("data-pValue")),oa=oa.nextSibling;L.index<ka.length?null!=R?ka.splice(R,1):ka[L.index]=x:ka.push(x);null!=L.size&&ka.length>L.size&&(ka=ka.slice(0,L.size));x=ka.join(",");null!=L.countProperty&&(wa.setCellStyles(L.countProperty,ka.length,wa.getSelectionCells()),W.push(L.countProperty),ja.push(ka.length))}wa.setCellStyles(Ea,x,wa.getSelectionCells());W.push(Ea);ja.push(x);if(null!=L.dependentProps)for(Ea=0;Ea<+L.dependentProps.length;Ea++){var va=L.dependentPropsDefVal[Ea],ta=L.dependentPropsVals[Ea];if(ta.length>x)ta=ta.slice(0,x);else for(var xa=ta.length;xa<x;xa++)ta.push(va);ta=ta.join(",");wa.setCellStyles(L.dependentProps[Ea],ta,wa.getSelectionCells());W.push(L.dependentProps[Ea]);ja.push(ta)}if("function"==typeof L.onChange)L.onChange(wa,x);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",W,"values",ja,"cells",wa.getSelectionCells()))}finally{wa.getModel().endUpdate()}}}function U(Ea,+x,L){var R=mxUtils.getOffset(k,!0),W=mxUtils.getOffset(Ea,!0);x.style.position="absolute";x.style.left=W.x-R.x+"px";x.style.top=W.y-R.y+"px";x.style.width=Ea.offsetWidth+"px";x.style.height=Ea.offsetHeight-(L?4:0)+"px";x.style.zIndex=5}function V(Ea,x,L){function R(ja){if(null==ja||ja==mxConstants.NONE)W.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==ja)W.style.background="";else{var ka=mxUtils.getLightDarkColor(ja);mxUtils.isLightDarkColor(ja)&&ka.light!=ka.dark?W.style.background=+"linear-gradient(to right bottom, "+ka.cssText+" 50%, "+mxUtils.invertLightDarkColor(ka).cssText+" 50.3%)":W.style.background=ja}}var W=document.createElement("div");W.style.width="32px";W.style.height="8px";W.style.margin="2px";W.style.borderStyle="solid";W.style.borderWidth="1px";R(x);btn=mxUtils.button("",mxUtils.bind(qa,function(ja){this.editorUi.pickColor(x,function(ka){O(Ea,ka,L);R(ka)});mxEvent.consume(ja)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft=+"1px";btn.className="geColorBtn";btn.appendChild(W);return btn}function ba(Ea,x,L,R,W,ja,ka){null!=x&&(x=x.split(","),Aa.push({name:Ea,values:x,type:L,defVal:R,countProperty:W,parentRow:ja,isDeletable:!0,flipBkg:ka}));btn=mxUtils.button("+",mxUtils.bind(qa,function(oa){for(var va=ja,ta=0;null!=va.nextSibling;)if(va.nextSibling.getAttribute("data-pName")==Ea)va=va.nextSibling,ta++;else break;var xa={type:L,parentRow:ja,index:ta,isDeletable:!0,defVal:R,countProperty:W};ta=sa(Ea,"",xa,0==ta%2,ka);O(Ea,+R,xa);va.parentNode.insertBefore(ta,va.nextSibling);mxEvent.consume(oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function fa(Ea,x,L,R,W,ja,ka){if(0<W){var oa=Array(W);x=null!=x?x.split(","):[];for(var va=0;va<W;va++)oa[va]=null!=x[va]?x[va]:null!=R?R:"";Aa.push({name:Ea,values:oa,type:L,defVal:R,parentRow:ja,flipBkg:ka,size:W})}return document.createElement("div")}function pa(Ea,x,L){var R=document.createElement("input");R.type="checkbox";R.checked="1"==+x;mxEvent.addListener(R,"change",function(){O(Ea,R.checked?"1":"0",L)});return R}function sa(Ea,x,L,R,W){var ja=L.dispName,ka=L.type,oa=document.createElement("tr");oa.className="gePropRow"+(W?"Dark":"")+(R?"Alt":"")+" gePropNonHeaderRow";oa.setAttribute("data-pName",Ea);oa.setAttribute("data-pValue",x);R=!1;null!=L.index&&(oa.setAttribute("data-index",L.index),ja=(null!=ja?ja:"")+"["+L.index+"]",R=!0);var va=document.createElement("td");va.className="gePropRowCell";ja=mxResources.get(ja,null,ja);+mxUtils.write(va,ja);va.setAttribute("title",ja);R&&(va.style.textAlign="right");oa.appendChild(va);va=document.createElement("td");va.className="gePropRowCell";va.setAttribute("title",null!=x?x:mxResources.get("none"));if("color"==ka)va.appendChild(V(Ea,x,L));else if("bool"==ka||"boolean"==ka)va.appendChild(pa(Ea,x,L));else if("enum"==ka){var ta=L.enumList;for(W=0;W<ta.length;W++)if(ja=ta[W],ja.val==x){mxUtils.write(va,mxResources.get(ja.dispName,null,ja.dispName));break}mxEvent.addListener(va,"click",+mxUtils.bind(qa,function(){var xa=document.createElement("select"),Fa=null;U(va,xa);for(var Ma=0;Ma<ta.length;Ma++){var Wa=ta[Ma],Xa=document.createElement("option");Xa.value=mxUtils.htmlEntities(Wa.val);mxUtils.write(Xa,mxResources.get(Wa.dispName,null,Wa.dispName));xa.appendChild(Xa);null==Wa.val&&(Xa.value="null",Fa=Xa)}xa.value=null==x&&null!=Fa?"null":x;k.appendChild(xa);mxEvent.addListener(xa,"change",function(){var ab=mxUtils.htmlEntities(xa.value);if(xa[xa.selectedIndex]==Fa||"null"==ab.value)ab=+null;O(Ea,ab,L)});xa.focus();mxEvent.addListener(xa,"blur",function(){k.removeChild(xa)})}))}else"dynamicArr"==ka?va.appendChild(ba(Ea,x,L.subType,L.subDefVal,L.countProperty,oa,W)):"staticArr"==ka?va.appendChild(fa(Ea,x,L.subType,L.subDefVal,L.size,oa,W)):"readOnly"==ka?(W=document.createElement("input"),W.setAttribute("readonly",""),W.value=x,W.style.borderWidth="0px","id"==Ea?(W.style.width="190px",W.style.position="relative",W.style.right="6px",W.style.float="right",W.style.background="none",+W.style.textAlign="right",oa.firstChild.setAttribute("colspan","2"),W.setAttribute("title",x),oa.firstChild.appendChild(W)):(W.style.width="96px",va.appendChild(W))):(va.innerHTML=mxUtils.htmlEntities(decodeURIComponent(x)),mxEvent.addListener(va,"click",mxUtils.bind(qa,function(){function xa(){var Ma=Fa.value;Ma=0==Ma.length&&"string"!=ka&&"numbers"!=ka?0:Ma;L.allowAuto&&(null!=Ma.trim&&"auto"==Ma.trim().toLowerCase()?(Ma="auto",ka="string"):(Ma=parseFloat(Ma),Ma=isNaN(Ma)?0:Ma));null!=L.min&&Ma<+L.min?Ma=L.min:null!=L.max&&Ma>L.max&&(Ma=L.max);var Wa=null;try{Wa="numbers"==ka?Ma.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ka?parseInt(Ma):Ma)+"")}catch(Xa){}O(Ea,Wa,L,null,Fa)}var Fa=document.createElement("input");U(va,Fa,!0);Fa.value=decodeURIComponent(x);Fa.className="gePropEditor";"int"!=ka&&"float"!=ka||L.allowAuto||(Fa.type="number",Fa.step="int"==ka?"1":"any",null!=L.min&&(Fa.min=parseFloat(L.min)),null!=L.max&&(Fa.max=parseFloat(L.max)));k.appendChild(Fa);mxEvent.addListener(Fa,+"keypress",function(Ma){13==Ma.keyCode&&xa()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){xa()})})));L.isDeletable&&(W=mxUtils.button("-",mxUtils.bind(qa,function(xa){O(Ea,"",L,L.index);mxEvent.consume(xa)})),W.style.height="16px",W.style.width="25px",W.style.float="right",W.className="geColorBtn",va.appendChild(W));oa.appendChild(va);return oa}var qa=this,wa=this.editorUi.editor.graph,Aa=[];k.style.position="relative";k.style.padding="0";var za=document.createElement("table");za.className=+"geProperties";za.style.whiteSpace="nowrap";za.style.width="100%";var Da=document.createElement("tr");Da.className="gePropHeader";var ra=document.createElement("th");ra.className="gePropHeaderCell";ra.style.paddingLeft="16px";ra.style.backgroundRepeat="no-repeat";ra.style.backgroundPosition="-2px 50%";ra.style.backgroundSize="20px";mxUtils.write(ra,mxResources.get("property"));Da.style.cursor="pointer";var ya=function(){var Ea=za.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){ra.style.backgroundImage=+"url('"+Editor.arrowRightImage+"')";var x="none";for(var L=k.childNodes.length-1;0<=L;L--)try{var R=k.childNodes[L],W=R.nodeName.toUpperCase();"INPUT"!=W&&"SELECT"!=W||k.removeChild(R)}catch(ja){}}else ra.style.backgroundImage="url('"+Editor.arrowDownImage+"')",x="";for(L=0;L<Ea.length;L++)Ea[L].style.display=x};mxEvent.addListener(Da,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;ya()});Da.appendChild(ra);var Ca=document.createElement("th");Ca.className="gePropHeaderCell";+Ca.style.paddingLeft="4px";mxUtils.write(Ca,mxResources.get("value"));Da.appendChild(Ca);za.appendChild(Da);var Ka=Ca=!1;Da=null;1==I.vertices.length&&0==I.edges.length?Da=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(Da=I.edges[0].id);null==Da||T||za.appendChild(sa("id",mxUtils.htmlEntities(Da),{dispName:"id",type:"readOnly"},!0,!1));for(var Ha in A)if(T=A[Ha],"function"!=typeof T.isVisible||T.isVisible(I,this)){var Ba=null!=T.getValue?T.getValue():null!=I.style[Ha]?mxUtils.htmlEntities(I.style[Ha]++""):null!=T.getDefaultValue?T.getDefaultValue(I,this):T.defVal;if("separator"==T.type)Ka=!Ka;else{if("staticArr"==T.type)T.size=parseInt(I.style[T.sizeProperty]||A[T.sizeProperty].defVal)||0;else if(null!=T.dependentProps){var Pa=T.dependentProps,$a=[],Na=[];for(Da=0;Da<Pa.length;Da++){var Ya=I.style[Pa[Da]];Na.push(A[Pa[Da]].subDefVal);$a.push(null!=Ya?Ya.split(","):[])}T.dependentPropsDefVal=Na;T.dependentPropsVals=$a}za.appendChild(sa(Ha,Ba,T,Ca,Ka));Ca=!Ca}}for(Da=0;Da<Aa.length;Da++)for(T=Aa[Da],+A=T.parentRow,I=0;I<T.values.length;I++)Ha=sa(T.name,T.values[I],{type:T.type,parentRow:T.parentRow,isDeletable:T.isDeletable,index:I,defVal:T.defVal,countProperty:T.countProperty,size:T.size},0==I%2,T.flipBkg),A.parentNode.insertBefore(Ha,A.nextSibling),A=Ha;k.appendChild(za);ya();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var A=function(Aa){mxEvent.addListener(Aa,"mouseenter",function(){Aa.style.opacity="1"});mxEvent.addListener(Aa,"mouseleave",+function(){Aa.style.opacity="0.5"})},I=this.editorUi,T=I.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px";O.style.paddingRight="20px";k.style.paddingLeft="16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(O);var U=document.createElement("div");U.style.whiteSpace="nowrap";U.style.position="relative";U.style.textAlign="center";U.style.width="210px";for(var V=[],ba=0;ba<this.defaultColorSchemes.length;ba++){var fa=document.createElement("div");+fa.style.display="inline-block";fa.style.width="6px";fa.style.height="6px";fa.style.marginLeft="4px";fa.style.marginRight="3px";fa.style.borderRadius="3px";fa.style.cursor="pointer";fa.style.background="transparent";fa.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Aa){mxEvent.addListener(fa,"click",mxUtils.bind(this,function(){pa(Aa)}))})(ba);V.push(fa);U.appendChild(fa)}var pa=mxUtils.bind(this,function(Aa){null!=V[Aa]&&(null!=this.format.currentScheme&&null!=V[this.format.currentScheme]&&+(V[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Aa,sa(this.defaultColorSchemes[this.format.currentScheme]),V[this.format.currentScheme].style.background="#84d7ff")}),sa=mxUtils.bind(this,function(Aa){var za=mxUtils.clone(T.defaultVertexStyle);za[mxConstants.STYLE_STROKECOLOR]=null!=za[mxConstants.STYLE_STROKECOLOR]?za[mxConstants.STYLE_STROKECOLOR]:"default";za[mxConstants.STYLE_FILLCOLOR]=null!=za[mxConstants.STYLE_FILLCOLOR]?za[mxConstants.STYLE_FILLCOLOR]:+"default";za[mxConstants.STYLE_FONTCOLOR]=null!=za[mxConstants.STYLE_FONTCOLOR]?za[mxConstants.STYLE_FONTCOLOR]:"default";T.replaceDefaultColors(new mxCell,za);var Da=mxUtils.bind(this,function(ya){var Ca=mxUtils.button("",mxUtils.bind(this,function(Ba){T.getModel().beginUpdate();try{for(var Pa=I.getSelectionState().cells,$a=0;$a<Pa.length;$a++){var Na=T.getModel().getStyle(Pa[$a]);null!=ya?(mxEvent.isShiftDown(Ba)||(Na=""==ya.fill||null==ya.fill?mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,null):+mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,ya.fill),Na=""==ya.gradient||null==ya.gradient?mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,ya.gradient),mxEvent.isControlDown(Ba)||mxClient.IS_MAC&&mxEvent.isMetaDown(Ba)||!T.getModel().isVertex(Pa[$a])||(Na=""==ya.font||null==ya.font?mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,ya.font))),mxEvent.isAltDown(Ba)||(Na=""==ya.stroke||+null==ya.fill?mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,ya.stroke))):(Na=mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,null),Na=mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,null),Na=mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,null),T.getModel().isVertex(Pa[$a])&&(Na=mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,null)));T.getModel().setStyle(Pa[$a],Na)}}finally{T.getModel().endUpdate()}}));Ca.className="geStyleButton";+Ca.style.width="36px";Ca.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ca.style.margin="0px 6px 6px 0px";if(null!=ya){var Ka="1px solid";null!=ya.border&&(Ka=ya.border);if(null!=ya.gradient)Ca.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(ya.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(ya.gradient).cssText+" 100%)";else if(ya.fill==mxConstants.NONE)Ca.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==ya.fill||""==ya.fill)Ca.style.backgroundColor=+mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var Ha=mxUtils.getLightDarkColor(ya.fill);Ca.style.backgroundImage="linear-gradient(to right bottom, "+Ha.cssText+" 50%, "+Ha.light+" 50.3%)"}null==ya.stroke||ya.stroke==mxConstants.NONE?Ca.style.border=Ka+" transparent":""==ya.stroke?Ca.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(Ha=mxUtils.getLightDarkColor(ya.stroke),Ca.style.border=+Ka+" "+Ha.cssText,Ca.style.borderRightColor=Ha.light,Ca.style.borderBottomColor=Ca.style.borderRightColor);null!=ya.title&&Ca.setAttribute("title",ya.title)}else Ka=mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff"),Ha=mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000"),Ca.style.backgroundColor=Ka,Ca.style.border="1px solid "+Ha;Ca.style.borderRadius="0";O.appendChild(Ca);null!=ya&&null!=ya.gradient&&(Ka=Ca.cloneNode(!1),Ka.style.backgroundImage="linear-gradient(light-dark(transparent, "++mxUtils.getLightDarkColor(ya.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ya.gradient).light+") 100%)",Ka.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ka.style.backgroundColor="transparent",O.appendChild(Ka),Ka.style.marginLeft="-42px",mxEvent.addListener(Ka,"click",function(){Ca.click()}))});O.innerText="";if(null!=Aa)for(var ra=0;ra<Aa.length;ra++)0<ra&&0==mxUtils.mod(ra,4)&&mxUtils.br(O),Da(Aa[ra])});null==this.format.currentScheme?pa(Math.min(V.length-1,Editor.isDarkMode()?+1:"1"==urlParams.sketch?5:0)):pa(this.format.currentScheme);ba=10>=this.defaultColorSchemes.length?28:8;var qa=document.createElement("div");qa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ba+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";+mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var wa=document.createElement("div");wa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ba+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";+1<this.defaultColorSchemes.length&&(k.appendChild(qa),k.appendChild(wa));mxEvent.addListener(wa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));A(qa);A(wa);sa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(U)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.isGoogleFontUrl=function(k){return k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return k};Graph.createFontElement=function(k,A){var I=Graph.fontMapping[A];null==I&&Graph.isCssFontUrl(A)?(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(A))):(null==I&&(I='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+A+'");\n}'),k=document.createElement("style"),mxUtils.write(k,I));return k};Graph.addRecentCustomFont=function(k,A){};Graph.addFont=function(k,A,I){if(null!=k&&0<k.length&&null!=-A&&0<A.length){var U=k.toLowerCase();if("helvetica"!=U&&"arial"!=k&&"sans-serif"!=U){var O=Graph.customFontElements[U];null!=O&&O.url!=A&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=A,"http:"==A.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(A)),O={name:k,url:A,elt:Graph.createFontElement(k,O)},Graph.customFontElements[U]=O,A=document.getElementsByTagName("head")[0],null!=I&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=I,O.elt.onerror=I):I()),null!=A&&A.appendChild(O.elt)):-null!=I&&I()}else null!=I&&I()}else null!=I&&I();return k};Graph.getFontUrl=function(k,A){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(A=k.url);return A};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var A=0;A<k.length;A++){var I=k[A].getAttribute("data-font-src");if(null!=I){var U="FONT"==k[A].nodeName?k[A].getAttribute("face"):k[A].style.fontFamily;null!=U&&Graph.addFont(U,I)}}};Graph.processFontStyle=function(k){if(null!=k){var A=mxUtils.getValue(k,"fontSource",-null);if(null!=A){var I=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=I)try{Graph.addFont(I,decodeURIComponent(A))}catch(U){}}}return k};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur=+A&&0<A.length){var T=k.toLowerCase();if("helvetica"!=T&&"arial"!=k&&"sans-serif"!=T){var O=Graph.customFontElements[T];null!=O&&O.url!=A&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=A,"http:"==A.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(A)),O={name:k,url:A,elt:Graph.createFontElement(k,O)},Graph.customFontElements[T]=O,A=document.getElementsByTagName("head")[0],null!=I&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=I,O.elt.onerror=I):I()),null!=A&&A.appendChild(O.elt)):+null!=I&&I()}else null!=I&&I()}else null!=I&&I();return k};Graph.getFontUrl=function(k,A){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(A=k.url);return A};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var A=0;A<k.length;A++){var I=k[A].getAttribute("data-font-src");if(null!=I){var T="FONT"==k[A].nodeName?k[A].getAttribute("face"):k[A].style.fontFamily;null!=T&&Graph.addFont(T,I)}}};Graph.processFontStyle=function(k){if(null!=k){var A=mxUtils.getValue(k,"fontSource",+null);if(null!=A){var I=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=I)try{Graph.addFont(I,decodeURIComponent(A))}catch(T){}}}return k};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var l=Graph.prototype.init;Graph.prototype.init=function(){function k(O){A=O}l.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var A=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(O){A=null});this.isMouseInsertPoint=function(){return null!=-A};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=A?this.getPointForEvent(A):I.apply(this,arguments)};var U=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var S=this.graph.getCellStyle(O);if(null!=S&&"rack"==S.childLayout){var X=new mxStackLayout(this.graph,!1);X.gridSize=null!=S.rackUnitSize?parseFloat(S.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;X.marginLeft=S.marginLeft||0;X.marginRight=S.marginRight||0;X.marginTop=-S.marginTop||0;X.marginBottom=S.marginBottom||0;X.allowGaps=S.allowGaps||0;X.horizontal="1"==mxUtils.getValue(S,"horizontalRack","0");X.resizeParent=!1;X.fill=!0;return X}return U.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,A){return Graph.processFontStyle(t.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,A,I,U,O,S,X,aa,ja,-pa,sa,qa){z.apply(this,arguments);Graph.processFontAttributes(qa)};var C=mxText.prototype.redraw;mxText.prototype.redraw=function(){C.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,A,I,U){function O(){for(var Ea=aa.getSelectionCells(),ra=[],ya=0;ya<Ea.length;ya++)aa.isCellVisible(Ea[ya])&&ra.push(Ea[ya]);aa.setSelectionCells(ra)}function S(Ea){aa.setHiddenTags(Ea?[]:ja.slice());O();aa.refresh()}-function X(Ea,ra){sa.innerText="";if(0<Ea.length){var ya=document.createElement("table");ya.setAttribute("cellpadding","2");ya.style.boxSizing="border-box";ya.style.tableLayout="fixed";ya.style.width="100%";var Ca=document.createElement("tbody");if(null!=Ea&&0<Ea.length)for(var Ma=0;Ma<Ea.length;Ma++)(function(Ha){function Aa(){var x=aa.getCellsForTags([Ha],null,null,!0);aa.isEnabled()?aa.setSelectionCells(x):aa.highlightCells(x,null,null,70)}var Ra=0>mxUtils.indexOf(aa.hiddenTags,Ha),Za=document.createElement("tr"),-La=document.createElement("td");La.style.align="center";La.style.width="16px";var $a=document.createElement("img");$a.setAttribute("src",Ra?Editor.visibleImage:Editor.hiddenImage);$a.setAttribute("title",mxResources.get(Ra?"hideIt":"show",[Ha]));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter="invert(100%)";La.appendChild($a);mxEvent.addListener($a,"click",function(x){mxEvent.isShiftDown(x)?-S(0<=mxUtils.indexOf(aa.hiddenTags,Ha)):(aa.toggleHiddenTag(Ha),O(),aa.refresh());mxEvent.consume(x)});Za.appendChild(La);La=document.createElement("td");La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.selectImage);$a.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter=-"invert(100%)";mxEvent.addListener($a,"click",function(x){S(!0);Aa();mxEvent.consume(x)});La.appendChild($a);Za.appendChild(La);La=document.createElement("td");La.style.overflow="hidden";La.style.whiteSpace="nowrap";La.style.textOverflow="ellipsis";La.style.verticalAlign="middle";La.style.cursor="pointer";La.setAttribute("title",Ha);a=document.createElement("a");mxUtils.write(a,Ha);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ra?100:40);La.appendChild(a);mxEvent.addListener(La,-"click",function(x){if(mxEvent.isShiftDown(x))S(!0),Aa();else if(Ra&&0<aa.hiddenTags.length)S(!0);else{var M=ja.slice(),Q=mxUtils.indexOf(M,Ha);M.splice(Q,1);aa.setHiddenTags(M);O();aa.refresh()}mxEvent.consume(x)});Za.appendChild(La);if(aa.isEnabled()){La=document.createElement("td");La.style.verticalAlign="middle";La.style.textAlign="center";La.style.width="18px";if(null==ra){La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.trashImage);-$a.setAttribute("title",mxResources.get("removeIt",[Ha]));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter="invert(100%)";mxEvent.addListener($a,"click",function(x){var M=mxUtils.indexOf(ja,Ha);0<=M&&ja.splice(M,1);aa.removeTagsForCells(aa.model.getDescendants(aa.model.getRoot()),[Ha]);aa.refresh();mxEvent.consume(x)});La.appendChild($a)}else{var Da=document.createElement("input");-Da.setAttribute("type","checkbox");Da.style.margin="0px";Da.defaultChecked=null!=ra&&0<=mxUtils.indexOf(ra,Ha);Da.checked=Da.defaultChecked;Da.style.background="transparent";Da.setAttribute("title",mxResources.get(Da.defaultChecked?"removeIt":"add",[Ha]));mxEvent.addListener(Da,"change",function(x){Da.checked?aa.addTagsForCells(aa.getSelectionCells(),[Ha]):aa.removeTagsForCells(aa.getSelectionCells(),[Ha]);mxEvent.consume(x)});La.appendChild(Da)}Za.appendChild(La)}Ca.appendChild(Za)})(Ea[Ma]);ya.appendChild(Ca);-sa.appendChild(ya)}}var aa=this,ja=aa.hiddenTags.slice(),pa=document.createElement("div");pa.style.userSelect="none";pa.style.overflow="hidden";pa.style.padding="10px";pa.style.height="100%";var sa=document.createElement("div");sa.style.position="absolute";sa.style.boxSizing="border-box";sa.style.userSelect="none";sa.style.overflow="auto";sa.style.padding="3px";sa.style.left="0px";sa.style.right="0px";sa.style.top="0px";sa.style.bottom="0px";pa.appendChild(sa);aa.addListener(mxEvent.ROOT,function(){ja=-aa.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Ea,ra){if(k()){Ea=aa.getAllTags();for(ra=0;ra<Ea.length;ra++)0>mxUtils.indexOf(ja,Ea[ra])&&ja.push(Ea[ra]);ja.sort();aa.isSelectionEmpty()?X(ja):X(ja,aa.getCommonTagsForCells(aa.getSelectionCells()))}});aa.selectionModel.addListener(mxEvent.CHANGE,qa);aa.model.addListener(mxEvent.CHANGE,qa);aa.addListener(mxEvent.REFRESH,qa);var wa=document.createElement("div");wa.className="geToolbarContainer";wa.style.position="absolute";wa.style.display=-"flex";wa.style.bottom="0px";wa.style.left="0px";wa.style.right="0px";wa.style.height="26px";wa.style.overflow="hidden";wa.style.padding="3px 4px 4px 4px";wa.style.borderWidth="1px 0px 0px 0px";wa.style.borderStyle="solid";wa.style.whiteSpace="nowrap";if(aa.isEnabled()){sa.style.bottom="34px";var Ba=document.createElement("a");Ba.className="geToolbarButton geAdaptiveAsset geToggleItem";Ba.style.width="16px";Ba.style.height="18px";Ba.style.backgroundPosition="center center";Ba.style.backgroundRepeat=-"no-repeat";Ba.style.backgroundSize="20px";Ba.style.margin="0 2px";Ba.style.display="inline-block";Ba.style.cursor="pointer";var za=Ba.cloneNode(!1);za.style.backgroundImage="url("+Editor.visibleImage+")";za.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(za,"click",function(Ea){aa.setHiddenTags([]);mxEvent.isShiftDown(Ea)||(ja=aa.hiddenTags.slice());O();aa.refresh();mxEvent.consume(Ea)});wa.appendChild(za);null!=I&&(Ba=Ba.cloneNode(!1),Ba.style.backgroundImage="url("+Editor.plusImage+-")",Ba.setAttribute("title",mxResources.get("add")),mxEvent.addListener(Ba,"click",function(Ea){I(ja,function(ra){ja=ra;qa()});mxEvent.consume(Ea)}),wa.appendChild(Ba));pa.appendChild(wa)}null!=U&&wa.appendChild(U);return{div:pa,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var A in Graph.customFontElements){var I=Graph.customFontElements[A];k.push({name:I.name,url:I.url})}return k};Graph.prototype.setFont=function(k,A){Graph.addFont(k,A);var I=-Editor.guid();document.execCommand("fontname",!1,I);for(var U=this.cellEditor.textarea.getElementsByTagName("font"),O=!1,S=0;S<U.length;S++)U[S].getAttribute("face")==I&&(O=!0,U[S].setAttribute("face",k),null!=A?U[S].setAttribute("data-font-src",A):U[S].removeAttribute("data-font-src"));O||document.execCommand("fontname",!1,k)};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=+A};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=A?this.getPointForEvent(A):I.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var U=this.graph.getCellStyle(O);if(null!=U&&"rack"==U.childLayout){var V=new mxStackLayout(this.graph,!1);V.gridSize=null!=U.rackUnitSize?parseFloat(U.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;V.marginLeft=U.marginLeft||0;V.marginRight=U.marginRight||0;V.marginTop=+U.marginTop||0;V.marginBottom=U.marginBottom||0;V.allowGaps=U.allowGaps||0;V.horizontal="1"==mxUtils.getValue(U,"horizontalRack","0");V.resizeParent=!1;V.fill=!0;return V}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,A){return Graph.processFontStyle(t.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,A,I,T,O,U,V,ba,fa,+pa,sa,qa){z.apply(this,arguments);Graph.processFontAttributes(qa)};var C=mxText.prototype.redraw;mxText.prototype.redraw=function(){C.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,A,I,T){function O(){for(var Da=ba.getSelectionCells(),ra=[],ya=0;ya<Da.length;ya++)ba.isCellVisible(Da[ya])&&ra.push(Da[ya]);ba.setSelectionCells(ra)}function U(Da){ba.setHiddenTags(Da?[]:fa.slice());O();ba.refresh()}+function V(Da,ra){sa.innerText="";if(0<Da.length){var ya=document.createElement("table");ya.setAttribute("cellpadding","2");ya.style.boxSizing="border-box";ya.style.tableLayout="fixed";ya.style.width="100%";var Ca=document.createElement("tbody");if(null!=Da&&0<Da.length)for(var Ka=0;Ka<Da.length;Ka++)(function(Ha){function Ba(){var x=ba.getCellsForTags([Ha],null,null,!0);ba.isEnabled()?ba.setSelectionCells(x):ba.highlightCells(x,null,null,70)}var Pa=0>mxUtils.indexOf(ba.hiddenTags,Ha),$a=document.createElement("tr"),+Na=document.createElement("td");Na.style.align="center";Na.style.width="16px";var Ya=document.createElement("img");Ya.setAttribute("src",Pa?Editor.visibleImage:Editor.hiddenImage);Ya.setAttribute("title",mxResources.get(Pa?"hideIt":"show",[Ha]));mxUtils.setOpacity(Ya,Pa?75:25);Ya.className="geAdaptiveAsset";Ya.style.verticalAlign="middle";Ya.style.cursor="pointer";Ya.style.width="16px";if(A||Editor.isDarkMode())Ya.style.filter="invert(100%)";Na.appendChild(Ya);mxEvent.addListener(Ya,"click",function(x){mxEvent.isShiftDown(x)?+U(0<=mxUtils.indexOf(ba.hiddenTags,Ha)):(ba.toggleHiddenTag(Ha),O(),ba.refresh());mxEvent.consume(x)});$a.appendChild(Na);Na=document.createElement("td");Na.style.align="center";Na.style.width="16px";Ya=document.createElement("img");Ya.setAttribute("src",Editor.selectImage);Ya.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Ya,Pa?75:25);Ya.className="geAdaptiveAsset";Ya.style.verticalAlign="middle";Ya.style.cursor="pointer";Ya.style.width="16px";if(A||Editor.isDarkMode())Ya.style.filter=+"invert(100%)";mxEvent.addListener(Ya,"click",function(x){U(!0);Ba();mxEvent.consume(x)});Na.appendChild(Ya);$a.appendChild(Na);Na=document.createElement("td");Na.style.overflow="hidden";Na.style.whiteSpace="nowrap";Na.style.textOverflow="ellipsis";Na.style.verticalAlign="middle";Na.style.cursor="pointer";Na.setAttribute("title",Ha);a=document.createElement("a");mxUtils.write(a,Ha);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Pa?100:40);Na.appendChild(a);mxEvent.addListener(Na,+"click",function(x){if(mxEvent.isShiftDown(x))U(!0),Ba();else if(Pa&&0<ba.hiddenTags.length)U(!0);else{var L=fa.slice(),R=mxUtils.indexOf(L,Ha);L.splice(R,1);ba.setHiddenTags(L);O();ba.refresh()}mxEvent.consume(x)});$a.appendChild(Na);if(ba.isEnabled()){Na=document.createElement("td");Na.style.verticalAlign="middle";Na.style.textAlign="center";Na.style.width="18px";if(null==ra){Na.style.align="center";Na.style.width="16px";Ya=document.createElement("img");Ya.setAttribute("src",Editor.trashImage);+Ya.setAttribute("title",mxResources.get("removeIt",[Ha]));mxUtils.setOpacity(Ya,Pa?75:25);Ya.className="geAdaptiveAsset";Ya.style.verticalAlign="middle";Ya.style.cursor="pointer";Ya.style.width="16px";if(A||Editor.isDarkMode())Ya.style.filter="invert(100%)";mxEvent.addListener(Ya,"click",function(x){var L=mxUtils.indexOf(fa,Ha);0<=L&&fa.splice(L,1);ba.removeTagsForCells(ba.model.getDescendants(ba.model.getRoot()),[Ha]);ba.refresh();mxEvent.consume(x)});Na.appendChild(Ya)}else{var Ea=document.createElement("input");+Ea.setAttribute("type","checkbox");Ea.style.margin="0px";Ea.defaultChecked=null!=ra&&0<=mxUtils.indexOf(ra,Ha);Ea.checked=Ea.defaultChecked;Ea.style.background="transparent";Ea.setAttribute("title",mxResources.get(Ea.defaultChecked?"removeIt":"add",[Ha]));mxEvent.addListener(Ea,"change",function(x){Ea.checked?ba.addTagsForCells(ba.getSelectionCells(),[Ha]):ba.removeTagsForCells(ba.getSelectionCells(),[Ha]);mxEvent.consume(x)});Na.appendChild(Ea)}$a.appendChild(Na)}Ca.appendChild($a)})(Da[Ka]);ya.appendChild(Ca);+sa.appendChild(ya)}}var ba=this,fa=ba.hiddenTags.slice(),pa=document.createElement("div");pa.style.userSelect="none";pa.style.overflow="hidden";pa.style.padding="10px";pa.style.height="100%";var sa=document.createElement("div");sa.style.position="absolute";sa.style.boxSizing="border-box";sa.style.userSelect="none";sa.style.overflow="auto";sa.style.padding="3px";sa.style.left="0px";sa.style.right="0px";sa.style.top="0px";sa.style.bottom="0px";pa.appendChild(sa);ba.addListener(mxEvent.ROOT,function(){fa=+ba.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Da,ra){if(k()){Da=ba.getAllTags();for(ra=0;ra<Da.length;ra++)0>mxUtils.indexOf(fa,Da[ra])&&fa.push(Da[ra]);fa.sort();ba.isSelectionEmpty()?V(fa):V(fa,ba.getCommonTagsForCells(ba.getSelectionCells()))}});ba.selectionModel.addListener(mxEvent.CHANGE,qa);ba.model.addListener(mxEvent.CHANGE,qa);ba.addListener(mxEvent.REFRESH,qa);var wa=document.createElement("div");wa.className="geToolbarContainer";wa.style.position="absolute";wa.style.display=+"flex";wa.style.bottom="0px";wa.style.left="0px";wa.style.right="0px";wa.style.height="26px";wa.style.overflow="hidden";wa.style.padding="3px 4px 4px 4px";wa.style.borderWidth="1px 0px 0px 0px";wa.style.borderStyle="solid";wa.style.whiteSpace="nowrap";if(ba.isEnabled()){sa.style.bottom="34px";var Aa=document.createElement("a");Aa.className="geToolbarButton geAdaptiveAsset geToggleItem";Aa.style.width="16px";Aa.style.height="18px";Aa.style.backgroundPosition="center center";Aa.style.backgroundRepeat=+"no-repeat";Aa.style.backgroundSize="20px";Aa.style.margin="0 2px";Aa.style.display="inline-block";Aa.style.cursor="pointer";var za=Aa.cloneNode(!1);za.style.backgroundImage="url("+Editor.visibleImage+")";za.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(za,"click",function(Da){ba.setHiddenTags([]);mxEvent.isShiftDown(Da)||(fa=ba.hiddenTags.slice());O();ba.refresh();mxEvent.consume(Da)});wa.appendChild(za);null!=I&&(Aa=Aa.cloneNode(!1),Aa.style.backgroundImage="url("+Editor.plusImage++")",Aa.setAttribute("title",mxResources.get("add")),mxEvent.addListener(Aa,"click",function(Da){I(fa,function(ra){fa=ra;qa()});mxEvent.consume(Da)}),wa.appendChild(Aa));pa.appendChild(wa)}null!=T&&wa.appendChild(T);return{div:pa,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var A in Graph.customFontElements){var I=Graph.customFontElements[A];k.push({name:I.name,url:I.url})}return k};Graph.prototype.setFont=function(k,A){Graph.addFont(k,A);var I=+Editor.guid();document.execCommand("fontname",!1,I);for(var T=this.cellEditor.textarea.getElementsByTagName("font"),O=!1,U=0;U<T.length;U++)T[U].getAttribute("face")==I&&(O=!0,T[U].setAttribute("face",k),null!=A?T[U].setAttribute("data-font-src",A):T[U].removeAttribute("data-font-src"));O||document.execCommand("fontname",!1,k)};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.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 k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var A in k)this.globalVars[A]=k[A]}catch(I){null!=window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var N=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=-function(k){var A=N.apply(this,arguments);null==A&&null!=this.globalVars&&(A=this.globalVars[k]);return A};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,A,I,U,O,S,X,aa,ja,pa,sa,qa,wa,Ba,za,Ea){var ra=K.apply(this,-arguments);if(null!=qa){var ya=ra.getAttribute("style");null==ya&&(ya="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;ra.setAttribute("style",ya+(" color-scheme: "+qa+";"))}var Ca=this.getCustomFonts();if(sa&&0<Ca.length){var Ma=ra.ownerDocument;ya=null!=Ma.createElementNS?Ma.createElementNS(mxConstants.NS_SVG,"style"):Ma.createElement("style");null!=Ma.setAttributeNS?ya.setAttributeNS("type","text/css"):ya.setAttribute("type","text/css");-for(var Ha="",Aa="",Ra=0;Ra<Ca.length;Ra++){var Za=Ca[Ra].name,La=Ca[Ra].url;Graph.isCssFontUrl(La)?Ha+="@import url("+Graph.rewriteGoogleFontUrl(La)+");\n":Aa+='@font-face {\nfont-family: "'+Za+'";\nsrc: url("'+La+'");\n}\n'}ya.appendChild(Ma.createTextNode(Ha+Aa));ra.getElementsByTagName("defs")[0].appendChild(ya)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ra);this.mathEnabled&&(document.body.appendChild(ra),Editor.MathJaxRender(ra),+function(k){var A=N.apply(this,arguments);null==A&&null!=this.globalVars&&(A=this.globalVars[k]);return A};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,A,I,T,O,U,V,ba,fa,pa,sa,qa,wa,Aa,za,Da){var ra=K.apply(this,+arguments);if(null!=qa){var ya=ra.getAttribute("style");null==ya&&(ya="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;ra.setAttribute("style",ya+(" color-scheme: "+qa+";"))}var Ca=this.getCustomFonts();if(sa&&0<Ca.length){var Ka=ra.ownerDocument;ya=null!=Ka.createElementNS?Ka.createElementNS(mxConstants.NS_SVG,"style"):Ka.createElement("style");null!=Ka.setAttributeNS?ya.setAttributeNS("type","text/css"):ya.setAttribute("type","text/css");+for(var Ha="",Ba="",Pa=0;Pa<Ca.length;Pa++){var $a=Ca[Pa].name,Na=Ca[Pa].url;Graph.isCssFontUrl(Na)?Ha+="@import url("+Graph.rewriteGoogleFontUrl(Na)+");\n":Ba+='@font-face {\nfont-family: "'+$a+'";\nsrc: url("'+Na+'");\n}\n'}ya.appendChild(Ka.createTextNode(Ha+Ba));ra.getElementsByTagName("defs")[0].appendChild(ya)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ra);this.mathEnabled&&(document.body.appendChild(ra),Editor.MathJaxRender(ra),ra.parentNode.removeChild(ra),ya=ra.ownerDocument.getElementById("MJX-SVG-styles"),null!=ya&&ra.getElementsByTagName("defs")[0].appendChild(ya.cloneNode(!0)));return ra};var J=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){J.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var da=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){da.apply(this,arguments);this.enumerationState=0};var ea=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return ea.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(k){var A="1"==mxUtils.getValue(k.style,"enumerate",0);A&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):A||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);A=k.secondLabel;if(null!=A){var I=k.view.scale,-U=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*I,k.y+4*I,0,0):mxRectangle.fromPoint(k.view.getPoint(k));A.bounds.equals(k)&&A.value==U&&A.scale==I||(A.bounds=k,A.value=U,A.scale=I,A.redraw())}};var ca=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ca.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),-this.view.validateBackgroundImage())};var W=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){W.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,A){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,A))};Graph.prototype.executeCustomActions=function(k,A,I){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&-window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var U=!1,O=0,S=0,X=mxUtils.bind(this,function(){U||(U=!0,this.model.beginUpdate())}),aa=mxUtils.bind(this,function(){U&&(U=!1,this.model.endUpdate())}),ja=mxUtils.bind(this,function(){0<O&&O--;0==O&&pa()}),pa=mxUtils.bind(this,function(){if(S<k.length){var sa=this.stoppingCustomActions,qa=-k[S++],wa=[];if(null!=qa.open)if(aa(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,I))return}else this.openLink(qa.open);null==qa.wait||sa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ja()}),O++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),aa());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,-!0)),qa.opacity.value);null!=qa.fadeIn&&(O++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,ja,sa?0:qa.fadeIn.delay));null!=qa.fadeOut&&(O++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,ja,sa?0:qa.fadeOut.delay));null!=qa.wipeIn&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&-(X(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){X();var Ba=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Ba),1);this.setCellsVisible(Ba,!0)}null!=qa.hide&&(X(),Ba=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Ba),0),this.setCellsVisible(Ba,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&(X(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:-"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(X(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));Ba=[];null!=qa.select&&this.isEnabled()&&(Ba=this.getCellsForAction(qa.select),this.setSelectionCells(Ba));null!=qa.highlight&&(Ba=this.getCellsForAction(qa.highlight),this.highlightCells(Ba,qa.highlight.color,qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(Ba=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&-this.fitWindow(qa.viewbox,qa.viewbox.border);0<Ba.length&&this.scrollCellToVisible(Ba[0]);null!=I&&null!=qa.explore&&Graph.exploreFromCell(this,I,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var za=qa.tags.toggle;0==za.length&&(za=this.getAllTags());for(Ba=0;Ba<za.length;Ba++)this.toggleHiddenTag(za[Ba])}za=null;null!=qa.tags.hidden&&(null==za&&(za=[]),za=za.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==za&&(za=[]);var Ea=this.getAllTags();for(Ba=0;Ba<Ea.length;Ba++)0>mxUtils.indexOf(qa.tags.visible,-Ea[Ba])&&0>mxUtils.indexOf(za,Ea[Ba])&&za.push(Ea[Ba])}null!=za&&this.setHiddenTags(za);this.refresh()}0<wa.length&&(O++,this.executeAnimations(wa,ja,sa?1:qa.steps,sa?0:qa.delay));0==O?pa():aa()}else this.stoppingCustomActions=this.executingCustomActions=!1,aa(),null!=A&&A()});pa()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,A){var I=this.getLinkForCell(A);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(A,this.updateCustomLink(k,I));if(this.isHtmlLabel(A)){var U=document.createElement("div");-U.innerHTML=Graph.sanitizeHtml(this.getLabel(A));for(var O=U.getElementsByTagName("a"),S=!1,X=0;X<O.length;X++)I=O[X].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(O[X].setAttribute("href",this.updateCustomLink(k,I)),S=!0);S&&this.labelChanged(A,U.innerHTML)}};Graph.prototype.updateCustomLink=function(k,A){if("data:action/json,"==A.substring(0,17))try{var I=JSON.parse(A.substring(17));null!=I.actions&&(this.updateCustomLinkActions(k,I.actions),A="data:action/json,"+JSON.stringify(I))}catch(U){}return A};-Graph.prototype.updateCustomLinkActions=function(k,A){for(var I=0;I<A.length;I++){var U=A[I],O;for(O in U)this.updateCustomLinkAction(k,U[O],"cells"),this.updateCustomLinkAction(k,U[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,A,I){if(null!=A&&null!=A[I]){for(var U=[],O=0;O<A[I].length;O++)if("*"==A[I][O])U.push(A[I][O]);else{var S=k[A[I][O]];null!=S?""!=S&&U.push(S):U.push(A[I][O])}A[I]=U}};Graph.prototype.getCellsForAction=function(k,A){A=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,-null,A));if(null!=k.excludeCells){for(var I=[],U=0;U<A.length;U++)0>k.excludeCells.indexOf(A[U].id)&&I.push(A[U]);A=I}return A};Graph.prototype.getCellsById=function(k){var A=[];if(null!=k)for(var I=0;I<k.length;I++)if("*"==k[I]){var U=this.model.getRoot();A=A.concat(this.model.filterDescendants(function(S){return S!=U},U))}else{var O=this.model.getCell(k[I]);null!=O&&A.push(O)}return A};var ba=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return ba.apply(this,arguments)&&+T=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*I,k.y+4*I,0,0):mxRectangle.fromPoint(k.view.getPoint(k));A.bounds.equals(k)&&A.value==T&&A.scale==I||(A.bounds=k,A.value=T,A.scale=I,A.redraw())}};var ca=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ca.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),+this.view.validateBackgroundImage())};var X=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){X.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,A){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,A))};Graph.prototype.executeCustomActions=function(k,A,I){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&+window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var T=!1,O=0,U=0,V=mxUtils.bind(this,function(){T||(T=!0,this.model.beginUpdate())}),ba=mxUtils.bind(this,function(){T&&(T=!1,this.model.endUpdate())}),fa=mxUtils.bind(this,function(){0<O&&O--;0==O&&pa()}),pa=mxUtils.bind(this,function(){if(U<k.length){var sa=this.stoppingCustomActions,qa=+k[U++],wa=[];if(null!=qa.open)if(ba(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,I))return}else this.openLink(qa.open);null==qa.wait||sa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;fa()}),O++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),ba());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,+!0)),qa.opacity.value);null!=qa.fadeIn&&(O++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,fa,sa?0:qa.fadeIn.delay));null!=qa.fadeOut&&(O++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,fa,sa?0:qa.fadeOut.delay));null!=qa.wipeIn&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&+(V(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){V();var Aa=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Aa),1);this.setCellsVisible(Aa,!0)}null!=qa.hide&&(V(),Aa=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Aa),0),this.setCellsVisible(Aa,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&(V(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:+"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(V(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));Aa=[];null!=qa.select&&this.isEnabled()&&(Aa=this.getCellsForAction(qa.select),this.setSelectionCells(Aa));null!=qa.highlight&&(Aa=this.getCellsForAction(qa.highlight),this.highlightCells(Aa,qa.highlight.color,qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(Aa=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&+this.fitWindow(qa.viewbox,qa.viewbox.border);0<Aa.length&&this.scrollCellToVisible(Aa[0]);null!=I&&null!=qa.explore&&Graph.exploreFromCell(this,I,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var za=qa.tags.toggle;0==za.length&&(za=this.getAllTags());for(Aa=0;Aa<za.length;Aa++)this.toggleHiddenTag(za[Aa])}za=null;null!=qa.tags.hidden&&(null==za&&(za=[]),za=za.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==za&&(za=[]);var Da=this.getAllTags();for(Aa=0;Aa<Da.length;Aa++)0>mxUtils.indexOf(qa.tags.visible,+Da[Aa])&&0>mxUtils.indexOf(za,Da[Aa])&&za.push(Da[Aa])}null!=za&&this.setHiddenTags(za);this.refresh()}0<wa.length&&(O++,this.executeAnimations(wa,fa,sa?1:qa.steps,sa?0:qa.delay));0==O?pa():ba()}else this.stoppingCustomActions=this.executingCustomActions=!1,ba(),null!=A&&A()});pa()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,A){var I=this.getLinkForCell(A);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(A,this.updateCustomLink(k,I));if(this.isHtmlLabel(A)){var T=document.createElement("div");+T.innerHTML=Graph.sanitizeHtml(this.getLabel(A));for(var O=T.getElementsByTagName("a"),U=!1,V=0;V<O.length;V++)I=O[V].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(O[V].setAttribute("href",this.updateCustomLink(k,I)),U=!0);U&&this.labelChanged(A,T.innerHTML)}};Graph.prototype.updateCustomLink=function(k,A){if("data:action/json,"==A.substring(0,17))try{var I=JSON.parse(A.substring(17));null!=I.actions&&(this.updateCustomLinkActions(k,I.actions),A="data:action/json,"+JSON.stringify(I))}catch(T){}return A};+Graph.prototype.updateCustomLinkActions=function(k,A){for(var I=0;I<A.length;I++){var T=A[I],O;for(O in T)this.updateCustomLinkAction(k,T[O],"cells"),this.updateCustomLinkAction(k,T[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,A,I){if(null!=A&&null!=A[I]){for(var T=[],O=0;O<A[I].length;O++)if("*"==A[I][O])T.push(A[I][O]);else{var U=k[A[I][O]];null!=U?""!=U&&T.push(U):T.push(A[I][O])}A[I]=T}};Graph.prototype.getCellsForAction=function(k,A){A=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,+null,A));if(null!=k.excludeCells){for(var I=[],T=0;T<A.length;T++)0>k.excludeCells.indexOf(A[T].id)&&I.push(A[T]);A=I}return A};Graph.prototype.getCellsById=function(k){var A=[];if(null!=k)for(var I=0;I<k.length;I++)if("*"==k[I]){var T=this.model.getRoot();A=A.concat(this.model.filterDescendants(function(U){return U!=T},T))}else{var O=this.model.getCell(k[I]);null!=O&&A.push(O)}return A};var aa=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return aa.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var A=mxUtils.indexOf(this.hiddenTags,k);0>A?this.hiddenTags.push(k):0<=A&&this.hiddenTags.splice(A,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;-for(var A=0;A<k.length;A++)if(0>mxUtils.indexOf(this.hiddenTags,k[A]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,A,I,U){var O=[];if(null!=k){A=null!=A?A:this.model.getDescendants(this.model.getRoot());for(var S=0,X={},aa=0;aa<k.length;aa++)0<k[aa].length&&(X[k[aa]]=!0,S++);for(aa=0;aa<A.length;aa++)if(I&&this.model.getParent(A[aa])==this.model.root||this.model.isVertex(A[aa])||this.model.isEdge(A[aa])){var ja=this.getTagsForCell(A[aa]),pa=!1;if(0<ja.length&&(ja=ja.split(" "),ja.length>=-k.length)){for(var sa=pa=0;sa<ja.length&&pa<S;sa++)null!=X[ja[sa]]&&pa++;pa=pa==S}pa&&(1!=U||this.isCellVisible(A[aa]))&&O.push(A[aa])}}return O};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var A=null,I=[],U=0;U<k.length;U++){var O=this.getTagsForCell(k[U]);I=[];if(0<O.length){O=O.split(" ");for(var S={},X=0;X<O.length;X++)if(null==A||null!=A[O[X]])S[O[X]]=!0,I.push(O[X]);-A=S}else return[]}return I};Graph.prototype.getTagsForCells=function(k){for(var A=[],I={},U=0;U<k.length;U++){var O=this.getTagsForCell(k[U]);if(0<O.length){O=O.split(" ");for(var S=0;S<O.length;S++)null==I[O[S]]&&(I[O[S]]=!0,A.push(O[S]))}}return A};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){for(var U=this.getTagsForCell(k[I]),-O=U.split(" "),S=!1,X=0;X<A.length;X++){var aa=mxUtils.trim(A[X]);""!=aa&&0>mxUtils.indexOf(O,aa)&&(U=0<U.length?U+" "+aa:aa,S=!0)}S&&this.setAttributeForCell(k[I],"tags",U)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){var U=this.getTagsForCell(k[I]);if(0<U.length){for(var O=U.split(" "),S=!1,X=0;X<A.length;X++){var aa=mxUtils.indexOf(O,A[X]);0<=aa&&(O.splice(aa,1),S=!0)}S&&this.setAttributeForCell(k[I],-"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var A=0;A<k.length;A++)this.model.setVisible(k[A],!this.model.isVisible(k[A]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,A){this.model.beginUpdate();try{for(var I=0;I<k.length;I++)this.model.setVisible(k[I],A)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,A,I,U){for(var O=0;O<k.length;O++)this.highlightCell(k[O],-A,I,U)};Graph.prototype.highlightCell=function(k,A,I,U,O){A=null!=A?A:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;k=this.view.getState(k);var S=null;null!=k&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+O),S=new mxCellHighlight(this,A,O,!1),null!=U&&(S.opacity=U),S.highlight(k),window.setTimeout(function(){null!=S.shape&&(mxUtils.setPrefixedStyle(S.shape.node.style,"transition","all 1200ms ease-in-out"),S.shape.node.style.opacity=0);window.setTimeout(function(){S.destroy()},-1200)},I));return S};Graph.prototype.addSvgShadow=function(k,A,I,U){I=null!=I?I:!1;U=null!=U?U:!0;var O=k.ownerDocument,S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");S.setAttribute("id",this.shadowId);var X=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");X.setAttribute("in","SourceAlpha");X.setAttribute("stdDeviation",this.svgShadowBlur);X.setAttribute("result","blur");S.appendChild(X);-X=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");X.setAttribute("in","blur");X.setAttribute("dx",this.svgShadowSize);X.setAttribute("dy",this.svgShadowSize);X.setAttribute("result","offsetBlur");S.appendChild(X);X=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");X.setAttribute("flood-color",this.svgShadowColor);X.setAttribute("flood-opacity",this.svgShadowOpacity);X.setAttribute("result","offsetColor");-S.appendChild(X);X=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");X.setAttribute("in","offsetColor");X.setAttribute("in2","offsetBlur");X.setAttribute("operator","in");X.setAttribute("result","offsetBlur");S.appendChild(X);X=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");X.setAttribute("in","SourceGraphic");X.setAttribute("in2","offsetBlur");S.appendChild(X);X=k.getElementsByTagName("defs");-0==X.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=k.firstChild?k.insertBefore(O,k.firstChild):k.appendChild(O)):O=X[0];O.appendChild(S);I||(A=null!=A?A:k.getElementsByTagName("g")[0],null!=A&&(A.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&U&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),A=k.getAttribute("viewBox"),-null!=A&&0<A.length&&(A=A.split(" "),3<A.length&&(w=parseFloat(A[2])+6,h=parseFloat(A[3])+6,k.setAttribute("viewBox",A[0]+" "+A[1]+" "+w+" "+h))))));return S};Graph.prototype.setShadowVisible=function(k,A){mxClient.IS_SVG&&!mxClient.IS_SF&&(A=null!=A?A:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),A&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==+for(var A=0;A<k.length;A++)if(0>mxUtils.indexOf(this.hiddenTags,k[A]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,A,I,T){var O=[];if(null!=k){A=null!=A?A:this.model.getDescendants(this.model.getRoot());for(var U=0,V={},ba=0;ba<k.length;ba++)0<k[ba].length&&(V[k[ba]]=!0,U++);for(ba=0;ba<A.length;ba++)if(I&&this.model.getParent(A[ba])==this.model.root||this.model.isVertex(A[ba])||this.model.isEdge(A[ba])){var fa=this.getTagsForCell(A[ba]),pa=!1;if(0<fa.length&&(fa=fa.split(" "),fa.length>=+k.length)){for(var sa=pa=0;sa<fa.length&&pa<U;sa++)null!=V[fa[sa]]&&pa++;pa=pa==U}pa&&(1!=T||this.isCellVisible(A[ba]))&&O.push(A[ba])}}return O};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var A=null,I=[],T=0;T<k.length;T++){var O=this.getTagsForCell(k[T]);I=[];if(0<O.length){O=O.split(" ");for(var U={},V=0;V<O.length;V++)if(null==A||null!=A[O[V]])U[O[V]]=!0,I.push(O[V]);+A=U}else return[]}return I};Graph.prototype.getTagsForCells=function(k){for(var A=[],I={},T=0;T<k.length;T++){var O=this.getTagsForCell(k[T]);if(0<O.length){O=O.split(" ");for(var U=0;U<O.length;U++)null==I[O[U]]&&(I[O[U]]=!0,A.push(O[U]))}}return A};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){for(var T=this.getTagsForCell(k[I]),+O=T.split(" "),U=!1,V=0;V<A.length;V++){var ba=mxUtils.trim(A[V]);""!=ba&&0>mxUtils.indexOf(O,ba)&&(T=0<T.length?T+" "+ba:ba,U=!0)}U&&this.setAttributeForCell(k[I],"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){var T=this.getTagsForCell(k[I]);if(0<T.length){for(var O=T.split(" "),U=!1,V=0;V<A.length;V++){var ba=mxUtils.indexOf(O,A[V]);0<=ba&&(O.splice(ba,1),U=!0)}U&&this.setAttributeForCell(k[I],+"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var A=0;A<k.length;A++)this.model.setVisible(k[A],!this.model.isVisible(k[A]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,A){this.model.beginUpdate();try{for(var I=0;I<k.length;I++)this.model.setVisible(k[I],A)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,A,I,T){for(var O=0;O<k.length;O++)this.highlightCell(k[O],+A,I,T)};Graph.prototype.highlightCell=function(k,A,I,T,O){A=null!=A?A:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;k=this.view.getState(k);var U=null;null!=k&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+O),U=new mxCellHighlight(this,A,O,!1),null!=T&&(U.opacity=T),U.highlight(k),window.setTimeout(function(){null!=U.shape&&(mxUtils.setPrefixedStyle(U.shape.node.style,"transition","all 1200ms ease-in-out"),U.shape.node.style.opacity=0);window.setTimeout(function(){U.destroy()},+1200)},I));return U};Graph.prototype.addSvgShadow=function(k,A,I,T){I=null!=I?I:!1;T=null!=T?T:!0;var O=k.ownerDocument,U=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");U.setAttribute("id",this.shadowId);var V=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");V.setAttribute("in","SourceAlpha");V.setAttribute("stdDeviation",this.svgShadowBlur);V.setAttribute("result","blur");U.appendChild(V);+V=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");V.setAttribute("in","blur");V.setAttribute("dx",this.svgShadowSize);V.setAttribute("dy",this.svgShadowSize);V.setAttribute("result","offsetBlur");U.appendChild(V);V=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");V.setAttribute("flood-color",this.svgShadowColor);V.setAttribute("flood-opacity",this.svgShadowOpacity);V.setAttribute("result","offsetColor");+U.appendChild(V);V=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");V.setAttribute("in","offsetColor");V.setAttribute("in2","offsetBlur");V.setAttribute("operator","in");V.setAttribute("result","offsetBlur");U.appendChild(V);V=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");V.setAttribute("in","SourceGraphic");V.setAttribute("in2","offsetBlur");U.appendChild(V);V=k.getElementsByTagName("defs");+0==V.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=k.firstChild?k.insertBefore(O,k.firstChild):k.appendChild(O)):O=V[0];O.appendChild(U);I||(A=null!=A?A:k.getElementsByTagName("g")[0],null!=A&&(A.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&T&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),A=k.getAttribute("viewBox"),+null!=A&&0<A.length&&(A=A.split(" "),3<A.length&&(w=parseFloat(A[2])+6,h=parseFloat(A[3])+6,k.setAttribute("viewBox",A[0]+" "+A[1]+" "+w+" "+h))))));return U};Graph.prototype.setShadowVisible=function(k,A){mxClient.IS_SVG&&!mxClient.IS_SF&&(A=null!=A?A:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),A&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=this.model.getChildCount(this.model.root),A=0;do var I=this.model.getChildAt(this.model.root,A);while(A++<k&&"1"==mxUtils.getValue(this.getCellStyle(I),"locked","0"));null!=I&&this.setDefaultParent(I)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=@@ -3453,33 +3453,33 @@ this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultPar"/ibm.xml"];mxStencilRegistry.libraries.ibmcloud=[STENCIL_PATH+"/ibm_cloud.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.salesforce=-[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var A=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?A="mxgraph.er":"sysML"==k.substring(0,5)&&(A="mxgraph.sysml"));return A};var ha=mxMarker.createMarker;mxMarker.createMarker=function(k,A,I,U,O,S,X,aa,ja,pa){if(null!=I&&null==mxMarker.markers[I]){var sa=this.getPackageForType(I);-null!=sa&&mxStencilRegistry.getStencil(sa)}return ha.apply(this,arguments)};var la=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,A,I,U,O,S){"1"==mxUtils.getValue(A.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(A.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return la.apply(this,arguments)};PrintDialog.prototype.create=function(k,A,I){function U(){Ba.value=Math.max(1,Math.min(pa,Math.max(parseInt(Ba.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(pa,-Math.min(parseInt(Ba.value),parseInt(wa.value))))}function O(ua){k.lastPrintPagesRadioChecked=qa.checked;k.lastPrintSelectionOnlyChecked=Ea.checked;k.lastPrintCropRadioChecked=ya.checked;k.lastPrintFitRadioChecked=Ca.checked;qa.checked&&wa.value<Ba.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ba.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);V.value=Math.max(1,Math.min(1600,parseInt(V.value)))+"%";k.lastPrintZoom=V.value;k.lastPrintBorder=Q.value;k.lastPrintGrid=-ia.checked;k.lastPrintTransparent=ka.checked;k.lastPrintInclude=oa.checked;k.lastPrintSheetsAcross=x.value;k.lastPrintSheetsDown=M.value;var Fa={};Fa.border=parseInt(Q.value);Fa.scale=parseInt(V.value)/100;Fa.grid=ia.checked;Fa.transparent=ka.checked;Fa.includeCopy=oa.checked;Fa.sheetsAcross=parseInt(x.value);Fa.sheetsDown=parseInt(M.value);Fa.pagesFrom=parseInt(wa.value);Fa.pagesTo=parseInt(Ba.value);Fa.allPages=sa.checked;Fa.selection=Ea.checked;Fa.pageView=ra.checked;Fa.crop=ya.checked;Fa.fit=-Ca.checked;return null!=I?I(!ua,Fa):k.print(!ua,Fa)}var S=k.editor.graph,X=document.createElement("div"),aa=document.createElement("h3");aa.style.width="100%";aa.style.textAlign="center";aa.style.marginTop="0px";mxUtils.write(aa,A||mxResources.get("print"));X.appendChild(aa);var ja=1,pa=1;aa=document.createElement("div");aa.style.whiteSpace="nowrap";var sa=document.createElement("input");sa.style.marginRight="8px";sa.style.marginBottom="8px";sa.setAttribute("type","radio");sa.setAttribute("name",-"pages-printdialog");aa.appendChild(sa);A=document.createElement("span");mxUtils.write(A,mxResources.get("allPages"));mxEvent.addListener(A,"click",function(){sa.checked=!0});aa.appendChild(A);mxUtils.br(aa);var qa=sa.cloneNode(!0);aa.appendChild(qa);A=document.createElement("span");mxUtils.write(A,mxResources.get("pages")+":");aa.appendChild(A);mxEvent.addListener(A,"click",function(){qa.checked=!0});var wa=document.createElement("input");wa.style.margin="0 4px";wa.setAttribute("value","1");wa.setAttribute("type",-"number");wa.setAttribute("min","1");wa.style.width="40px";aa.appendChild(wa);A=document.createElement("span");mxUtils.write(A,mxResources.get("to"));aa.appendChild(A);var Ba=wa.cloneNode(!0);aa.appendChild(Ba);mxEvent.addListener(wa,"focus",function(){qa.checked=!0});mxEvent.addListener(Ba,"focus",function(){qa.checked=!0});mxEvent.addListener(wa,"change",U);mxEvent.addListener(Ba,"change",U);if(null!=k.pages&&(pa=k.pages.length,null!=k.currentPage))for(var za=0;za<pa;za++)if(k.currentPage==k.pages[za]){ja=-za+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(wa.value=Math.min(pa,Math.max(1,k.lastPrintPagesFromInput)),Ba.value=Math.min(pa,Math.max(1,k.lastPrintPagesToInput))):(wa.value=ja,Ba.value=ja);wa.setAttribute("max",pa);Ba.setAttribute("max",pa);za=mxUtils.button(mxResources.get("currentPage"),function(ua){wa.value=ja;Ba.value=ja;qa.checked=!0});za.setAttribute("title",mxResources.get("currentPage"));za.style.marginLeft="4px";za.style.maxWidth="100px";za.style.overflow="hidden";-za.style.textOverflow="ellipsis";za.style.whiteSpace="nowrap";aa.appendChild(za);1<pa&&X.appendChild(aa);aa=document.createElement("div");aa.style.borderBottom="1px solid lightGray";aa.style.paddingBottom="12px";aa.style.marginBottom="12px";aa.style.whiteSpace="nowrap";var Ea=document.createElement("input");Ea.setAttribute("name","pages-printdialog");Ea.setAttribute("type",1==pa?"checkbox":"radio");Ea.style.marginRight="8px";S.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");S.isEnabled()&&-(aa.appendChild(Ea),A=document.createElement("span"),mxUtils.write(A,mxResources.get("selectionOnly")),aa.appendChild(A));(S.isEnabled()||1<pa)&&X.appendChild(aa);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?qa.checked=!0:!S.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?Ea.checked=!0:sa.checked=!0;S.isSelectionEmpty()||mxEvent.addListener(A,"click",function(){Ea.checked=!Ea.checked});S=document.createElement("div");S.style.whiteSpace="nowrap";var ra=document.createElement("input");ra.style.marginBottom=-"8px";ra.style.marginRight="8px";ra.setAttribute("type","radio");ra.setAttribute("name","printSize");S.appendChild(ra);A=document.createElement("span");mxUtils.write(A,mxResources.get("pageView"));S.appendChild(A);mxEvent.addListener(S,"click",function(){ra.checked=!0});X.appendChild(S);S=document.createElement("div");S.style.whiteSpace="nowrap";var ya=document.createElement("input");ya.style.marginBottom="8px";ya.style.marginRight="8px";ya.setAttribute("type","radio");ya.setAttribute("name","printSize");-S.appendChild(ya);A=document.createElement("span");mxUtils.write(A,mxResources.get("crop"));S.appendChild(A);mxEvent.addListener(S,"click",function(){ya.checked=!0});X.appendChild(S);S=document.createElement("div");S.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.style.marginBottom="8px";Ca.style.marginRight="8px";Ca.setAttribute("type","radio");Ca.setAttribute("name","printSize");A=document.createElement("div");A.style.display="inline-block";A.style.verticalAlign="top";A.style.paddingTop=-"2px";A.appendChild(Ca);S.appendChild(A);aa=document.createElement("table");aa.style.display="inline-block";aa.style.borderSpacing="0";za=document.createElement("tbody");var Ma=document.createElement("tr"),Ha=Ma.cloneNode(!0),Aa=document.createElement("td"),Ra=Aa.cloneNode(!0),Za=Aa.cloneNode(!0),La=Aa.cloneNode(!0),$a=Aa.cloneNode(!0),Da=Aa.cloneNode(!0);Aa.style.textAlign="right";La.style.textAlign="right";mxUtils.write(Aa,mxResources.get("fitTo"));mxEvent.addListener(S,"click",function(ua){mxEvent.getSource(ua)!=-Ca&&(Ca.checked=!Ca.checked)});var x=document.createElement("input");x.style.margin="0 2px";x.style.boxSizing="border-box";x.setAttribute("value",k.lastPrintSheetsAcross||"1");x.setAttribute("min","1");x.setAttribute("type","number");x.style.width="40px";Ra.appendChild(x);A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsAcross"));Za.appendChild(A);mxUtils.write(La,mxResources.get("fitToBy"));var M=x.cloneNode(!0);M.setAttribute("value",k.lastPrintSheetsDown||"1");$a.appendChild(M);-mxEvent.addListener(x,"click",function(ua){Ca.checked=!0;mxEvent.consume(ua)});mxEvent.addListener(M,"click",function(ua){Ca.checked=!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?ya.checked=!0:k.lastPrintFitRadioChecked?Ca.checked=!0:ra.checked=!0;A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsDown"));Da.appendChild(A);Ma.appendChild(Aa);Ma.appendChild(Ra);Ma.appendChild(Za);Ha.appendChild(La);Ha.appendChild($a);Ha.appendChild(Da);za.appendChild(Ma);za.appendChild(Ha);-aa.appendChild(za);S.appendChild(aa);X.appendChild(S);S=document.createElement("div");S.style.borderTop="1px solid lightGray";S.style.whiteSpace="nowrap";S.style.paddingTop="12px";S.style.marginTop="12px";S.style.paddingLeft="8px";mxUtils.write(S,mxResources.get("borderWidth")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="4px";Q.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;-S.appendChild(Q);A=document.createElement("span");A.style.marginLeft="8px";mxUtils.write(A,mxResources.get("zoom")+":");S.appendChild(A);var V=document.createElement("input");V.style.width="60px";V.style.marginLeft="4px";V.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";S.appendChild(V);mxUtils.br(S);var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;S.appendChild(ia);A=document.createElement("span");-A.style.marginLeft="4px";A.style.marginRight="8px";mxUtils.write(A,mxResources.get("grid"));S.appendChild(A);mxEvent.addListener(A,"click",function(ua){ia.checked=!0;mxEvent.consume(ua)});var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="10px";ka.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=I&&(S.appendChild(ka),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("transparentBackground")),S.appendChild(A),-mxEvent.addListener(A,"click",function(ua){ka.checked=!0;mxEvent.consume(ua)}));var oa=document.createElement("input");oa.setAttribute("type","checkbox");oa.style.marginTop="10px";oa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(S),S.appendChild(oa),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram")),S.appendChild(A),mxEvent.addListener(A,-"click",function(ua){oa.checked=!0;mxEvent.consume(ua)}));X.appendChild(S);A=document.createElement("div");A.style.marginTop="40px";A.style.textAlign="right";A.style.whiteSpace="nowrap";k.isOffline()||null!=I||A.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));S=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});S.className="geBtn";k.editor.cancelFirst&&A.appendChild(S);PrintDialog.previewEnabled&&null==I&&(aa=mxUtils.button(mxResources.get("preview"),-function(){try{k.hideDialog(),O(!1)}catch(ua){k.handleError(ua)}}),aa.className="geBtn",A.appendChild(aa));aa=mxUtils.button(mxResources.get(null!=I?"export":PrintDialog.previewEnabled?"print":"ok"),function(){try{k.hideDialog(),O(!0)}catch(ua){k.handleError(ua)}});aa.className="geBtn gePrimaryBtn";A.appendChild(aa);k.editor.cancelFirst||A.appendChild(S);X.appendChild(A);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?(X.classList.add("geDarkMode"),X.style.colorScheme="dark"):-(X.classList.remove("geDarkMode"),X.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ta=function(ua,Fa){ua=Fa.getProperty("dialog");X.parentNode==ua.container&&(k.editor.removeListener(ta),k.removeListener(xa))};k.editor.addListener("hideDialog",ta)}this.container=X};var Y=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||+[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var A=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?A="mxgraph.er":"sysML"==k.substring(0,5)&&(A="mxgraph.sysml"));return A};var ia=mxMarker.createMarker;mxMarker.createMarker=function(k,A,I,T,O,U,V,ba,fa,pa){if(null!=I&&null==mxMarker.markers[I]){var sa=this.getPackageForType(I);+null!=sa&&mxStencilRegistry.getStencil(sa)}return ia.apply(this,arguments)};var la=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,A,I,T,O,U){"1"==mxUtils.getValue(A.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(A.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return la.apply(this,arguments)};PrintDialog.prototype.create=function(k,A,I,T){function O(){za.value=Math.max(1,Math.min(sa,Math.max(parseInt(za.value),parseInt(Aa.value))));Aa.value=Math.max(1,Math.min(sa,+Math.min(parseInt(za.value),parseInt(Aa.value))))}function U(Fa){k.lastPrintPagesRadioChecked=wa.checked;k.lastPrintSelectionOnlyChecked=ra.checked;k.lastPrintCropRadioChecked=Ca.checked;k.lastPrintFitRadioChecked=Ka.checked;wa.checked&&Aa.value<za.value?(k.lastPrintPagesFromInput=Aa.value,k.lastPrintPagesToInput=za.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);ja.value=Math.max(1,Math.min(1600,parseInt(ja.value)))+"%";k.lastPrintZoom=ja.value;k.lastPrintBorder=W.value;k.lastPrintGrid=+ka.checked;k.lastPrintTransparent=oa.checked;k.lastPrintInclude=va.checked;k.lastPrintSheetsAcross=L.value;k.lastPrintSheetsDown=R.value;var Ma={};Ma.border=parseInt(W.value);Ma.scale=parseInt(ja.value)/100;Ma.grid=ka.checked;Ma.transparent=oa.checked;Ma.includeCopy=va.checked;Ma.sheetsAcross=parseInt(L.value);Ma.sheetsDown=parseInt(R.value);Ma.pagesFrom=parseInt(Aa.value);Ma.pagesTo=parseInt(za.value);Ma.allPages=qa.checked;Ma.selection=ra.checked;Ma.pageView=ya.checked;Ma.crop=Ca.checked;Ma.fit=+Ka.checked;return null!=I?I(!Fa,Ma):k.print(!Fa,Ma)}var V=k.editor.graph,ba=document.createElement("div"),fa=document.createElement("h3");fa.style.width="100%";fa.style.textAlign="center";fa.style.marginTop="0px";mxUtils.write(fa,A||mxResources.get("print"));ba.appendChild(fa);var pa=1,sa=1;fa=document.createElement("div");fa.style.whiteSpace="nowrap";var qa=document.createElement("input");qa.style.marginRight="8px";qa.style.marginBottom="8px";qa.setAttribute("type","radio");qa.setAttribute("name",+"pages-printdialog");fa.appendChild(qa);A=document.createElement("span");mxUtils.write(A,mxResources.get("allPages"));mxEvent.addListener(A,"click",function(){qa.checked=!0});fa.appendChild(A);mxUtils.br(fa);var wa=qa.cloneNode(!0);fa.appendChild(wa);A=document.createElement("span");mxUtils.write(A,mxResources.get("pages")+":");fa.appendChild(A);mxEvent.addListener(A,"click",function(){wa.checked=!0});var Aa=document.createElement("input");Aa.style.margin="0 4px";Aa.setAttribute("value","1");Aa.setAttribute("type",+"number");Aa.setAttribute("min","1");Aa.style.width="40px";fa.appendChild(Aa);A=document.createElement("span");mxUtils.write(A,mxResources.get("to"));fa.appendChild(A);var za=Aa.cloneNode(!0);fa.appendChild(za);mxEvent.addListener(Aa,"focus",function(){wa.checked=!0});mxEvent.addListener(za,"focus",function(){wa.checked=!0});mxEvent.addListener(Aa,"change",O);mxEvent.addListener(za,"change",O);if(null!=k.pages&&(sa=k.pages.length,null!=k.currentPage))for(var Da=0;Da<sa;Da++)if(k.currentPage==k.pages[Da]){pa=+Da+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(Aa.value=Math.min(sa,Math.max(1,k.lastPrintPagesFromInput)),za.value=Math.min(sa,Math.max(1,k.lastPrintPagesToInput))):(Aa.value=pa,za.value=pa);Aa.setAttribute("max",sa);za.setAttribute("max",sa);Da=mxUtils.button(mxResources.get("currentPage"),function(Fa){Aa.value=pa;za.value=pa;wa.checked=!0});Da.setAttribute("title",mxResources.get("currentPage"));Da.style.marginLeft="4px";Da.style.maxWidth="100px";Da.style.overflow="hidden";+Da.style.textOverflow="ellipsis";Da.style.whiteSpace="nowrap";fa.appendChild(Da);1<sa&&ba.appendChild(fa);fa=document.createElement("div");fa.style.borderBottom="1px solid lightGray";fa.style.paddingBottom="12px";fa.style.marginBottom="12px";fa.style.whiteSpace="nowrap";var ra=document.createElement("input");ra.setAttribute("name","pages-printdialog");ra.setAttribute("type",1==sa?"checkbox":"radio");ra.style.marginRight="8px";V.isSelectionEmpty()&&ra.setAttribute("disabled","disabled");V.isEnabled()&&+(fa.appendChild(ra),A=document.createElement("span"),mxUtils.write(A,mxResources.get("selectionOnly")),fa.appendChild(A));(V.isEnabled()||1<sa)&&ba.appendChild(fa);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?wa.checked=!0:!V.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?ra.checked=!0:qa.checked=!0;V.isSelectionEmpty()||mxEvent.addListener(A,"click",function(){ra.checked=!ra.checked});V=document.createElement("div");V.style.whiteSpace="nowrap";var ya=document.createElement("input");ya.style.marginBottom=+"8px";ya.style.marginRight="8px";ya.setAttribute("type","radio");ya.setAttribute("name","printSize");V.appendChild(ya);A=document.createElement("span");mxUtils.write(A,mxResources.get("pageView"));V.appendChild(A);mxEvent.addListener(V,"click",function(){ya.checked=!0});ba.appendChild(V);V=document.createElement("div");V.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.style.marginBottom="8px";Ca.style.marginRight="8px";Ca.setAttribute("type","radio");Ca.setAttribute("name","printSize");+V.appendChild(Ca);A=document.createElement("span");mxUtils.write(A,mxResources.get("crop"));V.appendChild(A);mxEvent.addListener(V,"click",function(){Ca.checked=!0});ba.appendChild(V);V=document.createElement("div");V.style.whiteSpace="nowrap";var Ka=document.createElement("input");Ka.style.marginBottom="8px";Ka.style.marginRight="8px";Ka.setAttribute("type","radio");Ka.setAttribute("name","printSize");A=document.createElement("div");A.style.display="inline-block";A.style.verticalAlign="top";A.style.paddingTop=+"2px";A.appendChild(Ka);V.appendChild(A);fa=document.createElement("table");fa.style.display="inline-block";fa.style.borderSpacing="0";Da=document.createElement("tbody");var Ha=document.createElement("tr"),Ba=Ha.cloneNode(!0),Pa=document.createElement("td"),$a=Pa.cloneNode(!0),Na=Pa.cloneNode(!0),Ya=Pa.cloneNode(!0),Ea=Pa.cloneNode(!0),x=Pa.cloneNode(!0);Pa.style.textAlign="right";Ya.style.textAlign="right";mxUtils.write(Pa,mxResources.get("fitTo"));mxEvent.addListener(V,"click",function(Fa){mxEvent.getSource(Fa)!=+Ka&&(Ka.checked=!Ka.checked)});var L=document.createElement("input");L.style.margin="0 2px";L.style.boxSizing="border-box";L.setAttribute("value",k.lastPrintSheetsAcross||"1");L.setAttribute("min","1");L.setAttribute("type","number");L.style.width="40px";$a.appendChild(L);A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsAcross"));Na.appendChild(A);mxUtils.write(Ya,mxResources.get("fitToBy"));var R=L.cloneNode(!0);R.setAttribute("value",k.lastPrintSheetsDown||"1");Ea.appendChild(R);+mxEvent.addListener(L,"click",function(Fa){Ka.checked=!0;mxEvent.consume(Fa)});mxEvent.addListener(R,"click",function(Fa){Ka.checked=!0;mxEvent.consume(Fa)});k.lastPrintCropRadioChecked?Ca.checked=!0:k.lastPrintFitRadioChecked?Ka.checked=!0:ya.checked=!0;A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsDown"));x.appendChild(A);Ha.appendChild(Pa);Ha.appendChild($a);Ha.appendChild(Na);Ba.appendChild(Ya);Ba.appendChild(Ea);Ba.appendChild(x);Da.appendChild(Ha);Da.appendChild(Ba);+fa.appendChild(Da);V.appendChild(fa);ba.appendChild(V);V=document.createElement("div");V.style.borderTop="1px solid lightGray";V.style.whiteSpace="nowrap";V.style.paddingTop="12px";V.style.marginTop="12px";V.style.paddingLeft="8px";mxUtils.write(V,mxResources.get("borderWidth")+":");var W=document.createElement("input");W.setAttribute("type","number");W.setAttribute("min","0");W.style.width="40px";W.style.marginLeft="4px";W.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;+V.appendChild(W);A=document.createElement("span");A.style.marginLeft="8px";mxUtils.write(A,mxResources.get("zoom")+":");V.appendChild(A);var ja=document.createElement("input");ja.style.width="60px";ja.style.marginLeft="4px";ja.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";V.appendChild(ja);mxUtils.br(V);var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="12px";ka.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;V.appendChild(ka);A=document.createElement("span");+A.style.marginLeft="4px";A.style.marginRight="8px";mxUtils.write(A,mxResources.get("grid"));V.appendChild(A);mxEvent.addListener(A,"click",function(Fa){ka.checked=!0;mxEvent.consume(Fa)});var oa=document.createElement("input");oa.setAttribute("type","checkbox");oa.style.marginTop="10px";oa.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=I&&(V.appendChild(oa),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("transparentBackground")),V.appendChild(A),+mxEvent.addListener(A,"click",function(Fa){oa.checked=!0;mxEvent.consume(Fa)}));var va=document.createElement("input");va.setAttribute("type","checkbox");va.style.marginTop="10px";va.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(V),V.appendChild(va),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram")),V.appendChild(A),mxEvent.addListener(A,+"click",function(Fa){va.checked=!0;mxEvent.consume(Fa)}));ba.appendChild(V);A=document.createElement("div");A.style.marginTop="40px";A.style.textAlign="right";A.style.whiteSpace="nowrap";k.isOffline()||null!=I||A.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));V=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});V.className="geBtn";k.editor.cancelFirst&&A.appendChild(V);PrintDialog.previewEnabled&&null==I&&(fa=mxUtils.button(mxResources.get("preview"),+function(){try{k.hideDialog(),U(!1)}catch(Fa){k.handleError(Fa)}}),fa.className="geBtn",A.appendChild(fa));T=null!=T?T:null!=I?"export":PrintDialog.previewEnabled?"print":"ok";T=mxUtils.button(mxResources.get(T),function(){try{k.hideDialog(),U(!0)}catch(Fa){k.handleError(Fa)}});T.className="geBtn gePrimaryBtn";A.appendChild(T);k.editor.cancelFirst||A.appendChild(V);ba.appendChild(A);if(k.editor.isChromelessView()){var ta=function(){Editor.isDarkMode()?(ba.classList.add("geDarkMode"),ba.style.colorScheme=+"dark"):(ba.classList.remove("geDarkMode"),ba.style.colorScheme="light")};k.addListener("darkModeChanged",ta);ta();var xa=function(Fa,Ma){Fa=Ma.getProperty("dialog");ba.parentNode==Fa.container&&(k.editor.removeListener(xa),k.removeListener(ta))};k.editor.addListener("hideDialog",xa)}this.container=ba};var Y=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else Y.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),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 ma=document.createElement("canvas"),Z=new Image;Z.onload=function(){try{ma.getContext("2d").drawImage(Z,0,0);var k=ma.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=k&&6<k.length}catch(A){}};Z.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(k){}Editor.prototype.useCanvasForExport=!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;m.previousAdaptiveColors=m.adaptiveColors;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})();-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.16";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.1.0";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");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"}};@@ -3499,10 +3499,10 @@ f,l)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalDatEditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var f=this.editor.graph;f.mathEnabled=c;null!=f.view.backgroundImage&&(f.view.backgroundImage.destroy(),f.view.backgroundImage=null);this.editor.updateGraphComponents();f.refresh();f.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,f,l){var t=null==c||null==f;l=null!=l?l:24;var z=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",-speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),C=this.timeout,F=z.spin,N=null,K=null,J=mxUtils.bind(this,function(ea){null!=ea&&ea()});z.spin=function(ea,ca,W,ba){ba=null!=ba?ba:C;var ha=!1;if(!this.active){var la=Date.now();null!=W&&(N=window.setTimeout(function(){z.stop();N=null;W({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:K})},ba));F.call(this,ea);this.active=!0;null!=ca&&(t&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/-2-2),ha=document.createElement("div"),ha.className="geSpinnerStatus",ha.style.position="absolute",ha.style.whiteSpace="nowrap",ha.style.background="#4B4243",ha.style.color="white",ha.style.fontFamily=Editor.defaultHtmlFont,ha.style.fontSize="9pt",ha.style.padding="6px",ha.style.paddingLeft="10px",ha.style.paddingRight="10px",ha.style.zIndex=2E9,ha.style.left=Math.max(0,c)+"px",ha.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(ha.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(ha.style,-"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(ha.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=ca.substring(ca.length-3,ca.length)&&"!"!=ca.charAt(ca.length-1)&&(ca+="..."),ha.innerHTML=mxUtils.htmlEntities(ca),ea.appendChild(ha),z.status=ha);this.pause=mxUtils.bind(this,function(){var Y=J;this.active&&(ba=Math.max(0,ba-(Date.now()-la)),Y=mxUtils.bind(this,function(ma){this.spin(ea,ca,W,ba);if(null!=ma)try{ma(),K=mxUtils.bind(this,function(){this.spin(ea,ca,-W,ba);try{ma()}catch(Z){null!=W&&W(Z)}})}catch(Z){null!=W&&W(Z)}}));this.stop();return Y});ha=!0}return ha};var da=z.stop;z.stop=function(){da.call(this);this.active&&(this.active=!1,null!=N&&(window.clearTimeout(N),N=null),null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status),z.status=null)};z.pause=function(){return J};return z};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=+speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),C=this.timeout,F=z.spin,N=null,K=null,J=mxUtils.bind(this,function(ea){null!=ea&&ea()});z.spin=function(ea,ca,X,aa){aa=null!=aa?aa:C;var ia=!1;if(!this.active){var la=Date.now();null!=X&&(N=window.setTimeout(function(){z.stop();N=null;X({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:K})},aa));F.call(this,ea);this.active=!0;null!=ca&&(t&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/+2-2),ia=document.createElement("div"),ia.className="geSpinnerStatus",ia.style.position="absolute",ia.style.whiteSpace="nowrap",ia.style.background="#4B4243",ia.style.color="white",ia.style.fontFamily=Editor.defaultHtmlFont,ia.style.fontSize="9pt",ia.style.padding="6px",ia.style.paddingLeft="10px",ia.style.paddingRight="10px",ia.style.zIndex=2E9,ia.style.left=Math.max(0,c)+"px",ia.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(ia.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(ia.style,+"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(ia.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=ca.substring(ca.length-3,ca.length)&&"!"!=ca.charAt(ca.length-1)&&(ca+="..."),ia.innerHTML=mxUtils.htmlEntities(ca),ea.appendChild(ia),z.status=ia);this.pause=mxUtils.bind(this,function(){var Y=J;this.active&&(aa=Math.max(0,aa-(Date.now()-la)),Y=mxUtils.bind(this,function(ma){this.spin(ea,ca,X,aa);if(null!=ma)try{ma(),K=mxUtils.bind(this,function(){this.spin(ea,ca,+X,aa);try{ma()}catch(Z){null!=X&&X(Z)}})}catch(Z){null!=X&&X(Z)}}));this.stop();return Y});ia=!0}return ia};var da=z.stop;z.stop=function(){da.call(this);this.active&&(this.active=!1,null!=N&&(window.clearTimeout(N),N=null),null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status),z.status=null)};z.pause=function(){return J};return z};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=l&&0==l.getElementsByTagName("parsererror").length}catch(t){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var l=f.getFunction,t=this.editor.graph,z=this;f.getFunction=function(C){if(t.isSelectionEmpty()&&null!=z.pages&&0<z.pages.length){var F=z.getSelectedPageIndex();if(mxEvent.isShiftDown(C)){if(37==C.keyCode)return function(){0<F&&z.movePage(F,F-1)};if(38==C.keyCode)return function(){0<F&&z.movePage(F,0)};if(39==C.keyCode)return function(){F<z.pages.length-1&&z.movePage(F,F+1)};if(40==C.keyCode)return function(){F<@@ -3511,11 +3511,11 @@ mxEvent.isShiftDown(C)||mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMetC=this.editor.extractGraphModel(z.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=C?mxUtils.getXml(C):""}}catch(F){}return f};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var f=c.indexOf('<meta charset="utf-8">');0<=f&&(c=c.slice(0,f)+'<meta charset="utf-8"/>'+c.slice(f+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,f){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",f);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var l=null!=c?this.editor.extractGraphModel(c,!0):null;null!=l&&(c=l);if(null!=c){l=this.editor.graph;l.model.beginUpdate();try{var t=null!=this.pages?this.pages.slice():null,z=c.getElementsByTagName("diagram");if(1<z.length||1==z.length&&z[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var C=z.length-1;0<=C;C--){var F=this.updatePageRoot(new DiagramPage(z[C]));null==F.getName()&&F.setName(mxResources.get("pageWithNumber",[C+1]));l.model.execute(new ChangePage(this,F,0==C?F:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,-l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=t)for(C=0;C<t.length;C++)l.model.execute(new ChangePage(this,t[C],null));var N=this.getCurrentFile();null!=N&&N.fileReplaced(f)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;K=null!=K?K:!0;da=null!=da?da:!Editor.defaultCompressed;var W=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var ba=-"_blank";else W=ba=t;if(null==c)return"";var ha=c;if("mxfile"!=ha.nodeName.toLowerCase()){if(da){var la=c.ownerDocument.createElement("diagram");la.setAttribute("name",mxResources.get("pageWithNumber",[1]));la.setAttribute("id",Editor.guid());la.appendChild(c)}else{la=Graph.zapGremlins(mxUtils.getXml(c));ha=Graph.compress(la);if(Graph.decompress(ha)!=la)return la;la=c.ownerDocument.createElement("diagram");la.setAttribute("name",mxResources.get("pageWithNumber",[1]));la.setAttribute("id",Editor.guid());-mxUtils.setTextContent(la,ha)}ha=c.ownerDocument.createElement("mxfile");ha.appendChild(la)}J?(ha=ha.cloneNode(!0),ha.removeAttribute("modified"),ha.removeAttribute("host"),ha.removeAttribute("agent"),ha.removeAttribute("etag"),ha.removeAttribute("userAgent"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("type")):(ha.removeAttribute("userAgent"),ha.removeAttribute("modified"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("pages"),ha.removeAttribute("type"),-ha.removeAttribute("etag"),mxClient.IS_CHROMEAPP?ha.setAttribute("host","Chrome"):EditorUi.isElectronApp?ha.setAttribute("host","Electron"):ha.setAttribute("host",window.location.hostname),ha.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),ha.setAttribute("version",EditorUi.VERSION),1<ha.getElementsByTagName("diagram").length&&null!=this.pages&&ha.setAttribute("pages",this.pages.length));null!=ea&&(ha=ha.cloneNode(!0),ha.setAttribute("scale",ea));null!=ca&&-(ha=ha.cloneNode(!0),ha.setAttribute("border",ca));c=da?mxUtils.getPrettyXml(ha):mxUtils.getXml(ha);if(!C&&!z&&(F||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(ha),f,null!=l?l.getTitle():null,ba,W);else if(C||!z&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(t=null),l=this.getSvgFileProperties(ha),c=this.getEmbeddedSvg(c,f,t,null,N,K,W,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=+l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=t)for(C=0;C<t.length;C++)l.model.execute(new ChangePage(this,t[C],null));var N=this.getCurrentFile();null!=N&&N.fileReplaced(f)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;K=null!=K?K:!0;da=null!=da?da:!Editor.defaultCompressed;var X=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var aa=+"_blank";else X=aa=t;if(null==c)return"";var ia=c;if("mxfile"!=ia.nodeName.toLowerCase()){if(da){var la=c.ownerDocument.createElement("diagram");la.setAttribute("name",mxResources.get("pageWithNumber",[1]));la.setAttribute("id",Editor.guid());la.appendChild(c)}else{la=Graph.zapGremlins(mxUtils.getXml(c));ia=Graph.compress(la);if(Graph.decompress(ia)!=la)return la;la=c.ownerDocument.createElement("diagram");la.setAttribute("name",mxResources.get("pageWithNumber",[1]));la.setAttribute("id",Editor.guid());+mxUtils.setTextContent(la,ia)}ia=c.ownerDocument.createElement("mxfile");ia.appendChild(la)}J?(ia=ia.cloneNode(!0),ia.removeAttribute("modified"),ia.removeAttribute("host"),ia.removeAttribute("agent"),ia.removeAttribute("etag"),ia.removeAttribute("userAgent"),ia.removeAttribute("version"),ia.removeAttribute("editor"),ia.removeAttribute("type")):(ia.removeAttribute("userAgent"),ia.removeAttribute("modified"),ia.removeAttribute("version"),ia.removeAttribute("editor"),ia.removeAttribute("pages"),ia.removeAttribute("type"),+ia.removeAttribute("etag"),mxClient.IS_CHROMEAPP?ia.setAttribute("host","Chrome"):EditorUi.isElectronApp?ia.setAttribute("host","Electron"):ia.setAttribute("host",window.location.hostname),ia.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),ia.setAttribute("version",EditorUi.VERSION),1<ia.getElementsByTagName("diagram").length&&null!=this.pages&&ia.setAttribute("pages",this.pages.length));null!=ea&&(ia=ia.cloneNode(!0),ia.setAttribute("scale",ea));null!=ca&&+(ia=ia.cloneNode(!0),ia.setAttribute("border",ca));c=da?mxUtils.getPrettyXml(ia):mxUtils.getXml(ia);if(!C&&!z&&(F||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(ia),f,null!=l?l.getTitle():null,aa,X);else if(C||!z&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(t=null),l=this.getSvgFileProperties(ia),c=this.getEmbeddedSvg(c,f,t,null,N,K,X,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,f,l,t){c=null!=c?c:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var z=this.editor.getGraphXml(c,t);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(K){var J=K.getElementsByTagName("mxGraphModel"),da=0<J.length?J[0]:null;J=K;null==da&&l?(da=mxUtils.getNodeValue(K),0<da.length&&(da=Graph.decompress(da),null!=da&&0<da.length&&(J=K.cloneNode(!1),J.appendChild(mxUtils.parseXml(da).documentElement)))):null==da||l?J=K.cloneNode(!0):(J=K.cloneNode(!1),mxUtils.setTextContent(J,Graph.compressNode(da)));z.appendChild(J)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(z),z=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var C=this.pages[f],F=C.node;if(C!=this.currentPage)if(C.needsUpdate){var N=new mxCodec(mxUtils.createXmlDocument());N=N.encode(new mxGraphModel(C.root));this.editor.graph.saveViewState(C.viewState,N,null,t);EditorUi.removeChildNodes(F);F.appendChild(N);delete C.needsUpdate}else t&&(this.updatePageRoot(C),null!=C.viewState.backgroundImage&&(null!=C.viewState.backgroundImage.originalSrc?C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.originalSrc,C):Graph.isPageLink(C.viewState.backgroundImage.src)&&(C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.src,C))),null!=C.viewState.backgroundImage&&null!=C.viewState.backgroundImage.originalSrc&&(N=new mxCodec(mxUtils.createXmlDocument()),N=N.encode(new mxGraphModel(C.root)),@@ -3525,9 +3525,9 @@ c[EditorUi.DIFF_UPDATE][t];null!=z.name&&(z.name=this.anonymizeString(z.name));ndelete z.cells);mxUtils.isEmptyObject(z)&&delete c[EditorUi.DIFF_UPDATE][t]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,f){if(null!=c.attributes)for(var l=0;l<c.attributes.length;l++)"as"!=c.attributes[l].name&&c.setAttribute(c.attributes[l].name,this.anonymizeString(c.attributes[l].value,f));if(null!=c.childNodes)for(l=0;l<c.childNodes.length;l++)this.anonymizeAttributes(c.childNodes[l],f)};EditorUi.prototype.anonymizeNode=function(c,f){f=c.getElementsByTagName("mxCell");for(var l=0;l<f.length;l++)null!=f[l].getAttribute("value")&&f[l].setAttribute("value","["+f[l].getAttribute("value").length+"]"),null!=f[l].getAttribute("xmlValue")&&f[l].setAttribute("xmlValue","["+f[l].getAttribute("xmlValue").length+"]"),null!=f[l].getAttribute("style")&&f[l].setAttribute("style","["+f[l].getAttribute("style").length+"]"),null!=f[l].parentNode&&"root"!=f[l].parentNode.nodeName&&null!=f[l].parentNode.parentNode&&(f[l].setAttribute("id",f[l].parentNode.getAttribute("id")),f[l].parentNode.parentNode.replaceChild(f[l],f[l].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==-DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();f.handleFileError(l,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){f.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){z=null!=z?z:!0;C=null!=C?C:!1;J=null!=J?J:!Editor.defaultCompressed;var W=this.editor.graph;if((f||!c&&null!=K&&/(\.svg)$/i.test(K.getTitle()))&&null!=this.pages&&this.currentPage!=-this.pages[0]){var ba=W.getGlobalVariable;W=this.createTemporaryGraph(W.getStylesheet());W.setBackgroundImage=this.editor.graph.setBackgroundImage;W.background=this.editor.graph.background;var ha=null!=this.pages?this.pages[0]:null;null==ha||this.currentPage==ha?W.setBackgroundImage(this.editor.graph.backgroundImage):null!=ha.viewState&&null!=ha.viewState&&W.setBackgroundImage(ha.viewState.backgroundImage);W.getGlobalVariable=function(la){return"page"==la&&null!=ha?ha.getName():"pagenumber"==la?1:-ba.apply(this,arguments)};document.body.appendChild(W.container);null!=ha&&W.model.setRoot(ha.root)}F=null!=F?F:this.getXmlFileData(z,C,J,da);K=null!=K?K:this.getCurrentFile();c=this.createFileData(F,W,K,window.location.href,c,f,l,t,z,N,J,ea,ca);W!=this.editor.graph&&W.container.parentNode.removeChild(W.container);return c};EditorUi.prototype.getHtml=function(c,f,l,t,z,C){C=null!=C?C:!0;var F=null,N=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=C?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());+DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();f.handleFileError(l,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){f.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){z=null!=z?z:!0;C=null!=C?C:!1;J=null!=J?J:!Editor.defaultCompressed;var X=this.editor.graph;if((f||!c&&null!=K&&/(\.svg)$/i.test(K.getTitle()))&&null!=this.pages&&this.currentPage!=+this.pages[0]){var aa=X.getGlobalVariable;X=this.createTemporaryGraph(X.getStylesheet());X.setBackgroundImage=this.editor.graph.setBackgroundImage;X.background=this.editor.graph.background;var ia=null!=this.pages?this.pages[0]:null;null==ia||this.currentPage==ia?X.setBackgroundImage(this.editor.graph.backgroundImage):null!=ia.viewState&&null!=ia.viewState&&X.setBackgroundImage(ia.viewState.backgroundImage);X.getGlobalVariable=function(la){return"page"==la&&null!=ia?ia.getName():"pagenumber"==la?1:+aa.apply(this,arguments)};document.body.appendChild(X.container);null!=ia&&X.model.setRoot(ia.root)}F=null!=F?F:this.getXmlFileData(z,C,J,da);K=null!=K?K:this.getCurrentFile();c=this.createFileData(F,X,K,window.location.href,c,f,l,t,z,N,J,ea,ca);X!=this.editor.graph&&X.container.parentNode.removeChild(X.container);return c};EditorUi.prototype.getHtml=function(c,f,l,t,z,C){C=null!=C?C:!0;var F=null,N=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=C?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var K=f.view.scale;C=Math.floor(F.x/K-f.view.translate.x);K=Math.floor(F.y/K-f.view.translate.y);F=f.background;null==z&&(f=this.getBasenames().join(";"),0<f.length&&(N=EditorUi.drawHost+"/embed.js?s="+f));c.setAttribute("x0",C);c.setAttribute("y0",K)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=t&&c.setAttribute("edit",t));null!=z&&(z=z.replace(/&/g,"&"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";t=Graph.compress(c);Graph.decompress(t)!=c&&(t=encodeURIComponent(c));return(null==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+"</head>\n<body"+(null==z&&null!=F&&F!=mxConstants.NONE?' style="background-color:'+F+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+t+"</div>\n</div>\n"+(null==z?'<script type="text/javascript" src="'+N+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};@@ -3538,20 +3538,20 @@ z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo1null!=t.pageId&&f.getId()==t.pageId)z=f;if(null==l[f.getId()])l[f.getId()]=f;else throw Error(f.getId()+": Duplicate page ID");}this.currentPage=null!=z?z:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var F=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(C=0;C<F.length;C++)f[F[C]]=!0;var N=this.editor.graph.getModel(),K=N.getChildren(N.root);for(C=0;C<K.length;C++){var J=K[C];N.setVisible(J,f[J.id]||!1)}}catch(da){}};EditorUi.prototype.getBaseFilename=function(c){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(c,f,l,t,z,-C,F,N,K,J,da,ea,ca,W,ba,ha){try{t=null!=t?t:this.editor.graph.isSelectionEmpty();var la=this.getBaseFilename(!z),Y=la+("xml"==c||"pdf"==c&&da?".drawio":"")+"."+c;if("xml"==c){var ma=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,t,z,null,null,null,f);this.saveData(Y,c,ma,"text/xml")}else if("html"==c)ma=this.getHtml2(this.getFileData(!0),this.editor.graph,la),this.saveData(Y,c,ma,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==-c?Y=la+".png":"jpeg"==c&&(Y=la+".jpg"),this.saveRequest(Y,c,mxUtils.bind(this,function(U,O){try{return this.createDownloadRequest(U,c,t,O,F,z,N,K,J,da,ea,void 0,void 0,!C,ca,W,ba,ha)}catch(S){this.handleError(S)}}));else{var Z=null,k=mxUtils.bind(this,function(U){U.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",U,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==c){var A=this.editor.graph.background;-if(F||A==mxConstants.NONE)A=null;var I=this.editor.graph.getSvg(A,null,null,null,null,t);l&&this.editor.graph.addSvgShadow(I);this.editor.convertImages(I,mxUtils.bind(this,mxUtils.bind(this,function(U){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(U))})))}else Y=la+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(U){this.spinner.stop();k(U)}),t)}}catch(U){this.handleError(U)}};EditorUi.prototype.createDownloadRequest=function(c,f,l,t,z,C,F,N,K,-J,da,ea,ca,W,ba,ha,la,Y){c=this.downloadRequestBuilder(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W,ba,ha,la,Y);f="";for(var ma in c)l=c[ma],null!=l&&(f+=ma+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W,ba,ha,la,Y){var ma=this.editor.graph,Z=ma.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==C?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var k=null,A=null,I=null;if(!EditorUi.isElectronApp&&+C,F,N,K,J,da,ea,ca,X,aa,ia){try{t=null!=t?t:this.editor.graph.isSelectionEmpty();var la=this.getBaseFilename(!z),Y=la+("xml"==c||"pdf"==c&&da?".drawio":"")+"."+c;if("xml"==c){var ma=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,t,z,null,null,null,f);this.saveData(Y,c,ma,"text/xml")}else if("html"==c)ma=this.getHtml2(this.getFileData(!0),this.editor.graph,la),this.saveData(Y,c,ma,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==+c?Y=la+".png":"jpeg"==c&&(Y=la+".jpg"),this.saveRequest(Y,c,mxUtils.bind(this,function(T,O){try{return this.createDownloadRequest(T,c,t,O,F,z,N,K,J,da,ea,void 0,void 0,!C,ca,X,aa,ia)}catch(U){this.handleError(U)}}));else{var Z=null,k=mxUtils.bind(this,function(T){T.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==c){var A=this.editor.graph.background;+if(F||A==mxConstants.NONE)A=null;var I=this.editor.graph.getSvg(A,null,null,null,null,t);l&&this.editor.graph.addSvgShadow(I);this.editor.convertImages(I,mxUtils.bind(this,mxUtils.bind(this,function(T){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(T))})))}else Y=la+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(T){this.spinner.stop();k(T)}),t)}}catch(T){this.handleError(T)}};EditorUi.prototype.createDownloadRequest=function(c,f,l,t,z,C,F,N,K,+J,da,ea,ca,X,aa,ia,la,Y){c=this.downloadRequestBuilder(c,f,l,t,z,C,F,N,K,J,da,ea,ca,X,aa,ia,la,Y);f="";for(var ma in c)l=c[ma],null!=l&&(f+=ma+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca,X,aa,ia,la,Y){var ma=this.editor.graph,Z=ma.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==C?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var k=null,A=null,I=null;if(!EditorUi.isElectronApp&&(Z.width*Z.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};J=J?"1":"0";"pdf"==f&&(null!=da?(k=da.from,A=da.to):0==C&&(I="1"));"xmlpng"==f&&(J="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(C=0;C<this.pages.length;C++)if(this.pages[C]==this.currentPage){k=C;break}C=ma.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!z?z||null!=C&&C!=mxConstants.NONE||(C="#ffffff"):C=mxConstants.NONE;z={globalVars:ma.getExportVariables()};-K&&(z.grid={size:ma.gridSize,steps:ma.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:ma.view.gridColor});Graph.translateDiagram&&(z.diagramLanguage=Graph.diagramLanguage);return{format:f,from:k,to:A,allPages:I,bg:null!=C?C:mxConstants.NONE,base64:t,embedXml:J,xml:l,filename:null!=c?c:"",extras:JSON.stringify(z),scale:F,border:N,pageMargin:ba,w:ea&&isFinite(ea)?ea:null,h:ca&&isFinite(ca)?ca:null,crop:null!=W&&W?"1":"0",fit:null!=ha&&ha?"1":"0",sheetsAcross:la,+K&&(z.grid={size:ma.gridSize,steps:ma.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:ma.view.gridColor});Graph.translateDiagram&&(z.diagramLanguage=Graph.diagramLanguage);return{format:f,from:k,to:A,allPages:I,bg:null!=C?C:mxConstants.NONE,base64:t,embedXml:J,xml:l,filename:null!=c?c:"",extras:JSON.stringify(z),scale:F,border:N,pageMargin:aa,w:ea&&isFinite(ea)?ea:null,h:ca&&isFinite(ca)?ca:null,crop:null!=X&&X?"1":"0",fit:null!=ia&&ia?"1":"0",sheetsAcross:la,sheetsDown:Y}};EditorUi.prototype.setMode=function(c,f){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var f=c.indexOf("#");0<=f&&(c=c.substring(0,f))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,f={};if(null!=c&&0<c.length){var l=c.lastIndexOf("#");if(0<l){c=decodeURIComponent(c.substring(l+1));try{f=JSON.parse(c)}catch(t){}}}return f};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var f=window.location.hash;if(null==f||""==f)f="#";var l=f.lastIndexOf("#");0<l&&(f=f.substring(0,l));try{null==c||mxUtils.isEmptyObject(c)||(f=f+"#"+encodeURIComponent(JSON.stringify(c)))}catch(t){}0<l&&0<f.lastIndexOf("#")?window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,l){var t=window.location.hash,z=mxUtils.bind(this,function(F){var N=null!=c.data?c.data:"";null!=F&&0<F.length&&(0<N.length&&(N+="\n"),N+=F);F=new LocalFile(this,"csv"!=c.format&&0<N.length?N:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);F.getHash=function(){return t};this.fileLoaded(F);"csv"==c.format&&this.importCsv(N,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();-this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var K=null!=c.interval?parseInt(c.interval):6E4,J=null,da=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(W){ca===this.currentPage&&(200<=W.getStatus()&&300>=W.getStatus()?(this.updateDiagram(W.getText()),ea()):this.handleError({message:mxResources.get("error")+" "+W.getStatus()}))}),mxUtils.bind(this,-function(W){this.handleError(W)}))}),ea=mxUtils.bind(this,function(){window.clearTimeout(J);J=window.setTimeout(da,K)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ea();da()}));ea();da()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var C=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(C,mxUtils.bind(this,function(F){z(F)}),mxUtils.bind(this,function(F){null!=l&&l(F)}))}else z("")};EditorUi.prototype.updateDiagram=function(c){function f(Z){var k=new mxCellOverlay(Z.image||+this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var K=null!=c.interval?parseInt(c.interval):6E4,J=null,da=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(X){ca===this.currentPage&&(200<=X.getStatus()&&300>=X.getStatus()?(this.updateDiagram(X.getText()),ea()):this.handleError({message:mxResources.get("error")+" "+X.getStatus()}))}),mxUtils.bind(this,+function(X){this.handleError(X)}))}),ea=mxUtils.bind(this,function(){window.clearTimeout(J);J=window.setTimeout(da,K)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ea();da()}));ea();da()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var C=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(C,mxUtils.bind(this,function(F){z(F)}),mxUtils.bind(this,function(F){null!=l&&l(F)}))}else z("")};EditorUi.prototype.updateDiagram=function(c){function f(Z){var k=new mxCellOverlay(Z.image||z.warningImage,Z.tooltip,Z.align,Z.valign,Z.offset);k.addListener(mxEvent.CLICK,function(A,I){t.alert(Z.tooltip)});return k}var l=null,t=this;if(null!=c&&0<c.length&&(l=mxUtils.parseXml(c),c=null!=l?l.documentElement:null,null!=c&&"updates"==c.nodeName)){var z=this.editor.graph,C=z.getModel();C.beginUpdate();var F=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var N=C.getCell(c.getAttribute("id"));if(null!=N){try{var K=c.getAttribute("value");if(null!=K){var J=mxUtils.parseXml(K).documentElement;-if(null!=J)if("1"==J.getAttribute("replace-value"))C.setValue(N,J);else for(var da=J.attributes,ea=0;ea<da.length;ea++)z.setAttributeForCell(N,da[ea].nodeName,0<da[ea].nodeValue.length?da[ea].nodeValue:null)}}catch(Z){null!=window.console&&console.log("Error in value for "+N.id+": "+Z)}try{var ca=c.getAttribute("style");null!=ca&&z.model.setStyle(N,ca)}catch(Z){null!=window.console&&console.log("Error in style for "+N.id+": "+Z)}try{var W=c.getAttribute("icon");if(null!=W){var ba=0<W.length?JSON.parse(W):-null;null!=ba&&ba.append||z.removeCellOverlays(N);null!=ba&&z.addCellOverlay(N,f(ba))}}catch(Z){null!=window.console&&console.log("Error in icon for "+N.id+": "+Z)}try{var ha=c.getAttribute("geometry");if(null!=ha){ha=JSON.parse(ha);var la=z.getCellGeometry(N);if(null!=la){la=la.clone();for(key in ha){var Y=parseFloat(ha[key]);"dx"==key?la.x+=Y:"dy"==key?la.y+=Y:"dw"==key?la.width+=Y:"dh"==key?la.height+=Y:la[key]=parseFloat(ha[key])}z.model.setGeometry(N,la)}}}catch(Z){null!=window.console&&console.log("Error in icon for "++if(null!=J)if("1"==J.getAttribute("replace-value"))C.setValue(N,J);else for(var da=J.attributes,ea=0;ea<da.length;ea++)z.setAttributeForCell(N,da[ea].nodeName,0<da[ea].nodeValue.length?da[ea].nodeValue:null)}}catch(Z){null!=window.console&&console.log("Error in value for "+N.id+": "+Z)}try{var ca=c.getAttribute("style");null!=ca&&z.model.setStyle(N,ca)}catch(Z){null!=window.console&&console.log("Error in style for "+N.id+": "+Z)}try{var X=c.getAttribute("icon");if(null!=X){var aa=0<X.length?JSON.parse(X):+null;null!=aa&&aa.append||z.removeCellOverlays(N);null!=aa&&z.addCellOverlay(N,f(aa))}}catch(Z){null!=window.console&&console.log("Error in icon for "+N.id+": "+Z)}try{var ia=c.getAttribute("geometry");if(null!=ia){ia=JSON.parse(ia);var la=z.getCellGeometry(N);if(null!=la){la=la.clone();for(key in ia){var Y=parseFloat(ia[key]);"dx"==key?la.x+=Y:"dy"==key?la.y+=Y:"dw"==key?la.width+=Y:"dh"==key?la.height+=Y:la[key]=parseFloat(ia[key])}z.model.setGeometry(N,la)}}}catch(Z){null!=window.console&&console.log("Error in icon for "+N.id+": "+Z)}}}else if("model"==c.nodeName){for(var ma=c.firstChild;null!=ma&&ma.nodeType!=mxConstants.NODETYPE_ELEMENT;)ma=ma.nextSibling;null!=ma&&(new mxCodec(c.firstChild)).decode(ma,C)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(z.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))z.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(F=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{C.endUpdate()}null!=F&&this.chromelessResize&&this.chromelessResize(!0,F)}return l};EditorUi.prototype.getCopyFilename=function(c,f){var l=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var t=l.lastIndexOf(".");0<=t&&(c=l.substring(t),l=l.substring(0,t));if(f){f=l;var z=new Date;l=z.getFullYear();t=z.getMonth()+1;var C=z.getDate(),F=z.getHours(),N=z.getMinutes();z=z.getSeconds();l=f+(" "+(l+"-"+t+"-"+C+"-"+F+"-"+N+"-"+z))}return l=mxResources.get("copyOf",[l])+c};EditorUi.prototype.logIfModified=function(c,f){try{null!=c&&f&&EditorUi.debug("File.closed",[c])}catch(l){}};EditorUi.prototype.fileLoaded=function(c,f,l){var t=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var z=!1;this.hideDialog();null!=t&&(t.removeListener(this.descriptorChangedListener),this.logIfModified(t,!0),t.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var C=mxUtils.bind(this,function(){this.setGraphEnabled(!1);@@ -3572,17 +3572,17 @@ this.libraryLoaded(c,t,l.documentElement.getAttribute("title"),f)}else throw{mes(null==F&&(F=document.createElement("div"),F.className="geDropTarget",mxUtils.write(F,mxResources.get("dragElementsHere"))),ma.appendChild(F)):this.addLibraryEntries(Y,ma)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==l&&(l=c.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));var K=this.sidebar.addPalette(c.getHash(),l,null!=t?t:!0,mxUtils.bind(this,function(Y){N(f,Y)}));null!=z&&(z.div=K);this.repositionLibrary(C,"L.scratchpad"!=c.getHash());t=K.parentNode.previousSibling;l=t.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&t.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var J=document.createElement("div");J.style.backgroundColor="inherit";t.style.position="relative";var da=document.createElement("img");da.className="geAdaptiveAsset";da.setAttribute("src",Editor.crossImage);da.setAttribute("title",mxResources.get("close"));da.setAttribute("valign","absmiddle");da.setAttribute("border","0");da.style.position="relative";da.style.top="2px";da.style.width="14px";da.style.cursor="pointer";da.style.margin="0 3px";var ea=null;if(".scratchpad"!=c.title||this.closableScratchpad)J.appendChild(da),mxEvent.addListener(da,"click",mxUtils.bind(this,function(Y){if(!mxEvent.isConsumed(Y)){var ma=mxUtils.bind(this,function(){null!=z&&mxUtils.remove(z,this.openLibraries);this.closeLibrary(c)});null!=ea?this.confirm(mxResources.get("allChangesLost"),null,ma,mxResources.get("cancel"),mxResources.get("discardChanges")):ma();mxEvent.consume(Y)}}));if(c.isEditable()){var ca=-this.editor.graph,W=null;l=mxUtils.bind(this,function(Y){this.showLibraryDialog(c.getTitle(),K,f,c,c.getMode());mxEvent.consume(Y)});var ba=mxUtils.bind(this,function(Y){c.setModified(!0);c.isAutosave()?(null!=W&&null!=W.parentNode&&W.parentNode.removeChild(W),W=da.cloneNode(!1),W.setAttribute("src",Editor.spinImage),W.setAttribute("title",mxResources.get("saving")),W.style.cursor="default",W.style.marginRight="2px",W.style.marginTop="-2px",J.insertBefore(W,J.firstChild),this.saveLibrary(c.getTitle(),-f,c,c.getMode(),!0,!0,function(){null!=W&&null!=W.parentNode&&W.parentNode.removeChild(W)})):null==ea&&(ea=da.cloneNode(!1),ea.setAttribute("src",Editor.saveImage),ea.setAttribute("title",mxResources.get("save")),J.insertBefore(ea,J.firstChild),mxEvent.addListener(ea,"click",mxUtils.bind(this,function(ma){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==ea||c.isModified()||(ea.parentNode.removeChild(ea),ea=null)});mxEvent.consume(ma)})))}),ha=mxUtils.bind(this,-function(Y,ma,Z,k){Y=ca.cloneCells(mxUtils.sortCells(ca.model.getTopmostCells(Y)));for(var A=0;A<Y.length;A++){var I=ca.getCellGeometry(Y[A]);null!=I&&I.translate(-ma.x,-ma.y)}K.appendChild(this.sidebar.createVertexTemplateFromCells(Y,ma.width,ma.height,k||"",!0,null,!1));Y=mxUtils.getXml(this.editor.graph.encodeCells(Y));Editor.defaultCompressed&&(Y=Graph.compress(Y));ma={xml:Y,w:ma.width,h:ma.height};null!=k&&(ma.title=k);f.push(ma);ba(Z);null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),-F=null)}),la=mxUtils.bind(this,function(Y){if(ca.isSelectionEmpty())ca.getRubberband().isActive()?(ca.getRubberband().execute(Y),ca.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ma=ca.getSelectionCells(),Z=ca.view.getBounds(ma);if(null!=Z&&0<Z.width&&0<Z.height){var k=ca.view.scale;Z.x/=k;Z.y/=k;Z.width/=k;Z.height/=k;Z.x-=ca.view.translate.x;Z.y-=ca.view.translate.y;ha(ma,Z)}else this.showError(mxResources.get("error"),+this.editor.graph,X=null;l=mxUtils.bind(this,function(Y){this.showLibraryDialog(c.getTitle(),K,f,c,c.getMode());mxEvent.consume(Y)});var aa=mxUtils.bind(this,function(Y){c.setModified(!0);c.isAutosave()?(null!=X&&null!=X.parentNode&&X.parentNode.removeChild(X),X=da.cloneNode(!1),X.setAttribute("src",Editor.spinImage),X.setAttribute("title",mxResources.get("saving")),X.style.cursor="default",X.style.marginRight="2px",X.style.marginTop="-2px",J.insertBefore(X,J.firstChild),this.saveLibrary(c.getTitle(),+f,c,c.getMode(),!0,!0,function(){null!=X&&null!=X.parentNode&&X.parentNode.removeChild(X)})):null==ea&&(ea=da.cloneNode(!1),ea.setAttribute("src",Editor.saveImage),ea.setAttribute("title",mxResources.get("save")),J.insertBefore(ea,J.firstChild),mxEvent.addListener(ea,"click",mxUtils.bind(this,function(ma){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==ea||c.isModified()||(ea.parentNode.removeChild(ea),ea=null)});mxEvent.consume(ma)})))}),ia=mxUtils.bind(this,+function(Y,ma,Z,k){Y=ca.cloneCells(mxUtils.sortCells(ca.model.getTopmostCells(Y)));for(var A=0;A<Y.length;A++){var I=ca.getCellGeometry(Y[A]);null!=I&&I.translate(-ma.x,-ma.y)}K.appendChild(this.sidebar.createVertexTemplateFromCells(Y,ma.width,ma.height,k||"",!0,null,!1));Y=mxUtils.getXml(this.editor.graph.encodeCells(Y));Editor.defaultCompressed&&(Y=Graph.compress(Y));ma={xml:Y,w:ma.width,h:ma.height};null!=k&&(ma.title=k);f.push(ma);aa(Z);null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),+F=null)}),la=mxUtils.bind(this,function(Y){if(ca.isSelectionEmpty())ca.getRubberband().isActive()?(ca.getRubberband().execute(Y),ca.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ma=ca.getSelectionCells(),Z=ca.view.getBounds(ma);if(null!=Z&&0<Z.width&&0<Z.height){var k=ca.view.scale;Z.x/=k;Z.y/=k;Z.width/=k;Z.height/=k;Z.x-=ca.view.translate.x;Z.y-=ca.view.translate.y;ia(ma,Z)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(Y)});mxEvent.addGestureListeners(K,function(){},mxUtils.bind(this,function(Y){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler.first&&(ca.graphHandler.suspend(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="hidden"),K.style.backgroundColor="light-dark(#fefefe, #000000)",K.style.cursor="copy",ca.panningManager.stop(),ca.autoScroll=!1,mxEvent.consume(Y))}),mxUtils.bind(this,function(Y){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler&&(K.style.backgroundColor="",K.style.cursor="default",this.sidebar.showTooltips=!0,ca.panningManager.stop(),ca.graphHandler.reset(),ca.isMouseDown=!1,ca.autoScroll=!0,la(Y),mxEvent.consume(Y))}));mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(Y){ca.isMouseDown&&null!=ca.graphHandler.first&&(ca.graphHandler.resume(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="visible"),K.style.backgroundColor="",K.style.cursor="",ca.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Y){K.style.backgroundColor="light-dark(#fefefe, #000000)";Y.dataTransfer.dropEffect="copy";K.style.cursor="copy";this.sidebar.hideTooltip();Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Y){K.style.cursor="";K.style.backgroundColor="";0<Y.dataTransfer.files.length&&this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(ma,-Z,k,A,I,U,O,S,X){if(null!=ma&&"image/"==Z.substring(0,6))ma="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ma),ma=[new mxCell("",new mxGeometry(0,0,I,U),ma)],ma[0].vertex=!0,ha(ma,new mxRectangle(0,0,I,U),Y,mxEvent.isAltDown(Y)?null:O.substring(0,O.lastIndexOf(".")).replace(/_/g," ")),null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null);else{var aa=!1,ja=mxUtils.bind(this,function(pa,sa){null!=pa&&"application/pdf"==-sa&&(sa=Editor.extractGraphModelFromPdf(pa),null!=sa&&0<sa.length&&(pa=sa));if(null!=pa)if(pa=mxUtils.parseXml(pa),"mxlibrary"==pa.documentElement.nodeName)try{var qa=JSON.parse(mxUtils.getTextContent(pa.documentElement));N(qa,K);f=f.concat(qa);ba(Y);this.spinner.stop();aa=!0}catch(Ea){}else if("mxfile"==pa.documentElement.nodeName)try{var wa=pa.documentElement.getElementsByTagName("diagram");for(qa=0;qa<wa.length;qa++){var Ba=this.stringToCells(Editor.getDiagramNodeXml(wa[qa])),za=this.editor.graph.getBoundingBoxFromGeometry(Ba);-null!=za&&ha(Ba,new mxRectangle(0,0,za.width,za.height),Y)}aa=!0}catch(Ea){null!=window.console&&console.log("error in drop handler:",Ea)}aa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null)});null!=X&&null!=O&&EditorUi.isVisioFilename(O)?this.importVisio(X,function(pa){ja(pa,"text/xml")},null,O):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(ma,O)&&null!=X?this.isExternalDataComms()?-this.parseFile(X,mxUtils.bind(this,function(pa){4==pa.readyState&&(this.spinner.stop(),200<=pa.status&&299>=pa.status?ja(pa.responseText,"text/xml"):this.handleError({message:mxResources.get(413==pa.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):ja(ma,Z)}}));Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"dragleave",function(Y){K.style.cursor=+Z,k,A,I,T,O,U,V){if(null!=ma&&"image/"==Z.substring(0,6))ma="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ma),ma=[new mxCell("",new mxGeometry(0,0,I,T),ma)],ma[0].vertex=!0,ia(ma,new mxRectangle(0,0,I,T),Y,mxEvent.isAltDown(Y)?null:O.substring(0,O.lastIndexOf(".")).replace(/_/g," ")),null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null);else{var ba=!1,fa=mxUtils.bind(this,function(pa,sa){null!=pa&&"application/pdf"==+sa&&(sa=Editor.extractGraphModelFromPdf(pa),null!=sa&&0<sa.length&&(pa=sa));if(null!=pa)if(pa=mxUtils.parseXml(pa),"mxlibrary"==pa.documentElement.nodeName)try{var qa=JSON.parse(mxUtils.getTextContent(pa.documentElement));N(qa,K);f=f.concat(qa);aa(Y);this.spinner.stop();ba=!0}catch(Da){}else if("mxfile"==pa.documentElement.nodeName)try{var wa=pa.documentElement.getElementsByTagName("diagram");for(qa=0;qa<wa.length;qa++){var Aa=this.stringToCells(Editor.getDiagramNodeXml(wa[qa])),za=this.editor.graph.getBoundingBoxFromGeometry(Aa);+null!=za&&ia(Aa,new mxRectangle(0,0,za.width,za.height),Y)}ba=!0}catch(Da){null!=window.console&&console.log("error in drop handler:",Da)}ba||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null)});null!=V&&null!=O&&EditorUi.isVisioFilename(O)?this.importVisio(V,function(pa){fa(pa,"text/xml")},null,O):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(ma,O)&&null!=V?this.isExternalDataComms()?+this.parseFile(V,mxUtils.bind(this,function(pa){4==pa.readyState&&(this.spinner.stop(),200<=pa.status&&299>=pa.status?fa(pa.responseText,"text/xml"):this.handleError({message:mxResources.get(413==pa.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):fa(ma,Z)}}));Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"dragleave",function(Y){K.style.cursor="";K.style.backgroundColor="";Y.stopPropagation();Y.preventDefault()}));da=da.cloneNode(!1);da.setAttribute("src",Editor.editImage);da.setAttribute("title",mxResources.get("edit"));J.insertBefore(da,J.firstChild);mxEvent.addListener(da,"click",l);l=da.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));J.insertBefore(l,J.firstChild);mxEvent.addListener(l,"click",la);".scratchpad"==c.title&&(this.addSelectionToScratchpad=la);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(l=this.createHelpIcon(EditorUi.scratchpadHelpLink),C=l.getElementsByTagName("img")[0],l.style.marginRight="1px",C.style.marginTop="-2px",C.style.opacity="",J.insertBefore(l,J.firstChild))}t.appendChild(J);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var l=0;l<c.length;l++)try{var t=c[l],z=t.data;if(null!=z){z="data:"==z.substring(0,5)?this.convertDataUri(z):z;var C="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==t.aspect&&(C+="aspect=fixed;");C=C+"image="+z+";";null!=t.style&&(C+=t.style);f.appendChild(this.sidebar.createVertexTemplate(C,t.w,t.h,"",t.title||"",!1,null,!0))}else if(null!=t.xml){var F=this.stringToCells("<"==t.xml.charAt(0)?t.xml:Graph.decompress(t.xml)),N=0==F.length?mxResources.get("drawingEmpty"):null!=t.title?t.title:"";f.appendChild(this.sidebar.createVertexTemplateFromCells(F,t.w,t.h,N,!0,null,!0))}}catch(K){N=null!=K.message?mxResources.get("error")+": "+K.message:String(K),@@ -3594,25 +3594,25 @@ f,l,t,z){c=new LibraryDialog(this,c,f,l,t,z);this.showDialog(c.container,640,440t,z,C,F){var N=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},K=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{F||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!F||null==window.console||console.error("EditorUi.handleError:",c)}catch(ca){}if(null!=K||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var J=mxResources.get("ok"),da=null;f=null!=f?f:mxResources.get("error");if(null!=K){null!=K.retry&&(J=mxResources.get("cancel"),da=function(){N();K.retry()});if(404==K.code||404==K.status||403==K.code){F=403==K.code?null!=K.message?mxUtils.htmlEntities(K.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=z?z:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var ea=null!=z?null:null!=C?C:window.location.hash;if(null!=ea&&("#G"==ea.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ea.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==K.code||404==K.status)){ea="#U"==ea.substring(0,2)?ea.substring(45,ea.lastIndexOf("%26ex")):ea.substring(2);this.showError(f,F,mxResources.get("tryOpeningViaThisPage"),-mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ea);null!=t&&t()}),da,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){la.innerText="";for(var Y=0;Y<W.length;Y++){var ma=document.createElement("option");mxUtils.write(ma,W[Y].displayName);ma.value=Y;la.appendChild(ma);ma=document.createElement("option");ma.innerHTML=" ";mxUtils.write(ma,"<"+W[Y].email+">");ma.setAttribute("disabled","disabled");la.appendChild(ma)}ma=-document.createElement("option");mxUtils.write(ma,mxResources.get("addAccount"));ma.value=W.length;la.appendChild(ma)}var W=this.drive.getUsersList(),ba=document.createElement("div"),ha=document.createElement("div");ha.style.marginBottom="6px";mxUtils.write(ha,mxResources.get("changeUser")+": ");ba.appendChild(ha);var la=document.createElement("select");la.style.width="100%";ca();mxEvent.addListener(la,"change",mxUtils.bind(this,function(){var Y=la.value,ma=W.length!=Y;ma&&this.drive.setUser(W[Y]);-this.drive.authorize(ma,mxUtils.bind(this,function(){ma||(W=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));ba.appendChild(la);ba=new CustomDialog(this,ba,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ba.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=K.message?F=""==K.message&&null!=K.name?mxUtils.htmlEntities(K.name,+mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ea);null!=t&&t()}),da,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){la.innerText="";for(var Y=0;Y<X.length;Y++){var ma=document.createElement("option");mxUtils.write(ma,X[Y].displayName);ma.value=Y;la.appendChild(ma);ma=document.createElement("option");ma.innerHTML=" ";mxUtils.write(ma,"<"+X[Y].email+">");ma.setAttribute("disabled","disabled");la.appendChild(ma)}ma=+document.createElement("option");mxUtils.write(ma,mxResources.get("addAccount"));ma.value=X.length;la.appendChild(ma)}var X=this.drive.getUsersList(),aa=document.createElement("div"),ia=document.createElement("div");ia.style.marginBottom="6px";mxUtils.write(ia,mxResources.get("changeUser")+": ");aa.appendChild(ia);var la=document.createElement("select");la.style.width="100%";ca();mxEvent.addListener(la,"change",mxUtils.bind(this,function(){var Y=la.value,ma=X.length!=Y;ma&&this.drive.setUser(X[Y]);+this.drive.authorize(ma,mxUtils.bind(this,function(){ma||(X=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));aa.appendChild(la);aa=new CustomDialog(this,aa,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(aa.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=K.message?F=""==K.message&&null!=K.name?mxUtils.htmlEntities(K.name,!1):mxUtils.htmlEntities(K.message,!1):null!=K.response&&null!=K.response.error?F=mxUtils.htmlEntities(K.response.error,!1):"undefined"!==typeof window.App&&(K.code==App.ERROR_TIMEOUT?F=mxUtils.htmlEntities(mxResources.get("timeout"),!1):K.code==App.ERROR_BUSY?F=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof K&&0<K.length&&(F=mxUtils.htmlEntities(K,!1)))}z=c=null;null!=K&&null!=K.helpLink?(c=mxResources.get("help"),z=mxUtils.bind(this,function(){return this.editor.graph.openLink(K.helpLink)})):null!=K&&null!=K.ownerEmail?(c=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+c+": "+K.ownerEmail+")",!1),z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(K.ownerEmail))})):null!=K&&null!=K.alternateAction&&(c=K.alternateAction.label,z=K.alternateAction.funct);this.showError(f,F,J,l,da,null,null,c,z,null,null,null,t?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(c,f,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,l||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,l,t,z,C){c=null!=c?c:"";var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},N=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){F();null!=f&&f()},function(){F();null!=l&&l()},t,z,null,null,null,null,N);this.showDialog(c.container,340,46+N,!0,C);c.init()};EditorUi.prototype.showBanner=function(c,f,l,t,z,C,F,N,K){var J=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){C=null!=C?C:"bottom:10px;left:50%;";F=null!=F?F:"translate(-50%,120%)";N=null!=N?N:"translate(-50%,0%)";var da=z?500:1E3;J=z?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var ea=document.createElement("div");ea.style.cssText="position:absolute;"+C+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";"+J;mxUtils.setPrefixedStyle(ea.style,"transform",F);mxUtils.setPrefixedStyle(ea.style,"transition","all "+da+"ms ease");ea.className="geBtn gePrimaryBtn"+(z?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(ea.style,"box-shadow","1px 1px 2px 0px #ddd");null!=K&&mxUtils.setPrefixedStyle(ea.style,"transform-origin",K);if(!z){var ca=document.createElement("img");ca.setAttribute("src",IMAGE_PATH+"/logo.png");ca.setAttribute("border","0");ca.setAttribute("align","absmiddle");ca.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";ea.appendChild(ca);ca=document.createElement("img");ca.setAttribute("src",Dialog.prototype.closeImage);ca.setAttribute("title",mxResources.get(t?"doNotShowAgain":"close"));ca.setAttribute("border","0");ca.style.cssText=(z?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";ea.appendChild(ca)}mxUtils.write(ea,f);document.body.appendChild(ea);this.bannerShowing=-!0;f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var W=document.createElement("input");W.setAttribute("type","checkbox");W.setAttribute("id","geDoNotShowAgainCheckbox");W.style.marginRight="6px";if(!t){f.appendChild(W);var ba=document.createElement("label");ba.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ba,mxResources.get("doNotShowAgain"));f.appendChild(ba);-ea.style.paddingBottom=z?"16px":"30px";ea.appendChild(f)}var ha=mxUtils.bind(this,function(){null!=ea.parentNode&&(ea.parentNode.removeChild(ea),this.bannerShowing=!1,W.checked||t)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=ca&&mxEvent.addListener(ca,"click",mxUtils.bind(this,function(Y){mxEvent.consume(Y);ha()}));var la=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(ea.style,"transform",F);window.setTimeout(mxUtils.bind(this,-function(){ha()}),da)});mxEvent.addListener(ea,"click",mxUtils.bind(this,function(Y){var ma=mxEvent.getSource(Y);ma!=W&&ma!=ba?(null!=l&&l(),ha(),mxEvent.consume(Y)):la()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(ea.style,"transform",N)}),da/2);window.setTimeout(la,z?4E3:3E4);J=!0}return J};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=+!0;f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var X=document.createElement("input");X.setAttribute("type","checkbox");X.setAttribute("id","geDoNotShowAgainCheckbox");X.style.marginRight="6px";if(!t){f.appendChild(X);var aa=document.createElement("label");aa.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(aa,mxResources.get("doNotShowAgain"));f.appendChild(aa);+ea.style.paddingBottom=z?"16px":"30px";ea.appendChild(f)}var ia=mxUtils.bind(this,function(){null!=ea.parentNode&&(ea.parentNode.removeChild(ea),this.bannerShowing=!1,X.checked||t)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=ca&&mxEvent.addListener(ca,"click",mxUtils.bind(this,function(Y){mxEvent.consume(Y);ia()}));var la=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(ea.style,"transform",F);window.setTimeout(mxUtils.bind(this,+function(){ia()}),da)});mxEvent.addListener(ea,"click",mxUtils.bind(this,function(Y){var ma=mxEvent.getSource(Y);ma!=X&&ma!=aa?(null!=l&&l(),ia(),mxEvent.consume(Y)):la()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(ea.style,"transform",N)}),da/2);window.setTimeout(la,z?4E3:3E4);J=!0}return J};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,f,l,t){c=c.toDataURL("image/"+l);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<t&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",t));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,f,l,t,z){var C="jpeg"==l?"jpg":l;t=this.getBaseFilename(t)+(null!=f?".drawio":"")+"."+C;c=this.createImageDataUri(c,f,l,z);this.saveData(t,C,c.substring(c.lastIndexOf(",")+1),"image/"+l,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,f){c=new TextareaDialog(this,c,f,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,f,l,t,z,C){"text/xml"!=l||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=C?C:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=t?this.base64ToBlob(c,l):new Blob([c],{type:l}),navigator.msSaveOrOpenBlob(c,f);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==l?mxUtils.popup(c,!0):(l.document.write(c),l.document.close(),l.document.execCommand("SaveAs",!0,f),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(f+":",c):this.openInNewWindow(c,l,t);else{var F=document.createElement("a");C=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var N=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);C=65==(N?parseInt(N[2],10):!1)?!1:C}if(C||this.isOffline()){F.href=URL.createObjectURL(t?this.base64ToBlob(c,l):new Blob([c],{type:l}));C?F.download=f:F.setAttribute("target","_blank");document.body.appendChild(F);try{window.setTimeout(function(){URL.revokeObjectURL(F.href)},2E4),F.click(),F.parentNode.removeChild(F)}catch(K){}}else this.createEchoRequest(c,f,l,t,z).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,l,t,z,C){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=-l?"&mime="+l:"")+(null!=z?"&format="+z:"")+(null!=C?"&base64="+C:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(t?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,l,t,z,C,F,N){C=null!=C?C:!1;F=null!=F?F:"vsdx"!=z&&(!mxClient.IS_IOS||!navigator.standalone);var K=mxUtils.bind(this,function(da,ea,ca,W){try{if("_blank"==ea)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,t);else if(null!=l&&"text/html"==l.substring(0,9)){var ba=new EmbedDialog(this,c);this.showDialog(ba.container,-450,240,!0,!0);ba.init()}else{var ha=window.open("about:blank");null==ha?mxUtils.popup(c,!0):(ha.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),ha.document.close())}else if(ea==App.MODE_DEVICE||"download"==ea)this.doSaveLocalFile(c,da,l,t,null,N);else if(null!=da&&0<da.length){var la=mxUtils.bind(this,function(Y){try{this.exportFile(c,da,l,t,ea,Y)}catch(ma){this.handleError(ma)}});null!=W?la(W):this.pickFolder(ea,la)}}catch(Y){this.handleError(Y)}});z=[];C||z.push(App.MODE_BROWSER);F||+l?"&mime="+l:"")+(null!=z?"&format="+z:"")+(null!=C?"&base64="+C:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(t?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,l,t,z,C,F,N){C=null!=C?C:!1;F=null!=F?F:"vsdx"!=z&&(!mxClient.IS_IOS||!navigator.standalone);var K=mxUtils.bind(this,function(da,ea,ca,X){try{if("_blank"==ea)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,t);else if(null!=l&&"text/html"==l.substring(0,9)){var aa=new EmbedDialog(this,c);this.showDialog(aa.container,+450,240,!0,!0);aa.init()}else{var ia=window.open("about:blank");null==ia?mxUtils.popup(c,!0):(ia.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),ia.document.close())}else if(ea==App.MODE_DEVICE||"download"==ea)this.doSaveLocalFile(c,da,l,t,null,N);else if(null!=da&&0<da.length){var la=mxUtils.bind(this,function(Y){try{this.exportFile(c,da,l,t,ea,Y)}catch(ma){this.handleError(ma)}});null!=X?la(X):this.pickFolder(ea,la)}}catch(Y){this.handleError(Y)}});z=[];C||z.push(App.MODE_BROWSER);F||z.push("_blank");var J=new SaveDialog(this,f,mxUtils.bind(this,function(da,ea,ca){K(da.value,ea,da,ca);this.hideDialog(null,null,J.container)}),z,c,l,t);this.showDialog(J.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));J.init()};EditorUi.prototype.openInNewWindow=function(c,f,l){var t=window.open("about:blank");if(null==t||null==t.document)mxUtils.popup(c,!0);else{var z="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var C=mxUtils.parseXml(c).documentElement.style.backgroundColor;""!=C&&(z="background: "+C+";")}z='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+z+'">';"image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||l?(C=l?c:btoa(unescape(encodeURIComponent(c))),t.document.write(z+'<img style="max-width:100%;" src="data:'+f+";base64,"+C+'"/></body></html>')):t.document.write(z+c+"</body></html>"):t.document.write(z+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");t.document.close()}};var m=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=c(mxUtils.bind(this,function(t){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),@@ -3627,18 +3627,18 @@ null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});F.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",z);this.editor.exportToCanvas(mxUtils.bind(this,function(N){F.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var K=this.createImageDataUri(N,null,"png");N=document.createElement("img");N.style.maxWidth="140px";N.style.maxHeight="140px";N.style.cursor="pointer";N.style.backgroundColor="white";N.setAttribute("title",mxResources.get("openInNewWindow"));N.setAttribute("border","0");N.setAttribute("src",K);this.exportDialog.appendChild(N);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.openInNewWindow(K.substring(K.indexOf(",")+1),"image/png",!0);z.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(N){F.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(N)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(t)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,f,l,t,z){this.isLocalFileSave()?this.saveLocalFile(l,c,t,z,f):this.saveRequest(c,f,mxUtils.bind(this,function(C,F){return this.createEchoRequest(l,C,t,z,f,F)}),l,z,t)};EditorUi.prototype.saveRequest=function(c,f,l,t,z,C,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;var N=mxUtils.bind(this,-function(J,da,ea,ca){if("_blank"==da||null!=J&&0<J.length){var W=l("_blank"==da?null:J,da==App.MODE_DEVICE||"download"==da||null==da||"_blank"==da?"0":"1");null!=W&&(da==App.MODE_DEVICE||"download"==da||"_blank"==da?W.simulate(document,"_blank"):(ea=mxUtils.bind(this,function(ba){C=null!=C?C:"pdf"==f?"application/pdf":"image/"+f;if(null!=t)try{this.exportFile(t,J,C,!0,da,ba)}catch(ha){this.handleError(ha)}else this.spinner.spin(document.body,mxResources.get("saving"))&&W.send(mxUtils.bind(this,function(){this.spinner.stop();-if(200<=W.getStatus()&&299>=W.getStatus())try{this.exportFile(W.getText(),J,C,!0,da,ba)}catch(ha){this.handleError(ha)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(ha){this.spinner.stop();this.handleError(ha)}))}),null!=ca?ea(ca):this.pickFolder(da,ea)))}});z=[App.MODE_BROWSER];F||z.push("_blank");var K=new SaveDialog(this,c,mxUtils.bind(this,function(J,da,ea){N(J.value,da,J,ea);this.hideDialog(null,null,K.container)}),z,null,"application/pdf");+function(J,da,ea,ca){if("_blank"==da||null!=J&&0<J.length){var X=l("_blank"==da?null:J,da==App.MODE_DEVICE||"download"==da||null==da||"_blank"==da?"0":"1");null!=X&&(da==App.MODE_DEVICE||"download"==da||"_blank"==da?X.simulate(document,"_blank"):(ea=mxUtils.bind(this,function(aa){C=null!=C?C:"pdf"==f?"application/pdf":"image/"+f;if(null!=t)try{this.exportFile(t,J,C,!0,da,aa)}catch(ia){this.handleError(ia)}else this.spinner.spin(document.body,mxResources.get("saving"))&&X.send(mxUtils.bind(this,function(){this.spinner.stop();+if(200<=X.getStatus()&&299>=X.getStatus())try{this.exportFile(X.getText(),J,C,!0,da,aa)}catch(ia){this.handleError(ia)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(ia){this.spinner.stop();this.handleError(ia)}))}),null!=ca?ea(ca):this.pickFolder(da,ea)))}});z=[App.MODE_BROWSER];F||z.push("_blank");var K=new SaveDialog(this,c,mxUtils.bind(this,function(J,da,ea){N(J.value,da,J,ea);this.hideDialog(null,null,K.container)}),z,null,"application/pdf");this.showDialog(K.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));K.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,f,l,t,z,C){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,f,l){f(null)};EditorUi.prototype.exportSvg=-function(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(S){Editor.addRetryToError(S,mxUtils.bind(this,function(){this.exportSvg(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W)}));this.handleError(S)})))try{var ba=this.editor.graph.isSelectionEmpty();l=null!=l?l:ba;var ha=f?null:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);null==ha&&0==f&&(ha=this.editor.graph.shapeBackgroundColor);var la=this.editor.graph.addForeignObjectWarning;-Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var Y=mxUtils.lightDarkColorSupported,ma=mxUtils.preferDarkColor;if("light"==da||"dark"==da)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==da;var Z=this.editor.graph.createSvgImageExport(z),k=this.editor.graph.getSvg(ha,c,F,N,null,l,null,Z,"blank"==J?"_blank":"self"==J?"_top":null,null,!ca,da,ea);mxUtils.lightDarkColorSupported=Y;mxUtils.preferDarkColor=ma;this.editor.graph.addForeignObjectWarning=-la;t&&this.editor.graph.addSvgShadow(k);var A=this.getBaseFilename()+(z?".drawio":"")+".svg";W=null!=W?W:mxUtils.bind(this,function(S){this.isLocalFileSave()||S.length<=MAX_REQUEST_SIZE?this.saveData(A,"svg",S,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(S)}))});var I=mxUtils.bind(this,function(S){this.spinner.stop();z&&S.setAttribute("content",this.getFileData(!0,null,null,null,l,K,null,null,null,-null,null,c,F));W(Graph.xmlDeclaration+"\n"+(z?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(S))});this.editor.graph.mathEnabled&&this.editor.addMathCss(k);var U=mxUtils.bind(this,function(S){Editor.replaceSvgDataUris&&C&&EditorUi.embedSvgImages(S);Editor.foreignObjectImages&&ca?this.replaceAlternateContent(S,da,I):I(S)}),O=mxUtils.bind(this,function(S){C&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(S,-U,this.thumbImageCache)):U(S)});ca?this.embedFonts(k,O):(this.editor.addFontCss(k),O(k))}catch(S){this.handleError(S)}};EditorUi.prototype.replaceAlternateContent=function(c,f,l){function t(ea,ca,W,ba,ha){var la=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");la.setAttribute("x",ca);la.setAttribute("y",W+.5);la.setAttribute("width",ba.width);la.setAttribute("height",ba.height);null==la.setAttributeNS?la.setAttribute("xlink:href",ha):la.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",-ha);ea.replaceChild(la,ea.lastChild);N()}function z(){if(F<da.length)da[F++](z)}var C="";f=c.getElementsByTagName("style");for(var F=0;F<f.length;F++)C+=f[F].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var N=mxUtils.bind(this,function(){counter--;0==counter&&l(c)}),K={},J={},da=[];for(F=0;F<f.length;F++)mxUtils.bind(this,function(ea){var ca=ea.getElementsByTagName("div");if(0<ca.length)try{var W=ca[0].cloneNode(!0),ba=parseInt(W.style.marginLeft),ha=parseInt(W.style.paddingTop),-la=W.getElementsByTagName("div")[1],Y=ca=!1,ma=W.style.alignItems,Z=W.style.justifyContent;if(null!=W.style.writingMode){var k=W.style.writingMode;Y="vertical-"==k.substring(0,9);ca="-rl"==k.substring(k.length-3)}var A=!Y&&"1px"==W.style.width||Y&&"1px"==W.style.height;if(!Y&&"1px"==W.style.height||Y&&"1px"==W.style.width)W.style.alignItems=Y&&ca?"unsafe flex-end":"unsafe flex-start";A&&(W.style.justifyContent="unsafe flex-start");W.style.paddingTop="";W.style.marginLeft="";var I=W.outerHTML,U=K[I];-null==U&&(W.style.position="absolute",W.style.visibility="hidden",document.body.appendChild(W),k=1,k="1px"==W.style.width?la.offsetWidth:parseInt(W.style.width),A=1,A="1px"==W.style.height?la.offsetHeight:parseInt(W.style.height),document.body.removeChild(W),U=new mxRectangle(ba,ha,k,A),K[I]=U);"1px"==W.style.height&&("unsafe center"==ma?ha-=U.height/2:"unsafe flex-end"==ma&&(ha-=U.height));if("1px"==W.style.width)if(!Y&&"unsafe center"==Z||Y&&"unsafe center"==ma)ba-=U.width/2;else if(!Y&&"unsafe flex-end"==-Z||Y&&(!ca&&"unsafe flex-end"==ma||ca&&"unsafe flex-start"==ma))ba-=U.width;U=new mxRectangle(ba,ha,U.width,U.height+parseInt(la.style.fontSize)/4);da.push(mxUtils.bind(this,function(O){var S=J[I];null==S?Graph.htmlToPng(I,U.width,U.height,mxUtils.bind(this,function(X){t(ea,ba,ha,U,X);J[I]=X;O()}),C):(t(ea,ba,ha,U,S),O())}))}catch(O){N()}else N()})(f[F]);0==counter&&l(c);F=0;z()};EditorUi.prototype.addRadiobox=function(c,f,l,t,z,C,F){return this.addCheckbox(c,l,t,z,C,F,!0,f)};EditorUi.prototype.addCheckbox=+function(c,f,l,t,z,C,F,N,K,J,da,ea,ca,X){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(U){Editor.addRetryToError(U,mxUtils.bind(this,function(){this.exportSvg(c,f,l,t,z,C,F,N,K,J,da,ea,ca,X)}));this.handleError(U)})))try{var aa=this.editor.graph.isSelectionEmpty();l=null!=l?l:aa;var ia=f?null:this.editor.graph.background;ia==mxConstants.NONE&&(ia=null);null==ia&&0==f&&(ia=this.editor.graph.shapeBackgroundColor);var la=this.editor.graph.addForeignObjectWarning;+Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var Y=mxUtils.lightDarkColorSupported,ma=mxUtils.preferDarkColor;if("light"==da||"dark"==da)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==da;var Z=this.editor.graph.createSvgImageExport(z),k=this.editor.graph.getSvg(ia,c,F,N,null,l,null,Z,"blank"==J?"_blank":"self"==J?"_top":null,null,!ca,da,ea);mxUtils.lightDarkColorSupported=Y;mxUtils.preferDarkColor=ma;this.editor.graph.addForeignObjectWarning=+la;t&&this.editor.graph.addSvgShadow(k);var A=this.getBaseFilename()+(z?".drawio":"")+".svg";X=null!=X?X:mxUtils.bind(this,function(U){this.isLocalFileSave()||U.length<=MAX_REQUEST_SIZE?this.saveData(A,"svg",U,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});var I=mxUtils.bind(this,function(U){this.spinner.stop();z&&U.setAttribute("content",this.getFileData(!0,null,null,null,l,K,null,null,null,+null,null,c,F));X(Graph.xmlDeclaration+"\n"+(z?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(U))});this.editor.graph.mathEnabled&&this.editor.addMathCss(k);var T=mxUtils.bind(this,function(U){Editor.replaceSvgDataUris&&C&&EditorUi.embedSvgImages(U);Editor.foreignObjectImages&&ca?this.replaceAlternateContent(U,da,I):I(U)}),O=mxUtils.bind(this,function(U){C&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(U,+T,this.thumbImageCache)):T(U)});ca?this.embedFonts(k,O):(this.editor.addFontCss(k),O(k))}catch(U){this.handleError(U)}};EditorUi.prototype.replaceAlternateContent=function(c,f,l){function t(ea,ca,X,aa,ia){var la=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");la.setAttribute("x",ca);la.setAttribute("y",X+.5);la.setAttribute("width",aa.width);la.setAttribute("height",aa.height);null==la.setAttributeNS?la.setAttribute("xlink:href",ia):la.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",+ia);ea.replaceChild(la,ea.lastChild);N()}function z(){if(F<da.length)da[F++](z)}var C="";f=c.getElementsByTagName("style");for(var F=0;F<f.length;F++)C+=f[F].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var N=mxUtils.bind(this,function(){counter--;0==counter&&l(c)}),K={},J={},da=[];for(F=0;F<f.length;F++)mxUtils.bind(this,function(ea){var ca=ea.getElementsByTagName("div");if(0<ca.length)try{var X=ca[0].cloneNode(!0),aa=parseInt(X.style.marginLeft),ia=parseInt(X.style.paddingTop),+la=X.getElementsByTagName("div")[1],Y=ca=!1,ma=X.style.alignItems,Z=X.style.justifyContent;if(null!=X.style.writingMode){var k=X.style.writingMode;Y="vertical-"==k.substring(0,9);ca="-rl"==k.substring(k.length-3)}var A=!Y&&"1px"==X.style.width||Y&&"1px"==X.style.height;if(!Y&&"1px"==X.style.height||Y&&"1px"==X.style.width)X.style.alignItems=Y&&ca?"unsafe flex-end":"unsafe flex-start";A&&(X.style.justifyContent="unsafe flex-start");X.style.paddingTop="";X.style.marginLeft="";var I=X.outerHTML,T=K[I];+null==T&&(X.style.position="absolute",X.style.visibility="hidden",document.body.appendChild(X),k=1,k="1px"==X.style.width?la.offsetWidth:parseInt(X.style.width),A=1,A="1px"==X.style.height?la.offsetHeight:parseInt(X.style.height),document.body.removeChild(X),T=new mxRectangle(aa,ia,k,A),K[I]=T);"1px"==X.style.height&&("unsafe center"==ma?ia-=T.height/2:"unsafe flex-end"==ma&&(ia-=T.height));if("1px"==X.style.width)if(!Y&&"unsafe center"==Z||Y&&"unsafe center"==ma)aa-=T.width/2;else if(!Y&&"unsafe flex-end"==+Z||Y&&(!ca&&"unsafe flex-end"==ma||ca&&"unsafe flex-start"==ma))aa-=T.width;T=new mxRectangle(aa,ia,T.width,T.height+parseInt(la.style.fontSize)/4);da.push(mxUtils.bind(this,function(O){var U=J[I];null==U?Graph.htmlToPng(I,T.width,T.height,mxUtils.bind(this,function(V){t(ea,aa,ia,T,V);J[I]=V;O()}),C):(t(ea,aa,ia,T,U),O())}))}catch(O){N()}else N()})(f[F]);0==counter&&l(c);F=0;z()};EditorUi.prototype.addRadiobox=function(c,f,l,t,z,C,F){return this.addCheckbox(c,l,t,z,C,F,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;var K=document.createElement("input");K.style.marginRight="8px";K.style.marginTop="16px";K.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();K.id=F;null!=N&&K.setAttribute("name",N);l&&(K.setAttribute("checked","checked"),K.defaultChecked=!0);t&&K.setAttribute("disabled","disabled");C&&(c.appendChild(K),l=document.createElement("label"),mxUtils.write(l,f),l.setAttribute("for",F),c.appendChild(l),z||mxUtils.br(c));return K};EditorUi.prototype.addEditButton=function(c,f){var l=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);l.style.marginLeft="24px";var t=this.getCurrentFile(),z="";null!=t&&t.getMode()!=App.MODE_DEVICE&&t.getMode()!=App.MODE_BROWSER&&(z=window.location.href);var C=document.createElement("select");C.style.maxWidth="200px";C.style.width="auto";C.style.marginLeft="8px";C.style.marginRight="10px";C.className="geBtn";t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("makeCopy"));C.appendChild(t);var F=document.createElement("option");F.setAttribute("value","custom");mxUtils.write(F,mxResources.get("custom")+"...");C.appendChild(F);c.appendChild(C);mxEvent.addListener(C,"change",mxUtils.bind(this,function(){if("custom"==C.value){var N=new FilenameDialog(this,z,mxResources.get("ok"),function(K){null!=K?(z=K,F.setAttribute("title",K)):(C.value="blank",F.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){C.value="blank"});this.showDialog(N.container,@@ -3647,47 +3647,47 @@ C.appendChild(t);var F=document.createElement("option");F.setAttribute("value","z.setAttribute("value","auto");mxUtils.write(z,mxResources.get("automatic"));t.appendChild(z);z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));t.appendChild(z);z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));t.appendChild(z);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),t.appendChild(f));c.appendChild(t);mxUtils.write(c,mxResources.get("borderColor")+":");var C="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(N){this.pickColor(C||"none",function(K){C=K;l()});mxEvent.consume(N)}));l();F.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";F.style.marginLeft="4px";F.style.height="22px";F.style.width="22px";F.style.position="relative";F.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";c.appendChild(F);mxUtils.br(c);return{getColor:function(){return C},getTarget:function(){return t.value},focus:function(){t.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,l,t,z,C){C=null!=C?C:[];l&&(C.push("lightbox=1"),"auto"!=c&&C.push("target="+c),null!=f&&f!=mxConstants.NONE&&C.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=t&&0<t.length&&C.push("edit="+encodeURIComponent(t)),z&&C.push("layers=1"),this.editor.graph.foldingEnabled&&C.push("nav=1"));return C};EditorUi.prototype.createLink=-function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){var W=this.getCurrentFile();K=this.createUrlParameters(c,f,t,z,C,K);c=!0;null!=F?l="#U"+encodeURIComponent(F):N||null==W||""==W.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+W.getHash(),c=!1);c&&null!=W&&null!=W.getTitle()&&W.getTitle()!=this.defaultFilename&&K.push("title="+encodeURIComponent(W.getTitle()));J&&1<l.length&&(K.push("open="+l.substring(1)),-l="");da&&null!=this.currentPage&&K.push("page-id="+this.currentPage.getId());ea&&K.push("transparent=1");null!=ca&&K.push("dark="+ca);return(t&&(null!=F||null!=W&&W.getMode()!=App.MODE_GITHUB&&W.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<K.length?"?"+K.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){this.getBasenames();-var W={};""!=z&&z!=mxConstants.NONE&&(W.highlight=z);"auto"!==t&&(W.target=t);J||(W.lightbox=!1);W.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(W.zoom=l/100);l=[];F&&(l.push("pages"),W.resize=!0,null!=this.pages&&null!=this.currentPage&&(W.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),W.resize=!0);N&&l.push("layers");K&&l.push("tags");null!=ca&&(W["dark-mode"]=ca);0<l.length&&(J&&l.push("lightbox"),W.toolbar=l.join(" "));null!=da&&0<da.length&&(W.edit=-da);null!=c?W.url=c:W.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(C?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(W))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ea(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":+function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){var X=this.getCurrentFile();K=this.createUrlParameters(c,f,t,z,C,K);c=!0;null!=F?l="#U"+encodeURIComponent(F):N||null==X||""==X.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+X.getHash(),c=!1);c&&null!=X&&null!=X.getTitle()&&X.getTitle()!=this.defaultFilename&&K.push("title="+encodeURIComponent(X.getTitle()));J&&1<l.length&&(K.push("open="+l.substring(1)),+l="");da&&null!=this.currentPage&&K.push("page-id="+this.currentPage.getId());ea&&K.push("transparent=1");null!=ca&&K.push("dark="+ca);return(t&&(null!=F||null!=X&&X.getMode()!=App.MODE_GITHUB&&X.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<K.length?"?"+K.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){this.getBasenames();+var X={};""!=z&&z!=mxConstants.NONE&&(X.highlight=z);"auto"!==t&&(X.target=t);J||(X.lightbox=!1);X.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(X.zoom=l/100);l=[];F&&(l.push("pages"),X.resize=!0,null!=this.pages&&null!=this.currentPage&&(X.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),X.resize=!0);N&&l.push("layers");K&&l.push("tags");null!=ca&&(X["dark-mode"]=ca);0<l.length&&(J&&l.push("lightbox"),X.toolbar=l.join(" "));null!=da&&0<da.length&&(X.edit=+da);null!=c?X.url=c:X.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(C?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(X))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ea(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,f,l,t){var z=document.createElement("div");z.style.whiteSpace="nowrap";var C=document.createElement("h3");mxUtils.write(C,mxResources.get("html"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(C);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var N=document.createElement("input");N.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";N.setAttribute("value","url");N.setAttribute("type","radio");N.setAttribute("name","type-embedhtmldialog");C=N.cloneNode(!0);C.setAttribute("value","copy");F.appendChild(C);var K=document.createElement("span");mxUtils.write(K,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(K);mxUtils.br(F);F.appendChild(N);K=document.createElement("span");mxUtils.write(K,mxResources.get("publicDiagramUrl"));F.appendChild(K);var J=this.getCurrentFile();null==l&&null!=J&&J.constructor==window.DriveFile&&(K=document.createElement("a"),K.style.paddingLeft="12px",K.style.color="gray",K.style.cursor="pointer",mxUtils.write(K,mxResources.get("share")),F.appendChild(K),mxEvent.addListener(K,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(J.getId(),J)})));C.setAttribute("checked","checked");null==l&&N.setAttribute("disabled","disabled");z.appendChild(F);F=380;var da=this.addLinkSection(z),ea=document.createElement("select");ea.style.maxWidth="260px";ea.style.marginLeft="8px";ea.style.marginTop="16px";K=document.createElement("option");K.setAttribute("value","light");mxUtils.write(K,mxResources.get("light"));ea.appendChild(K);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));ea.appendChild(K);K=document.createElement("option");K.setAttribute("value","auto");mxUtils.write(K,mxResources.get("automatic"));K.setAttribute("selected",-"selected");ea.appendChild(K);K.setAttribute("selected","selected");mxUtils.write(z,mxResources.get("appearance")+":");z.appendChild(ea);mxUtils.br(z);F+=26;var ca=this.addCheckbox(z,mxResources.get("zoom"),!0,null,!0);mxUtils.write(z,":");var W=document.createElement("input");W.setAttribute("type","text");W.style.marginRight="16px";W.style.width="60px";W.style.marginLeft="4px";W.style.marginRight="12px";W.value="100%";z.appendChild(W);var ba=this.addCheckbox(z,mxResources.get("fit"),!0);K=null!=-this.pages&&1<this.pages.length;var ha=ha=this.addCheckbox(z,mxResources.get("allPages"),K,!K),la=this.addCheckbox(z,mxResources.get("layers"),!0),Y=this.addCheckbox(z,mxResources.get("tags"),!0),ma=this.addCheckbox(z,mxResources.get("lightbox"),!0),Z=null;if(EditorUi.enableHtmlEditOption){Z=this.addEditButton(z,ma);var k=Z.getEditInput();k.style.marginBottom="16px";F+=50;mxEvent.addListener(ma,"change",function(){ma.checked?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled");k.checked&&-ma.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,z,mxUtils.bind(this,function(){t(N.checked?l:null,ca.checked,W.value,da.getTarget(),da.getColor(),ba.checked,ha.checked,la.checked,Y.checked,ma.checked,null!=Z?Z.getLink():null,null!=ea?ea.value:null)}),null,c,f);this.showDialog(c.container,340,F,!0,!0);C.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,l,t,z,C,F,N,K,J,da){var ea=document.createElement("div");-ea.style.whiteSpace="nowrap";var ca=document.createElement("h3");mxUtils.write(ca,c||mxResources.get("publish"));ca.style.width="100%";ca.style.textAlign="center";ca.style.marginTop="2px";ca.style.marginBottom="20px";ea.appendChild(ca);var W=document.createElement("select");c=30;W.className="geBtn";W.style.marginBottom="8px";W.style.marginLeft="0px";W.style.width="100%";W.style.boxSizing="border-box";if(null==N||""==N.getHash())z=null!=z?z:"https://www.drawio.com/doc/faq/publish-diagram-as-link",-ca=document.createElement("option"),mxUtils.write(ca,mxResources.get("makeCopy")),ca.setAttribute("value","copy"),W.appendChild(ca);ca=document.createElement("option");mxUtils.write(ca,mxResources.get("authorizationRequired"));ca.setAttribute("value","auth");W.appendChild(ca);null!=N&&""!=N.getHash()||ca.setAttribute("disabled","disabled");N=document.createElement("option");N.setAttribute("value","public");W.appendChild(N);null!=F?(mxUtils.write(N,mxResources.get("publicDiagramUrl")),N.setAttribute("title",-F),W.value="public"):(mxUtils.write(N,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),N.setAttribute("disabled","disabled"));ea.appendChild(W);mxUtils.br(ea);W.focus();var ba=null,ha=null;if(null!=f||null!=l)c+=30,mxUtils.write(ea,mxResources.get("width")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value=-"100%",ea.appendChild(ba),mxUtils.write(ea,mxResources.get("height")+":"),ha=document.createElement("input"),ha.setAttribute("type","text"),ha.style.width="50px",ha.style.marginLeft="6px",ha.style.marginBottom="10px",ha.value=l+"px",ea.appendChild(ha),mxUtils.br(ea);var la=this.addLinkSection(ea,t),Y=J?this.addCheckbox(ea,mxResources.get("transparentBackground"),!1):null;null!=Y&&(c+=20);var ma=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?+"selected");ea.appendChild(K);K.setAttribute("selected","selected");mxUtils.write(z,mxResources.get("appearance")+":");z.appendChild(ea);mxUtils.br(z);F+=26;var ca=this.addCheckbox(z,mxResources.get("zoom"),!0,null,!0);mxUtils.write(z,":");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="100%";z.appendChild(X);var aa=this.addCheckbox(z,mxResources.get("fit"),!0);K=null!=+this.pages&&1<this.pages.length;var ia=ia=this.addCheckbox(z,mxResources.get("allPages"),K,!K),la=this.addCheckbox(z,mxResources.get("layers"),!0),Y=this.addCheckbox(z,mxResources.get("tags"),!0),ma=this.addCheckbox(z,mxResources.get("lightbox"),!0),Z=null;if(EditorUi.enableHtmlEditOption){Z=this.addEditButton(z,ma);var k=Z.getEditInput();k.style.marginBottom="16px";F+=50;mxEvent.addListener(ma,"change",function(){ma.checked?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled");k.checked&&+ma.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,z,mxUtils.bind(this,function(){t(N.checked?l:null,ca.checked,X.value,da.getTarget(),da.getColor(),aa.checked,ia.checked,la.checked,Y.checked,ma.checked,null!=Z?Z.getLink():null,null!=ea?ea.value:null)}),null,c,f);this.showDialog(c.container,340,F,!0,!0);C.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,l,t,z,C,F,N,K,J,da){var ea=document.createElement("div");+ea.style.whiteSpace="nowrap";var ca=document.createElement("h3");mxUtils.write(ca,c||mxResources.get("publish"));ca.style.width="100%";ca.style.textAlign="center";ca.style.marginTop="2px";ca.style.marginBottom="20px";ea.appendChild(ca);var X=document.createElement("select");c=30;X.className="geBtn";X.style.marginBottom="8px";X.style.marginLeft="0px";X.style.width="100%";X.style.boxSizing="border-box";if(null==N||""==N.getHash())z=null!=z?z:"https://www.drawio.com/doc/faq/publish-diagram-as-link",+ca=document.createElement("option"),mxUtils.write(ca,mxResources.get("makeCopy")),ca.setAttribute("value","copy"),X.appendChild(ca);ca=document.createElement("option");mxUtils.write(ca,mxResources.get("authorizationRequired"));ca.setAttribute("value","auth");X.appendChild(ca);null!=N&&""!=N.getHash()||ca.setAttribute("disabled","disabled");N=document.createElement("option");N.setAttribute("value","public");X.appendChild(N);null!=F?(mxUtils.write(N,mxResources.get("publicDiagramUrl")),N.setAttribute("title",+F),X.value="public"):(mxUtils.write(N,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),N.setAttribute("disabled","disabled"));ea.appendChild(X);mxUtils.br(ea);X.focus();var aa=null,ia=null;if(null!=f||null!=l)c+=30,mxUtils.write(ea,mxResources.get("width")+":"),aa=document.createElement("input"),aa.setAttribute("type","text"),aa.style.marginRight="16px",aa.style.width="50px",aa.style.marginLeft="6px",aa.style.marginRight="16px",aa.style.marginBottom="10px",aa.value=+"100%",ea.appendChild(aa),mxUtils.write(ea,mxResources.get("height")+":"),ia=document.createElement("input"),ia.setAttribute("type","text"),ia.style.width="50px",ia.style.marginLeft="6px",ia.style.marginBottom="10px",ia.value=l+"px",ea.appendChild(ia),mxUtils.br(ea);var la=this.addLinkSection(ea,t),Y=J?this.addCheckbox(ea,mxResources.get("transparentBackground"),!1):null;null!=Y&&(c+=20);var ma=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),ma=this.addCheckbox(ea,mxResources.get("selectedPage")+": "+f));var Z=document.createElement("select");Z.style.maxWidth="260px";Z.style.marginLeft="8px";Z.style.marginTop="16px";f=document.createElement("option");f.setAttribute("value","0");mxUtils.write(f,mxResources.get("light"));Z.appendChild(f);f=document.createElement("option");f.setAttribute("value","1");mxUtils.write(f,mxResources.get("dark"));Z.appendChild(f);f=document.createElement("option");-f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));f.setAttribute("selected","selected");Z.appendChild(f);da&&(mxUtils.write(ea,mxResources.get("appearance")+":"),ea.appendChild(Z),mxUtils.br(ea),c+=30);var k=this.addCheckbox(ea,mxResources.get("lightbox"),!0,null,null,!t),A=this.addEditButton(ea,k),I=A.getEditInput();t&&(I.style.marginLeft=k.style.marginLeft,k.style.display="none",c-=20);var U=this.addCheckbox(ea,mxResources.get("layers"),!0);U.style.marginLeft=I.style.marginLeft;-U.style.marginTop="8px";var O=this.addCheckbox(ea,mxResources.get("tags"),!0);O.style.marginLeft=I.style.marginLeft;O.style.marginBottom="16px";O.style.marginTop="16px";mxEvent.addListener(k,"change",function(){k.checked?(U.removeAttribute("disabled"),I.removeAttribute("disabled"),O.removeAttribute("disabled")):(U.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));I.checked&&k.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled",-"disabled")});t=new CustomDialog(this,ea,mxUtils.bind(this,function(){K(la.getTarget(),la.getColor(),null==ma?!1:ma.checked,k.checked,A.getLink(),U.checked,null!=ba?ba.value:null,null!=ha?ha.value:null,O.checked,W.value,null!=Y?Y.checked:!1,Z.value)}),null,mxResources.get("create"),z,C);this.showDialog(t.container,340,296+c,!0,!0);null!=ba?(ba.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)):null==W.parentNode;la.focus()};EditorUi.prototype.showRemoteExportDialog=+f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));f.setAttribute("selected","selected");Z.appendChild(f);da&&(mxUtils.write(ea,mxResources.get("appearance")+":"),ea.appendChild(Z),mxUtils.br(ea),c+=30);var k=this.addCheckbox(ea,mxResources.get("lightbox"),!0,null,null,!t),A=this.addEditButton(ea,k),I=A.getEditInput();t&&(I.style.marginLeft=k.style.marginLeft,k.style.display="none",c-=20);var T=this.addCheckbox(ea,mxResources.get("layers"),!0);T.style.marginLeft=I.style.marginLeft;+T.style.marginTop="8px";var O=this.addCheckbox(ea,mxResources.get("tags"),!0);O.style.marginLeft=I.style.marginLeft;O.style.marginBottom="16px";O.style.marginTop="16px";mxEvent.addListener(k,"change",function(){k.checked?(T.removeAttribute("disabled"),I.removeAttribute("disabled"),O.removeAttribute("disabled")):(T.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));I.checked&&k.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled",+"disabled")});t=new CustomDialog(this,ea,mxUtils.bind(this,function(){K(la.getTarget(),la.getColor(),null==ma?!1:ma.checked,k.checked,A.getLink(),T.checked,null!=aa?aa.value:null,null!=ia?ia.value:null,O.checked,X.value,null!=Y?Y.checked:!1,Z.value)}),null,mxResources.get("create"),z,C);this.showDialog(t.container,340,296+c,!0,!0);null!=aa?(aa.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?aa.select():document.execCommand("selectAll",!1,null)):null==X.parentNode;la.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,f,l,t,z){var C=document.createElement("div");C.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:"+(z?"10":"4")+"px";C.appendChild(F);if(z){mxUtils.write(C,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";C.appendChild(N);mxUtils.write(C,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";C.appendChild(K);mxUtils.br(C)}var J=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),da=t?null:this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);F=this.editor.graph;-var ea=t?null:this.addCheckbox(C,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=ea&&(ea.style.marginBottom="16px");c=new CustomDialog(this,C,mxUtils.bind(this,function(){var ca=parseInt(N.value)/100||1,W=parseInt(K.value)||0;l(!J.checked,null!=da?da.checked:!1,null!=ea?ea.checked:!1,ca,W)}),null,c,f);this.showDialog(c.container,300,(z?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,l,t,z,C,F,N,K){F=null!=F?F:Editor.defaultIncludeDiagram;-var J=document.createElement("div");J.style.whiteSpace="nowrap";var da=this.editor.graph,ea="jpeg"==N||"webp"==N?220:320,ca=document.createElement("h3");mxUtils.write(ca,c);ca.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";J.appendChild(ca);mxUtils.write(J,mxResources.get("zoom")+":");var W=document.createElement("input");W.setAttribute("type","text");W.style.marginRight="16px";W.style.width="60px";W.style.marginLeft="4px";W.style.marginRight="12px";W.value=this.lastExportZoom||-"100%";J.appendChild(W);mxUtils.write(J,mxResources.get("borderWidth")+":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.value=this.lastExportBorder||"0";J.appendChild(ba);mxUtils.br(J);var ha=this.addCheckbox(J,mxResources.get("selectionOnly"),!1,da.isSelectionEmpty()),la=document.createElement("input");la.style.marginTop="16px";la.style.marginRight="8px";la.style.marginLeft="24px";la.setAttribute("disabled",+var ea=t?null:this.addCheckbox(C,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=ea&&(ea.style.marginBottom="16px");c=new CustomDialog(this,C,mxUtils.bind(this,function(){var ca=parseInt(N.value)/100||1,X=parseInt(K.value)||0;l(!J.checked,null!=da?da.checked:!1,null!=ea?ea.checked:!1,ca,X)}),null,c,f);this.showDialog(c.container,300,(z?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,l,t,z,C,F,N,K){F=null!=F?F:Editor.defaultIncludeDiagram;+var J=document.createElement("div");J.style.whiteSpace="nowrap";var da=this.editor.graph,ea="jpeg"==N||"webp"==N?220:320,ca=document.createElement("h3");mxUtils.write(ca,c);ca.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";J.appendChild(ca);mxUtils.write(J,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%";J.appendChild(X);mxUtils.write(J,mxResources.get("borderWidth")+":");var aa=document.createElement("input");aa.setAttribute("type","text");aa.style.marginRight="16px";aa.style.width="60px";aa.style.marginLeft="4px";aa.value=this.lastExportBorder||"0";J.appendChild(aa);mxUtils.br(J);var ia=this.addCheckbox(J,mxResources.get("selectionOnly"),!1,da.isSelectionEmpty()),la=document.createElement("input");la.style.marginTop="16px";la.style.marginRight="8px";la.style.marginLeft="24px";la.setAttribute("disabled","disabled");la.setAttribute("type","checkbox");var Y=document.createElement("select");Y.style.marginTop="16px";Y.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(ca=0;ca<c.length;ca++)if(!da.isSelectionEmpty()||"selectionOnly"!=c[ca]){var ma=document.createElement("option");mxUtils.write(ma,mxResources.get(c[ca]));ma.setAttribute("value",c[ca]);Y.appendChild(ma)}K?(mxUtils.write(J,mxResources.get("size")+":"),J.appendChild(Y),mxUtils.br(J),ea+=26,mxEvent.addListener(Y,"change",function(){"selectionOnly"==-Y.value&&(ha.checked=!0)})):C&&(J.appendChild(la),mxUtils.write(J,mxResources.get("crop")),mxUtils.br(J),ea+=30,mxEvent.addListener(ha,"change",function(){ha.checked?la.removeAttribute("disabled"):la.setAttribute("disabled","disabled")}));da.isSelectionEmpty()?K&&(ha.style.display="none",ha.nextSibling.style.display="none",ha.nextSibling.nextSibling.style.display="none",ea-=30):(Y.value="diagram",la.setAttribute("checked","checked"),la.defaultChecked=!0,mxEvent.addListener(ha,"change",function(){Y.value=-ha.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(J,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=N&&"webp"!=N),k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";C=document.createElement("option");C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));k.appendChild(C);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));k.appendChild(K);+Y.value&&(ia.checked=!0)})):C&&(J.appendChild(la),mxUtils.write(J,mxResources.get("crop")),mxUtils.br(J),ea+=30,mxEvent.addListener(ia,"change",function(){ia.checked?la.removeAttribute("disabled"):la.setAttribute("disabled","disabled")}));da.isSelectionEmpty()?K&&(ia.style.display="none",ia.nextSibling.style.display="none",ia.nextSibling.nextSibling.style.display="none",ea-=30):(Y.value="diagram",la.setAttribute("checked","checked"),la.defaultChecked=!0,mxEvent.addListener(ia,"change",function(){Y.value=+ia.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(J,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=N&&"webp"!=N),k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";C=document.createElement("option");C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));k.appendChild(C);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));k.appendChild(K);"svg"==N&&mxUtils.lightDarkColorSupported?(C=document.createElement("option"),C.setAttribute("value","auto"),mxUtils.write(C,mxResources.get("automatic")),C.setAttribute("selected","selected"),k.appendChild(C)):Editor.isDarkMode()?K.setAttribute("selected","selected"):C.setAttribute("selected","selected");mxUtils.write(J,mxResources.get("appearance")+":");J.appendChild(k);mxUtils.br(J);ea+=26;var A=this.addCheckbox(J,mxResources.get("shadow"),da.shadowVisible),I=null;if("png"==N||"jpeg"==N||"webp"==-N)I=this.addCheckbox(J,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ea+=30;var U=this.addCheckbox(J,mxResources.get("includeCopyOfMyDiagram")+":",F,null,null,"jpeg"!=N&&"webp"!=N),O=document.createElement("select");O.style.maxWidth="260px";O.style.marginLeft="28px";"png"==N||"svg"==N?(F=function(){U.checked?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")},da=document.createElement("option"),da.setAttribute("value","allPages"),mxUtils.write(da,mxResources.get("allPages")),-O.appendChild(da),da=document.createElement("option"),da.setAttribute("value","currentPage"),mxUtils.write(da,mxResources.get("currentPage")),O.appendChild(da),U.style.marginBottom="12px",O.style.marginBottom="16px",J.appendChild(O),mxUtils.br(J),ea+=20,null!=this.lastEmbedInclude&&(O.value=this.lastEmbedInclude),mxEvent.addListener(U,"change",F),F()):U.style.marginBottom="16px";var S=document.createElement("input");S.style.marginBottom="16px";S.style.marginRight="8px";S.setAttribute("type","checkbox");-var X=document.createElement("input");X.style.marginBottom="16px";X.style.marginRight="8px";X.setAttribute("type","checkbox");f&&(S.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,J.appendChild(S),mxUtils.write(J,mxResources.get("embedImages")),mxUtils.br(J),X.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,J.appendChild(X),mxUtils.write(J,mxResources.get("embedFonts")),mxUtils.br(J),ea+=50);var aa=document.createElement("select");aa.style.maxWidth="260px";aa.style.marginLeft=-"8px";C=document.createElement("option");C.setAttribute("value","auto");mxUtils.write(C,mxResources.get("automatic"));aa.appendChild(C);F=document.createElement("option");F.setAttribute("value","blank");mxUtils.write(F,mxResources.get("openInNewWindow"));aa.appendChild(F);F=document.createElement("option");F.setAttribute("value","self");mxUtils.write(F,mxResources.get("openInThisWindow"));aa.appendChild(F);F=document.createElement("div");mxUtils.write(F,mxResources.get("LinksLost"));F.style.margin=-"7px";F.style.display="none";"svg"==N&&(mxUtils.write(J,mxResources.get("links")+":"),J.appendChild(aa),J.appendChild(F),mxUtils.br(J),mxUtils.br(J),ea+=50);l=new CustomDialog(this,J,mxUtils.bind(this,function(){this.lastExportBorder=ba.value;this.lastExportZoom=W.value;this.lastEmbedImages=S.checked;this.lastEmbedFonts=X.checked;this.lastEmbedInclude=O.value;z(W.value,Z.checked,!ha.checked,A.checked,U.checked,S.checked&&f,ba.value,la.checked,("png"==N||"svg"==N)&&"currentPage"==O.value,aa.value,-null!=I?I.checked:null,null!=k?k.value:null,Y.value,X.checked)}),null,l,t);this.showDialog(l.container,340,ea,!0,!0,null,null,null,null,!0);W.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?W.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,l,t,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var N=document.createElement("h3");mxUtils.write(N,f);N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";-C.appendChild(N)}var K=this.addCheckbox(C,mxResources.get("fit"),!0),J=this.addCheckbox(C,mxResources.get("shadow"),F.shadowVisible&&t,!t),da=this.addCheckbox(C,l),ea=this.addCheckbox(C,mxResources.get("lightbox"),!0),ca=this.addEditButton(C,ea),W=ca.getEditInput(),ba=1<F.model.getChildCount(F.model.getRoot()),ha=this.addCheckbox(C,mxResources.get("layers"),ba,!ba);ha.style.marginLeft=W.style.marginLeft;ha.style.marginBottom="12px";ha.style.marginTop="8px";mxEvent.addListener(ea,"change",function(){ea.checked?-(ba&&ha.removeAttribute("disabled"),W.removeAttribute("disabled")):(ha.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"));W.checked&&ea.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){c(K.checked,J.checked,da.checked,ea.checked,ca.getLink(),ha.checked)}),null,mxResources.get("embed"),z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=-function(c,f,l,t,z,C,F,N){function K(W){var ba=" ",ha="";t&&(ba=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=da?"&page="+da:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",-ha+="cursor:pointer;");c&&(ha+="max-width:100%;");var la="";l&&(la=' width="'+Math.round(J.width)+'" height="'+Math.round(J.height)+'"');F('<img src="'+W+'"'+la+(""!=ha?' style="'+ha+'"':"")+ba+"/>")}var J=this.editor.graph.getGraphBounds(),da=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(W){var ba=t?this.getFileData(!0):null;W=this.createImageDataUri(W,ba,"png");K(W)}),null,null,null,mxUtils.bind(this,function(W){N({message:mxResources.get("unknownError")})}),+N)I=this.addCheckbox(J,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ea+=30;var T=this.addCheckbox(J,mxResources.get("includeCopyOfMyDiagram")+":",F,null,null,"jpeg"!=N&&"webp"!=N),O=document.createElement("select");O.style.maxWidth="260px";O.style.marginLeft="28px";"png"==N||"svg"==N?(F=function(){T.checked?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")},da=document.createElement("option"),da.setAttribute("value","allPages"),mxUtils.write(da,mxResources.get("allPages")),+O.appendChild(da),da=document.createElement("option"),da.setAttribute("value","currentPage"),mxUtils.write(da,mxResources.get("currentPage")),O.appendChild(da),T.style.marginBottom="12px",O.style.marginBottom="16px",J.appendChild(O),mxUtils.br(J),ea+=20,null!=this.lastEmbedInclude&&(O.value=this.lastEmbedInclude),mxEvent.addListener(T,"change",F),F()):T.style.marginBottom="16px";var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");+var V=document.createElement("input");V.style.marginBottom="16px";V.style.marginRight="8px";V.setAttribute("type","checkbox");f&&(U.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,J.appendChild(U),mxUtils.write(J,mxResources.get("embedImages")),mxUtils.br(J),V.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,J.appendChild(V),mxUtils.write(J,mxResources.get("embedFonts")),mxUtils.br(J),ea+=50);var ba=document.createElement("select");ba.style.maxWidth="260px";ba.style.marginLeft=+"8px";C=document.createElement("option");C.setAttribute("value","auto");mxUtils.write(C,mxResources.get("automatic"));ba.appendChild(C);F=document.createElement("option");F.setAttribute("value","blank");mxUtils.write(F,mxResources.get("openInNewWindow"));ba.appendChild(F);F=document.createElement("option");F.setAttribute("value","self");mxUtils.write(F,mxResources.get("openInThisWindow"));ba.appendChild(F);F=document.createElement("div");mxUtils.write(F,mxResources.get("LinksLost"));F.style.margin=+"7px";F.style.display="none";"svg"==N&&(mxUtils.write(J,mxResources.get("links")+":"),J.appendChild(ba),J.appendChild(F),mxUtils.br(J),mxUtils.br(J),ea+=50);l=new CustomDialog(this,J,mxUtils.bind(this,function(){this.lastExportBorder=aa.value;this.lastExportZoom=X.value;this.lastEmbedImages=U.checked;this.lastEmbedFonts=V.checked;this.lastEmbedInclude=O.value;z(X.value,Z.checked,!ia.checked,A.checked,T.checked,U.checked&&f,aa.value,la.checked,("png"==N||"svg"==N)&&"currentPage"==O.value,ba.value,+null!=I?I.checked:null,null!=k?k.value:null,Y.value,V.checked)}),null,l,t);this.showDialog(l.container,340,ea,!0,!0,null,null,null,null,!0);X.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?X.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,l,t,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var N=document.createElement("h3");mxUtils.write(N,f);N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";+C.appendChild(N)}var K=this.addCheckbox(C,mxResources.get("fit"),!0),J=this.addCheckbox(C,mxResources.get("shadow"),F.shadowVisible&&t,!t),da=this.addCheckbox(C,l),ea=this.addCheckbox(C,mxResources.get("lightbox"),!0),ca=this.addEditButton(C,ea),X=ca.getEditInput(),aa=1<F.model.getChildCount(F.model.getRoot()),ia=this.addCheckbox(C,mxResources.get("layers"),aa,!aa);ia.style.marginLeft=X.style.marginLeft;ia.style.marginBottom="12px";ia.style.marginTop="8px";mxEvent.addListener(ea,"change",function(){ea.checked?+(aa&&ia.removeAttribute("disabled"),X.removeAttribute("disabled")):(ia.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"));X.checked&&ea.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){c(K.checked,J.checked,da.checked,ea.checked,ca.getLink(),ia.checked)}),null,mxResources.get("embed"),z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=+function(c,f,l,t,z,C,F,N){function K(X){var aa=" ",ia="";t&&(aa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=da?"&page="+da:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",+ia+="cursor:pointer;");c&&(ia+="max-width:100%;");var la="";l&&(la=' width="'+Math.round(J.width)+'" height="'+Math.round(J.height)+'"');F('<img src="'+X+'"'+la+(""!=ia?' style="'+ia+'"':"")+aa+"/>")}var J=this.editor.graph.getGraphBounds(),da=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(X){var aa=t?this.getFileData(!0):null;X=this.createImageDataUri(X,aa,"png");K(X)}),null,null,null,mxUtils.bind(this,function(X){N({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),J.width*J.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ea="";l&&(ea="&w="+Math.round(2*J.width)+"&h="+Math.round(2*J.height));var ca=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(t?"1":"0")+ea+"&xml="+encodeURIComponent(f));ca.send(mxUtils.bind(this,function(){200<=ca.getStatus()&&299>=ca.getStatus()?K("data:image/png;base64,"+ca.getText()):N({message:mxResources.get("unknownError")})}))}else N({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,f,l,t,z,C,F){var N=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),K=N.getElementsByTagName("a");if(null!=K)for(var J=0;J<K.length;J++){var da=K[J].getAttribute("href");null!=da&&"#"==da.charAt(0)&&"_blank"==K[J].getAttribute("target")&&K[J].removeAttribute("target")}t&&N.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(N);if(l){var ea=" ",ca="";t&&(ea="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+-EditorUi.lightboxHost+"/?client=1"+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ca+="cursor:pointer;");c&&(ca+="max-width:100%;");this.editor.convertImages(N,mxUtils.bind(this,function(W){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(W))+'"'+(""!=ca?' style="'+ca+'"':"")+ea+"/>")}))}else ca="",t&&(f=this.getSelectedPageIndex(),N.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"++EditorUi.lightboxHost+"/?client=1"+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ca+="cursor:pointer;");c&&(ca+="max-width:100%;");this.editor.convertImages(N,mxUtils.bind(this,function(X){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(X))+'"'+(""!=ca?' style="'+ca+'"':"")+ea+"/>")}))}else ca="",t&&(f=this.getSelectedPageIndex(),N.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}}})(this);"),ca+="cursor:pointer;"),c&&(c=parseInt(N.getAttribute("width")),z=parseInt(N.getAttribute("height")),N.setAttribute("viewBox","-0.5 -0.5 "+c+" "+z),ca+="max-width:100%;max-height:"+z+"px;",N.removeAttribute("height")),""!=ca&&N.setAttribute("style",ca),this.editor.addFontCss(N),this.editor.graph.mathEnabled&&this.editor.addMathCss(N),F(mxUtils.getXml(N))};EditorUi.prototype.timeSince=function(c){c=Math.floor((new Date-c)/1E3);var f=Math.floor(c/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(c/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(c/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(c/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(c/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,f){if(null!=c){var l=null;if("diagram"==c.nodeName)l=c;else if("mxfile"==c.nodeName){var t=c.getElementsByTagName("diagram");if(0<t.length){l=t[0];var z=f.getGlobalVariable;f.getGlobalVariable=function(C){return"page"==C?l.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==C?1:z.apply(this,arguments)}}}null!=l&&(c=Editor.parseDiagramNode(l))}t=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(c)}catch(C){}finally{this.editor.graph=t}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};@@ -3695,283 +3695,284 @@ EditorUi.prototype.getPngFileProperties=function(c){var f=1,l=0;if(null!=c){if(c!0),C),F=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){C=this.createTemporaryGraph(C.getStylesheet());var N=C.getGlobalVariable;C.setBackgroundImage=this.editor.graph.setBackgroundImage;var K=this.pages[0];this.currentPage==K?C.setBackgroundImage(this.editor.graph.backgroundImage):null!=K.viewState&&null!=K.viewState&&C.setBackgroundImage(K.viewState.backgroundImage);C.getGlobalVariable=function(J){return"page"==J?K.getName():"pagenumber"==J?1:N.apply(this,arguments)};document.body.appendChild(C.container);C.model.setRoot(K.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(J){try{null==F&&(F=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var da=J.toDataURL("image/png");da=Editor.writeGraphModelToPng(da,"tEXt","mxfile",encodeURIComponent(F));c(da.substring(da.lastIndexOf(",")+1));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container)}catch(ea){null!=f&&f(ea)}}),null,null,null,mxUtils.bind(this,function(J){null!=f&&f(J)}),null,null,t,null,C.shadowVisible,null,C,z,null,null,null,"diagram",null)}catch(J){null!=f&&f(J)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){N=null!=N?N:!0;da=null!=da?da:0;F=null!=K?K:f.background;F==mxConstants.NONE&&(F=null);null==F&&"none"==f.getAdaptiveColors()&&(F="#ffffff");K=this.editor.graph.createSvgImageExport(null!=c);C=f.getSvg(F,J,da,null,null,C,null,K,null,f.shadowVisible||ea,null,ca,"diagram");(f.shadowVisible||ea)&&f.addSvgShadow(C,null,null,0==da);null!=c&&C.setAttribute("content",c);null!=-l&&C.setAttribute("resource",l);var W=mxUtils.bind(this,function(ba){ba=(t?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(ba);null!=z&&z(ba);return ba});f.mathEnabled&&this.editor.addMathCss(C);if(null!=z)this.embedFonts(C,mxUtils.bind(this,function(ba){N?this.editor.convertImages(ba,mxUtils.bind(this,function(ha){W(ha)})):W(ba)}));else return W(C)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=-this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),f(c)}catch(t){f(c)}}))}catch(l){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){K=null!=K?K:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(ba){Editor.addRetryToError(ba,mxUtils.bind(this,function(){this.exportImage(c,f,l,t,z,C,F,N,K,J,da,ea,-ca)}));this.handleError(ba)}))){var W=this.editor.graph.isSelectionEmpty();l=null!=l?l:W;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(ba){this.spinner.stop();try{this.saveCanvas(ba,z?this.getFileData(!0,null,null,null,l,N,null,null,null,null,null,c,C):null,K,null==this.pages||0==this.pages.length,da)}catch(ha){this.handleError(ha)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(ba){this.spinner.stop();this.handleError(ba)}),-null,l,c||1,f,t,null,null,C,F,J,ea,ca)}catch(ba){this.spinner.stop(),this.handleError(ba)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,l,t,z,C,F){f=null!=f?f:0;l=null!=l?l:0;var N=[];try{var K=this.editor.graph;if(null!=c&&0<+l&&C.setAttribute("resource",l);var X=mxUtils.bind(this,function(aa){aa=(t?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(aa);null!=z&&z(aa);return aa});f.mathEnabled&&this.editor.addMathCss(C);if(null!=z)this.embedFonts(C,mxUtils.bind(this,function(aa){N?this.editor.convertImages(aa,mxUtils.bind(this,function(ia){X(ia)})):X(aa)}));else return X(C)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=+this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),f(c)}catch(t){f(c)}}))}catch(l){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){K=null!=K?K:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(aa){Editor.addRetryToError(aa,mxUtils.bind(this,function(){this.exportImage(c,f,l,t,z,C,F,N,K,J,da,ea,+ca)}));this.handleError(aa)}))){var X=this.editor.graph.isSelectionEmpty();l=null!=l?l:X;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(aa){this.spinner.stop();try{this.saveCanvas(aa,z?this.getFileData(!0,null,null,null,l,N,null,null,null,null,null,c,C):null,K,null==this.pages||0==this.pages.length,da)}catch(ia){this.handleError(ia)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(aa){this.spinner.stop();this.handleError(aa)}),+null,l,c||1,f,t,null,null,C,F,J,ea,ca)}catch(aa){this.spinner.stop(),this.handleError(aa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,l,t,z,C,F){f=null!=f?f:0;l=null!=l?l:0;var N=[];try{var K=this.editor.graph;if(null!=c&&0<c.length){K.model.beginUpdate();try{var J=mxUtils.parseXml(c);c={};var da=this.editor.extractGraphModel(J.documentElement,null!=this.pages);if(null!=da&&"mxfile"==da.nodeName&&null!=this.pages){var ea=da.getElementsByTagName("diagram");if(1==ea.length&&!C){if(da=Editor.parseDiagramNode(ea[0]),null!=this.currentPage&&(c[ea[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ca=ea[0].getAttribute("name");null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,-ca))}}else if(0<ea.length){C=[];var W=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ea[0].getAttribute("id")]=this.pages[0].getId(),ca=ea[0].getAttribute("name"),null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ca)),da=Editor.parseDiagramNode(ea[0]),t=!1,W=1);for(;W<ea.length;W++){var ba=ea[W].getAttribute("id");ea[W].removeAttribute("id");var ha=this.updatePageRoot(new DiagramPage(ea[W]));c[ba]=ea[W].getAttribute("id");var la=this.pages.length;-null==ha.getName()&&ha.setName(mxResources.get("pageWithNumber",[la+1]));K.model.execute(new ChangePage(this,ha,ha,la,!0));C.push(ha)}this.updatePageLinks(c,C)}}if(null!=da&&"mxGraphModel"===da.nodeName){N=K.importGraphModel(da,f,l,t);if(null!=N)for(this.addLocalPagesToMapping(c),W=0;W<N.length;W++)this.updatePageLinksForCell(c,N[W]);var Y=K.parseBackgroundImage(da.getAttribute("backgroundImage"));if(null!=Y&&null!=Y.originalSrc){this.updateBackgroundPageLink(c,Y);var ma=new ChangePageSetup(this,+ca))}}else if(0<ea.length){C=[];var X=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ea[0].getAttribute("id")]=this.pages[0].getId(),ca=ea[0].getAttribute("name"),null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ca)),da=Editor.parseDiagramNode(ea[0]),t=!1,X=1);for(;X<ea.length;X++){var aa=ea[X].getAttribute("id");ea[X].removeAttribute("id");var ia=this.updatePageRoot(new DiagramPage(ea[X]));c[aa]=ea[X].getAttribute("id");var la=this.pages.length;+null==ia.getName()&&ia.setName(mxResources.get("pageWithNumber",[la+1]));K.model.execute(new ChangePage(this,ia,ia,la,!0));C.push(ia)}this.updatePageLinks(c,C)}}if(null!=da&&"mxGraphModel"===da.nodeName){N=K.importGraphModel(da,f,l,t);if(null!=N)for(this.addLocalPagesToMapping(c),X=0;X<N.length;X++)this.updatePageLinksForCell(c,N[X]);var Y=K.parseBackgroundImage(da.getAttribute("backgroundImage"));if(null!=Y&&null!=Y.originalSrc){this.updateBackgroundPageLink(c,Y);var ma=new ChangePageSetup(this,null,Y);ma.ignoreColor=!0;K.model.execute(ma)}}F&&K.pasteCellStyles(K.includeDescendants(N),K.defaultVertexStyle,K.defaultEdgeStyle)}finally{K.model.endUpdate()}}}catch(Z){if(z)throw Z;this.handleError(Z)}return N};EditorUi.prototype.updatePageLinks=function(c,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(c,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(c,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=c[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=l&&(f.originalSrc="data:page/id,"+l)}}catch(t){}};EditorUi.prototype.updatePageLinksForCell=function(c,f){var l=document.createElement("div"),t=this.editor.graph,z=t.getLinkForCell(f);null!=z&&t.setLinkForCell(f,this.updatePageLink(c,z));if(t.isHtmlLabel(f)){l.innerHTML=Graph.sanitizeHtml(t.getLabel(f));for(var C=l.getElementsByTagName("a"),F=!1,N=0;N<C.length;N++)z=C[N].getAttribute("href"),null!=z&&(C[N].setAttribute("href",this.updatePageLink(c,z)),F=!0);F&&t.labelChanged(f,l.innerHTML)}for(N=0;N<t.model.getChildCount(f);N++)this.updatePageLinksForCell(c,t.model.getChildAt(f,N))};EditorUi.prototype.updatePageLink=function(c,f){if(Graph.isPageLink(f)){var l=c[f.substring(f.indexOf(",")+1)];f=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==f.substring(0,17))try{var t=JSON.parse(f.substring(17));if(null!=t.actions){for(var z=0;z<t.actions.length;z++){var C=t.actions[z];if(null!=C.open&&Graph.isPageLink(C.open)){var F=C.open.substring(C.open.indexOf(",")+1);l=c[F];null!=l?C.open="data:page/id,"+l:null==this.getPageById(F)&&delete C.open}}f="data:action/json,"+JSON.stringify(t)}}catch(N){}return f};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,f,l,t,z){var C=mxUtils.bind(this,function(F){this.loadingExtensions=!1;null!=l?l(F):this.handleError(F)});this.createTimeout(null,mxUtils.bind(this,function(F){t=null!=t?t:c.name;var N=mxUtils.bind(this,-function(J){F.clear()&&C(J)}),K=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var J=this.isRemoteVisioFormat(t);try{var da=t.lastIndexOf(".");if(0<=da&&da<t.length)t.substring(da+1).toUpperCase();else{var ea=t.lastIndexOf("/");0<=ea&&ea<t.length&&(t=t.substring(ea+1))}}catch(W){}if(J)if(null==VSD_CONVERT_URL||this.isOffline())N({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{J=new FormData;-J.append("file1",c,t);var ca=new XMLHttpRequest;ca.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(t)?"?stencil=1":""));ca.responseType="blob";this.addRemoteServiceSecurityCheck(ca);null!=z&&ca.setRequestHeader("x-convert-custom",z);ca.onreadystatechange=mxUtils.bind(this,function(){if(4==ca.readyState&&F.clear())if(200<=ca.status&&299>=ca.status)try{var W=ca.response;if("text/xml"==W.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(ha){try{f(ha.target.result)}catch(la){N({message:mxResources.get("errorLoadingFile")})}});-ba.readAsText(W)}else this.doImportVisio(W,f,N,t)}catch(ha){N(ha)}else try{""==ca.responseType||"text"==ca.responseType?N({message:ca.responseText}):(ba=new FileReader,ba.onload=function(){try{N({message:JSON.parse(ba.result).Message})}catch(ha){N(ha)}},ba.readAsText(ca.response))}catch(ha){N({})}});ca.send(J)}else if(F.clear())try{this.doImportVisio(c,f,N,t)}catch(W){N(W)}}else N({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?+function(J){F.clear()&&C(J)}),K=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var J=this.isRemoteVisioFormat(t);try{var da=t.lastIndexOf(".");if(0<=da&&da<t.length)t.substring(da+1).toUpperCase();else{var ea=t.lastIndexOf("/");0<=ea&&ea<t.length&&(t=t.substring(ea+1))}}catch(X){}if(J)if(null==VSD_CONVERT_URL||this.isOffline())N({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{J=new FormData;+J.append("file1",c,t);var ca=new XMLHttpRequest;ca.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(t)?"?stencil=1":""));ca.responseType="blob";this.addRemoteServiceSecurityCheck(ca);null!=z&&ca.setRequestHeader("x-convert-custom",z);ca.onreadystatechange=mxUtils.bind(this,function(){if(4==ca.readyState&&F.clear())if(200<=ca.status&&299>=ca.status)try{var X=ca.response;if("text/xml"==X.type){var aa=new FileReader;aa.onload=mxUtils.bind(this,function(ia){try{f(ia.target.result)}catch(la){N({message:mxResources.get("errorLoadingFile")})}});+aa.readAsText(X)}else this.doImportVisio(X,f,N,t)}catch(ia){N(ia)}else try{""==ca.responseType||"text"==ca.responseType?N({message:ca.responseText}):(aa=new FileReader,aa.onload=function(){try{N({message:JSON.parse(aa.result).Message})}catch(ia){N(ia)}},aa.readAsText(ca.response))}catch(ia){N({})}});ca.send(J)}else if(F.clear())try{this.doImportVisio(c,f,N,t)}catch(X){N(X)}}else N({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?K():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",K,null,null,null,N))}),C)};EditorUi.prototype.importGraphML=function(c,f,l){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=l?l(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(N){z.clear()&&t(N)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,f,t)}catch(N){C(N)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});-this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?F():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))}),t)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var f=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.createTimeout(null,mxUtils.bind(this,function(l){var t=mxUtils.bind(this,function(C){l.clear()&&f(C)}),z=mxUtils.bind(this,function(){this.loadingExtensions=-!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||t({message:mxResources.get("unknownError")})}catch(C){t(C)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))}),f)}};EditorUi.prototype.convertLucidChart=function(c,-f,l){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=l?l(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(N){z.clear()&&t(N)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if("undefined"!==typeof window.LucidImporter)try{var N=JSON.parse(c);f(LucidImporter.importState(N));try{if(null!=window.console&&"1"==urlParams.test){var K=[(new Date).toISOString(),"convertLucidChart",N];null!=N.state&&-K.push(JSON.parse(N.state));if(null!=N.svgThumbs)for(var J=0;J<N.svgThumbs.length;J++)K.push(Editor.createSvgDataUri(N.svgThumbs[J]));null!=N.thumb&&K.push(N.thumb);console.log.apply(console,K)}}catch(da){}}catch(da){null!=window.console&&console.error(da),C(da)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",-function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",F,null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))}),t)};EditorUi.prototype.createMermaidXml=function(c,f,l,t,z,C){var F=new Graph(document.createElement("div"));-l=F.insertVertex(null,null,null,0,0,t,z,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");F.setAttributeForCell(l,"mermaidData",JSON.stringify({data:c,config:f},null,2));null!=C&&F.setAttributeForCell(l,"templatePrompt",C);c=(new mxCodec).encode(F.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,f,l){var t=0,z=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(C){var F=new mxXmlRequest("https://www.draw.io/generate/v2",-c,"POST"),N=mxUtils.bind(this,function(K){C.clear()&&l(K)});F.send(mxUtils.bind(this,function(K){if(C.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var da=mxUtils.trim(K.getText());this.generateMermaidImage(da,null,mxUtils.bind(this,function(ea,ca,W){this.tryAndHandle(mxUtils.bind(this,function(){C.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",da),f(da,ea,ca,W))}),N)}),N,mxUtils.bind(this,function(ea){3>-t++?C.clear()&&z():N(ea)}))}),N);else{var J={message:mxResources.get("error")+" "+K.getStatus()};try{J=JSON.parse(K.getText()),J=J.error}catch(da){}N(J)}}),N)}),l)});z()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var l=1<f.length?-f[1]:null;if(null!=l){var t=l.indexOf("-");0<t&&(l=l.substring(0,t))}if(0<f.length&&"mermaid"==mxUtils.trim(f[0])||null!=l&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l))f.shift(),c=mxUtils.trim(f.join("\n")),f=c.split("\n");l=f[0].split(" ")[0].replace(/:$/,"");t=l.indexOf("-");0<t&&(l=l.substring(0,t));try{"mindmap"==l&&2<f.length&&(c=extractMermaidMindmap(f))}catch(z){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,-f,l,t,z){var C=mxUtils.bind(this,function(N){this.loadingMermaid=!1;null!=t?t(N):this.handleError(N)}),F=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(f.theme="dark");var N=mxUtils.bind(this,function(K){try{if(mxClient.IS_IE||mxClient.IS_IE11)K=-K.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var J=mxUtils.parseXml(K).getElementsByTagName("svg");if(0<J.length&&"error"!=J[0].getAttribute("aria-roledescription")){var da=parseFloat(J[0].getAttribute("width")),ea=parseFloat(J[0].getAttribute("height"));if(isNaN(da)||isNaN(ea))try{var ca=J[0].getAttribute("viewBox").split(/\s+/);da=parseFloat(ca[2]);ea=parseFloat(ca[3])}catch(W){da=da||100,ea=ea||100}l(this.convertDataUri(Editor.createSvgDataUri(K)),-da,ea)}else null!=z?z():t({message:mxResources.get("invalidInput")})}catch(W){t(W)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(K){N(K.svg)}).catch(function(K){null!=z?z(K):t(K)})}catch(K){t(K)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(N){this.importXml(N,-null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",F,null,null,null,C)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))};EditorUi.prototype.generatePlantUmlImage=function(c,f,l,t){function z(N,K,J){c1=N>>2;c2=(N&3)<<4|K>>4;c3=(K&15)<<2|J>>6;c4=J&63;r="";r+=C(c1&63);r+=C(c2&63);r+=C(c3&63);return r+=C(c4&63)}function C(N){if(10>N)return String.fromCharCode(48+N);N-=10;if(26>N)return String.fromCharCode(65+N);N-=26;if(26>N)return String.fromCharCode(97+-N);N-=26;return 0==N?"-":1==N?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(N){r="";for(i=0;i<N.length;i+=3)r=i+2==N.length?r+z(N.charCodeAt(i),N.charCodeAt(i+1),0):i+1==N.length?r+z(N.charCodeAt(i),0,0):r+z(N.charCodeAt(i),N.charCodeAt(i+1),N.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(N){if(200<=this.status&&300>this.status)if("txt"==-f)l(this.response);else{var K=new FileReader;K.readAsDataURL(this.response);K.onloadend=function(J){var da=new Image;da.onload=function(){try{var ea=da.width,ca=da.height;if(0==ea&&0==ca){var W=K.result,ba=W.indexOf(","),ha=decodeURIComponent(escape(atob(W.substring(ba+1)))),la=mxUtils.parseXml(ha).getElementsByTagName("svg");0<la.length&&(ea=parseFloat(la[0].getAttribute("width")),ca=parseFloat(la[0].getAttribute("height")))}l(K.result,ea,ca)}catch(Y){t(Y)}};da.src=K.result};K.onerror=function(J){t(J)}}else t(N)};-F.onerror=function(N){t(N)};F.send()};EditorUi.prototype.insertAsPreText=function(c,f,l){var t=this.editor.graph,z=null;t.getModel().beginUpdate();try{z=t.insertVertex(null,null,"<pre>"+c+"</pre>",f,l,1,1,"text;html=1;align=left;verticalAlign=top;"),t.updateCellSize(z,!0)}finally{t.getModel().endUpdate()}return z};EditorUi.prototype.insertTextAt=function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;F=null!=F?F:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(ca){4==ca.readyState&&200<=ca.status&&299>=ca.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ca.responseText,f,l,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(z||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var K=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var J=Editor.extractGraphModelFromPdf(c);if(null!=-J&&0<J.length)return this.importXml(J,f,l,C,!0,N)}if(Editor.isPngDataUrl(c)&&(J=Editor.extractGraphModelFromPng(c),null!=J&&0<J.length))return this.importXml(J,f,l,C,!0,N);if("data:image/svg+xml;"==c.substring(0,19))try{J=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(J=c.substring(c.indexOf(",")+1),J=window.atob&&!mxClient.IS_SF?atob(J):Base64.decode(J,!0)):J=decodeURIComponent(c.substring(c.indexOf(",")+1));var da=this.importXml(J,f,l,C,!0,N);if(0<da.length)return da}catch(ca){}this.loadImage(c,-mxUtils.bind(this,function(ca){if("data:"==c.substring(0,5))this.resizeImage(ca,c,mxUtils.bind(this,function(ha,la,Y){K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),la,Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ha)+";"))}),F,this.maxImageSize);else{var W=Math.min(1,Math.min(this.maxImageSize/ca.width,this.maxImageSize/ca.height)),ba=Math.round(ca.width*W);ca=Math.round(ca.height*-W);K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),ba,ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var ca=null;K.getModel().beginUpdate();try{ca=K.insertVertex(K.getDefaultParent(),null,c,K.snap(f),K.snap(l),1,1,"text;"+(t?"html=1;":"")),K.updateCellSize(ca),K.fireEvent(new mxEventObject("textInserted","cells",[ca]))}finally{K.getModel().endUpdate()}K.setSelectionCell(ca)}))}else{c=-Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,l,C,null,N);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(ca){this.editor.graph.setSelectionCells(this.importXml(ca,f,l,C,null,N))}),mxUtils.bind(this,function(ca){this.handleError(ca)}));else{K=this.editor.graph;z=null;K.getModel().beginUpdate();try{z=K.insertVertex(K.getDefaultParent(),null,"",K.snap(f),K.snap(l),1,1,"text;whiteSpace=wrap;"+(t?"html=1;":""));-K.fireEvent(new mxEventObject("textInserted","cells",[z]));t&&(c=K.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");z.value=c;K.updateCellSize(z);if(0<this.maxTextWidth&&z.geometry.width>this.maxTextWidth){var ea=K.getPreferredSizeForCell(z,this.maxTextWidth);z.geometry.width=ea.width;z.geometry.height=ea.height}Graph.isLink(z.value)&&K.setLinkForCell(z,z.value);z.geometry.width+=K.gridSize;z.geometry.height+=K.gridSize}finally{K.getModel().endUpdate()}return[z]}}return[]};-EditorUi.prototype.formatFileSize=function(c){var f=-1;do c/=1024,f++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var f=c.indexOf(";");0<f&&(c=c.substring(0,f)+c.substring(c.indexOf(",",f+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,f){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=-c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,f){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=-l}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(F,N){StorageFile.listFiles(this,"F",F,N)});window.openBrowserFile=mxUtils.bind(this,function(F,N,K){StorageFile.getFileContent(this,F,N,K)});window.deleteBrowserFile=mxUtils.bind(this,function(F,N,K){StorageFile.deleteFile(this,F,N,K)});if(!f){var t=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));-window.openFile.setConsumer(mxUtils.bind(this,function(F,N){null!=N&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(N)?(F=new Blob([F],{type:"application/octet-stream"}),this.importVisio(F,mxUtils.bind(this,function(K){this.importXml(K,0,0,!0)}),null,N)):this.editor.graph.setSelectionCells(this.importXml(F,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var z=this.dialog,C=z.close;-this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=t;C.apply(z,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,f,l){var t=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(C){if(mxUtils.isEmptyObject(C.files))l();else{var F=0,N,K=!1;C.forEach(function(J,da){J=da.name.toLowerCase();"diagram/diagram.xml"==J?(K=!0,da.async("string").then(function(ea){0==-ea.indexOf("<mxfile ")?f(ea):l()})):0==J.indexOf("versions/")&&(J=parseInt(J.substr(9)),J>F&&(F=J,N=da))});0<F?N.async("string").then(function(J){(new XMLHttpRequest).upload&&t.isRemoteFileFormat(J,c.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):t.parseFileData(J,mxUtils.bind(this,function(da){4==da.readyState&&(200<=da.status&&299>=da.status?f(da.responseText):l())}),c.name):l()}):K||l()}},function(C){l(C)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||-this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,l))};EditorUi.prototype.importFile=function(c,f,l,t,z,C,F,N,K,J,da,ea){J=null!=J?J:!0;var ca=!1,W=null,ba=mxUtils.bind(this,function(ha){var la=null;null!=ha&&"<mxlibrary"==ha.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,ha,F)),this.showSidebar()):la=this.importXml(ha,l,t,J,null,null!=ea?mxEvent.isControlDown(ea):null);null!=N&&N(la)});"image"==f.substring(0,5)?(K=-!1,"image/png"==f.substring(0,9)&&(da=da?null:this.extractGraphModelFromPng(c),null!=da&&0<da.length&&(W=this.importXml(da,l,t,J,null,null!=ea?mxEvent.isControlDown(ea):null),K=!0)),K||(K=this.editor.graph,da=c.indexOf(";"),0<da&&(c=c.substring(0,da)+c.substring(c.indexOf(",",da+1))),J&&K.isGridEnabled()&&(l=K.snap(l),t=K.snap(t)),da="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(da+="editableCssRules=.*;"),-W=[K.insertVertex(null,null,"",l,t,z,C,da+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ca=!0,this.importGraphML(c,ba)):null!=K&&null!=F&&EditorUi.isVisioFilename(F)?(ca=!0,this.importVisio(K,ba)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,f=mxUtils.bind(this,function(ha){4==ha.readyState&&(200<=ha.status&&299>=ha.status?ba(ha.responseText):null!=N&&(N(null),this.showError(mxResources.get("error"),-413==ha.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,F):this.parseFile(K,f,F)):0==c.indexOf("PK")&&null!=K?(ca=!0,this.importZipFile(K,ba,mxUtils.bind(this,function(){W=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J);N(W)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(W=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J,null,null!=ea?mxEvent.isControlDown(ea):null));ca||null==N||N(W);return W};EditorUi.prototype.importFiles=-function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){t=null!=t?t:this.maxImageSize;J=null!=J?J:this.maxImageBytes;var W=null!=f&&null!=l,ba=!0;f=null!=f?f:0;l=null!=l?l:0;var ha=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var la=da||this.resampleThreshold,Y=0;Y<c.length;Y++)if("image/svg"!==c[Y].type.substring(0,9)&&"image/"===c[Y].type.substring(0,6)&&c[Y].size>la){ha=!0;break}var ma=mxUtils.bind(this,function(){var Z=this.editor.graph,k=Z.gridSize;z=null!=z?z:mxUtils.bind(this,function(X,aa,ja,pa,sa,qa,wa,Ba,za){try{if(null!=-X&&"<mxlibrary"==X.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,X,wa)),this.showSidebar(),null;this.isCompatibleString(X)&&1==c.length&&null!=ca&&"drop"==ca.type&&this.isBlankFile()&&!this.canUndo()&&(W=!1,pa=ja=0);return this.importFile(X,aa,ja,pa,sa,qa,wa,Ba,za,W,ea,ca)}catch(Ea){return this.handleError(Ea),null}});C=null!=C?C:mxUtils.bind(this,function(X){Z.setSelectionCells(X)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var A=c.length,-I=A,U=[],O=mxUtils.bind(this,function(X,aa){U[X]=aa;if(0==--I){this.spinner.stop();if(null!=N)N(U);else{var ja=[];Z.getModel().beginUpdate();try{for(X=0;X<U.length;X++){var pa=U[X]();null!=pa&&(ja=ja.concat(pa))}}finally{Z.getModel().endUpdate()}}C(ja)}}),S=0;S<A;S++)mxUtils.bind(this,function(X){var aa=c[X];if(null!=aa){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(pa){if(null==F||F(aa))try{if("image/"==aa.type.substring(0,6))if("image/svg"==aa.type.substring(0,9)){var sa=Graph.clipSvgDataUri(pa.target.result),-qa=sa.indexOf(","),wa=decodeURIComponent(escape(atob(sa.substring(qa+1)))),Ba=mxUtils.parseXml(wa),za=Ba.getElementsByTagName("svg");if(0<za.length){var Ea=za[0],ra=ea?null:Ea.getAttribute("content");null!=ra&&"<"!=ra.charAt(0)&&"%"!=ra.charAt(0)&&(ra=unescape(window.atob?atob(ra):Base64.decode(ra,!0)));null!=ra&&"%"==ra.charAt(0)&&(ra=decodeURIComponent(ra));null==ra||"<mxfile "!==ra.substring(0,8)&&"<mxGraphModel "!==ra.substring(0,14)?O(X,mxUtils.bind(this,function(){try{if(null!=Ba){var Ma=Ba.getElementsByTagName("svg");-if(0<Ma.length){var Ha=Ma[0],Aa=Ha.getAttribute("width"),Ra=Ha.getAttribute("height");Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;Ra=null!=Ra&&"%"!=Ra.charAt(Ra.length-1)?parseFloat(Ra):NaN;var Za=Ha.getAttribute("viewBox");if(null==Za||0==Za.length)Ha.setAttribute("viewBox","0 0 "+Aa+" "+Ra);else if(isNaN(Aa)||isNaN(Ra)){var La=Za.split(" ");3<La.length&&(Aa=parseFloat(La[2]),Ra=parseFloat(La[3]))}sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var $a=Math.min(1,Math.min(t/Math.max(1,-Aa)),t/Math.max(1,Ra)),Da=z(sa,aa.type,f+X*k,l+X*k,Math.max(1,Math.round(Aa*$a)),Math.max(1,Math.round(Ra*$a)),aa.name);if(null!=Da&&(isNaN(Aa)||isNaN(Ra))){var x=new Image;x.onload=mxUtils.bind(this,function(){Aa=Math.max(1,x.width);Ra=Math.max(1,x.height);Da[0].geometry.width=Aa;Da[0].geometry.height=Ra;Ha.setAttribute("viewBox","0 0 "+Aa+" "+Ra);sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var M=sa.indexOf(";");0<M&&(sa=sa.substring(0,M)+sa.substring(sa.indexOf(",",M+1)));Z.setCellStyles("image",-sa,[Da[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(Ha))}return Da}}}catch(M){}return null})):O(X,mxUtils.bind(this,function(){return z(ra,"text/xml",f+X*k,l+X*k,0,0,aa.name)}))}else O(X,mxUtils.bind(this,function(){return null}))}else{qa=!1;if("image/png"==aa.type){var ya=ea?null:this.extractGraphModelFromPng(pa.target.result);if(null!=ya&&0<ya.length){var Ca=new Image;Ca.src=pa.target.result;O(X,mxUtils.bind(this,function(){return z(ya,"text/xml",f+X*k,l+X*k,Ca.width,Ca.height,aa.name)}));-qa=!0}}qa||(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(pa.target.result,mxUtils.bind(this,function(Ma){this.resizeImage(Ma,pa.target.result,mxUtils.bind(this,function(Ha,Aa,Ra){O(X,mxUtils.bind(this,function(){if(null!=Ha&&Ha.length<J){var Za=ba&&this.isResampleImageSize(aa.size,-da)?Math.min(1,Math.min(t/Aa,t/Ra)):1;return z(Ha,aa.type,f+X*k,l+X*k,Math.round(Aa*Za),Math.round(Ra*Za),aa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),ba,t,da,aa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else sa=pa.target.result,z(sa,aa.type,f+X*k,l+X*k,240,160,aa.name,function(Ma){O(X,function(){return Ma})},aa)}catch(Ma){O(X,mxUtils.bind(this,function(){return null})),null!=window.console&&-console.error(Ma,aa)}else O(X,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(aa.name)?z(null,aa.type,f+X*k,l+X*k,240,160,aa.name,function(pa){O(X,function(){return pa})},aa):"image"==aa.type.substring(0,5)||"application/pdf"==aa.type?ja.readAsDataURL(aa):ja.readAsText(aa)}})(S)});if(ha){ha=[];for(Y=0;Y<c.length;Y++)ha.push(c[Y]);c=ha;this.confirmImageResize(function(Z){ba=Z;ma()},K)}else ma()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&-this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,f){f=null!=f?f:!1;var l=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},t=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,z=function(C,F){if(C||f)mxSettings.setResizeImages(C?F:null),mxSettings.save();l();c(F)};null==t||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(C){z(C,-!0)},function(C){z(C,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):z(!1,t)};EditorUi.prototype.parseFile=function(c,f,l){l=null!=l?l:c.name;var t=new FileReader;t.onload=mxUtils.bind(this,function(){this.parseFileData(t.result,f,l)});t.readAsText(c)};EditorUi.prototype.parseFileData=-function(c,f,l){var t=new XMLHttpRequest;t.open("POST",OPEN_URL);t.setRequestHeader("Content-Type","application/x-www-form-urlencoded");t.onreadystatechange=function(){f(t)};t.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(z){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>f};EditorUi.prototype.resizeImage=function(c,f,l,t,z,C,-F){z=null!=z?z:this.maxImageSize;var N=Math.max(1,c.width),K=Math.max(1,c.height),J=f;if(t&&this.isResampleImageSize(null!=F?F:f.length,C))try{var da=Math.max(N/z,K/z);if(1<da){var ea=Math.round(N/da),ca=Math.round(K/da),W=document.createElement("canvas");W.width=ea;W.height=ca;W.getContext("2d").drawImage(c,0,0,ea,ca);var ba=W.toDataURL();if(ba.length<f.length){var ha=document.createElement("canvas");ha.width=ea;ha.height=ca;var la=ha.toDataURL();ba!==la&&(f=ba,N=ea,K=ca)}}}catch(Y){}t&&J!=f&&z>-this.maxImageSize/2&&f.length>this.maxImageBytes?this.resizeImage(c,f,l,t,z/1.5,C,F):l(f,N,K)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,f,l){try{var t=new Image;t.onload=function(){t.width=0<t.width?t.width:120;t.height=0<t.height?t.height:120;f(t)};null!=l&&(t.onerror=l);t.src=c}catch(z){if(null!=l)l(z);else throw z;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=-(null!=urlParams.rough?urlParams.rough:c)};var u=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());u.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};-var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,f=this.editor.graph,l=f.isEnabled;f.isEnabled=function(){return l.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(k){var A=k.getEvent();return null==k.getState()&&!mxEvent.isMouseEvent(A)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(A)&&(null==k.getState()||mxEvent.isControlDown(A)||mxEvent.isShiftDown(A))});-f.cellEditor.editPlantUmlData=function(k,A,I){var U=JSON.parse(I);A=new TextareaDialog(c,mxResources.get("plantUml")+":",U.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(O,U.format,function(S,X,aa){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==U.format)f.labelChanged(k,"<pre>"+S+"</pre>"),f.updateCellSize(k,!0);else{f.setCellStyles("image",c.convertDataUri(S),[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=-X,ja.height=aa,f.cellsResized([k],[ja],!1))}f.setAttributeForCell(k,"plantUmlData",JSON.stringify({data:O,format:U.format}))}finally{f.getModel().endUpdate()}},function(S){c.handleError(S)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};f.cellEditor.editMermaidData=function(k,A,I){var U=JSON.parse(I);A=new TextareaDialog(c,mxResources.get("mermaid")+":",U.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(O,U.config,-function(S,X,aa){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",S,[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=Math.max(ja.width,X),ja.height=Math.max(ja.height,aa),f.cellsResized([k],[ja],!1));f.setAttributeForCell(k,"mermaidData",JSON.stringify({data:O,config:U.config},null,2))}finally{f.getModel().endUpdate()}},function(S){c.handleError(S)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};var t=f.cellEditor.startEditing;f.cellEditor.startEditing=-function(k,A){try{var I=this.graph.getAttributeForCell(k,"plantUmlData");if(null!=I)this.editPlantUmlData(k,A,I);else if(I=this.graph.getAttributeForCell(k,"mermaidData"),null!=I&&window.isMermaidEnabled)this.editMermaidData(k,A,I);else{var U=f.getCellStyle(k);"1"==mxUtils.getValue(U,"metaEdit","0")?c.showDataDialog(k):t.apply(this,arguments)}}catch(O){c.handleError(O)}};f.getLinkTitle=function(k){return c.getLinkTitle(k)};f.customLinkClicked=function(k,A){var I=!1;try{var U=this.getGraphBounds();-c.handleCustomLink(k,A);I=!0;c.chromelessResize&&!U.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(A))}catch(O){c.handleError(O)}return I};var z=f.parseBackgroundImage;f.parseBackgroundImage=function(k){var A=z.apply(this,arguments);null!=A&&null!=A.src&&Graph.isPageLink(A.src)&&(A={originalSrc:A.src});return A};var C=f.setBackgroundImage;f.setBackgroundImage=function(k){null!=k&&null!=k.originalSrc&&(k=c.createImageForPageLink(k.originalSrc,c.currentPage,this));C.apply(this,-arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(k,A){k=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=k){var I=k.indexOf(",");if(0<I)for(k=k.substring(I+1),A=A.getProperty("patches"),I=0;I<A.length;I++)if(null!=A[I][EditorUi.DIFF_UPDATE]&&null!=A[I][EditorUi.DIFF_UPDATE][k]||-null!=A[I][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(A[I][EditorUi.DIFF_REMOVE],k)){f.refreshBackgroundImage();break}}}));var F=f.getBackgroundImageObject;f.getBackgroundImageObject=function(k,A){var I=F.apply(this,arguments);null!=I&&null!=I.originalSrc&&(I=A?c.createImageForPageLink(I.originalSrc,null,null,!0):{src:I.originalSrc});return I};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");-if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var N=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(k){k=null!=k?k:"";"1"==urlParams.dev&&(k+=(0<k.length?"&":"?")+"dev=1");return N.apply(this,arguments)};var K=f.addClickHandler;f.addClickHandler=function(k,A,I){var U=A;A=function(O,S,X){if(null==S){var aa=mxEvent.getSource(O);"a"==aa.nodeName.toLowerCase()&&(S=aa.getAttribute("href"))}null!=-S&&f.isCustomLink(S)&&(mxEvent.isTouchEvent(O)||!mxEvent.isPopupTrigger(O))&&f.customLinkClicked(S,X)&&mxEvent.consume(O);null!=U&&U(O,S,X)};K.call(this,k,A,I)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var J=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,A,I){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["zoomIn","zoomOut","-"],null,I);J.apply(this,arguments);-f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(k,["-","addToScratchpad"],null,I);f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["-","exitGroup","home"],null,I)};var da=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(k,A,I){if(c.editor.graph.isSelectionEmpty())da.apply(this,arguments),c.menus.addMenuItems(k,["copyAsImage"],null,I);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(k,A,I):this.addPopupMenuArrangeItems(k,-A,I),this.addMenuItems(k,"- cut copy copyAsImage duplicate -".split(" "),null,I),this.isShowCellEditItems()||this.addPopupDeleteItem(k,A,I),this.addMenuItems(k,["lockUnlock","-"],null,I),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(A)&&f.isCellEditable(A)&&(this.addSubmenu("editCell",k,null,mxResources.get("edit")),k.addSeparator(),f.getModel().isEdge(A))){this.addSubmenu("line",k);var U=f.getModel().getGeometry(A);null!=U&&null!=U.points&&0<U.points.length&&this.addMenuItems(k,-["clearWaypoints"],null,I)}1==f.getSelectionCount()&&this.addMenuItems(k,["enterGroup"],null,I);U=c.getSelectionState();null!=U.mergeCell?this.addMenuItem(k,"mergeCells"):(1<U.style.colspan||1<U.style.rowspan)&&this.addMenuItem(k,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;-this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var ea=f.getExportVariables;f.getExportVariables=function(){var k=ea.apply(this,arguments),A=c.getCurrentFile();null!=A&&(k.filename=A.getTitle());k.pagecount=null!=c.pages?c.pages.length:1;k.page=null!=c.currentPage?c.currentPage.getName():"";k.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var ca=f.getGlobalVariable;f.getGlobalVariable=-function(k){var A=c.getCurrentFile();return"filename"==k&&null!=A?A.getTitle():"page"==k&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==k?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==k?null!=c.pages?c.pages.length:1:ca.apply(this,arguments)};var W=null,ba=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var k=this.getCurrentFile(),A=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;W!=A&&k==ba&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),-f.view.validate());W=A;ba=k}));var ha=f.labelLinkClicked;f.labelLinkClicked=function(k,A,I){var U=A.getAttribute("href");if(null==U||!f.isCustomLink(U)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))ha.apply(this,arguments);else{if(!f.isEnabled()||null!=k&&f.isCellLocked(k.cell))f.customLinkClicked(U),f.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=function(){var k=c.defaultFilename,A=c.getCurrentFile();null!=A&&(k=null!=A.getTitle()?A.getTitle():k);return k};-var la=this.actions.get("print");la.setEnabled(!mxClient.IS_IOS||!navigator.standalone);la.visible=la.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,-!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&f.addListener(mxEvent.ESCAPE,function(k,A){null!=A&&f.isEnabled()&&!f.isEditing()&&null!=-A.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(k){var A=f.cellEditor.text2,I=null;null!=A&&(mxEvent.addListener(A,"dragleave",function(U){null!=I&&(I.parentNode.removeChild(I),I=null);U.stopPropagation();-U.preventDefault()}),mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(U){null==I&&(!mxClient.IS_IE||10<document.documentMode)&&(I=this.highlightElement(A));U.stopPropagation();U.preventDefault()})),mxEvent.addListener(A,"drop",mxUtils.bind(this,function(U){null!=I&&(I.parentNode.removeChild(I),I=null);if(0<U.dataTransfer.files.length)this.importFiles(U.dataTransfer.files,0,0,this.maxImageSize,function(S,X,aa,ja,pa,sa){f.insertImage(S,pa,sa)},function(){},function(S){return"image/"==S.type.substring(0,-6)},function(S){for(var X=0;X<S.length;X++)S[X]()},mxEvent.isControlDown(U));else if(0<=mxUtils.indexOf(U.dataTransfer.types,"text/uri-list")){var O=U.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?this.loadImage(decodeURIComponent(O),mxUtils.bind(this,function(S){var X=Math.max(1,S.width);S=Math.max(1,S.height);var aa=this.maxImageSize;aa=Math.min(1,Math.min(aa/Math.max(1,X)),aa/Math.max(1,S));f.insertImage(decodeURIComponent(O),X*aa,S*aa)})):document.execCommand("insertHTML",-!1,U.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(U.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,U.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(U.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,U.dataTransfer.getData("text/plain"));U.stopPropagation();U.preventDefault()})))}));if(Editor.isSettingsEnabled()){la=this.editor.graph.view;var Y=mxSettings.getUnit();la.setUnit(Y);Editor.pageSizeUnit=Y==mxConstants.METERS?mxConstants.MILLIMETERS:-Y;la.addListener("unitChanged",function(k,A){k=A.getProperty("unit");mxSettings.setUnit(k);mxSettings.save();Editor.pageSizeUnit=k==mxConstants.METERS?mxConstants.MILLIMETERS:k});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,la.unit);this.refresh()}if("1"==urlParams.styledev){la=document.getElementById("geFooter");null!=la&&(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)})),la.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,-mxUtils.bind(this,function(k,A){0<this.editor.graph.getSelectionCount()?(k=this.editor.graph.getSelectionCell(),k=this.editor.graph.getModel().getStyle(k),this.styleInput.value=k||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var ma=this.isSelectionAllowed;this.isSelectionAllowed=function(k){return mxEvent.getSource(k)==this.styleInput?!0:ma.apply(this,arguments)}}la=document.getElementById("geInfo");null!=la&&la.parentNode.removeChild(la);if(Graph.fileSupport&&-(!this.editor.chromeless||this.editor.editable)){var Z=null;mxEvent.addListener(f.container,"dragleave",function(k){f.isEnabled()&&(null!=Z&&(Z.parentNode.removeChild(Z),Z=null),k.stopPropagation(),k.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(k){null==Z&&(!mxClient.IS_IE||10<document.documentMode)&&(Z=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();k.stopPropagation();k.preventDefault()}));mxEvent.addListener(f.container,-"drop",mxUtils.bind(this,function(k){null!=Z&&(Z.parentNode.removeChild(Z),Z=null);if(f.isEnabled()){var A=mxUtils.convertPoint(f.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),I=k.dataTransfer.files,U=f.view.translate,O=f.view.scale,S=A.x/O-U.x,X=A.y/O-U.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(k)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(k)&&(X=S=null),this.importFiles(I,S,X,this.maxImageSize,-null,null,null,null,mxEvent.isControlDown(k),null,null,mxEvent.isShiftDown(k),k));else{mxEvent.isAltDown(k)&&(X=S=0);var aa=0<=mxUtils.indexOf(k.dataTransfer.types,"text/uri-list")?k.dataTransfer.getData("text/uri-list"):null;A=this.extractGraphModelFromEvent(k,null!=this.pages);if(null!=A)f.setSelectionCells(this.importXml(A,S,X,!0));else if(0<=mxUtils.indexOf(k.dataTransfer.types,"text/html")){var ja=k.dataTransfer.getData("text/html");A=document.createElement("div");A.innerHTML=Graph.sanitizeHtml(ja);-var pa=null;I=A.getElementsByTagName("img");null!=I&&1==I.length?(ja=I[0].getAttribute("src"),null==ja&&(ja=I[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ja)||(pa=!0)):(I=A.getElementsByTagName("a"),null!=I&&1==I.length?ja=I[0].getAttribute("href"):(A=A.getElementsByTagName("pre"),null!=A&&1==A.length&&(ja=mxUtils.getTextContent(A[0]))));var sa=!0,qa=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(ja,S,X,!0,pa,null,sa,mxEvent.isControlDown(k)))});pa&&null!=-ja&&ja.length>this.resampleThreshold?this.confirmImageResize(function(wa){sa=wa;qa()},mxEvent.isControlDown(k)):qa()}else null!=aa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,function(wa){var Ba=Math.max(1,wa.width);wa=Math.max(1,wa.height);var za=this.maxImageSize;za=Math.min(1,Math.min(za/Math.max(1,Ba)),za/Math.max(1,wa));f.setSelectionCell(f.insertVertex(null,null,"",S,X,Ba*za,wa*za,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+-aa+";"))}),mxUtils.bind(this,function(wa){f.setSelectionCells(this.insertTextAt(aa,S,X,!0))})):0<=mxUtils.indexOf(k.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(k.dataTransfer.getData("text/plain"),S,X,!0))}}k.stopPropagation();k.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();-this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var k=parseInt(this.div.offsetLeft),A=parseInt(this.div.offsetWidth),I=c.embedViewport.x+c.embedViewport.width,U=parseInt(this.div.offsetTop),O=parseInt(this.div.offsetHeight),-S=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(k,I-A))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(U,S-O))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(la=Editor.currentTheme,"simple"==la||"sketch"==la)Editor.currentTheme="",this.doSetCurrentTheme(la,-mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}),!0);la=!1;null!=urlParams.dark?la=urlParams.dark:(la="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||la&&"auto"!=mxSettings.settings.darkMode||(la=mxSettings.settings.darkMode));"auto"==la&&-this.isAutoDarkModeSupported()&&(la=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof la?"1"==la:la);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(k){this.isAutoDarkMode()&&this.setDarkMode(k.matches)}))}catch(k){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&-null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(k,A){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts()};var B=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==-Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=f&&c<f?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<f&&c>=f&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}B.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=-this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(J){mxEvent.getSource(J)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var z=document.createElement("div");z.style.position="absolute";z.style.width="10px";z.style.height="10px";z.style.borderRadius=-"5px";z.style.border="1px solid gray";z.style.background="#ffffff";z.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(z);this.bottomResizer=z;var C=null,F=null,N=null,K=null;mxEvent.addGestureListeners(z,mxUtils.bind(this,function(J){K=parseInt(this.diagramContainer.style.height);F=mxEvent.getClientY(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));z=z.cloneNode(!1);z.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(z);this.rightResizer=z;mxEvent.addGestureListeners(z,-mxUtils.bind(this,function(J){N=parseInt(this.diagramContainer.style.width);C=mxEvent.getClientX(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(J){var da=!1;null!=C&&(this.diagramContainer.style.width=Math.max(20,N+mxEvent.getClientX(J)-C)+"px",da=!0);null!=F&&(this.diagramContainer.style.height=Math.max(20,K+mxEvent.getClientY(J)-F)+"px",da=!0);da&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",-fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(J){null==C&&null==F||mxEvent.consume(J);F=C=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";-this.addListener("editInlineStart",mxUtils.bind(this,function(J){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(J){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,-function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var l=f.clipboardData||f.originalEvent.clipboardData,t=!1,z=0;z<l.types.length;z++)if("text/"===l.types[z].substring(0,5)){t=!0;break}if(!t){var C=l.items;for(index in C){var F=C[index];if("file"===F.kind){if(c.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,-function(K,J,da,ea,ca,W){c.insertImage(K,ca,W)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var J=0;J<K.length;J++)K[J]()});else{var N=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],N.x,N.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(K){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML=" ";l.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,-l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily="monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize=-"none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=!0;l.innerHTML=" ";var t=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(C){var F=mxEvent.getSource(C);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||"true"==F.contentEditable||-224!=C.keyCode&&(mxClient.IS_MAC||17!=C.keyCode)&&(!mxClient.IS_MAC||91!=C.keyCode&&93!=C.keyCode)||t||(l.style.left=f.container.scrollLeft+10+"px",l.style.top=f.container.scrollTop+10+"px",C=f.container.scrollLeft,F=f.container.scrollTop,f.container.appendChild(l),t=!0,l.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=C,f.container.scrollTop=F)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(C){var F=C.keyCode;window.setTimeout(mxUtils.bind(this,function(){!t||-224!=F&&17!=F&&91!=F&&93!=F||(t=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(l),c()}catch(F){this.handleError(F)}}));mxEvent.addListener(l,"cut",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(l,!0),c()}catch(F){this.handleError(F)}}));-mxEvent.addListener(l,"paste",mxUtils.bind(this,function(C){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(l.innerHTML=" ",l.focus(),null!=C.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(C,l,!0,!0)),!mxEvent.isConsumed(C)){var F=f.container.scrollLeft,N=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=F,f.container.scrollTop=N,Graph.removePasteFormatting(l.firstChild),this.pasteCells(C,l,!1,!0)}catch(K){this.handleError(K)}}),-0)}}catch(K){this.handleError(K)}}),!0);var z=this.isSelectionAllowed;this.isSelectionAllowed=function(C){return mxEvent.getSource(C)==l?!0:z.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,f){mxSettings.setUi(c);(f=this.doSetCurrentTheme(c)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,f,l){function t(N){return"simple"==-N||"sketch"==N}var z=Editor.currentTheme,C="simple"==z&&this.isDefaultTheme(c)||this.isDefaultTheme(z)&&"simple"==c;if((C||l)&&!this.themeSwitching){var F=this.saveScrollState();this.editor.graph.stopEditing(!1);this.container.style.opacity=0;Editor.currentTheme=c;this.themeSwitching=!0;window.setTimeout(mxUtils.bind(this,function(){t(z)&&this.isDefaultTheme(c)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="",this.tabContainer.style.display="",this.hsplit.style.display=-"block",this.menubarHeight=App.prototype.menubarHeight):this.isDefaultTheme(z)&&t(c)&&(this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.menubarHeight=0,"simple"!=c?(this.tabContainer.style.display="none",this.hsplit.style.display="none",this.hsplitPosition=0):this.tabContainer.style.display="");this.switchTheme(c);this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();-this.restoreScrollState(F);this.container.style.opacity="";delete this.themeSwitching;isLocalStorage&&t(c)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:!0);null!=f&&f()}),0)}return C};EditorUi.prototype.saveScrollState=function(){var c=this.editor.graph.view.translate,f=this.diagramContainer.scrollLeft,l=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(f-=this.embedViewport.x,l-=this.embedViewport.y):(f+=this.embedViewport.x,-l+=this.embedViewport.y));return{x:f,y:l,tx:c.x,ty:c.y}};EditorUi.prototype.restoreScrollState=function(c){var f=this.editor.graph.view.scale,l=this.editor.graph.view.translate;this.diagramContainer.scrollLeft=c.x+(l.x-c.tx)*f;this.diagramContainer.scrollTop=c.y+(l.y-c.ty)*f};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&-(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var t=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=t&&null!=t.getAttribute("class");if(!f&&null!=t){t=t.getAttribute("title");var z=-this.getCurrentFile();z=null!=z?z.savingStatusKey:DrawioFile.prototype.savingStatusKey;t==mxResources.get(z)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(z))+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";t=32>=c.clientWidth;c.style.visibility=t&&""==this.editor.getStatus()?"hidden":"";if(t||f)this.statusContainer.style.display="inline-flex",f=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display=-"inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(c){this.isDefaultTheme(c)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&-this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createWrapperForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);-this.createMenubarForTheme(c);this.sidebarContainer.style.display="";if("sketch"==c){this.createFormatWindow();this.formatContainer.style.left="0px";this.formatContainer.style.top="0px";this.formatContainer.style.width="";this.formatContainer.style.zIndex="";this.formatContainer.style.border="none";var f=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);this.createShapesWindow();this.sidebarContainer.className="";this.sidebarContainer.style.position="absolute";this.sidebarContainer.style.left=-"0px";this.sidebarContainer.style.top="0px";this.sidebarContainer.style.bottom=f?"32px":"0px";this.sidebarContainer.style.width="100%"}null!=this.format&&(c=this.isDefaultTheme(c)||"atlas"==c,this.format.showCloseButton!=c&&(this.format.showCloseButton=c,this.format.refresh()))};EditorUi.prototype.getWindows=function(){var c=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(c=c.concat([this.menus.tagsWindow,-this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.fit()};EditorUi.prototype.hideWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),-this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=-null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(c){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=-Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);if("simple"==c||"sketch"==c){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||null==Editor.config.defaultEdgeLength)f.defaultEdgeLength=120;null==urlParams.grid&&(f.defaultGridEnabled=!1);null==urlParams.pv&&(f.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.switchCssForTheme=function(c){};EditorUi.prototype.createWrapperForTheme=function(c){null!=-this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=function(c){};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.createFooterMenuForTheme=function(c){};EditorUi.prototype.createPickerMenuForTheme=-function(c){};EditorUi.prototype.getNetworkStatus=function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var f=this.getCurrentFile();null!=f&&(f.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==f.sync||f.sync.enabled&&f.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==f.sync||f.sync.isConnected()?f.isRealtimeEnabled()&&f.isRealtimeSupported()&&1<f.getRealtimeState()&&(c=f.getRealtimeError(),c=mxResources.get("realtimeCollaboration")+-": "+(null!=c&&null!=c.message?c.message:mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity=-"",this.menubar.container.appendChild(this.statusContainer));null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);c=this.menubar.langIcon;null!=c&&(c.style.position="absolute",c.style.height="18px",c.style.width="18px",c.style.flexShrink="",c.style.opacity="",this.menubarContainer.parentNode.insertBefore(c,this.menubarContainer));null!=this.buttonContainer&&(this.buttonContainer.style.display="",this.buttonContainer.style.padding="",this.menubar.container.appendChild(this.buttonContainer))};-EditorUi.prototype.createMenu=function(c,f,l,t){l=null!=l?l:"geToolbarButton";var z=this.menus.get(c);t=this.menubar.addMenu(mxResources.get(c),z.funct,null,t);t.className=l;t.style.display="inline-block";t.style.cursor="pointer";t.style.height="24px";t.setAttribute("title",mxResources.get(c));this.menus.menuCreated(z,t,l);null!=f&&(t.style.backgroundImage="url("+f+")",t.style.backgroundPosition="center center",t.style.backgroundRepeat="no-repeat",t.style.backgroundSize="100% 100%",t.style.width=-"24px",t.innerText="");return t};EditorUi.prototype.createToolbarButton=function(c,f,l,t){t=null!=t?t:24;var z=document.createElement("a");z.className="geToolbarButton geAdaptiveAsset";z.setAttribute("title",f);z.style.backgroundImage="url("+c+")";z.style.backgroundPosition="center center";z.style.backgroundRepeat="no-repeat";z.style.backgroundSize="100% 100%";z.style.display="inline-block";z.style.cursor="pointer";z.style.marginLeft="6px";z.style.width=t+"px";z.style.height=t+"px";z.style.flexShrink=-"0";z.style.flexGrow="0";null!=l&&(mxEvent.addListener(z,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()})),mxEvent.addListener(z,"click",function(C){"disabled"!=z.getAttribute("disabled")&&l(C);mxEvent.consume(C)}));return z};EditorUi.prototype.createMenuItem=function(c,f,l){var t=this.actions.get(c),z=null!=t?t.funct:null,C=this.createToolbarButton(f,mxResources.get(c)+(null!=t&&null!=t.shortcut?" ("+t.shortcut+")":""),z);null==t||l||(c=function(){t.isEnabled()?-(C.removeAttribute("disabled"),C.style.cursor="pointer"):(C.setAttribute("disabled","disabled"),C.style.cursor="default");C.style.opacity=t.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",c),t.addListener("stateChanged",c),c());return C};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight--10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,60,240,f,mxUtils.bind(this,function(z){z.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var l=this.formatWindow.window.toggleMinimized,t=240;this.formatWindow.window.toggleMinimized=function(){l.apply(this,arguments);this.minimized?(t=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",-this.div.style.left=parseInt(this.div.style.left)+t-140+"px"):(this.div.style.width=t+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-t+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(z){mxEvent.getSource(z)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?-(c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,(1200>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||708>c)&&this.formatWindow.window.toggleMinimized()):this.formatWindow.window.setVisible(!1)}};var H=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var f=this.formatWindow;null!=f?f.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):H.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=-function(c){if(this.isShapesPanelVisible()!=c){var f=EditorUi.prototype.hsplitPosition;0==f&&(f=this.defaultSidebarWidth);var l=this.hsplitPosition,t=mxUtils.bind(this,function(){this.hsplitPosition=z;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),z=c?f:0;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==z?"translateX(0)":"translateX(-100%)");0!=z&&t();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",-0==z?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform 0.3s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==z&&t()}),-300)}),10)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var T=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():T.apply(this,arguments)};var G=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){c=null!=c?c:!0;if("1"!=urlParams.embedInline){var f=this.container.clientWidth;this.container==-document.body&&(f=document.body.clientWidth||document.documentElement.clientWidth);var l=this.getDiagramContainerOffset();var t=l.x;var z=l.y;"simple"==Editor.currentTheme&&(z+=this.sketchMainMenuElt.offsetHeight);this.diagramContainer.style.top=z+"px";this.diagramContainer.style.bottom="0";"simple"==Editor.currentTheme?(this.hsplit.style.top=this.sketchMainMenuElt.offsetHeight+"px",this.sidebarContainer.style.top=this.hsplit.style.top,this.formatContainer.style.top=this.hsplit.style.top,f=Math.max(0,-Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.formatWidth,Math.min(this.hsplitPosition,f-this.splitSize-40))),this.sidebarContainer.style.width=f+"px",this.diagramContainer.style.left=f+t+"px",this.tabContainer.style.left=f+"px",this.tabContainer.style.right=this.formatWidth+1+"px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",this.hsplit.style.left=f+"px",this.diagramContainer.style.right=this.formatWidth+"px",-this.formatContainer.style.width=this.formatWidth+"px",this.hsplit.style.bottom=this.tabContainer.offsetHeight+"px",this.diagramContainer.style.bottom=this.hsplit.style.bottom,this.checkTabScrollerOverflow()):(this.diagramContainer.style.left=l.x+"px",this.diagramContainer.style.right="0")}c&&this.editor.graph.sizeDidChange()}else G.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var f=mxUtils.bind(this,function(t){t=this.createMenu(t,null,"geTitle");t.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";-c.appendChild(t);return t});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))f=document.createElement("div"),f.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;",f.className="geTitle",mxUtils.write(f,mxResources.get("newLibrary")),c.appendChild(f),mxEvent.addListener(f,-"click",this.actions.get("newLibrary").funct),f=f.cloneNode(!1),f.style.left="50%",f.style.borderLeftStyle="solid",mxUtils.write(f,mxResources.get("openLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("openLibrary").funct);else{var l=f("newLibrary");l.style.fontSize="11px";l.style.left="0";l=f("openLibraryFrom");l.style.borderLeftStyle="solid";l.style.fontSize="11px";l.style.left="50%"}c.appendChild(this.sidebarContainer);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=-function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),l="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),l&&"1"!=urlParams.embedInline?66:10,l&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,c-6,f-6,mxUtils.bind(this,function(t){this.createShapesPanel(t)}));-this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(c){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());-this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setAndPersistDarkMode=function(c){var f=c;"auto"==c&&(f=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(f);mxSettings.settings.darkMode=c;mxSettings.save();c=mxSettings.getUi();null==urlParams.ui&&"dark"==c&&this.setCurrentTheme("kennedy",!0)};EditorUi.prototype.setAndPersistLanguage=function(c){mxSettings.setLanguage(c);mxSettings.save();mxClient.language=c;mxResources.loadDefaultBundle=-!1;mxResources.add(RESOURCE_BASE)};EditorUi.prototype.setAndPersistHighContrast=function(c){this.setHighContrast(c);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=c,mxSettings.save())};EditorUi.prototype.isHighContrast=function(){var c=document.getElementById("high-contrast-stylesheet");return null!=c&&window.matchMedia?(c=c.getAttribute("media"),"all"==c||"not all"!=c&&window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(c){var f=document.getElementById("high-contrast-stylesheet");-if(null!=f&&window.matchMedia){var l=window.matchMedia("(forced-colors: active)").matches,t=f.getAttribute("media");(t="all"==t||"not all"!=t&&l)&&!c?f.setAttribute("media",l?"not all":"(forced-colors: active)"):!t&&c&&f.setAttribute("media",l?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(c){var f=this.getDiagramContainerOffset();mxSettings.setRulerOn(c);mxSettings.save();c||null==this.ruler?c&&-null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.refresh();this.fireEvent(new mxEventObject("rulerVisibleChanged"));c=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=c.x-f.x;this.diagramContainer.scrollTop+=c.x-f.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=window.matchMedia};EditorUi.prototype.isAutoDarkMode=function(c){return!c&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&-"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=function(c){Editor.darkMode=c;c=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container;mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff";null!=c&&(Editor.isDarkMode()?(c.classList.add("geDarkMode"),c.style.colorScheme="dark"):(c.classList.remove("geDarkMode"),c.style.colorScheme="light"));null!=this.ruler&&this.ruler.updateStyle();this.fireEvent(new mxEventObject("darkModeChanged"))};-EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,f){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,this.sidebar.refresh(),Editor.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=-function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",l.style.left=-"10px",l.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width=-"",this.diagramContainer.style.height="");else{var z=this.diagramContainer.getAttribute("data-bounds");if(null!=z){this.diagramContainer.removeAttribute("data-bounds");t.getGraphBounds();var C=z.split(" ");t=mxUtils.getDocumentSize();this.diagramContainer.style.top=C[0];this.diagramContainer.style.left=C[1];z=parseInt(C[2]);C=parseInt(C[3]);z=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,z):z,t.width-80);C=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,C):C,t.height--80);this.diagramContainer.style.width=z+"px";this.diagramContainer.style.height=C+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}f.style.left=this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=-this.diagramContainer.offsetTop+"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=f.style.top;c.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+-this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;f.style.visibility="";c.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(c){Editor.sketchMode!=c&&(Editor.sketchMode=c,this.updateDefaultStyles())};-EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);c.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.vertexFontSize=16,c.edgeFontSize=c.vertexFontSize-4):"sketch"==Editor.currentTheme?(c.vertexFontSize=20,c.edgeFontSize=c.vertexFontSize--4):(c.vertexFontSize=Graph.prototype.vertexFontSize,c.edgeFontSize=Graph.prototype.edgeFontSize),c.defaultEdgeStyle.fontSize=c.edgeFontSize;if(null==Editor.config||null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.endSize="8",c.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved=-"1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize="auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize="14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==Editor.config||null==Editor.config.defaultFonts){if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=-urlParams.embedInline||Editor.sketchMode)c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(c.defaultVertexStyle.sketch="1",c.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultVertexStyle.hachureGap="4",c.defaultEdgeStyle.sketch="1",-c.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var f=Graph.prototype.getLinkTitle.apply(this,-arguments);if(Graph.isPageLink(c)){var l=c.indexOf(",");0<l&&(f=this.getPageById(c.substring(l+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(f=this.getCustomLinkTitle(c));return f};EditorUi.prototype.getCustomLinkTitle=function(c){var f=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var l=JSON.parse(c.substring(17));null!=l&&null!=l.title&&(f=l.title)}catch(t){}return f};EditorUi.prototype.handleCustomLink=function(c,f){if(Graph.isPageLink(c))if(f=-c.indexOf(","),c=this.getPageById(c.substring(f+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(c,f)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var c=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(f){f.key==mxSettings.key&&-(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(f,l){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));-this.addListener("copyConnectChanged",mxUtils.bind(this,function(f,l){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(f,l){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=mxSettings.getGridColor(!1);c.view.gridColor="light-dark("+-c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(f,l){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(f,l){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||-this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(f,l){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",-mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,f,l){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,-function(t,z){try{this.spinner.stop();var C=this.createImageDataUri(t,f,"png"),F=parseInt(z.getAttribute("width")),N=parseInt(z.getAttribute("height"));this.writeImageToClipboard(C,F,N,mxUtils.bind(this,function(K){this.handleError(K)}))}catch(K){this.handleError(K)}}),null,null,null,mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)}),null,null,null!=l?l:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?-c:null)}catch(t){this.handleError(t)}};EditorUi.prototype.copyCells=function(c,f){var l=this.editor.graph;if(l.isSelectionEmpty())c.innerText="";else{var t=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),z=mxUtils.getXml(l.encodeCells(t));mxUtils.setTextContent(c,encodeURIComponent(z));f?(l.removeCells(t,!1),l.lastPasteXml=null):(l.lastPasteXml=z,l.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var f=-this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(c)),navigator.clipboard.writeText(f))}return c};EditorUi.prototype.pasteXml=function(c,f,l,t,z){z=null!=z?z:!0;var C=this.editor.graph,F=null;C.lastPasteXml==c?C.pasteCounter++:(C.lastPasteXml=c,C.pasteCounter=0);var N=C.pasteCounter*C.gridSize;if(l||this.isCompatibleString(c))F=this.importXml(c,N,N),C.setSelectionCells(F);else if(f&&1==-C.getSelectionCount()){z=C.getStartEditingCell(C.getSelectionCell(),t);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==C.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE])C.setCellStyles(mxConstants.STYLE_IMAGE,c,[z]);else{C.model.beginUpdate();try{C.labelChanged(z,c),Graph.isLink(c)&&C.setLinkForCell(z,c)}finally{C.model.endUpdate()}}C.setSelectionCell(z)}else F=C.getInsertPoint(),C.isMouseInsertPoint()&&(N=0,C.lastPasteXml==c&&0<C.pasteCounter&&C.pasteCounter--),F=this.insertTextAt(c,F.x+N,-F.y+N,z),C.setSelectionCells(F);C.isSelectionEmpty()||(C.scrollCellToVisible(C.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(C.view.getState(C.getSelectionCell())));return F};EditorUi.prototype.pasteCells=function(c,f,l,t){if(!mxEvent.isConsumed(c)){var z=f,C=!1;if(l&&null!=c.clipboardData&&c.clipboardData.getData){var F=c.clipboardData.getData("text/plain"),N=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var K=decodeURIComponent(F);this.isCompatibleString(K)&&-(N=!0,F=K)}catch(ba){}N=N?null:c.clipboardData.getData("text/html");null!=N&&0<N.length?(z=this.parseHtmlData(N),C="text/plain"!=z.getAttribute("data-type")):null!=F&&0<F.length&&(z=document.createElement("div"),mxUtils.setTextContent(z,N))}F=z.getElementsByTagName("span");if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))l=F[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(ba){var ha=-this.editor.graph;ha.lastPasteXml==ba?ha.pasteCounter++:(ha.lastPasteXml=ba,ha.pasteCounter=0);var la=ha.pasteCounter*ha.gridSize;ha.setSelectionCells(this.importXml(ba,la,la));ha.scrollCellToVisible(ha.getSelectionCell())}),mxUtils.bind(this,function(ba){this.handleError(ba)})),mxEvent.consume(c));else{var J=!1,da="";da=C?null!=z.textContent&&"<mxfile"==z.textContent.substring(0,7)&&"</mxfile>"==z.textContent.substring(z.textContent.length-9)||"<mxGraphModel"==z.textContent.substring(0,13)&&"</mxGraphModel>"==-z.textContent.substring(z.textContent.length-15)?z.textContent.replace(/\u00a0/g," "):z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText);try{var ea=da.lastIndexOf("%3E");0<=ea&&ea<da.length-3&&(da=da.substring(0,ea+3))}catch(ba){}try{F=z.getElementsByTagName("span"),(K=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(da))&&(this.isCompatibleString(K)||0==K.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(J=!0,da=-K)}catch(ba){}try{if(null!=da&&0<da.length){if(0==da.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ca=mxUtils.bind(this,function(){try{da=(new MiroImporter).importMiroJson(JSON.parse(da)),this.pasteXml(da,t,J,c)}catch(ba){console.log("Miro import error:",ba)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ca):ca()}else this.pasteXml(da,t,J,c,C);try{mxEvent.consume(c)}catch(ba){}}else if(!l){var W=this.editor.graph;W.lastPasteXml=null;W.pasteCounter=-0}}catch(ba){this.handleError(ba)}}}f.innerHTML=" "};EditorUi.prototype.showPrintDialog=function(c,f){var l=320;this.editor.graph.isEnabled()&&(l+=40);null!=this.pages&&1<this.pages.length&&(l+=40,this.editor.graph.isEnabled()||(l+=10));null==f||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(l+=20);this.showDialog((new PrintDialog(this,c,f)).container,320,l,!0,!0)};EditorUi.prototype.print=function(c,f){var l=this.editor,t=l.graph,z=this.getPageIndex(this.currentPage),C=null!=z?z+-1:1,F=mxUtils.bind(this,function(la,Y,ma,Z){var k=la.useCssTransforms,A=la.currentTranslate,I=la.currentScale,U=la.view.translate,O=la.view.scale;la.useCssTransforms&&(la.useCssTransforms=!1,la.currentTranslate=new mxPoint(0,0),la.currentScale=1,la.view.translate=new mxPoint(0,0),la.view.scale=1);var S=la.getGraphBounds(),X=0,aa=0,ja=mxRectangle.fromRectangle(la.pageFormat),pa=f.fit||f.crop||!la.pageVisible,sa=f.scale;ja.width=Math.ceil(ja.width*la.pageScale);ja.height=Math.ceil(ja.height*la.pageScale);-var qa=1;if(f.fit){qa=f.sheetsAcross;var wa=f.sheetsDown;isNaN(sa)||(ja.width=Math.ceil(ja.width*sa),ja.height=Math.ceil(ja.height*sa));qa=Math.min(ja.height*wa/(S.height/la.view.scale),ja.width*qa/(S.width/la.view.scale))}else qa=isNaN(sa)?1:sa;qa*=1;!pa&&la.pageVisible?(sa=la.getPageLayout(),X-=sa.x*ja.width,aa-=sa.y*ja.height):pa=!0;f.crop&&(f.selection&&(S=t.getBoundingBox(t.getSelectionCells())),ja.width=(S.width+1)*qa/la.view.scale,ja.height=(S.height+1)*qa/la.view.scale);ja.width=Math.ceil(1*-ja.width);ja.height=Math.ceil(1*ja.height);Z=null!=Z?"page/id,"+Z:null;if(null==Y){Y=PrintDialog.createPrintPreview(la,qa,null,0,X,aa,pa);Y.title=this.getBaseFilename(!0);Y.pageSelector=!1;Y.mathEnabled=!1;X=f.border;isNaN(X)||(Y.pageMargin=X);f.selection&&(Y.isCellVisible=function(ra){return la.isCellSelected(ra)});var Ba=Y.writeHead;Y.writeHead=function(ra){Ba.apply(this,arguments);mxClient.IS_GC&&(ra.writeln('<style type="text/css">'),ra.writeln("@media print {"),ra.writeln(".MathJax svg { shape-rendering: crispEdges; }"),-ra.writeln("}"),ra.writeln("</style>"));null!=l.fontCss&&(ra.writeln('<style type="text/css">'),ra.writeln(mxUtils.htmlEntities(l.fontCss,!1,!1,!1)),ra.writeln("</style>"));for(var ya=la.getCustomFonts(),Ca=0;Ca<ya.length;Ca++){var Ma=ya[Ca].name,Ha=ya[Ca].url;Graph.isCssFontUrl(Ha)?ra.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Ha))+'" charset="UTF-8" type="text/css">'):(ra.writeln('<style type="text/css">'),ra.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Ma)+-'";\nsrc: url("'+mxUtils.htmlEntities(Ha)+'");\n}'),ra.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var za=Y.drawBackgroundImage;Y.drawBackgroundImage=function(ra){za.apply(this,arguments);null!=ra.node&&(EditorUi.embedSvgImages(ra.node),t.disableSvgLinks(ra.node,function(ya){ya.setAttribute("href","javascript:void(0)")}))}}var Ea=Y.addGraphFragment;Y.addGraphFragment=function(ra,ya,Ca,Ma,Ha,Aa){Ea.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:Ha.classList.add("geDisableMathJax")};-f.grid&&(Y.gridSize=la.gridSize,Y.gridSteps=la.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:la.view.gridColor);Y.open(null,null,ma,!0,Z,ja,f.selection?la.getSelectionCells():null)}else{S=la.background;if(null==S||""==S||S==mxConstants.NONE)S="#ffffff";Y.backgroundColor=S;Y.autoOrigin=pa;f.grid&&(Y.gridSize=la.gridSize,Y.gridSteps=la.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:la.view.gridColor);Y.appendGraph(la,qa,-X,aa,ma,!0,Z,ja,f.selection?la.getSelectionCells():null);ma=la.getCustomFonts();if(null!=Y.wnd)for(ja=0;ja<ma.length;ja++)X=ma[ja].name,aa=ma[ja].url,Graph.isCssFontUrl(aa)?Y.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(aa)+'" charset="UTF-8" type="text/css">'):(Y.wnd.document.writeln('<style type="text/css">'),Y.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(X)+'";\nsrc: url("'+mxUtils.htmlEntities(aa)+'");\n}'),Y.wnd.document.writeln("</style>"))}k&&-(la.useCssTransforms=k,la.currentTranslate=A,la.currentScale=I,la.view.translate=U,la.view.scale=O);return Y}),N=f.pagesFrom,K=f.pagesTo,J=!f.allPages;z=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);else{J&&(J=f.selection||N==C&&K==C);if(!J&&null!=this.pages&&this.pages.length){J=0;C=this.pages.length-1;f.allPages||(J=parseInt(N)-1,C=parseInt(K)-1);for(var da=J;da<=C;da++){var ea=this.pages[da];N=ea==this.currentPage?t:null;if(null==N){N=this.createTemporaryGraph(t.stylesheet);-N.shapeForegroundColor=t.shapeForegroundColor;N.shapeBackgroundColor=t.shapeBackgroundColor;K=!0;J=!1;var ca=null,W=null;null==ea.viewState&&null==ea.root&&this.updatePageRoot(ea);null!=ea.viewState&&(K=ea.viewState.pageVisible,J=ea.viewState.mathEnabled,ca=ea.viewState.background,W=ea.viewState.backgroundImage,N.pageFormat=ea.viewState.pageFormat,N.gridSize=ea.viewState.gridSize);null!=W&&null!=W.originalSrc&&(W=this.createImageForPageLink(W.originalSrc,ea));N.background=ca;N.backgroundImage=null!=-W?new mxImage(W.src,W.width,W.height,W.x,W.y):null;N.pageVisible=K;N.mathEnabled=J;var ba=N.getGraphBounds;N.getGraphBounds=function(){var la=ba.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var ma=this.view.translate,Z=this.view.scale;la=mxRectangle.fromRectangle(la);la.add(new mxRectangle((ma.x+Y.x)*Z,(ma.y+Y.y)*Z,Y.width*Z,Y.height*Z))}return la};var ha=N.getGlobalVariable;N.getGlobalVariable=function(la){return"page"==la?ea.getName():"pagenumber"==la?-da+1:"pagecount"==la?null!=this.pages?this.pages.length:1:ha.apply(this,arguments)};document.body.appendChild(N.container);this.updatePageRoot(ea);N.model.setRoot(ea.root)}z=F(N,z,da!=C,ea.getId());N!=t&&N.container.parentNode.removeChild(N.container)}}else z=F(t);null==z||null==z.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(z.mathEnabled&&(F=z.wnd.document,c||(z.wnd.IMMEDIATE_PRINT=!0),F.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),z.closeDocument(),-Graph.rewritePageLinks(z.wnd.document,!0),z.mathEnabled||c||PrintDialog.printPreview(z));return z}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,l=0;l<c.length;l++)mxEvent.addListener(c[l],"dragleave",function(t){null!=f&&(f.parentNode.removeChild(f),f=null);t.stopPropagation();t.preventDefault()}),mxEvent.addListener(c[l],"dragover",mxUtils.bind(this,function(t){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&-12>document.documentMode)&&(f=this.highlightElement());t.stopPropagation();t.preventDefault()})),mxEvent.addListener(c[l],"drop",mxUtils.bind(this,function(t){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<t.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(t.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(t)&&!mxEvent.isShiftDown(t)):this.openFiles(t.dataTransfer.files,!0);-else{var z=this.extractGraphModelFromEvent(t);if(null==z){var C=null!=t.dataTransfer?t.dataTransfer:t.clipboardData;null!=C&&(10==document.documentMode||11==document.documentMode?z=C.getData("Text"):(z=null,z=0<=mxUtils.indexOf(C.types,"text/uri-list")?t.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(C.types,"text/html")?C.getData("text/html"):null,null!=z&&0<z.length?(C=document.createElement("div"),C.innerHTML=Graph.sanitizeHtml(z),C=C.getElementsByTagName("img"),0<C.length&&(z=C[0].getAttribute("src"))):-0<=mxUtils.indexOf(C.types,"text/plain")&&(z=C.getData("text/plain"))),null!=z&&(Editor.isPngDataUrl(z)?(z=Editor.extractGraphModelFromPng(z),null!=z&&0<z.length&&this.openLocalFile(z,null,!0)):this.isRemoteFileFormat(z)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(z))).send(mxUtils.bind(this,function(F){200<=F.getStatus()&&299>=F.getStatus()?this.openLocalFile(F.getText(),null,!0):this.showError(mxResources.get("error"),-413==F.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(z)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(z):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(z)))))}else this.openLocalFile(z,null,!0)}t.stopPropagation();t.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var f=0,l=0;if(null==c){var t=document.body;-var z=document.documentElement;var C=(t.clientWidth||z.clientWidth)-3;t=Math.max(t.clientHeight||0,z.clientHeight)-3}else f=c.offsetTop,l=c.offsetLeft,C=c.clientWidth,t=c.clientHeight;z=document.createElement("div");z.style.zIndex=mxPopupMenu.prototype.zIndex+2;z.style.border="3px dotted rgb(254, 137, 12)";z.style.pointerEvents="none";z.style.position="absolute";z.style.top=f+"px";z.style.left=l+"px";z.style.width=Math.max(0,C-3)+"px";z.style.height=Math.max(0,t-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?-this.editor.graph.container.appendChild(z):document.body.appendChild(z);return z};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var f=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=f){var l=new mxCodec(f.ownerDocument),t=new mxGraphModel;l.decode(f,t);f=t.getChildAt(t.getRoot(),0);for(l=0;l<t.getChildCount(f);l++)c.push(t.getChildAt(f,l))}return c};EditorUi.prototype.openFileHandle=function(c,f,l,t,z,C){if(null!=f&&0<f.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(f)||-/(\.pdf)$/i.test(f))f=f.substring(0,f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var F=mxUtils.bind(this,function(K){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==K.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,K,f)),this.showSidebar()}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(K,-f,t)});if(EditorUi.isVisioFilename(f))this.importVisio(l,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(K){4==K.readyState&&(this.spinner.stop(),-200<=K.status&&299>=K.status?F(K.responseText):this.handleError({message:mxResources.get(413==K.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(K){this.spinner.stop();this.openLocalFile(K,f,t)}),mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();-null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,c,l.name)),this.showSidebar()}catch(K){this.handleError(K,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,f,t)}));else{if("image/png"==l.type.substring(0,9))c=this.extractGraphModelFromPng(c);-else if("application/pdf"==l.type){var N=Editor.extractGraphModelFromPdf(c);null!=N&&(z=null,t=!0,c=N)}this.spinner.stop();this.openLocalFile(c,f,t,z,null!=z?l:null,C)}}};EditorUi.prototype.openFiles=function(c,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=0;l<c.length;l++)mxUtils.bind(this,function(t){var z=new FileReader;z.onload=mxUtils.bind(this,function(C){try{this.openFileHandle(C.target.result,t.name,t,f)}catch(F){this.handleError(F)}});z.onerror=mxUtils.bind(this,-function(C){this.spinner.stop();this.handleError(C);window.openFile=null});"image"!==t.type.substring(0,5)&&"application/pdf"!==t.type||"image/svg"===t.type.substring(0,9)?z.readAsText(t):z.readAsDataURL(t)})(c[l])};EditorUi.prototype.openLocalFile=function(c,f,l,t,z,C){var F=this.getCurrentFile(),N=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var K=mxUtils.parseXml(c);null!=K&&(this.editor.setGraphXml(K.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,-c,f||this.defaultFilename,l,t,z,C))});if(null!=c&&0<c.length)null==F||!F.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)?N():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)&&null!=F&&F.isModified()?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,f),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=-F&&F.isModified()?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):N()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);f=[];for(var l in c)f.push(l);return f};EditorUi.prototype.addBasenamesForCell=-function(c,f){function l(F){if(null!=F){var N=F.lastIndexOf(".");0<N&&(F=F.substring(N+1,F.length));null==f[F]&&(f[F]=!0)}}var t=this.editor.graph,z=t.getCellStyle(c);l(mxStencilRegistry.getBasenameForStencil(z[mxConstants.STYLE_SHAPE]));t.model.isEdge(c)&&(l(mxMarker.getPackageForType(z[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(z[mxConstants.STYLE_ENDARROW])));z=t.model.getChildCount(c);for(var C=0;C<z;C++)this.addBasenamesForCell(t.model.getChildAt(c,C),f)};EditorUi.prototype.setGraphEnabled=-function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=c&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme?"":"none";this.editor.graph.setEnabled(c);null!=this.tabContainer&&(this.tabContainer.style.visibility=c&&0<parseInt(this.tabContainer.style.height)?"":"hidden");null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=c?"":"hidden",this.ruler.vRuler.container.style.visibility=-c?"":"hidden");c||this.hideWindows()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(f,l,t,z){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;-this.setFileData(f);if(z)try{var C=this.editor.graph;C.setGridEnabled(!1);C.pageVisible=!1;var F=C.model.cells,N;for(N in F){var K=F[N];null!=K&&null!=K.style&&(K.style+=";sketch=1;"+(-1==K.style.indexOf("fontFamily=")||-1<K.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(J){console.log(J)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();-this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=t?t:!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(c,-f){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();f(l)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;-f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var l=window.opener||window.parent;if(this.editor.modified){var t=f.background;if(null==t||t==mxConstants.NONE)t=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(z){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(z)}),"*")}),null,null,!0,t,1,this.embedExportBorder,null,this.embedExportTheme)}else c||-l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(z){c||this.handleError(z)}};EditorUi.prototype.installMessageHandler=function(c){var f=null,l=!1,t=!1,z=null,C=mxUtils.bind(this,function(K,J){this.editor.modified&&-"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,C);mxEvent.addListener(window,"message",mxUtils.bind(this,function(K){if(K.source==(window.opener||window.parent)){var J=K.data,da=null,ea=mxUtils.bind(this,function(ra){if(null!=ra&&"function"===typeof ra.charAt&&"<"!=ra.charAt(0))try{Editor.isPngDataUrl(ra)?ra=Editor.extractGraphModelFromPng(ra):-"data:image/svg+xml;base64,"==ra.substring(0,26)?ra=atob(ra.substring(26)):"data:image/svg+xml;utf8,"==ra.substring(0,24)&&(ra=ra.substring(24)),null!=ra&&(""==ra.trim()?ra=null:"%"==ra.charAt(0)?ra=decodeURIComponent(ra):"<"!=ra.charAt(0)&&(ra=Graph.decompress(ra)))}catch(ya){}return ra});if("json"==urlParams.proto){var ca=!1;try{J=JSON.parse(J),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[K],"data",[J])}catch(ra){J=null}try{if(null==J)return;if("dialog"==J.action){this.showError(null!=-J.titleKey?mxResources.get(J.titleKey):J.title,null!=J.messageKey?mxResources.get(J.messageKey):mxUtils.htmlEntities(J.message),null!=J.buttonKey?mxResources.get(J.buttonKey):J.button);null!=J.modified&&(this.editor.modified=J.modified);return}if("layout"==J.action){this.executeLayouts(this.editor.graph.createLayouts(J.layouts));return}if("prompt"==J.action){this.spinner.stop();var W=new FilenameDialog(this,J.defaultValue||"",null!=J.okKey?mxResources.get(J.okKey):J.ok,function(ra){null!=ra?F.postMessage(JSON.stringify({event:"prompt",-value:ra,message:J}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")},null!=J.titleKey?mxResources.get(J.titleKey):J.title,null,null,null,null,function(){F.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")});this.showDialog(W.container,300,80,!0,!1);W.init();return}if("draft"==J.action){var ba=ea(J.xml);this.spinner.stop();W=new DraftDialog(this,mxResources.get("draftFound",[J.name||this.defaultFilename]),ba,mxUtils.bind(this,function(){this.hideDialog();-F.postMessage(JSON.stringify({event:"draft",result:"edit",message:J}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"discard",message:J}),"*")}),J.editKey?mxResources.get(J.editKey):null,J.discardKey?mxResources.get(J.discardKey):null,J.ignore?mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:J}),"*")}):null);this.showDialog(W.container,640,480,!0,!1,mxUtils.bind(this,function(ra){ra&&-this.actions.get("exit").funct()}));try{W.init()}catch(ra){F.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:J}),"*")}return}if("template"==J.action){this.spinner.stop();var ha=1==J.enableRecent,la=1==J.enableSearch,Y=1==J.enableCustomTemp;W=new NewDialog(this,!1,J.templatesOnly?!1:null!=J.callback,mxUtils.bind(this,function(ra,ya,Ca,Ma){ra=ra||this.emptyDiagramXml;null!=J.callback?F.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:ya,tempUrl:Ca,-libs:Ma,builtIn:!0,message:J}),"*"):(c(ra,K,ra!=this.emptyDiagramXml,J.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ha?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,"Network Error!")})}):null,la?mxUtils.bind(this,function(ra,ya){this.remoteInvoke("searchDiagrams",[ra,null],null,ya,function(){ya(null,"Network Error!")})}):null,mxUtils.bind(this,function(ra,ya,Ca){F.postMessage(JSON.stringify({event:"template",-docUrl:ra,info:ya,name:Ca}),"*")}),null,null,Y?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==J.withoutType);this.showDialog(W.container,620,460,!0,!1,mxUtils.bind(this,function(ra){null!=this.sidebar&&this.sidebar.hideTooltip();ra&&this.actions.get("exit").funct()}));W.init();return}if("textContent"==J.action){var ma=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:ma,message:J}),"*");return}if("status"==-J.action){null!=J.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(J.messageKey))):null!=J.message&&this.editor.setStatus(mxUtils.htmlEntities(J.message));null!=J.modified&&(this.editor.modified=J.modified);return}if("spinner"==J.action){var Z=null!=J.messageKey?mxResources.get(J.messageKey):J.message;null==J.show||J.show?this.spinner.spin(document.body,Z):this.spinner.stop();return}if("exit"==J.action){this.actions.get("exit").funct();return}if("viewport"==J.action){null!=J.viewport&&-(this.embedViewport=J.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==J.action){W=null;try{var k=this.diagramContainer.getAttribute("data-scrollState");null!=k&&(this.diagramContainer.removeAttribute("data-scrollState"),W=JSON.parse(k))}catch(ra){}Editor.inlineFullscreen=J.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=W&&this.restoreScrollState(W);return}if("snapshot"==J.action){this.sendEmbeddedSvgExport(!0);-return}if("export"==J.action){if("png"==J.format||"xmlpng"==J.format){if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){var A=null!=J.xml?J.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,U=mxUtils.bind(this,function(ra,ya){if(J.withSvg)J.withSvg=!1,this.getEmbeddedSvg(A,this.editor.graph,null,!0,function(Ma){U(ra,Ma)},null,null,J.embedImages,this.editor.graph.background,J.scale,J.border,J.shadow,-"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var Ca=this.createLoadMessage("export");Ca.format=J.format;Ca.message=J;Ca.data=ra;Ca.svg=ya;Ca.xml=A;F.postMessage(JSON.stringify(Ca),"*")}}),O=mxUtils.bind(this,function(ra){null==ra&&(ra=Editor.blankImage);"xmlpng"==J.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(A)));I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);U(ra)}),S=J.pageId||(null!=this.pages?J.currentPage?this.currentPage.getId():-this.pages[0].getId():null);if(this.isExportToCanvas()){var X=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=S){var ra=I.getGlobalVariable;I=this.createTemporaryGraph(I.getStylesheet());for(var ya,Ca=0;Ca<this.pages.length;Ca++)if(this.pages[Ca].getId()==S){ya=this.updatePageRoot(this.pages[Ca]);break}null==ya&&(ya=this.currentPage);I.getGlobalVariable=function(Ra){return"page"==Ra?ya.getName():"pagenumber"==Ra?1:ra.apply(this,arguments)};document.body.appendChild(I.container);-I.model.setRoot(ya.root)}if(null!=J.layerIds){var Ma=I.model,Ha=Ma.getChildCells(Ma.getRoot()),Aa={};for(Ca=0;Ca<J.layerIds.length;Ca++)Aa[J.layerIds[Ca]]=!0;for(Ca=0;Ca<Ha.length;Ca++)Ma.setVisible(Ha[Ca],Aa[Ha[Ca].id]||!1)}Ca=null;J.keepTheme&&(Ca=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ra){O(Ra.toDataURL("image/png"))}),J.width,null,J.background,mxUtils.bind(this,function(){O(null)}),null,null,J.scale,J.transparent,J.shadow,null,I,J.border,null,-J.grid,Ca)});null!=J.xml&&0<J.xml.length&&(l=!0,this.setFileData(A),l=!1);X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==J.format?"1":"0")+(null!=S?"&pageId="+S:"")+(null!=J.layerIds&&0<J.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:J.layerIds})):"")+(null!=J.scale?"&scale="+J.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?U("data:image/png;base64,"+ra.getText()):O(null)}),-mxUtils.bind(this,function(){O(null)}))}}else if(X=mxUtils.bind(this,function(){var ra=this.createLoadMessage("export");ra.message=J;if("html2"==J.format||"html"==J.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ya=this.getXmlFileData();ra.xml=mxUtils.getXml(ya);ra.data=this.getFileData(null,null,!0,null,null,null,ya);ra.format=J.format}else if("html"==J.format)ya=this.editor.getGraphXml(),ra.data=this.getHtml(ya,this.editor.graph),ra.xml=mxUtils.getXml(ya),ra.format=J.format;-else{mxSvgCanvas2D.prototype.foAltText=null;ya=null!=J.background?J.background:this.editor.graph.background;ya==mxConstants.NONE&&(ya=null);ra.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ra.format="svg";var Ca=mxUtils.bind(this,function(Ha){this.editor.graph.setEnabled(!0);this.spinner.stop();ra.data=Editor.createSvgDataUri(Ha);F.postMessage(JSON.stringify(ra),"*")}),Ma="auto";J.keepTheme&&(Ma=Editor.isDarkMode()?"dark":"light");null!=J.theme&&(Ma=J.theme);if("xmlsvg"==J.format){if(null==-J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){Ma=null;if(this.isAutoDarkMode()||Editor.isDarkMode())Ma="auto";null!=J.theme&&(Ma=J.theme);this.getEmbeddedSvg(ra.xml,this.editor.graph,null,!0,Ca,null,null,J.embedImages,ya,J.scale,J.border,J.shadow,Ma)}}else if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin))this.editor.graph.setEnabled(!1),ya=this.editor.graph.getSvg(ya,-J.scale,J.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||J.shadow,null,Ma),(this.editor.graph.shadowVisible||J.shadow)&&this.editor.graph.addSvgShadow(ya),this.embedFonts(ya,mxUtils.bind(this,function(Ha){J.embedImages||null==J.embedImages?this.editor.convertImages(Ha,mxUtils.bind(this,function(Aa){Ca(mxUtils.getXml(Aa))})):Ca(mxUtils.getXml(Ha))}));return}F.postMessage(JSON.stringify(ra),"*")}),null!=J.xml&&0<J.xml.length){if(this.editor.graph.mathEnabled){var aa=Editor.onMathJaxDone;-Editor.onMathJaxDone=function(){aa.apply(this,arguments);X()}}l=!0;this.setFileData(J.xml);l=!1;this.editor.graph.mathEnabled||X()}else X();return}if("load"==J.action){ca=J.toSketch;t=1==J.autosave;this.hideDialog();null!=J.modified&&null==urlParams.modified&&(urlParams.modified=J.modified);null!=J.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=J.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||-this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=J.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=J.noSaveBtn);if(null!=J.rough){var ja=Editor.sketchMode;this.doSetSketchMode(J.rough);ja!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=J.dark&&this.setDarkMode(J.dark);null!=J.border&&(this.embedExportBorder=-J.border);null!=J.theme&&(this.embedExportTheme=J.theme);null!=J.background&&(this.embedExportBackground=J.background);null!=J.viewport&&(this.embedViewport=J.viewport);this.embedExitPoint=null;if(null!=J.rect){var pa=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,J.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,J.rect.top)+"px";this.minInlineWidth=J.minWidth;this.minInlineHeight=J.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom=-"";this.diagramContainer.style.right="";var sa=J.maxFitScale,qa=J.rect.width+2*pa,wa=J.rect.height+2*pa;da=mxUtils.bind(this,function(){var ra=mxUtils.getDocumentSize();qa=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,qa):qa,ra.width-80);ra=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,wa):wa,ra.height-80);this.diagramContainer.style.width=qa+"px";this.diagramContainer.style.height=ra+"px";var ya=this.editor.graph;ra=ya.maxFitScale;ya.maxFitScale=sa;ya.fit(2*-pa,null,null,null,null,null,wa);this.setPageVisible(!1);if(null!=this.minInlineWidth&&ya.getGraphBounds().width<this.minInlineWidth){var Ca=ya.container.scrollTop;this.resetScrollbars();ya.container.scrollTop=Ca}ya.maxFitScale=ra;ya.container.scrollTop-=pa;ya.container.scrollLeft-=pa;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[J]));ya.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&-(this.formatWindow.window.div.style.top=ya.container.style.top);var Ma=ya.getGraphBounds();ya.container.clientWidth>Ma.width+2*pa&&(ya.container.scrollLeft=Ma.x+(Ma.width+pa-ya.container.clientWidth)/2)}),10)})}null!=J.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=J.noExitBtn);null!=J.title&&null!=this.buttonContainer&&(ba=this.createStatusDiv(""),mxUtils.write(ba,J.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(ba),-this.embedFilenameSpan=ba);try{J.libs&&this.sidebar.showEntries(J.libs)}catch(ra){}J=null!=J.xmlpng?this.extractGraphModelFromPng(J.xmlpng):null!=J.descriptor?J.descriptor:J.xml}else{if("merge"==J.action){var Ba=this.getCurrentFile();null!=Ba&&(ba=ea(J.xml),null!=ba&&""!=ba&&Ba.mergeFile(new LocalFile(this,ba),function(){F.postMessage(JSON.stringify({event:"merge",message:J}),"*")},function(ra){F.postMessage(JSON.stringify({event:"merge",message:J,error:ra}),"*")}))}else"remoteInvokeReady"==J.action?-this.handleRemoteInvokeReady(F):"remoteInvoke"==J.action?this.handleRemoteInvoke(J,K.origin):"remoteInvokeResponse"==J.action?this.handleRemoteInvokeResponse(J):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(J)}),"*");return}}catch(ra){this.handleError(ra)}}var za=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ea=mxUtils.bind(this,function(ra,ya){l=!0;try{c(ra,-ya,null,ca)}catch(Ca){this.handleError(Ca)}l=!1;null!=urlParams.modified&&this.editor.setStatus("");z=za();t&&null==f&&(f=mxUtils.bind(this,function(Ca,Ma){Ca=za();Ca==z||l||(Ma=this.createLoadMessage("autosave"),Ma.xml=Ca,(window.opener||window.parent).postMessage(JSON.stringify(Ma),"*"));z=Ca}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",-f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ya=this.createLoadMessage("load"),ya.xml=ra,F.postMessage(JSON.stringify(ya),"*");null!=da&&da()});null!=J&&"function"===typeof J.substring&&"data:application/vnd.visio;base64,"==-J.substring(0,34)?(ea="0M8R4KGxGuE"==J.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(J.substring(J.indexOf(",")+1)),function(ra){Ea(ra,K)},mxUtils.bind(this,function(ra){this.handleError(ra)}),ea)):null!=J&&"function"===typeof J.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(J,mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&-299>=ra.status&&"<mxGraphModel"==ra.responseText.substring(0,13)?Ea(ra.responseText,K):this.handleError({message:413==ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=J&&"function"===typeof J.substring&&this.isLucidChartData(J)?this.convertLucidChart(J,mxUtils.bind(this,function(ra){Ea(ra)}),mxUtils.bind(this,function(ra){this.handleError(ra)})):null==J||"object"!==typeof J||null==J.format||null==J.data&&null==J.url?(J=ea(J),Ea(J,K)):this.loadDescriptor(J,-mxUtils.bind(this,function(ra){Ea(za(),K)}),mxUtils.bind(this,function(ra){this.handleError(ra,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;C="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(C,"*");if("json"==urlParams.proto){var N=this.editor.graph.openLink;this.editor.graph.openLink=function(K,J,da){N.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:K,target:J,allowOpener:da}),"*")}}};EditorUi.prototype.createEmbedButton=-function(c,f,l,t){var z="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,C=document.createElement("button");C.setAttribute("title",c+(null!=l?" ("+l+")":""));C.style.marginLeft="6px";mxUtils.write(C,c);z?(C.className=t?"gePrimaryBtn":"",C.style.marginLeft="8px",C.style.padding="6px"):C.className="geBigButton"+(t?"":" geBigStandardButton");mxEvent.addListener(C,"click",f);return C};EditorUi.prototype.addEmbedButtons=function(){var c=document.createElement("div");-c.style.display="inline-flex";c.style.alignItems="center";c.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&(c.style.marginRight="66px",c.style.order="1","atlas"==Editor.currentTheme&&(c.style.marginTop="2px"));document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),-this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(c.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&c.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?-mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||null==this.buttonContainer?null!=this.menubar&&(this.toolbar.container.style.paddingLeft="6px",this.toolbar.container.appendChild(c),this.toolbar.staticElements.push(c)):(this.buttonContainer.appendChild(c),this.editor.fireEvent(new mxEventObject("statusChanged")))};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&-(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var f=-new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(l){if(0<l.length)try{var t=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(t));this.customLayoutConfig=t;this.hideDialog()}catch(z){this.handleError(z)}}),null,null,null,null,mxUtils.bind(this,function(l,t){var z=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var C=t.value;t.value=JSON.stringify(JSON.parse(C));t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?-t.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));t.value=C}catch(F){this.handleError(F)}}));z.setAttribute("title","copy");z.className="geBtn";l.appendChild(z)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var l=mxUtils.bind(this,function(){this.loadingOrgChart=-!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),t=mxUtils.bind(this,function(z){this.loadingOrgChart=!1;f.clear()&&this.handleError(z)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",-function(){mxscript("js/orgchart/mxOrgChartLayout.js",l,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,t))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var l=c.split("\n"),t=[],z=[],C=[],F={};if(0<l.length){var N={},K=this.editor.graph,J=null,da=null,ea=null,ca=-null,W=null,ba=null,ha=null,la="whiteSpace=wrap;html=1;",Y=null,ma=null,Z="",k="auto",A="auto",I=!1,U=null,O=null,S=40,X=40,aa=100,ja=0,pa=mxUtils.bind(this,function(){null!=f?f(ua):(K.setSelectionCells(ua),K.scrollCellToVisible(K.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),sa=K.getFreeInsertPoint(),qa=sa.x,wa=sa.y;sa=wa;var Ba=null,za="auto";ma=null;for(var Ea=[],ra=null,ya=null,Ca=0;Ca<l.length&&"#"==l[Ca].charAt(0);){c=-l[Ca].replace(/\r$/,"");for(Ca++;Ca<l.length&&"\\"==c.charAt(c.length-1)&&"#"==l[Ca].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(l[Ca].substring(1)),Ca++;if("#"!=c.charAt(1)){var Ma=c.indexOf(":");if(0<Ma){var Ha=mxUtils.trim(c.substring(1,Ma)),Aa=mxUtils.trim(c.substring(Ma+1));"label"==Ha?Ba=Graph.sanitizeHtml(Aa):"labelname"==Ha&&0<Aa.length&&"-"!=Aa?W=Aa:"labels"==Ha&&0<Aa.length&&"-"!=Aa?ha=JSON.parse(Aa):"style"==Ha?da=Aa:"parentstyle"==Ha?la=Aa:"unknownStyle"==Ha&&"-"!=Aa?ba=Aa:"stylename"==-Ha&&0<Aa.length&&"-"!=Aa?ca=Aa:"styles"==Ha&&0<Aa.length&&"-"!=Aa?ea=JSON.parse(Aa):"vars"==Ha&&0<Aa.length&&"-"!=Aa?J=JSON.parse(Aa):"identity"==Ha&&0<Aa.length&&"-"!=Aa?Y=Aa:"parent"==Ha&&0<Aa.length&&"-"!=Aa?ma=Aa:"namespace"==Ha&&0<Aa.length&&"-"!=Aa?Z=Aa:"width"==Ha?k=Aa:"height"==Ha?A=Aa:"collapsed"==Ha&&"-"!=Aa?I="true"==Aa:"left"==Ha&&0<Aa.length?U=Aa:"top"==Ha&&0<Aa.length?O=Aa:"ignore"==Ha?ya=Aa.split(","):"connect"==Ha?Ea.push(JSON.parse(Aa)):"link"==Ha?ra=Aa:"padding"==Ha?ja=parseFloat(Aa):-"edgespacing"==Ha?S=parseFloat(Aa):"nodespacing"==Ha?X=parseFloat(Aa):"levelspacing"==Ha?aa=parseFloat(Aa):"layout"==Ha&&(za=Aa)}}}if(null==l[Ca])throw Error(mxResources.get("invalidOrMissingFile"));var Ra=this.editor.csvToArray(l[Ca].replace(/\r$/,""));Ma=c=null;Ha=[];for(Aa=0;Aa<Ra.length;Aa++)Y==Ra[Aa]&&(c=Aa),ma==Ra[Aa]&&(Ma=Aa),Ha.push(mxUtils.trim(Ra[Aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Ha[0]+"%");if(null!=Ea)for(var Za=0;Za<Ea.length;Za++)null==-N[Ea[Za].to]&&(N[Ea[Za].to]={});Y=[];for(Aa=Ca+1;Aa<l.length;Aa++){var La=this.editor.csvToArray(l[Aa].replace(/\r$/,""));if(null==La){var $a=40<l[Aa].length?l[Aa].substring(0,40)+"...":l[Aa];throw Error($a+" ("+Aa+"):\n"+mxResources.get("containsValidationErrors"));}0<La.length&&Y.push(La)}K.model.beginUpdate();try{for(Aa=0;Aa<Y.length;Aa++){La=Y[Aa];var Da=null,x=null!=c?Z+La[c]:null;l=!1;null!=x&&(Da=K.model.getCell(x),l=null==Da||0<=mxUtils.indexOf(t,Da));var M=new mxCell(Ba,new mxGeometry(qa,-sa,0,0),da||"whiteSpace=wrap;html=1;");M.collapsed=I;M.vertex=!0;M.id=x;null==Da||l||K.model.setCollapsed(Da,I);for(var Q=0;Q<La.length;Q++)K.setAttributeForCell(M,Ha[Q],La[Q]),null==Da||l||K.setAttributeForCell(Da,Ha[Q],La[Q]);if(null!=W&&null!=ha){var V=ha[M.getAttribute(W)];null!=V&&(K.labelChanged(M,V),null==Da||l||K.cellLabelChanged(Da,V))}if(null!=ca&&null!=ea){var ia=ea[M.getAttribute(ca)];null!=ia&&(M.style=ia)}K.setAttributeForCell(M,"placeholders","1");M.style=K.replacePlaceholders(M,M.style,-J);null==Da||l?K.fireEvent(new mxEventObject("cellsInserted","cells",[M])):(K.model.setStyle(Da,M.style),0>mxUtils.indexOf(C,Da)&&C.push(Da),K.fireEvent(new mxEventObject("cellsInserted","cells",[Da])));l=null!=Da;Da=M;if(!l)for(Za=0;Za<Ea.length;Za++)N[Ea[Za].to][Da.getAttribute(Ea[Za].to)]=Da;null!=ra&&"link"!=ra&&(K.setLinkForCell(Da,Da.getAttribute(ra)),K.setAttributeForCell(Da,ra,null));var ka=this.editor.graph.getPreferredSizeForCell(Da);ma=null!=Ma?K.model.getCell(Z+La[Ma]):null;if(Da.vertex){$a=-null!=ma?0:qa;Ca=null!=ma?0:wa;null!=U&&null!=Da.getAttribute(U)&&(Da.geometry.x=$a+parseFloat(Da.getAttribute(U)));null!=O&&null!=Da.getAttribute(O)&&(Da.geometry.y=Ca+parseFloat(Da.getAttribute(O)));var oa="@"==k.charAt(0)?Da.getAttribute(k.substring(1)):null;Da.geometry.width=null!=oa&&"auto"!=oa?parseFloat(Da.getAttribute(k.substring(1))):"auto"==k||"auto"==oa?ka.width+ja:parseFloat(k);var xa="@"==A.charAt(0)?Da.getAttribute(A.substring(1)):null;Da.geometry.height=null!=xa&&"auto"!=xa&&"width"!=-A?parseFloat(xa):"auto"==A||"auto"==xa?ka.height+ja:"width"==A?Da.geometry.width:parseFloat(A);sa+=Da.geometry.height+X}l?(null==F[x]&&(F[x]=[]),F[x].push(Da)):(t.push(Da),null!=ma?(ma.style=K.replacePlaceholders(ma,la,J),K.addCell(Da,ma),z.push(ma)):C.push(K.addCell(Da)))}for(Aa=0;Aa<z.length;Aa++)oa="@"==k.charAt(0)?z[Aa].getAttribute(k.substring(1)):null,xa="@"==A.charAt(0)?z[Aa].getAttribute(A.substring(1)):null,"auto"!=k&&"auto"!=oa||"auto"!=A&&"auto"!=xa||K.updateGroupBounds([z[Aa]],ja,!0);-var ta=C.slice(),ua=C.slice();for(Za=0;Za<Ea.length;Za++){var Fa=Ea[Za];for(Aa=0;Aa<t.length;Aa++){Da=t[Aa];var Na=mxUtils.bind(this,function(mb,pb,db){var qb=pb.getAttribute(db.from);if(null!=qb&&""!=qb){qb=qb.split(",");for(var nb=0;nb<qb.length;nb++){var lb=N[db.to][qb[nb]];if(null==lb&&null!=ba){lb=new mxCell(qb[nb],new mxGeometry(qa,wa,0,0),ba);lb.style=K.replacePlaceholders(pb,lb.style,J);var eb=this.editor.graph.getPreferredSizeForCell(lb);lb.geometry.width=eb.width+ja;lb.geometry.height=eb.height+-ja;N[db.to][qb[nb]]=lb;lb.vertex=!0;lb.id=qb[nb];C.push(K.addCell(lb))}if(null!=lb){eb=db.label;null!=db.fromlabel&&(eb=(pb.getAttribute(db.fromlabel)||"")+(eb||""));null!=db.sourcelabel&&(eb=K.replacePlaceholders(pb,db.sourcelabel,J)+(eb||""));null!=db.tolabel&&(eb=(eb||"")+(lb.getAttribute(db.tolabel)||""));null!=db.targetlabel&&(eb=(eb||"")+K.replacePlaceholders(lb,db.targetlabel,J));var tb="target"==db.placeholders==!db.invert?lb:mb;tb=null!=db.style?K.replacePlaceholders(tb,db.style,J):K.createCurrentEdgeStyle();-eb=K.insertEdge(null,null,eb||"",db.invert?lb:mb,db.invert?mb:lb,tb);if(null!=db.labels)for(tb=0;tb<db.labels.length;tb++){var ob=db.labels[tb],ub=new mxCell(ob.label||tb,new mxGeometry(null!=ob.x?ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=ob.placeholders&&(ub.value=K.replacePlaceholders("target"==ob.placeholders==!db.invert?lb:mb,ub.value,J));if(null!=ob.dx||null!=ob.dy)ub.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=-ob.dy?ob.dy:0);eb.insert(ub)}if(null!=db.data)for(var Ab in db.data)K.setAttributeForCell(eb,Ab,db.data[Ab]);ua.push(eb);mxUtils.remove(db.invert?mb:lb,ta)}}}});Na(Da,Da,Fa);if(null!=F[Da.id])for(Q=0;Q<F[Da.id].length;Q++)Na(Da,F[Da.id][Q],Fa)}}if(null!=ya)for(Aa=0;Aa<t.length;Aa++)for(Da=t[Aa],Q=0;Q<ya.length;Q++)K.setAttributeForCell(Da,mxUtils.trim(ya[Q]),null);if(0<C.length){var Wa=new mxParallelEdgeLayout(K);Wa.spacing=S;Wa.checkOverlap=!0;var Xa=function(){0<Wa.spacing&&Wa.execute(K.getDefaultParent());-for(var mb=0;mb<C.length;mb++){var pb=K.getCellGeometry(C[mb]);pb.x=Math.round(K.snap(pb.x));pb.y=Math.round(K.snap(pb.y));"auto"==k&&(pb.width=Math.round(K.snap(pb.width)));"auto"==A&&(pb.height=Math.round(K.snap(pb.height)))}};if("["==za.charAt(0)){var ab=pa;K.view.validate();this.executeLayouts(K.createLayouts(JSON.parse(za)),function(){Xa();ab()});pa=null}else if("circle"==za){var Oa=new mxCircleLayout(K);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Qa=Oa.isVertexIgnored;Oa.isVertexIgnored=function(mb){return Qa.apply(this,-arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Oa.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}else if("horizontaltree"==za||"verticaltree"==za||"auto"==za&&ua.length==2*C.length-1&&1==ta.length){K.view.validate();var kb=new mxCompactTreeLayout(K,"horizontaltree"==za);kb.levelDistance=X;kb.edgeRouting=!1;kb.resetEdges=!1;kb.sortEdges=!0;this.executeLayout(function(){kb.execute(K.getDefaultParent(),0<ta.length?ta[0]:null)},!0,pa);pa=null}else if("horizontalflow"==za||"verticalflow"==-za||"auto"==za&&1==ta.length){K.view.validate();var cb=new mxHierarchicalLayout(K,"horizontalflow"==za?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);cb.intraCellSpacing=X;cb.parallelEdgeSpacing=S;cb.interRankCellSpacing=aa;cb.disableEdgeStyle=!1;this.executeLayout(function(){cb.execute(K.getDefaultParent(),ua);K.moveCells(ua,qa,wa)},!0,pa);pa=null}else if("orgchart"==za){K.view.validate();var Ya=new mxOrgChartLayout(K,2,aa,X),gb=Ya.isVertexIgnored;Ya.isVertexIgnored=function(mb){return gb.apply(this,-arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Ya.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}else if("organic"==za||"auto"==za&&ua.length>C.length){K.view.validate();var hb=new mxFastOrganicLayout(K);hb.forceConstant=3*X;hb.disableEdgeStyle=!1;hb.resetEdges=!1;var vb=hb.isVertexIgnored;hb.isVertexIgnored=function(mb){return vb.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){hb.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}}this.hideDialog()}finally{K.model.endUpdate()}null!=-pa&&pa()}}catch(mb){this.handleError(mb)}};EditorUi.prototype.getSearch=function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",t;for(t in urlParams)0>mxUtils.indexOf(c,t)&&null!=urlParams[t]&&(f+=l+t+"="+urlParams[t],l="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),-t;for(t in urlParams)0>mxUtils.indexOf(l,t)&&(c=0==f?c+"?":c+"&",null!=urlParams[t]&&(c+=t+"="+urlParams[t],f++))}return c};EditorUi.prototype.showLinkDialog=function(c,f,l,t,z){c=new LinkDialog(this,c,f,l,!0,t,z);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||-f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;c&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),f=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var l=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!l);+this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?F():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))}),t)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var f=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(l){var t=mxUtils.bind(this,function(C){l.clear()&&f(C)}),+z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||t({message:mxResources.get("unknownError")})}catch(C){t(C)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,+t))}),f):f({message:mxResources.get("serviceUnavailableOrBlocked")})}};EditorUi.prototype.convertLucidChart=function(c,f,l){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=l?l(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(N){z.clear()&&t(N)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if("undefined"!==typeof window.LucidImporter)try{var N=JSON.parse(c);f(LucidImporter.importState(N));try{if(null!=+window.console&&"1"==urlParams.test){var K=[(new Date).toISOString(),"convertLucidChart",N];null!=N.state&&K.push(JSON.parse(N.state));if(null!=N.svgThumbs)for(var J=0;J<N.svgThumbs.length;J++)K.push(Editor.createSvgDataUri(N.svgThumbs[J]));null!=N.thumb&&K.push(N.thumb);console.log.apply(console,K)}}catch(da){}}catch(da){null!=window.console&&console.error(da),C(da)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||+this.isOffline(!0)?window.setTimeout(F,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",F,null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,+null,null,C))}),t)};EditorUi.prototype.createMermaidXml=function(c,f,l,t,z,C){var F=new Graph(document.createElement("div"));l=F.insertVertex(null,null,null,0,0,t,z,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");F.setAttributeForCell(l,"mermaidData",JSON.stringify({data:c,config:f},null,2));null!=C&&F.setAttributeForCell(l,"templatePrompt",C);c=(new mxCodec).encode(F.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,f,l){var t=+0,z=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(C){var F=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),N=mxUtils.bind(this,function(K){C.clear()&&l(K)});F.send(mxUtils.bind(this,function(K){if(C.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var da=mxUtils.trim(K.getText());this.generateMermaidImage(da,null,mxUtils.bind(this,function(ea,ca,X){this.tryAndHandle(mxUtils.bind(this,function(){C.clear()&&+(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",da),f(da,ea,ca,X))}),N)}),N,mxUtils.bind(this,function(ea){3>t++?C.clear()&&z():N(ea)}))}),N);else{var J={message:mxResources.get("error")+" "+K.getStatus()};try{J=JSON.parse(K.getText()),J=J.error}catch(da){}N(J)}}),N)}),l)});z()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?+f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var l=1<f.length?f[1]:null;if(null!=l){var t=l.indexOf("-");0<t&&(l=l.substring(0,t))}if(0<f.length&&"mermaid"==mxUtils.trim(f[0])||null!=l&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l))f.shift(),c=mxUtils.trim(f.join("\n")),f=c.split("\n");l=f[0].split(" ")[0].replace(/:$/,"");t=l.indexOf("-");0<t&&(l=l.substring(0,t));try{"mindmap"==l&&2<f.length&&(c=extractMermaidMindmap(f))}catch(z){}0>+mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,f,l,t,z){var C=mxUtils.bind(this,function(N){this.loadingMermaid=!1;null!=t?t(N):this.handleError(N)}),F=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=+!0);Editor.isDarkMode()&&(f.theme="dark");var N=mxUtils.bind(this,function(K){try{if(mxClient.IS_IE||mxClient.IS_IE11)K=K.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var J=mxUtils.parseXml(K).getElementsByTagName("svg");if(0<J.length&&"error"!=J[0].getAttribute("aria-roledescription")){var da=parseFloat(J[0].getAttribute("width")),ea=parseFloat(J[0].getAttribute("height"));if(isNaN(da)||isNaN(ea))try{var ca=+J[0].getAttribute("viewBox").split(/\s+/);da=parseFloat(ca[2]);ea=parseFloat(ca[3])}catch(X){da=da||100,ea=ea||100}l(this.convertDataUri(Editor.createSvgDataUri(K)),da,ea)}else null!=z?z():t({message:mxResources.get("invalidInput")})}catch(X){t(X)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(K){N(K.svg)}).catch(function(K){null!=z?z(K):t(K)})}catch(K){t(K)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?+window.setTimeout(F,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(N){this.importXml(N,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",F,null,null,null,C)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))};EditorUi.prototype.generatePlantUmlImage=function(c,f,l,t){function z(N,K,J){c1=N>>2;c2=(N&3)<<4|K>>4;c3=(K&15)<<2|J>>6;c4=J&63;r="";r+=C(c1&63);r+=C(c2&+63);r+=C(c3&63);return r+=C(c4&63)}function C(N){if(10>N)return String.fromCharCode(48+N);N-=10;if(26>N)return String.fromCharCode(65+N);N-=26;if(26>N)return String.fromCharCode(97+N);N-=26;return 0==N?"-":1==N?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(N){r="";for(i=0;i<N.length;i+=3)r=i+2==N.length?r+z(N.charCodeAt(i),N.charCodeAt(i+1),0):i+1==N.length?r+z(N.charCodeAt(i),0,0):r+z(N.charCodeAt(i),N.charCodeAt(i++1),N.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(N){if(200<=this.status&&300>this.status)if("txt"==f)l(this.response);else{var K=new FileReader;K.readAsDataURL(this.response);K.onloadend=function(J){var da=new Image;da.onload=function(){try{var ea=da.width,ca=da.height;if(0==ea&&0==ca){var X=K.result,aa=X.indexOf(","),ia=decodeURIComponent(escape(atob(X.substring(aa+1)))),la=mxUtils.parseXml(ia).getElementsByTagName("svg");+0<la.length&&(ea=parseFloat(la[0].getAttribute("width")),ca=parseFloat(la[0].getAttribute("height")))}l(K.result,ea,ca)}catch(Y){t(Y)}};da.src=K.result};K.onerror=function(J){t(J)}}else t(N)};F.onerror=function(N){t(N)};F.send()};EditorUi.prototype.insertAsPreText=function(c,f,l){var t=this.editor.graph,z=null;t.getModel().beginUpdate();try{z=t.insertVertex(null,null,"<pre>"+c+"</pre>",f,l,1,1,"text;html=1;align=left;verticalAlign=top;"),t.updateCellSize(z,!0)}finally{t.getModel().endUpdate()}return z};+EditorUi.prototype.insertTextAt=function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;F=null!=F?F:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(ca){4==ca.readyState&&200<=ca.status&&299>=ca.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ca.responseText,f,l,!0))}));else if("data:"==c.substring(0,+5)||!this.isOffline()&&(z||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var K=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var J=Editor.extractGraphModelFromPdf(c);if(null!=J&&0<J.length)return this.importXml(J,f,l,C,!0,N)}if(Editor.isPngDataUrl(c)&&(J=Editor.extractGraphModelFromPng(c),null!=J&&0<J.length))return this.importXml(J,f,l,C,!0,N);if("data:image/svg+xml;"==c.substring(0,19))try{J=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(J=c.substring(c.indexOf(",")++1),J=window.atob&&!mxClient.IS_SF?atob(J):Base64.decode(J,!0)):J=decodeURIComponent(c.substring(c.indexOf(",")+1));var da=this.importXml(J,f,l,C,!0,N);if(0<da.length)return da}catch(ca){}this.loadImage(c,mxUtils.bind(this,function(ca){if("data:"==c.substring(0,5))this.resizeImage(ca,c,mxUtils.bind(this,function(ia,la,Y){K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),la,Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="++this.convertDataUri(ia)+";"))}),F,this.maxImageSize);else{var X=Math.min(1,Math.min(this.maxImageSize/ca.width,this.maxImageSize/ca.height)),aa=Math.round(ca.width*X);ca=Math.round(ca.height*X);K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),aa,ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var ca=null;K.getModel().beginUpdate();try{ca=K.insertVertex(K.getDefaultParent(),+null,c,K.snap(f),K.snap(l),1,1,"text;"+(t?"html=1;":"")),K.updateCellSize(ca),K.fireEvent(new mxEventObject("textInserted","cells",[ca]))}finally{K.getModel().endUpdate()}K.setSelectionCell(ca)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,l,C,null,N);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(ca){this.editor.graph.setSelectionCells(this.importXml(ca,f,l,C,null,N))}),mxUtils.bind(this,function(ca){this.handleError(ca)}));+else{K=this.editor.graph;z=null;K.getModel().beginUpdate();try{z=K.insertVertex(K.getDefaultParent(),null,"",K.snap(f),K.snap(l),1,1,"text;whiteSpace=wrap;"+(t?"html=1;":""));K.fireEvent(new mxEventObject("textInserted","cells",[z]));t&&(c=K.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");z.value=c;K.updateCellSize(z);if(0<this.maxTextWidth&&z.geometry.width>this.maxTextWidth){var ea=K.getPreferredSizeForCell(z,this.maxTextWidth);z.geometry.width=ea.width;z.geometry.height=+ea.height}Graph.isLink(z.value)&&K.setLinkForCell(z,z.value);z.geometry.width+=K.gridSize;z.geometry.height+=K.gridSize}finally{K.getModel().endUpdate()}return[z]}}return[]};EditorUi.prototype.formatFileSize=function(c){var f=-1;do c/=1024,f++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var f=c.indexOf(";");0<f&&(c=c.substring(0,f)+c.substring(c.indexOf(",",f+1)))}return c};+EditorUi.prototype.isRemoteFileFormat=function(c,f){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,f){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=+l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=l}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(F,N){StorageFile.listFiles(this,"F",F,N)});window.openBrowserFile=mxUtils.bind(this,function(F,N,K){StorageFile.getFileContent(this,F,N,K)});window.deleteBrowserFile=mxUtils.bind(this,function(F,+N,K){StorageFile.deleteFile(this,F,N,K)});if(!f){var t=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));window.openFile.setConsumer(mxUtils.bind(this,function(F,N){null!=N&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(N)?(F=new Blob([F],{type:"application/octet-stream"}),this.importVisio(F,mxUtils.bind(this,function(K){this.importXml(K,0,0,!0)}),null,N)):this.editor.graph.setSelectionCells(this.importXml(F,0,0,!0))}));+this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var z=this.dialog,C=z.close;this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=t;C.apply(z,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,f,l){var t=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?+JSZip.loadAsync(c).then(function(C){if(mxUtils.isEmptyObject(C.files))l();else{var F=0,N,K=!1;C.forEach(function(J,da){J=da.name.toLowerCase();"diagram/diagram.xml"==J?(K=!0,da.async("string").then(function(ea){0==ea.indexOf("<mxfile ")?f(ea):l()})):0==J.indexOf("versions/")&&(J=parseInt(J.substr(9)),J>F&&(F=J,N=da))});0<F?N.async("string").then(function(J){(new XMLHttpRequest).upload&&t.isRemoteFileFormat(J,c.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),+null,l):t.parseFileData(J,mxUtils.bind(this,function(da){4==da.readyState&&(200<=da.status&&299>=da.status?f(da.responseText):l())}),c.name):l()}):K||l()}},function(C){l(C)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,l))};EditorUi.prototype.importFile=function(c,f,l,t,z,C,F,N,K,J,da,ea){J=null!=J?J:!0;var ca=!1,X=null,aa=mxUtils.bind(this,function(ia){var la=+null;null!=ia&&"<mxlibrary"==ia.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,ia,F)),this.showSidebar()):la=this.importXml(ia,l,t,J,null,null!=ea?mxEvent.isControlDown(ea):null);null!=N&&N(la)});"image"==f.substring(0,5)?(K=!1,"image/png"==f.substring(0,9)&&(da=da?null:this.extractGraphModelFromPng(c),null!=da&&0<da.length&&(X=this.importXml(da,l,t,J,null,null!=ea?mxEvent.isControlDown(ea):null),K=!0)),K||(K=this.editor.graph,da=c.indexOf(";"),0<da&&(c=c.substring(0,da)+c.substring(c.indexOf(",",+da+1))),J&&K.isGridEnabled()&&(l=K.snap(l),t=K.snap(t)),da="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(da+="editableCssRules=.*;"),X=[K.insertVertex(null,null,"",l,t,z,C,da+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ca=!0,this.importGraphML(c,aa)):null!=K&&null!=F&&EditorUi.isVisioFilename(F)?(ca=!0,this.importVisio(K,aa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,F)?this.isOffline()?+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,f=mxUtils.bind(this,function(ia){4==ia.readyState&&(200<=ia.status&&299>=ia.status?aa(ia.responseText):null!=N&&(N(null),this.showError(mxResources.get("error"),413==ia.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,F):this.parseFile(K,f,F)):0==c.indexOf("PK")&&null!=K?(ca=!0,this.importZipFile(K,aa,mxUtils.bind(this,function(){X=this.insertTextAt(this.validateFileData(c),+l,t,!0,null,J);N(X)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(X=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J,null,null!=ea?mxEvent.isControlDown(ea):null));ca||null==N||N(X);return X};EditorUi.prototype.importFiles=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){t=null!=t?t:this.maxImageSize;J=null!=J?J:this.maxImageBytes;var X=null!=f&&null!=l,aa=!0;f=null!=f?f:0;l=null!=l?l:0;var ia=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var la=da||this.resampleThreshold,Y=0;Y<c.length;Y++)if("image/svg"!==+c[Y].type.substring(0,9)&&"image/"===c[Y].type.substring(0,6)&&c[Y].size>la){ia=!0;break}var ma=mxUtils.bind(this,function(){var Z=this.editor.graph,k=Z.gridSize;z=null!=z?z:mxUtils.bind(this,function(V,ba,fa,pa,sa,qa,wa,Aa,za){try{if(null!=V&&"<mxlibrary"==V.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,V,wa)),this.showSidebar(),null;this.isCompatibleString(V)&&1==c.length&&null!=ca&&"drop"==ca.type&&this.isBlankFile()&&!this.canUndo()&&(X=!1,pa=fa=0);return this.importFile(V,+ba,fa,pa,sa,qa,wa,Aa,za,X,ea,ca)}catch(Da){return this.handleError(Da),null}});C=null!=C?C:mxUtils.bind(this,function(V){Z.setSelectionCells(V)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var A=c.length,I=A,T=[],O=mxUtils.bind(this,function(V,ba){T[V]=ba;if(0==--I){this.spinner.stop();if(null!=N)N(T);else{var fa=[];Z.getModel().beginUpdate();try{for(V=0;V<T.length;V++){var pa=T[V]();null!=pa&&(fa=fa.concat(pa))}}finally{Z.getModel().endUpdate()}}C(fa)}}),U=0;U<A;U++)mxUtils.bind(this,+function(V){var ba=c[V];if(null!=ba){var fa=new FileReader;fa.onload=mxUtils.bind(this,function(pa){if(null==F||F(ba))try{if("image/"==ba.type.substring(0,6))if("image/svg"==ba.type.substring(0,9)){var sa=Graph.clipSvgDataUri(pa.target.result),qa=sa.indexOf(","),wa=decodeURIComponent(escape(atob(sa.substring(qa+1)))),Aa=mxUtils.parseXml(wa),za=Aa.getElementsByTagName("svg");if(0<za.length){var Da=za[0],ra=ea?null:Da.getAttribute("content");null!=ra&&"<"!=ra.charAt(0)&&"%"!=ra.charAt(0)&&(ra=unescape(window.atob?+atob(ra):Base64.decode(ra,!0)));null!=ra&&"%"==ra.charAt(0)&&(ra=decodeURIComponent(ra));null==ra||"<mxfile "!==ra.substring(0,8)&&"<mxGraphModel "!==ra.substring(0,14)?O(V,mxUtils.bind(this,function(){try{if(null!=Aa){var Ka=Aa.getElementsByTagName("svg");if(0<Ka.length){var Ha=Ka[0],Ba=Ha.getAttribute("width"),Pa=Ha.getAttribute("height");Ba=null!=Ba&&"%"!=Ba.charAt(Ba.length-1)?parseFloat(Ba):NaN;Pa=null!=Pa&&"%"!=Pa.charAt(Pa.length-1)?parseFloat(Pa):NaN;var $a=Ha.getAttribute("viewBox");if(null==+$a||0==$a.length)Ha.setAttribute("viewBox","0 0 "+Ba+" "+Pa);else if(isNaN(Ba)||isNaN(Pa)){var Na=$a.split(" ");3<Na.length&&(Ba=parseFloat(Na[2]),Pa=parseFloat(Na[3]))}sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var Ya=Math.min(1,Math.min(t/Math.max(1,Ba)),t/Math.max(1,Pa)),Ea=z(sa,ba.type,f+V*k,l+V*k,Math.max(1,Math.round(Ba*Ya)),Math.max(1,Math.round(Pa*Ya)),ba.name);if(null!=Ea&&(isNaN(Ba)||isNaN(Pa))){var x=new Image;x.onload=mxUtils.bind(this,function(){Ba=Math.max(1,x.width);Pa=Math.max(1,+x.height);Ea[0].geometry.width=Ba;Ea[0].geometry.height=Pa;Ha.setAttribute("viewBox","0 0 "+Ba+" "+Pa);sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var L=sa.indexOf(";");0<L&&(sa=sa.substring(0,L)+sa.substring(sa.indexOf(",",L+1)));Z.setCellStyles("image",sa,[Ea[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(Ha))}return Ea}}}catch(L){}return null})):O(V,mxUtils.bind(this,function(){return z(ra,"text/xml",f+V*k,l+V*k,0,0,ba.name)}))}else O(V,mxUtils.bind(this,function(){return null}))}else{qa=+!1;if("image/png"==ba.type){var ya=ea?null:this.extractGraphModelFromPng(pa.target.result);if(null!=ya&&0<ya.length){var Ca=new Image;Ca.src=pa.target.result;O(V,mxUtils.bind(this,function(){return z(ya,"text/xml",f+V*k,l+V*k,Ca.width,Ca.height,ba.name)}));qa=!0}}qa||(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(pa.target.result,mxUtils.bind(this,function(Ka){this.resizeImage(Ka,pa.target.result,mxUtils.bind(this,function(Ha,Ba,Pa){O(V,mxUtils.bind(this,function(){if(null!=Ha&&Ha.length<J){var $a=aa&&this.isResampleImageSize(ba.size,da)?Math.min(1,Math.min(t/Ba,t/Pa)):1;return z(Ha,ba.type,f+V*k,l+V*k,Math.round(Ba*$a),Math.round(Pa*$a),ba.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),aa,t,da,ba.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else sa=+pa.target.result,z(sa,ba.type,f+V*k,l+V*k,240,160,ba.name,function(Ka){O(V,function(){return Ka})},ba)}catch(Ka){O(V,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(Ka,ba)}else O(V,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(ba.name)?z(null,ba.type,f+V*k,l+V*k,240,160,ba.name,function(pa){O(V,function(){return pa})},ba):"image"==ba.type.substring(0,5)||"application/pdf"==ba.type?fa.readAsDataURL(ba):fa.readAsText(ba)}})(U)});if(ia){ia=[];+for(Y=0;Y<c.length;Y++)ia.push(c[Y]);c=ia;this.confirmImageResize(function(Z){aa=Z;ma()},K)}else ma()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,f){f=null!=f?f:!1;var l=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},t=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():+null,z=function(C,F){if(C||f)mxSettings.setResizeImages(C?F:null),mxSettings.save();l();c(F)};null==t||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(C){z(C,!0)},function(C){z(C,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,+!0,!0):z(!1,t)};EditorUi.prototype.parseFile=function(c,f,l){l=null!=l?l:c.name;var t=new FileReader;t.onload=mxUtils.bind(this,function(){this.parseFileData(t.result,f,l)});t.readAsText(c)};EditorUi.prototype.parseFileData=function(c,f,l){var t=new XMLHttpRequest;t.open("POST",OPEN_URL);t.setRequestHeader("Content-Type","application/x-www-form-urlencoded");t.onreadystatechange=function(){f(t)};t.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",+action:"size_"+file.size})}catch(z){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>f};EditorUi.prototype.resizeImage=function(c,f,l,t,z,C,F){z=null!=z?z:this.maxImageSize;var N=Math.max(1,c.width),K=Math.max(1,c.height),J=f;if(t&&this.isResampleImageSize(null!=F?F:f.length,C))try{var da=Math.max(N/z,K/z);if(1<da){var ea=Math.round(N/da),ca=Math.round(K/da),X=document.createElement("canvas");X.width=ea;X.height=ca;X.getContext("2d").drawImage(c,+0,0,ea,ca);var aa=X.toDataURL();if(aa.length<f.length){var ia=document.createElement("canvas");ia.width=ea;ia.height=ca;var la=ia.toDataURL();aa!==la&&(f=aa,N=ea,K=ca)}}}catch(Y){}t&&J!=f&&z>this.maxImageSize/2&&f.length>this.maxImageBytes?this.resizeImage(c,f,l,t,z/1.5,C,F):l(f,N,K)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,f,l){try{var t=new Image;t.onload=function(){t.width=0<t.width?t.width:120;t.height=+0<t.height?t.height:120;f(t)};null!=l&&(t.onerror=l);t.src=c}catch(z){if(null!=l)l(z);else throw z;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var u=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());u.apply(this,+arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,f=this.editor.graph,l=f.isEnabled;f.isEnabled=function(){return l.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=+function(k){var A=k.getEvent();return null==k.getState()&&!mxEvent.isMouseEvent(A)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(A)&&(null==k.getState()||mxEvent.isControlDown(A)||mxEvent.isShiftDown(A))});f.cellEditor.editPlantUmlData=function(k,A,I){var T=JSON.parse(I);A=new TextareaDialog(c,mxResources.get("plantUml")+":",T.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(O,T.format,function(U,V,ba){c.spinner.stop();f.getModel().beginUpdate();+try{if("txt"==T.format)f.labelChanged(k,"<pre>"+U+"</pre>"),f.updateCellSize(k,!0);else{f.setCellStyles("image",c.convertDataUri(U),[k]);var fa=f.model.getGeometry(k);null!=fa&&(fa=fa.clone(),fa.width=V,fa.height=ba,f.cellsResized([k],[fa],!1))}f.setAttributeForCell(k,"plantUmlData",JSON.stringify({data:O,format:T.format}))}finally{f.getModel().endUpdate()}},function(U){c.handleError(U)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};f.cellEditor.editMermaidData=function(k,+A,I){var T=JSON.parse(I);A=new TextareaDialog(c,mxResources.get("mermaid")+":",T.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(O,T.config,function(U,V,ba){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",U,[k]);var fa=f.model.getGeometry(k);null!=fa&&(fa=fa.clone(),fa.width=Math.max(fa.width,V),fa.height=Math.max(fa.height,ba),f.cellsResized([k],[fa],!1));f.setAttributeForCell(k,"mermaidData",JSON.stringify({data:O,+config:T.config},null,2))}finally{f.getModel().endUpdate()}},function(U){c.handleError(U)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};var t=f.cellEditor.startEditing;f.cellEditor.startEditing=function(k,A){try{var I=this.graph.getAttributeForCell(k,"plantUmlData");if(null!=I)this.editPlantUmlData(k,A,I);else if(I=this.graph.getAttributeForCell(k,"mermaidData"),null!=I&&window.isMermaidEnabled)this.editMermaidData(k,A,I);else{var T=f.getCellStyle(k);"1"==mxUtils.getValue(T,+"metaEdit","0")?c.showDataDialog(k):t.apply(this,arguments)}}catch(O){c.handleError(O)}};f.getLinkTitle=function(k){return c.getLinkTitle(k)};f.customLinkClicked=function(k,A){var I=!1;try{var T=this.getGraphBounds();c.handleCustomLink(k,A);I=!0;c.chromelessResize&&!T.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(A))}catch(O){c.handleError(O)}return I};var z=f.parseBackgroundImage;f.parseBackgroundImage=function(k){var A=z.apply(this,arguments);null!=A&&null!=A.src&&+Graph.isPageLink(A.src)&&(A={originalSrc:A.src});return A};var C=f.setBackgroundImage;f.setBackgroundImage=function(k){null!=k&&null!=k.originalSrc&&(k=c.createImageForPageLink(k.originalSrc,c.currentPage,this));C.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(k,A){k=+null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=k){var I=k.indexOf(",");if(0<I)for(k=k.substring(I+1),A=A.getProperty("patches"),I=0;I<A.length;I++)if(null!=A[I][EditorUi.DIFF_UPDATE]&&null!=A[I][EditorUi.DIFF_UPDATE][k]||null!=A[I][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(A[I][EditorUi.DIFF_REMOVE],k)){f.refreshBackgroundImage();break}}}));var F=f.getBackgroundImageObject;f.getBackgroundImageObject=function(k,A){var I=F.apply(this,arguments);null!=I&&null!=I.originalSrc&&(I=+A?c.createImageForPageLink(I.originalSrc,null,null,!0):{src:I.originalSrc});return I};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var N=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(k){k=null!=k?k:"";"1"==+urlParams.dev&&(k+=(0<k.length?"&":"?")+"dev=1");return N.apply(this,arguments)};var K=f.addClickHandler;f.addClickHandler=function(k,A,I){var T=A;A=function(O,U,V){if(null==U){var ba=mxEvent.getSource(O);"a"==ba.nodeName.toLowerCase()&&(U=ba.getAttribute("href"))}null!=U&&f.isCustomLink(U)&&(mxEvent.isTouchEvent(O)||!mxEvent.isPopupTrigger(O))&&f.customLinkClicked(U,V)&&mxEvent.consume(O);null!=T&&T(O,U,V)};K.call(this,k,A,I)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,+null,!0);if(null!=this.menus){var J=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,A,I){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["zoomIn","zoomOut","-"],null,I);J.apply(this,arguments);f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(k,["-","addToScratchpad"],null,I);f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["-","exitGroup","home"],null,I)};var da=Menus.prototype.addPopupMenuEditItems;+this.menus.addPopupMenuEditItems=function(k,A,I){if(c.editor.graph.isSelectionEmpty())da.apply(this,arguments),c.menus.addMenuItems(k,["copyAsImage"],null,I);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(k,A,I):this.addPopupMenuArrangeItems(k,A,I),this.addMenuItems(k,"- cut copy copyAsImage duplicate -".split(" "),null,I),this.isShowCellEditItems()||this.addPopupDeleteItem(k,A,I),this.addMenuItems(k,["lockUnlock","-"],null,I),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(A)&&+f.isCellEditable(A)&&(this.addSubmenu("editCell",k,null,mxResources.get("edit")),k.addSeparator(),f.getModel().isEdge(A))){this.addSubmenu("line",k);var T=f.getModel().getGeometry(A);null!=T&&null!=T.points&&0<T.points.length&&this.addMenuItems(k,["clearWaypoints"],null,I)}1==f.getSelectionCount()&&this.addMenuItems(k,["enterGroup"],null,I);T=c.getSelectionState();null!=T.mergeCell?this.addMenuItem(k,"mergeCells"):(1<T.style.colspan||1<T.style.rowspan)&&this.addMenuItem(k,"unmergeCells")}};this.menus.isShowStyleItems=+function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var ea=f.getExportVariables;f.getExportVariables=function(){var k=ea.apply(this,arguments),A=c.getCurrentFile();null!=A&&(k.filename=A.getTitle());+k.pagecount=null!=c.pages?c.pages.length:1;k.page=null!=c.currentPage?c.currentPage.getName():"";k.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var ca=f.getGlobalVariable;f.getGlobalVariable=function(k){var A=c.getCurrentFile();return"filename"==k&&null!=A?A.getTitle():"page"==k&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==k?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==k?null!=c.pages?+c.pages.length:1:ca.apply(this,arguments)};var X=null,aa=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var k=this.getCurrentFile(),A=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;X!=A&&k==aa&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),f.view.validate());X=A;aa=k}));var ia=f.labelLinkClicked;f.labelLinkClicked=function(k,A,I){var T=A.getAttribute("href");if(null==T||!f.isCustomLink(T)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))ia.apply(this,+arguments);else{if(!f.isEnabled()||null!=k&&f.isCellLocked(k.cell))f.customLinkClicked(T),f.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=function(){var k=c.defaultFilename,A=c.getCurrentFile();null!=A&&(k=null!=A.getTitle()?A.getTitle():k);return k};var la=this.actions.get("print");la.setEnabled(!mxClient.IS_IOS||!navigator.standalone);la.visible=la.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,+!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",+!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&f.addListener(mxEvent.ESCAPE,function(k,A){null!=A&&f.isEnabled()&&!f.isEditing()&&null!=A.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));+this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(k){var A=f.cellEditor.text2,I=null;null!=A&&(mxEvent.addListener(A,"dragleave",function(T){null!=I&&(I.parentNode.removeChild(I),I=null);T.stopPropagation();T.preventDefault()}),mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(T){null==I&&(!mxClient.IS_IE||10<document.documentMode)&&(I=this.highlightElement(A));T.stopPropagation();T.preventDefault()})),mxEvent.addListener(A,+"drop",mxUtils.bind(this,function(T){null!=I&&(I.parentNode.removeChild(I),I=null);if(0<T.dataTransfer.files.length)this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,function(U,V,ba,fa,pa,sa){f.insertImage(U,pa,sa)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var V=0;V<U.length;V++)U[V]()},mxEvent.isControlDown(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var O=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?+this.loadImage(decodeURIComponent(O),mxUtils.bind(this,function(U){var V=Math.max(1,U.width);U=Math.max(1,U.height);var ba=this.maxImageSize;ba=Math.min(1,Math.min(ba/Math.max(1,V)),ba/Math.max(1,U));f.insertImage(decodeURIComponent(O),V*ba,U*ba)})):document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(T.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(T.dataTransfer.types,"text/plain")&&+document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"));T.stopPropagation();T.preventDefault()})))}));if(Editor.isSettingsEnabled()){la=this.editor.graph.view;var Y=mxSettings.getUnit();la.setUnit(Y);Editor.pageSizeUnit=Y==mxConstants.METERS?mxConstants.MILLIMETERS:Y;la.addListener("unitChanged",function(k,A){k=A.getProperty("unit");mxSettings.setUnit(k);mxSettings.save();Editor.pageSizeUnit=k==mxConstants.METERS?mxConstants.MILLIMETERS:k});this.ruler=!this.canvasSupported||9==+document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,la.unit);this.refresh()}if("1"==urlParams.styledev){la=document.getElementById("geFooter");null!=la&&(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)})),la.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(k,A){0<this.editor.graph.getSelectionCount()?(k=this.editor.graph.getSelectionCell(),k=this.editor.graph.getModel().getStyle(k),this.styleInput.value=k||"",this.styleInput.style.visibility=+"visible"):this.styleInput.style.visibility="hidden"})));var ma=this.isSelectionAllowed;this.isSelectionAllowed=function(k){return mxEvent.getSource(k)==this.styleInput?!0:ma.apply(this,arguments)}}la=document.getElementById("geInfo");null!=la&&la.parentNode.removeChild(la);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var Z=null;mxEvent.addListener(f.container,"dragleave",function(k){f.isEnabled()&&(null!=Z&&(Z.parentNode.removeChild(Z),Z=null),k.stopPropagation(),k.preventDefault())});+mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(k){null==Z&&(!mxClient.IS_IE||10<document.documentMode)&&(Z=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();k.stopPropagation();k.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(k){null!=Z&&(Z.parentNode.removeChild(Z),Z=null);if(f.isEnabled()){var A=mxUtils.convertPoint(f.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),I=k.dataTransfer.files,T=f.view.translate,+O=f.view.scale,U=A.x/O-T.x,V=A.y/O-T.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(k)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(k)&&(V=U=null),this.importFiles(I,U,V,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(k),null,null,mxEvent.isShiftDown(k),k));else{mxEvent.isAltDown(k)&&(V=U=0);var ba=0<=mxUtils.indexOf(k.dataTransfer.types,"text/uri-list")?k.dataTransfer.getData("text/uri-list"):+null;A=this.extractGraphModelFromEvent(k,null!=this.pages);if(null!=A)f.setSelectionCells(this.importXml(A,U,V,!0));else if(0<=mxUtils.indexOf(k.dataTransfer.types,"text/html")){var fa=k.dataTransfer.getData("text/html");A=document.createElement("div");A.innerHTML=Graph.sanitizeHtml(fa);var pa=null;I=A.getElementsByTagName("img");null!=I&&1==I.length?(fa=I[0].getAttribute("src"),null==fa&&(fa=I[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(fa)||(pa=!0)):(I=A.getElementsByTagName("a"),+null!=I&&1==I.length?fa=I[0].getAttribute("href"):(A=A.getElementsByTagName("pre"),null!=A&&1==A.length&&(fa=mxUtils.getTextContent(A[0]))));var sa=!0,qa=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(fa,U,V,!0,pa,null,sa,mxEvent.isControlDown(k)))});pa&&null!=fa&&fa.length>this.resampleThreshold?this.confirmImageResize(function(wa){sa=wa;qa()},mxEvent.isControlDown(k)):qa()}else null!=ba&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ba)?this.loadImage(decodeURIComponent(ba),mxUtils.bind(this,+function(wa){var Aa=Math.max(1,wa.width);wa=Math.max(1,wa.height);var za=this.maxImageSize;za=Math.min(1,Math.min(za/Math.max(1,Aa)),za/Math.max(1,wa));f.setSelectionCell(f.insertVertex(null,null,"",U,V,Aa*za,wa*za,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ba+";"))}),mxUtils.bind(this,function(wa){f.setSelectionCells(this.insertTextAt(ba,U,V,!0))})):0<=mxUtils.indexOf(k.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(k.dataTransfer.getData("text/plain"),+U,V,!0))}}k.stopPropagation();k.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));+c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var k=parseInt(this.div.offsetLeft),A=parseInt(this.div.offsetWidth),I=c.embedViewport.x+c.embedViewport.width,T=parseInt(this.div.offsetTop),O=parseInt(this.div.offsetHeight),U=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(k,I-A))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(T,U-O))+"px";this.div.style.height=Math.min(c.embedViewport.height,+parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(la=Editor.currentTheme,"simple"==la||"sketch"==la)Editor.currentTheme="",this.doSetCurrentTheme(la,mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);+this.fireEvent(new mxEventObject("themeInitialized"))}),!0);la=!1;null!=urlParams.dark?la=urlParams.dark:(la="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||la&&"auto"!=mxSettings.settings.darkMode||(la=mxSettings.settings.darkMode));"auto"==la&&this.isAutoDarkModeSupported()&&(la=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof la?"1"==la:la);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",+mxUtils.bind(this,function(k){this.isAutoDarkMode()&&this.setDarkMode(k.matches)}))}catch(k){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(k,A){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));+f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts()};var B=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=f&&c<f?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):+null!=this.lastWindowWidth&&this.lastWindowWidth<f&&c>=f&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}B.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(J){mxEvent.getSource(J)==this.diagramContainer.parentNode&&(this.embedExitPoint=+new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var z=document.createElement("div");z.style.position="absolute";z.style.width="10px";z.style.height="10px";z.style.borderRadius="5px";z.style.border="1px solid gray";z.style.background="#ffffff";z.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(z);this.bottomResizer=z;var C=null,F=null,N=null,K=null;mxEvent.addGestureListeners(z,mxUtils.bind(this,function(J){K=+parseInt(this.diagramContainer.style.height);F=mxEvent.getClientY(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));z=z.cloneNode(!1);z.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(z);this.rightResizer=z;mxEvent.addGestureListeners(z,mxUtils.bind(this,function(J){N=parseInt(this.diagramContainer.style.width);C=mxEvent.getClientX(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(J){var da=+!1;null!=C&&(this.diagramContainer.style.width=Math.max(20,N+mxEvent.getClientX(J)-C)+"px",da=!0);null!=F&&(this.diagramContainer.style.height=Math.max(20,K+mxEvent.getClientY(J)-F)+"px",da=!0);da&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(J){null==C&&null==F||mxEvent.consume(J);F=C=null});document.body.style.backgroundColor=+"transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(J){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(J){this.diagramContainer.style.width="10px";this.diagramContainer.style.height=+"10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var l=f.clipboardData||+f.originalEvent.clipboardData,t=!1,z=0;z<l.types.length;z++)if("text/"===l.types[z].substring(0,5)){t=!0;break}if(!t){var C=l.items;for(index in C){var F=C[index];if("file"===F.kind){if(c.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,function(K,J,da,ea,ca,X){c.insertImage(K,ca,X)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var J=0;J<K.length;J++)K[J]()});else{var N=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],N.x,N.y,+this.maxImageSize);mxEvent.consume(f)}break}}}}catch(K){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML=" ";l.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily=+"monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize="none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=!0;l.innerHTML=" ";var t=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,+null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(C){var F=mxEvent.getSource(C);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||"true"==F.contentEditable||224!=C.keyCode&&(mxClient.IS_MAC||17!=C.keyCode)&&(!mxClient.IS_MAC||91!=C.keyCode&&93!=C.keyCode)||t||(l.style.left=f.container.scrollLeft+10+"px",l.style.top=f.container.scrollTop+10+"px",C=f.container.scrollLeft,F=f.container.scrollTop,f.container.appendChild(l),+t=!0,l.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=C,f.container.scrollTop=F)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(C){var F=C.keyCode;window.setTimeout(mxUtils.bind(this,function(){!t||224!=F&&17!=F&&91!=F&&93!=F||(t=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),+this.copyCells(l),c()}catch(F){this.handleError(F)}}));mxEvent.addListener(l,"cut",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(l,!0),c()}catch(F){this.handleError(F)}}));mxEvent.addListener(l,"paste",mxUtils.bind(this,function(C){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(l.innerHTML=" ",l.focus(),null!=C.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(C,l,!0,!0)),!mxEvent.isConsumed(C)){var F=f.container.scrollLeft,+N=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=F,f.container.scrollTop=N,Graph.removePasteFormatting(l.firstChild),this.pasteCells(C,l,!1,!0)}catch(K){this.handleError(K)}}),0)}}catch(K){this.handleError(K)}}),!0);var z=this.isSelectionAllowed;this.isSelectionAllowed=function(C){return mxEvent.getSource(C)==l?!0:z.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,f){mxSettings.setUi(c);(f=this.doSetCurrentTheme(c)||f)||this.alert(mxResources.get("restartForChangeRequired"))};+EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,f,l){function t(N){return"simple"==N||"sketch"==N}var z=Editor.currentTheme,C="simple"==z&&this.isDefaultTheme(c)||this.isDefaultTheme(z)&&"simple"==c;if((C||l)&&!this.themeSwitching){var F=this.saveScrollState();this.editor.graph.stopEditing(!1);this.container.style.opacity=0;Editor.currentTheme=c;this.themeSwitching=!0;window.setTimeout(mxUtils.bind(this,+function(){t(z)&&this.isDefaultTheme(c)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="",this.tabContainer.style.display="",this.hsplit.style.display="block",this.menubarHeight=App.prototype.menubarHeight):this.isDefaultTheme(z)&&t(c)&&(this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.menubarHeight=0,"simple"!=c?(this.tabContainer.style.display="none",this.hsplit.style.display="none",this.hsplitPosition=0):this.tabContainer.style.display=+"");this.switchTheme(c);this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();this.restoreScrollState(F);this.container.style.opacity="";delete this.themeSwitching;isLocalStorage&&t(c)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:!0);null!=f&&f()}),0)}return C};EditorUi.prototype.saveScrollState=function(){var c=this.editor.graph.view.translate,f=this.diagramContainer.scrollLeft,+l=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(f-=this.embedViewport.x,l-=this.embedViewport.y):(f+=this.embedViewport.x,l+=this.embedViewport.y));return{x:f,y:l,tx:c.x,ty:c.y}};EditorUi.prototype.restoreScrollState=function(c){var f=this.editor.graph.view.scale,l=this.editor.graph.view.translate;this.diagramContainer.scrollLeft=c.x+(l.x-c.tx)*f;this.diagramContainer.scrollTop=c.y+(l.y-c.ty)*f};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?+c:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var t=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?+this.statusContainer.firstChild:null;f=null!=t&&null!=t.getAttribute("class");if(!f&&null!=t){t=t.getAttribute("title");var z=this.getCurrentFile();z=null!=z?z.savingStatusKey:DrawioFile.prototype.savingStatusKey;t==mxResources.get(z)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(z))+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";t=32>=c.clientWidth;c.style.visibility=t&&""==this.editor.getStatus()?"hidden":+"";if(t||f)this.statusContainer.style.display="inline-flex",f=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(c){this.isDefaultTheme(c)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex=+"1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(c);+this.switchCssForTheme(c);this.createWrapperForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);this.sidebarContainer.style.display="";if("sketch"==c){this.createFormatWindow();this.formatContainer.style.left="0px";this.formatContainer.style.top="0px";this.formatContainer.style.width="";this.formatContainer.style.zIndex="";this.formatContainer.style.border="none";var f=Editor.enableCustomLibraries&&("1"!=urlParams.embed||+"1"==urlParams.libraries);this.createShapesWindow();this.sidebarContainer.className="";this.sidebarContainer.style.position="absolute";this.sidebarContainer.style.left="0px";this.sidebarContainer.style.top="0px";this.sidebarContainer.style.bottom=f?"32px":"0px";this.sidebarContainer.style.width="100%"}null!=this.format&&(c=this.isDefaultTheme(c)||"atlas"==c,this.format.showCloseButton!=c&&(this.format.showCloseButton=c,this.format.refresh()))};EditorUi.prototype.getWindows=function(){var c=[this.sidebarWindow,+this.formatWindow,this.freehandWindow];null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(c=c.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.fit()};EditorUi.prototype.hideWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.setVisible(!1)};+EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=+this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=+function(c){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);if("simple"==c||"sketch"==c){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||null==Editor.config.defaultEdgeLength)f.defaultEdgeLength=120;null==urlParams.grid&&(f.defaultGridEnabled=!1);null==urlParams.pv&&+(f.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.switchCssForTheme=function(c){};EditorUi.prototype.createWrapperForTheme=function(c){null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=function(c){};EditorUi.prototype.isPageMenuVisible=function(){return null!=+this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.createFooterMenuForTheme=function(c){};EditorUi.prototype.createPickerMenuForTheme=function(c){};EditorUi.prototype.getNetworkStatus=function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var f=this.getCurrentFile();null!=f&&(f.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==f.sync||f.sync.enabled&&f.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?+null==f.sync||f.sync.isConnected()?f.isRealtimeEnabled()&&f.isRealtimeSupported()&&1<f.getRealtimeState()&&(c=f.getRealtimeError(),c=mxResources.get("realtimeCollaboration")+": "+(null!=c&&null!=c.message?c.message:mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink=+"",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity="",this.menubar.container.appendChild(this.statusContainer));null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);c=this.menubar.langIcon;null!=c&&(c.style.position="absolute",c.style.height="18px",c.style.width="18px",c.style.flexShrink="",c.style.opacity="",this.menubarContainer.parentNode.insertBefore(c,this.menubarContainer));+null!=this.buttonContainer&&(this.buttonContainer.style.display="",this.buttonContainer.style.padding="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(c,f,l,t){l=null!=l?l:"geToolbarButton";var z=this.menus.get(c);t=this.menubar.addMenu(mxResources.get(c),z.funct,null,t);t.className=l;t.style.display="inline-block";t.style.cursor="pointer";t.style.height="24px";t.setAttribute("title",mxResources.get(c));this.menus.menuCreated(z,t,l);null!=f&&(t.style.backgroundImage=+"url("+f+")",t.style.backgroundPosition="center center",t.style.backgroundRepeat="no-repeat",t.style.backgroundSize="100% 100%",t.style.width="24px",t.innerText="");return t};EditorUi.prototype.createToolbarButton=function(c,f,l,t){t=null!=t?t:24;var z=document.createElement("a");z.className="geToolbarButton geAdaptiveAsset";z.setAttribute("title",f);z.style.backgroundImage="url("+c+")";z.style.backgroundPosition="center center";z.style.backgroundRepeat="no-repeat";z.style.backgroundSize="100% 100%";+z.style.display="inline-block";z.style.cursor="pointer";z.style.marginLeft="6px";z.style.width=t+"px";z.style.height=t+"px";z.style.flexShrink="0";z.style.flexGrow="0";null!=l&&(mxEvent.addListener(z,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()})),mxEvent.addListener(z,"click",function(C){"disabled"!=z.getAttribute("disabled")&&l(C);mxEvent.consume(C)}));return z};EditorUi.prototype.createMenuItem=function(c,f,l){var t=this.actions.get(c),z=null!=+t?t.funct:null,C=this.createToolbarButton(f,mxResources.get(c)+(null!=t&&null!=t.shortcut?" ("+t.shortcut+")":""),z);null==t||l||(c=function(){t.isEnabled()?(C.removeAttribute("disabled"),C.style.cursor="pointer"):(C.setAttribute("disabled","disabled"),C.style.cursor="default");C.style.opacity=t.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",c),t.addListener("stateChanged",c),c());return C};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=Math.max(10,+this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,60,240,f,mxUtils.bind(this,function(z){z.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var l=this.formatWindow.window.toggleMinimized,t=240;this.formatWindow.window.toggleMinimized=+function(){l.apply(this,arguments);this.minimized?(t=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+t-140+"px"):(this.div.style.width=t+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-t+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(z){mxEvent.getSource(z)==this.formatWindow.window.title&&+this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?(c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,(1200>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||708>c)&&this.formatWindow.window.toggleMinimized()):this.formatWindow.window.setVisible(!1)}};var H=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var f=+this.formatWindow;null!=f?f.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):H.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){if(this.isShapesPanelVisible()!=c){var f=EditorUi.prototype.hsplitPosition;0==f&&(f=this.defaultSidebarWidth);var l=this.hsplitPosition,t=mxUtils.bind(this,function(){this.hsplitPosition=z;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),z=c?f:0;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==z?"translateX(0)":+"translateX(-100%)");0!=z&&t();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==z?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform 0.3s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,+"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==z&&t()}),300)}),10)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var S=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():S.apply(this,arguments)};var G=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){c=+null!=c?c:!0;if("1"!=urlParams.embedInline){var f=this.container.clientWidth;this.container==document.body&&(f=document.body.clientWidth||document.documentElement.clientWidth);var l=this.getDiagramContainerOffset();var t=l.x;var z=l.y;"simple"==Editor.currentTheme&&(z+=this.sketchMainMenuElt.offsetHeight);this.diagramContainer.style.top=z+"px";this.diagramContainer.style.bottom="0";"simple"==Editor.currentTheme?(this.hsplit.style.top=this.sketchMainMenuElt.offsetHeight+"px",this.sidebarContainer.style.top=+this.hsplit.style.top,this.formatContainer.style.top=this.hsplit.style.top,f=Math.max(0,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.formatWidth,Math.min(this.hsplitPosition,f-this.splitSize-40))),this.sidebarContainer.style.width=f+"px",this.diagramContainer.style.left=f+t+"px",this.tabContainer.style.left=f+"px",this.tabContainer.style.right=this.formatWidth+1+"px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",+this.hsplit.style.left=f+"px",this.diagramContainer.style.right=this.formatWidth+"px",this.formatContainer.style.width=this.formatWidth+"px",this.hsplit.style.bottom=this.tabContainer.offsetHeight+"px",this.diagramContainer.style.bottom=this.hsplit.style.bottom,this.checkTabScrollerOverflow()):(this.diagramContainer.style.left=l.x+"px",this.diagramContainer.style.right="0")}c&&this.editor.graph.sizeDidChange()}else G.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var f=mxUtils.bind(this,+function(t){t=this.createMenu(t,null,"geTitle");t.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";c.appendChild(t);return t});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))f=document.createElement("div"),f.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;",+f.className="geTitle",mxUtils.write(f,mxResources.get("newLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("newLibrary").funct),f=f.cloneNode(!1),f.style.left="50%",f.style.borderLeftStyle="solid",mxUtils.write(f,mxResources.get("openLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("openLibrary").funct);else{var l=f("newLibrary");l.style.fontSize="11px";l.style.left="0";l=f("openLibraryFrom");l.style.borderLeftStyle="solid";l.style.fontSize="11px";+l.style.left="50%"}c.appendChild(this.sidebarContainer);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),l="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),l&&"1"!=urlParams.embedInline?66:10,l&&"1"!=urlParams.embedInline?+Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,c-6,f-6,mxUtils.bind(this,function(t){this.createShapesPanel(t)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(c){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,+function(){this.spinner.stop();this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setAndPersistDarkMode=function(c){var f=c;"auto"==c&&(f=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(f);mxSettings.settings.darkMode=c;mxSettings.save();c=mxSettings.getUi();null==urlParams.ui&&"dark"==c&&this.setCurrentTheme("kennedy",!0)};+EditorUi.prototype.setAndPersistLanguage=function(c){mxSettings.setLanguage(c);mxSettings.save();mxClient.language=c;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE)};EditorUi.prototype.setAndPersistHighContrast=function(c){this.setHighContrast(c);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=c,mxSettings.save())};EditorUi.prototype.isHighContrast=function(){var c=document.getElementById("high-contrast-stylesheet");return null!=c&&window.matchMedia?(c=c.getAttribute("media"),+"all"==c||"not all"!=c&&window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(c){var f=document.getElementById("high-contrast-stylesheet");if(null!=f&&window.matchMedia){var l=window.matchMedia("(forced-colors: active)").matches,t=f.getAttribute("media");(t="all"==t||"not all"!=t&&l)&&!c?f.setAttribute("media",l?"not all":"(forced-colors: active)"):!t&&c&&f.setAttribute("media",l?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=+this.ruler};EditorUi.prototype.setRulerVisible=function(c){var f=this.getDiagramContainerOffset();mxSettings.setRulerOn(c);mxSettings.save();c||null==this.ruler?c&&null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.refresh();this.fireEvent(new mxEventObject("rulerVisibleChanged"));c=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=c.x-f.x;this.diagramContainer.scrollTop+=c.x-f.x};EditorUi.prototype.isAutoDarkModeSupported=+function(){return null!=window.matchMedia};EditorUi.prototype.isAutoDarkMode=function(c){return!c&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=function(c){Editor.darkMode=c;c=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container;mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff";null!=c&&(Editor.isDarkMode()?(c.classList.add("geDarkMode"),c.style.colorScheme=+"dark"):(c.classList.remove("geDarkMode"),c.style.colorScheme="light"));null!=this.ruler&&this.ruler.updateStyle();this.fireEvent(new mxEventObject("darkModeChanged"))};EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,f){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,this.sidebar.refresh(),+Editor.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=+function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",l.style.left="10px",l.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),+this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var z=this.diagramContainer.getAttribute("data-bounds");if(null!=z){this.diagramContainer.removeAttribute("data-bounds");t.getGraphBounds();var C=z.split(" ");t=mxUtils.getDocumentSize();this.diagramContainer.style.top=C[0];this.diagramContainer.style.left=C[1];+z=parseInt(C[2]);C=parseInt(C[3]);z=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,z):z,t.width-80);C=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,C):C,t.height-80);this.diagramContainer.style.width=z+"px";this.diagramContainer.style.height=C+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}f.style.left=+this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=f.style.top;c.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/+2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=+this.bottomResizer.style.visibility;f.style.visibility="";c.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(c){Editor.sketchMode!=c&&(Editor.sketchMode=c,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);c.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==+Editor.currentTheme||"1"==urlParams.embedInline?(c.vertexFontSize=16,c.edgeFontSize=c.vertexFontSize-4):"sketch"==Editor.currentTheme?(c.vertexFontSize=20,c.edgeFontSize=c.vertexFontSize-4):(c.vertexFontSize=Graph.prototype.vertexFontSize,c.edgeFontSize=Graph.prototype.edgeFontSize),c.defaultEdgeStyle.fontSize=c.edgeFontSize;if(null==Editor.config||null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved=+"1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.endSize="8",c.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize="auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize="14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==+Editor.config||null==Editor.config.defaultFonts){if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline||Editor.sketchMode)c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(c.defaultVertexStyle.sketch="1",+c.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultVertexStyle.hachureGap="4",c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}c.currentVertexStyle=+mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var l=c.indexOf(",");0<l&&(f=this.getPageById(c.substring(l+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(f=this.getCustomLinkTitle(c));return f};EditorUi.prototype.getCustomLinkTitle=function(c){var f=mxResources.get("action");+if("data:action/json,"==c.substring(0,17))try{var l=JSON.parse(c.substring(17));null!=l&&null!=l.title&&(f=l.title)}catch(t){}return f};EditorUi.prototype.handleCustomLink=function(c,f){if(Graph.isPageLink(c))if(f=c.indexOf(","),c=this.getPageById(c.substring(f+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(c,f)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var c=this.editor.graph;Editor.pagesVisible=+mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(f){f.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",+mxUtils.bind(this,function(f,l){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(f,l){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",+mxUtils.bind(this,function(f,l){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=mxSettings.getGridColor(!1);c.view.gridColor="light-dark("+c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(f,l){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||+EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(f,l){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(f,l){mxSettings.settings.enableAnimations=Editor.enableAnimations;+mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);+mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,f,l){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(t,z){try{this.spinner.stop();var C=this.createImageDataUri(t,f,"png"),F=parseInt(z.getAttribute("width")),N=parseInt(z.getAttribute("height"));this.writeImageToClipboard(C,F,N,mxUtils.bind(this,function(K){this.handleError(K)}))}catch(K){this.handleError(K)}}),+null,null,null,mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)}),null,null,null!=l?l:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(t){this.handleError(t)}};EditorUi.prototype.copyCells=function(c,f){var l=this.editor.graph;if(l.isSelectionEmpty())c.innerText="";else{var t=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),z=mxUtils.getXml(l.encodeCells(t));mxUtils.setTextContent(c,+encodeURIComponent(z));f?(l.removeCells(t,!1),l.lastPasteXml=null):(l.lastPasteXml=z,l.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(c)),navigator.clipboard.writeText(f))}return c};EditorUi.prototype.pasteXml=function(c,f,l,t,z){z=+null!=z?z:!0;var C=this.editor.graph,F=null;C.lastPasteXml==c?C.pasteCounter++:(C.lastPasteXml=c,C.pasteCounter=0);var N=C.pasteCounter*C.gridSize;if(l||this.isCompatibleString(c))F=this.importXml(c,N,N),C.setSelectionCells(F);else if(f&&1==C.getSelectionCount()){z=C.getStartEditingCell(C.getSelectionCell(),t);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==C.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE])C.setCellStyles(mxConstants.STYLE_IMAGE,c,[z]);else{C.model.beginUpdate();try{C.labelChanged(z,+c),Graph.isLink(c)&&C.setLinkForCell(z,c)}finally{C.model.endUpdate()}}C.setSelectionCell(z)}else F=C.getInsertPoint(),C.isMouseInsertPoint()&&(N=0,C.lastPasteXml==c&&0<C.pasteCounter&&C.pasteCounter--),F=this.insertTextAt(c,F.x+N,F.y+N,z),C.setSelectionCells(F);C.isSelectionEmpty()||(C.scrollCellToVisible(C.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(C.view.getState(C.getSelectionCell())));return F};EditorUi.prototype.pasteCells=function(c,f,l,t){if(!mxEvent.isConsumed(c)){var z=+f,C=!1;if(l&&null!=c.clipboardData&&c.clipboardData.getData){var F=c.clipboardData.getData("text/plain"),N=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var K=decodeURIComponent(F);this.isCompatibleString(K)&&(N=!0,F=K)}catch(aa){}N=N?null:c.clipboardData.getData("text/html");null!=N&&0<N.length?(z=this.parseHtmlData(N),C="text/plain"!=z.getAttribute("data-type")):null!=F&&0<F.length&&(z=document.createElement("div"),mxUtils.setTextContent(z,N))}F=z.getElementsByTagName("span");+if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))l=F[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(aa){var ia=this.editor.graph;ia.lastPasteXml==aa?ia.pasteCounter++:(ia.lastPasteXml=aa,ia.pasteCounter=0);var la=ia.pasteCounter*ia.gridSize;ia.setSelectionCells(this.importXml(aa,la,la));ia.scrollCellToVisible(ia.getSelectionCell())}),mxUtils.bind(this,function(aa){this.handleError(aa)})),+mxEvent.consume(c));else{var J=!1,da="";da=C?null!=z.textContent&&"<mxfile"==z.textContent.substring(0,7)&&"</mxfile>"==z.textContent.substring(z.textContent.length-9)||"<mxGraphModel"==z.textContent.substring(0,13)&&"</mxGraphModel>"==z.textContent.substring(z.textContent.length-15)?z.textContent.replace(/\u00a0/g," "):z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText);try{var ea=da.lastIndexOf("%3E");0<=ea&&ea<da.length-3&&(da=da.substring(0,ea+3))}catch(aa){}try{F=+z.getElementsByTagName("span"),(K=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(da))&&(this.isCompatibleString(K)||0==K.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(J=!0,da=K)}catch(aa){}try{if(null!=da&&0<da.length){if(0==da.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ca=mxUtils.bind(this,function(){try{da=(new MiroImporter).importMiroJson(JSON.parse(da)),this.pasteXml(da,t,J,c)}catch(aa){console.log("Miro import error:",+aa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ca):ca()}else this.pasteXml(da,t,J,c,C);try{mxEvent.consume(c)}catch(aa){}}else if(!l){var X=this.editor.graph;X.lastPasteXml=null;X.pasteCounter=0}}catch(aa){this.handleError(aa)}}}f.innerHTML=" "};EditorUi.prototype.showPrintDialog=function(c,f,l){var t=320;this.editor.graph.isEnabled()&&(t+=40);null!=this.pages&&1<this.pages.length&&(t+=40,this.editor.graph.isEnabled()||(t+=10));null==f||mxClient.IS_CHROMEAPP||+"draw.io"!=this.getServiceName()||(t+=20);this.showDialog((new PrintDialog(this,c,f,l)).container,320,t,!0,!0)};EditorUi.prototype.print=function(c,f){var l=this.editor,t=l.graph,z=this.getPageIndex(this.currentPage),C=null!=z?z+1:1,F=mxUtils.bind(this,function(la,Y,ma,Z){var k=la.useCssTransforms,A=la.currentTranslate,I=la.currentScale,T=la.view.translate,O=la.view.scale;la.useCssTransforms&&(la.useCssTransforms=!1,la.currentTranslate=new mxPoint(0,0),la.currentScale=1,la.view.translate=new mxPoint(0,+0),la.view.scale=1);var U=la.getGraphBounds(),V=0,ba=0,fa=mxRectangle.fromRectangle(la.pageFormat),pa=f.fit||f.crop||!la.pageVisible,sa=f.scale;fa.width=Math.ceil(fa.width*la.pageScale);fa.height=Math.ceil(fa.height*la.pageScale);var qa=1;if(f.fit){qa=f.sheetsAcross;var wa=f.sheetsDown;isNaN(sa)||(fa.width=Math.ceil(fa.width*sa),fa.height=Math.ceil(fa.height*sa));qa=Math.min(fa.height*wa/(U.height/la.view.scale),fa.width*qa/(U.width/la.view.scale))}else qa=isNaN(sa)?1:sa;qa*=1;!pa&&la.pageVisible?+(sa=la.getPageLayout(),V-=sa.x*fa.width,ba-=sa.y*fa.height):pa=!0;f.crop&&(f.selection&&(U=t.getBoundingBox(t.getSelectionCells())),fa.width=(U.width+1)*qa/la.view.scale,fa.height=(U.height+1)*qa/la.view.scale);fa.width=Math.ceil(1*fa.width);fa.height=Math.ceil(1*fa.height);Z=null!=Z?"page/id,"+Z:null;if(null==Y){Y=PrintDialog.createPrintPreview(la,qa,null,0,V,ba,pa);Y.title=this.getBaseFilename(!0);Y.pageSelector=!1;Y.mathEnabled=!1;V=f.border;isNaN(V)||(Y.pageMargin=V);f.selection&&(Y.isCellVisible=+function(ra){return la.isCellSelected(ra)});var Aa=Y.writeHead;Y.writeHead=function(ra){Aa.apply(this,arguments);mxClient.IS_GC&&(ra.writeln('<style type="text/css">'),ra.writeln("@media print {"),ra.writeln(".MathJax svg { shape-rendering: crispEdges; }"),ra.writeln("}"),ra.writeln("</style>"));null!=l.fontCss&&(ra.writeln('<style type="text/css">'),ra.writeln(mxUtils.htmlEntities(l.fontCss,!1,!1,!1)),ra.writeln("</style>"));for(var ya=la.getCustomFonts(),Ca=0;Ca<ya.length;Ca++){var Ka=ya[Ca].name,+Ha=ya[Ca].url;Graph.isCssFontUrl(Ha)?ra.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Ha))+'" charset="UTF-8" type="text/css">'):(ra.writeln('<style type="text/css">'),ra.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Ka)+'";\nsrc: url("'+mxUtils.htmlEntities(Ha)+'");\n}'),ra.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var za=Y.drawBackgroundImage;Y.drawBackgroundImage=function(ra){za.apply(this,arguments);null!=ra.node&&(EditorUi.embedSvgImages(ra.node),+t.disableSvgLinks(ra.node,function(ya){ya.setAttribute("href","javascript:void(0)")}))}}var Da=Y.addGraphFragment;Y.addGraphFragment=function(ra,ya,Ca,Ka,Ha,Ba){Da.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:Ha.classList.add("geDisableMathJax")};f.grid&&(Y.gridSize=la.gridSize,Y.gridSteps=la.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:la.view.gridColor);Y.open(null,null,ma,!0,Z,fa,f.selection?la.getSelectionCells():null)}else{U=+la.background;if(null==U||""==U||U==mxConstants.NONE)U="#ffffff";Y.backgroundColor=U;Y.autoOrigin=pa;f.grid&&(Y.gridSize=la.gridSize,Y.gridSteps=la.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:la.view.gridColor);Y.appendGraph(la,qa,V,ba,ma,!0,Z,fa,f.selection?la.getSelectionCells():null);ma=la.getCustomFonts();if(null!=Y.wnd)for(fa=0;fa<ma.length;fa++)V=ma[fa].name,ba=ma[fa].url,Graph.isCssFontUrl(ba)?Y.wnd.document.writeln('<link rel="stylesheet" href="'++mxUtils.htmlEntities(ba)+'" charset="UTF-8" type="text/css">'):(Y.wnd.document.writeln('<style type="text/css">'),Y.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(V)+'";\nsrc: url("'+mxUtils.htmlEntities(ba)+'");\n}'),Y.wnd.document.writeln("</style>"))}k&&(la.useCssTransforms=k,la.currentTranslate=A,la.currentScale=I,la.view.translate=T,la.view.scale=O);return Y}),N=f.pagesFrom,K=f.pagesTo,J=!f.allPages;z=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);+else{J&&(J=f.selection||N==C&&K==C);if(!J&&null!=this.pages&&this.pages.length){J=0;C=this.pages.length-1;f.allPages||(J=parseInt(N)-1,C=parseInt(K)-1);for(var da=J;da<=C;da++){var ea=this.pages[da];N=ea==this.currentPage?t:null;if(null==N){N=this.createTemporaryGraph(t.stylesheet);N.shapeForegroundColor=t.shapeForegroundColor;N.shapeBackgroundColor=t.shapeBackgroundColor;K=!0;J=!1;var ca=null,X=null;null==ea.viewState&&null==ea.root&&this.updatePageRoot(ea);null!=ea.viewState&&(K=ea.viewState.pageVisible,+J=ea.viewState.mathEnabled,ca=ea.viewState.background,X=ea.viewState.backgroundImage,N.pageFormat=ea.viewState.pageFormat,N.gridSize=ea.viewState.gridSize);null!=X&&null!=X.originalSrc&&(X=this.createImageForPageLink(X.originalSrc,ea));N.background=ca;N.backgroundImage=null!=X?new mxImage(X.src,X.width,X.height,X.x,X.y):null;N.pageVisible=K;N.mathEnabled=J;var aa=N.getGraphBounds;N.getGraphBounds=function(){var la=aa.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var ma=+this.view.translate,Z=this.view.scale;la=mxRectangle.fromRectangle(la);la.add(new mxRectangle((ma.x+Y.x)*Z,(ma.y+Y.y)*Z,Y.width*Z,Y.height*Z))}return la};var ia=N.getGlobalVariable;N.getGlobalVariable=function(la){return"page"==la?ea.getName():"pagenumber"==la?da+1:"pagecount"==la?null!=this.pages?this.pages.length:1:ia.apply(this,arguments)};document.body.appendChild(N.container);this.updatePageRoot(ea);N.model.setRoot(ea.root)}z=F(N,z,da!=C,ea.getId());N!=t&&N.container.parentNode.removeChild(N.container)}}else z=+F(t);null==z||null==z.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(z.mathEnabled&&(F=z.wnd.document,c||(z.wnd.IMMEDIATE_PRINT=!0),F.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),z.closeDocument(),Graph.rewritePageLinks(z.wnd.document,!0),z.mathEnabled||c||PrintDialog.printPreview(z));return z}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,l=0;l<c.length;l++)mxEvent.addListener(c[l],"dragleave",function(t){null!=+f&&(f.parentNode.removeChild(f),f=null);t.stopPropagation();t.preventDefault()}),mxEvent.addListener(c[l],"dragover",mxUtils.bind(this,function(t){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());t.stopPropagation();t.preventDefault()})),mxEvent.addListener(c[l],"drop",mxUtils.bind(this,function(t){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<+t.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(t.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(t)&&!mxEvent.isShiftDown(t)):this.openFiles(t.dataTransfer.files,!0);else{var z=this.extractGraphModelFromEvent(t);if(null==z){var C=null!=t.dataTransfer?t.dataTransfer:t.clipboardData;null!=C&&(10==document.documentMode||11==document.documentMode?z=C.getData("Text"):(z=null,z=0<=mxUtils.indexOf(C.types,"text/uri-list")?t.dataTransfer.getData("text/uri-list"):+0<=mxUtils.indexOf(C.types,"text/html")?C.getData("text/html"):null,null!=z&&0<z.length?(C=document.createElement("div"),C.innerHTML=Graph.sanitizeHtml(z),C=C.getElementsByTagName("img"),0<C.length&&(z=C[0].getAttribute("src"))):0<=mxUtils.indexOf(C.types,"text/plain")&&(z=C.getData("text/plain"))),null!=z&&(Editor.isPngDataUrl(z)?(z=Editor.extractGraphModelFromPng(z),null!=z&&0<z.length&&this.openLocalFile(z,null,!0)):this.isRemoteFileFormat(z)?this.isOffline()?this.showError(mxResources.get("error"),+mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(z))).send(mxUtils.bind(this,function(F){200<=F.getStatus()&&299>=F.getStatus()?this.openLocalFile(F.getText(),null,!0):this.showError(mxResources.get("error"),413==F.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(z)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(z):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost++"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(z)))))}else this.openLocalFile(z,null,!0)}t.stopPropagation();t.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var f=0,l=0;if(null==c){var t=document.body;var z=document.documentElement;var C=(t.clientWidth||z.clientWidth)-3;t=Math.max(t.clientHeight||0,z.clientHeight)-3}else f=c.offsetTop,l=c.offsetLeft,C=c.clientWidth,t=c.clientHeight;z=document.createElement("div");z.style.zIndex=mxPopupMenu.prototype.zIndex++2;z.style.border="3px dotted rgb(254, 137, 12)";z.style.pointerEvents="none";z.style.position="absolute";z.style.top=f+"px";z.style.left=l+"px";z.style.width=Math.max(0,C-3)+"px";z.style.height=Math.max(0,t-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(z):document.body.appendChild(z);return z};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var f=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=f){var l=new mxCodec(f.ownerDocument),+t=new mxGraphModel;l.decode(f,t);f=t.getChildAt(t.getRoot(),0);for(l=0;l<t.getChildCount(f);l++)c.push(t.getChildAt(f,l))}return c};EditorUi.prototype.openFileHandle=function(c,f,l,t,z,C){if(null!=f&&0<f.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(f)||/(\.pdf)$/i.test(f))f=f.substring(0,f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var F=mxUtils.bind(this,function(K){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==K.substring(0,10)){null==+this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,K,f)),this.showSidebar()}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(K,f,t)});if(EditorUi.isVisioFilename(f))this.importVisio(l,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}));else if(Graph.fileSupport&&+(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(K){4==K.readyState&&(this.spinner.stop(),200<=K.status&&299>=K.status?F(K.responseText):this.handleError({message:mxResources.get(413==K.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(f)&&(f=f.substring(0,+f.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(K){this.spinner.stop();this.openLocalFile(K,f,t)}),mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,c,l.name)),this.showSidebar()}catch(K){this.handleError(K,mxResources.get("errorLoadingFile"))}}else if(0==+c.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,f,t)}));else{if("image/png"==l.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==l.type){var N=Editor.extractGraphModelFromPdf(c);null!=N&&(z=null,t=!0,c=N)}this.spinner.stop();this.openLocalFile(c,f,t,z,null!=z?l:null,C)}}};EditorUi.prototype.openFiles=function(c,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=+0;l<c.length;l++)mxUtils.bind(this,function(t){var z=new FileReader;z.onload=mxUtils.bind(this,function(C){try{this.openFileHandle(C.target.result,t.name,t,f)}catch(F){this.handleError(F)}});z.onerror=mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C);window.openFile=null});"image"!==t.type.substring(0,5)&&"application/pdf"!==t.type||"image/svg"===t.type.substring(0,9)?z.readAsText(t):z.readAsDataURL(t)})(c[l])};EditorUi.prototype.openLocalFile=function(c,f,l,t,z,C){var F=this.getCurrentFile(),+N=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var K=mxUtils.parseXml(c);null!=K&&(this.editor.setGraphXml(K.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,f||this.defaultFilename,l,t,z,C))});if(null!=c&&0<c.length)null==F||!F.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)?N():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)&&null!=F&&F.isModified()?this.confirm(mxResources.get("allChangesLost"),+null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,f),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=F&&F.isModified()?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):N()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var f=+0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);f=[];for(var l in c)f.push(l);return f};EditorUi.prototype.addBasenamesForCell=function(c,f){function l(F){if(null!=F){var N=F.lastIndexOf(".");0<N&&(F=F.substring(N+1,F.length));null==f[F]&&(f[F]=!0)}}var t=this.editor.graph,z=t.getCellStyle(c);l(mxStencilRegistry.getBasenameForStencil(z[mxConstants.STYLE_SHAPE]));t.model.isEdge(c)&&+(l(mxMarker.getPackageForType(z[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(z[mxConstants.STYLE_ENDARROW])));z=t.model.getChildCount(c);for(var C=0;C<z;C++)this.addBasenamesForCell(t.model.getChildAt(c,C),f)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=c&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme?+"":"none";this.editor.graph.setEnabled(c);null!=this.tabContainer&&(this.tabContainer.style.visibility=c&&0<parseInt(this.tabContainer.style.height)?"":"hidden");null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=c?"":"hidden",this.ruler.vRuler.container.style.visibility=c?"":"hidden");c||this.hideWindows()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=+!1;this.installMessageHandler(mxUtils.bind(this,function(f,l,t,z){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(z)try{var C=this.editor.graph;C.setGridEnabled(!1);C.pageVisible=!1;var F=C.model.cells,N;for(N in F){var K=F[N];null!=K&&null!=K.style&&(K.style+=";sketch=1;"+(-1==K.style.indexOf("fontFamily=")||-1<K.style.indexOf("fontFamily=Helvetica;")?+"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(J){console.log(J)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=t?t:!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(c,f){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();f(l)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,+translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var l=window.opener||window.parent;if(this.editor.modified){var t=f.background;if(null==t||t==mxConstants.NONE)t=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,+null,null,!1),f,null,!0,mxUtils.bind(this,function(z){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(z)}),"*")}),null,null,!0,t,1,this.embedExportBorder,null,this.embedExportTheme)}else c||l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=+!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(z){c||this.handleError(z)}};EditorUi.prototype.installMessageHandler=function(c){var f=null,l=!1,t=!1,z=null,C=mxUtils.bind(this,function(K,J){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,C);mxEvent.addListener(window,"message",mxUtils.bind(this,+function(K){if(K.source==(window.opener||window.parent)){var J=K.data,da=null,ea=mxUtils.bind(this,function(ra){if(null!=ra&&"function"===typeof ra.charAt&&"<"!=ra.charAt(0))try{Editor.isPngDataUrl(ra)?ra=Editor.extractGraphModelFromPng(ra):"data:image/svg+xml;base64,"==ra.substring(0,26)?ra=atob(ra.substring(26)):"data:image/svg+xml;utf8,"==ra.substring(0,24)&&(ra=ra.substring(24)),null!=ra&&(""==ra.trim()?ra=null:"%"==ra.charAt(0)?ra=decodeURIComponent(ra):"<"!=ra.charAt(0)&&(ra=Graph.decompress(ra)))}catch(ya){}return ra});+if("json"==urlParams.proto){var ca=!1;try{J=JSON.parse(J),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[K],"data",[J])}catch(ra){J=null}try{if(null==J)return;if("dialog"==J.action){this.showError(null!=J.titleKey?mxResources.get(J.titleKey):J.title,null!=J.messageKey?mxResources.get(J.messageKey):mxUtils.htmlEntities(J.message),null!=J.buttonKey?mxResources.get(J.buttonKey):J.button);null!=J.modified&&(this.editor.modified=J.modified);return}if("layout"==J.action){this.executeLayouts(this.editor.graph.createLayouts(J.layouts));+return}if("prompt"==J.action){this.spinner.stop();var X=new FilenameDialog(this,J.defaultValue||"",null!=J.okKey?mxResources.get(J.okKey):J.ok,function(ra){null!=ra?F.postMessage(JSON.stringify({event:"prompt",value:ra,message:J}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")},null!=J.titleKey?mxResources.get(J.titleKey):J.title,null,null,null,null,function(){F.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")});this.showDialog(X.container,300,80,!0,!1);+X.init();return}if("draft"==J.action){var aa=ea(J.xml);this.spinner.stop();X=new DraftDialog(this,mxResources.get("draftFound",[J.name||this.defaultFilename]),aa,mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"edit",message:J}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"discard",message:J}),"*")}),J.editKey?mxResources.get(J.editKey):null,J.discardKey?mxResources.get(J.discardKey):null,+J.ignore?mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:J}),"*")}):null);this.showDialog(X.container,640,480,!0,!1,mxUtils.bind(this,function(ra){ra&&this.actions.get("exit").funct()}));try{X.init()}catch(ra){F.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:J}),"*")}return}if("template"==J.action){this.spinner.stop();var ia=1==J.enableRecent,la=1==J.enableSearch,Y=1==J.enableCustomTemp;X=new NewDialog(this,+!1,J.templatesOnly?!1:null!=J.callback,mxUtils.bind(this,function(ra,ya,Ca,Ka){ra=ra||this.emptyDiagramXml;null!=J.callback?F.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:ya,tempUrl:Ca,libs:Ka,builtIn:!0,message:J}),"*"):(c(ra,K,ra!=this.emptyDiagramXml,J.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ia?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,+"Network Error!")})}):null,la?mxUtils.bind(this,function(ra,ya){this.remoteInvoke("searchDiagrams",[ra,null],null,ya,function(){ya(null,"Network Error!")})}):null,mxUtils.bind(this,function(ra,ya,Ca){F.postMessage(JSON.stringify({event:"template",docUrl:ra,info:ya,name:Ca}),"*")}),null,null,Y?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==J.withoutType);this.showDialog(X.container,620,460,!0,!1,mxUtils.bind(this,function(ra){null!=+this.sidebar&&this.sidebar.hideTooltip();ra&&this.actions.get("exit").funct()}));X.init();return}if("textContent"==J.action){var ma=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:ma,message:J}),"*");return}if("status"==J.action){null!=J.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(J.messageKey))):null!=J.message&&this.editor.setStatus(mxUtils.htmlEntities(J.message));null!=J.modified&&(this.editor.modified=J.modified);return}if("spinner"==+J.action){var Z=null!=J.messageKey?mxResources.get(J.messageKey):J.message;null==J.show||J.show?this.spinner.spin(document.body,Z):this.spinner.stop();return}if("exit"==J.action){this.actions.get("exit").funct();return}if("viewport"==J.action){null!=J.viewport&&(this.embedViewport=J.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==J.action){X=null;try{var k=this.diagramContainer.getAttribute("data-scrollState");null!=k&&+(this.diagramContainer.removeAttribute("data-scrollState"),X=JSON.parse(k))}catch(ra){}Editor.inlineFullscreen=J.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=X&&this.restoreScrollState(X);return}if("snapshot"==J.action){this.sendEmbeddedSvgExport(!0);return}if("export"==J.action){if("png"==J.format||"xmlpng"==J.format){if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){var A=null!=J.xml?J.xml:this.getFileData(!0);+this.editor.graph.setEnabled(!1);var I=this.editor.graph,T=mxUtils.bind(this,function(ra,ya){if(J.withSvg)J.withSvg=!1,this.getEmbeddedSvg(A,this.editor.graph,null,!0,function(Ka){T(ra,Ka)},null,null,J.embedImages,this.editor.graph.background,J.scale,J.border,J.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var Ca=this.createLoadMessage("export");Ca.format=J.format;Ca.message=J;Ca.data=ra;Ca.svg=ya;Ca.xml=A;F.postMessage(JSON.stringify(Ca),"*")}}),O=mxUtils.bind(this,function(ra){null==+ra&&(ra=Editor.blankImage);"xmlpng"==J.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(A)));I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);T(ra)}),U=J.pageId||(null!=this.pages?J.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var V=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=U){var ra=I.getGlobalVariable;I=this.createTemporaryGraph(I.getStylesheet());for(var ya,Ca=0;Ca<+this.pages.length;Ca++)if(this.pages[Ca].getId()==U){ya=this.updatePageRoot(this.pages[Ca]);break}null==ya&&(ya=this.currentPage);I.getGlobalVariable=function(Pa){return"page"==Pa?ya.getName():"pagenumber"==Pa?1:ra.apply(this,arguments)};document.body.appendChild(I.container);I.model.setRoot(ya.root)}if(null!=J.layerIds){var Ka=I.model,Ha=Ka.getChildCells(Ka.getRoot()),Ba={};for(Ca=0;Ca<J.layerIds.length;Ca++)Ba[J.layerIds[Ca]]=!0;for(Ca=0;Ca<Ha.length;Ca++)Ka.setVisible(Ha[Ca],Ba[Ha[Ca].id]||!1)}Ca=+null;J.keepTheme&&(Ca=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Pa){O(Pa.toDataURL("image/png"))}),J.width,null,J.background,mxUtils.bind(this,function(){O(null)}),null,null,J.scale,J.transparent,J.shadow,null,I,J.border,null,J.grid,Ca)});null!=J.xml&&0<J.xml.length&&(l=!0,this.setFileData(A),l=!1);V()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==J.format?"1":"0")+(null!=U?"&pageId="+U:"")+(null!=J.layerIds&&0<J.layerIds.length?+"&extras="+encodeURIComponent(JSON.stringify({layerIds:J.layerIds})):"")+(null!=J.scale?"&scale="+J.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?T("data:image/png;base64,"+ra.getText()):O(null)}),mxUtils.bind(this,function(){O(null)}))}}else if(V=mxUtils.bind(this,function(){var ra=this.createLoadMessage("export");ra.message=J;if("html2"==J.format||"html"==J.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ya=+this.getXmlFileData();ra.xml=mxUtils.getXml(ya);ra.data=this.getFileData(null,null,!0,null,null,null,ya);ra.format=J.format}else if("html"==J.format)ya=this.editor.getGraphXml(),ra.data=this.getHtml(ya,this.editor.graph),ra.xml=mxUtils.getXml(ya),ra.format=J.format;else{mxSvgCanvas2D.prototype.foAltText=null;ya=null!=J.background?J.background:this.editor.graph.background;ya==mxConstants.NONE&&(ya=null);ra.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ra.format="svg";var Ca=mxUtils.bind(this,+function(Ha){this.editor.graph.setEnabled(!0);this.spinner.stop();ra.data=Editor.createSvgDataUri(Ha);F.postMessage(JSON.stringify(ra),"*")}),Ka="auto";J.keepTheme&&(Ka=Editor.isDarkMode()?"dark":"light");null!=J.theme&&(Ka=J.theme);if("xmlsvg"==J.format){if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){Ka=null;if(this.isAutoDarkMode()||Editor.isDarkMode())Ka="auto";null!=J.theme&&(Ka=J.theme);this.getEmbeddedSvg(ra.xml,this.editor.graph,+null,!0,Ca,null,null,J.embedImages,ya,J.scale,J.border,J.shadow,Ka)}}else if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin))this.editor.graph.setEnabled(!1),ya=this.editor.graph.getSvg(ya,J.scale,J.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||J.shadow,null,Ka),(this.editor.graph.shadowVisible||J.shadow)&&this.editor.graph.addSvgShadow(ya),this.embedFonts(ya,mxUtils.bind(this,function(Ha){J.embedImages||null==+J.embedImages?this.editor.convertImages(Ha,mxUtils.bind(this,function(Ba){Ca(mxUtils.getXml(Ba))})):Ca(mxUtils.getXml(Ha))}));return}F.postMessage(JSON.stringify(ra),"*")}),null!=J.xml&&0<J.xml.length){if(this.editor.graph.mathEnabled){var ba=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){ba.apply(this,arguments);V()}}l=!0;this.setFileData(J.xml);l=!1;this.editor.graph.mathEnabled||V()}else V();return}if("load"==J.action){ca=J.toSketch;t=1==J.autosave;this.hideDialog();null!=J.modified&&null==+urlParams.modified&&(urlParams.modified=J.modified);null!=J.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=J.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=J.noSaveBtn&&null==urlParams.noSaveBtn&&+(urlParams.noSaveBtn=J.noSaveBtn);if(null!=J.rough){var fa=Editor.sketchMode;this.doSetSketchMode(J.rough);fa!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=J.dark&&this.setDarkMode(J.dark);null!=J.border&&(this.embedExportBorder=J.border);null!=J.theme&&(this.embedExportTheme=J.theme);null!=J.background&&(this.embedExportBackground=J.background);null!=J.viewport&&(this.embedViewport=J.viewport);this.embedExitPoint=null;if(null!=J.rect){var pa=this.embedExportBorder;+this.diagramContainer.style.left=Math.max(60,J.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,J.rect.top)+"px";this.minInlineWidth=J.minWidth;this.minInlineHeight=J.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var sa=J.maxFitScale,qa=J.rect.width+2*pa,wa=J.rect.height+2*pa;da=mxUtils.bind(this,function(){var ra=mxUtils.getDocumentSize();qa=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,+qa):qa,ra.width-80);ra=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,wa):wa,ra.height-80);this.diagramContainer.style.width=qa+"px";this.diagramContainer.style.height=ra+"px";var ya=this.editor.graph;ra=ya.maxFitScale;ya.maxFitScale=sa;ya.fit(2*pa,null,null,null,null,null,wa);this.setPageVisible(!1);if(null!=this.minInlineWidth&&ya.getGraphBounds().width<this.minInlineWidth){var Ca=ya.container.scrollTop;this.resetScrollbars();ya.container.scrollTop=Ca}ya.maxFitScale=ra;ya.container.scrollTop-=+pa;ya.container.scrollLeft-=pa;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[J]));ya.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=ya.container.style.top);var Ka=ya.getGraphBounds();ya.container.clientWidth>Ka.width+2*pa&&(ya.container.scrollLeft=Ka.x+(Ka.width+pa-ya.container.clientWidth)/2)}),10)})}null!=J.noExitBtn&&null==urlParams.noExitBtn&&+(urlParams.noExitBtn=J.noExitBtn);null!=J.title&&null!=this.buttonContainer&&(aa=this.createStatusDiv(""),mxUtils.write(aa,J.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(aa),this.embedFilenameSpan=aa);try{J.libs&&this.sidebar.showEntries(J.libs)}catch(ra){}J=null!=J.xmlpng?this.extractGraphModelFromPng(J.xmlpng):null!=J.descriptor?J.descriptor:J.xml}else{if("merge"==J.action){var Aa=this.getCurrentFile();+null!=Aa&&(aa=ea(J.xml),null!=aa&&""!=aa&&Aa.mergeFile(new LocalFile(this,aa),function(){F.postMessage(JSON.stringify({event:"merge",message:J}),"*")},function(ra){F.postMessage(JSON.stringify({event:"merge",message:J,error:ra}),"*")}))}else"remoteInvokeReady"==J.action?this.handleRemoteInvokeReady(F):"remoteInvoke"==J.action?this.handleRemoteInvoke(J,K.origin):"remoteInvokeResponse"==J.action?this.handleRemoteInvokeResponse(J):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(J)}),+"*");return}}catch(ra){this.handleError(ra)}}var za=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Da=mxUtils.bind(this,function(ra,ya){l=!0;try{c(ra,ya,null,ca)}catch(Ca){this.handleError(Ca)}l=!1;null!=urlParams.modified&&this.editor.setStatus("");z=za();t&&null==f&&(f=mxUtils.bind(this,function(Ca,Ka){Ca=za();Ca==z||l||(Ka=this.createLoadMessage("autosave"),Ka.xml=Ca,(window.opener||+window.parent).postMessage(JSON.stringify(Ka),"*"));z=Ca}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",+f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ya=this.createLoadMessage("load"),ya.xml=ra,F.postMessage(JSON.stringify(ya),"*");null!=da&&da()});null!=J&&"function"===typeof J.substring&&"data:application/vnd.visio;base64,"==J.substring(0,34)?(ea="0M8R4KGxGuE"==J.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(J.substring(J.indexOf(",")+1)),function(ra){Da(ra,K)},mxUtils.bind(this,+function(ra){this.handleError(ra)}),ea)):null!=J&&"function"===typeof J.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(J,mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&299>=ra.status&&"<mxGraphModel"==ra.responseText.substring(0,13)?Da(ra.responseText,K):this.handleError({message:413==ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),+""):null!=J&&"function"===typeof J.substring&&this.isLucidChartData(J)?this.convertLucidChart(J,mxUtils.bind(this,function(ra){Da(ra)}),mxUtils.bind(this,function(ra){this.handleError(ra)})):null==J||"object"!==typeof J||null==J.format||null==J.data&&null==J.url?(J=ea(J),Da(J,K)):this.loadDescriptor(J,mxUtils.bind(this,function(ra){Da(za(),K)}),mxUtils.bind(this,function(ra){this.handleError(ra,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;C="json"==urlParams.proto?+JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(C,"*");if("json"==urlParams.proto){var N=this.editor.graph.openLink;this.editor.graph.openLink=function(K,J,da){N.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:K,target:J,allowOpener:da}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,f,l,t){var z="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,C=document.createElement("button");C.setAttribute("title",+c+(null!=l?" ("+l+")":""));C.style.marginLeft="6px";mxUtils.write(C,c);z?(C.className=t?"gePrimaryBtn":"",C.style.marginLeft="8px",C.style.padding="6px"):C.className="geBigButton"+(t?"":" geBigStandardButton");mxEvent.addListener(C,"click",f);return C};EditorUi.prototype.addEmbedButtons=function(){var c=document.createElement("div");c.style.display="inline-flex";c.style.alignItems="center";c.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&+(c.style.marginRight="66px",c.style.order="1","atlas"==Editor.currentTheme&&(c.style.marginTop="2px"));document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(c.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),+"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&c.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||null==+this.buttonContainer?null!=this.menubar&&(this.toolbar.container.style.paddingLeft="6px",this.toolbar.container.appendChild(c),this.toolbar.staticElements.push(c)):(this.buttonContainer.appendChild(c),this.editor.fireEvent(new mxEventObject("statusChanged")))};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,+null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var f=new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(l){if(0<l.length)try{var t=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(t));+this.customLayoutConfig=t;this.hideDialog()}catch(z){this.handleError(z)}}),null,null,null,null,mxUtils.bind(this,function(l,t){var z=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var C=t.value;t.value=JSON.stringify(JSON.parse(C));t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));t.value=C}catch(F){this.handleError(F)}}));z.setAttribute("title",+"copy");z.className="geBtn";l.appendChild(z)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var l=mxUtils.bind(this,function(){this.loadingOrgChart=!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),t=mxUtils.bind(this,function(z){this.loadingOrgChart=!1;f.clear()&&this.handleError(z)});"undefined"!==+typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",l,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",+l,null,null,null,t))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var l=c.split("\n"),t=[],z=[],C=[],F={};if(0<l.length){var N={},K=this.editor.graph,J=null,da=null,ea=null,ca=null,X=null,aa=null,ia=null,la="whiteSpace=wrap;html=1;",Y=null,ma=null,Z="",k="auto",A="auto",I=!1,T=null,O=null,U=40,V=40,ba=100,fa=0,pa=mxUtils.bind(this,function(){null!=f?f(xa):(K.setSelectionCells(xa),+K.scrollCellToVisible(K.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),sa=K.getFreeInsertPoint(),qa=sa.x,wa=sa.y;sa=wa;var Aa=null,za="auto";ma=null;for(var Da=[],ra=null,ya=null,Ca=0;Ca<l.length&&"#"==l[Ca].charAt(0);){c=l[Ca].replace(/\r$/,"");for(Ca++;Ca<l.length&&"\\"==c.charAt(c.length-1)&&"#"==l[Ca].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(l[Ca].substring(1)),Ca++;if("#"!=c.charAt(1)){var Ka=c.indexOf(":");+if(0<Ka){var Ha=mxUtils.trim(c.substring(1,Ka)),Ba=mxUtils.trim(c.substring(Ka+1));"label"==Ha?Aa=Graph.sanitizeHtml(Ba):"labelname"==Ha&&0<Ba.length&&"-"!=Ba?X=Ba:"labels"==Ha&&0<Ba.length&&"-"!=Ba?ia=JSON.parse(Ba):"style"==Ha?da=Ba:"parentstyle"==Ha?la=Ba:"unknownStyle"==Ha&&"-"!=Ba?aa=Ba:"stylename"==Ha&&0<Ba.length&&"-"!=Ba?ca=Ba:"styles"==Ha&&0<Ba.length&&"-"!=Ba?ea=JSON.parse(Ba):"vars"==Ha&&0<Ba.length&&"-"!=Ba?J=JSON.parse(Ba):"identity"==Ha&&0<Ba.length&&"-"!=Ba?Y=Ba:"parent"==Ha&&0<Ba.length&&+"-"!=Ba?ma=Ba:"namespace"==Ha&&0<Ba.length&&"-"!=Ba?Z=Ba:"width"==Ha?k=Ba:"height"==Ha?A=Ba:"collapsed"==Ha&&"-"!=Ba?I="true"==Ba:"left"==Ha&&0<Ba.length?T=Ba:"top"==Ha&&0<Ba.length?O=Ba:"ignore"==Ha?ya=Ba.split(","):"connect"==Ha?Da.push(JSON.parse(Ba)):"link"==Ha?ra=Ba:"padding"==Ha?fa=parseFloat(Ba):"edgespacing"==Ha?U=parseFloat(Ba):"nodespacing"==Ha?V=parseFloat(Ba):"levelspacing"==Ha?ba=parseFloat(Ba):"layout"==Ha&&(za=Ba)}}}if(null==l[Ca])throw Error(mxResources.get("invalidOrMissingFile"));+var Pa=this.editor.csvToArray(l[Ca].replace(/\r$/,""));Ka=c=null;Ha=[];for(Ba=0;Ba<Pa.length;Ba++)Y==Pa[Ba]&&(c=Ba),ma==Pa[Ba]&&(Ka=Ba),Ha.push(mxUtils.trim(Pa[Ba]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Aa&&(Aa="%"+Ha[0]+"%");if(null!=Da)for(var $a=0;$a<Da.length;$a++)null==N[Da[$a].to]&&(N[Da[$a].to]={});Y=[];for(Ba=Ca+1;Ba<l.length;Ba++){var Na=this.editor.csvToArray(l[Ba].replace(/\r$/,""));if(null==Na){var Ya=40<l[Ba].length?l[Ba].substring(0,40)+"...":l[Ba];+throw Error(Ya+" ("+Ba+"):\n"+mxResources.get("containsValidationErrors"));}0<Na.length&&Y.push(Na)}K.model.beginUpdate();try{for(Ba=0;Ba<Y.length;Ba++){Na=Y[Ba];var Ea=null,x=null!=c?Z+Na[c]:null;l=!1;null!=x&&(Ea=K.model.getCell(x),l=null==Ea||0<=mxUtils.indexOf(t,Ea));var L=new mxCell(Aa,new mxGeometry(qa,sa,0,0),da||"whiteSpace=wrap;html=1;");L.collapsed=I;L.vertex=!0;L.id=x;null==Ea||l||K.model.setCollapsed(Ea,I);for(var R=0;R<Na.length;R++)K.setAttributeForCell(L,Ha[R],Na[R]),null==Ea||l||K.setAttributeForCell(Ea,+Ha[R],Na[R]);if(null!=X&&null!=ia){var W=ia[L.getAttribute(X)];null!=W&&(K.labelChanged(L,W),null==Ea||l||K.cellLabelChanged(Ea,W))}if(null!=ca&&null!=ea){var ja=ea[L.getAttribute(ca)];null!=ja&&(L.style=ja)}K.setAttributeForCell(L,"placeholders","1");L.style=K.replacePlaceholders(L,L.style,J);null==Ea||l?K.fireEvent(new mxEventObject("cellsInserted","cells",[L])):(K.model.setStyle(Ea,L.style),0>mxUtils.indexOf(C,Ea)&&C.push(Ea),K.fireEvent(new mxEventObject("cellsInserted","cells",[Ea])));l=null!=+Ea;Ea=L;if(!l)for($a=0;$a<Da.length;$a++)N[Da[$a].to][Ea.getAttribute(Da[$a].to)]=Ea;null!=ra&&"link"!=ra&&(K.setLinkForCell(Ea,Ea.getAttribute(ra)),K.setAttributeForCell(Ea,ra,null));var ka=this.editor.graph.getPreferredSizeForCell(Ea);ma=null!=Ka?K.model.getCell(Z+Na[Ka]):null;if(Ea.vertex){Ya=null!=ma?0:qa;Ca=null!=ma?0:wa;null!=T&&null!=Ea.getAttribute(T)&&(Ea.geometry.x=Ya+parseFloat(Ea.getAttribute(T)));null!=O&&null!=Ea.getAttribute(O)&&(Ea.geometry.y=Ca+parseFloat(Ea.getAttribute(O)));var oa=+"@"==k.charAt(0)?Ea.getAttribute(k.substring(1)):null;Ea.geometry.width=null!=oa&&"auto"!=oa?parseFloat(Ea.getAttribute(k.substring(1))):"auto"==k||"auto"==oa?ka.width+fa:parseFloat(k);var va="@"==A.charAt(0)?Ea.getAttribute(A.substring(1)):null;Ea.geometry.height=null!=va&&"auto"!=va&&"width"!=A?parseFloat(va):"auto"==A||"auto"==va?ka.height+fa:"width"==A?Ea.geometry.width:parseFloat(A);sa+=Ea.geometry.height+V}l?(null==F[x]&&(F[x]=[]),F[x].push(Ea)):(t.push(Ea),null!=ma?(ma.style=K.replacePlaceholders(ma,+la,J),K.addCell(Ea,ma),z.push(ma)):C.push(K.addCell(Ea)))}for(Ba=0;Ba<z.length;Ba++)oa="@"==k.charAt(0)?z[Ba].getAttribute(k.substring(1)):null,va="@"==A.charAt(0)?z[Ba].getAttribute(A.substring(1)):null,"auto"!=k&&"auto"!=oa||"auto"!=A&&"auto"!=va||K.updateGroupBounds([z[Ba]],fa,!0);var ta=C.slice(),xa=C.slice();for($a=0;$a<Da.length;$a++){var Fa=Da[$a];for(Ba=0;Ba<t.length;Ba++){Ea=t[Ba];var Ma=mxUtils.bind(this,function(mb,pb,db){var qb=pb.getAttribute(db.from);if(null!=qb&&""!=qb){qb=qb.split(",");+for(var nb=0;nb<qb.length;nb++){var lb=N[db.to][qb[nb]];if(null==lb&&null!=aa){lb=new mxCell(qb[nb],new mxGeometry(qa,wa,0,0),aa);lb.style=K.replacePlaceholders(pb,lb.style,J);var eb=this.editor.graph.getPreferredSizeForCell(lb);lb.geometry.width=eb.width+fa;lb.geometry.height=eb.height+fa;N[db.to][qb[nb]]=lb;lb.vertex=!0;lb.id=qb[nb];C.push(K.addCell(lb))}if(null!=lb){eb=db.label;null!=db.fromlabel&&(eb=(pb.getAttribute(db.fromlabel)||"")+(eb||""));null!=db.sourcelabel&&(eb=K.replacePlaceholders(pb,+db.sourcelabel,J)+(eb||""));null!=db.tolabel&&(eb=(eb||"")+(lb.getAttribute(db.tolabel)||""));null!=db.targetlabel&&(eb=(eb||"")+K.replacePlaceholders(lb,db.targetlabel,J));var tb="target"==db.placeholders==!db.invert?lb:mb;tb=null!=db.style?K.replacePlaceholders(tb,db.style,J):K.createCurrentEdgeStyle();eb=K.insertEdge(null,null,eb||"",db.invert?lb:mb,db.invert?mb:lb,tb);if(null!=db.labels)for(tb=0;tb<db.labels.length;tb++){var ob=db.labels[tb],ub=new mxCell(ob.label||tb,new mxGeometry(null!=ob.x?+ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=ob.placeholders&&(ub.value=K.replacePlaceholders("target"==ob.placeholders==!db.invert?lb:mb,ub.value,J));if(null!=ob.dx||null!=ob.dy)ub.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=ob.dy?ob.dy:0);eb.insert(ub)}if(null!=db.data)for(var Ab in db.data)K.setAttributeForCell(eb,Ab,db.data[Ab]);xa.push(eb);mxUtils.remove(db.invert?mb:lb,ta)}}}});Ma(Ea,Ea,Fa);if(null!=F[Ea.id])for(R=+0;R<F[Ea.id].length;R++)Ma(Ea,F[Ea.id][R],Fa)}}if(null!=ya)for(Ba=0;Ba<t.length;Ba++)for(Ea=t[Ba],R=0;R<ya.length;R++)K.setAttributeForCell(Ea,mxUtils.trim(ya[R]),null);if(0<C.length){var Wa=new mxParallelEdgeLayout(K);Wa.spacing=U;Wa.checkOverlap=!0;var Xa=function(){0<Wa.spacing&&Wa.execute(K.getDefaultParent());for(var mb=0;mb<C.length;mb++){var pb=K.getCellGeometry(C[mb]);pb.x=Math.round(K.snap(pb.x));pb.y=Math.round(K.snap(pb.y));"auto"==k&&(pb.width=Math.round(K.snap(pb.width)));"auto"==A&&+(pb.height=Math.round(K.snap(pb.height)))}};if("["==za.charAt(0)){var ab=pa;K.view.validate();this.executeLayouts(K.createLayouts(JSON.parse(za)),function(){Xa();ab()});pa=null}else if("circle"==za){var Oa=new mxCircleLayout(K);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Ra=Oa.isVertexIgnored;Oa.isVertexIgnored=function(mb){return Ra.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Oa.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}else if("horizontaltree"==za||"verticaltree"==+za||"auto"==za&&xa.length==2*C.length-1&&1==ta.length){K.view.validate();var kb=new mxCompactTreeLayout(K,"horizontaltree"==za);kb.levelDistance=V;kb.edgeRouting=!1;kb.resetEdges=!1;kb.sortEdges=!0;this.executeLayout(function(){kb.execute(K.getDefaultParent(),0<ta.length?ta[0]:null)},!0,pa);pa=null}else if("horizontalflow"==za||"verticalflow"==za||"auto"==za&&1==ta.length){K.view.validate();var cb=new mxHierarchicalLayout(K,"horizontalflow"==za?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);+cb.intraCellSpacing=V;cb.parallelEdgeSpacing=U;cb.interRankCellSpacing=ba;cb.disableEdgeStyle=!1;this.executeLayout(function(){cb.execute(K.getDefaultParent(),xa);K.moveCells(xa,qa,wa)},!0,pa);pa=null}else if("orgchart"==za){K.view.validate();var Za=new mxOrgChartLayout(K,2,ba,V),gb=Za.isVertexIgnored;Za.isVertexIgnored=function(mb){return gb.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Za.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}else if("organic"==za||"auto"==+za&&xa.length>C.length){K.view.validate();var hb=new mxFastOrganicLayout(K);hb.forceConstant=3*V;hb.disableEdgeStyle=!1;hb.resetEdges=!1;var vb=hb.isVertexIgnored;hb.isVertexIgnored=function(mb){return vb.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){hb.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}}this.hideDialog()}finally{K.model.endUpdate()}null!=pa&&pa()}}catch(mb){this.handleError(mb)}};EditorUi.prototype.getSearch=function(c){var f="";if("1"!=urlParams.offline&&+"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",t;for(t in urlParams)0>mxUtils.indexOf(c,t)&&null!=urlParams[t]&&(f+=l+t+"="+urlParams[t],l="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),t;for(t in urlParams)0>mxUtils.indexOf(l,+t)&&(c=0==f?c+"?":c+"&",null!=urlParams[t]&&(c+=t+"="+urlParams[t],f++))}return c};EditorUi.prototype.showLinkDialog=function(c,f,l,t,z){c=new LinkDialog(this,c,f,l,!0,t,z);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=+this.gitLab&&f++;c&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),f=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var l=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!l);this.actions.get("print").setEnabled(!l);this.menus.get("exportAs").setEnabled(!l);this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("smartFit").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("darkMode").setEnabled("atlas"!=Editor.currentTheme);this.actions.get("lightMode").setEnabled("atlas"!=Editor.currentTheme);l=this.actions.get("autoMode");l.setEnabled(l.isEnabled()&&"atlas"!=Editor.currentTheme);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(c),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(c));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&@@ -3980,14 +3981,14 @@ urlParams.embed&&this.editor.graph.isEnabled()||null!=f&&f.isEditable();this.actl.image&&0<l.cells.length);this.actions.get("crop").setEnabled(t&&l.image&&0<l.cells.length);this.actions.get("pageSetup").setEnabled(t);this.actions.get("shadowVisible").setEnabled(t);this.actions.get("connectionArrows").setEnabled(t);this.actions.get("connectionPoints").setEnabled(t);this.actions.get("copyStyle").setEnabled(t&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&t&&0<l.cells.length);this.actions.get("editGeometry").setEnabled(0<l.vertices.length);this.actions.get("createShape").setEnabled(t);this.actions.get("createRevision").setEnabled(t);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(t&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.actions.get("properties").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=-this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(t&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var R=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);R.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=+this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(t&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);Q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,l,t,z,C,F,N){var K=c.editor.graph;if("xml"==l)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(K.getSvg(t,z,C)),"image/svg+xml");else{var J=c.getFileData(!0,null,null,null,null,!0),da=K.getGraphBounds(),ea=Math.floor(da.width*z/K.view.scale),ca=Math.floor(da.height*z/K.view.scale);if(J.length<=MAX_REQUEST_SIZE&&ea*ca<MAX_AREA)if(c.hideDialog(),-"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.isExportToCanvas()){var W={globalVars:K.getExportVariables()};N&&(W.grid={size:K.gridSize,steps:K.view.gridSteps,color:K.view.gridColor});c.saveRequest(f,l,function(ba,ha){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(ha||"0")+(null!=ba?"&filename="+encodeURIComponent(ba):"")+"&extras="+encodeURIComponent(JSON.stringify(W))+(0<F?"&dpi="+F:"")+"&bg="+(null!=t?t:"none")+"&w="+ea+"&h="+ca+"&border="+C+"&xml="+encodeURIComponent(J))})}else"png"==l?c.exportImage(z,+"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.isExportToCanvas()){var X={globalVars:K.getExportVariables()};N&&(X.grid={size:K.gridSize,steps:K.view.gridSteps,color:K.view.gridColor});c.saveRequest(f,l,function(aa,ia){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(ia||"0")+(null!=aa?"&filename="+encodeURIComponent(aa):"")+"&extras="+encodeURIComponent(JSON.stringify(X))+(0<F?"&dpi="+F:"")+"&bg="+(null!=t?t:"none")+"&w="+ea+"&h="+ca+"&border="+C+"&xml="+encodeURIComponent(J))})}else"png"==l?c.exportImage(z,null==t||"none"==t,!0,!1,!1,C,!0,!1,null,N,F):c.exportImage(z,!1,!0,!1,!1,C,!0,!1,"jpeg",N);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,f="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var t=c;this.currentPage!=this.pages[l]&&(t=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[l]),t.model.setRoot(this.pages[l].root));f+=this.pages[l].getName()+" "+t.getIndexableText()+" "}else f=c.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var f={},l=document.createElement("div");l.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,mxUtils.htmlEntities(c));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(t);var z=document.createElement("div");z.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";z.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var C={};try{var F=mxSettings.getCustomLibraries();for(c=0;c<F.length;c++){var N=F[c];if("R"==N.substring(0,1)){var K=JSON.parse(decodeURIComponent(N.substring(1)));C[K[0]]={id:K[0],title:K[1],downloadUrl:K[2]}}}}catch(J){}this.remoteInvoke("getCustomLibraries",null,null,function(J){z.innerText="";if(0==J.length)z.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+-"</div>";else for(var da=0;da<J.length;da++){var ea=J[da];C[ea.id]&&(f[ea.id]=ea);var ca=this.addCheckbox(z,ea.title,C[ea.id]);(function(W,ba){mxEvent.addListener(ba,"change",function(){this.checked?f[W.id]=W:delete f[W.id]})})(ea,ca)}},mxUtils.bind(this,function(J){z.innerText="";var da=document.createElement("div");da.style.padding="8px";da.style.textAlign="center";mxUtils.write(da,mxResources.get("error")+": ");mxUtils.write(da,null!=J&&null!=J.message?J.message:mxResources.get("unknownError"));-z.appendChild(da)}));l.appendChild(z);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var J=0,da;for(da in f)null==C[da]&&(J++,mxUtils.bind(this,function(ea){this.remoteInvoke("getFileContent",[ea.downloadUrl],null,mxUtils.bind(this,function(ca){J--;0==J&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ca,ea)),this.showSidebar()}catch(W){this.handleError(W,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){J--;+"</div>";else for(var da=0;da<J.length;da++){var ea=J[da];C[ea.id]&&(f[ea.id]=ea);var ca=this.addCheckbox(z,ea.title,C[ea.id]);(function(X,aa){mxEvent.addListener(aa,"change",function(){this.checked?f[X.id]=X:delete f[X.id]})})(ea,ca)}},mxUtils.bind(this,function(J){z.innerText="";var da=document.createElement("div");da.style.padding="8px";da.style.textAlign="center";mxUtils.write(da,mxResources.get("error")+": ");mxUtils.write(da,null!=J&&null!=J.message?J.message:mxResources.get("unknownError"));+z.appendChild(da)}));l.appendChild(z);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var J=0,da;for(da in f)null==C[da]&&(J++,mxUtils.bind(this,function(ea){this.remoteInvoke("getFileContent",[ea.downloadUrl],null,mxUtils.bind(this,function(ca){J--;0==J&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ca,ea)),this.showSidebar()}catch(X){this.handleError(X,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){J--;0==J&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[da]));for(da in C)f[da]||this.closeLibrary(new RemoteLibrary(this,null,C[da]));0==J&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var f=0;f<this.remoteInvokeQueue.length;f++)c.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var f=c.msgMarkers,l=this.remoteInvokeCallbacks[f.callbackId];if(null==l)throw Error("No callback for "+(null!=f?f.callbackId:"null"));c.error?l.error&&l.error(c.error.errResp):l.callback&&l.callback.apply(this,c.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,f,l,t,z){var C=!0,F=window.setTimeout(mxUtils.bind(this,function(){C=!1;z({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),N=mxUtils.bind(this,function(){window.clearTimeout(F);C&&t.apply(this,arguments)}),K=mxUtils.bind(this,function(){window.clearTimeout(F);@@ -3995,46 +3996,47 @@ C&&z.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.len(ea.resp=J);this.remoteWin.postMessage(JSON.stringify(ea),"*")});try{var t=c.funtionName,z=this.remoteInvokableFns[t];if(null!=z&&"function"===typeof this[t]){if(z.allowedDomains){for(var C=!1,F=0;F<z.allowedDomains.length;F++)if(f=="https://"+z.allowedDomains[F]){C=!0;break}if(!C){l(null,"Invalid Call: "+t+" is not allowed.");return}}var N=c.functionArgs;Array.isArray(N)||(N=[]);if(z.isAsync)N.push(function(){l(Array.prototype.slice.apply(arguments))}),N.push(function(J){l(null,J||"Unkown Error")}),this[t].apply(this,N);else{var K=this[t].apply(this,N);l([K])}}else l(null,"Invalid Call: "+t+" is not found.")}catch(J){l(null,"Invalid Call: An error occurred, "+J.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var t=l.open("database",2);t.onupgradeneeded=function(z){try{var C=t.result;1>z.oldVersion&&C.createObjectStore("objects",{keyPath:"key"});2>z.oldVersion&&(C.createObjectStore("files",{keyPath:"title"}),C.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};t.onsuccess=mxUtils.bind(this,function(z){try{var C=t.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(F){if(!F||"1"==urlParams.forceMigration){var N=-document.createElement("iframe");N.style.display="none";N.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(N);var K=!0,J=!1,da,ea=0,ca=mxUtils.bind(this,function(){J=!0;this.setDatabaseItem(".drawioMigrated3",!0);N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),W=mxUtils.bind(this,function(){ea++;ba()}),ba=mxUtils.bind(this,function(){try{if(ea>=da.length)ca();else{var la=-da[ea];StorageFile.getFileContent(this,la,mxUtils.bind(this,function(Y){null==Y||".scratchpad"==la&&Y==this.emptyLibraryXml?N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[la]}),"*"):W()}),W)}}catch(Y){console.log(Y)}}),ha=mxUtils.bind(this,function(la){try{this.setDatabaseItem(null,[{title:la.title,size:la.data.length,lastModified:Date.now(),type:la.isLib?"L":"F"},{title:la.title,data:la.data}],W,W,["filesInfo","files"])}catch(Y){console.log(Y)}});-F=mxUtils.bind(this,function(la){try{if(la.source==N.contentWindow){var Y={};try{Y=JSON.parse(la.data)}catch(ma){}"init"==Y.event?(N.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=Y.event||J||(K?null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?(da=Y.resp[0],K=!1,ba()):ca():null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?ha(Y.resp[0]):W())}}catch(ma){console.log(ma)}});+document.createElement("iframe");N.style.display="none";N.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(N);var K=!0,J=!1,da,ea=0,ca=mxUtils.bind(this,function(){J=!0;this.setDatabaseItem(".drawioMigrated3",!0);N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),X=mxUtils.bind(this,function(){ea++;aa()}),aa=mxUtils.bind(this,function(){try{if(ea>=da.length)ca();else{var la=+da[ea];StorageFile.getFileContent(this,la,mxUtils.bind(this,function(Y){null==Y||".scratchpad"==la&&Y==this.emptyLibraryXml?N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[la]}),"*"):X()}),X)}}catch(Y){console.log(Y)}}),ia=mxUtils.bind(this,function(la){try{this.setDatabaseItem(null,[{title:la.title,size:la.data.length,lastModified:Date.now(),type:la.isLib?"L":"F"},{title:la.title,data:la.data}],X,X,["filesInfo","files"])}catch(Y){console.log(Y)}});+F=mxUtils.bind(this,function(la){try{if(la.source==N.contentWindow){var Y={};try{Y=JSON.parse(la.data)}catch(ma){}"init"==Y.event?(N.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=Y.event||J||(K?null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?(da=Y.resp[0],K=!1,aa()):ca():null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?ia(Y.resp[0]):X())}}catch(ma){console.log(ma)}});window.addEventListener("message",F)}})));c(C);C.onversionchange=function(){C.close()}}catch(F){null!=f?f(F):null!=window.console&&console.warn(F)}});t.onerror=f;t.onblocked=function(){}}catch(z){null!=f?f(z):null!=window.console&&console.error(z)}else null!=f&&f(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,f,l,t,z){this.openDatabase(mxUtils.bind(this,function(C){try{z=z||"objects";Array.isArray(z)||(z=[z],c=[c],f=[f]);var F=C.transaction(z,"readwrite");F.oncomplete=l;F.onerror=t;for(C=0;C<z.length;C++)F.objectStore(z[C]).put(null!=c&&null!=c[C]?{key:c[C],data:f[C]}:f[C])}catch(N){null!=t&&t(N)}}),t)};EditorUi.prototype.removeDatabaseItem=function(c,f,l,t){this.openDatabase(mxUtils.bind(this,function(z){try{t=t||"objects";Array.isArray(t)||(t=[t],c=[c]);var C=z.transaction(t,"readwrite");C.oncomplete=f;C.onerror=l;for(z=0;z<t.length;z++)C.objectStore(t[z]).delete(c[z])}catch(F){null!=l&&l(F)}}),l)};EditorUi.prototype.getDatabaseItem=function(c,f,l,t){this.openDatabase(mxUtils.bind(this,function(z){try{t=t||"objects";var C=z.transaction([t],"readonly").objectStore(t).get(c);C.onsuccess=function(){f(C.result)};C.onerror=l}catch(F){null!=l&&l(F)}}),l)};EditorUi.prototype.getDatabaseItems=function(c,f,l){this.openDatabase(mxUtils.bind(this,function(t){try{l=l||"objects";var z=t.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),C=[];z.onsuccess=function(F){null==F.target.result?c(C):(C.push(F.target.result.value),F.target.result.continue())};z.onerror=f}catch(F){null!=f&&f(F)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(c,f,l){this.openDatabase(mxUtils.bind(this,function(t){try{l=l||"objects";var z=t.transaction([l],"readonly").objectStore(l).getAllKeys();z.onsuccess=function(){c(z.result)};z.onerror=f}catch(C){null!=f&&f(C)}}),f)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,f){var l=this.getCurrentFile();null!=l?l.getComments(c,f):c([])};EditorUi.prototype.addComment=function(c,f,l){var t=this.getCurrentFile();null!=t?t.addComment(c,f,l):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,f){var l=this.getCurrentFile();return null!=l?l.newComment(c,f):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,f){var l=this.getCurrentFile();null!=-l&&l.getRevisions?l.getRevisions(c,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,f,l,t,z,C,F,N){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");-return this.editor.loadUrl(c,f,l,t,z,C,F,N)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");-return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W,ba,ha){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W,ba,ha)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");-return this.editor.convertImages(c,f,l,t)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,f)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,f,l,t)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");-return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,f,l,t,z){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,f,l,t,z)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],f=0;f<localStorage.length;f++){var l=localStorage.key(f),t=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<t.length){var z=-"<mxfile "===t.substring(0,8)||"<?xml"===t.substring(0,5)||"\x3c!--[if IE]>"===t.substring(0,12);t="<mxlibrary>"===t.substring(0,11);(z||t)&&c.push(l)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(c);return{title:c,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();-var CommentsWindow=function(b,e,g,m,u,p){function B(){for(var ba=F.getElementsByTagName("div"),ha=0,la=0;la<ba.length;la++)"none"!=ba[la].style.display&&ba[la].parentNode==F&&ha++;N.style.display=0==ha?"block":"none"}function H(ba,ha,la,Y){function ma(){ha.removeChild(A);ha.removeChild(I);k.style.display="block";Z.style.display="block"}t={div:ha,comment:ba,saveCallback:la,deleteOnCancel:Y};var Z=ha.querySelector(".geCommentTxt"),k=ha.querySelector(".geCommentActionsList"),A=document.createElement("textarea");-A.className="geCommentEditTxtArea";A.style.minHeight=Z.offsetHeight+"px";A.value=ba.content;ha.insertBefore(A,Z);var I=document.createElement("div");I.className="geCommentEditBtns";var U=mxUtils.button(mxResources.get("cancel"),function(){Y?(ha.parentNode.removeChild(ha),B()):ma();t=null});U.className="geCommentEditBtn";I.appendChild(U);var O=mxUtils.button(mxResources.get("save"),function(){Z.innerText="";ba.content=A.value;mxUtils.write(Z,ba.content);ma();la(ba);t=null});mxEvent.addListener(A,"keydown",-mxUtils.bind(this,function(S){mxEvent.isConsumed(S)||((mxEvent.isControlDown(S)||mxClient.IS_MAC&&mxEvent.isMetaDown(S))&&13==S.keyCode?(O.click(),mxEvent.consume(S)):27==S.keyCode&&(U.click(),mxEvent.consume(S)))}));O.focus();O.className="geCommentEditBtn gePrimaryBtn";I.appendChild(O);ha.insertBefore(I,Z);k.style.display="none";Z.style.display="none";A.focus()}function T(ba,ha){ha.innerText="";ba=new Date(ba.modifiedDate);var la=b.timeSince(ba);null==la&&(la=mxResources.get("lessThanAMinute"));-mxUtils.write(ha,mxResources.get("timeAgo",[la],"{1} ago"));ha.setAttribute("title",ba.toLocaleDateString()+" "+ba.toLocaleTimeString())}function G(ba){var ha=document.createElement("img");ha.className="geCommentBusyImg";ha.src=IMAGE_PATH+"/spin.gif";ba.appendChild(ha);ba.busyImg=ha}function P(ba){ba.style.border="1px solid red";ba.busyImg.parentNode==ba&&ba.removeChild(ba.busyImg)}function R(ba){ba.style.border="";ba.busyImg.parentNode==ba&&ba.removeChild(ba.busyImg)}function c(ba,ha,la,Y,ma){function Z(aa,-ja,pa){var sa=document.createElement("li");sa.className="geCommentAction";var qa=document.createElement("a");qa.className="geCommentActionLnk";mxUtils.write(qa,aa);sa.appendChild(qa);mxEvent.addListener(qa,"click",function(wa){ja(wa,ba);wa.preventDefault();mxEvent.consume(wa)});X.appendChild(sa);pa&&(sa.style.display="none")}function k(){function aa(sa){ja.push(pa);if(null!=sa.replies)for(var qa=0;qa<sa.replies.length;qa++)pa=pa.nextSibling,aa(sa.replies[qa])}var ja=[],pa=I;aa(ba);return{pdiv:pa,-replies:ja}}function A(aa,ja,pa,sa,qa){function wa(){G(ra);ba.addReply(Ea,function(ya){Ea.id=ya;ba.replies.push(Ea);R(ra);pa&&pa()},function(ya){Ba();P(ra);b.handleError(ya,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},sa,qa)}function Ba(){H(Ea,ra,function(ya){wa()},!0)}var za=k().pdiv,Ea=b.newComment(aa,b.getCurrentUser());Ea.pCommentId=ba.id;null==ba.replies&&(ba.replies=[]);var ra=c(Ea,ba.replies,za,Y+1);ja?Ba():wa()}if(ma||!ba.isResolved){N.style.display="none";var I=-document.createElement("div");I.className="geCommentContainer";I.setAttribute("data-commentId",ba.id);I.style.marginLeft=20*Y+5+"px";ba.isResolved&&(z.style.opacity="0.7");var U=document.createElement("div");U.className="geCommentHeader";var O=document.createElement("img");O.className="geCommentUserImg";O.src=null!=ba.user&&null!=ba.user.pictureUrl?ba.user.pictureUrl:Editor.userImage;U.appendChild(O);O=document.createElement("div");O.className="geCommentHeaderTxt";U.appendChild(O);var S=document.createElement("div");-S.className="geCommentUsername";mxUtils.write(S,null!=ba.user?ba.user.displayName:mxResources.get("unknownUser"));O.appendChild(S);S=document.createElement("div");S.className="geCommentDate";S.setAttribute("data-commentId",ba.id);T(ba,S);O.appendChild(S);I.appendChild(U);U=document.createElement("div");U.className="geCommentTxt";mxUtils.write(U,ba.content||"");I.appendChild(U);ba.isLocked&&(I.style.opacity="0.5");U=document.createElement("div");U.className="geCommentActions";var X=document.createElement("ul");-X.className="geCommentActionsList";U.appendChild(X);f||ba.isLocked||0!=Y&&!l||Z(mxResources.get("reply"),function(){A("",!0)},ba.isResolved);O=b.getCurrentUser();null==O||null==ba.user||O.id!=ba.user.id||f||ba.isLocked||(Z(mxResources.get("edit"),function(){function aa(){H(ba,I,function(){G(I);ba.editComment(ba.content,function(){R(I)},function(ja){P(I);aa();b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}aa()},ba.isResolved),Z(mxResources.get("delete"),-function(){b.confirm(mxResources.get("areYouSure"),function(){G(I);ba.deleteComment(function(aa){if(!0===aa){aa=I.querySelector(".geCommentTxt");aa.innerText="";mxUtils.write(aa,mxResources.get("msgDeleted"));var ja=I.querySelectorAll(".geCommentAction");for(aa=0;aa<ja.length;aa++)ja[aa].parentNode.removeChild(ja[aa]);R(I);I.style.opacity="0.5"}else{ja=k(ba).replies;for(aa=0;aa<ja.length;aa++)F.removeChild(ja[aa]);for(aa=0;aa<ha.length;aa++)if(ha[aa]==ba){ha.splice(aa,1);break}N.style.display=0==-F.getElementsByTagName("div").length?"block":"none"}},function(aa){P(I);b.handleError(aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},ba.isResolved));f||ba.isLocked||0!=Y||Z(ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(aa){function ja(){var pa=aa.target;pa.innerText="";ba.isResolved=!ba.isResolved;mxUtils.write(pa,ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var sa=ba.isResolved?"none":"",qa=k(ba).replies,wa=-"light-dark("+(ba.isResolved?"ghostWhite":"white")+", transparent)",Ba=0;Ba<qa.length;Ba++){qa[Ba].style.backgroundColor=wa;for(var za=qa[Ba].querySelectorAll(".geCommentAction"),Ea=0;Ea<za.length;Ea++)za[Ea]!=pa.parentNode&&(za[Ea].style.display=sa);ea||(qa[Ba].style.display="none")}B()}ba.isResolved?A(mxResources.get("reOpened")+": ",!0,ja,!1,!0):A(mxResources.get("markedAsResolved"),!1,ja,!0)});I.appendChild(U);null!=la?F.insertBefore(I,la.nextSibling):F.appendChild(I);for(la=0;null!=ba.replies&&-la<ba.replies.length;la++)U=ba.replies[la],U.isResolved=ba.isResolved,c(U,ba.replies,null,Y+1,ma);null!=t&&(t.comment.id==ba.id?(ma=ba.content,ba.content=t.comment.content,H(ba,I,t.saveCallback,t.deleteOnCancel),ba.content=ma):null==t.comment.id&&t.comment.pCommentId==ba.id&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return I}}var f=!b.canComment(),l=b.canReplyToReplies(),t=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="light-dark(whiteSmoke, "++l&&l.getRevisions?l.getRevisions(c,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language",+"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,f,l,t,z,C,F,N){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,f,l,t,z,C,F,N)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");+return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca,X,aa,ia){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,l,t,z,C,F,N,K,J,da,ea,ca,X,aa,ia)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");+return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,f,l,t)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,f)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=+function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,f,l,t)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,f,l,t,z){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,f,l,t,z)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=+urlParams.forceMigration)return null;for(var c=[],f=0;f<localStorage.length;f++){var l=localStorage.key(f),t=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<t.length){var z="<mxfile "===t.substring(0,8)||"<?xml"===t.substring(0,5)||"\x3c!--[if IE]>"===t.substring(0,12);t="<mxlibrary>"===t.substring(0,11);(z||t)&&c.push(l)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;+var f=localStorage.getItem(c);return{title:c,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();+var CommentsWindow=function(b,e,g,m,u,p){function B(){for(var aa=F.getElementsByTagName("div"),ia=0,la=0;la<aa.length;la++)"none"!=aa[la].style.display&&aa[la].parentNode==F&&ia++;N.style.display=0==ia?"block":"none"}function H(aa,ia,la,Y){function ma(){ia.removeChild(A);ia.removeChild(I);k.style.display="block";Z.style.display="block"}t={div:ia,comment:aa,saveCallback:la,deleteOnCancel:Y};var Z=ia.querySelector(".geCommentTxt"),k=ia.querySelector(".geCommentActionsList"),A=document.createElement("textarea");+A.className="geCommentEditTxtArea";A.style.minHeight=Z.offsetHeight+"px";A.value=aa.content;ia.insertBefore(A,Z);var I=document.createElement("div");I.className="geCommentEditBtns";var T=mxUtils.button(mxResources.get("cancel"),function(){Y?(ia.parentNode.removeChild(ia),B()):ma();t=null});T.className="geCommentEditBtn";I.appendChild(T);var O=mxUtils.button(mxResources.get("save"),function(){Z.innerText="";aa.content=A.value;mxUtils.write(Z,aa.content);ma();la(aa);t=null});mxEvent.addListener(A,"keydown",+mxUtils.bind(this,function(U){mxEvent.isConsumed(U)||((mxEvent.isControlDown(U)||mxClient.IS_MAC&&mxEvent.isMetaDown(U))&&13==U.keyCode?(O.click(),mxEvent.consume(U)):27==U.keyCode&&(T.click(),mxEvent.consume(U)))}));O.focus();O.className="geCommentEditBtn gePrimaryBtn";I.appendChild(O);ia.insertBefore(I,Z);k.style.display="none";Z.style.display="none";A.focus()}function S(aa,ia){ia.innerText="";aa=new Date(aa.modifiedDate);var la=b.timeSince(aa);null==la&&(la=mxResources.get("lessThanAMinute"));+mxUtils.write(ia,mxResources.get("timeAgo",[la],"{1} ago"));ia.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString())}function G(aa){var ia=document.createElement("img");ia.className="geCommentBusyImg";ia.src=IMAGE_PATH+"/spin.gif";aa.appendChild(ia);aa.busyImg=ia}function P(aa){aa.style.border="1px solid red";aa.busyImg.parentNode==aa&&aa.removeChild(aa.busyImg)}function Q(aa){aa.style.border="";aa.busyImg.parentNode==aa&&aa.removeChild(aa.busyImg)}function c(aa,ia,la,Y,ma){function Z(ba,+fa,pa){var sa=document.createElement("li");sa.className="geCommentAction";var qa=document.createElement("a");qa.className="geCommentActionLnk";mxUtils.write(qa,ba);sa.appendChild(qa);mxEvent.addListener(qa,"click",function(wa){fa(wa,aa);wa.preventDefault();mxEvent.consume(wa)});V.appendChild(sa);pa&&(sa.style.display="none")}function k(){function ba(sa){fa.push(pa);if(null!=sa.replies)for(var qa=0;qa<sa.replies.length;qa++)pa=pa.nextSibling,ba(sa.replies[qa])}var fa=[],pa=I;ba(aa);return{pdiv:pa,+replies:fa}}function A(ba,fa,pa,sa,qa){function wa(){G(ra);aa.addReply(Da,function(ya){Da.id=ya;aa.replies.push(Da);Q(ra);pa&&pa()},function(ya){Aa();P(ra);b.handleError(ya,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},sa,qa)}function Aa(){H(Da,ra,function(ya){wa()},!0)}var za=k().pdiv,Da=b.newComment(ba,b.getCurrentUser());Da.pCommentId=aa.id;null==aa.replies&&(aa.replies=[]);var ra=c(Da,aa.replies,za,Y+1);fa?Aa():wa()}if(ma||!aa.isResolved){N.style.display="none";var I=+document.createElement("div");I.className="geCommentContainer";I.setAttribute("data-commentId",aa.id);I.style.marginLeft=20*Y+5+"px";aa.isResolved&&(z.style.opacity="0.7");var T=document.createElement("div");T.className="geCommentHeader";var O=document.createElement("img");O.className="geCommentUserImg";O.src=null!=aa.user&&null!=aa.user.pictureUrl?aa.user.pictureUrl:Editor.userImage;T.appendChild(O);O=document.createElement("div");O.className="geCommentHeaderTxt";T.appendChild(O);var U=document.createElement("div");+U.className="geCommentUsername";mxUtils.write(U,null!=aa.user?aa.user.displayName:mxResources.get("unknownUser"));O.appendChild(U);U=document.createElement("div");U.className="geCommentDate";U.setAttribute("data-commentId",aa.id);S(aa,U);O.appendChild(U);I.appendChild(T);T=document.createElement("div");T.className="geCommentTxt";mxUtils.write(T,aa.content||"");I.appendChild(T);aa.isLocked&&(I.style.opacity="0.5");T=document.createElement("div");T.className="geCommentActions";var V=document.createElement("ul");+V.className="geCommentActionsList";T.appendChild(V);f||aa.isLocked||0!=Y&&!l||Z(mxResources.get("reply"),function(){A("",!0)},aa.isResolved);O=b.getCurrentUser();null==O||null==aa.user||O.id!=aa.user.id||f||aa.isLocked||(Z(mxResources.get("edit"),function(){function ba(){H(aa,I,function(){G(I);aa.editComment(aa.content,function(){Q(I)},function(fa){P(I);ba();b.handleError(fa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}ba()},aa.isResolved),Z(mxResources.get("delete"),+function(){b.confirm(mxResources.get("areYouSure"),function(){G(I);aa.deleteComment(function(ba){if(!0===ba){ba=I.querySelector(".geCommentTxt");ba.innerText="";mxUtils.write(ba,mxResources.get("msgDeleted"));var fa=I.querySelectorAll(".geCommentAction");for(ba=0;ba<fa.length;ba++)fa[ba].parentNode.removeChild(fa[ba]);Q(I);I.style.opacity="0.5"}else{fa=k(aa).replies;for(ba=0;ba<fa.length;ba++)F.removeChild(fa[ba]);for(ba=0;ba<ia.length;ba++)if(ia[ba]==aa){ia.splice(ba,1);break}N.style.display=0==+F.getElementsByTagName("div").length?"block":"none"}},function(ba){P(I);b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},aa.isResolved));f||aa.isLocked||0!=Y||Z(aa.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(ba){function fa(){var pa=ba.target;pa.innerText="";aa.isResolved=!aa.isResolved;mxUtils.write(pa,aa.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var sa=aa.isResolved?"none":"",qa=k(aa).replies,wa=+"light-dark("+(aa.isResolved?"ghostWhite":"white")+", transparent)",Aa=0;Aa<qa.length;Aa++){qa[Aa].style.backgroundColor=wa;for(var za=qa[Aa].querySelectorAll(".geCommentAction"),Da=0;Da<za.length;Da++)za[Da]!=pa.parentNode&&(za[Da].style.display=sa);ea||(qa[Aa].style.display="none")}B()}aa.isResolved?A(mxResources.get("reOpened")+": ",!0,fa,!1,!0):A(mxResources.get("markedAsResolved"),!1,fa,!0)});I.appendChild(T);null!=la?F.insertBefore(I,la.nextSibling):F.appendChild(I);for(la=0;null!=aa.replies&&+la<aa.replies.length;la++)T=aa.replies[la],T.isResolved=aa.isResolved,c(T,aa.replies,null,Y+1,ma);null!=t&&(t.comment.id==aa.id?(ma=aa.content,aa.content=t.comment.content,H(aa,I,t.saveCallback,t.deleteOnCancel),aa.content=ma):null==t.comment.id&&t.comment.pCommentId==aa.id&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return I}}var f=!b.canComment(),l=b.canReplyToReplies(),t=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="light-dark(whiteSmoke, "+Editor.darkColor+")";var C=EditorUi.compactUi?"26px":"30px",F=document.createElement("div");F.className="geCommentsList";F.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+")";F.style.bottom=parseInt(C)+7+"px";z.appendChild(F);var N=document.createElement("span");N.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(N,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=C;K.style.padding="3px 4px 4px 4px";C=document.createElement("a");C.className="geToolbarButton geAdaptiveAsset geToggleItem";C.style.width="16px";C.style.height="18px";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="20px";C.style.margin="0 2px";C.style.display="inline-block";C.style.cursor="pointer";if(!f){var J=C.cloneNode();J.style.backgroundImage="url("+Editor.plusImage+")";J.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(J,-"click",function(ba){function ha(){H(la,Y,function(ma){G(Y);b.addComment(ma,function(Z){ma.id=Z;ca.push(ma);R(Y)},function(Z){P(Y);ha();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var la=b.newComment("",b.getCurrentUser()),Y=c(la,ca,null,0);ha();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(J)}var da=C.cloneNode();da.classList.add("geToggleItem");da.style.backgroundImage="url("+Editor.checkImage+")";da.setAttribute("title",mxResources.get("showResolved"));-var ea=!1;mxEvent.addListener(da,"click",function(ba){(ea=!ea)?da.classList.add("geActiveItem"):da.classList.remove("geActiveItem");W();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(da);b.commentsRefreshNeeded()&&(J=C.cloneNode(),J.style.backgroundImage="url("+Editor.refreshImage+")",J.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(J,"click",function(ba){W();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(J));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML=-'<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),C.className="geButton geAdaptiveAsset",mxEvent.addListener(C,"click",function(ba){p();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(C));z.appendChild(K);var ca=[],W=mxUtils.bind(this,function(){this.hasError=!1;if(null!=t)try{t.div=t.div.cloneNode(!0);var ba=t.div.querySelector(".geCommentEditTxtArea"),ha=t.div.querySelector(".geCommentEditBtns");t.comment.content=ba.value;-ba.parentNode.removeChild(ba);ha.parentNode.removeChild(ha)}catch(la){b.handleError(la)}F.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";l=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(la){function Y(ma){if(null!=ma){ma.sort(function(k,A){return new Date(k.modifiedDate)-new Date(A.modifiedDate)});for(var Z=0;Z<ma.length;Z++)Y(ma[Z].replies)}}la.sort(function(ma,+"click",function(aa){function ia(){H(la,Y,function(ma){G(Y);b.addComment(ma,function(Z){ma.id=Z;ca.push(ma);Q(Y)},function(Z){P(Y);ia();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var la=b.newComment("",b.getCurrentUser()),Y=c(la,ca,null,0);ia();aa.preventDefault();mxEvent.consume(aa)});K.appendChild(J)}var da=C.cloneNode();da.classList.add("geToggleItem");da.style.backgroundImage="url("+Editor.checkImage+")";da.setAttribute("title",mxResources.get("showResolved"));+var ea=!1;mxEvent.addListener(da,"click",function(aa){(ea=!ea)?da.classList.add("geActiveItem"):da.classList.remove("geActiveItem");X();aa.preventDefault();mxEvent.consume(aa)});K.appendChild(da);b.commentsRefreshNeeded()&&(J=C.cloneNode(),J.style.backgroundImage="url("+Editor.refreshImage+")",J.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(J,"click",function(aa){X();aa.preventDefault();mxEvent.consume(aa)}),K.appendChild(J));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML=+'<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),C.className="geButton geAdaptiveAsset",mxEvent.addListener(C,"click",function(aa){p();aa.preventDefault();mxEvent.consume(aa)}),K.appendChild(C));z.appendChild(K);var ca=[],X=mxUtils.bind(this,function(){this.hasError=!1;if(null!=t)try{t.div=t.div.cloneNode(!0);var aa=t.div.querySelector(".geCommentEditTxtArea"),ia=t.div.querySelector(".geCommentEditBtns");t.comment.content=aa.value;+aa.parentNode.removeChild(aa);ia.parentNode.removeChild(ia)}catch(la){b.handleError(la)}F.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";l=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(la){function Y(ma){if(null!=ma){ma.sort(function(k,A){return new Date(k.modifiedDate)-new Date(A.modifiedDate)});for(var Z=0;Z<ma.length;Z++)Y(ma[Z].replies)}}la.sort(function(ma,Z){return new Date(ma.modifiedDate)-new Date(Z.modifiedDate)});F.innerText="";F.appendChild(N);N.style.display="block";ca=la;for(la=0;la<ca.length;la++)Y(ca[la].replies),c(ca[la],ca,null,0,ea);null!=t&&null==t.comment.id&&null==t.comment.pCommentId&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel))},mxUtils.bind(this,function(la){F.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(la&&la.message?": "+la.message:""));this.hasError=!0})):F.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});-W();this.refreshComments=W;K=mxUtils.bind(this,function(){function ba(Z){var k=la[Z.id];if(null!=k)for(T(Z,k),k=0;null!=Z.replies&&k<Z.replies.length;k++)ba(Z.replies[k])}if(this.window.isVisible()){for(var ha=F.querySelectorAll(".geCommentDate"),la={},Y=0;Y<ha.length;Y++){var ma=ha[Y];la[ma.getAttribute("data-commentId")]=ma}for(Y=0;Y<ca.length;Y++)ba(ca[Y])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=new mxWindow(mxResources.get("comments"),z,e,g,m,u,!0,!0);this.window.minimumSize=-new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,g,m,u,p,B,H,T,G,P){var R=document.createElement("div");R.style.textAlign="center";P=null!=P?P:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=-P+"px";c.style.lineHeight="1.2em";mxUtils.write(c,e);R.appendChild(c);null!=G&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",G),c.appendChild(e),R.appendChild(c));G=document.createElement("div");G.style.textAlign="center";G.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(f.checked)});p.className="geBtn";+X();this.refreshComments=X;K=mxUtils.bind(this,function(){function aa(Z){var k=la[Z.id];if(null!=k)for(S(Z,k),k=0;null!=Z.replies&&k<Z.replies.length;k++)aa(Z.replies[k])}if(this.window.isVisible()){for(var ia=F.querySelectorAll(".geCommentDate"),la={},Y=0;Y<ia.length;Y++){var ma=ia[Y];la[ma.getAttribute("data-commentId")]=ma}for(Y=0;Y<ca.length;Y++)aa(ca[Y])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=new mxWindow(mxResources.get("comments"),z,e,g,m,u,!0,!0);this.window.minimumSize=+new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,g,m,u,p,B,H,S,G,P){var Q=document.createElement("div");Q.style.textAlign="center";P=null!=P?P:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=+P+"px";c.style.lineHeight="1.2em";mxUtils.write(c,e);Q.appendChild(c);null!=G&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",G),c.appendChild(e),Q.appendChild(c));G=document.createElement("div");G.style.textAlign="center";G.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(f.checked)});p.className="geBtn";null!=H&&(p.innerHTML=H+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&G.appendChild(p);var l=mxUtils.button(u||mxResources.get("ok"),function(){b.hideDialog();null!=g&&g(f.checked)});G.appendChild(l);null!=B?(l.innerHTML=B+"<br>"+l.innerHTML+"<br>",l.style.paddingBottom="8px",l.style.paddingTop="8px",l.style.height="auto",l.className="geBtn",l.style.width="40%"):l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||-G.appendChild(p);R.appendChild(G);T?(G.style.marginTop="10px",c=document.createElement("p"),c.style.marginTop="20px",c.style.marginBottom="0px",c.appendChild(f),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),c.appendChild(u),R.appendChild(c),mxEvent.addListener(u,"click",function(t){f.checked=!f.checked;mxEvent.consume(t)})):G.style.marginTop="12px";this.init=function(){l.focus()};this.container=R},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),+G.appendChild(p);Q.appendChild(G);S?(G.style.marginTop="10px",c=document.createElement("p"),c.style.marginTop="20px",c.style.marginBottom="0px",c.appendChild(f),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),c.appendChild(u),Q.appendChild(c),mxEvent.addListener(u,"click",function(t){f.checked=!f.checked;mxEvent.consume(t)})):G.style.marginTop="12px";this.init=function(){l.focus()};this.container=Q},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,e,g){this.ui=b;this.page=e;this.previous=this.name=g}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(b,e,g){this.ui=b;this.oldIndex=e;this.newIndex=g}@@ -4056,7 +4058,7 @@ function(){b.checkDefaultParent()}));var p=mxUtils.bind(this,function(){this.updthis.toolbar&&this.toolbar.updateZoom()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(B,H){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}))}};EditorUi.prototype.scrollToPage=function(b,e){var g=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),m=null!=b?b:this.currentPage;null!=g&&null!=this.tabScroller&&this.tabScroller.children.length>g&&null!=this.tabScroller.children[g]&&(m!=this.lastScrollPage||e)&&(this.tabScroller.children[g].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[g].className="geTab gePageTab geActivePage",this.lastScrollPage=m)};EditorUi.prototype.restoreViewState=function(b,e,g){b=null!=b?this.getPageById(b.getId()):null;var m=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(m.setViewState(e),this.editor.updateGraphComponents(),m.view.revalidate(),m.sizeDidChange()),m.container.scrollLeft=m.view.translate.x*m.view.scale+e.scrollLeft,m.container.scrollTop=m.view.translate.y*m.view.scale+e.scrollTop,m.restoreSelection(g))};-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),g=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),u=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),B=this.parseBackgroundImage(b.getAttribute("backgroundImage")),H=b.getAttribute("extFonts");if(H)try{H=H.split("|").map(function(T){T=T.split("^");return{name:T[0],url:T[1]}})}catch(T){console.log("ExtFonts format error: "+T.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),g=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),u=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),B=this.parseBackgroundImage(b.getAttribute("backgroundImage")),H=b.getAttribute("extFonts");if(H)try{H=H.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}})}catch(S){console.log("ExtFonts format error: "+S.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:B,pageScale:isNaN(g)?mxGraph.prototype.pageScale:g,pageFormat:isNaN(m)||isNaN(u)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,m,u),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:H||[]}};Graph.prototype.saveViewState=function(b,e,g,m){g||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",@@ -4080,7 +4082,7 @@ EditorUi.prototype.insertPage=function(b,e,g){this.editor.graph.isEnabled()&&(thEditorUi.prototype.createPage=function(b,e,g){e=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e,g);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var g=this.pages[e].getName();null!=g&&0<g.length&&(b[g]=g)}e=this.pages.length;do g=mxResources.get("pageWithNumber",[++e]);while(null!=b[g]);return g};EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,g=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=g){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var m=this.currentPage;m==b&&1<this.pages.length?(g==this.pages.length-1?g--:g++,m=this.pages[g]):1>=this.pages.length&&(m=this.insertPage(),e.model.execute(new RenamePage(this,m,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,m))}finally{e.model.endUpdate()}}}catch(u){this.handleError(u)}return b};EditorUi.prototype.duplicatePage=function(b,e){var g=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var u=b.node.cloneNode(!1);u.removeAttribute("id");var p={},B=m.createCellLookup([m.model.root]);g=new DiagramPage(u);g.root=m.cloneCell(m.model.root,null,p);var H=new mxGraphModel;H.prefix=Editor.guid()+"-";H.setRoot(g.root);m.updateCustomLinks(m.createCellMapping(p,B),[g.root]);g.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(g);-g.viewState.scale=1;delete g.viewState.scrollLeft;delete g.viewState.scrollTop;delete g.viewState.currentRoot;delete g.viewState.defaultParent;g.setName(e);g=this.insertPage(g,mxUtils.indexOf(this.pages,b)+1)}}catch(T){this.handleError(T)}return g};EditorUi.prototype.initDiagramNode=function(b,e){null==e&&(e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,e);EditorUi.removeChildNodes(b.node);b.node.appendChild(e)};+g.viewState.scale=1;delete g.viewState.scrollLeft;delete g.viewState.scrollTop;delete g.viewState.currentRoot;delete g.viewState.defaultParent;g.setName(e);g=this.insertPage(g,mxUtils.indexOf(this.pages,b)+1)}}catch(S){this.handleError(S)}return g};EditorUi.prototype.initDiagramNode=function(b,e){null==e&&(e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,e);EditorUi.removeChildNodes(b.node);b.node.appendChild(e)};EditorUi.prototype.clonePages=function(b){for(var e=[],g=[],m=0;m<b.length;m++)try{g.push(this.clonePage(b[m]))}catch(u){e.push(mxResources.get("pageWithNumber",[m+1])+": "+u.toString())}if(0<e.length){b=Error(e.join("\n"));try{0<g.length&&(b.fallbackFileData=this.getXmlForPages(g))}catch(u){}throw b;}return g};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),g=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(g,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);e.diagramModified=b.diagramModified;return e};EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(g){null!=g&&0<g.length&&this.editor.graph.model.execute(new RenamePage(this,b,g))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};@@ -4098,63 +4100,63 @@ EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(nEditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.thinArrowRightImage,mxUtils.bind(this,function(b){var e=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:e,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=e;mxEvent.consume(b)}))};EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.verticalDotsImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(mxUtils.bind(this,function(u,p){this.menus.get("pages").funct(u,p)}));e.div.className+=" geMenubarMenu";e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);e.destroy()});var g=mxEvent.getClientX(b),m=mxEvent.getClientY(b);e.popup(g,m,null,b);this.setCurrentMenu(e);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,e){var g=this.createTab(),m=b.getName()||mxResources.get("untitled"),u=b.getId();g.setAttribute("title",m+(null!=u?" ("+u+")":"")+" ["+e+"]");e=document.createElement("span");e.style.maxWidth="160px";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,m);g.appendChild(e);this.addTabListeners(b,g);return g};-EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var g=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(T){this.renamePage(b);mxEvent.consume(T)}));var m=document.createElement("div");m.className="geTabMenuButton";m.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";m.style.backgroundSize="10px";e.appendChild(m);var u=!1,p=!1,B=mxUtils.bind(this,-function(T){u=null!=this.currentMenu;p=b==this.currentPage;this.scrollToPage(b);g.isMouseDown||p||this.selectPage(b)}),H=mxUtils.bind(this,function(T){if(g.isEnabled()&&!g.isMouseDown&&(p&&(mxEvent.isTouchEvent(T)||mxEvent.getSource(T)==m)||mxEvent.isPopupTrigger(T))&&(g.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(T)||!u)){var G=new mxPopupMenu(this.createPageMenu(b));G.div.className+=" geMenubarMenu";G.smartSeparators=!0;G.showDisabled=!0;G.autoExpand=!0;G.hideMenu=mxUtils.bind(this,-function(){mxPopupMenu.prototype.hideMenu.apply(G,arguments);this.resetCurrentMenu();G.destroy()});var P=mxEvent.getClientX(T),R=mxEvent.getClientY(T);G.popup(P,R,null,T);this.setCurrentMenu(G,e)}mxEvent.consume(T)});mxEvent.addGestureListeners(m,B,null,H);mxEvent.addGestureListeners(e,B,null,H)};+EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var g=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(S){this.renamePage(b);mxEvent.consume(S)}));var m=document.createElement("div");m.className="geTabMenuButton";m.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";m.style.backgroundSize="10px";e.appendChild(m);var u=!1,p=!1,B=mxUtils.bind(this,+function(S){u=null!=this.currentMenu;p=b==this.currentPage;this.scrollToPage(b);g.isMouseDown||p||this.selectPage(b)}),H=mxUtils.bind(this,function(S){if(g.isEnabled()&&!g.isMouseDown&&(p&&(mxEvent.isTouchEvent(S)||mxEvent.getSource(S)==m)||mxEvent.isPopupTrigger(S))&&(g.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(S)||!u)){var G=new mxPopupMenu(this.createPageMenu(b));G.div.className+=" geMenubarMenu";G.smartSeparators=!0;G.showDisabled=!0;G.autoExpand=!0;G.hideMenu=mxUtils.bind(this,+function(){mxPopupMenu.prototype.hideMenu.apply(G,arguments);this.resetCurrentMenu();G.destroy()});var P=mxEvent.getClientX(S),Q=mxEvent.getClientY(S);G.popup(P,Q,null,S);this.setCurrentMenu(G,e)}mxEvent.consume(S)});mxEvent.addGestureListeners(m,B,null,H);mxEvent.addGestureListeners(e,B,null,H)};EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(g,m){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||g.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),m));g.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),m);g.addSeparator(m);this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",g,m,mxResources.get("move"));g.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),m);g.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,e)}),m)})};(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){e=m.oldIndex;m.oldIndex=m.newIndex;m.newIndex=e;return m};mxCodecRegistry.register(b)})();(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){e=m.previous;m.previous=m.name;m.name=e;return m};mxCodecRegistry.register(b)})();(function(){var b=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","page","previousPage"]);b.afterEncode=function(e,g,m){m.setAttribute("relatedPage",g.relatedPage.getId());null==g.index&&(m.setAttribute("name",g.relatedPage.getName()),null!=g.relatedPage.viewState&&m.setAttribute("viewState",JSON.stringify(g.relatedPage.viewState,function(u,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,u)?p:void 0})),null!=g.relatedPage.root&&e.encodeCell(g.relatedPage.root,m));return m};b.beforeDecode=function(e,g,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(g.getAttribute("relatedPage"));if(null==m.relatedPage){var u=g.ownerDocument.createElement("diagram");u.setAttribute("id",g.getAttribute("relatedPage"));u.setAttribute("name",g.getAttribute("name"));m.relatedPage=new DiagramPage(u);u=g.getAttribute("viewState");null!=u&&(m.relatedPage.viewState=JSON.parse(u),g.removeAttribute("viewState"));g=g.cloneNode(!0);u=g.firstChild;if(null!=u)for(m.relatedPage.root=e.decodeCell(u,!1),m=-u.nextSibling,u.parentNode.removeChild(u),u=m;null!=u;){m=u.nextSibling;if(u.nodeType==mxConstants.NODETYPE_ELEMENT){var p=u.getAttribute("id");null==e.lookup(p)&&e.decodeCell(u)}u.parentNode.removeChild(u);u=m}}return g};b.afterDecode=function(e,g,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,u,p,B,H){u=null!=u?u:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var T=p.slice(),G=0;G<p.length;G++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[G]),"treeFolding","0")&&this.foldTreeCell(m,p[G]);p=T;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=function(m,u){this.model.beginUpdate();try{var p=-[];this.traverse(u,!0,mxUtils.bind(this,function(H,T){var G=null!=T&&this.isTreeEdge(T);G&&p.push(T);H==u||null!=T&&!G||p.push(H);return(null==T||G)&&(H==u||!this.model.isCollapsed(H))}));this.model.setCollapsed(u,m);for(var B=0;B<p.length;B++)this.model.setVisible(p[B],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,u,p,B,H,T){return this.model.filterCells(this.getEdges(m,u,p,B,H,T),mxUtils.bind(this,+u.nextSibling,u.parentNode.removeChild(u),u=m;null!=u;){m=u.nextSibling;if(u.nodeType==mxConstants.NODETYPE_ELEMENT){var p=u.getAttribute("id");null==e.lookup(p)&&e.decodeCell(u)}u.parentNode.removeChild(u);u=m}}return g};b.afterDecode=function(e,g,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,u,p,B,H){u=null!=u?u:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var S=p.slice(),G=0;G<p.length;G++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[G]),"treeFolding","0")&&this.foldTreeCell(m,p[G]);p=S;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=function(m,u){this.model.beginUpdate();try{var p=+[];this.traverse(u,!0,mxUtils.bind(this,function(H,S){var G=null!=S&&this.isTreeEdge(S);G&&p.push(S);H==u||null!=S&&!G||p.push(H);return(null==S||G)&&(H==u||!this.model.isCollapsed(H))}));this.model.setCollapsed(u,m);for(var B=0;B<p.length;B++)this.model.setVisible(p[B],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,u,p,B,H,S){return this.model.filterCells(this.getEdges(m,u,p,B,H,S),mxUtils.bind(this,function(G){return this.isTreeEdge(G)}))};Graph.prototype.getIncomingTreeEdges=function(m,u){return this.getTreeEdges(m,u,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,u){return this.getTreeEdges(m,u,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(Y){return t.isVertex(Y)&&p(Y)}function u(Y){var ma=!1;null!=Y&&(ma="1"==l.getCurrentCellStyle(Y).treeMoving);return ma}function p(Y){var ma=!1;null!=Y&&(Y=t.getParent(Y),ma=l.view.getState(Y),ma="tree"==(null!=ma?ma.style:l.getCellStyle(Y)).containerType);return ma}function B(Y){var ma=!1;null!=Y&&(Y=t.getParent(Y),ma=l.view.getState(Y),l.view.getState(Y),ma=null!=(null!=ma?ma.style:l.getCellStyle(Y)).childLayout);return ma}function H(Y){Y=l.view.getState(Y);if(null!=Y){var ma=l.getIncomingTreeEdges(Y.cell);if(0<ma.length&&(ma=l.view.getState(ma[0]),null!=ma&&(ma=-ma.absolutePoints,null!=ma&&0<ma.length&&(ma=ma[ma.length-1],null!=ma)))){if(ma.y==Y.y&&Math.abs(ma.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_SOUTH;if(ma.y==Y.y+Y.height&&Math.abs(ma.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_NORTH;if(ma.x>Y.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function T(Y,ma){ma=null!=ma?ma:!0;l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=l.cloneCells([k[0],Y]);l.model.setTerminal(A[0],-l.model.getTerminal(k[0],!0),!0);var I=H(Y),U=Z.geometry;I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?A[1].geometry.x+=ma?Y.geometry.width+10:-A[1].geometry.width-10:A[1].geometry.y+=ma?Y.geometry.height+10:-A[1].geometry.height-10;l.view.currentRoot!=Z&&(A[1].geometry.x-=U.x,A[1].geometry.y-=U.y);var O=l.view.getState(Y),S=l.view.scale;if(null!=O){var X=mxRectangle.fromRectangle(O);I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?X.x+=(ma?Y.geometry.width+10:-A[1].geometry.width--10)*S:X.y+=(ma?Y.geometry.height+10:-A[1].geometry.height-10)*S;var aa=l.getOutgoingTreeEdges(l.model.getTerminal(k[0],!0));if(null!=aa){for(var ja=I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH,pa=U=k=0;pa<aa.length;pa++){var sa=l.model.getTerminal(aa[pa],!1);if(I==H(sa)){var qa=l.view.getState(sa);sa!=Y&&null!=qa&&(ja&&ma!=qa.getCenterX()<O.getCenterX()||!ja&&ma!=qa.getCenterY()<O.getCenterY())&&mxUtils.intersects(X,qa)&&(k=10+Math.max(k,(Math.min(X.x+X.width,qa.x+qa.width)-Math.max(X.x,-qa.x))/S),U=10+Math.max(U,(Math.min(X.y+X.height,qa.y+qa.height)-Math.max(X.y,qa.y))/S))}}ja?U=0:k=0;for(pa=0;pa<aa.length;pa++)if(sa=l.model.getTerminal(aa[pa],!1),I==H(sa)&&(qa=l.view.getState(sa),sa!=Y&&null!=qa&&(ja&&ma!=qa.getCenterX()<O.getCenterX()||!ja&&ma!=qa.getCenterY()<O.getCenterY()))){var wa=[];l.traverse(qa.cell,!0,function(Ba,za){var Ea=null!=za&&l.isTreeEdge(za);Ea&&wa.push(za);(null==za||Ea)&&wa.push(Ba);return null==za||Ea});l.moveCells(wa,(ma?1:-1)*k,(ma?1:-1)*U)}}}return l.addCells(A,-Z)}finally{l.model.endUpdate()}}function G(Y){l.model.beginUpdate();try{var ma=H(Y),Z=l.getIncomingTreeEdges(Y),k=l.cloneCells([Z[0],Y]);l.model.setTerminal(Z[0],k[1],!1);l.model.setTerminal(k[0],k[1],!0);l.model.setTerminal(k[0],Y,!1);var A=l.model.getParent(Y),I=A.geometry,U=[];l.view.currentRoot!=A&&(k[1].geometry.x-=I.x,k[1].geometry.y-=I.y);l.traverse(Y,!0,function(X,aa){var ja=null!=aa&&l.isTreeEdge(aa);ja&&U.push(aa);(null==aa||ja)&&U.push(X);return null==aa||ja});var O=Y.geometry.width+40,-S=Y.geometry.height+40;ma==mxConstants.DIRECTION_SOUTH?O=0:ma==mxConstants.DIRECTION_NORTH?(O=0,S=-S):ma==mxConstants.DIRECTION_WEST?(O=-O,S=0):ma==mxConstants.DIRECTION_EAST&&(S=0);l.moveCells(U,O,S);return l.addCells(k,A)}finally{l.model.endUpdate()}}function P(Y,ma){l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=H(Y);0==k.length&&(k=[l.createEdge(Z,null,"",null,null,l.createCurrentEdgeStyle())],A=ma);var I=l.cloneCells([k[0],Y]);l.model.setTerminal(I[0],Y,!0);-null==l.model.getTerminal(I[0],!1)&&(l.model.setTerminal(I[0],I[1],!1),l.applyNewEdgeStyle(I[1],[I[0]],A));k=l.getOutgoingTreeEdges(Y);var U=Z.geometry;ma=[];l.view.currentRoot==Z&&(U=new mxRectangle);for(var O=0;O<k.length;O++){var S=l.model.getTerminal(k[O],!1);null!=S&&ma.push(S)}var X=l.view.getBounds(ma),aa=l.view.translate,ja=l.view.scale;A==mxConstants.DIRECTION_SOUTH?(I[1].geometry.x=null==X?Y.geometry.x+(Y.geometry.width-I[1].geometry.width)/2:(X.x+X.width)/ja-aa.x-U.x+10,I[1].geometry.y+=-I[1].geometry.height-U.y+40):A==mxConstants.DIRECTION_NORTH?(I[1].geometry.x=null==X?Y.geometry.x+(Y.geometry.width-I[1].geometry.width)/2:(X.x+X.width)/ja-aa.x+-U.x+10,I[1].geometry.y-=I[1].geometry.height+U.y+40):(I[1].geometry.x=A==mxConstants.DIRECTION_WEST?I[1].geometry.x-(I[1].geometry.width+U.x+40):I[1].geometry.x+(I[1].geometry.width-U.x+40),I[1].geometry.y=null==X?Y.geometry.y+(Y.geometry.height-I[1].geometry.height)/2:(X.y+X.height)/ja-aa.y+-U.y+10);return l.addCells(I,Z)}finally{l.model.endUpdate()}}-function R(Y,ma,Z){Y=l.getOutgoingTreeEdges(Y);Z=l.view.getState(Z);var k=[];if(null!=Z&&null!=Y){for(var A=0;A<Y.length;A++){var I=l.view.getState(l.model.getTerminal(Y[A],!1));null!=I&&(!ma&&Math.min(I.x+I.width,Z.x+Z.width)>=Math.max(I.x,Z.x)||ma&&Math.min(I.y+I.height,Z.y+Z.height)>=Math.max(I.y,Z.y))&&k.push(I)}k.sort(function(U,O){return ma?U.x+U.width-O.x-O.width:U.y+U.height-O.y-O.height})}return k}function c(Y,ma){var Z=H(Y),k=ma==mxConstants.DIRECTION_EAST||ma==mxConstants.DIRECTION_WEST;-(Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST)==k&&Z!=ma?f.actions.get("selectParent").funct():Z==ma?(ma=l.getOutgoingTreeEdges(Y),null!=ma&&0<ma.length&&l.setSelectionCell(l.model.getTerminal(ma[0],!1))):(Z=l.getIncomingTreeEdges(Y),null!=Z&&0<Z.length&&(k=R(l.model.getTerminal(Z[0],!0),k,Y),Y=l.view.getState(Y),null!=Y&&(Y=mxUtils.indexOf(k,Y),0<=Y&&(Y+=ma==mxConstants.DIRECTION_NORTH||ma==mxConstants.DIRECTION_WEST?-1:1,0<=Y&&Y<=k.length-1&&l.setSelectionCell(k[Y].cell)))))}var f=+ma.absolutePoints,null!=ma&&0<ma.length&&(ma=ma[ma.length-1],null!=ma)))){if(ma.y==Y.y&&Math.abs(ma.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_SOUTH;if(ma.y==Y.y+Y.height&&Math.abs(ma.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_NORTH;if(ma.x>Y.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(Y,ma){ma=null!=ma?ma:!0;l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=l.cloneCells([k[0],Y]);l.model.setTerminal(A[0],+l.model.getTerminal(k[0],!0),!0);var I=H(Y),T=Z.geometry;I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?A[1].geometry.x+=ma?Y.geometry.width+10:-A[1].geometry.width-10:A[1].geometry.y+=ma?Y.geometry.height+10:-A[1].geometry.height-10;l.view.currentRoot!=Z&&(A[1].geometry.x-=T.x,A[1].geometry.y-=T.y);var O=l.view.getState(Y),U=l.view.scale;if(null!=O){var V=mxRectangle.fromRectangle(O);I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?V.x+=(ma?Y.geometry.width+10:-A[1].geometry.width-+10)*U:V.y+=(ma?Y.geometry.height+10:-A[1].geometry.height-10)*U;var ba=l.getOutgoingTreeEdges(l.model.getTerminal(k[0],!0));if(null!=ba){for(var fa=I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH,pa=T=k=0;pa<ba.length;pa++){var sa=l.model.getTerminal(ba[pa],!1);if(I==H(sa)){var qa=l.view.getState(sa);sa!=Y&&null!=qa&&(fa&&ma!=qa.getCenterX()<O.getCenterX()||!fa&&ma!=qa.getCenterY()<O.getCenterY())&&mxUtils.intersects(V,qa)&&(k=10+Math.max(k,(Math.min(V.x+V.width,qa.x+qa.width)-Math.max(V.x,+qa.x))/U),T=10+Math.max(T,(Math.min(V.y+V.height,qa.y+qa.height)-Math.max(V.y,qa.y))/U))}}fa?T=0:k=0;for(pa=0;pa<ba.length;pa++)if(sa=l.model.getTerminal(ba[pa],!1),I==H(sa)&&(qa=l.view.getState(sa),sa!=Y&&null!=qa&&(fa&&ma!=qa.getCenterX()<O.getCenterX()||!fa&&ma!=qa.getCenterY()<O.getCenterY()))){var wa=[];l.traverse(qa.cell,!0,function(Aa,za){var Da=null!=za&&l.isTreeEdge(za);Da&&wa.push(za);(null==za||Da)&&wa.push(Aa);return null==za||Da});l.moveCells(wa,(ma?1:-1)*k,(ma?1:-1)*T)}}}return l.addCells(A,+Z)}finally{l.model.endUpdate()}}function G(Y){l.model.beginUpdate();try{var ma=H(Y),Z=l.getIncomingTreeEdges(Y),k=l.cloneCells([Z[0],Y]);l.model.setTerminal(Z[0],k[1],!1);l.model.setTerminal(k[0],k[1],!0);l.model.setTerminal(k[0],Y,!1);var A=l.model.getParent(Y),I=A.geometry,T=[];l.view.currentRoot!=A&&(k[1].geometry.x-=I.x,k[1].geometry.y-=I.y);l.traverse(Y,!0,function(V,ba){var fa=null!=ba&&l.isTreeEdge(ba);fa&&T.push(ba);(null==ba||fa)&&T.push(V);return null==ba||fa});var O=Y.geometry.width+40,+U=Y.geometry.height+40;ma==mxConstants.DIRECTION_SOUTH?O=0:ma==mxConstants.DIRECTION_NORTH?(O=0,U=-U):ma==mxConstants.DIRECTION_WEST?(O=-O,U=0):ma==mxConstants.DIRECTION_EAST&&(U=0);l.moveCells(T,O,U);return l.addCells(k,A)}finally{l.model.endUpdate()}}function P(Y,ma){l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=H(Y);0==k.length&&(k=[l.createEdge(Z,null,"",null,null,l.createCurrentEdgeStyle())],A=ma);var I=l.cloneCells([k[0],Y]);l.model.setTerminal(I[0],Y,!0);+null==l.model.getTerminal(I[0],!1)&&(l.model.setTerminal(I[0],I[1],!1),l.applyNewEdgeStyle(I[1],[I[0]],A));k=l.getOutgoingTreeEdges(Y);var T=Z.geometry;ma=[];l.view.currentRoot==Z&&(T=new mxRectangle);for(var O=0;O<k.length;O++){var U=l.model.getTerminal(k[O],!1);null!=U&&ma.push(U)}var V=l.view.getBounds(ma),ba=l.view.translate,fa=l.view.scale;A==mxConstants.DIRECTION_SOUTH?(I[1].geometry.x=null==V?Y.geometry.x+(Y.geometry.width-I[1].geometry.width)/2:(V.x+V.width)/fa-ba.x-T.x+10,I[1].geometry.y+=+I[1].geometry.height-T.y+40):A==mxConstants.DIRECTION_NORTH?(I[1].geometry.x=null==V?Y.geometry.x+(Y.geometry.width-I[1].geometry.width)/2:(V.x+V.width)/fa-ba.x+-T.x+10,I[1].geometry.y-=I[1].geometry.height+T.y+40):(I[1].geometry.x=A==mxConstants.DIRECTION_WEST?I[1].geometry.x-(I[1].geometry.width+T.x+40):I[1].geometry.x+(I[1].geometry.width-T.x+40),I[1].geometry.y=null==V?Y.geometry.y+(Y.geometry.height-I[1].geometry.height)/2:(V.y+V.height)/fa-ba.y+-T.y+10);return l.addCells(I,Z)}finally{l.model.endUpdate()}}+function Q(Y,ma,Z){Y=l.getOutgoingTreeEdges(Y);Z=l.view.getState(Z);var k=[];if(null!=Z&&null!=Y){for(var A=0;A<Y.length;A++){var I=l.view.getState(l.model.getTerminal(Y[A],!1));null!=I&&(!ma&&Math.min(I.x+I.width,Z.x+Z.width)>=Math.max(I.x,Z.x)||ma&&Math.min(I.y+I.height,Z.y+Z.height)>=Math.max(I.y,Z.y))&&k.push(I)}k.sort(function(T,O){return ma?T.x+T.width-O.x-O.width:T.y+T.height-O.y-O.height})}return k}function c(Y,ma){var Z=H(Y),k=ma==mxConstants.DIRECTION_EAST||ma==mxConstants.DIRECTION_WEST;+(Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST)==k&&Z!=ma?f.actions.get("selectParent").funct():Z==ma?(ma=l.getOutgoingTreeEdges(Y),null!=ma&&0<ma.length&&l.setSelectionCell(l.model.getTerminal(ma[0],!1))):(Z=l.getIncomingTreeEdges(Y),null!=Z&&0<Z.length&&(k=Q(l.model.getTerminal(Z[0],!0),k,Y),Y=l.view.getState(Y),null!=Y&&(Y=mxUtils.indexOf(k,Y),0<=Y&&(Y+=ma==mxConstants.DIRECTION_NORTH||ma==mxConstants.DIRECTION_WEST?-1:1,0<=Y&&Y<=k.length-1&&l.setSelectionCell(k[Y].cell)))))}var f=this,l=f.editor.graph,t=l.getModel(),z=f.menus.createPopupMenu;f.menus.createPopupMenu=function(Y,ma,Z){z.apply(this,arguments);if(1==l.getSelectionCount()){ma=l.getSelectionCell();var k=l.getOutgoingTreeEdges(ma);Y.addSeparator();0<k.length&&(m(l.getSelectionCell())&&this.addMenuItems(Y,["selectChildren"],null,Z),this.addMenuItems(Y,["selectDescendants"],null,Z));m(l.getSelectionCell())?(Y.addSeparator(),0<l.getIncomingTreeEdges(ma).length&&this.addMenuItems(Y,["selectSiblings","selectParent"],null,Z)):0<l.model.getEdgeCount(ma)&&this.addMenuItems(Y,["selectConnections"],null,Z)}};f.actions.addAction("selectChildren",function(Y){if(l.isEnabled()&&1==l.getSelectionCount()){var ma=l.getSelectionCell();Y=mxEvent.isControlDown(Y)?null:l.getOutgoingTreeEdges(ma);if(null!=Y&&0<Y.length){ma=[];for(var Z=0;Z<Y.length;Z++)ma.push(l.model.getTerminal(Y[Z],!1));l.setSelectionCells(ma)}else l.setSelectionCells(l.model.getChildren(ma))}},null,null,"Alt+Shift+C");f.actions.addAction("selectDescendants",function(Y){var ma=l.getSelectionCell();if(l.isEnabled()&&null!=ma){var Z=[];mxEvent.isControlDown(Y)||l.traverse(ma,!0,function(k,A){var I=null!=A&&l.isTreeEdge(A);I&&mxEvent.isControlDown(Y)&&Z.push(A);(null==A||I)&&Z.push(k);return null==A||I});if(0==Z.length||1==Z.length&&Z[0]==ma)Z=l.model.getDescendants(ma);l.setSelectionCells(Z)}},null,null,"Alt+Shift+X");f.actions.addAction("selectParent",function(Y){var ma=l.getSelectionCell();l.isEnabled()&&null!=ma&&(Y=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(ma),null!=Y&&0<Y.length?l.setSelectionCell(l.model.getTerminal(Y[0],!0)):l.selectParentCell())},null,null,"Alt+Shift+P");f.actions.addAction("selectSiblings",function(Y){if(l.isEnabled()&&1==l.getSelectionCount()){var ma=l.getSelectionCell(),Z=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(ma);Y=[];if(null!=Z&&0<Z.length&&(Z=l.getOutgoingTreeEdges(l.model.getTerminal(Z[0],!0)),null!=Z))for(var k=0;k<Z.length;k++)Y.push(l.model.getTerminal(Z[k],!1));0==Y.length&&(Y=l.model.getChildren(l.model.getParent(ma)));-l.setSelectionCells(Y)}},null,null,"Alt+Shift+S");var C=l.removeCells;l.removeCells=function(Y,ma){ma=null!=ma?ma:!0;null==Y&&(Y=this.getDeletableCells(this.getSelectionCells()));ma&&(Y=this.getDeletableCells(this.addAllEdges(Y)));for(var Z=[],k=0;k<Y.length;k++){var A=Y[k];t.isEdge(A)&&p(A)&&(Z.push(A),A=t.getTerminal(A,!1));if(m(A)){var I=[];l.traverse(A,!0,function(U,O){var S=null!=O&&l.isTreeEdge(O);S&&I.push(O);(null==O||S)&&I.push(U);return null==O||S});0<I.length&&(Z=Z.concat(I),A=l.getIncomingTreeEdges(Y[k]),-Y=Y.concat(A))}else null!=A&&Z.push(Y[k])}Y=Z;return C.apply(this,arguments)};f.hoverIcons.getStateAt=function(Y,ma,Z){return m(Y.cell)?null:this.graph.view.getState(this.graph.getCellAt(ma,Z))};var F=l.duplicateCells;l.duplicateCells=function(Y,ma){Y=null!=Y?Y:this.getSelectionCells();for(var Z=Y.slice(0),k=0;k<Z.length;k++){var A=l.view.getState(Z[k]);if(null!=A&&m(A.cell)){var I=l.getIncomingTreeEdges(A.cell);for(A=0;A<I.length;A++)mxUtils.remove(I[A],Y)}}this.model.beginUpdate();try{var U=F.call(this,-Y,ma);if(U.length==Y.length)for(k=0;k<Y.length;k++)if(m(Y[k])){var O=l.getIncomingTreeEdges(U[k]);I=l.getIncomingTreeEdges(Y[k]);if(0==O.length&&0<I.length){var S=this.cloneCell(I[0]);this.addEdge(S,l.getDefaultParent(),this.model.getTerminal(I[0],!0),U[k])}}}finally{this.model.endUpdate()}return U};var N=l.moveCells;l.moveCells=function(Y,ma,Z,k,A,I,U){for(var O=null,S=[],X=0;X<Y.length;X++)(u(Y[X])||m(Y[X]))&&!B(Y[X])&&this.isCellCollapsed(Y[X])?S=S.concat(this.getSubtree(Y[X])):S.push(Y[X]);Y=-mxUtils.removeDuplicates(S);this.model.beginUpdate();try{S=A;var aa=this.getCurrentCellStyle(A);if(null!=Y&&m(A)&&"1"==mxUtils.getValue(aa,"treeFolding","0")){for(X=0;X<Y.length;X++)if(m(Y[X])||l.model.isEdge(Y[X])&&null==l.model.getTerminal(Y[X],!0)){A=l.model.getParent(Y[X]);break}if(null!=S&&A!=S&&null!=this.view.getState(Y[0])){var ja=l.getIncomingTreeEdges(Y[0]);if(0<ja.length){var pa=l.view.getState(l.model.getTerminal(ja[0],!0));if(null!=pa){var sa=l.view.getState(S);null!=sa&&(ma=(sa.getCenterX()--pa.getCenterX())/l.view.scale,Z=(sa.getCenterY()-pa.getCenterY())/l.view.scale)}}}}O=N.apply(this,arguments);if(null!=O&&null!=Y&&O.length==Y.length)for(X=0;X<O.length;X++)if(this.model.isEdge(O[X]))m(S)&&0>mxUtils.indexOf(O,this.model.getTerminal(O[X],!0))&&this.model.setTerminal(O[X],S,!0);else if(m(Y[X])&&(ja=l.getIncomingTreeEdges(Y[X]),0<ja.length))if(!k)m(S)&&0>mxUtils.indexOf(Y,this.model.getTerminal(ja[0],!0))&&this.model.setTerminal(ja[0],S,!0);else if(0==l.getIncomingTreeEdges(O[X]).length){aa=-S;if(null==aa||aa==l.model.getParent(Y[X]))aa=l.model.getTerminal(ja[0],!0);k=this.cloneCell(ja[0]);this.addEdge(k,l.getDefaultParent(),aa,O[X])}}finally{this.model.endUpdate()}return O};if(null!=f.sidebar){var K=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(Y,ma,Z,k){var A=l.model,I=null;A.beginUpdate();try{if(I=K.apply(this,arguments),m(Y))for(var U=0;U<I.length;U++)if(A.isEdge(I[U])&&null==A.getTerminal(I[U],!0)){A.setTerminal(I[U],Y,!0);var O=l.getCellGeometry(I[U]);O.points=null;+l.setSelectionCells(Y)}},null,null,"Alt+Shift+S");var C=l.removeCells;l.removeCells=function(Y,ma){ma=null!=ma?ma:!0;null==Y&&(Y=this.getDeletableCells(this.getSelectionCells()));ma&&(Y=this.getDeletableCells(this.addAllEdges(Y)));for(var Z=[],k=0;k<Y.length;k++){var A=Y[k];t.isEdge(A)&&p(A)&&(Z.push(A),A=t.getTerminal(A,!1));if(m(A)){var I=[];l.traverse(A,!0,function(T,O){var U=null!=O&&l.isTreeEdge(O);U&&I.push(O);(null==O||U)&&I.push(T);return null==O||U});0<I.length&&(Z=Z.concat(I),A=l.getIncomingTreeEdges(Y[k]),+Y=Y.concat(A))}else null!=A&&Z.push(Y[k])}Y=Z;return C.apply(this,arguments)};f.hoverIcons.getStateAt=function(Y,ma,Z){return m(Y.cell)?null:this.graph.view.getState(this.graph.getCellAt(ma,Z))};var F=l.duplicateCells;l.duplicateCells=function(Y,ma){Y=null!=Y?Y:this.getSelectionCells();for(var Z=Y.slice(0),k=0;k<Z.length;k++){var A=l.view.getState(Z[k]);if(null!=A&&m(A.cell)){var I=l.getIncomingTreeEdges(A.cell);for(A=0;A<I.length;A++)mxUtils.remove(I[A],Y)}}this.model.beginUpdate();try{var T=F.call(this,+Y,ma);if(T.length==Y.length)for(k=0;k<Y.length;k++)if(m(Y[k])){var O=l.getIncomingTreeEdges(T[k]);I=l.getIncomingTreeEdges(Y[k]);if(0==O.length&&0<I.length){var U=this.cloneCell(I[0]);this.addEdge(U,l.getDefaultParent(),this.model.getTerminal(I[0],!0),T[k])}}}finally{this.model.endUpdate()}return T};var N=l.moveCells;l.moveCells=function(Y,ma,Z,k,A,I,T){for(var O=null,U=[],V=0;V<Y.length;V++)(u(Y[V])||m(Y[V]))&&!B(Y[V])&&this.isCellCollapsed(Y[V])?U=U.concat(this.getSubtree(Y[V])):U.push(Y[V]);Y=+mxUtils.removeDuplicates(U);this.model.beginUpdate();try{U=A;var ba=this.getCurrentCellStyle(A);if(null!=Y&&m(A)&&"1"==mxUtils.getValue(ba,"treeFolding","0")){for(V=0;V<Y.length;V++)if(m(Y[V])||l.model.isEdge(Y[V])&&null==l.model.getTerminal(Y[V],!0)){A=l.model.getParent(Y[V]);break}if(null!=U&&A!=U&&null!=this.view.getState(Y[0])){var fa=l.getIncomingTreeEdges(Y[0]);if(0<fa.length){var pa=l.view.getState(l.model.getTerminal(fa[0],!0));if(null!=pa){var sa=l.view.getState(U);null!=sa&&(ma=(sa.getCenterX()-+pa.getCenterX())/l.view.scale,Z=(sa.getCenterY()-pa.getCenterY())/l.view.scale)}}}}O=N.apply(this,arguments);if(null!=O&&null!=Y&&O.length==Y.length)for(V=0;V<O.length;V++)if(this.model.isEdge(O[V]))m(U)&&0>mxUtils.indexOf(O,this.model.getTerminal(O[V],!0))&&this.model.setTerminal(O[V],U,!0);else if(m(Y[V])&&(fa=l.getIncomingTreeEdges(Y[V]),0<fa.length))if(!k)m(U)&&0>mxUtils.indexOf(Y,this.model.getTerminal(fa[0],!0))&&this.model.setTerminal(fa[0],U,!0);else if(0==l.getIncomingTreeEdges(O[V]).length){ba=+U;if(null==ba||ba==l.model.getParent(Y[V]))ba=l.model.getTerminal(fa[0],!0);k=this.cloneCell(fa[0]);this.addEdge(k,l.getDefaultParent(),ba,O[V])}}finally{this.model.endUpdate()}return O};if(null!=f.sidebar){var K=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(Y,ma,Z,k){var A=l.model,I=null;A.beginUpdate();try{if(I=K.apply(this,arguments),m(Y))for(var T=0;T<I.length;T++)if(A.isEdge(I[T])&&null==A.getTerminal(I[T],!0)){A.setTerminal(I[T],Y,!0);var O=l.getCellGeometry(I[T]);O.points=null;null!=O.getTerminalPoint(!0)&&O.setTerminalPoint(null,!0)}}finally{A.endUpdate()}return I}}var J={67:f.actions.get("selectChildren"),88:f.actions.get("selectDescendants"),80:f.actions.get("selectParent"),83:f.actions.get("selectSiblings")},da={67:f.actions.get("copyStyle"),86:f.actions.get("pasteStyle")},ea=f.onKeyDown;f.onKeyDown=function(Y){try{var ma=l.getSelectionCell();if(l.isEnabled()&&!l.isEditing()&&null!=ma){var Z=mxEvent.isAltDown(Y)&&mxEvent.isShiftDown(Y)?J[Y.keyCode]:mxEvent.isAltDown(Y)?-da[Y.keyCode]:null;null!=Z?(Z.funct(Y),mxEvent.consume(Y)):m(ma)&&(Z=null,0<l.getIncomingTreeEdges(ma).length&&(9==Y.which?Z=mxEvent.isShiftDown(Y)?G(ma):P(ma):13==Y.which&&(Z=T(ma,!mxEvent.isShiftDown(Y)))),null!=Z&&0<Z.length?(1==Z.length&&l.model.isEdge(Z[0])?l.setSelectionCell(l.model.getTerminal(Z[0],!1)):l.setSelectionCell(Z[Z.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(l.view.getState(ma)),l.startEditingAtCell(ma),mxEvent.consume(Y)):37==Y.keyCode?(c(ma,mxConstants.DIRECTION_WEST),mxEvent.consume(Y)):-38==Y.keyCode?(c(ma,mxConstants.DIRECTION_NORTH),mxEvent.consume(Y)):39==Y.keyCode?(c(ma,mxConstants.DIRECTION_EAST),mxEvent.consume(Y)):40==Y.keyCode&&(c(ma,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Y)))}}catch(k){f.handleError(k)}mxEvent.isConsumed(Y)||ea.apply(this,arguments)};var ca=l.connectVertex;l.connectVertex=function(Y,ma,Z,k,A,I,U){var O=l.getIncomingTreeEdges(Y);if(m(Y)){var S=H(Y),X=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST,aa=ma==mxConstants.DIRECTION_EAST||ma==-mxConstants.DIRECTION_WEST;return S==ma||0==O.length?P(Y,ma):X==aa?G(Y):T(Y,ma!=mxConstants.DIRECTION_NORTH&&ma!=mxConstants.DIRECTION_WEST)}return ca.apply(this,arguments)};l.getSubtree=function(Y){var ma=[Y];!u(Y)&&!m(Y)||B(Y)||l.traverse(Y,!0,function(Z,k){var A=null!=k&&l.isTreeEdge(k);A&&0>mxUtils.indexOf(ma,k)&&ma.push(k);(null==k||A)&&0>mxUtils.indexOf(ma,Z)&&ma.push(Z);return null==k||A});return ma};var W=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){W.apply(this,+da[Y.keyCode]:null;null!=Z?(Z.funct(Y),mxEvent.consume(Y)):m(ma)&&(Z=null,0<l.getIncomingTreeEdges(ma).length&&(9==Y.which?Z=mxEvent.isShiftDown(Y)?G(ma):P(ma):13==Y.which&&(Z=S(ma,!mxEvent.isShiftDown(Y)))),null!=Z&&0<Z.length?(1==Z.length&&l.model.isEdge(Z[0])?l.setSelectionCell(l.model.getTerminal(Z[0],!1)):l.setSelectionCell(Z[Z.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(l.view.getState(ma)),l.startEditingAtCell(ma),mxEvent.consume(Y)):37==Y.keyCode?(c(ma,mxConstants.DIRECTION_WEST),mxEvent.consume(Y)):+38==Y.keyCode?(c(ma,mxConstants.DIRECTION_NORTH),mxEvent.consume(Y)):39==Y.keyCode?(c(ma,mxConstants.DIRECTION_EAST),mxEvent.consume(Y)):40==Y.keyCode&&(c(ma,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Y)))}}catch(k){f.handleError(k)}mxEvent.isConsumed(Y)||ea.apply(this,arguments)};var ca=l.connectVertex;l.connectVertex=function(Y,ma,Z,k,A,I,T){var O=l.getIncomingTreeEdges(Y);if(m(Y)){var U=H(Y),V=U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST,ba=ma==mxConstants.DIRECTION_EAST||ma==+mxConstants.DIRECTION_WEST;return U==ma||0==O.length?P(Y,ma):V==ba?G(Y):S(Y,ma!=mxConstants.DIRECTION_NORTH&&ma!=mxConstants.DIRECTION_WEST)}return ca.apply(this,arguments)};l.getSubtree=function(Y){var ma=[Y];!u(Y)&&!m(Y)||B(Y)||l.traverse(Y,!0,function(Z,k){var A=null!=k&&l.isTreeEdge(k);A&&0>mxUtils.indexOf(ma,k)&&ma.push(k);(null==k||A)&&0>mxUtils.indexOf(ma,Z)&&ma.push(Z);return null==k||A});return ma};var X=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){X.apply(this,arguments);(u(this.state.cell)||m(this.state.cell))&&!B(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),-this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(Y){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Y),mxEvent.getClientY(Y),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(Y);this.graph.isMouseDown=!0;f.hoverIcons.reset();mxEvent.consume(Y)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var ba=mxVertexHandler.prototype.redrawHandles;-mxVertexHandler.prototype.redrawHandles=function(){ba.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 ha=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(Y){ha.apply(this,arguments);null!=+this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(Y){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Y),mxEvent.getClientY(Y),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(Y);this.graph.isMouseDown=!0;f.hoverIcons.reset();mxEvent.consume(Y)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var aa=mxVertexHandler.prototype.redrawHandles;+mxVertexHandler.prototype.redrawHandles=function(){aa.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 ia=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(Y){ia.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=Y?"":"none")};var la=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(Y,ma){la.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var g=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=g.apply(this,arguments),u=this.graph,p=this;return m.concat([this.addEntry("tree container",-function(){var B=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");B.vertex=!0;var H=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');H.vertex=!0;var T=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');-T.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);T.insertEdge(G,!1);B.insert(G);B.insert(H);B.insert(T);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var B=new mxCell("Mindmap",new mxGeometry(0,-0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");B.vertex=!0;var H=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');H.vertex=!0;var T=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-T.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);T.insertEdge(G,!1);var P=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-P.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),G.style);R.geometry.relative=!0;R.edge=!0;H.insertEdge(R,!0);P.insertEdge(R,!1);var c=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+function(){var B=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");B.vertex=!0;var H=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');H.vertex=!0;var S=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');+S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);B.insert(G);B.insert(H);B.insert(S);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var B=new mxCell("Mindmap",new mxGeometry(0,+0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");B.vertex=!0;var H=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');H.vertex=!0;var S=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);var P=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+P.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),G.style);Q.geometry.relative=!0;Q.edge=!0;H.insertEdge(Q,!0);P.insertEdge(Q,!1);var c=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');c.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),G.style);f.geometry.relative=!0;f.edge=!0;H.insertEdge(f,!0);c.insertEdge(f,!1);var l=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-l.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),G.style);t.geometry.relative=!0;t.edge=!0;H.insertEdge(t,!0);l.insertEdge(t,!1);B.insert(G);B.insert(R);B.insert(f);B.insert(t);B.insert(H);B.insert(T);B.insert(P);B.insert(c);B.insert(l);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var B=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');+l.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),G.style);t.geometry.relative=!0;t.edge=!0;H.insertEdge(t,!0);l.insertEdge(t,!1);B.insert(G);B.insert(Q);B.insert(f);B.insert(t);B.insert(H);B.insert(S);B.insert(P);B.insert(c);B.insert(l);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var B=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');B.vertex=!0;return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var B=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");H.geometry.setTerminalPoint(new mxPoint(-40,40),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);return p.createVertexTemplateFromCells([B,H],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var B=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");H.geometry.setTerminalPoint(new mxPoint(-40,40),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);return p.createVertexTemplateFromCells([B,H],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree orgchart organization division",function(){var B=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.vertex=!0;var H=new mxCell("Organization",new mxGeometry(80,-40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(H,"treeRoot","1");H.vertex=!0;var T=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');T.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");-G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);T.insertEdge(G,!1);var P=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');P.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");R.geometry.relative=-!0;R.edge=!0;H.insertEdge(R,!0);P.insertEdge(R,!1);B.insert(G);B.insert(R);B.insert(H);B.insert(T);B.insert(P);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree root",function(){var B=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(B,"treeRoot","1");B.vertex=!0;return p.createVertexTemplateFromCells([B],+40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(H,"treeRoot","1");H.vertex=!0;var S=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");+G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);var P=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');P.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");Q.geometry.relative=+!0;Q.edge=!0;H.insertEdge(Q,!0);P.insertEdge(Q,!1);B.insert(G);B.insert(Q);B.insert(H);B.insert(S);B.insert(P);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree root",function(){var B=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(B,"treeRoot","1");B.vertex=!0;return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree division",function(){var B=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");H.geometry.setTerminalPoint(new mxPoint(0,0),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);return p.createVertexTemplateFromCells([B,H],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree sub sections",function(){var B=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");-H.geometry.setTerminalPoint(new mxPoint(110,-40),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);var T=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");T.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),H.style);G.geometry.setTerminalPoint(new mxPoint(110,-40),!0);G.geometry.relative=!0;G.edge=!0;T.insertEdge(G,!1);return p.createVertexTemplateFromCells([H,G,B,T],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;+H.geometry.setTerminalPoint(new mxPoint(110,-40),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);var S=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),H.style);G.geometry.setTerminalPoint(new mxPoint(110,-40),!0);G.geometry.relative=!0;G.edge=!0;S.insertEdge(G,!1);return p.createVertexTemplateFromCells([H,G,B,S],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;EditorUi.initMinimalTheme=function(){function b(c,f){if(EditorUi.windowed){var l=c.editor.graph;l.popupMenuHandler.hideMenu();null==c.formatWindow?(f=Math.max(10,c.diagramContainer.clientWidth-248),l=Math.min(566,l.container.clientHeight-10),c.formatWindow=new WrapperWindow(c,mxResources.get("format"),f,60,240,l,function(t){c.createFormat(t).init()}),c.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){c.formatWindow.window.fit()})),c.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):c.formatWindow.window.setVisible(null!=f?f:!c.formatWindow.window.isVisible())}else null==c.formatElt&&(c.formatElt=c.createSidebarContainer(),c.createFormat(c.formatElt).init(),c.formatElt.style.border="none",c.formatElt.style.width="240px",c.formatElt.style.borderLeftWidth="1px",c.formatElt.style.borderLeftStyle="solid",c.formatElt.style.right="0px"),l=c.diagramContainer.parentNode,null!=c.formatElt.parentNode?(c.formatElt.parentNode.removeChild(c.formatElt),l.style.right="0px"):(l.parentNode.appendChild(c.formatElt),l.style.right=c.formatElt.style.width)}function e(c,f){function l(C,F){var N=c.menus.get(C);C=t.addMenu(F,mxUtils.bind(this,function(){N.funct.apply(this,arguments)}));C.setAttribute("title",F);C.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";C.className="geTitle";f.appendChild(C);return C}var t=new Menubar(c,f);if(Editor.enableCustomLibraries&&@@ -4166,30 +4168,30 @@ l.style.left="0px"):(l.parentNode.appendChild(c.sidebarElt),l.style.left=c.sidebmxOutline.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.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";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 u=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){u.apply(this,arguments);null!=this.tabContainer&&(this.tabContainer.style.right="62px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px")};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 B=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(c,f){null!=f.shortcut&&900>m&&!mxClient.IS_IOS?c.firstChild.nextSibling.setAttribute("title",f.shortcut):-B.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var H=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();H.apply(this,arguments)};var T=EditorUi.prototype.setGraphEnabled;-EditorUi.prototype.setGraphEnabled=function(c){T.apply(this,arguments);if(c){var f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=f&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=f&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};+B.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var H=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();H.apply(this,arguments)};var S=EditorUi.prototype.setGraphEnabled;+EditorUi.prototype.setGraphEnabled=function(c){S.apply(this,arguments);if(c){var f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=f&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=f&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var G=Menus.prototype.init;Menus.prototype.init=function(){G.apply(this,arguments);var c=this.editorUi;EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var t=new ParseDialog(c,mxResources.get("plantUml")+"...","plantUml");c.showDialog(t.container,620,420,!0,!1);t.init()}));c.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var t=new ParseDialog(c,mxResources.get("mermaid")+"...","mermaid");c.showDialog(t.container,620,420,!0,!1);t.init()}));var f="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),l=function(t,z,C,F){t.addItem(C,null,mxUtils.bind(this,function(){var N=new CreateGraphDialog(c,C,F);c.showDialog(N.container,620,420,!0,!1);N.init()}),z)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(t,z){for(var C=0;C<f.length;C++)"-"==f[C]?t.addSeparator(z):l(t,z,mxResources.get(f[C])+"...",f[C])})))};EditorUi.prototype.installFormatToolbar=function(c){var f=this.editor.graph,l=document.createElement("div");l.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";f.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(t,z){0<f.getSelectionCount()?(c.appendChild(l),l.innerHTML="Selected: "+f.getSelectionCount()):null!=l.parentNode&&l.parentNode.removeChild(l)}))};var P=!1;EditorUi.prototype.initFormatWindow=function(){if(!P&&null!=this.formatWindow){P=!0;var c=this.formatWindow.window.toggleMinimized,f=240;this.formatWindow.window.toggleMinimized=function(){c.apply(this,arguments);this.minimized?(f=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+f-140+"px"):(this.div.style.width=f+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-f+140)+"px");this.fit()};-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(l){mxEvent.getSource(l)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var R=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(ja,pa,sa){var qa=F.menus.get(ja),wa=da.addMenu(mxResources.get(ja),mxUtils.bind(this,function(){wa.classList.contains("mxDisabled")||qa.funct.apply(this,arguments)}),J);wa.className="geMenuItem";wa.style.display="inline-block";wa.style.boxSizing=-"border-box";wa.style.top="6px";wa.style.marginRight="6px";wa.style.height="30px";wa.style.paddingTop="6px";wa.style.paddingBottom="6px";wa.style.cursor="pointer";wa.setAttribute("title",mxResources.get(ja));F.menus.menuCreated(qa,wa,"geMenuItem");null!=sa?(wa.style.backgroundImage="url("+sa+")",wa.style.backgroundPosition="center center",wa.style.backgroundRepeat="no-repeat",wa.style.backgroundSize="24px 24px",wa.style.width="34px",wa.innerText=""):pa||(wa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+-")",wa.style.backgroundPosition="right 6px center",wa.style.backgroundRepeat="no-repeat",wa.style.paddingRight="22px");return wa}function f(ja,pa,sa,qa,wa,Ba){var za=document.createElement("a");za.className="geMenuItem";za.style.display="inline-block";za.style.boxSizing="border-box";za.style.height="30px";za.style.padding="6px";za.style.position="relative";za.style.verticalAlign="top";za.style.top="0px";null!=F.statusContainer?K.insertBefore(za,F.statusContainer):K.appendChild(za);null!=Ba?(za.style.backgroundImage=-"url("+Ba+")",za.style.backgroundPosition="center center",za.style.backgroundRepeat="no-repeat",za.style.backgroundSize="24px 24px",za.style.width="34px"):mxUtils.write(za,ja);mxEvent.addListener(za,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ea){Ea.preventDefault()}));mxEvent.addListener(za,"click",function(Ea){"disabled"!=za.getAttribute("disabled")&&pa(Ea);mxEvent.consume(Ea)});null==sa&&(za.style.marginRight="4px");null!=qa&&za.setAttribute("title",qa);null!=wa&&(ja=-function(){wa.isEnabled()?(za.removeAttribute("disabled"),za.style.cursor="pointer"):(za.setAttribute("disabled","disabled"),za.style.cursor="default")},wa.addListener("stateChanged",ja),N.addListener("enabledChanged",ja),ja());return za}function l(ja,pa,sa){sa=document.createElement("div");sa.className="geMenuItem";sa.style.display="inline-block";sa.style.verticalAlign="top";sa.style.marginRight="6px";sa.style.padding="0 4px 0 4px";sa.style.height="30px";sa.style.position="relative";sa.style.top=-"0px";for(var qa=0;qa<ja.length;qa++)null!=ja[qa]&&(ja[qa].style.margin="0px",ja[qa].style.boxShadow="none",sa.appendChild(ja[qa]));null!=pa&&mxUtils.setOpacity(sa,pa);null!=F.statusContainer?K.insertBefore(sa,F.statusContainer):K.appendChild(sa);return sa}function t(){for(var ja=K.firstChild;null!=ja;){var pa=ja.nextSibling;"geMenuItem"!=ja.className&&"geItem"!=ja.className||ja.parentNode.removeChild(ja);ja=pa}J=K.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;-ja=1E3>m;var sa=null;ja||(sa=c("diagram"));pa=ja?c("diagram",null,Editor.menuImage):null;null!=pa&&(sa=pa);l([sa,f(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),ja?Editor.shapesImage:null),f(mxResources.get("format"),F.actions.get("format").funct,null,mxResources.get("format")+" ("+F.actions.get("format").shortcut+")",F.actions.get("image"),ja?Editor.formatImage:null)],ja?60:null);pa=c("insert",!0,ja?W:null);l([pa,f(mxResources.get("delete"),-F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),ja?Editor.trashImage:null)],ja?60:null);N.isEnabled()||pa.classList.add("mxDisabled");411<=m&&(l([U,O],60),520<=m&&l([S,640<=m?f("",ma.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",ma,Editor.zoomInImage):null,640<=m?f("",Z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Z,Editor.zoomOutImage):null],60))}R.apply(this,arguments);var z=mxUtils.isAncestorNode(document.body,this.container)?+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(l){mxEvent.getSource(l)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var Q=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(fa,pa,sa){var qa=F.menus.get(fa),wa=da.addMenu(mxResources.get(fa),mxUtils.bind(this,function(){wa.classList.contains("mxDisabled")||qa.funct.apply(this,arguments)}),J);wa.className="geMenuItem";wa.style.display="inline-block";wa.style.boxSizing=+"border-box";wa.style.top="6px";wa.style.marginRight="6px";wa.style.height="30px";wa.style.paddingTop="6px";wa.style.paddingBottom="6px";wa.style.cursor="pointer";wa.setAttribute("title",mxResources.get(fa));F.menus.menuCreated(qa,wa,"geMenuItem");null!=sa?(wa.style.backgroundImage="url("+sa+")",wa.style.backgroundPosition="center center",wa.style.backgroundRepeat="no-repeat",wa.style.backgroundSize="24px 24px",wa.style.width="34px",wa.innerText=""):pa||(wa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage++")",wa.style.backgroundPosition="right 6px center",wa.style.backgroundRepeat="no-repeat",wa.style.paddingRight="22px");return wa}function f(fa,pa,sa,qa,wa,Aa){var za=document.createElement("a");za.className="geMenuItem";za.style.display="inline-block";za.style.boxSizing="border-box";za.style.height="30px";za.style.padding="6px";za.style.position="relative";za.style.verticalAlign="top";za.style.top="0px";null!=F.statusContainer?K.insertBefore(za,F.statusContainer):K.appendChild(za);null!=Aa?(za.style.backgroundImage=+"url("+Aa+")",za.style.backgroundPosition="center center",za.style.backgroundRepeat="no-repeat",za.style.backgroundSize="24px 24px",za.style.width="34px"):mxUtils.write(za,fa);mxEvent.addListener(za,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Da){Da.preventDefault()}));mxEvent.addListener(za,"click",function(Da){"disabled"!=za.getAttribute("disabled")&&pa(Da);mxEvent.consume(Da)});null==sa&&(za.style.marginRight="4px");null!=qa&&za.setAttribute("title",qa);null!=wa&&(fa=+function(){wa.isEnabled()?(za.removeAttribute("disabled"),za.style.cursor="pointer"):(za.setAttribute("disabled","disabled"),za.style.cursor="default")},wa.addListener("stateChanged",fa),N.addListener("enabledChanged",fa),fa());return za}function l(fa,pa,sa){sa=document.createElement("div");sa.className="geMenuItem";sa.style.display="inline-block";sa.style.verticalAlign="top";sa.style.marginRight="6px";sa.style.padding="0 4px 0 4px";sa.style.height="30px";sa.style.position="relative";sa.style.top=+"0px";for(var qa=0;qa<fa.length;qa++)null!=fa[qa]&&(fa[qa].style.margin="0px",fa[qa].style.boxShadow="none",sa.appendChild(fa[qa]));null!=pa&&mxUtils.setOpacity(sa,pa);null!=F.statusContainer?K.insertBefore(sa,F.statusContainer):K.appendChild(sa);return sa}function t(){for(var fa=K.firstChild;null!=fa;){var pa=fa.nextSibling;"geMenuItem"!=fa.className&&"geItem"!=fa.className||fa.parentNode.removeChild(fa);fa=pa}J=K.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;+fa=1E3>m;var sa=null;fa||(sa=c("diagram"));pa=fa?c("diagram",null,Editor.menuImage):null;null!=pa&&(sa=pa);l([sa,f(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),fa?Editor.shapesImage:null),f(mxResources.get("format"),F.actions.get("format").funct,null,mxResources.get("format")+" ("+F.actions.get("format").shortcut+")",F.actions.get("image"),fa?Editor.formatImage:null)],fa?60:null);pa=c("insert",!0,fa?X:null);l([pa,f(mxResources.get("delete"),+F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),fa?Editor.trashImage:null)],fa?60:null);N.isEnabled()||pa.classList.add("mxDisabled");411<=m&&(l([T,O],60),520<=m&&l([U,640<=m?f("",ma.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",ma,Editor.zoomInImage):null,640<=m?f("",Z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Z,Editor.zoomOutImage):null],60))}Q.apply(this,arguments);var z=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=z&&(z.classList.add("geSimple"),z.classList.add("geMinimal"));z=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);var C=document.createElement("div");C.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";C.style.bottom=z?"32px":"0px";this.sidebar=this.createSidebar(C);if(1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])g(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=m&&(b(this,!0),this.formatWindow.window.setVisible(!0));var F=this,N=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var K=document.createElement("div");K.className="geMenubarContainer";var J=null,da=new Menubar(F,K);F.statusContainer=F.createStatusContainer();-F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.cursor="default";var ea=F.hideCurrentMenu;F.hideCurrentMenu=function(){ea.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var ca=F.descriptorChanged;F.descriptorChanged=function(){ca.apply(this,arguments);var ja=F.getCurrentFile();if(null!=ja&&null!=ja.getTitle()){var pa=ja.getMode();"google"==pa?pa="googleDrive":"github"==pa?pa="gitHub":"gitlab"==pa?pa="gitLab":"onedrive"==-pa&&(pa="oneDrive");pa=mxResources.get(pa);K.setAttribute("title",ja.getTitle()+(null!=pa?" ("+pa+")":""))}else K.removeAttribute("title")};F.setStatusText(F.editor.getStatus());K.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";K.appendChild(F.buttonContainer);F.menubarContainer=-F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer geTabItem";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";z=F.diagramContainer.parentNode;C=document.createElement("div");C.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="47px";var W=Editor.addBoxImage;if(null!=F.hoverIcons){var ba=F.hoverIcons.update;-F.hoverIcons.update=function(){N.freehand.isDrawing()||ba.apply(this,arguments)}}if(null!=N.freehand){var ha=N.freehand.createStyle;N.freehand.createStyle=function(ja){return ha.apply(this,arguments)+"sketch=0;"}}F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));F.setStatusText(F.editor.getStatus());var la=F.menus.get("viewZoom");if(null!=la){var Y=function(ja){if(mxEvent.isAltDown(ja))F.hideCurrentMenu(),F.actions.get("customZoom").funct(),-mxEvent.consume(ja);else if("geMenuItem"==mxEvent.getSource(ja).className||mxEvent.isShiftDown(ja))F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(ja)},ma=F.actions.get("zoomIn"),Z=F.actions.get("zoomOut"),k=F.actions.get("resetView"),A=F.actions.get("undo"),I=F.actions.get("redo"),U=f("",A.funct,null,mxResources.get("undo")+" ("+A.shortcut+")",A,Editor.undoImage),O=f("",I.funct,null,mxResources.get("redo")+" ("+I.shortcut+")",I,Editor.redoImage),S=f("",Y,!0,mxResources.get("fit")+-" ("+Editor.ctrlKey+"+H)",k,Editor.zoomFitImage);K.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";var X=da.addMenu("100%",la.funct);X.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");X.className="geTabItem";X.style.height=F.tabContainerHeight+"px";X.style.position="absolute";X.style.display="0"!=urlParams.pages?"flex":"none";X.style.alignItems="center";X.style.justifyContent=-"center";X.style.paddingRight="11px";X.style.whiteSpace="nowrap";X.style.overflow="hidden";X.style.fontSize="11px";X.style.width="51px";X.style.right="0px";X.style.bottom="0px";X.style.boxSizing="content-box";X.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";X.style.backgroundPosition="right 6px top 15px";X.style.backgroundRepeat="no-repeat";X.style.backgroundSize="10px";X.style.zIndex="1";C.appendChild(X);(function(ja){mxEvent.addListener(ja,"click",Y);var pa=mxUtils.bind(this,-function(sa,qa,wa){ja.innerText="";mxUtils.write(ja,Math.round(100*F.editor.graph.view.scale*(null!=wa?wa:1))+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,pa);F.editor.addListener("resetGraphView",pa);F.editor.addListener("pageSelected",pa);F.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(sa,qa){pa(sa,qa,qa.getProperty("factor"))}))})(X);var aa=F.setGraphEnabled;F.setGraphEnabled=function(){aa.apply(this,arguments);null!=this.tabContainer&&(X.style.visibility=this.tabContainer.style.visibility,+F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.cursor="default";var ea=F.hideCurrentMenu;F.hideCurrentMenu=function(){ea.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var ca=F.descriptorChanged;F.descriptorChanged=function(){ca.apply(this,arguments);var fa=F.getCurrentFile();if(null!=fa&&null!=fa.getTitle()){var pa=fa.getMode();"google"==pa?pa="googleDrive":"github"==pa?pa="gitHub":"gitlab"==pa?pa="gitLab":"onedrive"==+pa&&(pa="oneDrive");pa=mxResources.get(pa);K.setAttribute("title",fa.getTitle()+(null!=pa?" ("+pa+")":""))}else K.removeAttribute("title")};F.setStatusText(F.editor.getStatus());K.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";K.appendChild(F.buttonContainer);F.menubarContainer=+F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer geTabItem";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";z=F.diagramContainer.parentNode;C=document.createElement("div");C.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="47px";var X=Editor.addBoxImage;if(null!=F.hoverIcons){var aa=F.hoverIcons.update;+F.hoverIcons.update=function(){N.freehand.isDrawing()||aa.apply(this,arguments)}}if(null!=N.freehand){var ia=N.freehand.createStyle;N.freehand.createStyle=function(fa){return ia.apply(this,arguments)+"sketch=0;"}}F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));F.setStatusText(F.editor.getStatus());var la=F.menus.get("viewZoom");if(null!=la){var Y=function(fa){if(mxEvent.isAltDown(fa))F.hideCurrentMenu(),F.actions.get("customZoom").funct(),+mxEvent.consume(fa);else if("geMenuItem"==mxEvent.getSource(fa).className||mxEvent.isShiftDown(fa))F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(fa)},ma=F.actions.get("zoomIn"),Z=F.actions.get("zoomOut"),k=F.actions.get("resetView"),A=F.actions.get("undo"),I=F.actions.get("redo"),T=f("",A.funct,null,mxResources.get("undo")+" ("+A.shortcut+")",A,Editor.undoImage),O=f("",I.funct,null,mxResources.get("redo")+" ("+I.shortcut+")",I,Editor.redoImage),U=f("",Y,!0,mxResources.get("fit")++" ("+Editor.ctrlKey+"+H)",k,Editor.zoomFitImage);K.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";var V=da.addMenu("100%",la.funct);V.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");V.className="geTabItem";V.style.height=F.tabContainerHeight+"px";V.style.position="absolute";V.style.display="0"!=urlParams.pages?"flex":"none";V.style.alignItems="center";V.style.justifyContent=+"center";V.style.paddingRight="11px";V.style.whiteSpace="nowrap";V.style.overflow="hidden";V.style.fontSize="11px";V.style.width="51px";V.style.right="0px";V.style.bottom="0px";V.style.boxSizing="content-box";V.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";V.style.backgroundPosition="right 6px top 15px";V.style.backgroundRepeat="no-repeat";V.style.backgroundSize="10px";V.style.zIndex="1";C.appendChild(V);(function(fa){mxEvent.addListener(fa,"click",Y);var pa=mxUtils.bind(this,+function(sa,qa,wa){fa.innerText="";mxUtils.write(fa,Math.round(100*F.editor.graph.view.scale*(null!=wa?wa:1))+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,pa);F.editor.addListener("resetGraphView",pa);F.editor.addListener("pageSelected",pa);F.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(sa,qa){pa(sa,qa,qa.getProperty("factor"))}))})(V);var ba=F.setGraphEnabled;F.setGraphEnabled=function(){ba.apply(this,arguments);null!=this.tabContainer&&(V.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}C.appendChild(K);C.appendChild(F.diagramContainer);z.appendChild(C);F.updateTabContainer();!EditorUi.windowed&&1E3<=m&&b(this,!0);C.appendChild(F.tabContainer);t();F.addListener("lockedChanged",t);mxEvent.addListener(window,"resize",function(){t();null!=F.sidebarWindow&&F.sidebarWindow.window.fit();null!=F.formatWindow&&F.formatWindow.window.fit();null!=F.actions.outlineWindow&&F.actions.outlineWindow.window.fit();null!=F.actions.layersWindow&&F.actions.layersWindow.window.fit();null!=F.menus.chatWindow&&F.menus.chatWindow.window.fit();null!=F.menus.tagsWindow&&F.menus.tagsWindow.window.fit();null!=F.menus.findWindow&&F.menus.findWindow.window.fit();null!=F.menus.findReplaceWindow&&F.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,g,m,u,p,B){this.file=b;this.id=e;this.content=g;this.modifiedDate=m;this.createdDate=u;this.isResolved=p;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,g,m,u){e()};DrawioComment.prototype.editComment=function(b,e,g){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,g,m,u){this.id=b;this.email=e;this.displayName=g;this.pictureUrl=m;this.locale=u};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\nanimations=Animations\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateBlankDiagram=Create Blank Diagram\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteAll=Delete all\ndeleteColumn=Delete column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndescribeYourDiagram=Describe your diagram\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhighContrast=High Contrast\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nimproveContrast=Improve Contrast\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlanguageCode=Language Code\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlocked=Locked\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodern=Modern\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nmyDrive=My Drive\nmyFiles=My Files\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageTabs=Page Tabs\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nrequirementDiagram=Requirement Diagram\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save As\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectedPage=Selected Page\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nsequenceDiagram=Sequence Diagram\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nsettings=Settings\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswap=Swap\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;@@ -4201,13 +4203,13 @@ this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;var m=this;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var u=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.installDarkModeListener();if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var H=this.graph.view.getDrawPane().ownerSVGElement;null!=this.graphConfig.border?H.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(H.style.padding="8px");H.style.forcedColorAdjust="none";H.style.boxSizing="border-box";H.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var t=this.view.graphBounds,z=this.view.translate;H.setAttribute("viewBox",t.x+z.x-this.panDx+" "+(t.y+z.y-this.panDy)+" "+(t.width+1)+" "+(t.height+1));this.container.style.backgroundColor=H.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",t))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(t){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=-!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var T=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=T&&T!=e)try{this.xml=mxUtils.getXml(T),this.xmlNode=T,this.xmlDocument=T.ownerDocument}catch(t){}this.graph.getImageFromBundles=function(t){return m.getImageUrl(t)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);-if("mxfile"==this.xmlNode.nodeName){var G=this.xmlNode.getElementsByTagName("diagram");if(0<G.length){if(null!=this.pageId)for(T=0;T<G.length;T++)if(this.pageId==G[T].getAttribute("id")){this.currentPage=T;break}var P=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(t){var z=G[m.currentPage];return"page"==t?z.getAttribute("name")||"Page-"+(m.currentPage+1):"pagenumber"==t?m.currentPage+1:"pagecount"==t?G.length:P.apply(this,arguments)}}}this.diagrams=[];var R=null;this.selectPage=-function(t){this.handlingResize||(this.currentPage=mxUtils.mod(t,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(t){t=this.getIndexById(t);var z=0<=t;z&&this.selectPage(t);return z};T=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=R&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),R=this.xmlNode)});var c=this.graph.setBackgroundImage;this.graph.setBackgroundImage=+!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var S=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=S&&S!=e)try{this.xml=mxUtils.getXml(S),this.xmlNode=S,this.xmlDocument=S.ownerDocument}catch(t){}this.graph.getImageFromBundles=function(t){return m.getImageUrl(t)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);+if("mxfile"==this.xmlNode.nodeName){var G=this.xmlNode.getElementsByTagName("diagram");if(0<G.length){if(null!=this.pageId)for(S=0;S<G.length;S++)if(this.pageId==G[S].getAttribute("id")){this.currentPage=S;break}var P=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(t){var z=G[m.currentPage];return"page"==t?z.getAttribute("name")||"Page-"+(m.currentPage+1):"pagenumber"==t?m.currentPage+1:"pagecount"==t?G.length:P.apply(this,arguments)}}}this.diagrams=[];var Q=null;this.selectPage=+function(t){this.handlingResize||(this.currentPage=mxUtils.mod(t,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(t){t=this.getIndexById(t);var z=0<=t;z&&this.selectPage(t);return z};S=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=Q&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),Q=this.xmlNode)});var c=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(t){if(null!=t&&Graph.isPageLink(t.src)){var z=t.src,C=z.indexOf(",");0<C&&(C=m.getIndexById(z.substring(C+1)),0<=C&&(t=m.getImageForGraphModel(Editor.parseDiagramNode(m.diagrams[C])),t.originalSrc=z))}c.apply(this,arguments)};var f=this.graph.getGraphBounds;this.graph.getGraphBounds=function(t){var z=f.apply(this,arguments);t=this.backgroundImage;if(null!=t){var C=this.view.translate,F=this.view.scale;z=mxRectangle.fromRectangle(z);z.add(new mxRectangle((C.x+t.x)*F,(C.y+t.y)*F,t.width*F,-t.height*F))}return z};this.addListener("xmlNodeChanged",T);T();urlParams.page=m.currentPage;T=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,T=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||+t.height*F))}return z};this.addListener("xmlNodeChanged",S);S();urlParams.page=m.currentPage;S=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,S=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(t){return!mxEvent.isPopupTrigger(t.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.titleTooltip||-this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=T&&this.setLayersVisible(T);this.graph.customLinkClicked=function(t,z){try{if(Graph.isPageLink(t)){var C=t.indexOf(",");m.selectPageById(t.substring(C++this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=S&&this.setLayersVisible(S);this.graph.customLinkClicked=function(t,z){try{if(Graph.isPageLink(t)){var C=t.indexOf(",");m.selectPageById(t.substring(C+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var F=this.getGraphBounds();this.handleCustomLink(t,z);F.equals(this.getGraphBounds())||m.crop()}}catch(N){alert(N.message)}return!0};var l=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return l.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});g=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&null==this.getAncestorDetails(b)&&"undefined"!==typeof g){var p=this.getObservableParent(b),B=new g(mxUtils.bind(this,function(H){0<b.offsetWidth&&(B.disconnect(),u())}));B.observe(p,{attributes:!0})}else u()}};GraphViewer.prototype.installBackgroundColorHandler=function(){var b=this.graph;if(null!=b){null!=GraphViewer.shapeBackgroundColor&&(b.shapeBackgroundColor=GraphViewer.shapeBackgroundColor);b.defaultPageBackgroundColor="transparent";b.diagramBackgroundColor="transparent";b.transparentBackground=!1;var e=b.background,g=mxUtils.bind(this,function(m){"none"==b.getAdaptiveColors()&&null==e&&(this.isDarkMode()?b.background="#ffffff":b.background=null,m&&b.view.validateBackground())});this.addListener("graphChanged",@@ -4220,37 +4222,37 @@ GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocumGraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var g=[],m=this.graph.getModel();m.beginUpdate();try{for(var u=0;u<m.getChildCount(m.root);u++){var p=m.getChildAt(m.root,u);e=e&&m.isVisible(p);g.push(m.isVisible(p));m.setVisible(p,null!=b?b[u]:!0)}}finally{m.endUpdate()}}return e?null:g};GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var e=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),e=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};e&&this.setLayersVisible(e)}};GraphViewer.prototype.isDarkMode=function(){return"dark"==this.darkMode||"auto"==this.darkMode&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches};-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),g=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!g){g=!0;var H=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?H.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){H=b.getBoundingClientRect();var T=mxUtils.getScrollOrigin(document.body);-T="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-T.x,top:-T.y};H={left:H.left-T.left,top:H.top-T.top,bottom:H.bottom-T.top,right:H.right-T.left};this.toolbar.style.left=H.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=H.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=H.top+1+"px"):this.toolbar.style.top=H.top+"px"}else null!=-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());g=!1}}),u=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(H){var T=b.offsetWidth;T==u||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=H?H:this.graphConfig.zoom||-(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},u=T,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),g=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!g){g=!0;var H=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?H.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){H=b.getBoundingClientRect();var S=mxUtils.getScrollOrigin(document.body);+S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};H={left:H.left-S.left,top:H.top-S.top,bottom:H.bottom-S.top,right:H.right-S.left};this.toolbar.style.left=H.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=H.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=H.top+1+"px"):this.toolbar.style.top=H.top+"px"}else null!=+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());g=!1}}),u=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(H){var S=b.offsetWidth;S==u||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=H?H:this.graphConfig.zoom||+(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},u=S,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",m),this.graph.addListener("size",m)):new ResizeSensor(this.graph.container,m));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,e.width+2*this.graph.border),0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=u=null;m=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",m):new ResizeSensor(this.graph.container,m))}else 9>=document.documentMode||this.graph.addListener("size",-m);var B=mxUtils.bind(this,function(H){var T=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var G=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==H&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>G)?(H=null,null!=G&&e.height+2*this.graph.border>G-2&&(H=(G-2*this.graph.border-2)/e.height),this.fitGraph(H)):this.widthIsEmpty||-null!=H||0!=this.graphConfig.resize||""==b.style.height?(H=null!=H?H:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+H.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+H.y),u=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=T});8==document.documentMode?window.setTimeout(B,0):B();this.positionGraph=function(H){e=this.graph.getGraphBounds();u=null;B(H)}};+m);var B=mxUtils.bind(this,function(H){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var G=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==H&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>G)?(H=null,null!=G&&e.height+2*this.graph.border>G-2&&(H=(G-2*this.graph.border-2)/e.height),this.fitGraph(H)):this.widthIsEmpty||+null!=H||0!=this.graphConfig.resize||""==b.style.height?(H=null!=H?H:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+H.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+H.y),u=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(B,0):B();this.positionGraph=function(H){e=this.graph.getGraphBounds();u=null;B(H)}};GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),g=b.border,m=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/m+g):g,null!=e.y?Math.floor(b.view.translate.y-e.y/m+g):g)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};-GraphViewer.prototype.showLayers=function(b,e){var g=this.graphConfig.layers;g=null!=g&&0<g.length?g.split(" "):[];var m=this.graphConfig.layerIds,u=null!=m&&0<m.length,p=!1;if(0<g.length||u||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var B=b.getChildCount(b.root);if(null==e){e=!1;p={};if(u)for(var H=0;H<m.length;H++){var T=b.getCell(m[H]);null!=T&&(e=!0,p[T.id]=!0)}else for(H=0;H<g.length;H++)T=b.getChildAt(b.root,parseInt(g[H])),null!=T&&(e=!0,p[T.id]=!0);for(H=0;e&&-H<B;H++)T=b.getChildAt(b.root,H),b.setVisible(T,p[T.id]||!1)}else for(H=0;H<B;H++)b.setVisible(b.getChildAt(b.root,H),e.isVisible(e.getChildAt(e.root,H)))}finally{b.endUpdate()}p=!0}return p};+GraphViewer.prototype.showLayers=function(b,e){var g=this.graphConfig.layers;g=null!=g&&0<g.length?g.split(" "):[];var m=this.graphConfig.layerIds,u=null!=m&&0<m.length,p=!1;if(0<g.length||u||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var B=b.getChildCount(b.root);if(null==e){e=!1;p={};if(u)for(var H=0;H<m.length;H++){var S=b.getCell(m[H]);null!=S&&(e=!0,p[S.id]=!0)}else for(H=0;H<g.length;H++)S=b.getChildAt(b.root,parseInt(g[H])),null!=S&&(e=!0,p[S.id]=!0);for(H=0;e&&+H<B;H++)S=b.getChildAt(b.root,H),b.setVisible(S,p[S.id]||!1)}else for(H=0;H<B;H++)b.setVisible(b.getChildAt(b.root,H),e.isVisible(e.getChildAt(e.root,H)))}finally{b.endUpdate()}p=!0}return p};GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.display="flex";e.style.alignItems="center";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="light-dark(#eeeeee, "+GraphViewer.darkBackgroundColor+")";e.style.height=this.toolbarHeight+"px";var g=mxUtils.bind(this,function(){this.isDarkMode()?(e.classList.add("geDarkMode"),e.style.colorScheme="dark"):(e.classList.remove("geDarkMode"),e.style.colorScheme="light")});this.addListener("darkModeChanged",g);this.toolbar=e;g();if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var m=null,u=null,p=mxUtils.bind(this,function(ca){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);m=null;u=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";u=null}),100)}),ca||200)}),B=mxUtils.bind(this,function(ca){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,ca||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||(B(30),p())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ca){mxEvent.consume(ca)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(ca){B(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ca){B(100);mxEvent.consume(ca)}));mxEvent.addListener(e,"mouseleave",-mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||B(30)}));var H=this.graph,T=H.getTolerance();H.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ca,W){this.startX=W.getGraphX();this.startY=W.getGraphY();this.scrollLeft=H.container.scrollLeft;this.scrollTop=H.container.scrollTop},mouseMove:function(ca,W){},mouseUp:function(ca,W){mxEvent.isTouchEvent(W.getEvent())&&Math.abs(this.scrollLeft-H.container.scrollLeft)<T&&Math.abs(this.scrollTop-H.container.scrollTop)<-T&&Math.abs(this.startX-W.getGraphX())<T&&Math.abs(this.startY-W.getGraphY())<T&&(0<parseFloat(e.style.opacity||0)?p():B(30))}})}g=this.toolbarItems;for(var G=0,P=mxUtils.bind(this,function(ca,W,ba,ha){ca=this.createToolbarButton(ca,W,ba,ha);e.appendChild(ca);G++;return ca}),R=this.graph.getModel(),c=null,f=null,l=null,t=null,z=0;z<g.length;z++){var C=g[z];if("pages"==C){t=b.ownerDocument.createElement("div");t.style.display="inline-flex";t.style.position="relative";t.style.alignItems="center";t.style.padding=+mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||B(30)}));var H=this.graph,S=H.getTolerance();H.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ca,X){this.startX=X.getGraphX();this.startY=X.getGraphY();this.scrollLeft=H.container.scrollLeft;this.scrollTop=H.container.scrollTop},mouseMove:function(ca,X){},mouseUp:function(ca,X){mxEvent.isTouchEvent(X.getEvent())&&Math.abs(this.scrollLeft-H.container.scrollLeft)<S&&Math.abs(this.scrollTop-H.container.scrollTop)<+S&&Math.abs(this.startX-X.getGraphX())<S&&Math.abs(this.startY-X.getGraphY())<S&&(0<parseFloat(e.style.opacity||0)?p():B(30))}})}g=this.toolbarItems;for(var G=0,P=mxUtils.bind(this,function(ca,X,aa,ia){ca=this.createToolbarButton(ca,X,aa,ia);e.appendChild(ca);G++;return ca}),Q=this.graph.getModel(),c=null,f=null,l=null,t=null,z=0;z<g.length;z++){var C=g[z];if("pages"==C){t=b.ownerDocument.createElement("div");t.style.display="inline-flex";t.style.position="relative";t.style.alignItems="center";t.style.padding="4px";t.style.fontFamily=GraphViewer.cssFontFamily;t.style.fontSize="12px";t.style.cursor="default";t.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(t,70);var F=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");F.style.borderRightStyle="none";F.style.paddingLeft="0px";F.style.paddingRight="0px";e.appendChild(t);var N=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");N.style.paddingLeft="0px";N.style.paddingRight="0px";C=mxUtils.bind(this,function(){t.innerText="";mxUtils.write(t,this.currentPage+1+" / "+this.diagrams.length);t.style.display=1<this.diagrams.length?"inline-flex":"none";F.style.display=t.style.display;N.style.display=t.style.display});this.addListener("graphChanged",C);C()}else if("zoom"==C)this.zoomEnabled&&(P(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),P(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),P(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"==C){if(this.layersEnabled){var K=P(mxUtils.bind(this,function(ca){if(null!=c)c.parentNode.removeChild(c),c=null;else{c=this.graph.createLayersDialog(mxUtils.bind(this,-function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var ba=this.graph.getGraphBounds(),ha=this.graph.view;0>ba.x||0>ba.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ha.translate.clone(),scale:ha.scale}):null!=this.graph.originalViewState&&0<ba.x/ha.scale+this.graph.originalViewState.translate.x-ha.translate.x&&0<ba.y/ha.scale+this.graph.originalViewState.translate.y-ha.translate.y&&(ha.setTranslate(this.graph.originalViewState.translate.x,-this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ha.translate.clone(),scale:ha.scale})}}));mxEvent.addListener(c,"mouseleave",function(){c.parentNode.removeChild(c);c=null});ca=K.getBoundingClientRect();c.style.width="140px";c.style.padding="2px 0px 2px 0px";c.style.border="1px solid #d0d0d0";c.style.backgroundColor="#eee";c.style.fontFamily=GraphViewer.cssFontFamily;c.style.fontSize="11px";c.style.overflowY="auto";c.style.maxHeight=-this.graph.container.clientHeight-this.toolbarHeight-10+"px";c.style.zIndex=this.toolbarZIndex+1;c.style.color="#000";mxUtils.setOpacity(c,85);var W=mxUtils.getDocumentScrollOrigin(document);c.style.left=W.x+ca.left-1+"px";c.style.top=W.y+ca.bottom-2+"px";this.isDarkMode()&&(c.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(c)}}),Editor.layersImage,mxResources.get("layers")||"Layers");R.addListener(mxEvent.CHANGE,function(){K.style.display=1<R.getChildCount(R.root)?"inline-flex":-"none"});K.style.display=1<R.getChildCount(R.root)?"inline-flex":"none"}}else if("tags"==C){if(this.tagsEnabled){var J=P(mxUtils.bind(this,function(ca){null==f&&(f=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),f.div.getElementsByTagName("div")[0].style.position="",f.div.style.maxHeight="160px",f.div.style.maxWidth="120px",f.div.style.padding="2px",f.div.style.overflow="auto",f.div.style.height="auto",f.div.style.position="fixed",f.div.style.fontFamily=GraphViewer.cssFontFamily,-f.div.style.fontSize="11px",f.div.style.backgroundColor="#eee",f.div.style.color="#000",f.div.style.border="1px solid #d0d0d0",f.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(f.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(f.div,85));if(null!=l)l.parentNode.removeChild(l),l=null;else{l=f.div;l.style.position="absolute";mxEvent.addListener(l,"mouseleave",function(){null!=l&&(l.parentNode.removeChild(l),l=null)});ca=J.getBoundingClientRect();var W=mxUtils.getDocumentScrollOrigin(document);-l.style.left=W.x+ca.left-1+"px";l.style.top=W.y+ca.bottom-2+"px";document.body.appendChild(l);f.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");R.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){J.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=l&&0==this.graph.getAllTags().length&&(l.parentNode.removeChild(l),l=null)}));J.style.display=0<this.graph.getAllTags().length?"inline-flex":"none"}}else"lightbox"==C?this.lightboxEnabled&&P(mxUtils.bind(this,+function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var aa=this.graph.getGraphBounds(),ia=this.graph.view;0>aa.x||0>aa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ia.translate.clone(),scale:ia.scale}):null!=this.graph.originalViewState&&0<aa.x/ia.scale+this.graph.originalViewState.translate.x-ia.translate.x&&0<aa.y/ia.scale+this.graph.originalViewState.translate.y-ia.translate.y&&(ia.setTranslate(this.graph.originalViewState.translate.x,+this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ia.translate.clone(),scale:ia.scale})}}));mxEvent.addListener(c,"mouseleave",function(){c.parentNode.removeChild(c);c=null});ca=K.getBoundingClientRect();c.style.width="140px";c.style.padding="2px 0px 2px 0px";c.style.border="1px solid #d0d0d0";c.style.backgroundColor="#eee";c.style.fontFamily=GraphViewer.cssFontFamily;c.style.fontSize="11px";c.style.overflowY="auto";c.style.maxHeight=+this.graph.container.clientHeight-this.toolbarHeight-10+"px";c.style.zIndex=this.toolbarZIndex+1;c.style.color="#000";mxUtils.setOpacity(c,85);var X=mxUtils.getDocumentScrollOrigin(document);c.style.left=X.x+ca.left-1+"px";c.style.top=X.y+ca.bottom-2+"px";this.isDarkMode()&&(c.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(c)}}),Editor.layersImage,mxResources.get("layers")||"Layers");Q.addListener(mxEvent.CHANGE,function(){K.style.display=1<Q.getChildCount(Q.root)?"inline-flex":+"none"});K.style.display=1<Q.getChildCount(Q.root)?"inline-flex":"none"}}else if("tags"==C){if(this.tagsEnabled){var J=P(mxUtils.bind(this,function(ca){null==f&&(f=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),f.div.getElementsByTagName("div")[0].style.position="",f.div.style.maxHeight="160px",f.div.style.maxWidth="120px",f.div.style.padding="2px",f.div.style.overflow="auto",f.div.style.height="auto",f.div.style.position="fixed",f.div.style.fontFamily=GraphViewer.cssFontFamily,+f.div.style.fontSize="11px",f.div.style.backgroundColor="#eee",f.div.style.color="#000",f.div.style.border="1px solid #d0d0d0",f.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(f.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(f.div,85));if(null!=l)l.parentNode.removeChild(l),l=null;else{l=f.div;l.style.position="absolute";mxEvent.addListener(l,"mouseleave",function(){null!=l&&(l.parentNode.removeChild(l),l=null)});ca=J.getBoundingClientRect();var X=mxUtils.getDocumentScrollOrigin(document);+l.style.left=X.x+ca.left-1+"px";l.style.top=X.y+ca.bottom-2+"px";document.body.appendChild(l);f.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");Q.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){J.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=l&&0==this.graph.getAllTags().length&&(l.parentNode.removeChild(l),l=null)}));J.style.display=0<this.graph.getAllTags().length?"inline-flex":"none"}}else"lightbox"==C?this.lightboxEnabled&&P(mxUtils.bind(this,function(){try{this.showLightbox()}catch(ca){alert(ca.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(C=this.graphConfig["toolbar-buttons"][C],null!=C&&(C.elem=P(null==C.enabled||C.enabled?C.handler:function(){},C.image,C.title,C.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*G);null!=this.graphConfig.title&&(g=b.ownerDocument.createElement("div"),g.style.display="inline-flex",g.style.position="relative",g.style.alignItems="center",g.style.padding="6px",g.style.fontFamily=GraphViewer.cssFontFamily,g.style.fontSize="12px",g.style.cursor="default",g.style.color="light-dark(#000000, #ffffff)",g.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*G;var da=b.style.border,ea=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 ca=b.getBoundingClientRect(),W=mxUtils.getScrollOrigin(document.body);W="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-W.x,top:-W.y};ca={left:ca.left-W.left,top:ca.top-W.top,bottom:ca.bottom-W.top,right:ca.right-W.left};e.style.left=ca.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ca.bottom-1+"px":"inline"!=-this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ca.top+1+"px"):e.style.top=ca.top+"px";"1px solid transparent"==da&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var ba=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=l&&(l.parentNode.removeChild(l),l=null);null!=c&&(c.parentNode.removeChild(c),c=null);b.style.border=da});mxEvent.addListener(document,"mousemove",function(ha){for(ha=mxEvent.getSource(ha);null!=-ha;){if(ha==b||ha==e||ha==c||ha==l)return;ha=ha.parentNode}ba()});mxEvent.addListener(document.body,"mouseleave",function(ha){ba()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ea):ea();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&ea()})).observe(b)};+"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ca=b.getBoundingClientRect(),X=mxUtils.getScrollOrigin(document.body);X="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-X.x,top:-X.y};ca={left:ca.left-X.left,top:ca.top-X.top,bottom:ca.bottom-X.top,right:ca.right-X.left};e.style.left=ca.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ca.bottom-1+"px":"inline"!=+this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ca.top+1+"px"):e.style.top=ca.top+"px";"1px solid transparent"==da&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var aa=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=l&&(l.parentNode.removeChild(l),l=null);null!=c&&(c.parentNode.removeChild(c),c=null);b.style.border=da});mxEvent.addListener(document,"mousemove",function(ia){for(ia=mxEvent.getSource(ia);null!=+ia;){if(ia==b||ia==e||ia==c||ia==l)return;ia=ia.parentNode}aa()});mxEvent.addListener(document.body,"mouseleave",function(ia){aa()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ea):ea();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&ea()})).observe(b)};GraphViewer.prototype.createToolbarButton=function(b,e,g,m){var u=document.createElement("div");u.style.borderRight="1px solid #d0d0d0";u.style.display="inline-flex";u.style.alignItems="center";u.style.padding="6px";mxEvent.addListener(u,"click",b);null!=g&&u.setAttribute("title",g);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";b.className="geAdaptiveAsset";null==m||m?(mxEvent.addListener(u,"mouseenter",function(){u.style.backgroundColor="light-dark(#dddddd,#333333)"}),mxEvent.addListener(u,"mouseleave",function(){u.style.backgroundColor="transparent"}),mxUtils.setOpacity(b,60),u.style.cursor="pointer"):mxUtils.setOpacity(u,30);u.appendChild(b);return u};GraphViewer.prototype.disableButton=function(b,e){var g=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=g&&(mxUtils.setOpacity(g.elem,30),mxEvent.removeListener(g.elem,"click",g.handler),mxEvent.addListener(g.elem,"mouseenter",function(){g.elem.style.backgroundColor="#eee"}),e&&g.elem.setAttribute("title",e))};@@ -4263,8 +4265,8 @@ GraphViewer.prototype.showLocalLightbox=function(b){var e=document.createElementg.className="geAdaptiveAsset";var m=mxUtils.bind(this,function(){p.setDarkMode(this.isDarkMode())});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.removeListener("darkModeChanged",m);p.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";urlParams.dark=this.isDarkMode()?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null!=b)try{var u=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));u.noCloseBtn=!0;urlParams["toolbar-config"]=encodeURIComponent(JSON.stringify(u))}catch(f){}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(){};u=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var p=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",m);p.editor.editBlankUrl=this.editBlankUrl;p.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=u;p.refresh=function(){};var B=mxUtils.bind(this,function(f){27==f.keyCode&&p.destroy()}),H=this.initialOverflow,-T=p.destroy;p.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",B),document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=H,GraphViewer.resizeSensorEnabled=!0,T.apply(this,arguments))};var G=p.editor.graph,P=G.container;P.style.overflow="hidden";this.lightboxChrome&&null==b?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",B)):(e.style.display="none",g.style.display=-"none");var R=this;G.getImageFromBundles=function(f){return R.getImageUrl(f)};var c=p.createTemporaryGraph;p.createTemporaryGraph=function(){var f=c.apply(this,arguments);f.getImageFromBundles=function(l){return R.getImageUrl(l)};return f};this.graphConfig.move&&(G.isMoveCellsEvent=function(f){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(G,p);window.setTimeout(mxUtils.bind(this,+S=p.destroy;p.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",B),document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=H,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var G=p.editor.graph,P=G.container;P.style.overflow="hidden";this.lightboxChrome&&null==b?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",B)):(e.style.display="none",g.style.display=+"none");var Q=this;G.getImageFromBundles=function(f){return Q.getImageUrl(f)};var c=p.createTemporaryGraph;p.createTemporaryGraph=function(){var f=c.apply(this,arguments);f.getImageFromBundles=function(l){return Q.getImageUrl(l)};return f};this.graphConfig.move&&(G.isMoveCellsEvent=function(f){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(G,p);window.setTimeout(mxUtils.bind(this,function(){try{mxEvent.addListener(e,"click",function(){p.destroy()}),P.style.outline="none",P.style.zIndex=this.lightboxZIndex,g.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(P)):(document.body.appendChild(P),document.body.appendChild(g)),p.setFileData(this.xml),mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)"),p.chromelessToolbar.style.bottom="60px",p.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(p.chromelessToolbar),p.getEditBlankXml=mxUtils.bind(this,function(){return this.xml}),this.showLayers(G,this.graph),p.lightboxFit(),p.chromelessResize()}catch(f){p.handleError(f,null,function(){p.destroy()})}}),0);return p};Dialog.prototype.getDocumentSize=function(){return new mxRectangle(0,0,Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0))};GraphViewer.prototype.updateTitle=function(b,e){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",e||b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",e||b))};@@ -4281,9 +4283,9 @@ GraphViewer.getCss=function(){return[".geDarkMode img {\n\tfilter: invert(1);\n}GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,g){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var m=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;m.open("GET",b);m.onload=function(){e(null!=m.getText?m.getText():m.responseText)};m.onerror=g;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeObserver=!0;GraphViewer.useResizeSensor=!0;(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(g){return window.setTimeout(g,20)},e=function(g,m){function u(){this.q=[];this.add=function(t){this.q.push(t)};var f,l;this.call=function(){f=0;for(l=this.q.length;f<l;f++)this.q[f].call()}}function p(f,l){return f.currentStyle?f.currentStyle[l]:window.getComputedStyle?window.getComputedStyle(f,null).getPropertyValue(l):f.style[l]}function B(f,l){if(!f.resizedAttached)f.resizedAttached=new u,f.resizedAttached.add(l);else if(f.resizedAttached){f.resizedAttached.add(l);return}f.resizeSensor=document.createElement("div");f.resizeSensor.className="resize-sensor";f.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";f.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>';-f.appendChild(f.resizeSensor);"static"==p(f,"position")&&(f.style.position="relative");var t=f.resizeSensor.childNodes[0],z=t.childNodes[0],C=f.resizeSensor.childNodes[1],F=function(){z.style.width="100000px";z.style.height="100000px";t.scrollLeft=1E5;t.scrollTop=1E5;C.scrollLeft=1E5;C.scrollTop=1E5};F();var N=!1,K=function(){f.resizedAttached&&(N&&(f.resizedAttached.call(),N=!1),b(K))};b(K);var J,da,ea,ca;l=function(){if((ea=f.offsetWidth)!=J||(ca=f.offsetHeight)!=da)N=!0,J=ea,da=ca;F()};var W=function(ba,-ha,la){ba.attachEvent?ba.attachEvent("on"+ha,la):ba.addEventListener(ha,la)};W(t,"scroll",l);W(C,"scroll",l)}var H=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var T=null,G=!1;(new ResizeObserver(function(){G||(null!=T&&window.clearTimeout(T),T=window.setTimeout(function(){G=!0;H();T=null;G=!1},200))})).observe(g)}else{var P=Object.prototype.toString.call(g),R="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===-P||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(R){P=0;for(var c=g.length;P<c;P++)B(g[P],H)}else B(g,H);this.detach=function(){if(R)for(var f=0,l=g.length;f<l;f++)e.detach(g[f]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();+f.appendChild(f.resizeSensor);"static"==p(f,"position")&&(f.style.position="relative");var t=f.resizeSensor.childNodes[0],z=t.childNodes[0],C=f.resizeSensor.childNodes[1],F=function(){z.style.width="100000px";z.style.height="100000px";t.scrollLeft=1E5;t.scrollTop=1E5;C.scrollLeft=1E5;C.scrollTop=1E5};F();var N=!1,K=function(){f.resizedAttached&&(N&&(f.resizedAttached.call(),N=!1),b(K))};b(K);var J,da,ea,ca;l=function(){if((ea=f.offsetWidth)!=J||(ca=f.offsetHeight)!=da)N=!0,J=ea,da=ca;F()};var X=function(aa,+ia,la){aa.attachEvent?aa.attachEvent("on"+ia,la):aa.addEventListener(ia,la)};X(t,"scroll",l);X(C,"scroll",l)}var H=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,G=!1;(new ResizeObserver(function(){G||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){G=!0;H();S=null;G=!1},200))})).observe(g)}else{var P=Object.prototype.toString.call(g),Q="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===+P||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(Q){P=0;for(var c=g.length;P<c;P++)B(g[P],H)}else B(g,H);this.detach=function(){if(Q)for(var f=0,l=g.length;f<l;f++)e.detach(g[f]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},{val:"parallelMultiple",dispName:"Parallel Multiple"},{val:"terminate",dispName:"Terminate"},{val:"exclusiveGw",dispName:"Exclusive Gw"},{val:"parallelGw",dispName:"Parallel Gw"},{val:"complexGw",dispName:"Complex Gw"}]},{name:"outline",dispName:"Event Type",type:"enum",defVal:"standard",enumList:[{val:"standard",dispName:"Standard"},{val:"eventInt",dispName:"Interrupting"},{val:"eventNonint",dispName:"Non-Interrupting"},{val:"catching",dispName:"Catching"},{val:"boundInt",dispName:"Bound Interrupting"},diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.jsindex c763e1ca4..ba0a4f324 100644--- a/src/main/webapp/js/viewer.min.js+++ b/src/main/webapp/js/viewer.min.js@@ -30,7 +30,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";-window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.0.16",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.1.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||@@ -1970,12 +1970,12 @@ Editor.prototype.setModified=function(b){this.modified=b};Editor.prototype.setFiEditor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,u){e.undoableEditHappened(u.getProperty("edit"))};var g=mxUtils.bind(this,function(m,u){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,g);b.getView().addListener(mxEvent.UNDO,g);g=function(m,u){m=u.getProperty("edit").changes;m=b.getSelectionCellsForChanges(m);u=!1;if(0<m.length){for(var p=[],B=0;B<m.length;B++)null!=b.view.getState(m[B])&&(p.push(m[B]),u||(b.scrollCellToVisible(m[B]),u=!0));b.setSelectionCells(p)}};e.addListener(mxEvent.UNDO,g);e.addListener(mxEvent.REDO,g);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};-function Dialog(b,e,g,m,u,p,B,H,T,G,P){this.editorUi=b;var R=T?57:0,c=g,f=m,l=T?0:64,t=Editor.inlineFullscreen||null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(t.height=window.innerHeight);var z=t.height;t=Math.max(1,Math.round((t.width-g-l)/2));var C=Math.max(1,Math.round((z-m-b.footerHeight)/3));e.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-l):g;m=Math.min(m,z-l);0<b.dialogs.length&&+function Dialog(b,e,g,m,u,p,B,H,S,G,P){this.editorUi=b;var Q=S?57:0,c=g,f=m,l=S?0:64,t=Editor.inlineFullscreen||null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(t.height=window.innerHeight);var z=t.height;t=Math.max(1,Math.round((t.width-g-l)/2));var C=Math.max(1,Math.round((z-m-b.footerHeight)/3));e.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-l):g;m=Math.min(m,z-l);0<b.dialogs.length&&(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("geBackground"),this.bg.style.position="absolute",this.bg.style.height=z+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));var F=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=F.x+"px";this.bg.style.top=F.y+"px";t+=F.x;C+=F.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px",C+=b.embedViewport.y,t+=b.embedViewport.x);-u&&document.body.appendChild(this.bg);var N=b.createDiv(T?"geTransDialog":"geDialog");u=this.getPosition(t,C,g,m);t=u.x;C=u.y;N.style.width=g+"px";N.style.height=m+"px";N.style.left=t+"px";N.style.top=C+"px";N.style.zIndex=this.zIndex;N.appendChild(e);document.body.appendChild(N);!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),p.setAttribute("title",mxResources.get("close")),-p.className="geDialogClose",p.style.top=C+14+"px",p.style.left=t+g+38-R+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!P)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(J){K=!0}),null,mxUtils.bind(this,function(J){K&&(b.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var J=G();null!=J&&(c=g=J.w,f=m=J.h)}J=Editor.inlineFullscreen||+u&&document.body.appendChild(this.bg);var N=b.createDiv(S?"geTransDialog":"geDialog");u=this.getPosition(t,C,g,m);t=u.x;C=u.y;N.style.width=g+"px";N.style.height=m+"px";N.style.left=t+"px";N.style.top=C+"px";N.style.zIndex=this.zIndex;N.appendChild(e);document.body.appendChild(N);!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),p.setAttribute("title",mxResources.get("close")),+p.className="geDialogClose",p.style.top=C+14+"px",p.style.left=t+g+38-Q+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!P)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(J){K=!0}),null,mxUtils.bind(this,function(J){K&&(b.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var J=G();null!=J&&(c=g=J.w,f=m=J.h)}J=Editor.inlineFullscreen||null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);z=J.height;this.bg.style.height=z+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");g=null!=document.body?Math.min(c,document.body.scrollWidth-l):c;m=Math.min(f,z-l);J=Math.max(1,Math.round((J.width-g-l)/2));var da=Math.max(1,Math.round((z-m-b.footerHeight)/3));da=this.getPosition(J,da,g,m);J=da.x;da=da.y;var ea=mxUtils.getDocumentScrollOrigin(document);J+=ea.x;-da+=ea.y;Editor.inlineFullscreen||null==b.embedViewport||(da+=b.embedViewport.y,J+=b.embedViewport.x);N.style.left=J+"px";N.style.top=da+"px";N.style.width=g+"px";N.style.height=m+"px";!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=da+14+"px",this.dialogImg.style.left=J+g+38-R+"px")});null!=b.embedViewport?b.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=+da+=ea.y;Editor.inlineFullscreen||null==b.embedViewport||(da+=b.embedViewport.y,J+=b.embedViewport.x);N.style.left=J+"px";N.style.top=da+"px";N.style.width=g+"px";N.style.height=m+"px";!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=da+14+"px",this.dialogImg.style.left=J+g+38-Q+"px")});null!=b.embedViewport?b.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=B;this.container=N;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";@@ -1983,93 +1983,93 @@ Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKA"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getDocumentSize=function(){return mxUtils.getDocumentSize()};Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&null!=this.dialogImg.parentNode&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);null!=this.editorUi.embedViewport?this.editorUi.removeListener(this.resizeListener):mxEvent.removeListener(window,"resize",this.resizeListener);null!=this.container.parentNode&&this.container.parentNode.removeChild(this.container)};-var ErrorDialog=function(b,e,g,m,u,p,B,H,T,G,P){T=null!=T?T:!0;var R=document.createElement("div");R.style.textAlign="center";if(null!=e){var c=document.createElement("div");c.style.padding="0px";c.style.margin="0px";c.style.fontSize="18px";c.style.paddingBottom="16px";c.style.marginBottom="10px";c.style.borderBottom="1px solid #c0c0c0";c.style.color="gray";c.style.whiteSpace="nowrap";c.style.textOverflow="ellipsis";c.style.overflow="hidden";mxUtils.write(c,e);c.setAttribute("title",e);R.appendChild(c)}e=-document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=Graph.sanitizeHtml(g);R.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=G&&(G=mxUtils.button(G,function(){null!=P&&P()}),G.className="geBtn",g.appendChild(G));-var f=mxUtils.button(m,function(){T&&b.hideDialog();null!=u&&u()});f.className="geBtn";g.appendChild(f);null!=B&&(m=mxUtils.button(B,function(){T&&b.hideDialog();null!=H&&H()}),m.className="geBtn gePrimaryBtn",g.appendChild(m));this.init=function(){f.focus()};R.appendChild(g);this.container=R},PrintDialog=function(b,e,g){this.create(b,e,g)};-PrintDialog.prototype.create=function(b){function e(f){var l=B.checked||G.checked,t=parseInt(R.value)/100;isNaN(t)&&(t=1,R.value="100%");mxClient.IS_SF&&(t*=.75);var z=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,C=1/g.pageScale;if(l){var F=B.checked?1:parseInt(P.value);isNaN(F)||(C=mxUtils.getScaleForPageCount(F,g,z))}var N=F=0;z=mxRectangle.fromRectangle(z);z.width=Math.ceil(z.width*t);z.height=Math.ceil(z.height*t);C*=t;!l&&g.pageVisible?(t=g.getPageLayout(),F-=t.x*z.width,N-=t.y*z.height):-l=!0;l=PrintDialog.createPrintPreview(g,C,z,0,F,N,l);l.open();f&&PrintDialog.printPreview(l)}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var u=document.createElement("tbody");var p=document.createElement("tr");var B=document.createElement("input");B.setAttribute("type","checkbox");var H=document.createElement("td");H.setAttribute("colspan","2");H.style.fontSize="10pt";H.appendChild(B);var T=document.createElement("span");mxUtils.write(T," "+mxResources.get("fitPage"));-H.appendChild(T);mxEvent.addListener(T,"click",function(f){B.checked=!B.checked;G.checked=!B.checked;mxEvent.consume(f)});mxEvent.addListener(B,"change",function(){G.checked=!B.checked});p.appendChild(H);u.appendChild(p);p=p.cloneNode(!1);var G=document.createElement("input");G.setAttribute("type","checkbox");H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(G);T=document.createElement("span");mxUtils.write(T," "+mxResources.get("posterPrint")+":");H.appendChild(T);mxEvent.addListener(T,+var ErrorDialog=function(b,e,g,m,u,p,B,H,S,G,P){S=null!=S?S:!0;var Q=document.createElement("div");Q.style.textAlign="center";if(null!=e){var c=document.createElement("div");c.style.padding="0px";c.style.margin="0px";c.style.fontSize="18px";c.style.paddingBottom="16px";c.style.marginBottom="10px";c.style.borderBottom="1px solid #c0c0c0";c.style.color="gray";c.style.whiteSpace="nowrap";c.style.textOverflow="ellipsis";c.style.overflow="hidden";mxUtils.write(c,e);c.setAttribute("title",e);Q.appendChild(c)}e=+document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=Graph.sanitizeHtml(g);Q.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=G&&(G=mxUtils.button(G,function(){null!=P&&P()}),G.className="geBtn",g.appendChild(G));+var f=mxUtils.button(m,function(){S&&b.hideDialog();null!=u&&u()});f.className="geBtn";g.appendChild(f);null!=B&&(m=mxUtils.button(B,function(){S&&b.hideDialog();null!=H&&H()}),m.className="geBtn gePrimaryBtn",g.appendChild(m));this.init=function(){f.focus()};Q.appendChild(g);this.container=Q},PrintDialog=function(b,e,g,m){this.create(b,e,g,m)};+PrintDialog.prototype.create=function(b){function e(f){var l=B.checked||G.checked,t=parseInt(Q.value)/100;isNaN(t)&&(t=1,Q.value="100%");mxClient.IS_SF&&(t*=.75);var z=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,C=1/g.pageScale;if(l){var F=B.checked?1:parseInt(P.value);isNaN(F)||(C=mxUtils.getScaleForPageCount(F,g,z))}var N=F=0;z=mxRectangle.fromRectangle(z);z.width=Math.ceil(z.width*t);z.height=Math.ceil(z.height*t);C*=t;!l&&g.pageVisible?(t=g.getPageLayout(),F-=t.x*z.width,N-=t.y*z.height):+l=!0;l=PrintDialog.createPrintPreview(g,C,z,0,F,N,l);l.open();f&&PrintDialog.printPreview(l)}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var u=document.createElement("tbody");var p=document.createElement("tr");var B=document.createElement("input");B.setAttribute("type","checkbox");var H=document.createElement("td");H.setAttribute("colspan","2");H.style.fontSize="10pt";H.appendChild(B);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));+H.appendChild(S);mxEvent.addListener(S,"click",function(f){B.checked=!B.checked;G.checked=!B.checked;mxEvent.consume(f)});mxEvent.addListener(B,"change",function(){G.checked=!B.checked});p.appendChild(H);u.appendChild(p);p=p.cloneNode(!1);var G=document.createElement("input");G.setAttribute("type","checkbox");H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(G);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");H.appendChild(S);mxEvent.addListener(S,"click",function(f){G.checked=!G.checked;B.checked=!G.checked;mxEvent.consume(f)});p.appendChild(H);var P=document.createElement("input");P.setAttribute("value","1");P.setAttribute("type","number");P.setAttribute("min","1");P.setAttribute("size","4");P.setAttribute("disabled","disabled");P.style.width="50px";H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(P);mxUtils.write(H," "+mxResources.get("pages")+" (max)");p.appendChild(H);u.appendChild(p);mxEvent.addListener(G,"change",-function(){G.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");B.checked=!G.checked});p=p.cloneNode(!1);H=document.createElement("td");mxUtils.write(H,mxResources.get("pageScale")+":");p.appendChild(H);H=document.createElement("td");var R=document.createElement("input");R.setAttribute("value","100 %");R.setAttribute("size","5");R.style.width="50px";H.appendChild(R);p.appendChild(H);u.appendChild(p);p=document.createElement("tr");H=document.createElement("td");H.colSpan=2;-H.style.paddingTop="20px";H.setAttribute("align","right");T=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});T.className="geBtn";b.editor.cancelFirst&&H.appendChild(T);if(PrintDialog.previewEnabled){var c=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});c.className="geBtn";H.appendChild(c)}c=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});c.className="geBtn gePrimaryBtn";H.appendChild(c);b.editor.cancelFirst||-H.appendChild(T);p.appendChild(H);u.appendChild(p);m.appendChild(u);this.container=m};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(e){}};-PrintDialog.createPrintPreview=function(b,e,g,m,u,p,B){e=new mxPrintPreview(b,e,g,m,u,p);e.title=mxResources.get("preview");e.addPageCss=!mxClient.IS_SF;e.printBackgroundImage=!0;e.autoOrigin=B;B=b.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";e.backgroundColor=B;var H=e.isTextLabel;e.isTextLabel=function(G){return"geHint"==!G.className&&H.apply(this,arguments)};var T=e.getLinkForCellState;e.getLinkForCellState=function(G){return b.getAbsoluteUrl(T.apply(this,arguments))};return e};+function(){G.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");B.checked=!G.checked});p=p.cloneNode(!1);H=document.createElement("td");mxUtils.write(H,mxResources.get("pageScale")+":");p.appendChild(H);H=document.createElement("td");var Q=document.createElement("input");Q.setAttribute("value","100 %");Q.setAttribute("size","5");Q.style.width="50px";H.appendChild(Q);p.appendChild(H);u.appendChild(p);p=document.createElement("tr");H=document.createElement("td");H.colSpan=2;+H.style.paddingTop="20px";H.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&H.appendChild(S);if(PrintDialog.previewEnabled){var c=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});c.className="geBtn";H.appendChild(c)}c=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});c.className="geBtn gePrimaryBtn";H.appendChild(c);b.editor.cancelFirst||+H.appendChild(S);p.appendChild(H);u.appendChild(p);m.appendChild(u);this.container=m};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(e){}};+PrintDialog.createPrintPreview=function(b,e,g,m,u,p,B){e=new mxPrintPreview(b,e,g,m,u,p);e.title=mxResources.get("preview");e.addPageCss=!mxClient.IS_SF;e.printBackgroundImage=!0;e.autoOrigin=B;B=b.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";e.backgroundColor=B;var H=e.isTextLabel;e.isTextLabel=function(G){return"geHint"==!G.className&&H.apply(this,arguments)};var S=e.getLinkForCellState;e.getLinkForCellState=function(G){return b.getAbsoluteUrl(S.apply(this,arguments))};return e};PrintDialog.previewEnabled=!0;-var PageSetupDialog=function(b){function e(){var t=R;null!=t&&null!=t.originalSrc&&(t=b.createImageForPageLink(t.originalSrc,null));null!=t&&null!=t.src?(P.style.backgroundImage="url("+t.src+")",P.style.display="inline-block"):(P.style.backgroundImage="",P.style.display="none");P.style.backgroundColor="";null!=c&&c!=mxConstants.NONE&&(P.style.backgroundColor=c,P.style.display="inline-block")}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var u=document.createElement("tbody");+var PageSetupDialog=function(b){function e(){var t=Q;null!=t&&null!=t.originalSrc&&(t=b.createImageForPageLink(t.originalSrc,null));null!=t&&null!=t.src?(P.style.backgroundImage="url("+t.src+")",P.style.display="inline-block"):(P.style.backgroundImage="",P.style.display="none");P.style.backgroundColor="";null!=c&&c!=mxConstants.NONE&&(P.style.backgroundColor=c,P.style.display="inline-block")}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var u=document.createElement("tbody");var p=document.createElement("tr");var B=document.createElement("td");B.style.verticalAlign="top";B.style.fontSize="10pt";mxUtils.write(B,mxResources.get("paperSize")+":");p.appendChild(B);B=document.createElement("td");B.style.verticalAlign="top";B.style.fontSize="10pt";var H=PageSetupDialog.addPageFormatPanel(B,"pagesetupdialog",g.pageFormat);p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("gridSize")+":");p.appendChild(B);-B=document.createElement("td");B.style.whiteSpace="nowrap";var T=document.createElement("input");T.setAttribute("type","number");T.setAttribute("min","0");T.style.width="40px";T.style.marginLeft="6px";T.value=g.getGridSize();B.appendChild(T);mxEvent.addListener(T,"change",function(){var t=parseInt(T.value);T.value=Math.max(1,isNaN(t)?g.getGridSize():t)});p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("background")+":");+B=document.createElement("td");B.style.whiteSpace="nowrap";var S=document.createElement("input");S.setAttribute("type","number");S.setAttribute("min","0");S.style.width="40px";S.style.marginLeft="6px";S.value=g.getGridSize();B.appendChild(S);mxEvent.addListener(S,"change",function(){var t=parseInt(S.value);S.value=Math.max(1,isNaN(t)?g.getGridSize():t)});p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("background")+":");p.appendChild(B);B=document.createElement("td");var G=document.createElement("button");G.className="geBtn";G.style.margin="0px";mxUtils.write(G,mxResources.get("change")+"...");var P=document.createElement("div");P.style.display="inline-block";P.style.verticalAlign="middle";P.style.backgroundPosition="center center";P.style.backgroundRepeat="no-repeat";P.style.backgroundSize="contain";P.style.border="1px solid lightGray";P.style.borderRadius="4px";P.style.marginRight="14px";P.style.height="32px";-P.style.width="64px";P.style.cursor="pointer";P.style.padding="4px";var R=g.backgroundImage,c=g.background,f=g.shadowVisible,l=function(t){b.showBackgroundImageDialog(function(z,C,F,N){C||(null!=z&&null!=z.src&&Graph.isPageLink(z.src)&&(z={originalSrc:z.src}),R=z,f=N);c=F;e()},R,c,!0);mxEvent.consume(t)};mxEvent.addListener(G,"click",l);mxEvent.addListener(P,"click",l);e();B.appendChild(P);B.appendChild(G);p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");-B.colSpan=2;B.style.paddingTop="16px";B.setAttribute("align","right");G=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});G.className="geBtn";b.editor.cancelFirst&&B.appendChild(G);l=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var t=parseInt(T.value);isNaN(t)||g.gridSize===t||g.setGridSize(t);t=new ChangePageSetup(b,c,R,H.get());t.ignoreColor=g.background==c;t.ignoreImage=(null!=g.backgroundImage?g.backgroundImage.src:null)===(null!=R?R.src:null);null!=f&&+P.style.width="64px";P.style.cursor="pointer";P.style.padding="4px";var Q=g.backgroundImage,c=g.background,f=g.shadowVisible,l=function(t){b.showBackgroundImageDialog(function(z,C,F,N){C||(null!=z&&null!=z.src&&Graph.isPageLink(z.src)&&(z={originalSrc:z.src}),Q=z,f=N);c=F;e()},Q,c,!0);mxEvent.consume(t)};mxEvent.addListener(G,"click",l);mxEvent.addListener(P,"click",l);e();B.appendChild(P);B.appendChild(G);p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");+B.colSpan=2;B.style.paddingTop="16px";B.setAttribute("align","right");G=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});G.className="geBtn";b.editor.cancelFirst&&B.appendChild(G);l=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var t=parseInt(S.value);isNaN(t)||g.gridSize===t||g.setGridSize(t);t=new ChangePageSetup(b,c,Q,H.get());t.ignoreColor=g.background==c;t.ignoreImage=(null!=g.backgroundImage?g.backgroundImage.src:null)===(null!=Q?Q.src:null);null!=f&&(t.shadowVisible=f);g.pageFormat.width==t.previousFormat.width&&g.pageFormat.height==t.previousFormat.height&&t.ignoreColor&&t.ignoreImage&&t.shadowVisible==g.shadowVisible||g.model.execute(t)});l.className="geBtn gePrimaryBtn";B.appendChild(l);b.editor.cancelFirst||B.appendChild(G);p.appendChild(B);u.appendChild(p);m.appendChild(u);this.container=m};PageSetupDialog.addPageFormatPanel=function(b,e,g,m){e="format-"+e;var u=document.createElement("input");u.setAttribute("name",e);u.setAttribute("type","radio");u.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","landscape");var B=document.createElement("select");B.style.marginBottom="4px";B.style.borderRadius="4px";B.style.borderWidth="1px";B.style.borderStyle="solid";B.style.boxSizing="border-box";-B.style.padding="2px";B.style.width="210px";var H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.marginLeft="4px";H.style.width="210px";H.style.height="24px";u.style.marginRight="6px";H.appendChild(u);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));H.appendChild(e);p.style.marginLeft="10px";p.style.marginRight="6px";H.appendChild(p);var T=document.createElement("span");T.style.width="100px";mxUtils.write(T,mxResources.get("landscape"));-H.appendChild(T);var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.marginLeft="4px";G.style.fontSize="12px";G.style.width="210px";G.style.height="24px";var P=document.createElement("input");P.setAttribute("size","7");P.setAttribute("title",mxResources.get("width"));P.style.textAlign="right";G.appendChild(P);mxUtils.write(G," x ");var R=document.createElement("input");R.setAttribute("size","7");R.setAttribute("title",mxResources.get("height"));R.style.textAlign="right";G.appendChild(R);+B.style.padding="2px";B.style.width="210px";var H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.marginLeft="4px";H.style.width="210px";H.style.height="24px";u.style.marginRight="6px";H.appendChild(u);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));H.appendChild(e);p.style.marginLeft="10px";p.style.marginRight="6px";H.appendChild(p);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,mxResources.get("landscape"));+H.appendChild(S);var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.marginLeft="4px";G.style.fontSize="12px";G.style.width="210px";G.style.height="24px";var P=document.createElement("input");P.setAttribute("size","7");P.setAttribute("title",mxResources.get("width"));P.style.textAlign="right";G.appendChild(P);mxUtils.write(G," x ");var Q=document.createElement("input");Q.setAttribute("size","7");Q.setAttribute("title",mxResources.get("height"));Q.style.textAlign="right";G.appendChild(Q);var c=document.createElement("select");c.style.marginLeft="4px";c.style.maxWidth="78px";c.style.width="78px";for(var f=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],l=0;l<f.length;l++){var t=document.createElement("option");t.setAttribute("value",f[l].unit);mxUtils.write(t,f[l].label);c.appendChild(t)}c.value=Editor.pageSizeUnit;G.appendChild(c);H.style.display="none";G.style.display="none";var z={},C=PageSetupDialog.getFormats();for(l=0;l<C.length;l++)f=C[l],z[f.key]=f,t=document.createElement("option"),t.setAttribute("value",f.key),mxUtils.write(t,f.title),B.appendChild(t);var F=function(){B.value="custom";for(var K=0;K<C.length;K++){var J=C[K];null!=J.format&&("a4"==J.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==J.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),g.width=583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),g.width==J.format.width&&g.height==J.format.height?(B.value=J.key,u.setAttribute("checked","checked"),u.defaultChecked=!0,u.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,detected=!0):g.width==J.format.height&&g.height==J.format.width&&(B.value=J.key,u.removeAttribute("checked"),u.defaultChecked=!1,u.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,detected=p.checked=!0))}"custom"==B.value?-(P.value=Editor.toUnit(g.width,c.value),R.value=Editor.toUnit(g.height,c.value),u.setAttribute("checked","checked"),B.value="custom",H.style.display="none",G.style.display=""):(H.style.display="",G.style.display="none")};F();b.appendChild(B);mxUtils.br(b);b.appendChild(H);b.appendChild(G);var N=function(K,J){K=z[B.value];null!=K.format?(P.value=Editor.toUnit(p.checked?K.format.height:K.format.width,c.value),R.value=Editor.toUnit(p.checked?K.format.width:K.format.height,c.value),G.style.display="none",-H.style.display=""):(H.style.display="none",G.style.display="");K=parseFloat(P.value);if(isNaN(K)||0>=K)P.value=Editor.toUnit(g.width,c.value);K=parseFloat(R.value);if(isNaN(K)||0>=K)R.value=Editor.toUnit(g.height,c.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(P.value),c.value)),Math.floor(Editor.fromUnit(parseFloat(R.value),c.value)));J||K.width==g.width&&K.height==g.height||(g=K,null!=m&&m(g))};mxEvent.addListener(e,"click",function(K){u.checked=!0;N(K);mxEvent.consume(K)});-mxEvent.addListener(T,"click",function(K){p.checked=!0;N(K);mxEvent.consume(K)});mxEvent.addListener(P,"blur",N);mxEvent.addListener(P,"click",N);mxEvent.addListener(R,"blur",N);mxEvent.addListener(R,"click",N);mxEvent.addListener(p,"change",N);mxEvent.addListener(u,"change",N);mxEvent.addListener(B,"change",function(K){N(K,"custom"==B.value);mxEvent.consume(K)});mxEvent.addListener(c,"change",function(K){P.value=Editor.toUnit(Editor.fromUnit(P.value,Editor.pageSizeUnit),c.value);R.value=Editor.toUnit(Editor.fromUnit(R.value,-Editor.pageSizeUnit),c.value);Editor.pageSizeUnit=c.value;N(K,!0);mxEvent.consume(K)});N(null,!0);return{set:function(K){g=K;F(null,null,!0)},get:function(){return g},widthInput:P,heightInput:R}};+(P.value=Editor.toUnit(g.width,c.value),Q.value=Editor.toUnit(g.height,c.value),u.setAttribute("checked","checked"),B.value="custom",H.style.display="none",G.style.display=""):(H.style.display="",G.style.display="none")};F();b.appendChild(B);mxUtils.br(b);b.appendChild(H);b.appendChild(G);var N=function(K,J){K=z[B.value];null!=K.format?(P.value=Editor.toUnit(p.checked?K.format.height:K.format.width,c.value),Q.value=Editor.toUnit(p.checked?K.format.width:K.format.height,c.value),G.style.display="none",+H.style.display=""):(H.style.display="none",G.style.display="");K=parseFloat(P.value);if(isNaN(K)||0>=K)P.value=Editor.toUnit(g.width,c.value);K=parseFloat(Q.value);if(isNaN(K)||0>=K)Q.value=Editor.toUnit(g.height,c.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(P.value),c.value)),Math.floor(Editor.fromUnit(parseFloat(Q.value),c.value)));J||K.width==g.width&&K.height==g.height||(g=K,null!=m&&m(g))};mxEvent.addListener(e,"click",function(K){u.checked=!0;N(K);mxEvent.consume(K)});+mxEvent.addListener(S,"click",function(K){p.checked=!0;N(K);mxEvent.consume(K)});mxEvent.addListener(P,"blur",N);mxEvent.addListener(P,"click",N);mxEvent.addListener(Q,"blur",N);mxEvent.addListener(Q,"click",N);mxEvent.addListener(p,"change",N);mxEvent.addListener(u,"change",N);mxEvent.addListener(B,"change",function(K){N(K,"custom"==B.value);mxEvent.consume(K)});mxEvent.addListener(c,"change",function(K){P.value=Editor.toUnit(Editor.fromUnit(P.value,Editor.pageSizeUnit),c.value);Q.value=Editor.toUnit(Editor.fromUnit(Q.value,+Editor.pageSizeUnit),c.value);Editor.pageSizeUnit=c.value;N(K,!0);mxEvent.consume(K)});N(null,!0);return{set:function(K){g=K;F(null,null,!0)},get:function(){return g},widthInput:P,heightInput:Q}};PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};-var FilenameDialog=function(b,e,g,m,u,p,B,H,T,G,P){T=null!=T?T:!0;var R=document.createElement("div"),c=document.createElement("div");c.style.width="100%";c.style.display="grid";c.style.gap="5px 8px";c.style.gridAutoColumns="auto 1fr";c.style.boxSizing="border-box";c.style.padding="3px";var f=document.createElement("div");f.style.display="inline-flex";f.style.alignItems="center";f.style.justifyContent="flex-end";f.style.minWidth="0";var l=document.createElement("div");l.style.display="inline-block";-l.style.textOverflow="ellipsis";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.fontSize="10pt";l.style.padding="2px 0";l.setAttribute("title",u||mxResources.get("filename"));mxUtils.write(l,(u||mxResources.get("filename"))+":");f.appendChild(l);c.appendChild(f);var t=document.createElement("input");t.setAttribute("value",e||"");t.style.flexGrow="1";var z=mxUtils.button(g,function(){if(null==p||p(t.value))T&&b.hideDialog(),m(t.value)});z.className="geBtn gePrimaryBtn";this.init=function(){if(null!=+var FilenameDialog=function(b,e,g,m,u,p,B,H,S,G,P){S=null!=S?S:!0;var Q=document.createElement("div"),c=document.createElement("div");c.style.width="100%";c.style.display="grid";c.style.gap="5px 8px";c.style.gridAutoColumns="auto 1fr";c.style.boxSizing="border-box";c.style.padding="3px";var f=document.createElement("div");f.style.display="inline-flex";f.style.alignItems="center";f.style.justifyContent="flex-end";f.style.minWidth="0";var l=document.createElement("div");l.style.display="inline-block";+l.style.textOverflow="ellipsis";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.fontSize="10pt";l.style.padding="2px 0";l.setAttribute("title",u||mxResources.get("filename"));mxUtils.write(l,(u||mxResources.get("filename"))+":");f.appendChild(l);c.appendChild(f);var t=document.createElement("input");t.setAttribute("value",e||"");t.style.flexGrow="1";var z=mxUtils.button(g,function(){if(null==p||p(t.value))S&&b.hideDialog(),m(t.value)});z.className="geBtn gePrimaryBtn";this.init=function(){if(null!=u||null==B)if(null!=P?Editor.selectFilename(t):(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var C=c.parentNode;if(null!=C){var F=null;mxEvent.addListener(C,"dragleave",function(N){null!=F&&(F.style.backgroundColor="",F=null);N.stopPropagation();N.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(N){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=t,F.style.backgroundColor="#ebf2f9");N.stopPropagation();N.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(N){null!=F&&(F.style.backgroundColor="",F=null);0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")&&(t.value=decodeURIComponent(N.dataTransfer.getData("text/uri-list")),z.click());N.stopPropagation();N.preventDefault()}))}}};f=document.createElement("div");f.style.display="inline-flex";f.style.alignItems="center";f.style.gap="4px";f.style.whiteSpace="nowrap";f.appendChild(t);c.appendChild(f);null==u&&null!=B||null==P||null==b.editor.diagramFileTypes||(f=document.createElement("div"),f.style.display="inline-flex",f.style.alignItems="center",f.style.textOverflow="ellipsis",f.style.justifyContent="flex-end",f.style.fontSize="10pt",mxUtils.write(f,mxResources.get("type")+":"),c.appendChild(f),f=document.createElement("div"),f.style.display="inline-flex",f.style.alignItems="center",f.style.whiteSpace="nowrap",c.appendChild(f),e=FilenameDialog.createFileTypes(b,t,b.editor.diagramFileTypes),e.style.width="100%",f.appendChild(e));null!=B&&c.appendChild(B);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=P?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=G&&G()});f.className="geBtn";null==H||b.isOffline()||row.appendChild(b.createHelpIcon(H));-b.editor.cancelFirst&&row.appendChild(f);mxEvent.addListener(t,"keypress",function(C){13==C.keyCode&&z.click()});row.appendChild(z);b.editor.cancelFirst||row.appendChild(f);c.appendChild(row);R.appendChild(c);this.container=R};FilenameDialog.filenameHelpLink=null;+b.editor.cancelFirst&&row.appendChild(f);mxEvent.addListener(t,"keypress",function(C){13==C.keyCode&&z.click()});row.appendChild(z);b.editor.cancelFirst||row.appendChild(f);c.appendChild(row);Q.appendChild(c);this.container=Q};FilenameDialog.filenameHelpLink=null;FilenameDialog.createFileTypes=function(b,e,g){var m=document.createElement("select");for(b=0;b<g.length;b++){var u=document.createElement("option");u.setAttribute("value",b);mxUtils.write(u,mxResources.get(g[b].description)+" (."+g[b].extension+")");m.appendChild(u)}mxEvent.addListener(m,"change",function(p){p=g[m.value].extension;var B=e.value.lastIndexOf(".drawio.");B=0<B?B:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<B?e.value.substring(0,B+1)+p:e.value+"."+p;"createEvent"in-document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var B=0,H=0;H<g.length;H++){var T=g[H].extension,G=null;"drawio"!=T&&(G=T,T=".drawio."+T);if(p.substring(p.length-T.length-1)=="."+T||null!=G&&p.substring(p.length-G.length-1)=="."+G){B=H;break}}m.value=B};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};-var WrapperWindow=function(b,e,g,m,u,p,B){var H=b.createSidebarContainer();B(H);this.window=new mxWindow(e,H,g,m,u,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(T){null==T&&(T=window.event);return null!=T&&b.isSelectionAllowed(T)}))};-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var B=this.graph;if(null!=B.container&&!B.transparentBackground){if(B.pageVisible){var H=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var T=B.container.firstChild;null!=T&&T.nodeType!=mxConstants.NODETYPE_ELEMENT;)T=T.nextSibling;null!=T&&(this.backgroundPageShape=this.createBackgroundPageShape(H),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,-this.backgroundPageShape.init(B.container),T.style.position="absolute",B.container.insertBefore(this.backgroundPageShape.node,T),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(G){B.dblClick(G)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(G){B.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(G))}),mxUtils.bind(this,function(G){null!=+document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var B=0,H=0;H<g.length;H++){var S=g[H].extension,G=null;"drawio"!=S&&(G=S,S=".drawio."+S);if(p.substring(p.length-S.length-1)=="."+S||null!=G&&p.substring(p.length-G.length-1)=="."+G){B=H;break}}m.value=B};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};+var WrapperWindow=function(b,e,g,m,u,p,B){var H=b.createSidebarContainer();B(H);this.window=new mxWindow(e,H,g,m,u,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(S){null==S&&(S=window.event);return null!=S&&b.isSelectionAllowed(S)}))};+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var B=this.graph;if(null!=B.container&&!B.transparentBackground){if(B.pageVisible){var H=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=B.container.firstChild;null!=S&&S.nodeType!=mxConstants.NODETYPE_ELEMENT;)S=S.nextSibling;null!=S&&(this.backgroundPageShape=this.createBackgroundPageShape(H),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,+this.backgroundPageShape.init(B.container),S.style.position="absolute",B.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(G){B.dblClick(G)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(G){B.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(G))}),mxUtils.bind(this,function(G){null!=B.tooltipHandler&&B.tooltipHandler.isHideOnHover()&&B.tooltipHandler.hide();B.isMouseDown&&!mxEvent.isConsumed(G)&&B.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(G))}),mxUtils.bind(this,function(G){B.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(G))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=H,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};-mxGraphView.prototype.validateBackgroundStyles=function(B,H,T){var G=this.graph;B=null!=B?B:1;var P=mxUtils.getLightDarkColor(null==G.background||G.background==mxConstants.NONE?G.defaultPageBackgroundColor:G.background).cssText,R=mxUtils.getLightDarkColor(G.defaultPageBorderColor).cssText,c=null!=P&&this.gridColor!=P.toLowerCase()?this.gridColor:"#ffffff",f="none",l="";"simple"==G.getAdaptiveColors()&&G.background!=mxConstants.NONE&&null!=G.background&&(P=G.background);if(G.isGridEnabled()||G.gridVisible){l=-10;mxClient.IS_SVG?(f=unescape(encodeURIComponent(this.createSvgGrid(c,B))),f=window.btoa?btoa(f):Base64.encode(f,!0),f="url(data:image/svg+xml;base64,"+f+")",l=G.gridSize*this.scale*this.gridSteps*B):f="url("+this.gridImage+")";var t=c=0;H=null!=H?H-this.translate.x*this.scale:0;T=null!=T?T-this.translate.y*this.scale:0;var z=G.gridSize*this.scale*this.gridSteps,C=H%z;z=T%z;null!=G.view.backgroundPageShape&&(t=this.getBackgroundPageBounds(),c=1+t.x,t=1+t.y);l=-Math.round(l-mxUtils.mod(this.translate.x*-this.scale-c+H,l)+C*B)+"px "+-Math.round(l-mxUtils.mod(this.translate.y*this.scale-t+T,l)+z*B)+"px"}B=G.view.canvas;null!=B.ownerSVGElement&&(B=B.ownerSVGElement);c=!Editor.isDarkMode()&&G.enableDiagramBackground;null!=G.view.backgroundPageShape?(G.view.backgroundPageShape.node.style.backgroundPosition=l,G.view.backgroundPageShape.node.style.backgroundImage=f,G.view.backgroundPageShape.node.style.backgroundColor=P,G.view.backgroundPageShape.node.style.borderColor=R,G.view.backgroundPageShape.node.style.colorScheme=+mxGraphView.prototype.validateBackgroundStyles=function(B,H,S){var G=this.graph;B=null!=B?B:1;var P=mxUtils.getLightDarkColor(null==G.background||G.background==mxConstants.NONE?G.defaultPageBackgroundColor:G.background).cssText,Q=mxUtils.getLightDarkColor(G.defaultPageBorderColor).cssText,c=null!=P&&this.gridColor!=P.toLowerCase()?this.gridColor:"#ffffff",f="none",l="";"simple"==G.getAdaptiveColors()&&G.background!=mxConstants.NONE&&null!=G.background&&(P=G.background);if(G.isGridEnabled()||G.gridVisible){l=+10;mxClient.IS_SVG?(f=unescape(encodeURIComponent(this.createSvgGrid(c,B))),f=window.btoa?btoa(f):Base64.encode(f,!0),f="url(data:image/svg+xml;base64,"+f+")",l=G.gridSize*this.scale*this.gridSteps*B):f="url("+this.gridImage+")";var t=c=0;H=null!=H?H-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var z=G.gridSize*this.scale*this.gridSteps,C=H%z;z=S%z;null!=G.view.backgroundPageShape&&(t=this.getBackgroundPageBounds(),c=1+t.x,t=1+t.y);l=-Math.round(l-mxUtils.mod(this.translate.x*+this.scale-c+H,l)+C*B)+"px "+-Math.round(l-mxUtils.mod(this.translate.y*this.scale-t+S,l)+z*B)+"px"}B=G.view.canvas;null!=B.ownerSVGElement&&(B=B.ownerSVGElement);c=!Editor.isDarkMode()&&G.enableDiagramBackground;null!=G.view.backgroundPageShape?(G.view.backgroundPageShape.node.style.backgroundPosition=l,G.view.backgroundPageShape.node.style.backgroundImage=f,G.view.backgroundPageShape.node.style.backgroundColor=P,G.view.backgroundPageShape.node.style.borderColor=Q,G.view.backgroundPageShape.node.style.colorScheme="none"==G.getAdaptiveColors()?"light":"",G.container.classList.add("geDiagramBackdrop"),B.style.backgroundImage="none",B.style.backgroundColor="",G.container.style.backgroundColor=c?G.diagramBackgroundColor:""):(G.container.classList.remove("geDiagramBackdrop"),B.style.backgroundPosition=l,B.style.backgroundImage=f,"1"==urlParams.transparent?G.container.style.background="transparent":!c||null!=G.background&&G.background!=mxConstants.NONE?B.style.backgroundColor=P:(B.style.backgroundColor=G.diagramBackgroundColor,-G.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(B,H){for(var T=this.graph.gridSize*this.scale*(null!=H?H:1);T<this.minGridSize;)T*=2;H=this.gridSteps*T;for(var G=[],P=1;P<this.gridSteps;P++){var R=P*T;G.push("M 0 "+R+" L "+H+" "+R+" M "+R+" 0 L "+R+" "+H)}B=mxUtils.getLightDarkColor(B);T="color-scheme: light dark;";mxClient.IS_SF&&(T="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+T+'" width="'++G.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(B,H){for(var S=this.graph.gridSize*this.scale*(null!=H?H:1);S<this.minGridSize;)S*=2;H=this.gridSteps*S;for(var G=[],P=1;P<this.gridSteps;P++){var Q=P*S;G.push("M 0 "+Q+" L "+H+" "+Q+" M "+Q+" 0 L "+Q+" "+H)}B=mxUtils.getLightDarkColor(B);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+H+'" height="'+H+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+H+'" height="'+H+'" patternUnits="userSpaceOnUse"><path d="'+G.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" opacity="0.2" stroke-width="1"/><path d="M '+H+" 0 L 0 0 0 "+H+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;-mxGraph.prototype.panGraph=function(B,H){b.apply(this,arguments);if(null!=this.shiftPreview1){var T=this.view.canvas;null!=T.ownerSVGElement&&(T=T.ownerSVGElement);var G=this.gridSize*this.view.scale*this.view.gridSteps;G=-Math.round(G-mxUtils.mod(this.view.translate.x*this.view.scale+B,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*this.view.scale+H,G))+"px";T.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(B,H,T){var G=this.view.scale,P=this.view.translate,R=-this.pageFormat,c=G*this.pageScale,f=this.view.getBackgroundPageBounds();H=f.width;T=f.height;var l=new mxRectangle(G*P.x,G*P.y,R.width*c,R.height*c),t=(B=B&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(T/l.height)-1:0,z=B?Math.ceil(H/l.width)-1:0,C=f.x+H,F=f.y+T;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<z&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(N){if(null!=N){for(var K=N==this.horizontalPageBreaks?t:z,J=+mxGraph.prototype.panGraph=function(B,H){b.apply(this,arguments);if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var G=this.gridSize*this.view.scale*this.view.gridSteps;G=-Math.round(G-mxUtils.mod(this.view.translate.x*this.view.scale+B,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*this.view.scale+H,G))+"px";S.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(B,H,S){var G=this.view.scale,P=this.view.translate,Q=+this.pageFormat,c=G*this.pageScale,f=this.view.getBackgroundPageBounds();H=f.width;S=f.height;var l=new mxRectangle(G*P.x,G*P.y,Q.width*c,Q.height*c),t=(B=B&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(S/l.height)-1:0,z=B?Math.ceil(H/l.width)-1:0,C=f.x+H,F=f.y+S;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<z&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(N){if(null!=N){for(var K=N==this.horizontalPageBreaks?t:z,J=0;J<=K;J++){var da=N==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),Math.round(f.y+(J+1)*l.height)),new mxPoint(Math.round(C),Math.round(f.y+(J+1)*l.height))]:[new mxPoint(Math.round(f.x+(J+1)*l.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(J+1)*l.width),Math.round(F))];null!=N[J]?(N[J].points=da,N[J].redraw()):(da=new mxPolyline(da,this.pageBreakColor),da.dialect=this.dialect,da.isDashed=this.pageBreakDashed,da.pointerEvents=!1,da.init(this.view.backgroundPane),da.redraw(),N[J]=da)}for(J=-K;J<N.length;J++)null!=N[J]&&N[J].destroy();N.splice(K,N.length-K)}});B(this.horizontalPageBreaks);B(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(B,H,T){for(var G=0;G<H.length;G++){if(this.graph.isTableCell(H[G])||this.graph.isTableRow(H[G]))return!1;if(this.graph.getModel().isVertex(H[G])){var P=this.graph.getCellGeometry(H[G]);if(null!=P&&P.relative)return!1}}return e.apply(this,arguments)};var g=-mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var B=g.apply(this,arguments);B.intersects=mxUtils.bind(this,function(H,T){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(B,arguments)});return B};mxGraphView.prototype.createBackgroundPageShape=function(B){return new mxRectangleShape(B,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var B=this.getGraphBounds(),H=0<B.width?B.x/-this.scale-this.translate.x:0,T=0<B.height?B.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,P=this.graph.pageScale,R=G.width*P;G=G.height*P;P=Math.floor(Math.min(0,H)/R);var c=Math.floor(Math.min(0,T)/G);return new mxRectangle(this.scale*(this.translate.x+P*R),this.scale*(this.translate.y+c*G),this.scale*(Math.ceil(Math.max(1,H+B.width/this.scale)/R)-P)*R,this.scale*(Math.ceil(Math.max(1,T+B.height/this.scale)/G)-c)*G)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,-H){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=B+"px",this.view.backgroundPageShape.node.style.marginTop=H+"px")};var u=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(B,H,T,G,P,R){var c=u.apply(this,arguments);null==R||R||mxEvent.addListener(c,"mousedown",function(f){mxEvent.consume(f)});return c};var p=-mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(B,H,T){var G=this.graph.model.getParent(B);if(H){var P=this.graph.model.isEdge(B)?null:this.graph.getCellGeometry(B);P=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(B)&&(null!=P&&P.relative||!this.graph.isContainer(G)||this.graph.isPart(B))}else if(P=p.apply(this,arguments),this.graph.isTableCell(B)||this.graph.isTableRow(B))P=G,this.graph.isTable(P)||(P=this.graph.model.getParent(P)),-P=!this.graph.selectionCellsHandler.isHandled(P)||this.graph.isCellSelected(P)&&this.graph.isToggleEvent(T.getEvent())||this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(T.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(G);return P};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var H=this.graph.getModel(),T=H.getParent(B),G=this.graph.view.getState(T),P=this.graph.isCellSelected(B);null!=G&&(H.isVertex(T)||H.isEdge(T));){var R=this.graph.isCellSelected(T);-P=P||R;if(R||!P&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=T;T=H.getParent(T)}return B}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,u=this.editor.graph;u.lightbox=g;var p=u.getGraphBounds;u.getGraphBounds=function(){var W=p.apply(this,arguments),ba=this.backgroundImage;if(null!=ba&&null!=ba.width&&null!=ba.height){var ha=this.view.translate,la=this.view.scale;W=mxRectangle.fromRectangle(W);W.add(new mxRectangle((ha.x+ba.x)*la,(ha.y+ba.y)*la,ba.width*la,ba.height*la))}return W};u.useCssTransforms&&-(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(W,ba){this.clearSelectionState()});u.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);u.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);u.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=-0;u.isEnabled=function(){return!1};u.panningHandler.isForcePanningEvent=function(W){for(var ba=W.getSource();null!=ba&&ba!=u.container;){if("foreignObject"===ba.nodeName||"text"===ba.nodeName)return!1;ba=ba.parentNode}return!mxEvent.isPopupTrigger(W.getEvent())};var B=u.panningHandler.start;u.panningHandler.start=function(){B.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!u.standalone){var H=!1,T=!1;this.setDefaultStyle=function(W){try{u.getModel().isEdge(W)?-T=u.pasteEdgeStyle=!1:H=!1;var ba=u.getCellStyle(W,!1),ha=[],la=[],Y;for(Y in ba)ha.push(ba[Y]),la.push(Y);u.getModel().isEdge(W)?u.currentEdgeStyle={}:u.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",ha,"cells",[W],"force",!0));u.getModel().isEdge(W)?T=u.pasteEdgeStyle=!0:H=!0}catch(ma){this.handleError(ma)}};this.clearDefaultStyle=function(){u.currentEdgeStyle=mxUtils.clone(u.defaultEdgeStyle);u.currentVertexStyle=mxUtils.clone(u.defaultVertexStyle);H=T=-u.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};u.addListener("cellsInserted",function(W,ba){u.pasteCellStyles(u.includeDescendants(ba.getProperty("cells")))});u.addListener("textInserted",function(W,ba){u.pasteCellStyles(ba.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var G=mxUtils.bind(this,function(W){null==W&&(W=window.event);return u.isEditing()||null!=W&&this.isSelectionAllowed(W)});this.container!=document.body||+K;J<N.length;J++)null!=N[J]&&N[J].destroy();N.splice(K,N.length-K)}});B(this.horizontalPageBreaks);B(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(B,H,S){for(var G=0;G<H.length;G++){if(this.graph.isTableCell(H[G])||this.graph.isTableRow(H[G]))return!1;if(this.graph.getModel().isVertex(H[G])){var P=this.graph.getCellGeometry(H[G]);if(null!=P&&P.relative)return!1}}return e.apply(this,arguments)};var g=+mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var B=g.apply(this,arguments);B.intersects=mxUtils.bind(this,function(H,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(B,arguments)});return B};mxGraphView.prototype.createBackgroundPageShape=function(B){return new mxRectangleShape(B,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var B=this.getGraphBounds(),H=0<B.width?B.x/+this.scale-this.translate.x:0,S=0<B.height?B.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,P=this.graph.pageScale,Q=G.width*P;G=G.height*P;P=Math.floor(Math.min(0,H)/Q);var c=Math.floor(Math.min(0,S)/G);return new mxRectangle(this.scale*(this.translate.x+P*Q),this.scale*(this.translate.y+c*G),this.scale*(Math.ceil(Math.max(1,H+B.width/this.scale)/Q)-P)*Q,this.scale*(Math.ceil(Math.max(1,S+B.height/this.scale)/G)-c)*G)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,+H){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=B+"px",this.view.backgroundPageShape.node.style.marginTop=H+"px")};var u=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(B,H,S,G,P,Q){var c=u.apply(this,arguments);null==Q||Q||mxEvent.addListener(c,"mousedown",function(f){mxEvent.consume(f)});return c};var p=+mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(B,H,S){var G=this.graph.model.getParent(B);if(H){var P=this.graph.model.isEdge(B)?null:this.graph.getCellGeometry(B);P=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(B)&&(null!=P&&P.relative||!this.graph.isContainer(G)||this.graph.isPart(B))}else if(P=p.apply(this,arguments),this.graph.isTableCell(B)||this.graph.isTableRow(B))P=G,this.graph.isTable(P)||(P=this.graph.model.getParent(P)),+P=!this.graph.selectionCellsHandler.isHandled(P)||this.graph.isCellSelected(P)&&this.graph.isToggleEvent(S.getEvent())||this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(G);return P};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var H=this.graph.getModel(),S=H.getParent(B),G=this.graph.view.getState(S),P=this.graph.isCellSelected(B);null!=G&&(H.isVertex(S)||H.isEdge(S));){var Q=this.graph.isCellSelected(S);+P=P||Q;if(Q||!P&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=S;S=H.getParent(S)}return B}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,u=this.editor.graph;u.lightbox=g;var p=u.getGraphBounds;u.getGraphBounds=function(){var X=p.apply(this,arguments),aa=this.backgroundImage;if(null!=aa&&null!=aa.width&&null!=aa.height){var ia=this.view.translate,la=this.view.scale;X=mxRectangle.fromRectangle(X);X.add(new mxRectangle((ia.x+aa.x)*la,(ia.y+aa.y)*la,aa.width*la,aa.height*la))}return X};u.useCssTransforms&&+(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(X,aa){this.clearSelectionState()});u.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);u.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);u.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=+0;u.isEnabled=function(){return!1};u.panningHandler.isForcePanningEvent=function(X){for(var aa=X.getSource();null!=aa&&aa!=u.container;){if("foreignObject"===aa.nodeName||"text"===aa.nodeName)return!1;aa=aa.parentNode}return!mxEvent.isPopupTrigger(X.getEvent())};var B=u.panningHandler.start;u.panningHandler.start=function(){B.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!u.standalone){var H=!1,S=!1;this.setDefaultStyle=function(X){try{u.getModel().isEdge(X)?+S=u.pasteEdgeStyle=!1:H=!1;var aa=u.getCellStyle(X,!1),ia=[],la=[],Y;for(Y in aa)ia.push(aa[Y]),la.push(Y);u.getModel().isEdge(X)?u.currentEdgeStyle={}:u.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",ia,"cells",[X],"force",!0));u.getModel().isEdge(X)?S=u.pasteEdgeStyle=!0:H=!0}catch(ma){this.handleError(ma)}};this.clearDefaultStyle=function(){u.currentEdgeStyle=mxUtils.clone(u.defaultEdgeStyle);u.currentVertexStyle=mxUtils.clone(u.defaultVertexStyle);H=S=+u.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};u.addListener("cellsInserted",function(X,aa){u.pasteCellStyles(u.includeDescendants(aa.getProperty("cells")))});u.addListener("textInserted",function(X,aa){u.pasteCellStyles(aa.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var G=mxUtils.bind(this,function(X){null==X&&(X=window.event);return u.isEditing()||null!=X&&this.isSelectionAllowed(X)});this.container!=document.body||this.editor.chromeless&&!this.editor.editable||(this.menubarContainer.onselectstart=G,this.menubarContainer.onmousedown=G,this.toolbarContainer.onselectstart=G,this.toolbarContainer.onmousedown=G,this.diagramContainer.onselectstart=G,this.diagramContainer.onmousedown=G,this.sidebarContainer.onselectstart=G,this.sidebarContainer.onmousedown=G,this.formatContainer.onselectstart=G,this.formatContainer.onmousedown=G,this.footerContainer.onselectstart=G,this.footerContainer.onmousedown=G,null!=this.tabContainer&&-(this.tabContainer.onselectstart=G),mxClient.IS_IOS&&(e=function(){var W=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var ba=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{W=[parseInt(ba[1],10),parseInt(ba[2],10),parseInt(ba[3]||0,10)]}catch(ha){}}return W}(),null!=e&&16<=e[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect",-"none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(e=function(W){if(null!=W){var ba=mxEvent.getSource(W);if("A"==ba.nodeName)for(;null!=ba;){if("geHint"==ba.className)return!0;ba=ba.parentNode}}return G(W)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||+(this.tabContainer.onselectstart=G),mxClient.IS_IOS&&(e=function(){var X=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var aa=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{X=[parseInt(aa[1],10),parseInt(aa[2],10),parseInt(aa[3]||0,10)]}catch(ia){}}return X}(),null!=e&&16<=e[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect",+"none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(e=function(X){if(null!=X){var aa=mxEvent.getSource(X);if("A"==aa.nodeName)for(;null!=aa;){if("geHint"==aa.className)return!0;aa=aa.parentNode}}return G(X)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):u.panningHandler.usePopupTrigger=!1;u.init(this.diagramContainer);mxClient.IS_SVG&&null!=u.view.getDrawPane()&&(e=u.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=u.graphHandler){var P=u.graphHandler.start;u.graphHandler.start=function(){null!=m.hoverIcons&&m.hoverIcons.reset();P.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,-"mousemove",mxUtils.bind(this,function(W){var ba=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(W)-ba.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(W)-ba.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var R=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(W,ba){return m.isSpaceDown()||R.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,-function(W){16==W.which?this.shiftDown=!0:32!=W.which||u.isEditing()?mxEvent.isConsumed(W)||27!=W.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),u.container.style.cursor="move",u.isEditing()||mxEvent.getSource(W)!=u.container||mxEvent.consume(W))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(W){u.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);-var c=u.panningHandler.isForcePanningEvent;u.panningHandler.isForcePanningEvent=function(W){return c.apply(this,arguments)||m.isSpaceDown()||mxEvent.isMouseEvent(W.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(W.getEvent()))&&(!mxEvent.isControlDown(W.getEvent())&&mxEvent.isRightMouseButton(W.getEvent())||mxEvent.isMiddleMouseButton(W.getEvent()))};var f=u.cellEditor.isStopEditingEvent;u.cellEditor.isStopEditingEvent=function(W){return f.apply(this,arguments)||13==W.keyCode&&(!mxClient.IS_SF&&-mxEvent.isControlDown(W)||mxClient.IS_MAC&&mxEvent.isMetaDown(W)||mxClient.IS_SF&&mxEvent.isShiftDown(W))};var l=u.isZoomWheelEvent;u.isZoomWheelEvent=function(){return m.isSpaceDown()||l.apply(this,arguments)};var t=!1,z=null,C=null,F=null,N=mxUtils.bind(this,function(){if(null!=this.toolbar&&t!=u.cellEditor.isContentEditing()){for(var W=this.toolbar.container.firstChild,ba=[];null!=W;){var ha=W.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,W)&&(W.parentNode.removeChild(W),ba.push(W));-W=ha}W=this.toolbar.fontMenu;ha=this.toolbar.sizeMenu;if(null==F)this.toolbar.createTextToolbar();else{for(var la=0;la<F.length;la++)this.toolbar.container.appendChild(F[la]);this.toolbar.fontMenu=z;this.toolbar.sizeMenu=C}t=u.cellEditor.isContentEditing();z=W;C=ha;F=ba}}),K=u.cellEditor.startEditing;u.cellEditor.startEditing=function(){K.apply(this,arguments);N();if(u.cellEditor.isContentEditing()){var W=!1,ba=function(){W||(W=!0,window.setTimeout(function(){var ha=u.getSelectedEditingElement();-null!=ha&&(ha=mxUtils.getCurrentStyle(ha),null!=ha&&null!=m.toolbar&&(m.toolbar.setFontName(mxUtils.getCssFontFamily(ha.fontFamily)),m.toolbar.setFontSize(parseInt(ha.fontSize))));W=!1},0))};mxEvent.addListener(u.cellEditor.textarea,"input",ba);mxEvent.addListener(u.cellEditor.textarea,"touchend",ba);mxEvent.addListener(u.cellEditor.textarea,"mouseup",ba);mxEvent.addListener(u.cellEditor.textarea,"keyup",ba);ba()}};var J=u.cellEditor.stopEditing;u.cellEditor.stopEditing=function(W,ba){try{J.apply(this,-arguments),N()}catch(ha){m.handleError(ha)}};u.container.setAttribute("tabindex","0");u.container.style.cursor="default";if(window.self===window.top&&null!=u.container.parentNode)try{u.container.focus()}catch(W){}var da=u.fireMouseEvent;u.fireMouseEvent=function(W,ba,ha){try{W==mxEvent.MOUSE_DOWN&&this.container.focus(),da.apply(this,arguments)}catch(la){m.handleError(la)}};var ea=u.foldCells;u.foldCells=function(W,ba,ha,la,Y){try{ea.apply(this,arguments)}catch(ma){m.handleError(ma)}};u.popupMenuHandler.autoExpand=-!0;null!=this.menus&&(u.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(W,ba,ha){this.menus.createPopupMenu(W,ba,ha)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(W){u.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};u.connectionHandler.addListener(mxEvent.CONNECT,function(W,ba){var ha=[ba.getProperty("cell")];ba.getProperty("terminalInserted")&&(ha.push(ba.getProperty("terminal")),window.setTimeout(function(){null!=-m.hoverIcons&&m.hoverIcons.update(u.view.getState(ha[ha.length-1]))},0));u.pasteCellStyles(ha)});this.addListener("styleChanged",mxUtils.bind(this,function(W,ba){W=ba.getProperty("force");(this.updateDefaultStyle||W)&&u.copyCellStyles(ba.getProperty("cells"),ba.getProperty("keys"),ba.getProperty("values"),u.currentVertexStyle,u.currentEdgeStyle,H,T);null!=this.toolbar&&(this.toolbar.setFontName(u.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(u.currentVertexStyle.fontSize||-Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(ba=this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0],ba.style.backgroundPosition="left center",ba.style.backgroundRepeat="no-repeat",ba.className="geAdaptiveAsset",ba.style.height="100%",ba.style.width="100%",ba.style.backgroundImage="orthogonalEdgeStyle"==u.currentEdgeStyle.edgeStyle&&"1"==u.currentEdgeStyle.curved?"url("+Format.curvedImage.src+")":"straight"==u.currentEdgeStyle.edgeStyle||"none"==u.currentEdgeStyle.edgeStyle||+"mousemove",mxUtils.bind(this,function(X){var aa=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(X)-aa.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(X)-aa.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var Q=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(X,aa){return m.isSpaceDown()||Q.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,+function(X){16==X.which?this.shiftDown=!0:32!=X.which||u.isEditing()?mxEvent.isConsumed(X)||27!=X.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),u.container.style.cursor="move",u.isEditing()||mxEvent.getSource(X)!=u.container||mxEvent.consume(X))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(X){u.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);+var c=u.panningHandler.isForcePanningEvent;u.panningHandler.isForcePanningEvent=function(X){return c.apply(this,arguments)||m.isSpaceDown()||mxEvent.isMouseEvent(X.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(X.getEvent()))&&(!mxEvent.isControlDown(X.getEvent())&&mxEvent.isRightMouseButton(X.getEvent())||mxEvent.isMiddleMouseButton(X.getEvent()))};var f=u.cellEditor.isStopEditingEvent;u.cellEditor.isStopEditingEvent=function(X){return f.apply(this,arguments)||13==X.keyCode&&(!mxClient.IS_SF&&+mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X)||mxClient.IS_SF&&mxEvent.isShiftDown(X))};var l=u.isZoomWheelEvent;u.isZoomWheelEvent=function(){return m.isSpaceDown()||l.apply(this,arguments)};var t=!1,z=null,C=null,F=null,N=mxUtils.bind(this,function(){if(null!=this.toolbar&&t!=u.cellEditor.isContentEditing()){for(var X=this.toolbar.container.firstChild,aa=[];null!=X;){var ia=X.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,X)&&(X.parentNode.removeChild(X),aa.push(X));+X=ia}X=this.toolbar.fontMenu;ia=this.toolbar.sizeMenu;if(null==F)this.toolbar.createTextToolbar();else{for(var la=0;la<F.length;la++)this.toolbar.container.appendChild(F[la]);this.toolbar.fontMenu=z;this.toolbar.sizeMenu=C}t=u.cellEditor.isContentEditing();z=X;C=ia;F=aa}}),K=u.cellEditor.startEditing;u.cellEditor.startEditing=function(){K.apply(this,arguments);N();if(u.cellEditor.isContentEditing()){var X=!1,aa=function(){X||(X=!0,window.setTimeout(function(){var ia=u.getSelectedEditingElement();+null!=ia&&(ia=mxUtils.getCurrentStyle(ia),null!=ia&&null!=m.toolbar&&(m.toolbar.setFontName(mxUtils.getCssFontFamily(ia.fontFamily)),m.toolbar.setFontSize(parseInt(ia.fontSize))));X=!1},0))};mxEvent.addListener(u.cellEditor.textarea,"input",aa);mxEvent.addListener(u.cellEditor.textarea,"touchend",aa);mxEvent.addListener(u.cellEditor.textarea,"mouseup",aa);mxEvent.addListener(u.cellEditor.textarea,"keyup",aa);aa()}};var J=u.cellEditor.stopEditing;u.cellEditor.stopEditing=function(X,aa){try{J.apply(this,+arguments),N()}catch(ia){m.handleError(ia)}};u.container.setAttribute("tabindex","0");u.container.style.cursor="default";if(window.self===window.top&&null!=u.container.parentNode)try{u.container.focus()}catch(X){}var da=u.fireMouseEvent;u.fireMouseEvent=function(X,aa,ia){try{X==mxEvent.MOUSE_DOWN&&this.container.focus(),da.apply(this,arguments)}catch(la){m.handleError(la)}};var ea=u.foldCells;u.foldCells=function(X,aa,ia,la,Y){try{ea.apply(this,arguments)}catch(ma){m.handleError(ma)}};u.popupMenuHandler.autoExpand=+!0;null!=this.menus&&(u.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(X,aa,ia){this.menus.createPopupMenu(X,aa,ia)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(X){u.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};u.connectionHandler.addListener(mxEvent.CONNECT,function(X,aa){var ia=[aa.getProperty("cell")];aa.getProperty("terminalInserted")&&(ia.push(aa.getProperty("terminal")),window.setTimeout(function(){null!=+m.hoverIcons&&m.hoverIcons.update(u.view.getState(ia[ia.length-1]))},0));u.pasteCellStyles(ia)});this.addListener("styleChanged",mxUtils.bind(this,function(X,aa){X=aa.getProperty("force");(this.updateDefaultStyle||X)&&u.copyCellStyles(aa.getProperty("cells"),aa.getProperty("keys"),aa.getProperty("values"),u.currentVertexStyle,u.currentEdgeStyle,H,S);null!=this.toolbar&&(this.toolbar.setFontName(u.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(u.currentVertexStyle.fontSize||+Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(aa=this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0],aa.style.backgroundPosition="left center",aa.style.backgroundRepeat="no-repeat",aa.className="geAdaptiveAsset",aa.style.height="100%",aa.style.width="100%",aa.style.backgroundImage="orthogonalEdgeStyle"==u.currentEdgeStyle.edgeStyle&&"1"==u.currentEdgeStyle.curved?"url("+Format.curvedImage.src+")":"straight"==u.currentEdgeStyle.edgeStyle||"none"==u.currentEdgeStyle.edgeStyle||null==u.currentEdgeStyle.edgeStyle?"url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==u.currentEdgeStyle.edgeStyle?"url("+Format.entityImage.src+")":"elbowEdgeStyle"==u.currentEdgeStyle.edgeStyle?"vertical"==u.currentEdgeStyle.elbow?"url("+Format.verticalElbowImage.src+")":"url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==u.currentEdgeStyle.edgeStyle?"vertical"==u.currentEdgeStyle.elbow?"url("+Format.verticalIsometricImage.src+")":"url("+Format.horizontalIsometricImage.src+-")":"url("+Format.orthogonalImage.src+")"),null!=this.toolbar.edgeShapeMenu&&(ba=this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0],ba.style.backgroundPosition="left center",ba.style.backgroundRepeat="no-repeat",ba.className="geAdaptiveAsset",ba.style.height="100%",ba.style.width="100%",ba.style.backgroundImage="link"==u.currentEdgeStyle.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==u.currentEdgeStyle.shape?"url("+Format.arrowImage.src+")":"arrow"==u.currentEdgeStyle.shape?"url("+-Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var W=u.currentVertexStyle.fontFamily||"Helvetica",ba=String(u.currentVertexStyle.fontSize||"12"),ha=u.getView().getState(u.getSelectionCell());null!=ha&&(W=ha.style[mxConstants.STYLE_FONTFAMILY]||W,ba=ha.style[mxConstants.STYLE_FONTSIZE]||ba,10<W.length&&(W=W.substring(0,8)+"..."));this.toolbar.setFontName(W);this.toolbar.setFontSize(ba)}),u.getSelectionModel().addListener(mxEvent.CHANGE,-b),u.getModel().addListener(mxEvent.CHANGE,b));u.addListener(mxEvent.CELLS_ADDED,function(W,ba){W=ba.getProperty("cells");ba=ba.getProperty("parent");null!=ba&&u.getModel().isLayer(ba)&&!u.isCellVisible(ba)&&null!=W&&0<W.length&&u.getModel().setVisible(ba,!0)});Graph.selectParentLayer&&u.selectionModel.addListener(mxEvent.CHANGE,function(){if(u.isEnabled()&&!u.isSelectionEmpty()){var W=u.getLayerForCells(u.getSelectionCells());null!=W&&u.setDefaultParent(W)}});this.gestureHandler=mxUtils.bind(this,-function(W){null!=this.currentMenu&&mxEvent.getSource(W)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ca=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ca&&window.clearTimeout(ca);ca=window.setTimeout(mxUtils.bind(this,function(){ca=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,+")":"url("+Format.orthogonalImage.src+")"),null!=this.toolbar.edgeShapeMenu&&(aa=this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0],aa.style.backgroundPosition="left center",aa.style.backgroundRepeat="no-repeat",aa.className="geAdaptiveAsset",aa.style.height="100%",aa.style.width="100%",aa.style.backgroundImage="link"==u.currentEdgeStyle.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==u.currentEdgeStyle.shape?"url("+Format.arrowImage.src+")":"arrow"==u.currentEdgeStyle.shape?"url("++Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var X=u.currentVertexStyle.fontFamily||"Helvetica",aa=String(u.currentVertexStyle.fontSize||"12"),ia=u.getView().getState(u.getSelectionCell());null!=ia&&(X=ia.style[mxConstants.STYLE_FONTFAMILY]||X,aa=ia.style[mxConstants.STYLE_FONTSIZE]||aa,10<X.length&&(X=X.substring(0,8)+"..."));this.toolbar.setFontName(X);this.toolbar.setFontSize(aa)}),u.getSelectionModel().addListener(mxEvent.CHANGE,+b),u.getModel().addListener(mxEvent.CHANGE,b));u.addListener(mxEvent.CELLS_ADDED,function(X,aa){X=aa.getProperty("cells");aa=aa.getProperty("parent");null!=aa&&u.getModel().isLayer(aa)&&!u.isCellVisible(aa)&&null!=X&&0<X.length&&u.getModel().setVisible(aa,!0)});Graph.selectParentLayer&&u.selectionModel.addListener(mxEvent.CHANGE,function(){if(u.isEnabled()&&!u.isSelectionEmpty()){var X=u.getLayerForCells(u.getSelectionCells());null!=X&&u.setDefaultParent(X)}});this.gestureHandler=mxUtils.bind(this,+function(X){null!=this.currentMenu&&mxEvent.getSource(X)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ca=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ca&&window.clearTimeout(ca);ca=window.setTimeout(mxUtils.bind(this,function(){ca=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){u.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){u.view.validateBackground()}));u.addListener("gridSizeChanged",mxUtils.bind(this,function(){u.isGridEnabled()&&u.view.validateBackground()}));this.editor.resetGraph()}this.init();u.standalone||this.open()};EditorUi.compactUi=!0;-EditorUi.parsePng=function(b,e,g){function m(H,T){var G=p;p+=T;return H.substring(G,p)}function u(H){H=m(H,4);return H.charCodeAt(3)+(H.charCodeAt(2)<<8)+(H.charCodeAt(1)<<16)+(H.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(m(b,4),"IHDR"!=m(b,4))null!=g&&g();else{m(b,17);do{g=u(b);var B=m(b,4);if(null!=e&&e(p-8,B,g))break;value=m(b,g);m(b,4);if("IEND"==B)break}while(g)}};mxUtils.extend(EditorUi,mxEventSource);+EditorUi.parsePng=function(b,e,g){function m(H,S){var G=p;p+=S;return H.substring(G,p)}function u(H){H=m(H,4);return H.charCodeAt(3)+(H.charCodeAt(2)<<8)+(H.charCodeAt(1)<<16)+(H.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(m(b,4),"IHDR"!=m(b,4))null!=g&&g();else{m(b,17);do{g=u(b);var B=m(b,4);if(null!=e&&e(p-8,B,g))break;value=m(b,g);m(b,4);if("IEND"==B)break}while(g)}};mxUtils.extend(EditorUi,mxEventSource);EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.defaultSidebarWidth=Math.min(screen.width/2,"large"!=urlParams["sidebar-entries"]?212:240);EditorUi.prototype.hsplitPosition=screen.width<=Editor.smallScreenWidth?0:EditorUi.prototype.defaultSidebarWidth;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;EditorUi.prototype.updateDefaultStyle=!1;EditorUi.prototype.spaceDown=!1;EditorUi.prototype.shiftDown=!1;EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var m=b.getRubberband();null!=m&&m.cancel()}));mxEvent.addListener(b.container,@@ -2077,31 +2077,31 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"arguments);g.updateActionStates()};b.showLinkDialog=mxUtils.bind(g,g.showLinkDialog);b.editLink=g.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),g=this.initSelectionState(),m=!0,u=0;u<e.length;u++){var p=b.getCurrentCellStyle(e[u]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(g,e[u],e,m),m=!1)}this.updateSelectionStateForTableCells(g);return g};EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,html:!0,rounded:!0,autoSize:!1,image:!1,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,m=g.getParent(e[0]),u=g.getParent(m);if(null!=m&&null!=u){for(var p=m.getIndex(e[0]),B=u.getIndex(m),H=null,T=1,G=1,P=0,R=B<u.getChildCount()-1?g.getChildAt(g.getChildAt(u,B+1),p):null;P<e.length-1;){var c=e[++P];null==R||R!=c||null!=H&&T!=H||(H=T,T=0,G++,m=g.getParent(R),R=B+G<u.getChildCount()?g.getChildAt(g.getChildAt(u,B+G),p):null);var f=this.editor.graph.view.getState(c);-if(c==g.getChildAt(m,p+T)&&null!=f&&1==mxUtils.getValue(f.style,"colspan",1)&&1==mxUtils.getValue(f.style,"rowspan",1))T++;else break}P==G*T-1&&(b.mergeCell=e[0],b.colspan=T,b.rowspan=G)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)};+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,m=g.getParent(e[0]),u=g.getParent(m);if(null!=m&&null!=u){for(var p=m.getIndex(e[0]),B=u.getIndex(m),H=null,S=1,G=1,P=0,Q=B<u.getChildCount()-1?g.getChildAt(g.getChildAt(u,B+1),p):null;P<e.length-1;){var c=e[++P];null==Q||Q!=c||null!=H&&S!=H||(H=S,S=0,G++,m=g.getParent(Q),Q=B+G<u.getChildCount()?g.getChildAt(g.getChildAt(u,B+G),p):null);var f=this.editor.graph.view.getState(c);+if(c==g.getChildAt(m,p+S)&&null!=f&&1==mxUtils.getValue(f.style,"colspan",1)&&1==mxUtils.getValue(f.style,"rowspan",1))S++;else break}P==G*S-1&&(b.mergeCell=e[0],b.colspan=S,b.rowspan=G)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)};EditorUi.prototype.createTimeout=function(b,e,g){var m=!0,u=null,p=mxUtils.bind(this,function(H){u.clear()&&(m=!1,H=null!=H?H:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,e,g)})},null!=g?g(H):this.handleError(H))}),B=window.setTimeout(p,null!=b?b:this.timeout);u={clear:function(){window.clearTimeout(B);return m},isAlive:function(){return m}};null!=e&&this.tryAndHandle(mxUtils.bind(this,function(){e(u)}),p);return u};EditorUi.prototype.tryAndHandle=function(b,e){try{b()}catch(g){null!=e?e(g):this.handleError(g)}};-EditorUi.prototype.removeUserDefinedDarkColors=function(b,e,g){var m=this.editor.graph;b=null!=b?b:m.getSelectionCells();var u=Graph.colorStyles,p=document.createElement("div");m.model.beginUpdate();try{for(var B=0;B<b.length;B++)if(m.model.isEdge(b[B])||m.model.isVertex(b[B])){var H=m.getCellStyle(b[B],!1);if(null!=H)for(var T=0;T<u.length;T++)try{var G=H[u[T]];if(mxUtils.isLightDarkColor(G)){var P=mxUtils.getLightDarkColor(G);m.setCellStyles(u[T],P.light,[b[B]])}}catch(c){}e&&m.isHtmlLabel(b[B])&&-"0"!=mxUtils.getValue(H,"html","0")&&(p.innerHTML=Graph.sanitizeHtml(m.getLabel(b[B])),Graph.addLightDarkColors(p,null,null,function(c,f,l){return mxUtils.isLightDarkColor(l)?(l=mxUtils.getLightDarkColor(l),c.style.setProperty(f,l.light),!0):!1})&&m.cellLabelChanged(b[B],p.innerHTML))}if(g&&mxUtils.isLightDarkColor(m.background)){P=mxUtils.getLightDarkColor(m.background);var R=new ChangePageSetup(this,P.light);R.ignoreImage=!0;m.model.execute(R)}}finally{m.model.endUpdate()}return b};+EditorUi.prototype.removeUserDefinedDarkColors=function(b,e,g){var m=this.editor.graph;b=null!=b?b:m.getSelectionCells();var u=Graph.colorStyles,p=document.createElement("div");m.model.beginUpdate();try{for(var B=0;B<b.length;B++)if(m.model.isEdge(b[B])||m.model.isVertex(b[B])){var H=m.getCellStyle(b[B],!1);if(null!=H)for(var S=0;S<u.length;S++)try{var G=H[u[S]];if(mxUtils.isLightDarkColor(G)){var P=mxUtils.getLightDarkColor(G);m.setCellStyles(u[S],P.light,[b[B]])}}catch(c){}e&&m.isHtmlLabel(b[B])&&+"0"!=mxUtils.getValue(H,"html","0")&&(p.innerHTML=Graph.sanitizeHtml(m.getLabel(b[B])),Graph.addLightDarkColors(p,null,null,function(c,f,l){return mxUtils.isLightDarkColor(l)?(l=mxUtils.getLightDarkColor(l),c.style.setProperty(f,l.light),!0):!1})&&m.cellLabelChanged(b[B],p.innerHTML))}if(g&&mxUtils.isLightDarkColor(m.background)){P=mxUtils.getLightDarkColor(m.background);var Q=new ChangePageSetup(this,P.light);Q.ignoreImage=!0;m.model.execute(Q)}}finally{m.model.endUpdate()}return b};EditorUi.prototype.updateSelectionStateForCell=function(b,e,g,m){g=this.editor.graph;b.cells.push(e);if(g.getModel().isVertex(e)){b.connections=0<g.model.getEdgeCount(e);b.unlocked=b.unlocked&&!g.isCellLocked(e);b.resizable=b.resizable&&g.isCellResizable(e);b.rotatable=b.rotatable&&g.isCellRotatable(e);b.movable=b.movable&&g.isCellMovable(e)&&!g.isTableRow(e)&&!g.isTableCell(e);b.swimlane=b.swimlane||g.isSwimlane(e);b.table=b.table||g.isTable(e);b.cell=b.cell||g.isTableCell(e);b.row=b.row||g.isTableRow(e);b.vertices.push(e);var u=g.getCellGeometry(e);if(null!=u&&(0<u.width?null==b.width?b.width=u.width:b.width!=u.width&&(b.width=""):b.containsLabel=!0,0<u.height?null==b.height?b.height=u.height:b.height!=u.height&&(b.height=""):b.containsLabel=!0,!u.relative||null!=u.offset)){var p=u.relative?u.offset.x:u.x;u=u.relative?u.offset.y:u.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=u:b.y!=u&&(b.y="")}}else g.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=!1);p=g.view.getState(e);null!=p&&(b.html=b.html&&g.isHtmlLabel(e),b.autoSize=b.autoSize||g.isAutoSizeState(p),b.glass=b.glass&&g.isGlassState(p),b.rounded=b.rounded&&g.isRoundedState(p),b.lineJumps=b.lineJumps&&g.isLineJumpState(p),b.image=b.image||g.isImageState(p),b.shadow=b.shadow&&g.isShadowState(p),b.fill=b.fill&&g.isFillState(p),b.gradient=b.fill&&g.isGradientState(p),b.stroke=b.stroke&&g.isStrokeState(p),e=mxUtils.getValue(p.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==e,g.mergeStyle(p.style,b.style,m))};-EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(T,G){"mouseDown"==G.getProperty("eventName")&&e.hideShapePicker()}));var g=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",g);b.addListener(mxEvent.ESCAPE,g);b.view.addListener(mxEvent.SCALE,g);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,g);b.getSelectionModel().addListener(mxEvent.CHANGE,g);var m=b.popupMenuHandler.isMenuShowing;-b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var u=b.dblClick;b.dblClick=function(T,G){if(this.isEnabled())if(null!=G||null==e.sidebar||mxEvent.isShiftDown(T)||b.isCellLocked(b.getDefaultParent()))u.apply(this,arguments);else{var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(T),mxEvent.getClientY(T));mxEvent.consume(T);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(P.x,P.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",-g);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var B=this.hoverIcons.execute;this.hoverIcons.execute=function(T,G,P){var R=P.getEvent();this.graph.isCloneEvent(R)||mxEvent.isShiftDown(R)?B.apply(this,arguments):this.graph.connectVertex(T.cell,G,this.graph.defaultEdgeLength,R,null,null,mxUtils.bind(this,function(c,f,l){var t=b.getCompositeParent(T.cell);c=b.getCellGeometry(t);for(P.consume();null!=t&&b.model.isVertex(t)&&null!=c&&c.relative;)cell=-t,t=b.model.getParent(cell),c=b.getCellGeometry(t);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(P.getGraphX(),P.getGraphY(),t,mxUtils.bind(this,function(z){l(z);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(z))}),G)}),30)}),mxUtils.bind(this,function(c){this.graph.selectCellsForConnectVertex(c,R,this)}))};var H=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(T,G){null!=H&&window.clearTimeout(H);H=window.setTimeout(mxUtils.bind(this,function(){var P=-G.getProperty("arrow"),R=G.getProperty("direction"),c=G.getProperty("event");P=P.getBoundingClientRect();var f=mxUtils.getOffset(b.container),l=b.container.scrollLeft+P.x-f.x;f=b.container.scrollTop+P.y-f.y;var t=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),z=e.showShapePicker(l,f,t,mxUtils.bind(this,function(C){null!=C&&b.connectVertex(t,R,b.defaultEdgeLength,c,!0,!1,function(F,N,K){K(C);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(C))},-function(F){b.selectCellsForConnectVertex(F)},c,this.hoverIcons)}),R,!0);null!=z&&(this.centerShapePicker(z,P,l,f,R),mxUtils.setOpacity(z,30),mxEvent.addListener(z,"mouseenter",function(){mxUtils.setOpacity(z,100)}),mxEvent.addListener(z,"mouseleave",function(){e.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(T,G){null!=H&&window.clearTimeout(H)}))}};+EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,G){"mouseDown"==G.getProperty("eventName")&&e.hideShapePicker()}));var g=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",g);b.addListener(mxEvent.ESCAPE,g);b.view.addListener(mxEvent.SCALE,g);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,g);b.getSelectionModel().addListener(mxEvent.CHANGE,g);var m=b.popupMenuHandler.isMenuShowing;+b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var u=b.dblClick;b.dblClick=function(S,G){if(this.isEnabled())if(null!=G||null==e.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))u.apply(this,arguments);else{var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(P.x,P.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",+g);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var B=this.hoverIcons.execute;this.hoverIcons.execute=function(S,G,P){var Q=P.getEvent();this.graph.isCloneEvent(Q)||mxEvent.isShiftDown(Q)?B.apply(this,arguments):this.graph.connectVertex(S.cell,G,this.graph.defaultEdgeLength,Q,null,null,mxUtils.bind(this,function(c,f,l){var t=b.getCompositeParent(S.cell);c=b.getCellGeometry(t);for(P.consume();null!=t&&b.model.isVertex(t)&&null!=c&&c.relative;)cell=+t,t=b.model.getParent(cell),c=b.getCellGeometry(t);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(P.getGraphX(),P.getGraphY(),t,mxUtils.bind(this,function(z){l(z);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(z))}),G)}),30)}),mxUtils.bind(this,function(c){this.graph.selectCellsForConnectVertex(c,Q,this)}))};var H=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,G){null!=H&&window.clearTimeout(H);H=window.setTimeout(mxUtils.bind(this,function(){var P=+G.getProperty("arrow"),Q=G.getProperty("direction"),c=G.getProperty("event");P=P.getBoundingClientRect();var f=mxUtils.getOffset(b.container),l=b.container.scrollLeft+P.x-f.x;f=b.container.scrollTop+P.y-f.y;var t=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),z=e.showShapePicker(l,f,t,mxUtils.bind(this,function(C){null!=C&&b.connectVertex(t,Q,b.defaultEdgeLength,c,!0,!1,function(F,N,K){K(C);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(C))},+function(F){b.selectCellsForConnectVertex(F)},c,this.hoverIcons)}),Q,!0);null!=z&&(this.centerShapePicker(z,P,l,f,Q),mxUtils.setOpacity(z,30),mxEvent.addListener(z,"mouseenter",function(){mxUtils.setOpacity(z,100)}),mxEvent.addListener(z,"mouseleave",function(){e.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,G){null!=H&&window.clearTimeout(H)}))}};EditorUi.prototype.centerShapePicker=function(b,e,g,m,u){if(u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();u==mxConstants.DIRECTION_NORTH?(g-=p.width/2-10,m-=p.height+6):u==mxConstants.DIRECTION_SOUTH?(g-=p.width/2-10,m+=e.height+6):u==mxConstants.DIRECTION_WEST?(g-=p.width+6,m-=p.height/2-10):u==mxConstants.DIRECTION_EAST&&(g+=e.width+6,m-=p.height/2-10);b.style.left=g+"px";b.style.top=m+"px"};-EditorUi.prototype.showShapePicker=function(b,e,g,m,u,p,B,H,T){var G=null;this.editor.graph.freehand.isDrawing()||(H=H||null==g,G=this.createShapePicker(b,e,g,m,u,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(g,p,H),p,B,H,T),null!=G&&(null==this.hoverIcons||p||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=G));return G};-EditorUi.prototype.createShapePicker=function(b,e,g,m,u,p,B,H,T,G,P){P=null!=P?P:!0;var R=this.editor.graph,c=null;T=null!=T?T:function(t){t=t[0];var z=0,C=0,F=t.geometry;null!=F&&(R.model.isEdge(t)&&(t=F.getTerminalPoint(!1),F=new mxRectangle(0,0,t.x,t.y)),z=F.width/2,C=F.height/2);return new mxPoint(R.snap(Math.round(b/R.view.scale)-R.view.translate.x-z),R.snap(Math.round(e/R.view.scale)-R.view.translate.y-C))};if(null!=B&&0<B.length){var f=this;R=this.editor.graph;c=document.createElement("div");-u=R.view.getState(g);var l=null==g||null!=u&&R.isTransparentState(u)?null:R.copyStyle(g);u=6>B.length?35*B.length:140;c.className="geToolbarContainer geSidebarContainer geShapePicker";c.setAttribute("title",mxResources.get("sidebarTooltip"));c.style.left=Math.round(b)+"px";c.style.top=Math.round(e)+"px";c.style.width=u+"px";mxClient.IS_POINTER&&(c.style.touchAction="none");H||mxUtils.setPrefixedStyle(c.style,"transform","translate(-22px,-22px)");R.container.appendChild(c);u=mxUtils.bind(this,function(t){var z=-document.createElement("a");z.className="geToolbarButton";z.style.display="inline-block";z.style.position="relative";z.style.overflow="hidden";z.style.cursor="pointer";z.style.width="30px";z.style.height="30px";z.style.padding="1px";c.appendChild(z);null!=l&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(l,[t]):this.sidebar.graph.pasteCellStyles([t],R.currentVertexStyle,R.currentEdgeStyle);var C=t.geometry;R.model.isEdge(t)&&(C=C.getTerminalPoint(!1),C=new mxRectangle(0,0,C.x,C.y));null!=C&&-z.appendChild(this.sidebar.createVertexTemplateFromCells([t],C.width,C.height,"",!0,!1,null,!1,mxUtils.bind(this,function(F){if(!mxEvent.isShiftDown(F)||null==g&&R.isSelectionEmpty()){var N=R.cloneCell(t);if(null!=m)m(N);else{var K=T([N]);R.model.isEdge(N)?N.geometry.translate(K.x,K.y):(N.geometry.x=K.x,N.geometry.y=K.y);R.model.beginUpdate();try{R.addCell(N),R.model.isVertex(N)&&R.isAutoSizeCell(N)&&R.updateCellSize(N)}finally{R.model.endUpdate()}R.setSelectionCell(N);R.scrollCellToVisible(N);P&&-R.startEditing(N);null!=f.hoverIcons&&f.hoverIcons.update(R.view.getState(N))}}else N=R.getEditableCells(null!=g?[g]:R.getSelectionCells()),R.updateShapes(t,N);null!=p&&p(F);mxEvent.consume(F)}),25,25,null,null,g))});for(G=0;G<(H?Math.min(B.length,4):B.length);G++)u(B[G]);B=c.offsetTop+c.clientHeight-(R.container.scrollTop+R.container.offsetHeight);0<B&&(c.style.top=Math.max(R.container.scrollTop+22,e-B)+"px");B=c.offsetLeft+c.clientWidth-(R.container.scrollLeft+R.container.offsetWidth);0<B&&(c.style.left=-Math.max(R.container.scrollLeft+22,b-B)+"px")}return c};-EditorUi.prototype.getCellsForShapePicker=function(b,e,g){var m=this.editor.graph,u=mxUtils.bind(this,function(p,B,H,T){return m.createVertex(null,null,T||"",0,0,B||120,H||60,p,!1)});e=mxUtils.bind(this,function(p,B,H){p=new mxCell(H||"",new mxGeometry(0,0,m.defaultEdgeLength+20,0),p);p.geometry.setTerminalPoint(new mxPoint(0,0),!0);p.geometry.setTerminalPoint(new mxPoint(p.geometry.width,null!=B?B:0),!1);p.geometry.points=null!=B?[new mxPoint(p.geometry.width/2,B)]:[];p.geometry.relative=!0;p.edge=+EditorUi.prototype.showShapePicker=function(b,e,g,m,u,p,B,H,S){var G=null;this.editor.graph.freehand.isDrawing()||(H=H||null==g,G=this.createShapePicker(b,e,g,m,u,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(g,p,H),p,B,H,S),null!=G&&(null==this.hoverIcons||p||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=G));return G};+EditorUi.prototype.createShapePicker=function(b,e,g,m,u,p,B,H,S,G,P){P=null!=P?P:!0;var Q=this.editor.graph,c=null;S=null!=S?S:function(t){t=t[0];var z=0,C=0,F=t.geometry;null!=F&&(Q.model.isEdge(t)&&(t=F.getTerminalPoint(!1),F=new mxRectangle(0,0,t.x,t.y)),z=F.width/2,C=F.height/2);return new mxPoint(Q.snap(Math.round(b/Q.view.scale)-Q.view.translate.x-z),Q.snap(Math.round(e/Q.view.scale)-Q.view.translate.y-C))};if(null!=B&&0<B.length){var f=this;Q=this.editor.graph;c=document.createElement("div");+u=Q.view.getState(g);var l=null==g||null!=u&&Q.isTransparentState(u)?null:Q.copyStyle(g);u=6>B.length?35*B.length:140;c.className="geToolbarContainer geSidebarContainer geShapePicker";c.setAttribute("title",mxResources.get("sidebarTooltip"));c.style.left=Math.round(b)+"px";c.style.top=Math.round(e)+"px";c.style.width=u+"px";mxClient.IS_POINTER&&(c.style.touchAction="none");H||mxUtils.setPrefixedStyle(c.style,"transform","translate(-22px,-22px)");Q.container.appendChild(c);u=mxUtils.bind(this,function(t){var z=+document.createElement("a");z.className="geToolbarButton";z.style.display="inline-block";z.style.position="relative";z.style.overflow="hidden";z.style.cursor="pointer";z.style.width="30px";z.style.height="30px";z.style.padding="1px";c.appendChild(z);null!=l&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(l,[t]):this.sidebar.graph.pasteCellStyles([t],Q.currentVertexStyle,Q.currentEdgeStyle);var C=t.geometry;Q.model.isEdge(t)&&(C=C.getTerminalPoint(!1),C=new mxRectangle(0,0,C.x,C.y));null!=C&&+z.appendChild(this.sidebar.createVertexTemplateFromCells([t],C.width,C.height,"",!0,!1,null,!1,mxUtils.bind(this,function(F){if(!mxEvent.isShiftDown(F)||null==g&&Q.isSelectionEmpty()){var N=Q.cloneCell(t);if(null!=m)m(N);else{var K=S([N]);Q.model.isEdge(N)?N.geometry.translate(K.x,K.y):(N.geometry.x=K.x,N.geometry.y=K.y);Q.model.beginUpdate();try{Q.addCell(N),Q.model.isVertex(N)&&Q.isAutoSizeCell(N)&&Q.updateCellSize(N)}finally{Q.model.endUpdate()}Q.setSelectionCell(N);Q.scrollCellToVisible(N);P&&+Q.startEditing(N);null!=f.hoverIcons&&f.hoverIcons.update(Q.view.getState(N))}}else N=Q.getEditableCells(null!=g?[g]:Q.getSelectionCells()),Q.updateShapes(t,N);null!=p&&p(F);mxEvent.consume(F)}),25,25,null,null,g))});for(G=0;G<(H?Math.min(B.length,4):B.length);G++)u(B[G]);B=c.offsetTop+c.clientHeight-(Q.container.scrollTop+Q.container.offsetHeight);0<B&&(c.style.top=Math.max(Q.container.scrollTop+22,e-B)+"px");B=c.offsetLeft+c.clientWidth-(Q.container.scrollLeft+Q.container.offsetWidth);0<B&&(c.style.left=+Math.max(Q.container.scrollLeft+22,b-B)+"px")}return c};+EditorUi.prototype.getCellsForShapePicker=function(b,e,g){var m=this.editor.graph,u=mxUtils.bind(this,function(p,B,H,S){return m.createVertex(null,null,S||"",0,0,B||120,H||60,p,!1)});e=mxUtils.bind(this,function(p,B,H){p=new mxCell(H||"",new mxGeometry(0,0,m.defaultEdgeLength+20,0),p);p.geometry.setTerminalPoint(new mxPoint(0,0),!0);p.geometry.setTerminalPoint(new mxPoint(p.geometry.width,null!=B?B:0),!1);p.geometry.points=null!=B?[new mxPoint(p.geometry.width/2,B)]:[];p.geometry.relative=!0;p.edge=!0;return p});if(null!=b)try{b=m.cloneCell(b),m.model.isVertex(b)&&null!=b.geometry&&(b.geometry.x=0,b.geometry.y=0)}catch(p){b=null}null==b&&(b=u(m.appendFontSize("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",m.vertexFontSize),40,20,"Text"),m.model.isVertex(b)&&m.isAutoSizeCell(b)&&Graph.createOffscreenGraph(m.getStylesheet()).updateCellSize(b));b=[b,u("whiteSpace=wrap;html=1;"),u("ellipse;whiteSpace=wrap;html=1;",80,80),u("rhombus;whiteSpace=wrap;html=1;",80,80),u("rounded=1;whiteSpace=wrap;html=1;"),u("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),u("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),u("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),u("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),u("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),u("triangle;whiteSpace=wrap;html=1;",60,80),u("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),u("shape=tape;whiteSpace=wrap;html=1;",120,100),u("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),u("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),u("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",20,20)];g&&(b=b.concat([e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;startArrow=classic;endSize=8;startSize=8;"),@@ -2117,46 +2117,46 @@ e?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:b==mxConstants.Ae?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:"box"==b?Format.boxMarkerImage.src:"halfCircle"==b?Format.halfCircleMarkerImage.src:"openAsync"==b?Format.openAsyncFilledMarkerImage.src:"async"==b?"1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?Format.dashMarkerImage.src:"baseDash"==b?Format.baseDashMarkerImage.src:"cross"==b?Format.crossMarkerImage.src:"circle"==b?Format.circleMarkerImage.src:"circlePlus"==b?Format.circlePlusMarkerImage.src:"ERone"==b?Format.EROneMarkerImage.src:"ERmandOne"==b?Format.ERmandOneMarkerImage.src:"ERmany"==b?Format.ERmanyMarkerImage.src:"ERoneToMany"==b?Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b?Format.ERzeroToManyMarkerImage.src:null};EditorUi.prototype.createMenus=function(){return null};EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),g=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));g.setEnabled(e.isEnabled())};-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var B=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{B=B||p.getSelectionCells();B=p.getExportableCells(p.model.getTopmostCells(B));for(var H={},T=p.createCellLookup(B),G=p.cloneCells(B,null,H),P=new mxGraphModel,R=P.getChildAt(P.getRoot(),-0),c=0;c<G.length;c++){P.add(R,G[c]);var f=p.view.getState(B[c]);if(null!=f){var l=p.getCellGeometry(G[c]);null!=l&&l.relative&&!P.isEdge(B[c])&&null==T[mxObjectIdentity.get(P.getParent(B[c]))]&&(l.offset=null,l.relative=!1,l.x=f.x/f.view.scale-f.view.translate.x,l.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(H,T),G);mxClipboard.insertCount=1;mxClipboard.setCells(G)}b.updatePasteActionStates();return B};var g=mxClipboard.paste;mxClipboard.paste=function(p){var B=+EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var B=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{B=B||p.getSelectionCells();B=p.getExportableCells(p.model.getTopmostCells(B));for(var H={},S=p.createCellLookup(B),G=p.cloneCells(B,null,H),P=new mxGraphModel,Q=P.getChildAt(P.getRoot(),+0),c=0;c<G.length;c++){P.add(Q,G[c]);var f=p.view.getState(B[c]);if(null!=f){var l=p.getCellGeometry(G[c]);null!=l&&l.relative&&!P.isEdge(B[c])&&null==S[mxObjectIdentity.get(P.getParent(B[c]))]&&(l.offset=null,l.relative=!1,l.x=f.x/f.view.scale-f.view.translate.x,l.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(H,S),G);mxClipboard.insertCount=1;mxClipboard.setCells(G)}b.updatePasteActionStates();return B};var g=mxClipboard.paste;mxClipboard.paste=function(p){var B=null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):B=g.apply(this,arguments);b.updatePasteActionStates();return B};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var u=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,B){u.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;-EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var O=this.graph.getPageLayout(),S=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+O.x*S.width),this.scale*(this.translate.y+O.y*S.height),this.scale*O.width*S.width,-this.scale*O.height*S.height)};b.getPreferredPageSize=function(O,S,X){O=this.getPageLayout();S=this.getPageSize();return new mxRectangle(0,0,O.width*S.width,O.height*S.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(O,S,X,aa){if(null!=b.container&&!b.isViewer()){X=null!=X?X:0;aa=null!=aa?aa:0;var ja=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),pa=mxUtils.hasScrollbars(b.container),sa=b.view.translate,qa=b.view.scale,-wa=mxRectangle.fromRectangle(ja);wa.x=wa.x/qa-sa.x;wa.y=wa.y/qa-sa.y;wa.width/=qa;wa.height/=qa;sa=b.container.scrollTop;var Ba=b.container.scrollLeft,za=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)za+=3;var Ea=b.container.offsetWidth-za;za=b.container.offsetHeight-za;O=O?Math.max(.3,Math.min(S||1,Ea/wa.width)):qa;S=(Ea-O*wa.width)/2/O;var ra=0==this.lightboxVerticalDivider?0:(za-O*wa.height)/this.lightboxVerticalDivider/O;pa&&(S=Math.max(S,0),ra=Math.max(ra,-0));if(pa||ja.width<Ea||ja.height<za)b.view.scaleAndTranslate(O,Math.floor(S-wa.x),Math.floor(ra-wa.y)),b.container.scrollTop=sa*O/qa,b.container.scrollLeft=Ba*O/qa;else if(0!=X||0!=aa)ja=b.view.translate,b.view.setTranslate(Math.floor(ja.x+X/qa),Math.floor(ja.y+aa/qa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,+EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var O=this.graph.getPageLayout(),U=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+O.x*U.width),this.scale*(this.translate.y+O.y*U.height),this.scale*O.width*U.width,+this.scale*O.height*U.height)};b.getPreferredPageSize=function(O,U,V){O=this.getPageLayout();U=this.getPageSize();return new mxRectangle(0,0,O.width*U.width,O.height*U.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(O,U,V,ba){if(null!=b.container&&!b.isViewer()){V=null!=V?V:0;ba=null!=ba?ba:0;var fa=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),pa=mxUtils.hasScrollbars(b.container),sa=b.view.translate,qa=b.view.scale,+wa=mxRectangle.fromRectangle(fa);wa.x=wa.x/qa-sa.x;wa.y=wa.y/qa-sa.y;wa.width/=qa;wa.height/=qa;sa=b.container.scrollTop;var Aa=b.container.scrollLeft,za=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)za+=3;var Da=b.container.offsetWidth-za;za=b.container.offsetHeight-za;O=O?Math.max(.3,Math.min(U||1,Da/wa.width)):qa;U=(Da-O*wa.width)/2/O;var ra=0==this.lightboxVerticalDivider?0:(za-O*wa.height)/this.lightboxVerticalDivider/O;pa&&(U=Math.max(U,0),ra=Math.max(ra,+0));if(pa||fa.width<Da||fa.height<za)b.view.scaleAndTranslate(O,Math.floor(U-wa.x),Math.floor(ra-wa.y)),b.container.scrollTop=sa*O/qa,b.container.scrollLeft=Aa*O/qa;else if(0!=V||0!=ba)fa=b.view.translate,b.view.setTranslate(Math.floor(fa.x+V/qa),Math.floor(fa.y+ba/qa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(O){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(O){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var u=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var O=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=O?parseInt(O["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var B=0;p=mxUtils.bind(this,function(O,S,X){B++;-var aa=document.createElement("span");aa.style.paddingLeft="8px";aa.style.paddingRight="8px";aa.style.cursor="pointer";mxEvent.addListener(aa,"click",O);null!=X&&aa.setAttribute("title",X);O=document.createElement("img");O.setAttribute("border","0");O.setAttribute("src",S);O.style.width="36px";O.style.filter="invert(100%)";aa.appendChild(O);this.chromelessToolbar.appendChild(aa);return aa});if(null!=u.backBtn){var H=Graph.sanitizeLink(u.backBtn.url);null!=H&&p(mxUtils.bind(this,function(O){window.location.href=-H;mxEvent.consume(O)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var T=p(mxUtils.bind(this,function(O){this.actions.get("previousPage").funct();mxEvent.consume(O)}),Editor.previousImage,mxResources.get("previousPage")),G=document.createElement("div");G.style.fontFamily=Editor.defaultHtmlFont;G.style.display="inline-block";G.style.verticalAlign="top";G.style.fontWeight="bold";G.style.marginTop="8px";G.style.fontSize="14px";G.style.cursor="default";G.style.color=-mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(G);var P=p(mxUtils.bind(this,function(O){this.actions.get("nextPage").funct();mxEvent.consume(O)}),Editor.nextImage,mxResources.get("nextPage")),R=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){G.innerText="";var O=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(G,O+1+" / "+this.pages.length);G.setAttribute("title",mxResources.get("currentPage")+": "+this.currentPage.getName());-T.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(O-1,this.pages.length)].getName());P.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(O+1,this.pages.length)].getName())}});T.style.paddingLeft="0px";T.style.paddingRight="4px";P.style.paddingLeft="4px";P.style.paddingRight="0px";var c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(P.style.display="",T.style.display="",G.style.display="inline-block"):-(P.style.display="none",T.style.display="none",G.style.display="none");R()});if(null!=this.menus){var f=this.menus.get("pages");null!=f&&mxEvent.addListener(G,"click",mxUtils.bind(this,function(O){var S=new mxPopupMenu(f.funct);S.div.className+=" geMenubarMenu";S.smartSeparators=!0;S.showDisabled=!0;S.autoExpand=!0;S.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(S,arguments);S.destroy()});var X=mxUtils.getOffset(G);S.popup(X.x,X.y+G.offsetHeight,null,O);mxEvent.addListener(S.div,-"mouseleave",mxUtils.bind(this,function(){S.hideMenu()}))}))}this.editor.addListener("resetGraphView",c);this.editor.addListener("pageSelected",R)}p(mxUtils.bind(this,function(O){this.actions.get("zoomOut").funct();mxEvent.consume(O)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(O){this.actions.get("zoomIn").funct();mxEvent.consume(O)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(O){b.isLightboxView()?+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var O=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=O?parseInt(O["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var B=0;p=mxUtils.bind(this,function(O,U,V){B++;+var ba=document.createElement("span");ba.style.paddingLeft="8px";ba.style.paddingRight="8px";ba.style.cursor="pointer";mxEvent.addListener(ba,"click",O);null!=V&&ba.setAttribute("title",V);O=document.createElement("img");O.setAttribute("border","0");O.setAttribute("src",U);O.style.width="36px";O.style.filter="invert(100%)";ba.appendChild(O);this.chromelessToolbar.appendChild(ba);return ba});if(null!=u.backBtn){var H=Graph.sanitizeLink(u.backBtn.url);null!=H&&p(mxUtils.bind(this,function(O){window.location.href=+H;mxEvent.consume(O)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=p(mxUtils.bind(this,function(O){this.actions.get("previousPage").funct();mxEvent.consume(O)}),Editor.previousImage,mxResources.get("previousPage")),G=document.createElement("div");G.style.fontFamily=Editor.defaultHtmlFont;G.style.display="inline-block";G.style.verticalAlign="top";G.style.fontWeight="bold";G.style.marginTop="8px";G.style.fontSize="14px";G.style.cursor="default";G.style.color=+mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(G);var P=p(mxUtils.bind(this,function(O){this.actions.get("nextPage").funct();mxEvent.consume(O)}),Editor.nextImage,mxResources.get("nextPage")),Q=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){G.innerText="";var O=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(G,O+1+" / "+this.pages.length);G.setAttribute("title",mxResources.get("currentPage")+": "+this.currentPage.getName());+S.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(O-1,this.pages.length)].getName());P.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(O+1,this.pages.length)].getName())}});S.style.paddingLeft="0px";S.style.paddingRight="4px";P.style.paddingLeft="4px";P.style.paddingRight="0px";var c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(P.style.display="",S.style.display="",G.style.display="inline-block"):+(P.style.display="none",S.style.display="none",G.style.display="none");Q()});if(null!=this.menus){var f=this.menus.get("pages");null!=f&&mxEvent.addListener(G,"click",mxUtils.bind(this,function(O){var U=new mxPopupMenu(f.funct);U.div.className+=" geMenubarMenu";U.smartSeparators=!0;U.showDisabled=!0;U.autoExpand=!0;U.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(U,arguments);U.destroy()});var V=mxUtils.getOffset(G);U.popup(V.x,V.y+G.offsetHeight,null,O);mxEvent.addListener(U.div,+"mouseleave",mxUtils.bind(this,function(){U.hideMenu()}))}))}this.editor.addListener("resetGraphView",c);this.editor.addListener("pageSelected",Q)}p(mxUtils.bind(this,function(O){this.actions.get("zoomOut").funct();mxEvent.consume(O)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(O){this.actions.get("zoomIn").funct();mxEvent.consume(O)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(O){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(O)}),Editor.zoomFitImage,mxResources.get("fit"));var l=null,t=null,z=mxUtils.bind(this,function(O){null!=l&&(window.clearTimeout(l),l=null);null!=t&&(window.clearTimeout(t),t=null);l=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);l=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),600)}),O||200)}),C=mxUtils.bind(this,function(O){null!=l&&(window.clearTimeout(l),l=null);null!=t&&(window.clearTimeout(t),t=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,O||30)});if("1"==urlParams.layers){this.layersDialog=null;var F=p(mxUtils.bind(this,function(O){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&-this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var S=F.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=-S.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));S=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=-S.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(O)}),Editor.layersImage,mxResources.get("layers")),N=b.getModel();N.addListener(mxEvent.CHANGE,function(){F.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(O){null!=this.editor.editButtonFunc?+this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var U=F.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=+U.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));U=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=+U.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(O)}),Editor.layersImage,mxResources.get("layers")),N=b.getModel();N.addListener(mxEvent.CHANGE,function(){F.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(O){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(O)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(c=0;c<this.lightboxToolbarActions.length;c++){var K=this.lightboxToolbarActions[c];K.elem=p(K.fn,K.icon,K.tooltip)}if(null!=u.refreshBtn){var J=null==u.refreshBtn.url?null:Graph.sanitizeLink(u.refreshBtn.url);p(mxUtils.bind(this,function(O){null!=J?window.location.href=J:window.location.reload();mxEvent.consume(O)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=u.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(O){u.fullscreenBtn.url?b.openLink(u.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(O)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!u.noCloseBtn&&(u.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(O){"1"==urlParams.close||u.closeBtn?window.close():(this.destroy(),mxEvent.consume(O))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(O){mxEvent.isTouchEvent(O)||(mxEvent.isShiftDown(O)||C(30),z())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(O){mxEvent.consume(O)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(O){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(O)?z():C(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(O){mxEvent.isShiftDown(O)?z():C(100);mxEvent.consume(O)}));mxEvent.addListener(this.chromelessToolbar,-"mouseleave",mxUtils.bind(this,function(O){mxEvent.isTouchEvent(O)||C(30)}));var da=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(O,S){this.startX=S.getGraphX();this.startY=S.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(O,S){},mouseUp:function(O,S){mxEvent.isTouchEvent(S.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<da&&Math.abs(this.scrollTop-b.container.scrollTop)<-da&&Math.abs(this.startX-S.getGraphX())<da&&Math.abs(this.startY-S.getGraphY())<da&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?z():C(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ea=b.view.validate,ca=new mxPoint,W=!1,ba=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&ba!=g.currentPage){ba=g.currentPage;W=!0;var O=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,-!0);null==O&&(O=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));O=b.getPageLayout(O,ca,1);var S=b.getDefaultTranslate(O);this.x0=O.x;this.y0=O.y;if(S.x!=this.translate.x||S.y!=this.translate.y)this.invalidate(),this.translate.x=S.x,this.translate.y=S.y}S=b.getPagePadding();var X=b.getPageSize();O=S.x-(this.x0||0)*X.width;S=S.y-(this.y0||0)*X.height;if(this.translate.x!=O||this.translate.y!=S)this.invalidate(),this.translate.x=O,this.translate.y=S}ea.apply(this,arguments)};-if(!b.isViewer()){var ha=b.sizeDidChange;b.sizeDidChange=function(){var O=W;W=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var S=this.getPageLayout(),X=this.getDefaultTranslate(S),aa=this.view.translate.x,ja=this.view.translate.y;if(X.x!=aa||X.y!=ja){this.view.x0=S.x;this.view.y0=S.y;this.autoTranslate=!0;this.view.setTranslate(X.x,X.y);this.autoTranslate=!1;O||(this.container.scrollLeft+=Math.round((X.x-aa)*this.view.scale),this.container.scrollTop+=-Math.round((X.y-ja)*this.view.scale));return}}ha.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var la=b.view.getBackgroundPane(),Y=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ma=null,Z=null,k=null,A=null,I=null,U=function(O){null!=ma&&window.clearTimeout(ma);0<=O&&window.setTimeout(function(){if(!b.isMouseDown||A)ma=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&+"mouseleave",mxUtils.bind(this,function(O){mxEvent.isTouchEvent(O)||C(30)}));var da=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(O,U){this.startX=U.getGraphX();this.startY=U.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(O,U){},mouseUp:function(O,U){mxEvent.isTouchEvent(U.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<da&&Math.abs(this.scrollTop-b.container.scrollTop)<+da&&Math.abs(this.startX-U.getGraphX())<da&&Math.abs(this.startY-U.getGraphY())<da&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?z():C(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ea=b.view.validate,ca=new mxPoint,X=!1,aa=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&aa!=g.currentPage){aa=g.currentPage;X=!0;var O=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,+!0);null==O&&(O=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));O=b.getPageLayout(O,ca,1);var U=b.getDefaultTranslate(O);this.x0=O.x;this.y0=O.y;if(U.x!=this.translate.x||U.y!=this.translate.y)this.invalidate(),this.translate.x=U.x,this.translate.y=U.y}U=b.getPagePadding();var V=b.getPageSize();O=U.x-(this.x0||0)*V.width;U=U.y-(this.y0||0)*V.height;if(this.translate.x!=O||this.translate.y!=U)this.invalidate(),this.translate.x=O,this.translate.y=U}ea.apply(this,arguments)};+if(!b.isViewer()){var ia=b.sizeDidChange;b.sizeDidChange=function(){var O=X;X=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var U=this.getPageLayout(),V=this.getDefaultTranslate(U),ba=this.view.translate.x,fa=this.view.translate.y;if(V.x!=ba||V.y!=fa){this.view.x0=U.x;this.view.y0=U.y;this.autoTranslate=!0;this.view.setTranslate(V.x,V.y);this.autoTranslate=!1;O||(this.container.scrollLeft+=Math.round((V.x-ba)*this.view.scale),this.container.scrollTop+=+Math.round((V.y-fa)*this.view.scale));return}}ia.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var la=b.view.getBackgroundPane(),Y=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ma=null,Z=null,k=null,A=null,I=null,T=function(O){null!=ma&&window.clearTimeout(ma);0<=O&&window.setTimeout(function(){if(!b.isMouseDown||A)ma=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),Y.style.transformOrigin="",la.style.transformOrigin="",mxClient.IS_SF?(Y.style.transform="scale(1)",la.style.transform="scale(1)",window.setTimeout(function(){Y.style.transform="";la.style.transform=""},0)):(Y.style.transform="",la.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity=-"");var S=new mxPoint(b.container.scrollLeft,b.container.scrollTop),X=mxUtils.getOffset(b.container),aa=b.view.scale,ja=0,pa=0;null!=Z&&(ja=b.container.offsetWidth/2-Z.x+X.x,pa=b.container.offsetHeight/2-Z.y+X.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=aa&&(null!=k&&(ja+=S.x-k.x,pa+=S.y-k.y),null!=e&&g.chromelessResize(!1,null,ja*(b.cumulativeZoomFactor-1),pa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==ja&&0==pa||(b.container.scrollLeft-=-ja*(b.cumulativeZoomFactor-1),b.container.scrollTop-=pa*(b.cumulativeZoomFactor-1)));null!=I&&Y.setAttribute("filter",I);b.cumulativeZoomFactor=1;I=A=Z=k=ma=null}),null!=O?O:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(O,S,X,aa){aa=null!=aa?aa:this.zoomFactor;(S=S||!b.scrollbars)&&(Z=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));O?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=-(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,-160))/this.view.scale;if(b.isFastZoomEnabled()){null==I&&""!=Y.getAttribute("filter")&&(I=Y.getAttribute("filter"),Y.removeAttribute("filter"));k=new mxPoint(b.container.scrollLeft,b.container.scrollTop);O=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);aa=S||null==Z?b.container.scrollLeft+b.container.clientWidth/2:Z.x+b.container.scrollLeft-b.container.offsetLeft;var ja=S||null==Z?b.container.scrollTop+b.container.clientHeight/2:Z.y+b.container.scrollTop--b.container.offsetTop;Y.style.transformOrigin=aa+"px "+ja+"px";Y.style.transform="scale("+O+")";la.style.transformOrigin=aa+"px "+ja+"px";la.style.transform="scale("+O+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(aa=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(aa.style,"transform-origin",(S||null==Z?b.container.clientWidth/2+b.container.scrollLeft-aa.offsetLeft+"px":Z.x+b.container.scrollLeft-aa.offsetLeft-b.container.offsetLeft+"px")+" "+(S||null==Z?b.container.clientHeight/-2+b.container.scrollTop-aa.offsetTop+"px":Z.y+b.container.scrollTop-aa.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(aa.style,"transform","scale("+O+")")):b.view.validateBackgroundStyles(O,aa,ja);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",O))}U(b.isFastZoomEnabled()?X:0)};mxEvent.addGestureListeners(b.container,function(O){null!=ma&&window.clearTimeout(ma)},-null,function(O){1!=b.cumulativeZoomFactor&&U(0)});mxEvent.addListener(b.container,"scroll",function(O){null==ma||b.isMouseDown||1==b.cumulativeZoomFactor||U(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(O,S,X,aa,ja){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!X&&b.isScrollWheelEvent(O))X=b.view.getTranslate(),aa=40/b.view.scale,mxEvent.isShiftDown(O)?b.view.setTranslate(X.x+(S?-aa:aa),X.y):b.view.setTranslate(X.x,X.y+(S?-aa:-aa));else if(X||b.isZoomWheelEvent(O))for(var pa=mxEvent.getSource(O);null!=pa;){if(pa==b.container)return b.tooltipHandler.hideTooltip(),Z=null!=aa&&null!=ja?new mxPoint(aa,ja):new mxPoint(mxEvent.getClientX(O),mxEvent.getClientY(O)),A=X,X=b.zoomFactor,aa=null,O.ctrlKey&&null!=O.deltaY&&40>Math.abs(O.deltaY)&&Math.round(O.deltaY)!=O.deltaY?X=1+Math.abs(O.deltaY)/20*(X-1):null!=O.movementY&&"pointermove"==O.type&&(X=1+Math.max(1,Math.abs(O.movementY))/20*(X-1),aa=-1),b.lazyZoom(S,null,aa,X),mxEvent.consume(O),+"");var U=new mxPoint(b.container.scrollLeft,b.container.scrollTop),V=mxUtils.getOffset(b.container),ba=b.view.scale,fa=0,pa=0;null!=Z&&(fa=b.container.offsetWidth/2-Z.x+V.x,pa=b.container.offsetHeight/2-Z.y+V.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=ba&&(null!=k&&(fa+=U.x-k.x,pa+=U.y-k.y),null!=e&&g.chromelessResize(!1,null,fa*(b.cumulativeZoomFactor-1),pa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==fa&&0==pa||(b.container.scrollLeft-=+fa*(b.cumulativeZoomFactor-1),b.container.scrollTop-=pa*(b.cumulativeZoomFactor-1)));null!=I&&Y.setAttribute("filter",I);b.cumulativeZoomFactor=1;I=A=Z=k=ma=null}),null!=O?O:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(O,U,V,ba){ba=null!=ba?ba:this.zoomFactor;(U=U||!b.scrollbars)&&(Z=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));O?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=+(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ba,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=ba,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,+160))/this.view.scale;if(b.isFastZoomEnabled()){null==I&&""!=Y.getAttribute("filter")&&(I=Y.getAttribute("filter"),Y.removeAttribute("filter"));k=new mxPoint(b.container.scrollLeft,b.container.scrollTop);O=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);ba=U||null==Z?b.container.scrollLeft+b.container.clientWidth/2:Z.x+b.container.scrollLeft-b.container.offsetLeft;var fa=U||null==Z?b.container.scrollTop+b.container.clientHeight/2:Z.y+b.container.scrollTop-+b.container.offsetTop;Y.style.transformOrigin=ba+"px "+fa+"px";Y.style.transform="scale("+O+")";la.style.transformOrigin=ba+"px "+fa+"px";la.style.transform="scale("+O+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(ba=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(ba.style,"transform-origin",(U||null==Z?b.container.clientWidth/2+b.container.scrollLeft-ba.offsetLeft+"px":Z.x+b.container.scrollLeft-ba.offsetLeft-b.container.offsetLeft+"px")+" "+(U||null==Z?b.container.clientHeight/+2+b.container.scrollTop-ba.offsetTop+"px":Z.y+b.container.scrollTop-ba.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(ba.style,"transform","scale("+O+")")):b.view.validateBackgroundStyles(O,ba,fa);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",O))}T(b.isFastZoomEnabled()?V:0)};mxEvent.addGestureListeners(b.container,function(O){null!=ma&&window.clearTimeout(ma)},+null,function(O){1!=b.cumulativeZoomFactor&&T(0)});mxEvent.addListener(b.container,"scroll",function(O){null==ma||b.isMouseDown||1==b.cumulativeZoomFactor||T(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(O,U,V,ba,fa){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!V&&b.isScrollWheelEvent(O))V=b.view.getTranslate(),ba=40/b.view.scale,mxEvent.isShiftDown(O)?b.view.setTranslate(V.x+(U?-ba:ba),V.y):b.view.setTranslate(V.x,V.y+(U?+ba:-ba));else if(V||b.isZoomWheelEvent(O))for(var pa=mxEvent.getSource(O);null!=pa;){if(pa==b.container)return b.tooltipHandler.hideTooltip(),Z=null!=ba&&null!=fa?new mxPoint(ba,fa):new mxPoint(mxEvent.getClientX(O),mxEvent.getClientY(O)),A=V,V=b.zoomFactor,ba=null,O.ctrlKey&&null!=O.deltaY&&40>Math.abs(O.deltaY)&&Math.round(O.deltaY)!=O.deltaY?V=1+Math.abs(O.deltaY)/20*(V-1):null!=O.movementY&&"pointermove"==O.type&&(V=1+Math.max(1,Math.abs(O.movementY))/20*(V-1),ba=-1),b.lazyZoom(U,null,ba,V),mxEvent.consume(O),!1;pa=pa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(O){b.cumulativeZoomFactor=O.scale;b.lazyZoom(0<O.scale,!0);mxEvent.consume(O)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.width=this.formatWidth+"px",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,g=60;null!=e&&(g=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(g,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};@@ -2177,7 +2177,7 @@ e.scrollTop=Math.floor(Math.max(0,g.y-Math.max(20,(e.clientHeight-m)/4)))}else{gEditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,g=mxUtils.hasScrollbars(e.container),m=0,u=0;g&&(m=e.view.translate.x*e.view.scale-e.container.scrollLeft,u=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(g){var p=e.getSelectionCells();e.clearSelection();e.setSelectionCells(p)}e.sizeDidChange();g&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-m,e.container.scrollTop=e.view.translate.y*e.view.scale-u);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};EditorUi.prototype.installResizeHandler=function(b,e,g){e&&(b.window.setSize=function(u,p){if(!this.minimized){var B=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;u=Math.min(u,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,B-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(u,p){var B=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,-H=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,T=parseInt(this.div.style.width),G=parseInt(this.div.style.height);u=Math.max(0,Math.min(u,B-T));p=Math.max(0,Math.min(p,H-G));this.getX()==u&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(T,G)};var m=mxUtils.bind(this,function(){var u=b.window.getX(),p=b.window.getY();b.window.setLocation(u,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,+H=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),G=parseInt(this.div.style.height);u=Math.max(0,Math.min(u,B-S));p=Math.max(0,Math.min(p,H-G));this.getX()==u&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(S,G)};var m=mxUtils.bind(this,function(){var u=b.window.getX(),p=b.window.getY();b.window.setLocation(u,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,"resize",m);b.window.destroy();null!=g&&g()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();function ChangePageSetup(b,e,g,m,u){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=g;this.previousFormat=this.format=m;this.previousPageScale=this.pageScale=u;this.ignoreImage=this.ignoreColor=!1}ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var g=this.previousImage;null!=g&&Graph.isPageLink(g.src)&&(g=this.ui.createImageForPageLink(g.src,this.ui.currentPage));this.ui.setBackgroundImage(g);this.previousImage=e}null!=this.previousFormat&&(this.format=this.previousFormat,@@ -2213,22 +2213,22 @@ EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=Grap"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(g,100);mxUtils.setPrefixedStyle(g.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(g.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(g.style,"transform","scaleX(0)");mxUtils.setOpacity(g,0);window.setTimeout(mxUtils.bind(this,function(){null!=g.parentNode&&g.parentNode.removeChild(g)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[e])};EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.style.textOverflow="ellipsis";e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.minWidth="0";e.setAttribute("title",b);e.innerHTML=Graph.sanitizeHtml(b);return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};-EditorUi.prototype.addSplitHandler=function(b,e,g,m){function u(R){if(null!=B){var c=new mxPoint(mxEvent.getClientX(R),mxEvent.getClientY(R));m(Math.max(0,H+(e?c.x-B.x:B.y-c.y)-g));mxEvent.consume(R);H!=P()&&(T=!0,G=null)}}function p(R){u(R);B=H=null}var B=null,H=null,T=!0,G=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var P=mxUtils.bind(this,function(){var R=parseInt(e?b.style.left:b.style.bottom);e||(R=R+g-this.footerHeight);return R});mxEvent.addGestureListeners(b,function(R){B=new mxPoint(mxEvent.getClientX(R),-mxEvent.getClientY(R));H=P();T=!1;mxEvent.consume(R)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(R){if(!T&&this.hsplitClickEnabled){var c=null!=G?G-g:0;G=P();m(c);mxEvent.consume(R)}}));mxEvent.addGestureListeners(document,null,u,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,u,p)})};+EditorUi.prototype.addSplitHandler=function(b,e,g,m){function u(Q){if(null!=B){var c=new mxPoint(mxEvent.getClientX(Q),mxEvent.getClientY(Q));m(Math.max(0,H+(e?c.x-B.x:B.y-c.y)-g));mxEvent.consume(Q);H!=P()&&(S=!0,G=null)}}function p(Q){u(Q);B=H=null}var B=null,H=null,S=!0,G=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var P=mxUtils.bind(this,function(){var Q=parseInt(e?b.style.left:b.style.bottom);e||(Q=Q+g-this.footerHeight);return Q});mxEvent.addGestureListeners(b,function(Q){B=new mxPoint(mxEvent.getClientX(Q),+mxEvent.getClientY(Q));H=P();S=!1;mxEvent.consume(Q)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(Q){if(!S&&this.hsplitClickEnabled){var c=null!=G?G-g:0;G=P();m(c);mxEvent.consume(Q)}}));mxEvent.addGestureListeners(document,null,u,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,u,p)})};EditorUi.prototype.prompt=function(b,e,g){b=new FilenameDialog(this,e,mxResources.get("apply"),function(m){g(parseFloat(m))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};EditorUi.prototype.handleError=function(b,e,g,m,u){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){u=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(u=mxUtils.htmlEntities(b.message));this.showError(e,u,p,g,null,null,null,null,null,null,null,null,m?g:null)}else null!=g&&g()};-EditorUi.prototype.showError=function(b,e,g,m,u,p,B,H,T,G,P,R,c){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),m,u,p,B,R,H,T);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,G||340,P||100+20*e,!0,!1,c);b.init()};EditorUi.prototype.showDialog=function(b,e,g,m,u,p,B,H,T,G){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,m,u,p,B,H,T,G);this.dialogs.push(this.dialog)};+EditorUi.prototype.showError=function(b,e,g,m,u,p,B,H,S,G,P,Q,c){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),m,u,p,B,Q,H,S);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,G||340,P||100+20*e,!0,!1,c);b.init()};EditorUi.prototype.showDialog=function(b,e,g,m,u,p,B,H,S,G){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,m,u,p,B,H,S,G);this.dialogs.push(this.dialog)};EditorUi.prototype.hideDialog=function(b,e,g){var m=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var u=this.dialogs.length-1;0<=u;u--)if(!this.dialogs[u].closing){m=this.dialogs[u];break}null==m||null!=g&&g!=this.dialog.container.firstChild||(m.closing=!0,0==m.close(b,e)?delete m.closing:(delete m.closing,b=mxUtils.lastIndexOf(this.dialogs,m),0<=b&&this.dialogs.splice(b,1),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog","dialog",m)),null==this.dialog&&null!=this.editor.graph.container&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){null==this.editor||null!=this.dialogs&&0!=this.dialogs.length||(this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus()))}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),g=new mxDictionary,m=[],u=0;u<e.length;u++){var p=b.isTableCell(e[u])?b.model.getParent(e[u]):e[u];null==p||g.get(p)||(g.put(p,!0),m.push(p))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(B){this.handleError(B)}};-EditorUi.prototype.pickColor=function(b,e,g,m,u){var p=this.editor.graph,B=p.cellEditor.saveSelection(),H=(u?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(T){p.cellEditor.restoreSelection(B);e(T)},function(){p.cellEditor.restoreSelection(B)},g,m,u);this.showDialog(b.container,230,H,!0,!1);b.init()};+EditorUi.prototype.pickColor=function(b,e,g,m,u){var p=this.editor.graph,B=p.cellEditor.saveSelection(),H=(u?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(S){p.cellEditor.restoreSelection(B);e(S)},function(){p.cellEditor.restoreSelection(B)},g,m,u);this.showDialog(b.container,230,H,!0,!1);b.init()};EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};-EditorUi.prototype.base64ToBlob=function(b,e){e=e||"";b=atob(b);for(var g=b.length,m=Math.ceil(g/1024),u=Array(m),p=0;p<m;++p){for(var B=1024*p,H=Math.min(B+1024,g),T=Array(H-B),G=0;B<H;++G,++B)T[G]=b[B].charCodeAt(0);u[p]=new Uint8Array(T)}return new Blob(u,{type:e})};+EditorUi.prototype.base64ToBlob=function(b,e){e=e||"";b=atob(b);for(var g=b.length,m=Math.ceil(g/1024),u=Array(m),p=0;p<m;++p){for(var B=1024*p,H=Math.min(B+1024,g),S=Array(H-B),G=0;B<H;++G,++B)S[G]=b[B].charCodeAt(0);u[p]=new Uint8Array(S)}return new Blob(u,{type:e})};EditorUi.prototype.writeImageToClipboard=function(b,e,g,m){var u=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":u,"text/html":new Blob(['<img src="'+b+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](m)};EditorUi.prototype.writeHtmlToClipboard=function(b,e){b=new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(b)],{type:"text/plain"}),"text/html":new Blob([b],{type:"text/html"})});navigator.clipboard.write([b])["catch"](e)};EditorUi.prototype.writeTextToClipboard=function(b,e){navigator.clipboard.writeText(b)["catch"](e)};EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var g=b.indexOf("<mxGraphModel ");if(0<=g){var m=b.lastIndexOf("</mxGraphModel>");m>g&&(e=b.substring(g,m+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(u){}return e};EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(g){if(null!=g){var m=decodeURIComponent(g);this.isCompatibleString(m)&&(g=m)}b(g)}),"text")}),"html")};EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(g){if(null!=g&&0<g.length&&"html"==e&&0<=mxUtils.indexOf(g[0].types,"text/html"))g[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(u){try{var p=this.parseHtmlData(u),B="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var H=B.lastIndexOf("%3E");-0<=H&&H<B.length-3&&(B=B.substring(0,H+3))}catch(P){}try{var T=p.getElementsByTagName("span"),G=null!=T&&0<T.length?mxUtils.trim(decodeURIComponent(T[0].textContent)):decodeURIComponent(B);this.isCompatibleString(G)&&(B=G)}catch(P){}}catch(P){}b(this.isCompatibleString(B)?B:null)}))["catch"](function(u){b(null)})}))["catch"](function(m){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(m){m.text().then(function(u){b(u)})["catch"](function(){b(null)})})["catch"](function(){b(null)});+0<=H&&H<B.length-3&&(B=B.substring(0,H+3))}catch(P){}try{var S=p.getElementsByTagName("span"),G=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(B);this.isCompatibleString(G)&&(B=G)}catch(P){}}catch(P){}b(this.isCompatibleString(B)?B:null)}))["catch"](function(u){b(null)})}))["catch"](function(m){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(m){m.text().then(function(u){b(u)})["catch"](function(){b(null)})})["catch"](function(){b(null)});else b(null)}))["catch"](function(g){b(null)})};EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var g="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(g?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));g=g&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=g&&null==g.nextSibling&&g.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==g.nodeName?(b=g.getAttribute("src"),null!=b&&(Editor.isPngDataUrl(b)&&@@ -2244,14 +2244,14 @@ EditorUi.prototype.showDataDialog=function(b){null!=b&&"undefined"!==typeof windEditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.bind(this,function(m){m=new ChangePageSetup(this,null,m);m.ignoreColor=!0;this.editor.graph.model.execute(m)});var g=mxUtils.prompt(mxResources.get("backgroundImage"),null!=e?e.src:"");null!=g&&0<g.length?(e=new Image,e.onload=function(){b(new mxImage(g,e.width,e.height),!1)},e.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},e.src=g):b(null)};EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,g){mxUtils.confirm(b)?null!=e&&e():null!=g&&g()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};EditorUi.prototype.altShiftActions={65:"connectionArrows",82:"clearWaypoints",76:"editLink",79:"connectionPoints",81:"editConnectionPoints",84:"editTooltip",86:"pasteSize",70:"copySize",66:"copyData",69:"pasteData"};EditorUi.prototype.ctrlAltShiftActions={70:"bringForward",66:"sendBackward"};EditorUi.prototype.ctrlAltActions={88:"copyAsImage"};-EditorUi.prototype.createKeyHandler=function(b){function e(R,c,f){if(!m.isSelectionEmpty()&&m.isEnabled()){c=null!=c?c:1;var l=m.getCompositeParents(m.getSelectionCells()),t=0<l.length?l[0]:null;if(null!=t)if(f){m.getModel().beginUpdate();try{for(t=0;t<l.length;t++)if(m.getModel().isVertex(l[t])&&m.isCellResizable(l[t])){var z=m.getCellGeometry(l[t]);null!=z&&(z=z.clone(),37==R?z.width=Math.max(0,z.width-c):38==R?z.height=Math.max(0,z.height-c):39==R?z.width+=c:40==R&&(z.height+=c),m.getModel().setGeometry(l[t],-z))}}finally{m.getModel().endUpdate()}}else{z=m.model.getParent(t);var C=m.getView().scale;f=null;1==m.getSelectionCount()&&m.model.isVertex(t)&&null!=m.layoutManager&&!m.isCellLocked(t)&&(f=m.layoutManager.getLayout(z));if(null!=f&&f.constructor==mxStackLayout)c=z.getIndex(t),37==R||38==R?m.model.add(z,t,Math.max(0,c-1)):(39==R||40==R)&&m.model.add(z,t,Math.min(m.model.getChildCount(z),c+1));else{var F=m.graphHandler;null!=F&&(null==F.first&&F.start(t,0,0,m.getMovableCells(l)),null!=F.first&&(t=-l=0,37==R?l=-c:38==R?t=-c:39==R?l=c:40==R&&(t=c),F.currentDx+=l*C,F.currentDy+=t*C,F.checkPreview(),F.updatePreview()),null!=B&&window.clearTimeout(B),B=window.setTimeout(function(){if(null!=F.first){var N=F.roundLength(F.currentDx/C),K=F.roundLength(F.currentDy/C);F.moveCells(F.cells,N,K);F.reset()}},400))}}}}var g=this,m=this.editor.graph,u=new mxKeyHandler(m),p=u.isEventIgnored;u.isEventIgnored=function(R){return!(mxEvent.isShiftDown(R)&&9==R.keyCode)&&(!this.isControlDown(R)||mxEvent.isShiftDown(R)||-90!=R.keyCode&&89!=R.keyCode&&188!=R.keyCode&&190!=R.keyCode&&85!=R.keyCode&&83!=R.keyCode)&&(66!=R.keyCode&&73!=R.keyCode||!this.isControlDown(R)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=R.keyCode&&107!=R.keyCode||!this.isControlDown(R)&&!mxEvent.isShiftDown(R)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};u.isEnabledForEvent=function(R){return!mxEvent.isConsumed(R)&&this.isGraphEvent(R)&&this.isEnabled()&&-(null==g.dialogs||0==g.dialogs.length)};u.isControlDown=function(R){return mxEvent.isControlDown(R)||mxClient.IS_MAC&&R.metaKey};var B=null,H={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},T=u.getFunction;mxKeyHandler.prototype.getFunction=function(R){if(m.isEnabled()){var c=null;mxEvent.isShiftDown(R)&&this.isControlDown(R)&&mxEvent.isAltDown(R)?c=g.actions.get(g.ctrlAltShiftActions[R.keyCode]):mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)?-c=g.actions.get(g.altShiftActions[R.keyCode]):this.isControlDown(R)&&mxEvent.isAltDown(R)&&(c=g.actions.get(g.ctrlAltActions[R.keyCode]));if(null!=c)return c.funct;if(null!=H[R.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(R)&&mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)){if(m.model.isVertex(m.getSelectionCell()))return function(){var f=m.connectVertex(m.getSelectionCell(),H[R.keyCode],m.defaultEdgeLength,R,!0);null!=f&&0<f.length&&(1==f.length&&m.model.isEdge(f[0])?m.setSelectionCell(m.model.getTerminal(f[0],-!1)):m.setSelectionCell(f[f.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(R)?function(){e(R.keyCode,mxEvent.isShiftDown(R)?m.gridSize:null,!0)}:function(){e(R.keyCode,mxEvent.isShiftDown(R)?m.gridSize:null)}}return T.apply(this,arguments)};u.bindAction=mxUtils.bind(this,function(R,c,f,l){var t=this.actions.get(f);null!=t&&(f=function(){t.isEnabled()&&t.funct.apply(this,arguments)},-c?l?u.bindControlShiftKey(R,f):u.bindControlKey(R,f):l?u.bindShiftKey(R,f):u.bindKey(R,f))});var G=this,P=u.escape;u.escape=function(R){P.apply(this,arguments)};u.enter=function(){};u.bindControlShiftKey(36,function(){m.exitGroup()});u.bindControlShiftKey(35,function(){m.enterGroup()});u.bindShiftKey(36,function(){m.home()});u.bindKey(35,function(){m.refresh()});u.bindAction(80,!0,"print");u.bindAction(107,!0,"zoomIn");u.bindAction(109,!0,"zoomOut");u.bindAction(61,!0,"zoomIn");u.bindAction(187,!0,+EditorUi.prototype.createKeyHandler=function(b){function e(Q,c,f){if(!m.isSelectionEmpty()&&m.isEnabled()){c=null!=c?c:1;var l=m.getCompositeParents(m.getSelectionCells()),t=0<l.length?l[0]:null;if(null!=t)if(f){m.getModel().beginUpdate();try{for(t=0;t<l.length;t++)if(m.getModel().isVertex(l[t])&&m.isCellResizable(l[t])){var z=m.getCellGeometry(l[t]);null!=z&&(z=z.clone(),37==Q?z.width=Math.max(0,z.width-c):38==Q?z.height=Math.max(0,z.height-c):39==Q?z.width+=c:40==Q&&(z.height+=c),m.getModel().setGeometry(l[t],+z))}}finally{m.getModel().endUpdate()}}else{z=m.model.getParent(t);var C=m.getView().scale;f=null;1==m.getSelectionCount()&&m.model.isVertex(t)&&null!=m.layoutManager&&!m.isCellLocked(t)&&(f=m.layoutManager.getLayout(z));if(null!=f&&f.constructor==mxStackLayout)c=z.getIndex(t),37==Q||38==Q?m.model.add(z,t,Math.max(0,c-1)):(39==Q||40==Q)&&m.model.add(z,t,Math.min(m.model.getChildCount(z),c+1));else{var F=m.graphHandler;null!=F&&(null==F.first&&F.start(t,0,0,m.getMovableCells(l)),null!=F.first&&(t=+l=0,37==Q?l=-c:38==Q?t=-c:39==Q?l=c:40==Q&&(t=c),F.currentDx+=l*C,F.currentDy+=t*C,F.checkPreview(),F.updatePreview()),null!=B&&window.clearTimeout(B),B=window.setTimeout(function(){if(null!=F.first){var N=F.roundLength(F.currentDx/C),K=F.roundLength(F.currentDy/C);F.moveCells(F.cells,N,K);F.reset()}},400))}}}}var g=this,m=this.editor.graph,u=new mxKeyHandler(m),p=u.isEventIgnored;u.isEventIgnored=function(Q){return!(mxEvent.isShiftDown(Q)&&9==Q.keyCode)&&(!this.isControlDown(Q)||mxEvent.isShiftDown(Q)||+90!=Q.keyCode&&89!=Q.keyCode&&188!=Q.keyCode&&190!=Q.keyCode&&85!=Q.keyCode&&83!=Q.keyCode)&&(66!=Q.keyCode&&73!=Q.keyCode||!this.isControlDown(Q)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=Q.keyCode&&107!=Q.keyCode||!this.isControlDown(Q)&&!mxEvent.isShiftDown(Q)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};u.isEnabledForEvent=function(Q){return!mxEvent.isConsumed(Q)&&this.isGraphEvent(Q)&&this.isEnabled()&&+(null==g.dialogs||0==g.dialogs.length)};u.isControlDown=function(Q){return mxEvent.isControlDown(Q)||mxClient.IS_MAC&&Q.metaKey};var B=null,H={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=u.getFunction;mxKeyHandler.prototype.getFunction=function(Q){if(m.isEnabled()){var c=null;mxEvent.isShiftDown(Q)&&this.isControlDown(Q)&&mxEvent.isAltDown(Q)?c=g.actions.get(g.ctrlAltShiftActions[Q.keyCode]):mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)?+c=g.actions.get(g.altShiftActions[Q.keyCode]):this.isControlDown(Q)&&mxEvent.isAltDown(Q)&&(c=g.actions.get(g.ctrlAltActions[Q.keyCode]));if(null!=c)return c.funct;if(null!=H[Q.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(Q)&&mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)){if(m.model.isVertex(m.getSelectionCell()))return function(){var f=m.connectVertex(m.getSelectionCell(),H[Q.keyCode],m.defaultEdgeLength,Q,!0);null!=f&&0<f.length&&(1==f.length&&m.model.isEdge(f[0])?m.setSelectionCell(m.model.getTerminal(f[0],+!1)):m.setSelectionCell(f[f.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(Q)?function(){e(Q.keyCode,mxEvent.isShiftDown(Q)?m.gridSize:null,!0)}:function(){e(Q.keyCode,mxEvent.isShiftDown(Q)?m.gridSize:null)}}return S.apply(this,arguments)};u.bindAction=mxUtils.bind(this,function(Q,c,f,l){var t=this.actions.get(f);null!=t&&(f=function(){t.isEnabled()&&t.funct.apply(this,arguments)},+c?l?u.bindControlShiftKey(Q,f):u.bindControlKey(Q,f):l?u.bindShiftKey(Q,f):u.bindKey(Q,f))});var G=this,P=u.escape;u.escape=function(Q){P.apply(this,arguments)};u.enter=function(){};u.bindControlShiftKey(36,function(){m.exitGroup()});u.bindControlShiftKey(35,function(){m.enterGroup()});u.bindShiftKey(36,function(){m.home()});u.bindKey(35,function(){m.refresh()});u.bindAction(80,!0,"print");u.bindAction(107,!0,"zoomIn");u.bindAction(109,!0,"zoomOut");u.bindAction(61,!0,"zoomIn");u.bindAction(187,!0,"zoomIn");u.bindAction(222,!0,"zoomIn");u.bindAction(173,!0,"zoomOut");u.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)u.bindAction(79,!0,"outline",!0),u.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),u.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),u.bindControlKey(13,function(){G.ctrlEnter()}),u.bindAction(8,!1,"delete"),u.bindAction(8,!0,"deleteAll"),u.bindAction(8,!1,"deleteLabels",!0),u.bindAction(46,!1,"delete"),u.bindAction(46,!0,"deleteAll"),u.bindAction(46,!1,"deleteLabels",!0),u.bindAction(36,!1,"resetView"),u.bindAction(72,!0,"fitWindow",!0),u.bindAction(74,!0,"fitPage"),u.bindAction(74,!0,"fitTwoPages",!0),u.bindAction(48,!0,"customZoom"),u.bindAction(82,!0,"turn"),u.bindAction(82,!0,"clearDefaultStyle",!0),u.bindAction(83,!0,"save"),u.bindAction(83,!0,"saveAs",!0),u.bindAction(65,!0,"selectAll"),u.bindAction(65,!0,"selectNone",!0),u.bindAction(73,!0,"selectVertices",!0),u.bindAction(69,!0,"selectEdges",!0),u.bindAction(69,!0,"editStyle"),u.bindAction(66,!0,"bold"),u.bindAction(66,!0,"toBack",!0),u.bindAction(70,!0,"toFront",!0),u.bindAction(68,!0,"duplicate"),u.bindAction(68,!0,"setAsDefaultStyle",!0),u.bindAction(90,!0,"undo"),u.bindAction(90,!0,"redo",!0),u.bindAction(89,!0,"redo"),u.bindAction(89,!0,"autosize",!0),u.bindAction(88,!0,"cut"),u.bindAction(67,!0,"copy"),u.bindAction(86,!0,"paste"),u.bindAction(71,!0,"group"),u.bindAction(77,!0,"editData"),u.bindAction(71,!0,"grid",!0),u.bindAction(73,!0,"italic"),u.bindAction(76,@@ -2264,41 +2264,41 @@ null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gnull}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(m){for(var u=0;u<b.length;u++)m=m.replace(new RegExp("&"+b[u][0]+";","g"),"&#"+b[u][1]+";");return e(m)};var g=mxUtils.getSizeForString;mxUtils.getSizeForString=function(m,u,p,B){return g(Graph.sanitizeHtml(m),u,p,B)}})();Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},g=Math.pow(2,53)-1;return function(m){var u=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,B;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(B=-arguments[2])}var H=Number(u.length);H=isNaN(H)?0:0!==H&&isFinite(H)?(0<H?1:-1)*Math.floor(Math.abs(H)):H;H=Math.min(Math.max(H,0),g);for(var T=e(this)?Object(new this(H)):Array(H),G=0,P;G<H;)P=u[G],T[G]=p?"undefined"===typeof B?p(P,G):p.call(B,P,G):P,G+=1;T.length=H;return T}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");+arguments[2])}var H=Number(u.length);H=isNaN(H)?0:0!==H&&isFinite(H)?(0<H?1:-1)*Math.floor(Math.abs(H)):H;H=Math.min(Math.max(H,0),g);for(var S=e(this)?Object(new this(H)):Array(H),G=0,P;G<H;)P=u[G],S[G]=p?"undefined"===typeof B?p(P,G):p.call(B,P,G):P,G+=1;S.length=H;return S}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#424242";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.graph.refresh(),this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,g){return null};mxImageShape.prototype.getImageDataUri=function(){var b=String(this.image);if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b),this.clippedImage=b;b=this.clippedSvg}return b};(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(e,g,m,u,p){return"default"==u&&null!=p?"fillcolor"==m.nodeName?p.shapeBackgroundColor:p.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(e,g,m){null==m&&(m=e);return b.apply(this,[e,g,m])}})();-(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,g,m,u,p,B,H,T){var G=b.apply(this,arguments);if(null!=g){var P=G.getElementsByTagName("img");0<P.length&&(P[0].className="geToolbarButton geAdaptiveAsset",P[0].style.margin="4px",P[0].style.width="18px")}return G}})();+(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,g,m,u,p,B,H,S){var G=b.apply(this,arguments);if(null!=g){var P=G.getElementsByTagName("img");0<P.length&&(P[0].className="geToolbarButton geAdaptiveAsset",P[0].style.margin="4px",P[0].style.width="18px")}return G}})();Graph=function(b,e,g,m,u,p){mxGraph.call(this,b,e,g,m);this.themes=u||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(Z){Z=this.getCurrentCellStyle(Z);-return null!=Z?"1"==Z.html||"wrap"==Z[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var B=null,H=null,T=null,G=null,P=!1,R=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();k=this.view.scale;if(!mxEvent.isAltDown(Z.getEvent())&&null!=A&&(R=this.isCellSelected(A.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(Z.getEvent()))){var I=this.selectionCellsHandler.getHandler(A.cell);-if(null==I||null==I.getHandleForEvent(Z)){var U=new mxRectangle(Z.getGraphX()-1,Z.getGraphY()-1),O=mxEvent.isTouchEvent(Z.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;I=O+2;U.grow(O);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&!this.isCellSelected(A.cell)&&!(mxUtils.contains(A,Z.getGraphX()-I,Z.getGraphY()-I)&&mxUtils.contains(A,Z.getGraphX()-I,Z.getGraphY()+I)&&mxUtils.contains(A,Z.getGraphX()+I,Z.getGraphY()+I)&&mxUtils.contains(A,Z.getGraphX()+-I,Z.getGraphY()-I))){var S=this.model.getParent(A.cell);I=this.model.getParent(S);if(!this.isCellSelected(I)){O*=k;var X=2*O;if(this.model.getChildAt(I,0)!=S&&mxUtils.intersects(U,new mxRectangle(A.x,A.y-O,A.width,X))||this.model.getChildAt(S,0)!=A.cell&&mxUtils.intersects(U,new mxRectangle(A.x-O,A.y,X,A.height))||mxUtils.intersects(U,new mxRectangle(A.x,A.y+A.height-O,A.width,X))||mxUtils.intersects(U,new mxRectangle(A.x+A.width-O,A.y,X,A.height)))S=this.selectionCellsHandler.isHandled(I),this.selectCellForEvent(I,-Z.getEvent()),I=this.selectionCellsHandler.getHandler(I),null!=I&&(O=I.getHandleForEvent(Z),null!=O&&(I.start(Z.getGraphX(),Z.getGraphY(),O),I.blockDelayedSelection=!S,Z.consume()))}}for(;!Z.isConsumed()&&null!=A&&(this.isTableCell(A.cell)||this.isTableRow(A.cell)||this.isTable(A.cell));)this.isSwimlane(A.cell)&&this.isCellMovable(A.cell)&&(I=this.getActualStartSize(A.cell),(0<I.x||0<I.width)&&mxUtils.intersects(U,new mxRectangle(A.x+(I.x-I.width-1)*k+(0==I.x?A.width:0),A.y,1,A.height))||(0<I.y||-0<I.height)&&mxUtils.intersects(U,new mxRectangle(A.x,A.y+(I.y-I.height-1)*k+(0==I.y?A.height:0),A.width,1)))&&(this.selectCellForEvent(A.cell,Z.getEvent()),I=this.selectionCellsHandler.getHandler(A.cell),null!=I&&null!=I.customHandles&&(O=mxEvent.CUSTOM_HANDLE-I.customHandles.length+1,I.start(Z.getGraphX(),Z.getGraphY(),O),Z.consume())),A=this.view.getState(this.model.getParent(A.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&-this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();mxEvent.isAltDown(Z.getEvent())||mxEvent.isControlDown(k)||mxEvent.isShiftDown(k)||R||null==A||!this.model.isEdge(A.cell)||(B=new mxPoint(Z.getGraphX(),Z.getGraphY()),P=this.isCellSelected(A.cell),T=A,H=Z,null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,Z.getGraphX(),Z.getGraphY())?G=mxEvent.LABEL_HANDLE:(k=this.selectionCellsHandler.getHandler(A.cell),null!=k&&null!=k.bends&&0<k.bends.length&&(G=k.getHandleForEvent(Z))))}}));-this.addMouseListener({mouseDown:function(Z,k){},mouseMove:mxUtils.bind(this,function(Z,k){Z=this.selectionCellsHandler.handlers.map;for(var A in Z)if(null!=Z[A].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(k.getEvent())){var I=this.tolerance;if(null!=B&&null!=T&&null!=H){if(A=T,null!=G||Math.abs(B.x-k.getGraphX())>I||Math.abs(B.y-k.getGraphY())>I){var U=null;mxEvent.isShiftDown(k.getEvent())||(U=this.selectionCellsHandler.getHandler(A.cell));if(null!=U&&null!=-U.bends&&0<U.bends.length){U.redrawHandles();var O=null!=G?G:U.getHandleForEvent(H),S=this.view.getEdgeStyle(A),X=S==mxEdgeStyle.EntityRelation;I=A.absolutePoints;P||(O=G);O!=mxEvent.LABEL_HANDLE&&null!=I&&(O=G,null==O&&(Z=new mxRectangle(B.x,B.y),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(Z,I[0].x,I[0].y)?O=0:mxUtils.contains(Z,I[I.length-1].x,I[I.length-1].y)?O=U.bends.length-1:null!=I&&(null==S&&null==O||S==mxEdgeStyle.SegmentConnector||S==mxEdgeStyle.OrthConnector)&&-(null!=S&&(2==I.length||3==I.length&&(0==Math.round(I[0].x-I[1].x)&&0==Math.round(I[1].x-I[2].x)||0==Math.round(I[0].y-I[1].y)&&0==Math.round(I[1].y-I[2].y)))?O=2:(O=mxUtils.findNearestSegment(A,B.x,B.y),O=null==S?mxEvent.VIRTUAL_HANDLE-O:O+1))),null==O&&(O=mxEvent.VIRTUAL_HANDLE));Z=O==mxEvent.LABEL_HANDLE||0==O||O==U.bends.length-1;if(!X&&(null!=A.visibleSourceState||null!=A.visibleTargetState)||Z)U.start(k.getGraphX(),k.getGraphX(),O),k.consume(),this.graphHandler.reset()}null!=U&&(this.selectionCellsHandler.isHandlerActive(U)?-this.isCellSelected(A.cell)||(this.selectionCellsHandler.handlers.put(A.cell,U),this.selectCellForEvent(A.cell,k.getEvent())):this.isCellSelected(A.cell)||U.destroy());P=!1;B=H=T=G=null}}else if(A=k.getState(),null!=A&&this.isCellEditable(A.cell)){Z=this.model.getParent(A.cell);U=null;if(this.model.isEdge(A.cell)&&!this.isCellSelected(A.cell)&&!mxEvent.isAltDown(k.getEvent())&&!mxEvent.isShiftDown(k.getEvent())&&!this.isAncestorSelected(A.cell)&&(this.isSwimlane(Z)||this.model.isLayer(Z)||this.getCurrentRoot()==-Z)){if(Z=new mxRectangle(k.getGraphX(),k.getGraphY()),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),I=A.absolutePoints,null!=I)null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,k.getGraphX(),k.getGraphY())?U="move":mxUtils.contains(Z,I[0].x,I[0].y)||mxUtils.contains(Z,I[I.length-1].x,I[I.length-1].y)?U="pointer":(S=this.view.getEdgeStyle(A),S==mxEdgeStyle.EntityRelation||null==A.visibleSourceState&&null==A.visibleTargetState||(U="crosshair",S!=mxEdgeStyle.SegmentConnector&&-S!=mxEdgeStyle.OrthConnector))||(k=mxUtils.findNearestSegment(A,k.getGraphX(),k.getGraphY()),k<I.length-1&&0<=k&&(U=0==Math.round(I[k].x-I[k+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(k.getEvent())){I=mxShape.prototype.svgStrokeTolerance/2;Z=new mxRectangle(k.getGraphX(),k.getGraphY());Z.grow(I);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&(k=this.model.getParent(A.cell),I=this.model.getParent(k),!this.isCellSelected(I)))if(mxUtils.intersects(Z,new mxRectangle(A.x,-A.y-2,A.width,4))&&this.model.getChildAt(I,0)!=k||mxUtils.intersects(Z,new mxRectangle(A.x,A.y+A.height-2,A.width,4)))U="row-resize";else if(mxUtils.intersects(Z,new mxRectangle(A.x-2,A.y,4,A.height))&&this.model.getChildAt(k,0)!=A.cell||mxUtils.intersects(Z,new mxRectangle(A.x+A.width-2,A.y,4,A.height)))U="col-resize";for(k=A;null==U&&null!=k&&(this.isTableCell(k.cell)||this.isTableRow(k.cell)||this.isTable(k.cell));)this.isSwimlane(k.cell)&&this.isCellMovable(k.cell)&&(I=this.getActualStartSize(k.cell),-O=this.view.scale,(0<I.x||0<I.width)&&mxUtils.intersects(Z,new mxRectangle(k.x+(I.x-I.width-1)*O+(0==I.x?k.width*O:0),k.y,1,k.height))?U="col-resize":(0<I.y||0<I.height)&&mxUtils.intersects(Z,new mxRectangle(k.x,k.y+(I.y-I.height-1)*O+(0==I.y?k.height:0),k.width,1))&&(U="row-resize")),k=this.view.getState(this.model.getParent(k.cell))}null!=U&&A.setCursor(U)}}}),mouseUp:mxUtils.bind(this,function(Z,k){G=B=H=T=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var c=document.createElement("div");this.cellRenderer.getLabelValue=+return null!=Z?"1"==Z.html||"wrap"==Z[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var B=null,H=null,S=null,G=null,P=!1,Q=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();k=this.view.scale;if(!mxEvent.isAltDown(Z.getEvent())&&null!=A&&(Q=this.isCellSelected(A.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(Z.getEvent()))){var I=this.selectionCellsHandler.getHandler(A.cell);+if(null==I||null==I.getHandleForEvent(Z)){var T=new mxRectangle(Z.getGraphX()-1,Z.getGraphY()-1),O=mxEvent.isTouchEvent(Z.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;I=O+2;T.grow(O);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&!this.isCellSelected(A.cell)&&!(mxUtils.contains(A,Z.getGraphX()-I,Z.getGraphY()-I)&&mxUtils.contains(A,Z.getGraphX()-I,Z.getGraphY()+I)&&mxUtils.contains(A,Z.getGraphX()+I,Z.getGraphY()+I)&&mxUtils.contains(A,Z.getGraphX()++I,Z.getGraphY()-I))){var U=this.model.getParent(A.cell);I=this.model.getParent(U);if(!this.isCellSelected(I)){O*=k;var V=2*O;if(this.model.getChildAt(I,0)!=U&&mxUtils.intersects(T,new mxRectangle(A.x,A.y-O,A.width,V))||this.model.getChildAt(U,0)!=A.cell&&mxUtils.intersects(T,new mxRectangle(A.x-O,A.y,V,A.height))||mxUtils.intersects(T,new mxRectangle(A.x,A.y+A.height-O,A.width,V))||mxUtils.intersects(T,new mxRectangle(A.x+A.width-O,A.y,V,A.height)))U=this.selectionCellsHandler.isHandled(I),this.selectCellForEvent(I,+Z.getEvent()),I=this.selectionCellsHandler.getHandler(I),null!=I&&(O=I.getHandleForEvent(Z),null!=O&&(I.start(Z.getGraphX(),Z.getGraphY(),O),I.blockDelayedSelection=!U,Z.consume()))}}for(;!Z.isConsumed()&&null!=A&&(this.isTableCell(A.cell)||this.isTableRow(A.cell)||this.isTable(A.cell));)this.isSwimlane(A.cell)&&this.isCellMovable(A.cell)&&(I=this.getActualStartSize(A.cell),(0<I.x||0<I.width)&&mxUtils.intersects(T,new mxRectangle(A.x+(I.x-I.width-1)*k+(0==I.x?A.width:0),A.y,1,A.height))||(0<I.y||+0<I.height)&&mxUtils.intersects(T,new mxRectangle(A.x,A.y+(I.y-I.height-1)*k+(0==I.y?A.height:0),A.width,1)))&&(this.selectCellForEvent(A.cell,Z.getEvent()),I=this.selectionCellsHandler.getHandler(A.cell),null!=I&&null!=I.customHandles&&(O=mxEvent.CUSTOM_HANDLE-I.customHandles.length+1,I.start(Z.getGraphX(),Z.getGraphY(),O),Z.consume())),A=this.view.getState(this.model.getParent(A.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&+this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();mxEvent.isAltDown(Z.getEvent())||mxEvent.isControlDown(k)||mxEvent.isShiftDown(k)||Q||null==A||!this.model.isEdge(A.cell)||(B=new mxPoint(Z.getGraphX(),Z.getGraphY()),P=this.isCellSelected(A.cell),S=A,H=Z,null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,Z.getGraphX(),Z.getGraphY())?G=mxEvent.LABEL_HANDLE:(k=this.selectionCellsHandler.getHandler(A.cell),null!=k&&null!=k.bends&&0<k.bends.length&&(G=k.getHandleForEvent(Z))))}}));+this.addMouseListener({mouseDown:function(Z,k){},mouseMove:mxUtils.bind(this,function(Z,k){Z=this.selectionCellsHandler.handlers.map;for(var A in Z)if(null!=Z[A].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(k.getEvent())){var I=this.tolerance;if(null!=B&&null!=S&&null!=H){if(A=S,null!=G||Math.abs(B.x-k.getGraphX())>I||Math.abs(B.y-k.getGraphY())>I){var T=null;mxEvent.isShiftDown(k.getEvent())||(T=this.selectionCellsHandler.getHandler(A.cell));if(null!=T&&null!=+T.bends&&0<T.bends.length){T.redrawHandles();var O=null!=G?G:T.getHandleForEvent(H),U=this.view.getEdgeStyle(A),V=U==mxEdgeStyle.EntityRelation;I=A.absolutePoints;P||(O=G);O!=mxEvent.LABEL_HANDLE&&null!=I&&(O=G,null==O&&(Z=new mxRectangle(B.x,B.y),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(Z,I[0].x,I[0].y)?O=0:mxUtils.contains(Z,I[I.length-1].x,I[I.length-1].y)?O=T.bends.length-1:null!=I&&(null==U&&null==O||U==mxEdgeStyle.SegmentConnector||U==mxEdgeStyle.OrthConnector)&&+(null!=U&&(2==I.length||3==I.length&&(0==Math.round(I[0].x-I[1].x)&&0==Math.round(I[1].x-I[2].x)||0==Math.round(I[0].y-I[1].y)&&0==Math.round(I[1].y-I[2].y)))?O=2:(O=mxUtils.findNearestSegment(A,B.x,B.y),O=null==U?mxEvent.VIRTUAL_HANDLE-O:O+1))),null==O&&(O=mxEvent.VIRTUAL_HANDLE));Z=O==mxEvent.LABEL_HANDLE||0==O||O==T.bends.length-1;if(!V&&(null!=A.visibleSourceState||null!=A.visibleTargetState)||Z)T.start(k.getGraphX(),k.getGraphX(),O),k.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?+this.isCellSelected(A.cell)||(this.selectionCellsHandler.handlers.put(A.cell,T),this.selectCellForEvent(A.cell,k.getEvent())):this.isCellSelected(A.cell)||T.destroy());P=!1;B=H=S=G=null}}else if(A=k.getState(),null!=A&&this.isCellEditable(A.cell)){Z=this.model.getParent(A.cell);T=null;if(this.model.isEdge(A.cell)&&!this.isCellSelected(A.cell)&&!mxEvent.isAltDown(k.getEvent())&&!mxEvent.isShiftDown(k.getEvent())&&!this.isAncestorSelected(A.cell)&&(this.isSwimlane(Z)||this.model.isLayer(Z)||this.getCurrentRoot()==+Z)){if(Z=new mxRectangle(k.getGraphX(),k.getGraphY()),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),I=A.absolutePoints,null!=I)null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,k.getGraphX(),k.getGraphY())?T="move":mxUtils.contains(Z,I[0].x,I[0].y)||mxUtils.contains(Z,I[I.length-1].x,I[I.length-1].y)?T="pointer":(U=this.view.getEdgeStyle(A),U==mxEdgeStyle.EntityRelation||null==A.visibleSourceState&&null==A.visibleTargetState||(T="crosshair",U!=mxEdgeStyle.SegmentConnector&&+U!=mxEdgeStyle.OrthConnector))||(k=mxUtils.findNearestSegment(A,k.getGraphX(),k.getGraphY()),k<I.length-1&&0<=k&&(T=0==Math.round(I[k].x-I[k+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(k.getEvent())){I=mxShape.prototype.svgStrokeTolerance/2;Z=new mxRectangle(k.getGraphX(),k.getGraphY());Z.grow(I);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&(k=this.model.getParent(A.cell),I=this.model.getParent(k),!this.isCellSelected(I)))if(mxUtils.intersects(Z,new mxRectangle(A.x,+A.y-2,A.width,4))&&this.model.getChildAt(I,0)!=k||mxUtils.intersects(Z,new mxRectangle(A.x,A.y+A.height-2,A.width,4)))T="row-resize";else if(mxUtils.intersects(Z,new mxRectangle(A.x-2,A.y,4,A.height))&&this.model.getChildAt(k,0)!=A.cell||mxUtils.intersects(Z,new mxRectangle(A.x+A.width-2,A.y,4,A.height)))T="col-resize";for(k=A;null==T&&null!=k&&(this.isTableCell(k.cell)||this.isTableRow(k.cell)||this.isTable(k.cell));)this.isSwimlane(k.cell)&&this.isCellMovable(k.cell)&&(I=this.getActualStartSize(k.cell),+O=this.view.scale,(0<I.x||0<I.width)&&mxUtils.intersects(Z,new mxRectangle(k.x+(I.x-I.width-1)*O+(0==I.x?k.width*O:0),k.y,1,k.height))?T="col-resize":(0<I.y||0<I.height)&&mxUtils.intersects(Z,new mxRectangle(k.x,k.y+(I.y-I.height-1)*O+(0==I.y?k.height:0),k.width,1))&&(T="row-resize")),k=this.view.getState(this.model.getParent(k.cell))}null!=T&&A.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(Z,k){G=B=H=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var c=document.createElement("div");this.cellRenderer.getLabelValue=function(Z){var k=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);Z.view.graph.isHtmlLabel(Z.cell)&&("0"==mxUtils.getValue(Z.style,"html","0")?k=mxUtils.htmlEntities(k,!1):(Z.lastLabelValue!=k&&(Z.lastLabelValue=k,Z.lastSanitizedLabelValue=Graph.sanitizeHtml(k),c.innerHTML=Z.lastSanitizedLabelValue,Graph.addLightDarkColors(c,null,"simple"==Z.view.graph.getAdaptiveColors())&&(Z.lastSanitizedLabelValue=c.innerHTML)),k=Z.lastSanitizedLabelValue));return k};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(Z,k){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;-this.graphHandler.getGuideStates=function(){var Z=f.apply(this,arguments);if(this.graph.pageVisible){var k=[],A=this.graph.pageFormat,I=this.graph.pageScale,U=A.width*I;A=A.height*I;I=this.graph.view.translate;for(var O=this.graph.view.scale,S=this.graph.getPageLayout(),X=0;X<S.width;X++)k.push(new mxRectangle(((S.x+X)*U+I.x)*O,(S.y*A+I.y)*O,U*O,A*O));for(X=1;X<S.height;X++)k.push(new mxRectangle((S.x*U+I.x)*O,((S.y+X)*A+I.y)*O,U*O,A*O));Z=k.concat(Z)}return Z};mxDragSource.prototype.dragElementZIndex=-mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(Z,k){return null==Z.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(Z){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var l=this.graphHandler.getCells;this.graphHandler.getCells=function(Z){for(var k=l.apply(this,arguments),A=new mxDictionary,I=[],U=0;U<k.length;U++){var O=-this.graph.isTableCell(Z)&&this.graph.isTableCell(k[U])&&this.graph.isCellSelected(k[U])?this.graph.model.getParent(k[U]):this.graph.isTableRow(Z)&&this.graph.isTableRow(k[U])&&this.graph.isCellSelected(k[U])?k[U]:this.graph.getCompositeParent(k[U]);null==O||A.get(O)||(A.put(O,!0),I.push(O))}return I};var t=this.graphHandler.start;this.graphHandler.start=function(Z,k,A,I){var U=!1;this.graph.isTableCell(Z)&&(this.graph.isCellSelected(Z)?U=!0:Z=this.graph.model.getParent(Z));U||this.graph.isTableRow(Z)&&-this.graph.isCellSelected(Z)||(Z=this.graph.getCompositeParent(Z));t.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(Z,k){k=this.graph.getCompositeParent(k);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(Z,k,A,I,U,O){var S=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=I&&this.graph.applyNewEdgeStyle(I,[S]);return S};var z=new mxRubberband(this);this.getRubberband=function(){return z};+this.graphHandler.getGuideStates=function(){var Z=f.apply(this,arguments);if(this.graph.pageVisible){var k=[],A=this.graph.pageFormat,I=this.graph.pageScale,T=A.width*I;A=A.height*I;I=this.graph.view.translate;for(var O=this.graph.view.scale,U=this.graph.getPageLayout(),V=0;V<U.width;V++)k.push(new mxRectangle(((U.x+V)*T+I.x)*O,(U.y*A+I.y)*O,T*O,A*O));for(V=1;V<U.height;V++)k.push(new mxRectangle((U.x*T+I.x)*O,((U.y+V)*A+I.y)*O,T*O,A*O));Z=k.concat(Z)}return Z};mxDragSource.prototype.dragElementZIndex=+mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(Z,k){return null==Z.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(Z){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var l=this.graphHandler.getCells;this.graphHandler.getCells=function(Z){for(var k=l.apply(this,arguments),A=new mxDictionary,I=[],T=0;T<k.length;T++){var O=+this.graph.isTableCell(Z)&&this.graph.isTableCell(k[T])&&this.graph.isCellSelected(k[T])?this.graph.model.getParent(k[T]):this.graph.isTableRow(Z)&&this.graph.isTableRow(k[T])&&this.graph.isCellSelected(k[T])?k[T]:this.graph.getCompositeParent(k[T]);null==O||A.get(O)||(A.put(O,!0),I.push(O))}return I};var t=this.graphHandler.start;this.graphHandler.start=function(Z,k,A,I){var T=!1;this.graph.isTableCell(Z)&&(this.graph.isCellSelected(Z)?T=!0:Z=this.graph.model.getParent(Z));T||this.graph.isTableRow(Z)&&+this.graph.isCellSelected(Z)||(Z=this.graph.getCompositeParent(Z));t.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(Z,k){k=this.graph.getCompositeParent(k);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(Z,k,A,I,T,O){var U=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=I&&this.graph.applyNewEdgeStyle(I,[U]);return U};var z=new mxRubberband(this);this.getRubberband=function(){return z};var C=(new Date).getTime(),F=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var Z=this.currentState;N.apply(this,arguments);Z!=this.currentState?(C=(new Date).getTime(),F=0):F=(new Date).getTime()-C};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(Z){return mxEvent.isShiftDown(Z.getEvent())&&mxEvent.isAltDown(Z.getEvent())?!1:null!=this.currentState&&Z.getState()==this.currentState&&2E3<F||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var J=this.isToggleEvent;this.isToggleEvent=function(Z){return J.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z)};var da=z.isForceRubberbandEvent;z.isForceRubberbandEvent=function(Z){return da.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==Z.getState()&&mxEvent.isTouchEvent(Z.getEvent())};var ea=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ea=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=ea)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(Z){return mxEvent.isMouseEvent(Z.getEvent())};var ca=this.click;this.click=function(Z){var k=null==Z.state&&-null!=Z.sourceState&&this.isCellLocked(this.getLayerForCell(Z.sourceState.cell));if(this.isEnabled()&&!k||Z.isConsumed())return ca.apply(this,arguments);var A=k?Z.sourceState.cell:Z.getCell();if(null!=A){var I=this.getClickableLinkForCell(A);null!=I?this.isCustomLink(I)?this.customLinkClicked(I,A):this.openLink(I):k&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};var W=this.tooltipHandler.show;this.tooltipHandler.show=function(){W.apply(this,arguments);-if(null!=this.div)for(var Z=this.div.getElementsByTagName("a"),k=0;k<Z.length;k++)null!=Z[k].getAttribute("href")&&null==Z[k].getAttribute("target")&&Z[k].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};this.getCursorForMouseEvent=function(Z){var k=null==Z.state&&null!=Z.sourceState&&this.isCellLocked(Z.sourceState.cell);return this.getCursorForCell(k?Z.sourceState.cell:Z.getCell())};var ba=this.getCursorForCell;this.getCursorForCell=function(Z){if(!this.isEnabled()||-this.isCellLocked(Z)){if(null!=this.getClickableLinkForCell(Z))return"pointer";if(this.isCellLocked(Z))return"default"}return ba.apply(this,arguments)};this.selectRegion=function(Z,k){var A=mxEvent.isAltDown(k)?Z:null;Z=this.getCells(Z.x,Z.y,Z.width,Z.height,null,null,A,null,!0);if(this.isToggleEvent(k))for(A=0;A<Z.length;A++)this.selectCellForEvent(Z[A],k);else this.selectCellsForEvent(Z,k);return Z};var ha=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=-function(Z,k,A){return this.graph.isCellSelected(Z)?!1:ha.apply(this,arguments)};var la=this.updateMouseEvent;this.updateMouseEvent=function(Z){Z=la.apply(this,arguments);null!=Z.state&&this.isCellLocked(this.getLayerForCell(Z.getCell()))&&(null==this.getLinkForCell(Z.getCell())?Z.state=this.view.getState(this.getCellAt(Z.getGraphX(),Z.getGraphY(),null,null,null,mxUtils.bind(this,function(k,A,I){return Z.state==k||this.isCellLocked(this.getLayerForCell(k.cell))&&null==this.getLinkForCell(k.cell)}))):+null!=Z.sourceState&&this.isCellLocked(this.getLayerForCell(Z.sourceState.cell));if(this.isEnabled()&&!k||Z.isConsumed())return ca.apply(this,arguments);var A=k?Z.sourceState.cell:Z.getCell();if(null!=A){var I=this.getClickableLinkForCell(A);null!=I?this.isCustomLink(I)?this.customLinkClicked(I,A):this.openLink(I):k&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};var X=this.tooltipHandler.show;this.tooltipHandler.show=function(){X.apply(this,arguments);+if(null!=this.div)for(var Z=this.div.getElementsByTagName("a"),k=0;k<Z.length;k++)null!=Z[k].getAttribute("href")&&null==Z[k].getAttribute("target")&&Z[k].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};this.getCursorForMouseEvent=function(Z){var k=null==Z.state&&null!=Z.sourceState&&this.isCellLocked(Z.sourceState.cell);return this.getCursorForCell(k?Z.sourceState.cell:Z.getCell())};var aa=this.getCursorForCell;this.getCursorForCell=function(Z){if(!this.isEnabled()||+this.isCellLocked(Z)){if(null!=this.getClickableLinkForCell(Z))return"pointer";if(this.isCellLocked(Z))return"default"}return aa.apply(this,arguments)};this.selectRegion=function(Z,k){var A=mxEvent.isAltDown(k)?Z:null;Z=this.getCells(Z.x,Z.y,Z.width,Z.height,null,null,A,null,!0);if(this.isToggleEvent(k))for(A=0;A<Z.length;A++)this.selectCellForEvent(Z[A],k);else this.selectCellsForEvent(Z,k);return Z};var ia=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=+function(Z,k,A){return this.graph.isCellSelected(Z)?!1:ia.apply(this,arguments)};var la=this.updateMouseEvent;this.updateMouseEvent=function(Z){Z=la.apply(this,arguments);null!=Z.state&&this.isCellLocked(this.getLayerForCell(Z.getCell()))&&(null==this.getLinkForCell(Z.getCell())?Z.state=this.view.getState(this.getCellAt(Z.getGraphX(),Z.getGraphY(),null,null,null,mxUtils.bind(this,function(k,A,I){return Z.state==k||this.isCellLocked(this.getLayerForCell(k.cell))&&null==this.getLinkForCell(k.cell)}))):Z.state=null);return Z};var Y=this.isCellSelectable;this.isCellSelectable=function(Z){return Y.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(Z))};this.isCellLocked=function(Z){for(;null!=Z;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(Z),"locked","0"))return!0;Z=this.model.getParent(Z)}return!1};var ma=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){"mouseDown"==k.getProperty("eventName")&&(Z=k.getProperty("event").getState(),ma=null==Z||this.isSelectionEmpty()||this.isCellSelected(Z.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(Z,k){if(!mxEvent.isMultiTouchEvent(k)){Z=k.getProperty("event");var A=k.getProperty("cell");null==A?(Z=mxUtils.convertPoint(this.container,mxEvent.getClientX(Z),mxEvent.getClientY(Z)),z.start(Z.x,Z.y)):null!=ma?this.addSelectionCells(ma):1<this.getSelectionCount()&&this.isCellSelected(A)&&this.removeSelectionCell(A);ma=null;k.consume()}}));this.connectionHandler.selectCells=function(Z,k){this.graph.setSelectionCell(k||Z)};this.connectionHandler.constraintHandler.isStateIgnored=function(Z,k){var A=Z.view.graph;return k&&(A.isCellSelected(Z.cell)||A.isTableRow(Z.cell)&&A.selectionCellsHandler.isHandled(A.model.getParent(Z.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var Z=this.connectionHandler.constraintHandler;null!=Z.currentFocus&&Z.isStateIgnored(Z.currentFocus,!0)&&(Z.currentFocus=null,Z.constraints=null,Z.destroyIcons());Z.destroyFocusHighlight()}));@@ -2314,37 +2314,37 @@ Graph.createSvgImage=function(b,e,g,m,u){g=unescape(encodeURIComponent(Graph.svgGraph.getSvgFromDataUri=function(b){return null!=b&&"data:image/svg"==b.substring(0,14)?Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+decodeURIComponent(escape(atob(b.substring(b.indexOf(",")+1)))):null};Graph.createSvgNode=function(b,e,g,m,u){var p=mxUtils.createXmlDocument(),B=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=u&&B.setAttribute("style","background: "+u.light+"; background-color: "+u.cssText+";");null==p.createElementNS?(B.setAttribute("xmlns",mxConstants.NS_SVG),B.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):B.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);B.setAttribute("version","1.1");B.setAttribute("width",g+"px");B.setAttribute("height",m+"px");B.setAttribute("viewBox",b+" "+e+" "+g+" "+m);p.appendChild(B);return B};-Graph.htmlToPng=function(b,e,g,m,u,p){u=null!=u?u:"";p=null!=p?p:Editor.htmlRasterScale;var B=document.createElement("canvas");B.width=e*p;B.height=g*p;var H=document.createElement("img");H.onload=mxUtils.bind(this,function(){try{var G=B.getContext("2d");G.scale(p,p);G.drawImage(H,0,0);m(B.toDataURL())}catch(P){m(null)}});var T=mxUtils.createXmlDocument();T=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"svg"):T.createElement("svg");b=(new mxSvgCanvas2D(T)).convertHtml(b);H.onerror=+Graph.htmlToPng=function(b,e,g,m,u,p){u=null!=u?u:"";p=null!=p?p:Editor.htmlRasterScale;var B=document.createElement("canvas");B.width=e*p;B.height=g*p;var H=document.createElement("img");H.onload=mxUtils.bind(this,function(){try{var G=B.getContext("2d");G.scale(p,p);G.drawImage(H,0,0);m(B.toDataURL())}catch(P){m(null)}});var S=mxUtils.createXmlDocument();S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"svg"):S.createElement("svg");b=(new mxSvgCanvas2D(S)).convertHtml(b);H.onerror=function(G){m(null)};H.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+g+'">'+(""!=u?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+u+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+b+"</div></foreignObject></svg>")};-Graph.addLightDarkColors=function(b,e,g,m){function u(c,f,l){return null!=m?m(c,f,l):mxUtils.isValidColor(l)?(null==B&&null!=e&&(B={}),null!=B&&(B[f]=c.style.getPropertyValue(f)),l=mxUtils.getLightDarkColor(l,null,null,g),c.style.setProperty(f,l.cssText),!0):!1}for(var p=b.getElementsByTagName("*"),B=null,H=!1,T=0;T<p.length;T++)if(p[T]!=b&&null!=p[T].style){B=null;for(var G=0;G<p[T].style.length;G++){var P=p[T].style.item(G),R=p[T].style.getPropertyValue(P);H=u(p[T],P,R)||H}"FONT"==p[T].nodeName&&-""==p[T].style.getPropertyValue("color")&&(R=p[T].getAttribute("color"),H=u(p[T],"color",R)||H);null!=e&&null!=B&&p[T].setAttribute(e,JSON.stringify(B))}return H};Graph.removeLightDarkColors=function(b,e){b=b.getElementsByTagName("*");for(var g=!1,m=0;m<b.length;m++)try{var u=b[m].getAttribute(e);if(null!=u){b[m].removeAttribute(e);var p=JSON.parse(u),B;for(B in p){var H=p[B];""==H?(b[m].style[B]=null,""==b[m].getAttribute("style")&&b[m].removeAttribute("style")):b[m].style[B]=H;g=!0}}}catch(T){}return g};+Graph.addLightDarkColors=function(b,e,g,m){function u(c,f,l){return null!=m?m(c,f,l):mxUtils.isValidColor(l)?(null==B&&null!=e&&(B={}),null!=B&&(B[f]=c.style.getPropertyValue(f)),l=mxUtils.getLightDarkColor(l,null,null,g),c.style.setProperty(f,l.cssText),!0):!1}for(var p=b.getElementsByTagName("*"),B=null,H=!1,S=0;S<p.length;S++)if(p[S]!=b&&null!=p[S].style){B=null;for(var G=0;G<p[S].style.length;G++){var P=p[S].style.item(G),Q=p[S].style.getPropertyValue(P);H=u(p[S],P,Q)||H}"FONT"==p[S].nodeName&&+""==p[S].style.getPropertyValue("color")&&(Q=p[S].getAttribute("color"),H=u(p[S],"color",Q)||H);null!=e&&null!=B&&p[S].setAttribute(e,JSON.stringify(B))}return H};Graph.removeLightDarkColors=function(b,e){b=b.getElementsByTagName("*");for(var g=!1,m=0;m<b.length;m++)try{var u=b[m].getAttribute(e);if(null!=u){b[m].removeAttribute(e);var p=JSON.parse(u),B;for(B in p){var H=p[B];""==H?(b[m].style[B]=null,""==b[m].getAttribute("style")&&b[m].removeAttribute("style")):b[m].style[B]=H;g=!0}}}catch(S){}return g};Graph.getGivenColor=function(b,e){var g=null;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){try{var m=b.getAttribute(Graph.backupStyleAttribute);if(null!=m){var u=JSON.parse(m);null!=u&&null!=u[e]&&("color"==e&&"FONT"==b.nodeName&&""==u[e]&&null!=b.getAttribute("color")?g=b.getAttribute("color"):""!=u[e]&&(g=u[e]))}}catch(p){}null==g&&""!=b.style[e]&&(g=b.style[e])}return g};-Graph.setTextColor=function(b,e,g){for(var m=g?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,u=g?"color":"background-color",p=b.getElementsByTagName("*"),B=[],H=0;H<p.length;H++)B.push({node:p[H],value:p[H].style[u]});document.execCommand(g?"forecolor":"backcolor",!1,m);b=b.getElementsByTagName("*");for(H=0;H<b.length;H++){if(H<B.length&&B[H].node==b[H]&&B[H].value!=b[H].style[u]&&""==b[H].style[u])try{if(p=b[H].getAttribute(Graph.backupStyleAttribute),null!=p){var T=JSON.parse(p);T[u]=-"";b[H].setAttribute(Graph.backupStyleAttribute,JSON.stringify(T))}}catch(G){}if(g&&b[H].getAttribute("color")==m||b[H].style[u]==m){g&&b[H].getAttribute("color")==m&&b[H].removeAttribute("color");b[H].style[u]=e!=mxConstants.NONE?mxUtils.getLightDarkColor(e).cssText:null;try{p=b[H].getAttribute(Graph.backupStyleAttribute),T=null!=p?JSON.parse(p):{},T[u]=e!=mxConstants.NONE?e:"",b[H].setAttribute(Graph.backupStyleAttribute,JSON.stringify(T))}catch(G){}if(g&&mxClient.IS_FF){e=b[H];g=e.firstChild;if(null!=+Graph.setTextColor=function(b,e,g){for(var m=g?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,u=g?"color":"background-color",p=b.getElementsByTagName("*"),B=[],H=0;H<p.length;H++)B.push({node:p[H],value:p[H].style[u]});document.execCommand(g?"forecolor":"backcolor",!1,m);b=b.getElementsByTagName("*");for(H=0;H<b.length;H++){if(H<B.length&&B[H].node==b[H]&&B[H].value!=b[H].style[u]&&""==b[H].style[u])try{if(p=b[H].getAttribute(Graph.backupStyleAttribute),null!=p){var S=JSON.parse(p);S[u]=+"";b[H].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}}catch(G){}if(g&&b[H].getAttribute("color")==m||b[H].style[u]==m){g&&b[H].getAttribute("color")==m&&b[H].removeAttribute("color");b[H].style[u]=e!=mxConstants.NONE?mxUtils.getLightDarkColor(e).cssText:null;try{p=b[H].getAttribute(Graph.backupStyleAttribute),S=null!=p?JSON.parse(p):{},S[u]=e!=mxConstants.NONE?e:"",b[H].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}catch(G){}if(g&&mxClient.IS_FF){e=b[H];g=e.firstChild;if(null!=g&&"A"==g.nodeName&&null==g.nextSibling&&null!=g.firstChild){e.parentNode.insertBefore(g,e);for(m=g.firstChild;null!=m;)u=m.nextSibling,e.appendChild(m),m=u;g.appendChild(e)}break}}}};Graph.zapGremlins=function(b){return mxUtils.zapGremlins(b)};Graph.stringToBytes=function(b){for(var e=Array(b.length),g=0;g<b.length;g++)e[g]=b.charCodeAt(g);return e};Graph.bytesToString=function(b){for(var e=Array(b.length),g=0;g<b.length;g++)e[g]=String.fromCharCode(b[g]);return e.join("")};Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(e,g){return String.fromCharCode(parseInt(g,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,e){b=mxUtils.getXml(b);return Graph.compress(e?b:Graph.zapGremlins(b))};Graph.arrayBufferToString=function(b){var e="";b=new Uint8Array(b);for(var g=b.byteLength,m=0;m<g;m++)e+=String.fromCharCode(b[m]);return e};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(e){return e.charCodeAt(0)})};Graph.arrayBufferIndexOfString=function(b,e,g){var m=e.charCodeAt(0),u=1,p=-1;for(g=g||0;g<b.byteLength;g++)if(b[g]==m){p=g;break}for(g=p+1;-1<p&&g<b.byteLength&&g<p+e.length-1;g++){if(b[g]!=e.charCodeAt(u))return Graph.arrayBufferIndexOfString(b,e,p+1);u++}return u==e.length-1?p:-1};Graph.compress=function(b,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=e?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};Graph.decompress=function(b,e,g){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));e=decodeURIComponent(e?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return g?e:Graph.zapGremlins(e)};Graph.fadeNodes=function(b,e,g,m,u){u=null!=u?u:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+u+"ms ease-in-out");Graph.setOpacityForNodes(b,g);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=m&&m()},u)},0)};-Graph.exploreFromCell=function(b,e,g){pageSize=null!=g&&null!=g.pageSize?g.pageSize:8;minSize=null!=g&&null!=g.minSize?g.minSize:180;(function(m,u){function p(P,R){if(P.getModel().isVertex(R)){var c=P.container.scrollWidth/2,f=P.container.scrollHeight/2;P.rootCell=R.referenceCell||R;P.getModel().beginUpdate();try{for(var l=R.referenceCell||R,t=m.model.getCell(l.sourceCellId),z=m.getEdges(t,null,!0,!0,!1,!0),C=[],F=0;F<z.length;F++)null!=z[F].getTerminal(!0)&&null!=z[F].getTerminal(!1)&&m.isCellVisible(z[F])&&-!m.isEdgeIgnored(z[F])&&m.isCellVisible(z[F].getTerminal(!0))&&m.isCellVisible(z[F].getTerminal(!1))&&m.isCellVisible(m.getLayerForCell(z[F]))&&C.push(z[F]);C=z=C;if(null!=R.startIndex||0<pageSize&&z.length>pageSize){var N=R.startIndex||0;C=z.slice(Math.max(0,N),Math.min(z.length,N+pageSize))}C=m.getOpposites(C,t).concat(C);var K=P.cloneCells(C);for(F=0;F<C.length;F++)if(K[F].sourceCellId=C[F].id,P.model.isEdge(K[F]))for(K[F].geometry.x=0,K[F].geometry.y=0,K[F].geometry.points=null,K[F].setStyle(K[F].getStyle()+-";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),K[F].setTerminal(l,null==K[F].getTerminal(!0)),t=0;t<K[F].getChildCount();t++){var J=K[F].getChildAt(t);null!=J.geometry&&J.geometry.relative&&(J.setStyle(J.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),J.geometry.offset=new mxPoint(0,0),J.geometry.y=0,J.geometry.x=.5>J.geometry.x?-.8:.5<J.geometry.x?.8:0)}if(0<R.startIndex){var da=P.createVertex(null,null,mxResources.get("previousPage")+-" ("+Math.ceil((R.startIndex||0)/pageSize)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");da.referenceCell=l;da.startIndex=Math.max(0,(R.startIndex||0)-pageSize);K.splice(0,0,da)}if(z.length>(R.startIndex||0)+pageSize){var ea=P.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((R.startIndex||0)/pageSize)+2)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");-ea.referenceCell=l;ea.startIndex=(R.startIndex||0)+pageSize;K.splice(0,0,ea)}for(var ca in P.getModel().cells){var W=P.getModel().getCell(ca);W!=P.rootCell&&!P.getModel().isAncestor(P.rootCell,W)&&P.getModel().isVertex(W)&&P.removeCells([W])}P.addCells(K);var ba=P.getModel().getGeometry(P.rootCell);null!=ba&&(ba=ba.clone(),ba.x=c-ba.width/2,ba.y=f-ba.height/3,P.getModel().setGeometry(P.rootCell,ba));R=[];for(ca in P.getModel().cells)W=P.getModel().getCell(ca),W!=P.rootCell&&P.getModel().isVertex(W)&&-P.getModel().getParent(W)==P.getDefaultParent()&&(R.push(W),ba=P.getModel().getGeometry(W),null!=ba&&(ba.x=c-ba.width/2,ba.y=f-ba.height/2));var ha=R.length,la=2*Math.PI/ha,Y=Math.max(minSize,Math.min(P.container.scrollWidth/2.5-80,P.container.scrollHeight/2.5-80));for(c=0;c<ha;c++)ba=P.getModel().getGeometry(R[c]),null!=ba&&(ba=ba.clone(),ba.x+=Y*Math.sin(c*la),ba.y+=Y*Math.cos(c*la),P.getModel().setGeometry(R[c],ba))}finally{P.getModel().endUpdate()}}}var B=document.createElement("div");B.style.position=-"absolute";B.style.display="block";B.style.background=Editor.isDarkMode()?Editor.darkColor:"#ffffff";B.style.width="100%";B.style.height="100%";B.style.left="0px";B.style.top="0px";B.style.zIndex=2;var H=document.createElement("img");H.setAttribute("src",Editor.closeBlackImage);H.style.position="absolute";H.style.cursor="pointer";H.style.right="10px";H.style.top="10px";B.appendChild(H);var T=document.createElement("div");T.style.position="absolute";T.style.cursor="pointer";T.style.right="38px";T.style.top=-"14px";T.style.textAlign="right";T.style.verticalAlign="top";mxUtils.write(T,mxResources.get("close"));B.appendChild(T);document.body.appendChild(B);var G=function(P){27==P.keyCode&&H.click()};mxEvent.addListener(document,"keydown",G);(function(P){if(mxClient.isBrowserSupported()){var R=new Graph(P);R.keepEdgesInBackground=!0;R.isCellResizable=function(){return!1};R.isCellRotatable=function(){return!1};R.getCursorForCell=function(C){return this.model.isVertex(C)?"pointer":null};R.getFoldingImage=-function(){return null};var c=function(){mxEvent.removeListener(document,"keydown",G);P.parentNode.removeChild(P);m.scrollCellToVisible(u)};mxEvent.addListener(H,"click",c);mxEvent.addListener(T,"click",c);R.setEnabled(!1);var f=R.click;R.click=function(C){var F=C.getCell(),N=null!=F?null!=F.referenceCell?F.referenceCell:F:null;null!=F&&R.rootCell!=F&&0<R.getEdges(N).length?p(R,F):f.apply(this,arguments)};c=R.container.scrollWidth/2;var l=R.container.scrollHeight/3;R.model.beginUpdate();var t=R.importCells([u])[0];-t.sourceCellId=u.id;t.geometry.x=c-t.geometry.width/2;t.geometry.y=l-t.geometry.height/2;R.model.endUpdate();var z=!1;R.getModel().addListener(mxEvent.CHANGE,function(C,F){z||(C=F.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,R.labelsVisible=!1,z=!0,mxEffects.animateChanges(R,C,function(){var N=new mxParallelEdgeLayout(R);N.spacing=60;var K=N.layout;N.layout=function(J){N.spacing=Math.min(60,Math.max(30,60-5*J.length));K.apply(this,arguments)};N.execute(R.getDefaultParent());mxText.prototype.enableBoundingBox=-!0;R.labelsVisible=!0;R.tooltipHandler.hide();R.refresh();z=!1}))});p(R,t)}else mxUtils.error("Browser is not supported!",200,!1)})(B)})(b,e)};Graph.removeKeys=function(b,e){for(var g in b)e(g)&&delete b[g]};Graph.setTransitionForNodes=function(b,e){for(var g=0;g<b.length;g++)mxUtils.setPrefixedStyle(b[g].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var g=0;g<b.length;g++)b[g].style.opacity=e};+Graph.exploreFromCell=function(b,e,g){pageSize=null!=g&&null!=g.pageSize?g.pageSize:8;minSize=null!=g&&null!=g.minSize?g.minSize:180;(function(m,u){function p(P,Q){if(P.getModel().isVertex(Q)){var c=P.container.scrollWidth/2,f=P.container.scrollHeight/2;P.rootCell=Q.referenceCell||Q;P.getModel().beginUpdate();try{for(var l=Q.referenceCell||Q,t=m.model.getCell(l.sourceCellId),z=m.getEdges(t,null,!0,!0,!1,!0),C=[],F=0;F<z.length;F++)null!=z[F].getTerminal(!0)&&null!=z[F].getTerminal(!1)&&m.isCellVisible(z[F])&&+!m.isEdgeIgnored(z[F])&&m.isCellVisible(z[F].getTerminal(!0))&&m.isCellVisible(z[F].getTerminal(!1))&&m.isCellVisible(m.getLayerForCell(z[F]))&&C.push(z[F]);C=z=C;if(null!=Q.startIndex||0<pageSize&&z.length>pageSize){var N=Q.startIndex||0;C=z.slice(Math.max(0,N),Math.min(z.length,N+pageSize))}C=m.getOpposites(C,t).concat(C);var K=P.cloneCells(C);for(F=0;F<C.length;F++)if(K[F].sourceCellId=C[F].id,P.model.isEdge(K[F]))for(K[F].geometry.x=0,K[F].geometry.y=0,K[F].geometry.points=null,K[F].setStyle(K[F].getStyle()++";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),K[F].setTerminal(l,null==K[F].getTerminal(!0)),t=0;t<K[F].getChildCount();t++){var J=K[F].getChildAt(t);null!=J.geometry&&J.geometry.relative&&(J.setStyle(J.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),J.geometry.offset=new mxPoint(0,0),J.geometry.y=0,J.geometry.x=.5>J.geometry.x?-.8:.5<J.geometry.x?.8:0)}if(0<Q.startIndex){var da=P.createVertex(null,null,mxResources.get("previousPage")++" ("+Math.ceil((Q.startIndex||0)/pageSize)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");da.referenceCell=l;da.startIndex=Math.max(0,(Q.startIndex||0)-pageSize);K.splice(0,0,da)}if(z.length>(Q.startIndex||0)+pageSize){var ea=P.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((Q.startIndex||0)/pageSize)+2)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");+ea.referenceCell=l;ea.startIndex=(Q.startIndex||0)+pageSize;K.splice(0,0,ea)}for(var ca in P.getModel().cells){var X=P.getModel().getCell(ca);X!=P.rootCell&&!P.getModel().isAncestor(P.rootCell,X)&&P.getModel().isVertex(X)&&P.removeCells([X])}P.addCells(K);var aa=P.getModel().getGeometry(P.rootCell);null!=aa&&(aa=aa.clone(),aa.x=c-aa.width/2,aa.y=f-aa.height/3,P.getModel().setGeometry(P.rootCell,aa));Q=[];for(ca in P.getModel().cells)X=P.getModel().getCell(ca),X!=P.rootCell&&P.getModel().isVertex(X)&&+P.getModel().getParent(X)==P.getDefaultParent()&&(Q.push(X),aa=P.getModel().getGeometry(X),null!=aa&&(aa.x=c-aa.width/2,aa.y=f-aa.height/2));var ia=Q.length,la=2*Math.PI/ia,Y=Math.max(minSize,Math.min(P.container.scrollWidth/2.5-80,P.container.scrollHeight/2.5-80));for(c=0;c<ia;c++)aa=P.getModel().getGeometry(Q[c]),null!=aa&&(aa=aa.clone(),aa.x+=Y*Math.sin(c*la),aa.y+=Y*Math.cos(c*la),P.getModel().setGeometry(Q[c],aa))}finally{P.getModel().endUpdate()}}}var B=document.createElement("div");B.style.position=+"absolute";B.style.display="block";B.style.background=Editor.isDarkMode()?Editor.darkColor:"#ffffff";B.style.width="100%";B.style.height="100%";B.style.left="0px";B.style.top="0px";B.style.zIndex=2;var H=document.createElement("img");H.setAttribute("src",Editor.closeBlackImage);H.style.position="absolute";H.style.cursor="pointer";H.style.right="10px";H.style.top="10px";B.appendChild(H);var S=document.createElement("div");S.style.position="absolute";S.style.cursor="pointer";S.style.right="38px";S.style.top=+"14px";S.style.textAlign="right";S.style.verticalAlign="top";mxUtils.write(S,mxResources.get("close"));B.appendChild(S);document.body.appendChild(B);var G=function(P){27==P.keyCode&&H.click()};mxEvent.addListener(document,"keydown",G);(function(P){if(mxClient.isBrowserSupported()){var Q=new Graph(P);Q.keepEdgesInBackground=!0;Q.isCellResizable=function(){return!1};Q.isCellRotatable=function(){return!1};Q.getCursorForCell=function(C){return this.model.isVertex(C)?"pointer":null};Q.getFoldingImage=+function(){return null};var c=function(){mxEvent.removeListener(document,"keydown",G);P.parentNode.removeChild(P);m.scrollCellToVisible(u)};mxEvent.addListener(H,"click",c);mxEvent.addListener(S,"click",c);Q.setEnabled(!1);var f=Q.click;Q.click=function(C){var F=C.getCell(),N=null!=F?null!=F.referenceCell?F.referenceCell:F:null;null!=F&&Q.rootCell!=F&&0<Q.getEdges(N).length?p(Q,F):f.apply(this,arguments)};c=Q.container.scrollWidth/2;var l=Q.container.scrollHeight/3;Q.model.beginUpdate();var t=Q.importCells([u])[0];+t.sourceCellId=u.id;t.geometry.x=c-t.geometry.width/2;t.geometry.y=l-t.geometry.height/2;Q.model.endUpdate();var z=!1;Q.getModel().addListener(mxEvent.CHANGE,function(C,F){z||(C=F.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,Q.labelsVisible=!1,z=!0,mxEffects.animateChanges(Q,C,function(){var N=new mxParallelEdgeLayout(Q);N.spacing=60;var K=N.layout;N.layout=function(J){N.spacing=Math.min(60,Math.max(30,60-5*J.length));K.apply(this,arguments)};N.execute(Q.getDefaultParent());mxText.prototype.enableBoundingBox=+!0;Q.labelsVisible=!0;Q.tooltipHandler.hide();Q.refresh();z=!1}))});p(Q,t)}else mxUtils.error("Browser is not supported!",200,!1)})(B)})(b,e)};Graph.removeKeys=function(b,e){for(var g in b)e(g)&&delete b[g]};Graph.setTransitionForNodes=function(b,e){for(var g=0;g<b.length;g++)mxUtils.setPrefixedStyle(b[g].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var g=0;g<b.length;g++)b[g].style.opacity=e};Graph.removePasteFormatting=function(b,e){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var g=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style){"#000000"==b.style.color&&(b.style.color="");if("SPAN"==b.nodeName&&"Apple-tab-span"==b.className){var m=Graph.createTabNode(4);b.parentNode.replaceChild(m,b);b=m}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=g&&"P"==g.nodeName&&"p1"==g.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.parentNode.removeChild(b)}!e&&null!=b.innerHTML&&0<=b.innerHTML.indexOf("\t")&&(m=Graph.createTabNode(4),b.innerHTML=b.innerHTML.replace(/\t/g,m.outerHTML))}b=g}};Graph.createTabNode=function(b){var e="\t";if(null!=b)for(e="";0<b;)e+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(e));return b};Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){if(null==b)return null;var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};Graph.clipSvgDataUri=function(b){if(null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var e=document.createElement("div");e.style.position="absolute";e.style.visibility="hidden";var g=decodeURIComponent(escape(atob(b.substring(26)))),m=g.indexOf("<svg");if(0<=m){e.innerHTML=Graph.sanitizeHtml(g.substring(m));var u=e.getElementsByTagName("svg");if(0<u.length){document.body.appendChild(e);try{m=g=1;var p=u[0].getAttribute("width"),B=u[0].getAttribute("height");p=null!=p&&"%"!=p.charAt(p.length--1)?parseFloat(p):NaN;B=null!=B&&"%"!=B.charAt(B.length-1)?parseFloat(B):NaN;var H=u[0].getAttribute("viewBox");if(null!=H&&!isNaN(p)&&!isNaN(B)){var T=H.split(" ");4<=H.length&&(g=parseFloat(T[2])/p,m=parseFloat(T[3])/B,new mxRectangle(parseFloat(T[0]),parseFloat(T[1]),parseFloat(T[2]),parseFloat(T[3])))}var G=u[0].getBBox();if(0<G.width&&0<G.height){p=0;var P=u[0].querySelectorAll("[stroke-width]");for(B=0;B<P.length;B++)p=Math.max(p,parseFloat(P[B].getAttribute("stroke-width")));G=new mxRectangle(G.x,-G.y,G.width,G.height);G.grow(p/2);e.getElementsByTagName("svg")[0].setAttribute("viewBox",G.x+" "+G.y+" "+G.width+" "+G.height);e.getElementsByTagName("svg")[0].setAttribute("width",G.width/g);e.getElementsByTagName("svg")[0].setAttribute("height",G.height/m)}}catch(R){}finally{document.body.removeChild(e)}b=Editor.createSvgDataUri(mxUtils.getXml(u[0]))}}}catch(R){}return b};+1)?parseFloat(p):NaN;B=null!=B&&"%"!=B.charAt(B.length-1)?parseFloat(B):NaN;var H=u[0].getAttribute("viewBox");if(null!=H&&!isNaN(p)&&!isNaN(B)){var S=H.split(" ");4<=H.length&&(g=parseFloat(S[2])/p,m=parseFloat(S[3])/B,new mxRectangle(parseFloat(S[0]),parseFloat(S[1]),parseFloat(S[2]),parseFloat(S[3])))}var G=u[0].getBBox();if(0<G.width&&0<G.height){p=0;var P=u[0].querySelectorAll("[stroke-width]");for(B=0;B<P.length;B++)p=Math.max(p,parseFloat(P[B].getAttribute("stroke-width")));G=new mxRectangle(G.x,+G.y,G.width,G.height);G.grow(p/2);e.getElementsByTagName("svg")[0].setAttribute("viewBox",G.x+" "+G.y+" "+G.width+" "+G.height);e.getElementsByTagName("svg")[0].setAttribute("width",G.width/g);e.getElementsByTagName("svg")[0].setAttribute("height",G.height/m)}}catch(Q){}finally{document.body.removeChild(e)}b=Editor.createSvgDataUri(mxUtils.getXml(u[0]))}}}catch(Q){}return b};Graph.createRemoveIcon=function(b,e){var g=document.createElement("img");g.setAttribute("src",Dialog.prototype.clearImage);g.setAttribute("title",b);g.setAttribute("width","13");g.setAttribute("height","10");g.style.marginLeft="4px";g.style.marginBottom="-1px";g.style.cursor="pointer";mxEvent.addListener(g,"click",e);return g};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.rewritePageLinks=function(b,e){function g(u,p){var B=u.getAttribute(p);if(null!=B){Graph.isPageLink(B)&&(B="#"+B.substring(B.indexOf(":")+1));var H=p;e&&"xlink:href"==p&&(u.removeAttribute(p),H="href");u.setAttribute(H,B)}}b=b.getElementsByTagName("a");if(null!=b)for(var m=0;m<b.length;m++)g(b[m],"href"),g(b[m],"xlink:href")};Graph.isLink=function(b){return null!=b&&b.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;@@ -2352,33 +2352,33 @@ Graph.prototype.diagramBackgroundColor="#f0f0f0";Graph.prototype.enableDiagramBaGraph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?mxUtils.removeJavascriptProtocol(decodeURIComponent(urlParams.base)):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");Graph.prototype.vertexFontSize=null;Graph.prototype.edgeFontSize=null;Graph.prototype.adaptiveColors="auto";-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var u=g.view.graph.tolerance,p=!0,B=null,H=mxUtils.bind(this,function(P){p=!0;B=new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P))}),T=mxUtils.bind(this,function(P){p=p&&null!=B&&Math.abs(B.x-mxEvent.getClientX(P))<u&&Math.abs(B.y-mxEvent.getClientY(P))<u}),G=mxUtils.bind(this,function(P){if(p)for(var R=mxEvent.getSource(P);null!=-R&&R!=m.node;){if("a"==R.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,R,P);break}R=R.parentNode}});mxEvent.addGestureListeners(m.node,H,T,G);mxEvent.addListener(m.node,"click",function(P){mxEvent.consume(P)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var m=mxEvent.getSource(g);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var u=g.view.graph.tolerance,p=!0,B=null,H=mxUtils.bind(this,function(P){p=!0;B=new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P))}),S=mxUtils.bind(this,function(P){p=p&&null!=B&&Math.abs(B.x-mxEvent.getClientX(P))<u&&Math.abs(B.y-mxEvent.getClientY(P))<u}),G=mxUtils.bind(this,function(P){if(p)for(var Q=mxEvent.getSource(P);null!=+Q&&Q!=m.node;){if("a"==Q.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,Q,P);break}Q=Q.parentNode}});mxEvent.addGestureListeners(m.node,H,S,G);mxEvent.addListener(m.node,"click",function(P){mxEvent.consume(P)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var m=mxEvent.getSource(g);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=m&&this.graph.isCustomLink(m)&&(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&this.graph.customLinkClicked(m)&&mxEvent.consume(g))}))}}this.initLayoutManager()};(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(B){return!this.isSpecialColor(B.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(B.style,"lineShape",null)&&(this.model.isVertex(B.cell)||"arrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"wire"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(B.style,-mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isGradientState=function(B){return this.isFillState(B)&&"wire"!=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.isStrokeState=function(B){return!0};Graph.prototype.getTextColor=function(B,H){for(var T=H?"color":"background-color",G=B==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(B,-T);null==G&&null!=B&&B!=this.cellEditor.textarea.parentNode;)G=B==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(B,T),B=B.parentNode;if("rgba(0, 0, 0, 0)"==G||"transparent"==G)G=mxConstants.NONE;return G};Graph.prototype.isSpecialColor=function(B){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],B)};Graph.prototype.isGlassState=function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return"label"==B||"rectangle"==+mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isGradientState=function(B){return this.isFillState(B)&&"wire"!=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.isStrokeState=function(B){return!0};Graph.prototype.getTextColor=function(B,H){for(var S=H?"color":"background-color",G=B==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(B,+S);null==G&&null!=B&&B!=this.cellEditor.textarea.parentNode;)G=B==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(B,S),B=B.parentNode;if("rgba(0, 0, 0, 0)"==G||"transparent"==G)G=mxConstants.NONE;return G};Graph.prototype.isSpecialColor=function(B){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],B)};Graph.prototype.isGlassState=function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return"label"==B||"rectangle"==B||"internalStorage"==B||"ext"==B||"umlLifeline"==B||"swimlane"==B||"process"==B};Graph.prototype.isRoundedState=function(B){return null!=B.shape?B.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(B){var H=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(B.style,mxConstants.STYLE_CURVED,!1)&&("connector"==H||"filledEdge"==H||"wire"==H)};Graph.prototype.isAutoSizeState=-function(B){return"1"==mxUtils.getValue(B.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(B){return null!=mxUtils.getValue(B.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(B){return!0};Graph.prototype.getVerticesAndEdges=function(B,H){B=null!=B?B:!0;H=null!=H?H:!0;var T=this.model;return T.filterDescendants(function(G){return B&&T.isVertex(G)||H&&T.isEdge(G)},T.getRoot())};Graph.prototype.applyNewEdgeStyle=function(B,H,T){B=this.getCellStyle(B).newEdgeStyle;-if(null!=B){this.model.beginUpdate();try{var G=JSON.parse(B),P;for(P in G)this.setCellStyles(P,G[P],H),"edgeStyle"==P&&"elbowEdgeStyle"==G[P]&&null!=T&&this.setCellStyles("elbow",T==mxConstants.DIRECTION_SOUTH||T==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",H)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(B){for(var H={},T=0;T<B.length;T++){var G=this.view.getState(B[T]);null!=G&&this.mergeStyle(G.style,H,0==T)}return H};Graph.prototype.mergeStyle=function(B,H,T){if(null!=-B){var G={},P;for(P in B){var R=B[P];null!=R&&(G[P]=!0,null==H[P]&&T?H[P]=R:H[P]!=R&&delete H[P])}for(P in H)G[P]||delete H[P]}};Graph.prototype.getStartEditingCell=function(B,H){H=this.getCellStyle(B);H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,0));this.isTable(B)&&(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B)&&(B=this.model.getChildAt(B,0),H=this.getCellStyle(B),H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(B)&&-(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B))for(H=0;H<this.model.getChildCount(B);H++){var T=this.model.getChildAt(B,H);if(this.isCellEditable(T)){B=T;break}}return B};Graph.prototype.copyStyle=function(B){return this.getCellStyle(B,!1)};Graph.prototype.pasteStyle=function(B,H,T,G){null!=B&&(G||(T=null!=T?T:Graph.cellStyles,Graph.removeKeys(B,function(P){return 0>mxUtils.indexOf(T,P)})),this.updateCellStyles(B,H))};Graph.prototype.copyCellStyles=function(B,H,T,-G,P,R,c){var f=!1,l=!1;if(0<B.length)for(var t=0;t<B.length&&(f=this.getModel().isVertex(B[t])||f,!(l=this.getModel().isEdge(B[t])||l)||!f);t++);else l=f=!0;f=f&&!R;l=l&&!c;for(t=0;t<H.length;t++)if(B=0<=mxUtils.indexOf(Graph.textStyles,H[t]),"strokeColor"!=H[t]||null!=T[t]&&"none"!=T[t])if(0<=mxUtils.indexOf(Graph.cellStyles,H[t])||"shape"==H[t])if("shape"!=H[t]&&(f||B)&&(null==T[t]?delete G[H[t]]:G[H[t]]=T[t]),l||B)null==T[t]?delete P[H[t]]:P[H[t]]=T[t]};Graph.prototype.includeDescendants=function(B){for(var H=-[],T=0;T<B.length;T++)H=H.concat(this.model.getDescendants(B[T]));return H};Graph.prototype.pasteCellStyles=function(B,H,T,G,P){H=null!=H?H:this.currentVertexStyle;T=null!=T?T:this.currentEdgeStyle;P=null!=P?P:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var R=0;R<B.length;R++){var c=B[R],f=this.model.getStyle(c),l=!1;null!=c.style&&(pairs=c.style.split(";"),l=l||0<=mxUtils.indexOf(pairs,"text"));if(l)var t=Graph.textStyles;else if(t=Graph.cellStyles.slice(),!G)for(var z=null!=f?f.split(";"):-[],C=0;C<z.length;C++){var F=z[C],N=F.indexOf("=");if(0<=N){var K=F.substring(0,N),J=mxUtils.indexOf(t,K);0<=J&&t.splice(J,1);for(l=0;l<Graph.cellStyleGroups.length;l++){var da=Graph.cellStyleGroups[l];if(0<=mxUtils.indexOf(da,K))for(var ea=0;ea<da.length;ea++){var ca=mxUtils.indexOf(t,da[ea]);0<=ca&&t.splice(ca,1)}}}}var W=this.model.isEdge(c);l=W?T:H;for(C=0;C<t.length;C++){K=t[C];var ba=l[K];null!=ba&&("edgeStyle"!=K||P)&&(W||!W&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(f=mxUtils.setStyle(f,K,-ba),"fontFamily"==K&&null==l.fontSource&&(f=mxUtils.setStyle(f,"fontSource",null)),W&&"rounded"==K&&"1"==ba&&null==l.curved&&(f=mxUtils.setStyle(f,"curved",null)))}Editor.simpleLabels&&(f=mxUtils.setStyle(mxUtils.setStyle(f,"html",null),"whiteSpace",null));this.model.setStyle(c,f)}}finally{this.model.endUpdate()}return B};Graph.prototype.updateCellStyles=function(B,H){this.model.beginUpdate();try{for(var T=0;T<H.length;T++)if(this.model.isVertex(H[T])||this.model.isEdge(H[T])){var G=this.getCellStyle(H[T],-!1),P=G[mxConstants.STYLE_PERIMETER],R=!1;for(f in B){var c=B[f];if(G[f]!=c){if(f==mxConstants.STYLE_SHAPE&&"umlLifeline"==G[f]&&"umlLifeline"!=c){R=!0;var f="participant"}this.setCellStyles(f,c,[H[T]])}}R&&this.setCellStyles(mxConstants.STYLE_PERIMETER,P,[H[T]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=-function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(B,H,T,G,P,R){this.useCssTransforms&&(B=B/this.currentScale-this.currentTranslate.x,H=H/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(B,H,T,G,P,R){G=null!=G?G:!0;P=null!=P?P:!0;null==T&&(T=this.getCurrentRoot(),null==T&&(T=this.getModel().getRoot()));if(null!=T)for(var c=-this.model.getChildCount(T)-1;0<=c;c--){var f=this.model.getChildAt(T,c),l=this.getScaledCellAt(B,H,f,G,P,R);if(null!=l)return l;if(this.isCellVisible(f)&&(P&&this.model.isEdge(f)||G&&this.model.isVertex(f))&&(l=this.view.getState(f),null!=l&&(null==R||!R(l,B,H))&&this.intersects(l,B,H)))return f}return null};Graph.prototype.isRecursiveVertexResize=function(B){return!this.isSwimlane(B.cell)&&0<this.model.getChildCount(B.cell)&&!this.isCellCollapsed(B.cell)&&"1"==mxUtils.getValue(B.style,"recursiveResize",-"1")&&null==mxUtils.getValue(B.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(B){for(var H=this.getCellGeometry(B);null!=H&&H.relative;)B=this.getModel().getParent(B),H=this.getCellGeometry(B);return B};Graph.prototype.isPart=function(B){return"1"==mxUtils.getValue(this.getCurrentCellStyle(B),"part","0")||this.isTableCell(B)||this.isTableRow(B)};Graph.prototype.getCompositeParents=function(B){for(var H=new mxDictionary,T=[],G=0;G<B.length;G++){var P=this.getCompositeParent(B[G]);-this.isTableCell(P)&&(P=this.graph.model.getParent(P));this.isTableRow(P)&&(P=this.graph.model.getParent(P));null==P||H.get(P)||(H.put(P,!0),T.push(P))}return T};Graph.prototype.getReferenceTerminal=function(B){if(null!=B){var H=this.getCellGeometry(B);null!=H&&H.relative&&(B=this.model.getParent(B))}null!=B&&this.model.isEdge(B)&&(B=this.model.getParent(B));null!=B&&(B=this.getCompositeParent(B));return B};Graph.prototype.getCompositeParent=function(B){for(;this.isPart(B);){var H=this.model.getParent(B);-if(!this.model.isVertex(H))break;B=H}return B};Graph.prototype.filterSelectionCells=function(B){var H=this.getSelectionCells();if(null!=B){for(var T=[],G=0;G<H.length;G++)B(H[G])||T.push(H[G]);H=T}return H};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(B){if(this.useCssTransforms){var H=this.currentScale,T=this.currentTranslate;B=new mxRectangle((B.x+2*T.x)*H-T.x,(B.y+2*T.y)*H-T.y,B.width*H,B.height*H)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=-function(B){B=this.strokeWidth;this.graph.useCssTransforms&&(B/=this.graph.currentScale);return B};mxGraphView.prototype.getGraphBounds=function(){var B=this.graphBounds;if(this.graph.useCssTransforms){var H=this.graph.currentTranslate,T=this.graph.currentScale;B=new mxRectangle((B.x+H.x)*T,(B.y+H.y)*T,B.width*T,B.height*T)}return B};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;+function(B){return"1"==mxUtils.getValue(B.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(B){return null!=mxUtils.getValue(B.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(B){return!0};Graph.prototype.getVerticesAndEdges=function(B,H){B=null!=B?B:!0;H=null!=H?H:!0;var S=this.model;return S.filterDescendants(function(G){return B&&S.isVertex(G)||H&&S.isEdge(G)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=function(B,H,S){B=this.getCellStyle(B).newEdgeStyle;+if(null!=B){this.model.beginUpdate();try{var G=JSON.parse(B),P;for(P in G)this.setCellStyles(P,G[P],H),"edgeStyle"==P&&"elbowEdgeStyle"==G[P]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",H)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(B){for(var H={},S=0;S<B.length;S++){var G=this.view.getState(B[S]);null!=G&&this.mergeStyle(G.style,H,0==S)}return H};Graph.prototype.mergeStyle=function(B,H,S){if(null!=+B){var G={},P;for(P in B){var Q=B[P];null!=Q&&(G[P]=!0,null==H[P]&&S?H[P]=Q:H[P]!=Q&&delete H[P])}for(P in H)G[P]||delete H[P]}};Graph.prototype.getStartEditingCell=function(B,H){H=this.getCellStyle(B);H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,0));this.isTable(B)&&(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B)&&(B=this.model.getChildAt(B,0),H=this.getCellStyle(B),H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(B)&&+(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B))for(H=0;H<this.model.getChildCount(B);H++){var S=this.model.getChildAt(B,H);if(this.isCellEditable(S)){B=S;break}}return B};Graph.prototype.copyStyle=function(B){return this.getCellStyle(B,!1)};Graph.prototype.pasteStyle=function(B,H,S,G){null!=B&&(G||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(B,function(P){return 0>mxUtils.indexOf(S,P)})),this.updateCellStyles(B,H))};Graph.prototype.copyCellStyles=function(B,H,S,+G,P,Q,c){var f=!1,l=!1;if(0<B.length)for(var t=0;t<B.length&&(f=this.getModel().isVertex(B[t])||f,!(l=this.getModel().isEdge(B[t])||l)||!f);t++);else l=f=!0;f=f&&!Q;l=l&&!c;for(t=0;t<H.length;t++)if(B=0<=mxUtils.indexOf(Graph.textStyles,H[t]),"strokeColor"!=H[t]||null!=S[t]&&"none"!=S[t])if(0<=mxUtils.indexOf(Graph.cellStyles,H[t])||"shape"==H[t])if("shape"!=H[t]&&(f||B)&&(null==S[t]?delete G[H[t]]:G[H[t]]=S[t]),l||B)null==S[t]?delete P[H[t]]:P[H[t]]=S[t]};Graph.prototype.includeDescendants=function(B){for(var H=+[],S=0;S<B.length;S++)H=H.concat(this.model.getDescendants(B[S]));return H};Graph.prototype.pasteCellStyles=function(B,H,S,G,P){H=null!=H?H:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;P=null!=P?P:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var Q=0;Q<B.length;Q++){var c=B[Q],f=this.model.getStyle(c),l=!1;null!=c.style&&(pairs=c.style.split(";"),l=l||0<=mxUtils.indexOf(pairs,"text"));if(l)var t=Graph.textStyles;else if(t=Graph.cellStyles.slice(),!G)for(var z=null!=f?f.split(";"):+[],C=0;C<z.length;C++){var F=z[C],N=F.indexOf("=");if(0<=N){var K=F.substring(0,N),J=mxUtils.indexOf(t,K);0<=J&&t.splice(J,1);for(l=0;l<Graph.cellStyleGroups.length;l++){var da=Graph.cellStyleGroups[l];if(0<=mxUtils.indexOf(da,K))for(var ea=0;ea<da.length;ea++){var ca=mxUtils.indexOf(t,da[ea]);0<=ca&&t.splice(ca,1)}}}}var X=this.model.isEdge(c);l=X?S:H;for(C=0;C<t.length;C++){K=t[C];var aa=l[K];null!=aa&&("edgeStyle"!=K||P)&&(X||!X&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(f=mxUtils.setStyle(f,K,+aa),"fontFamily"==K&&null==l.fontSource&&(f=mxUtils.setStyle(f,"fontSource",null)),X&&"rounded"==K&&"1"==aa&&null==l.curved&&(f=mxUtils.setStyle(f,"curved",null)))}Editor.simpleLabels&&(f=mxUtils.setStyle(mxUtils.setStyle(f,"html",null),"whiteSpace",null));this.model.setStyle(c,f)}}finally{this.model.endUpdate()}return B};Graph.prototype.updateCellStyles=function(B,H){this.model.beginUpdate();try{for(var S=0;S<H.length;S++)if(this.model.isVertex(H[S])||this.model.isEdge(H[S])){var G=this.getCellStyle(H[S],+!1),P=G[mxConstants.STYLE_PERIMETER],Q=!1;for(f in B){var c=B[f];if(G[f]!=c){if(f==mxConstants.STYLE_SHAPE&&"umlLifeline"==G[f]&&"umlLifeline"!=c){Q=!0;var f="participant"}this.setCellStyles(f,c,[H[S]])}}Q&&this.setCellStyles(mxConstants.STYLE_PERIMETER,P,[H[S]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=+function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(B,H,S,G,P,Q){this.useCssTransforms&&(B=B/this.currentScale-this.currentTranslate.x,H=H/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(B,H,S,G,P,Q){G=null!=G?G:!0;P=null!=P?P:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var c=+this.model.getChildCount(S)-1;0<=c;c--){var f=this.model.getChildAt(S,c),l=this.getScaledCellAt(B,H,f,G,P,Q);if(null!=l)return l;if(this.isCellVisible(f)&&(P&&this.model.isEdge(f)||G&&this.model.isVertex(f))&&(l=this.view.getState(f),null!=l&&(null==Q||!Q(l,B,H))&&this.intersects(l,B,H)))return f}return null};Graph.prototype.isRecursiveVertexResize=function(B){return!this.isSwimlane(B.cell)&&0<this.model.getChildCount(B.cell)&&!this.isCellCollapsed(B.cell)&&"1"==mxUtils.getValue(B.style,"recursiveResize",+"1")&&null==mxUtils.getValue(B.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(B){for(var H=this.getCellGeometry(B);null!=H&&H.relative;)B=this.getModel().getParent(B),H=this.getCellGeometry(B);return B};Graph.prototype.isPart=function(B){return"1"==mxUtils.getValue(this.getCurrentCellStyle(B),"part","0")||this.isTableCell(B)||this.isTableRow(B)};Graph.prototype.getCompositeParents=function(B){for(var H=new mxDictionary,S=[],G=0;G<B.length;G++){var P=this.getCompositeParent(B[G]);+this.isTableCell(P)&&(P=this.graph.model.getParent(P));this.isTableRow(P)&&(P=this.graph.model.getParent(P));null==P||H.get(P)||(H.put(P,!0),S.push(P))}return S};Graph.prototype.getReferenceTerminal=function(B){if(null!=B){var H=this.getCellGeometry(B);null!=H&&H.relative&&(B=this.model.getParent(B))}null!=B&&this.model.isEdge(B)&&(B=this.model.getParent(B));null!=B&&(B=this.getCompositeParent(B));return B};Graph.prototype.getCompositeParent=function(B){for(;this.isPart(B);){var H=this.model.getParent(B);+if(!this.model.isVertex(H))break;B=H}return B};Graph.prototype.filterSelectionCells=function(B){var H=this.getSelectionCells();if(null!=B){for(var S=[],G=0;G<H.length;G++)B(H[G])||S.push(H[G]);H=S}return H};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(B){if(this.useCssTransforms){var H=this.currentScale,S=this.currentTranslate;B=new mxRectangle((B.x+2*S.x)*H-S.x,(B.y+2*S.y)*H-S.y,B.width*H,B.height*H)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=+function(B){B=this.strokeWidth;this.graph.useCssTransforms&&(B/=this.graph.currentScale);return B};mxGraphView.prototype.getGraphBounds=function(){var B=this.graphBounds;if(this.graph.useCssTransforms){var H=this.graph.currentTranslate,S=this.graph.currentScale;B=new mxRectangle((B.x+H.x)*S,(B.y+H.y)*S,B.width*S,B.height*S)}return B};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=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);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var g=mxGraph.prototype.getCellsForGroup;-Graph.prototype.getCellsForGroup=function(B){B=g.apply(this,arguments);for(var H=[],T=0;T<B.length;T++)this.isTableRow(B[T])||this.isTableCell(B[T])||H.push(B[T]);return H};var m=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(B){B=m.apply(this,arguments);for(var H=[],T=0;T<B.length;T++)this.isTable(B[T])||this.isTableRow(B[T])||this.isTableCell(B[T])||H.push(B[T]);return H};Graph.prototype.updateCssTransform=function(){var B=this.view.getDrawPane();if(null!=B)if(B=-B.parentNode,this.useCssTransforms){var H=B.getAttribute("transform");B.setAttribute("transformOrigin","0 0");var T=Math.round(100*this.currentScale)/100;B.setAttribute("transform","scale("+T+","+T+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");H!=B.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",B.getAttribute("transform"))}else B.removeAttribute("transformOrigin"),B.removeAttribute("transform")};-var u=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var B=this.graph.useCssTransforms,H=this.scale,T=this.translate;B&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);u.apply(this,arguments);B&&(this.scale=H,this.translate=T)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(B,H,T){var G=this.useCssTransforms,P=this.view.scale,R=this.view.translate;G&&(this.view.scale=1,this.view.translate=-new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);G&&(this.view.scale=P,this.view.translate=R,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};+Graph.prototype.getCellsForGroup=function(B){B=g.apply(this,arguments);for(var H=[],S=0;S<B.length;S++)this.isTableRow(B[S])||this.isTableCell(B[S])||H.push(B[S]);return H};var m=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(B){B=m.apply(this,arguments);for(var H=[],S=0;S<B.length;S++)this.isTable(B[S])||this.isTableRow(B[S])||this.isTableCell(B[S])||H.push(B[S]);return H};Graph.prototype.updateCssTransform=function(){var B=this.view.getDrawPane();if(null!=B)if(B=+B.parentNode,this.useCssTransforms){var H=B.getAttribute("transform");B.setAttribute("transformOrigin","0 0");var S=Math.round(100*this.currentScale)/100;B.setAttribute("transform","scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");H!=B.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",B.getAttribute("transform"))}else B.removeAttribute("transformOrigin"),B.removeAttribute("transform")};+var u=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var B=this.graph.useCssTransforms,H=this.scale,S=this.translate;B&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);u.apply(this,arguments);B&&(this.scale=H,this.translate=S)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(B,H,S){var G=this.useCssTransforms,P=this.view.scale,Q=this.view.translate;G&&(this.view.scale=1,this.view.translate=+new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);G&&(this.view.scale=P,this.view.translate=Q,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,e,g){var m=e.getAttribute("href");m!=Graph.sanitizeLink(m)&&Graph.sanitizeNode(e);if(null!=m&&!this.isCustomLink(m)&&(mxEvent.isLeftMouseButton(g)&&!mxEvent.isPopupTrigger(g)||mxEvent.isTouchEvent(g))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(m)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(m),b);mxEvent.consume(g)}};Graph.prototype.openLink=function(b,e,g){var m=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var u=b.split("#")[1];window.location.hash=="#"+u&&(window.location.hash="");window.location.hash=u}else m=window.open(b,null!=e?e:"_blank",g?null:"noopener,noreferrer"),null==m||g||(m.opener=null)}catch(p){}return m};Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b,e){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};@@ -2393,7 +2393,7 @@ Graph.prototype.createLayouts=function(b){for(var e=[],g=0;g<b.length;g++)if(0<=Graph.prototype.getDataForCells=function(b,e){for(var g=[],m=0;m<b.length;m++){var u={};u.id=b[m].id;var p=null!=b[m].value?b[m].value.attributes:null;this.isReplacePlaceholders(b[m])&&e&&(u.value=this.getLabel(b[m]));if(null!=p)for(var B=0;B<p.length;B++)u[p[B].nodeName]=p[B].nodeValue;else u.label=this.convertValueToString(b[m]);g.push(u)}return g};Graph.prototype.getNodesForCells=function(b){for(var e=[],g=0;g<b.length;g++){var m=this.view.getState(b[g]);if(null!=m){for(var u=this.cellRenderer.getShapesForState(m),p=0;p<u.length;p++)null!=u[p]&&null!=u[p].node&&e.push(u[p].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e};Graph.prototype.createWipeAnimations=function(b,e){for(var g=[],m=0;m<b.length;m++){var u=this.view.getState(b[m]);null!=u&&null!=u.shape&&(this.model.isEdge(u.cell)&&null!=u.absolutePoints&&1<u.absolutePoints.length?g.push(this.createEdgeWipeAnimation(u,e)):this.model.isVertex(u.cell)&&null!=u.shape.bounds&&g.push(this.createVertexWipeAnimation(u,e)))}return g};-Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),m=b.segments,u=b.length,p=g.length;return{execute:mxUtils.bind(this,function(B,H){if(null!=b.shape){var T=[g[0]];H=B/H;e||(H=1-H);for(var G=u*H,P=1;P<p;P++)if(G<=m[P-1]){T.push(new mxPoint(g[P-1].x+(g[P].x-g[P-1].x)*G/m[P-1],g[P-1].y+(g[P].y-g[P-1].y)*G/m[P-1]));break}else G-=m[P-1],T.push(g[P]);b.shape.points=T;b.shape.redraw();0==B&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=+Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),m=b.segments,u=b.length,p=g.length;return{execute:mxUtils.bind(this,function(B,H){if(null!=b.shape){var S=[g[0]];H=B/H;e||(H=1-H);for(var G=u*H,P=1;P<p;P++)if(G<=m[P-1]){S.push(new mxPoint(g[P-1].x+(g[P].x-g[P-1].x)*G/m[P-1],g[P-1].y+(g[P].y-g[P-1].y)*G/m[P-1]));break}else G-=m[P-1],S.push(g[P]);b.shape.points=S;b.shape.redraw();0==B&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=H)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.createVertexWipeAnimation=function(b,e){var g=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,u){null!=b.shape&&(u=m/u,e||(u=1-u),b.shape.bounds=new mxRectangle(g.x,g.y,g.width*u,g.height),b.shape.redraw(),0==m&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=u))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,g,m){g=null!=g?g:30;m=null!=m?m:30;var u=null,p=0,B=mxUtils.bind(this,function(){if(p==g||this.stoppingCustomActions){window.clearInterval(u);for(var H=0;H<b.length;H++)b[H].stop();null!=e&&e()}else for(H=0;H<b.length;H++)b[H].execute(p,g);p++});u=window.setInterval(B,m);B()};@@ -2408,17 +2408,17 @@ Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);retGraph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};Graph.prototype.formatDate=function(b,e,g){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 m=this.dateFormatCache,u=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,B=function(C,F){C=String(C);for(F=F||2;C.length<F;)C="0"+C;return C};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||-/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var H=g?"getUTC":"get",T=b[H+"Date"](),G=b[H+"Day"](),P=b[H+"Month"](),R=b[H+"FullYear"](),c=b[H+"Hours"](),f=b[H+"Minutes"](),l=b[H+"Seconds"]();H=b[H+"Milliseconds"]();var t=g?0:b.getTimezoneOffset(),z={d:T,dd:B(T),ddd:m.i18n.dayNames[G],dddd:m.i18n.dayNames[G+7],m:P+1,mm:B(P+1),mmm:m.i18n.monthNames[P],mmmm:m.i18n.monthNames[P+-12],yy:String(R).slice(2),yyyy:R,h:c%12||12,hh:B(c%12||12),H:c,HH:B(c),M:f,MM:B(f),s:l,ss:B(l),l:B(H,3),L:B(99<H?Math.round(H/10):H),t:12>c?"a":"p",tt:12>c?"am":"pm",T:12>c?"A":"P",TT:12>c?"AM":"PM",Z:g?"UTC":(String(b).match(u)||[""]).pop().replace(p,""),o:(0<t?"-":"+")+B(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<T%10?0:(10!=T%100-T%10)*T%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(C){return C in z?z[C]:C.slice(1,+/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var H=g?"getUTC":"get",S=b[H+"Date"](),G=b[H+"Day"](),P=b[H+"Month"](),Q=b[H+"FullYear"](),c=b[H+"Hours"](),f=b[H+"Minutes"](),l=b[H+"Seconds"]();H=b[H+"Milliseconds"]();var t=g?0:b.getTimezoneOffset(),z={d:S,dd:B(S),ddd:m.i18n.dayNames[G],dddd:m.i18n.dayNames[G+7],m:P+1,mm:B(P+1),mmm:m.i18n.monthNames[P],mmmm:m.i18n.monthNames[P++12],yy:String(Q).slice(2),yyyy:Q,h:c%12||12,hh:B(c%12||12),H:c,HH:B(c),M:f,MM:B(f),s:l,ss:B(l),l:B(H,3),L:B(99<H?Math.round(H/10):H),t:12>c?"a":"p",tt:12>c?"am":"pm",T:12>c?"A":"P",TT:12>c?"AM":"PM",Z:g?"UTC":(String(b).match(u)||[""]).pop().replace(p,""),o:(0<t?"-":"+")+B(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(C){return C in z?z[C]:C.slice(1,C.length-1)})};Graph.prototype.getLayerForCell=function(b){for(;null!=b&&!this.model.isLayer(b);)b=this.model.getParent(b);return b};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){e=this.getLayerForCell(b[0]);for(var g=1;g<b.length;g++)if(!this.model.isAncestor(e,b[g])){e=null;break}}return e};-Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var m=this.getModel(),u=m.getChildCount(m.root),p=0;p<u;p++)mxUtils.bind(this,function(B){function H(){m.isVisible(B)?(P.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(G,75)):(P.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(G,25))}var T=this.convertValueToString(B)||mxResources.get("background")||"Background",G=document.createElement("div");G.style.overflow=-"hidden";G.style.textOverflow="ellipsis";G.style.padding="2px";G.style.whiteSpace="nowrap";G.style.cursor="pointer";G.setAttribute("title",mxResources.get(m.isVisible(B)?"hideIt":"show",[T]));var P=document.createElement("img");P.setAttribute("draggable","false");P.setAttribute("align","absmiddle");P.setAttribute("border","0");P.style.position="relative";P.style.width="16px";P.style.padding="0px 6px 0 4px";e&&(P.style.filter="invert(100%)",P.style.top="-2px");G.appendChild(P);mxUtils.write(G,T);g.appendChild(G);+Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var m=this.getModel(),u=m.getChildCount(m.root),p=0;p<u;p++)mxUtils.bind(this,function(B){function H(){m.isVisible(B)?(P.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(G,75)):(P.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(G,25))}var S=this.convertValueToString(B)||mxResources.get("background")||"Background",G=document.createElement("div");G.style.overflow=+"hidden";G.style.textOverflow="ellipsis";G.style.padding="2px";G.style.whiteSpace="nowrap";G.style.cursor="pointer";G.setAttribute("title",mxResources.get(m.isVisible(B)?"hideIt":"show",[S]));var P=document.createElement("img");P.setAttribute("draggable","false");P.setAttribute("align","absmiddle");P.setAttribute("border","0");P.style.position="relative";P.style.width="16px";P.style.padding="0px 6px 0 4px";e&&(P.style.filter="invert(100%)",P.style.top="-2px");G.appendChild(P);mxUtils.write(G,S);g.appendChild(G);mxEvent.addListener(G,"click",function(){m.setVisible(B,!m.isVisible(B));H();null!=b&&b(B)});H()})(m.getChildAt(m.root,p));return g};-Graph.prototype.replacePlaceholders=function(b,e,g,m){m=[];if(null!=e){for(var u=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var B=null;if(match.index>u&&"%"==e.charAt(match.index-1))B=p.substring(1);else{var H=p.substring(1,p.length-1),T={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==H)B=b.id;else if("width"===H.substring(0,5)&&this.model.isVertex(b)){var G=this.getCellGeometry(b);-null!=G&&(B=G.width,5<H.length&&(B=Editor.toUnit(B,T[H.substring(6)])))}else if("height"==H.substring(0,6)&&this.model.isVertex(b))G=this.getCellGeometry(b),null!=G&&(B=G.height,6<H.length&&(B=Editor.toUnit(B,T[H.substring(7)])));else if("length"==H.substring(0,6)){for(G=b;null!=G&&!this.model.isEdge(G);)G=this.model.getParent(G);G=this.view.getState(G);null!=G&&(B=Math.round(G.length/this.view.scale),6<H.length&&(B=Editor.toUnit(B,T[H.substring(7)])))}else if(0>H.indexOf("{"))for(T=b;null==B&&null!=-T;)null!=T.value&&"object"==typeof T.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(B=T.getAttribute(H+"_"+Graph.diagramLanguage)),null==B&&(B=T.hasAttribute(H)?null!=T.getAttribute(H)?T.getAttribute(H):"":null)),T=this.model.getParent(T);null==B&&(B=this.getGlobalVariable(H));null==B&&null!=g&&(B=g[H])}m.push(e.substring(u,match.index)+(null!=B?B:p));u=match.index+p.length}}m.push(e.substring(u))}return m.join("")};+Graph.prototype.replacePlaceholders=function(b,e,g,m){m=[];if(null!=e){for(var u=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var B=null;if(match.index>u&&"%"==e.charAt(match.index-1))B=p.substring(1);else{var H=p.substring(1,p.length-1),S={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==H)B=b.id;else if("width"===H.substring(0,5)&&this.model.isVertex(b)){var G=this.getCellGeometry(b);+null!=G&&(B=G.width,5<H.length&&(B=Editor.toUnit(B,S[H.substring(6)])))}else if("height"==H.substring(0,6)&&this.model.isVertex(b))G=this.getCellGeometry(b),null!=G&&(B=G.height,6<H.length&&(B=Editor.toUnit(B,S[H.substring(7)])));else if("length"==H.substring(0,6)){for(G=b;null!=G&&!this.model.isEdge(G);)G=this.model.getParent(G);G=this.view.getState(G);null!=G&&(B=Math.round(G.length/this.view.scale),6<H.length&&(B=Editor.toUnit(B,S[H.substring(7)])))}else if(0>H.indexOf("{"))for(S=b;null==B&&null!=+S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(B=S.getAttribute(H+"_"+Graph.diagramLanguage)),null==B&&(B=S.hasAttribute(H)?null!=S.getAttribute(H)?S.getAttribute(H):"":null)),S=this.model.getParent(S);null==B&&(B=this.getGlobalVariable(H));null==B&&null!=g&&(B=g[H])}m.push(e.substring(u,match.index)+(null!=B?B:p));u=match.index+p.length}}m.push(e.substring(u))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],g=0;g<b.length;g++){var m=this.model.getCell(b[g].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()};Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};-Graph.prototype.selectTableRange=function(b,e){var g=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),u=this.model.getParent(m),p=this.model.getParent(e);if(u==this.model.getParent(p)){b=m.getIndex(b);m=u.getIndex(m);var B=p.getIndex(e),H=u.getIndex(p);p=Math.max(m,H);e=Math.min(b,B);b=Math.max(b,B);B=[];for(m=Math.min(m,H);m<=p;m++){H=this.model.getChildAt(u,m);for(var T=e;T<=b;T++)B.push(this.model.getChildAt(H,T))}0<B.length&&(1<B.length||1<this.getSelectionCount()||+Graph.prototype.selectTableRange=function(b,e){var g=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),u=this.model.getParent(m),p=this.model.getParent(e);if(u==this.model.getParent(p)){b=m.getIndex(b);m=u.getIndex(m);var B=p.getIndex(e),H=u.getIndex(p);p=Math.max(m,H);e=Math.min(b,B);b=Math.max(b,B);B=[];for(m=Math.min(m,H);m<=p;m++){H=this.model.getChildAt(u,m);for(var S=e;S<=b;S++)B.push(this.model.getChildAt(H,S))}0<B.length&&(1<B.length||1<this.getSelectionCount()||!this.isCellSelected(B[0]))&&(this.setSelectionCells(B),g=!0)}}return g};Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var g=0;g<b.length;g++){var m=b[g],u=this.getCellGeometry(m);if(null!=u){u=u.clone();if(this.getModel().isVertex(m))u.x=Math.round(u.x/e)*e,u.y=Math.round(u.y/e)*e,u.width=Math.round(u.width/e)*e,u.height=Math.round(u.height/e)*e;else if(this.getModel().isEdge(m)&&null!=u.points)for(var p=0;p<u.points.length;p++)u.points[p].x=Math.round(u.points[p].x/e)*e,u.points[p].y=Math.round(u.points[p].y/e)*e;this.getModel().setGeometry(m,u)}}}finally{this.getModel().endUpdate()}};Graph.prototype.removeChildCells=function(b){this.model.beginUpdate();try{for(var e=this.model.getChildCount(b);0<=e;e--)this.model.remove(this.model.getChildAt(b,e))}finally{this.model.endUpdate()}};@@ -2426,13 +2426,13 @@ Graph.prototype.updateShapes=function(b,e,g){this.model.beginUpdate();try{var m=this.model.isEdge(b)&&this.model.isEdge(e[p]))if(g){var B=this.model.getStyle(e[p]);if(null!=B){var H=B.split(";");0<H.length&&0>H[0].indexOf("=")&&(H=H.slice(1));this.model.setStyle(e[p],H.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[e[p]]);this.setCellStyles("points",null,[e[p]]);this.pasteStyle(u,[e[p]],null,!0)}else u=this.copyStyle(e[p]),this.model.setStyle(e[p],m),this.pasteStyle(u,[e[p]]);"1"==mxUtils.getValue(this.getCellStyle(e[p],!1),"composite","0")&&this.removeChildCells(e[p])}}finally{this.model.endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,g){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=g&&(mxEvent.isTouchEvent(e)?g.update(g.getState(this.view.getState(b[1]))):g.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};Graph.prototype.insertEdgeBeforeCell=function(b,e){for(var g=e;null!=g.parent&&null!=g.geometry&&g.geometry.relative&&g.parent!=b.parent;)g=this.model.getParent(g);null!=g&&null!=g.parent&&g.parent==b.parent&&(e=g.parent.getIndex(g),this.model.add(g.parent,b,e))};-Graph.prototype.connectVertex=function(b,e,g,m,u,p,B,H){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var T=this.isCloneConnectSource(b),G=T?b:this.getCompositeParent(b),P=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(G.geometry.x,G.geometry.y);e==mxConstants.DIRECTION_NORTH?(P.x+=G.geometry.width/2,P.y-=g):e==-mxConstants.DIRECTION_SOUTH?(P.x+=G.geometry.width/2,P.y+=G.geometry.height+g):(P.x=e==mxConstants.DIRECTION_WEST?P.x-g:P.x+(G.geometry.width+g),P.y+=G.geometry.height/2);var R=this.view.getState(this.model.getParent(b));g=this.view.scale;var c=this.view.translate;G=c.x*g;c=c.y*g;null!=R&&this.model.isVertex(R.cell)&&(G=R.x,c=R.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(P.x+=b.parent.geometry.x,P.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(G+P.x*g,c+P.y*g)).grow(40*g);p=null!=p?-this.getCells(0,0,0,0,null,null,p,null,!0):null;R=this.view.getState(b);var f=null,l=null;if(null!=p){p=p.reverse();for(var t=0;t<p.length;t++)if(!this.isCellLocked(p[t])&&!this.model.isEdge(p[t])&&p[t]!=b)if(!this.model.isAncestor(b,p[t])&&this.isContainer(p[t])&&(null==f||p[t]==this.model.getParent(b)))f=p[t];else if(null==l&&this.isCellConnectable(p[t])&&!this.model.isAncestor(p[t],b)&&!this.isSwimlane(p[t])){var z=this.view.getState(p[t]);null==R||null==z||mxUtils.intersects(R,z)||(l=p[t])}}var C=-!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||u;C&&("1"!=urlParams.sketch||u)&&(e==mxConstants.DIRECTION_NORTH?P.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?P.y+=b.geometry.height/2:P.x=e==mxConstants.DIRECTION_WEST?P.x-b.geometry.width/2:P.x+b.geometry.width/2);var F=[],N=l;l=f;u=mxUtils.bind(this,function(K){if(null==B||null!=K||null==l&&T){this.model.beginUpdate();try{if(null==N&&C){var J=this.getAbsoluteParent(null!=K?K:b);J=T?b:this.getCompositeParent(J);N=null!=K?K:this.duplicateCells([J],-!1)[0];null!=K&&this.addCells([N],this.model.getParent(b),null,null,null,!0);var da=this.getCellGeometry(N);null!=da&&(null!=K&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?P.y-=da.height/2:e==mxConstants.DIRECTION_SOUTH?P.y+=da.height/2:P.x=e==mxConstants.DIRECTION_WEST?P.x-da.width/2:P.x+da.width/2),da.x=P.x-da.width/2,da.y=P.y-da.height/2);null!=f?(this.addCells([N],f,null,null,null,!0),l=null):C&&!T&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var ea=mxEvent.isControlDown(m)&&-mxEvent.isShiftDown(m)&&C||null==l&&T?null:this.insertEdge(this.model.getParent(b),null,"",b,N,this.createCurrentEdgeStyle());null!=ea&&(F.push(ea),this.applyNewEdgeStyle(b,[ea],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ea,b));if(null==l&&null!=N&&null!=b.parent&&T&&e==mxConstants.DIRECTION_WEST){var ca=b.parent.getIndex(b);this.model.add(b.parent,N,ca)}null==l&&null!=N&&F.push(N);null==N&&null!=ea&&ea.geometry.setTerminalPoint(P,!1);null!=ea&&this.fireEvent(new mxEventObject("cellsInserted",-"cells",[ea]))}finally{this.model.endUpdate()}}if(null!=H)H(F);else return F});if(null==B||null!=N||!C||null==l&&T)return u(N);B(G+P.x*g,c+P.y*g,u)};+Graph.prototype.connectVertex=function(b,e,g,m,u,p,B,H){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),G=S?b:this.getCompositeParent(b),P=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(G.geometry.x,G.geometry.y);e==mxConstants.DIRECTION_NORTH?(P.x+=G.geometry.width/2,P.y-=g):e==+mxConstants.DIRECTION_SOUTH?(P.x+=G.geometry.width/2,P.y+=G.geometry.height+g):(P.x=e==mxConstants.DIRECTION_WEST?P.x-g:P.x+(G.geometry.width+g),P.y+=G.geometry.height/2);var Q=this.view.getState(this.model.getParent(b));g=this.view.scale;var c=this.view.translate;G=c.x*g;c=c.y*g;null!=Q&&this.model.isVertex(Q.cell)&&(G=Q.x,c=Q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(P.x+=b.parent.geometry.x,P.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(G+P.x*g,c+P.y*g)).grow(40*g);p=null!=p?+this.getCells(0,0,0,0,null,null,p,null,!0):null;Q=this.view.getState(b);var f=null,l=null;if(null!=p){p=p.reverse();for(var t=0;t<p.length;t++)if(!this.isCellLocked(p[t])&&!this.model.isEdge(p[t])&&p[t]!=b)if(!this.model.isAncestor(b,p[t])&&this.isContainer(p[t])&&(null==f||p[t]==this.model.getParent(b)))f=p[t];else if(null==l&&this.isCellConnectable(p[t])&&!this.model.isAncestor(p[t],b)&&!this.isSwimlane(p[t])){var z=this.view.getState(p[t]);null==Q||null==z||mxUtils.intersects(Q,z)||(l=p[t])}}var C=+!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||u;C&&("1"!=urlParams.sketch||u)&&(e==mxConstants.DIRECTION_NORTH?P.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?P.y+=b.geometry.height/2:P.x=e==mxConstants.DIRECTION_WEST?P.x-b.geometry.width/2:P.x+b.geometry.width/2);var F=[],N=l;l=f;u=mxUtils.bind(this,function(K){if(null==B||null!=K||null==l&&S){this.model.beginUpdate();try{if(null==N&&C){var J=this.getAbsoluteParent(null!=K?K:b);J=S?b:this.getCompositeParent(J);N=null!=K?K:this.duplicateCells([J],+!1)[0];null!=K&&this.addCells([N],this.model.getParent(b),null,null,null,!0);var da=this.getCellGeometry(N);null!=da&&(null!=K&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?P.y-=da.height/2:e==mxConstants.DIRECTION_SOUTH?P.y+=da.height/2:P.x=e==mxConstants.DIRECTION_WEST?P.x-da.width/2:P.x+da.width/2),da.x=P.x-da.width/2,da.y=P.y-da.height/2);null!=f?(this.addCells([N],f,null,null,null,!0),l=null):C&&!S&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var ea=mxEvent.isControlDown(m)&&+mxEvent.isShiftDown(m)&&C||null==l&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,N,this.createCurrentEdgeStyle());null!=ea&&(F.push(ea),this.applyNewEdgeStyle(b,[ea],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ea,b));if(null==l&&null!=N&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST){var ca=b.parent.getIndex(b);this.model.add(b.parent,N,ca)}null==l&&null!=N&&F.push(N);null==N&&null!=ea&&ea.geometry.setTerminalPoint(P,!1);null!=ea&&this.fireEvent(new mxEventObject("cellsInserted",+"cells",[ea]))}finally{this.model.endUpdate()}}if(null!=H)H(F);else return F});if(null==B||null!=N||!C||null==l&&S)return u(N);B(G+P.x*g,c+P.y*g,u)};Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),g=[],m,u=0;u<b.length;u++)if(m=b[u],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=Graph.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&g.push(m);return g.join(" ")};Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var g=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==g&&null!=m;)null!=m.value&&"object"==typeof m.value&&(g=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else g=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(g=e.getAttribute("label_"+Graph.diagramLanguage)),null==g&&(g=e.getAttribute("label")||"");return g||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b,e){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),e||(b=mxUtils.removeJavascriptProtocol(b)),b):null};@@ -2443,8 +2443,8 @@ mxConstants.STYLE_IMAGE_BACKGROUND,b);this.replaceDefaultColor(e,mxConstants.STYGraph.prototype.getDefaultColor=function(b,e,g){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(b=mxUtils.getLightDarkColor(g),g="light-dark("+b.dark+", "+b.light+")");return g};Graph.prototype.setAdaptiveColors=function(b){this.adaptiveColors="default"==b?null:b;"1"==urlParams.embedInline?null!=this.container&&(this.container.style.colorScheme="none"==this.getAdaptiveColors()?"light":""):(b=this.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.colorScheme="none"==this.getAdaptiveColors()?"light":""))};Graph.prototype.getAdaptiveColors=function(){return null!=this.adaptiveColors?this.adaptiveColors:Graph.defaultAdaptiveColors};Graph.prototype.updateAlternateBounds=function(b,e,g){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var m=this.layoutManager.getLayout(this.model.getParent(b));null!=m&&m.constructor==mxStackLayout&&(m.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};-Graph.prototype.foldCells=function(b,e,g,m,u){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<g.length;p++){var B=this.view.getState(g[p]),H=this.getCellGeometry(g[p]);if(null!=B&&null!=H){var T=0,G=0;if(H.alternateBounds)T=H.width-H.alternateBounds.width,G=H.height-H.alternateBounds.height;else{var P=this.useCssTransforms?1:this.view.scale;-T=Math.round(H.width-B.width/P);G=Math.round(H.height-B.height/P)}if(0!=G||0!=T){var R=this.model.getParent(g[p]),c=this.layoutManager.getLayout(R);null==c?null!=u&&this.isMoveCellsEvent(u,B)&&this.moveSiblings(B,R,T,G):null!=u&&mxEvent.isAltDown(u)||c.constructor!=mxStackLayout||c.resizeLast||this.resizeParentStacks(R,c,T,G)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};+Graph.prototype.foldCells=function(b,e,g,m,u){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<g.length;p++){var B=this.view.getState(g[p]),H=this.getCellGeometry(g[p]);if(null!=B&&null!=H){var S=0,G=0;if(H.alternateBounds)S=H.width-H.alternateBounds.width,G=H.height-H.alternateBounds.height;else{var P=this.useCssTransforms?1:this.view.scale;+S=Math.round(H.width-B.width/P);G=Math.round(H.height-B.height/P)}if(0!=G||0!=S){var Q=this.model.getParent(g[p]),c=this.layoutManager.getLayout(Q);null==c?null!=u&&this.isMoveCellsEvent(u,B)&&this.moveSiblings(B,Q,S,G):null!=u&&mxEvent.isAltDown(u)||c.constructor!=mxStackLayout||c.resizeLast||this.resizeParentStacks(Q,c,S,G)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};Graph.prototype.moveSiblings=function(b,e,g,m){this.model.beginUpdate();try{var u=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<u.length;e++)if(u[e]!=b.cell){var p=this.view.getState(u[e]),B=this.getCellGeometry(u[e]);null!=p&&null!=B&&(B=B.clone(),B.translate(Math.round(g*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(u[e],B))}}finally{this.model.endUpdate()}};Graph.prototype.resizeParentStacks=function(b,e,g,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var u=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==u&&!e.resizeLast;){var p=this.getCellGeometry(b),B=this.view.getState(b);null!=B&&null!=p&&(p=p.clone(),e.horizontal?p.width+=g+Math.min(0,B.width/this.view.scale-p.width):p.height+=m+Math.min(0,B.height/this.view.scale-p.height),this.model.setGeometry(b,p));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return!this.isCellLocked(this.getLayerForCell(b))&&(null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments))};@@ -2486,10 +2486,10 @@ HoverIcons.prototype.click=function(b,e,g){var m=g.getEvent(),u=g.getGraphX(),p=HoverIcons.prototype.execute=function(b,e,g){g=g.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,g,this.graph.isCloneEvent(g),this.graph.isCloneEvent(g)),g,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var g=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&-(g=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(H,T,G){if(null!=g){var P=new mxRectangle(T,G,H.clientWidth,H.clientHeight);mxUtils.intersects(P,g)&&(H==this.arrowUp?G-=P.y+P.height-g.y:H==this.arrowRight?T+=g.x+g.width-P.x:H==this.arrowDown?G+=g.y+g.height-P.y:H==this.arrowLeft&&(T-=P.x+P.width-g.x))}H.style.left=T+"px";H.style.top=G+"px";mxUtils.setOpacity(H,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-+(g=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(H,S,G){if(null!=g){var P=new mxRectangle(S,G,H.clientWidth,H.clientHeight);mxUtils.intersects(P,g)&&(H==this.arrowUp?G-=P.y+P.height-g.y:H==this.arrowRight?S+=g.x+g.width-P.x:H==this.arrowDown?G+=g.y+g.height-P.y:H==this.arrowLeft&&(S-=P.x+P.width-g.x))}H.style.left=S+"px";H.style.top=G+"px";mxUtils.setOpacity(H,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());-var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),u=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==u&&u==b&&(b=u=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),B=mxUtils.bind(this,function(H,T){var G=this.graph.model.isVertex(H)&&this.graph.getCellGeometry(H);null==H||this.graph.model.isAncestor(H,-this.currentState.cell)||this.graph.isSwimlane(H)||!(null==G||null==p||G.height<3*p.height&&G.width<3*p.width)?T.style.visibility="visible":T.style.visibility="hidden"});B(e,this.arrowRight);B(m,this.arrowLeft);B(u,this.arrowUp);B(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),+var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),u=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==u&&u==b&&(b=u=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),B=mxUtils.bind(this,function(H,S){var G=this.graph.model.isVertex(H)&&this.graph.getCellGeometry(H);null==H||this.graph.model.isAncestor(H,+this.currentState.cell)||this.graph.isSwimlane(H)||!(null==G||null==p||G.height<3*p.height&&G.width<3*p.width)?S.style.visibility="visible":S.style.visibility="hidden"});B(e,this.arrowRight);B(m,this.arrowLeft);B(u,this.arrowUp);B(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(e){null!=e.parentNode&&(e=new mxRectangle(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight),null==b?b=e:b.add(e))});return b};HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var e=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(b=e)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};@@ -2499,43 +2499,43 @@ b||null==this.bbox||null==e||null==g||!mxUtils.contains(this.bbox,e,g))&&(null!=HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.removeTextStyleForCell=function(b,e){var g=this.getCurrentCellStyle(b),m=!1;this.getModel().beginUpdate();try{if("1"==mxUtils.getValue(g,"html","0")){var u=this.convertValueToString(b);"0"!=mxUtils.getValue(g,"nl2Br","1")&&(u=u.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));u=Editor.convertHtmlToText(u);this.cellLabelChanged(b,u);m=!0}e&&(this.setCellStyles("fontSource",null,[b]),this.setCellStyles(mxConstants.STYLE_FONTFAMILY,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSIZE,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSTYLE,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BORDERCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null,[b]))}finally{this.getModel().endUpdate()}return m};Graph.prototype.createParent=function(b,e,g,m,u){b=this.cloneCell(b);for(var p=0;p<g;p++){var B=this.cloneCell(e),H=this.getCellGeometry(B);null!=H&&(H.x+=p*m,H.y+=p*u);b.insert(B)}return b};-Graph.prototype.createTable=function(b,e,g,m,u,p,B,H,T){g=null!=g?g:60;m=null!=m?m:40;p=null!=p?p:30;H=null!=H?H:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";T=null!=T?T:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,-null,null!=u?u:"",0,0,e*g,b*m+(null!=u?p:0),null!=B?B:"shape=table;startSize="+(null!=u?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*g,m,H),this.createVertex(null,null,"",0,0,g,m,T),e,g,0),b,0,m)};+Graph.prototype.createTable=function(b,e,g,m,u,p,B,H,S){g=null!=g?g:60;m=null!=m?m:40;p=null!=p?p:30;H=null!=H?H:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";S=null!=S?S:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,+null,null!=u?u:"",0,0,e*g,b*m+(null!=u?p:0),null!=B?B:"shape=table;startSize="+(null!=u?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*g,m,H),this.createVertex(null,null,"",0,0,g,m,S),e,g,0),b,0,m)};Graph.prototype.setTableValues=function(b,e,g){for(var m=this.model.getChildCells(b,!0),u=0;u<m.length;u++)if(null!=g&&(m[u].value=g[u]),null!=e)for(var p=this.model.getChildCells(m[u],!0),B=0;B<p.length;B++)null!=e[u][B]&&(p[B].value=e[u][B]);return b};-Graph.prototype.createCrossFunctionalSwimlane=function(b,e,g,m,u,p,B,H,T){g=null!=g?g:120;m=null!=m?m:120;B=null!=B?B:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";H=null!=H?H:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";-T=null!=T?T:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";u=this.createVertex(null,null,null!=u?u:"",0,0,e*g,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==u?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(u),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);u.geometry.width+=p;u.geometry.height+=-p;B=this.createVertex(null,null,"",0,p,e*g+p,m,B);u.insert(this.createParent(B,this.createVertex(null,null,"",p,0,g,m,H),e,g,0));return 1<b?(B.geometry.y=m+p,this.createParent(u,this.createParent(B,this.createVertex(null,null,"",p,0,g,m,T),e,g,0),b-1,0,m)):u};-Graph.prototype.visitTableCells=function(b,e){var g=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var u=0;u<m.length;u++){for(var p=this.getActualStartSize(m[u],!0),B=this.model.getChildCells(m[u],!0),H=this.getCellStyle(m[u],!0),T=null,G=[],P=0;P<B.length;P++){var R=this.getCellGeometry(B[P]),c={cell:B[P],rospan:1,colspan:1,row:u,col:P,geo:R};R=null!=R.alternateBounds?R.alternateBounds:R;c.point=new mxPoint(R.width+(null!=T?T.point.x:b.x+p.x),R.height+(null!=g&&null!=-g[0]?g[0].point.y:b.y+p.y));c.actual=c;null!=g&&null!=g[P]&&1<g[P].rowspan?(c.rowspan=g[P].rowspan-1,c.colspan=g[P].colspan,c.actual=g[P].actual):null!=T&&1<T.colspan?(c.rowspan=T.rowspan,c.colspan=T.colspan-1,c.actual=T.actual):(T=this.getCurrentCellStyle(B[P],!0),null!=T&&(c.rowspan=parseInt(T.rowspan||1),c.colspan=parseInt(T.colspan||1)));T=1==mxUtils.getValue(H,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(H,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(c,B.length,-m.length,b.x+(T?p.x:0),b.y+(T?p.y:0));G.push(c);T=c}g=G}};Graph.prototype.getTableLines=function(b,e,g){var m=[],u=[];(e||g)&&this.visitTableCells(b,mxUtils.bind(this,function(p,B,H,T,G){e&&p.row<H-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(T,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));g&&p.col<B-1&&(null==u[p.col]&&(u[p.col]=[new mxPoint(p.point.x,G)]),1<p.colspan&&u[p.col].push(null),u[p.col].push(p.point))}));return m.concat(u)};+Graph.prototype.createCrossFunctionalSwimlane=function(b,e,g,m,u,p,B,H,S){g=null!=g?g:120;m=null!=m?m:120;B=null!=B?B:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";H=null!=H?H:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";+S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";u=this.createVertex(null,null,null!=u?u:"",0,0,e*g,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==u?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(u),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);u.geometry.width+=p;u.geometry.height+=+p;B=this.createVertex(null,null,"",0,p,e*g+p,m,B);u.insert(this.createParent(B,this.createVertex(null,null,"",p,0,g,m,H),e,g,0));return 1<b?(B.geometry.y=m+p,this.createParent(u,this.createParent(B,this.createVertex(null,null,"",p,0,g,m,S),e,g,0),b-1,0,m)):u};+Graph.prototype.visitTableCells=function(b,e){var g=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var u=0;u<m.length;u++){for(var p=this.getActualStartSize(m[u],!0),B=this.model.getChildCells(m[u],!0),H=this.getCellStyle(m[u],!0),S=null,G=[],P=0;P<B.length;P++){var Q=this.getCellGeometry(B[P]),c={cell:B[P],rospan:1,colspan:1,row:u,col:P,geo:Q};Q=null!=Q.alternateBounds?Q.alternateBounds:Q;c.point=new mxPoint(Q.width+(null!=S?S.point.x:b.x+p.x),Q.height+(null!=g&&null!=+g[0]?g[0].point.y:b.y+p.y));c.actual=c;null!=g&&null!=g[P]&&1<g[P].rowspan?(c.rowspan=g[P].rowspan-1,c.colspan=g[P].colspan,c.actual=g[P].actual):null!=S&&1<S.colspan?(c.rowspan=S.rowspan,c.colspan=S.colspan-1,c.actual=S.actual):(S=this.getCurrentCellStyle(B[P],!0),null!=S&&(c.rowspan=parseInt(S.rowspan||1),c.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(H,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(H,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(c,B.length,+m.length,b.x+(S?p.x:0),b.y+(S?p.y:0));G.push(c);S=c}g=G}};Graph.prototype.getTableLines=function(b,e,g){var m=[],u=[];(e||g)&&this.visitTableCells(b,mxUtils.bind(this,function(p,B,H,S,G){e&&p.row<H-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(S,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));g&&p.col<B-1&&(null==u[p.col]&&(u[p.col]=[new mxPoint(p.point.x,G)]),1<p.colspan&&u[p.col].push(null),u[p.col].push(p.point))}));return m.concat(u)};Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};-Graph.prototype.setTableRowHeight=function(b,e,g){g=null!=g?g:!0;var m=this.getModel();m.beginUpdate();try{var u=this.getCellGeometry(b);if(null!=u){u=u.clone();u.height+=e;m.setGeometry(b,u);var p=m.getParent(b),B=m.getChildCells(p,!0);if(!g){var H=mxUtils.indexOf(B,b);if(H<B.length-1){var T=B[H+1],G=this.getCellGeometry(T);null!=G&&(G=G.clone(),G.y+=e,G.height-=e,m.setGeometry(T,G))}}var P=this.getCellGeometry(p);null!=P&&(g||(g=b==B[B.length-1]),g&&(P=P.clone(),P.height+=e,m.setGeometry(p,P)))}}finally{m.endUpdate()}};-Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var m=this.getModel(),u=m.getParent(b),p=m.getParent(u),B=m.getChildCells(u,!0);b=mxUtils.indexOf(B,b);var H=b==B.length-1;m.beginUpdate();try{for(var T=m.getChildCells(p,!0),G=0;G<T.length;G++){u=T[G];B=m.getChildCells(u,!0);var P=B[b],R=this.getCellGeometry(P);null!=R&&(R=R.clone(),R.width+=e,null!=R.alternateBounds&&(R.alternateBounds.width+=e),m.setGeometry(P,R));b<B.length-1&&(P=B[b+1],R=this.getCellGeometry(P),null!=R&&(R=R.clone(),-R.x+=e,g||(R.width-=e,null!=R.alternateBounds&&(R.alternateBounds.width-=e)),m.setGeometry(P,R)))}if(H||g){var c=this.getCellGeometry(p);null!=c&&(c=c.clone(),c.width+=e,m.setGeometry(p,c))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};+Graph.prototype.setTableRowHeight=function(b,e,g){g=null!=g?g:!0;var m=this.getModel();m.beginUpdate();try{var u=this.getCellGeometry(b);if(null!=u){u=u.clone();u.height+=e;m.setGeometry(b,u);var p=m.getParent(b),B=m.getChildCells(p,!0);if(!g){var H=mxUtils.indexOf(B,b);if(H<B.length-1){var S=B[H+1],G=this.getCellGeometry(S);null!=G&&(G=G.clone(),G.y+=e,G.height-=e,m.setGeometry(S,G))}}var P=this.getCellGeometry(p);null!=P&&(g||(g=b==B[B.length-1]),g&&(P=P.clone(),P.height+=e,m.setGeometry(p,P)))}}finally{m.endUpdate()}};+Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var m=this.getModel(),u=m.getParent(b),p=m.getParent(u),B=m.getChildCells(u,!0);b=mxUtils.indexOf(B,b);var H=b==B.length-1;m.beginUpdate();try{for(var S=m.getChildCells(p,!0),G=0;G<S.length;G++){u=S[G];B=m.getChildCells(u,!0);var P=B[b],Q=this.getCellGeometry(P);null!=Q&&(Q=Q.clone(),Q.width+=e,null!=Q.alternateBounds&&(Q.alternateBounds.width+=e),m.setGeometry(P,Q));b<B.length-1&&(P=B[b+1],Q=this.getCellGeometry(P),null!=Q&&(Q=Q.clone(),+Q.x+=e,g||(Q.width-=e,null!=Q.alternateBounds&&(Q.alternateBounds.width-=e)),m.setGeometry(P,Q)))}if(H||g){var c=this.getCellGeometry(p);null!=c&&(c=c.clone(),c.width+=e,m.setGeometry(p,c))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var g=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var u=this.graph.getCellGeometry(b[m]);null!=u&&(g+=e?u.width:u.height)}return g};TableLayout.prototype.getRowLayout=function(b,e){var g=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(g,!0);e=e-m.x-m.width;var u=[];m=m.x;for(var p=0;p<g.length;p++){var B=this.graph.getCellGeometry(g[p]);null!=B&&(m+=(null!=B.alternateBounds?B.alternateBounds.width:B.width)*e/b,u.push(Math.round(m)))}return u};-TableLayout.prototype.layoutRow=function(b,e,g,m){var u=this.graph.getModel(),p=u.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var B=b.x,H=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var T=0;T<p.length;T++){var G=this.graph.getCellGeometry(p[T]);null!=G&&(G=G.clone(),G.y=b.y,G.height=g-b.y-b.height,null!=e?(G.x=e[T],G.width=e[T+1]-G.x,T==p.length-1&&T<e.length-2&&(G.width=m-G.x-b.x-b.width)):(G.x=B,B+=G.width,T==p.length-1?G.width=m-b.x-b.width-H:H+=G.width),G.alternateBounds=new mxRectangle(0,-0,G.width,G.height),u.setGeometry(p[T],G))}return H};-TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),u="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var B=this.graph.getModel(),H=0;B.beginUpdate();try{for(var T=g.height-e.y-e.height,G=g.width-e.x-e.width,P=B.getChildCells(b,!0),R=0;R<P.length;R++)B.setVisible(P[R],!0);var c=this.getSize(P,!1);if(0<T&&0<G&&0<-P.length&&0<c){if(u){var f=this.graph.getCellGeometry(P[P.length-1]);null!=f&&(f=f.clone(),f.height=T-c+f.height,B.setGeometry(P[P.length-1],f))}var l=p?null:this.getRowLayout(P[0],G),t=[],z=e.y;for(R=0;R<P.length;R++)f=this.graph.getCellGeometry(P[R]),null!=f&&(f=f.clone(),f.x=e.x,f.width=G,f.y=Math.round(z),z=u||m?z+f.height:z+f.height/c*T,f.height=Math.round(z)-f.y,B.setGeometry(P[R],f)),H=Math.max(H,this.layoutRow(P[R],l,f.height,G,t));m&&T<c&&(g=g.clone(),g.height=z+e.height,B.setGeometry(b,-g));p&&G<H+Graph.minTableColumnWidth&&(g=g.clone(),g.width=H+e.width+e.x+Graph.minTableColumnWidth,B.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(C){B.setVisible(C.cell,C.actual.cell==C.cell);if(C.actual.cell!=C.cell){if(C.actual.row==C.row){var F=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo;C.actual.geo.width+=F.width}C.actual.col==C.col&&(F=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo,C.actual.geo.height+=F.height)}}))}else for(R=0;R<P.length;R++)B.setVisible(P[R],+TableLayout.prototype.layoutRow=function(b,e,g,m){var u=this.graph.getModel(),p=u.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var B=b.x,H=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var S=0;S<p.length;S++){var G=this.graph.getCellGeometry(p[S]);null!=G&&(G=G.clone(),G.y=b.y,G.height=g-b.y-b.height,null!=e?(G.x=e[S],G.width=e[S+1]-G.x,S==p.length-1&&S<e.length-2&&(G.width=m-G.x-b.x-b.width)):(G.x=B,B+=G.width,S==p.length-1?G.width=m-b.x-b.width-H:H+=G.width),G.alternateBounds=new mxRectangle(0,+0,G.width,G.height),u.setGeometry(p[S],G))}return H};+TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),u="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var B=this.graph.getModel(),H=0;B.beginUpdate();try{for(var S=g.height-e.y-e.height,G=g.width-e.x-e.width,P=B.getChildCells(b,!0),Q=0;Q<P.length;Q++)B.setVisible(P[Q],!0);var c=this.getSize(P,!1);if(0<S&&0<G&&0<+P.length&&0<c){if(u){var f=this.graph.getCellGeometry(P[P.length-1]);null!=f&&(f=f.clone(),f.height=S-c+f.height,B.setGeometry(P[P.length-1],f))}var l=p?null:this.getRowLayout(P[0],G),t=[],z=e.y;for(Q=0;Q<P.length;Q++)f=this.graph.getCellGeometry(P[Q]),null!=f&&(f=f.clone(),f.x=e.x,f.width=G,f.y=Math.round(z),z=u||m?z+f.height:z+f.height/c*S,f.height=Math.round(z)-f.y,B.setGeometry(P[Q],f)),H=Math.max(H,this.layoutRow(P[Q],l,f.height,G,t));m&&S<c&&(g=g.clone(),g.height=z+e.height,B.setGeometry(b,+g));p&&G<H+Graph.minTableColumnWidth&&(g=g.clone(),g.width=H+e.width+e.x+Graph.minTableColumnWidth,B.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(C){B.setVisible(C.cell,C.actual.cell==C.cell);if(C.actual.cell!=C.cell){if(C.actual.row==C.row){var F=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo;C.actual.geo.width+=F.width}C.actual.col==C.col&&(F=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo,C.actual.geo.height+=F.height)}}))}else for(Q=0;Q<P.length;Q++)B.setVisible(P[Q],!1)}finally{B.endUpdate()}}};-(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(R,c){c=null!=c?c:!0;var f=this.getState(R);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&!f.invalid&&this.updateLineJumps(f)&&this.graph.cellRenderer.redraw(f,!1,this.isRendering());f=e.apply(this,-arguments);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var R=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=-R)for(var c=0;c<R.length;c++)if("hidden"!=R[c].getAttribute("visibility"))return R[c];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(R){g.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var m=mxShape.prototype.createSvgCanvas;-mxShape.prototype.createSvgCanvas=function(R){R=m.apply(this,arguments);null!=this.state&&(R.adaptiveColors=this.state.view.graph.getAdaptiveColors());return R};var u=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(R,c){return u.apply(this,arguments)||null!=R.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,R.routedPoints)};var p=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(R){p.apply(this,arguments);-this.graph.model.isEdge(R.cell)&&1!=R.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(R)};mxGraphView.prototype.updateLineJumps=function(R){var c=R.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=R.routedPoints,l=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(R.style,"jumpStyle","none")){var t=function(Y,ma,Z){var k=new mxPoint(ma,Z);k.type=Y;l.push(k);k=null!=R.routedPoints?R.routedPoints[l.length-1]:null;return null==k||k.type!=Y||k.x!=ma||k.y!=Z},z=.5*this.scale;-f=!1;l=[];for(var C=0;C<c.length-1;C++){for(var F=c[C+1],N=c[C],K=[],J=c[C+2];C<c.length-2&&mxUtils.ptSegDistSq(N.x,N.y,J.x,J.y,F.x,F.y)<1*this.scale*this.scale;)F=J,C++,J=c[C+2];f=t(0,N.x,N.y)||f;for(var da=0;da<this.validEdges.length;da++){var ea=this.validEdges[da],ca=ea.absolutePoints;if(null!=ca&&mxUtils.intersects(R,ea)&&"1"!=ea.style.noJump){var W=null;for(ea=0;ea<ca.length-1;ea++){var ba=ca[ea+1],ha=ca[ea];for(J=ca[ea+2];ea<ca.length-2&&mxUtils.ptSegDistSq(ha.x,ha.y,J.x,J.y,ba.x,ba.y)<1*this.scale*-this.scale;)ba=J,ea++,J=ca[ea+2];var la=mxUtils.intersection(N.x,N.y,F.x,F.y,ha.x,ha.y,ba.x,ba.y);if(null!=la&&(Math.abs(la.x-N.x)>z||Math.abs(la.y-N.y)>z)&&(Math.abs(la.x-F.x)>z||Math.abs(la.y-F.y)>z)&&(null==W||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,W.x,W.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ha.x,ha.y)>z)&&(null==J||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,J.x,J.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ba.x,ba.y)>z)){J=la.x-N.x;W=la.y-N.y;la={distSq:J*J+W*W,x:la.x,y:la.y};for(J=0;J<K.length;J++)if(K[J].distSq>-la.distSq){K.splice(J,0,la);la=null;break}null==la||0!=K.length&&K[K.length-1].x===la.x&&K[K.length-1].y===la.y||K.push(la)}W=ha}}}for(ea=0;ea<K.length;ea++)f=t(1,K[ea].x,K[ea].y)||f}la=c[c.length-1];f=t(0,la.x,la.y)||f}R.routedPoints=l;return f}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(R,c,f){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)B.apply(this,-arguments);else{var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,t=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,z=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,F=null,N=null,K=[],J=null;R.begin();for(var da=0;da<this.state.routedPoints.length;da++){var ea=this.state.routedPoints[da],ca=new mxPoint(ea.x/this.scale,ea.y/this.scale);0==da?ca=c[0]:da==this.state.routedPoints.length-1&&(ca=c[c.length-1]);var W=-!1;if(null!=F&&1==ea.type){var ba=this.state.routedPoints[da+1];ea=ba.x/this.scale-ca.x;ba=ba.y/this.scale-ca.y;ea=ea*ea+ba*ba;null==J&&(J=new mxPoint(ca.x-F.x,ca.y-F.y),N=Math.sqrt(J.x*J.x+J.y*J.y),0<N?(J.x=J.x*t/N,J.y=J.y*t/N):J=null);ea>t*t&&0<N&&(ea=F.x-ca.x,ba=F.y-ca.y,ea=ea*ea+ba*ba,ea>t*t&&(W=new mxPoint(ca.x-J.x,ca.y-J.y),ea=new mxPoint(ca.x+J.x,ca.y+J.y),K.push(W),this.addPoints(R,K,f,l,!1,null,C),K=0>Math.round(J.x)||0==Math.round(J.x)&&0>=Math.round(J.y)?1:-1,C=!1,"sharp"==z?(R.lineTo(W.x--J.y*K,W.y+J.x*K),R.lineTo(ea.x-J.y*K,ea.y+J.x*K),R.lineTo(ea.x,ea.y)):"line"==z?(R.moveTo(W.x+J.y*K,W.y-J.x*K),R.lineTo(W.x-J.y*K,W.y+J.x*K),R.moveTo(ea.x-J.y*K,ea.y+J.x*K),R.lineTo(ea.x+J.y*K,ea.y-J.x*K),R.moveTo(ea.x,ea.y)):"arc"==z?(K*=1.3,R.curveTo(W.x-J.y*K,W.y+J.x*K,ea.x-J.y*K,ea.y+J.x*K,ea.x,ea.y)):(R.moveTo(ea.x,ea.y),C=!0),K=[ea],W=!0))}else J=null;W||(K.push(ca),F=ca)}this.addPoints(R,K,f,l,!1,null,C);R.stroke()}};var H=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=-function(R,c,f,l){return null!=c&&"centerPerimeter"==c.style[mxConstants.STYLE_PERIMETER]?new mxPoint(c.getCenterX(),c.getCenterY()):H.apply(this,arguments)};var T=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(R,c,f,l){if(null==c||null==R||"1"!=c.style.snapToPoint&&"1"!=R.style.snapToPoint)T.apply(this,arguments);else{c=this.getTerminalPort(R,c,l);var t=this.getNextPoint(R,f,l),z=this.graph.isOrthogonal(R),C=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||-"0")),F=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=C){var N=Math.cos(-C),K=Math.sin(-C);t=mxUtils.getRotatedPoint(t,N,K,F)}N=parseFloat(R.style[mxConstants.STYLE_PERIMETER_SPACING]||0);N+=parseFloat(R.style[l?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);t=this.getPerimeterPoint(c,t,0==C&&z,N);0!=C&&(N=Math.cos(C),K=Math.sin(C),t=mxUtils.getRotatedPoint(t,N,K,F));R.setAbsoluteTerminalPoint(this.snapToAnchorPoint(R,c,f,l,t),l)}};mxGraphView.prototype.snapToAnchorPoint=-function(R,c,f,l,t){if(null!=c&&null!=R){R=this.graph.getAllConnectionConstraints(c);l=f=null;if(null!=R)for(var z=0;z<R.length;z++){var C=this.graph.getConnectionPoint(c,R[z]);if(null!=C){var F=(C.x-t.x)*(C.x-t.x)+(C.y-t.y)*(C.y-t.y);if(null==l||F<l)f=C,l=F}}null!=f&&(t=f)}return t};var G=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(R,c,f){var l=G.apply(this,arguments);"1"==R.getAttribute("placeholders")&&null!=f.state&&(l=f.state.view.graph.replacePlaceholders(f.state.cell,-l));return l};var P=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(R){if(null!=R.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(R.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"string"===typeof c&&"stencil("==c.substring(0,8))try{var f=c.substring(8,c.length-1),l=mxUtils.parseXml(Graph.decompress(f));return new mxShape(new mxStencil(l.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return P.apply(this,arguments)}})();+(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(Q,c){c=null!=c?c:!0;var f=this.getState(Q);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&!f.invalid&&this.updateLineJumps(f)&&this.graph.cellRenderer.redraw(f,!1,this.isRendering());f=e.apply(this,+arguments);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var Q=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=+Q)for(var c=0;c<Q.length;c++)if("hidden"!=Q[c].getAttribute("visibility"))return Q[c];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){g.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var m=mxShape.prototype.createSvgCanvas;+mxShape.prototype.createSvgCanvas=function(Q){Q=m.apply(this,arguments);null!=this.state&&(Q.adaptiveColors=this.state.view.graph.getAdaptiveColors());return Q};var u=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(Q,c){return u.apply(this,arguments)||null!=Q.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,Q.routedPoints)};var p=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(Q){p.apply(this,arguments);+this.graph.model.isEdge(Q.cell)&&1!=Q.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(Q)};mxGraphView.prototype.updateLineJumps=function(Q){var c=Q.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=Q.routedPoints,l=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(Q.style,"jumpStyle","none")){var t=function(Y,ma,Z){var k=new mxPoint(ma,Z);k.type=Y;l.push(k);k=null!=Q.routedPoints?Q.routedPoints[l.length-1]:null;return null==k||k.type!=Y||k.x!=ma||k.y!=Z},z=.5*this.scale;+f=!1;l=[];for(var C=0;C<c.length-1;C++){for(var F=c[C+1],N=c[C],K=[],J=c[C+2];C<c.length-2&&mxUtils.ptSegDistSq(N.x,N.y,J.x,J.y,F.x,F.y)<1*this.scale*this.scale;)F=J,C++,J=c[C+2];f=t(0,N.x,N.y)||f;for(var da=0;da<this.validEdges.length;da++){var ea=this.validEdges[da],ca=ea.absolutePoints;if(null!=ca&&mxUtils.intersects(Q,ea)&&"1"!=ea.style.noJump){var X=null;for(ea=0;ea<ca.length-1;ea++){var aa=ca[ea+1],ia=ca[ea];for(J=ca[ea+2];ea<ca.length-2&&mxUtils.ptSegDistSq(ia.x,ia.y,J.x,J.y,aa.x,aa.y)<1*this.scale*+this.scale;)aa=J,ea++,J=ca[ea+2];var la=mxUtils.intersection(N.x,N.y,F.x,F.y,ia.x,ia.y,aa.x,aa.y);if(null!=la&&(Math.abs(la.x-N.x)>z||Math.abs(la.y-N.y)>z)&&(Math.abs(la.x-F.x)>z||Math.abs(la.y-F.y)>z)&&(null==X||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,X.x,X.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ia.x,ia.y)>z)&&(null==J||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,J.x,J.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,aa.x,aa.y)>z)){J=la.x-N.x;X=la.y-N.y;la={distSq:J*J+X*X,x:la.x,y:la.y};for(J=0;J<K.length;J++)if(K[J].distSq>+la.distSq){K.splice(J,0,la);la=null;break}null==la||0!=K.length&&K[K.length-1].x===la.x&&K[K.length-1].y===la.y||K.push(la)}X=ia}}}for(ea=0;ea<K.length;ea++)f=t(1,K[ea].x,K[ea].y)||f}la=c[c.length-1];f=t(0,la.x,la.y)||f}Q.routedPoints=l;return f}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(Q,c,f){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)B.apply(this,+arguments);else{var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,t=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,z=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,F=null,N=null,K=[],J=null;Q.begin();for(var da=0;da<this.state.routedPoints.length;da++){var ea=this.state.routedPoints[da],ca=new mxPoint(ea.x/this.scale,ea.y/this.scale);0==da?ca=c[0]:da==this.state.routedPoints.length-1&&(ca=c[c.length-1]);var X=+!1;if(null!=F&&1==ea.type){var aa=this.state.routedPoints[da+1];ea=aa.x/this.scale-ca.x;aa=aa.y/this.scale-ca.y;ea=ea*ea+aa*aa;null==J&&(J=new mxPoint(ca.x-F.x,ca.y-F.y),N=Math.sqrt(J.x*J.x+J.y*J.y),0<N?(J.x=J.x*t/N,J.y=J.y*t/N):J=null);ea>t*t&&0<N&&(ea=F.x-ca.x,aa=F.y-ca.y,ea=ea*ea+aa*aa,ea>t*t&&(X=new mxPoint(ca.x-J.x,ca.y-J.y),ea=new mxPoint(ca.x+J.x,ca.y+J.y),K.push(X),this.addPoints(Q,K,f,l,!1,null,C),K=0>Math.round(J.x)||0==Math.round(J.x)&&0>=Math.round(J.y)?1:-1,C=!1,"sharp"==z?(Q.lineTo(X.x-+J.y*K,X.y+J.x*K),Q.lineTo(ea.x-J.y*K,ea.y+J.x*K),Q.lineTo(ea.x,ea.y)):"line"==z?(Q.moveTo(X.x+J.y*K,X.y-J.x*K),Q.lineTo(X.x-J.y*K,X.y+J.x*K),Q.moveTo(ea.x-J.y*K,ea.y+J.x*K),Q.lineTo(ea.x+J.y*K,ea.y-J.x*K),Q.moveTo(ea.x,ea.y)):"arc"==z?(K*=1.3,Q.curveTo(X.x-J.y*K,X.y+J.x*K,ea.x-J.y*K,ea.y+J.x*K,ea.x,ea.y)):(Q.moveTo(ea.x,ea.y),C=!0),K=[ea],X=!0))}else J=null;X||(K.push(ca),F=ca)}this.addPoints(Q,K,f,l,!1,null,C);Q.stroke()}};var H=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=+function(Q,c,f,l){return null!=c&&"centerPerimeter"==c.style[mxConstants.STYLE_PERIMETER]?new mxPoint(c.getCenterX(),c.getCenterY()):H.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(Q,c,f,l){if(null==c||null==Q||"1"!=c.style.snapToPoint&&"1"!=Q.style.snapToPoint)S.apply(this,arguments);else{c=this.getTerminalPort(Q,c,l);var t=this.getNextPoint(Q,f,l),z=this.graph.isOrthogonal(Q),C=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||+"0")),F=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=C){var N=Math.cos(-C),K=Math.sin(-C);t=mxUtils.getRotatedPoint(t,N,K,F)}N=parseFloat(Q.style[mxConstants.STYLE_PERIMETER_SPACING]||0);N+=parseFloat(Q.style[l?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);t=this.getPerimeterPoint(c,t,0==C&&z,N);0!=C&&(N=Math.cos(C),K=Math.sin(C),t=mxUtils.getRotatedPoint(t,N,K,F));Q.setAbsoluteTerminalPoint(this.snapToAnchorPoint(Q,c,f,l,t),l)}};mxGraphView.prototype.snapToAnchorPoint=+function(Q,c,f,l,t){if(null!=c&&null!=Q){Q=this.graph.getAllConnectionConstraints(c);l=f=null;if(null!=Q)for(var z=0;z<Q.length;z++){var C=this.graph.getConnectionPoint(c,Q[z]);if(null!=C){var F=(C.x-t.x)*(C.x-t.x)+(C.y-t.y)*(C.y-t.y);if(null==l||F<l)f=C,l=F}}null!=f&&(t=f)}return t};var G=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(Q,c,f){var l=G.apply(this,arguments);"1"==Q.getAttribute("placeholders")&&null!=f.state&&(l=f.state.view.graph.replacePlaceholders(f.state.cell,+l));return l};var P=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(Q){if(null!=Q.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(Q.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"string"===typeof c&&"stencil("==c.substring(0,8))try{var f=c.substring(8,c.length-1),l=mxUtils.parseXml(Graph.decompress(f));return new mxShape(new mxStencil(l.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return P.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(b){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[b]};mxStencilRegistry.setFileLoaded=function(b){mxStencilRegistry.filesLoaded[b]=!0};mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var g=mxStencilRegistry.getBasenameForStencil(b);if(null!=g){e=mxStencilRegistry.libraries[g];if(null!=e){if(null==mxStencilRegistry.packages[g]){for(var m=0;m<e.length;m++){var u=e[m];if(!mxStencilRegistry.isFileLoaded(u))if(mxStencilRegistry.setFileLoaded(u),".xml"==u.toLowerCase().substring(u.length-4,u.length))mxStencilRegistry.loadStencilSet(u,null);else if(".js"==u.toLowerCase().substring(u.length-3,u.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(u);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(B){null!=window.console&&console.log("error in getStencil:",b,g,e,u,B)}}mxStencilRegistry.packages[g]=1}}else g=g.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+g+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};@@ -2544,158 +2544,158 @@ mxStencilRegistry.loadStencilSet=function(b,e,g,m){var u=mxStencilRegistry.packau.documentElement&&mxStencilRegistry.parseStencilSet(u.documentElement,e,p)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(g){e(200<=g.getStatus()&&299>=g.getStatus()?g.getXml():null)}),mxUtils.bind(this,function(g){e(null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};mxStencilRegistry.parseStencilSet=function(b,e,g){if("stencils"==b.nodeName)for(var m=b.firstChild;null!=m;)"shapes"==m.nodeName&&mxStencilRegistry.parseStencilSet(m,e,g),m=m.nextSibling;else{g=null!=g?g:!0;m=b.firstChild;var u="";b=b.getAttribute("name");for(null!=b&&(u=b+".");null!=m;){if(m.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=m.getAttribute("name"),null!=b)){u=u.toLowerCase();var p=b.replace(/ /g,"_");g&&mxStencilRegistry.addStencil(u+p.toLowerCase(),new mxStencil(m));if(null!=e){var B=m.getAttribute("w"),H=m.getAttribute("h");B=null==B?80:parseInt(B,10);H=null==H?80:parseInt(H,10);e(u,p,b,B,H)}}m=m.nextSibling}}};-"undefined"!==typeof mxVertexHandler&&function(){function b(){var x=document.createElement("div");x.className="geHint";x.style.whiteSpace="nowrap";x.style.position="absolute";return x}function e(x,M){switch(M){case mxConstants.POINTS:return x;case mxConstants.MILLIMETERS:return(x/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(x/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(x/mxConstants.PIXELS_PER_INCH).toFixed(3)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";+"undefined"!==typeof mxVertexHandler&&function(){function b(){var x=document.createElement("div");x.className="geHint";x.style.whiteSpace="nowrap";x.style.position="absolute";return x}function e(x,L){switch(L){case mxConstants.POINTS:return x;case mxConstants.MILLIMETERS:return(x/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(x/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(x/mxConstants.PIXELS_PER_INCH).toFixed(3)}}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_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=50;mxConstants.HIGHLIGHT_SIZE=5;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#707070" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.resizeImage=Graph.createSvgImage(10,10,'<path d="Z" stroke="#C0C0C0" stroke-width="1" fill="none"/>').src;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(x){return!mxEvent.isAltDown(x)||mxEvent.isShiftDown(x)};var g=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(x){return g.apply(this,arguments)||this.graph.isTableRow(x)||this.graph.isTableCell(x)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(x){return m.apply(this,arguments)||this.graph.isEdgeIgnored(x)};var u=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(x){return this.graph.isCloneEvent(x)!=u.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var x=new mxEllipse(null,this.highlightColor,this.highlightColor,0);x.opacity=mxConstants.HIGHLIGHT_OPACITY;return x};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=-"crosshair";mxConnectionHandler.prototype.createEdgeState=function(x){x=this.graph.createCurrentEdgeStyle();x=this.graph.createEdge(null,null,null,null,null,x);x=new mxCellState(this.graph.view,x,this.graph.getCellStyle(x));for(var M in this.graph.currentEdgeStyle)x.style[M]=this.graph.currentEdgeStyle[M];if(null!=this.previous){var Q=this.previous.style.newEdgeStyle;if(null!=Q)try{var V=JSON.parse(Q);for(M in V)x.style[M]=V[M]}catch(ia){}}x.style=this.graph.postProcessCellStyle(x.cell,x.style);return x};-var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var x=p.apply(this,arguments);x.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return x};mxConnectionHandler.prototype.updatePreview=function(x){};var B=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var x=B.apply(this,arguments),M=x.getCell;x.getCell=mxUtils.bind(this,function(Q){var V=M.apply(this,arguments);this.error=null;return V});-return x};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var x="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",M="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),Q=0;Q<M.length;Q++)null!=-this.currentEdgeStyle[M[Q]]&&(x+=M[Q]+"="+this.currentEdgeStyle[M[Q]]+";");null!=this.currentEdgeStyle.orthogonalLoop?x+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(x+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?x+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(x+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize++"crosshair";mxConnectionHandler.prototype.createEdgeState=function(x){x=this.graph.createCurrentEdgeStyle();x=this.graph.createEdge(null,null,null,null,null,x);x=new mxCellState(this.graph.view,x,this.graph.getCellStyle(x));for(var L in this.graph.currentEdgeStyle)x.style[L]=this.graph.currentEdgeStyle[L];if(null!=this.previous){var R=this.previous.style.newEdgeStyle;if(null!=R)try{var W=JSON.parse(R);for(L in W)x.style[L]=W[L]}catch(ja){}}x.style=this.graph.postProcessCellStyle(x.cell,x.style);return x};+var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var x=p.apply(this,arguments);x.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return x};mxConnectionHandler.prototype.updatePreview=function(x){};var B=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var x=B.apply(this,arguments),L=x.getCell;x.getCell=mxUtils.bind(this,function(R){var W=L.apply(this,arguments);this.error=null;return W});+return x};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var x="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",L="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),R=0;R<L.length;R++)null!=+this.currentEdgeStyle[L[R]]&&(x+=L[R]+"="+this.currentEdgeStyle[L[R]]+";");null!=this.currentEdgeStyle.orthogonalLoop?x+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(x+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?x+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(x+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(x+="elbow="+this.currentEdgeStyle.elbow+";");return x=null!=this.currentEdgeStyle.html?x+("html="+this.currentEdgeStyle.html+";"):x+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var x=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=-x&&(new mxCodec(x.ownerDocument)).decode(x,this.getStylesheet())};Graph.prototype.createCellLookup=function(x,M){M=null!=M?M:{};for(var Q=0;Q<x.length;Q++){var V=x[Q];M[mxObjectIdentity.get(V)]=V.getId();for(var ia=this.model.getChildCount(V),ka=0;ka<ia;ka++)this.createCellLookup([this.model.getChildAt(V,ka)],M)}return M};Graph.prototype.createCellMapping=function(x,M,Q){Q=null!=Q?Q:{};for(var V in x){var ia=M[V];null==Q[ia]&&(Q[ia]=x[V].getId()||"")}return Q};Graph.prototype.importGraphModel=function(x,-M,Q,V){M=null!=M?M:0;Q=null!=Q?Q:0;var ia=new mxCodec(x.ownerDocument),ka=new mxGraphModel;ia.decode(x,ka);x=[];ia={};var oa={},xa=ka.getChildren(this.cloneCell(ka.root,this.isCloneInvalidEdges(),ia));if(null!=xa){var ta=this.createCellLookup([ka.root]);xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ka=0;ka<xa.length;ka++)ua=this.model.getChildren(this.moveCells([xa[ka]],M,Q,!1,this.model.getRoot())[0]),null!=ua&&(x=x.concat(ua));else{var ua=-ka.getChildren(xa[0]);null!=ua&&(x=this.moveCells(ua,M,Q,!1,this.getDefaultParent()),oa[ka.getChildAt(ka.root,0).getId()]=this.getDefaultParent().getId())}if(null!=x&&(this.createCellMapping(ia,ta,oa),this.updateCustomLinks(oa,x),V)){this.isGridEnabled()&&(M=this.snap(M),Q=this.snap(Q));var Fa=this.getBoundingBoxFromGeometry(x,!0);null!=Fa&&this.moveCells(x,M-Fa.x,Q-Fa.y)}}finally{this.model.endUpdate()}}return x};Graph.prototype.encodeCells=function(x){for(var M={},Q=this.cloneCells(x,null,M),V=-new mxDictionary,ia=0;ia<x.length;ia++)V.put(x[ia],!0);var ka=new mxCodec,oa=new mxGraphModel,xa=oa.getChildAt(oa.getRoot(),0);for(ia=0;ia<Q.length;ia++){oa.add(xa,Q[ia]);var ta=this.view.getState(x[ia]);if(null!=ta){var ua=this.getCellGeometry(Q[ia]);null!=ua&&ua.relative&&!this.model.isEdge(x[ia])&&null==V.get(this.model.getParent(x[ia]))&&(ua.offset=null,ua.relative=!1,ua.x=ta.x/ta.view.scale-ta.view.translate.x,ua.y=ta.y/ta.view.scale-ta.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(M,-this.createCellLookup(x)),Q);return ka.encode(oa)};Graph.prototype.isSwimlane=function(x,M){var Q=null;null==x||this.model.isEdge(x)||this.model.getParent(x)==this.model.getRoot()||(Q=this.getCurrentCellStyle(x,M)[mxConstants.STYLE_SHAPE]);return Q==mxConstants.SHAPE_SWIMLANE||"table"==Q||"tableRow"==Q};var H=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(x){return null!=x&&H.apply(this,arguments)?this.isTableCell(x)||this.isTableRow(x)?this.isCellEditable(this.model.getParent(x)):-!0:!1};var T=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(x){return null!=x&&T.apply(this,arguments)?this.isTableCell(x)||this.isTableRow(x)?this.isCellMovable(this.model.getParent(x)):!0:!1};var G=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(x){var M=this.model.getParent(x);if(null!=M){var Q=this.getCurrentCellStyle(M);if(null!=Q.expand)return"0"!=Q.expand}return G.apply(this,arguments)&&(null==M||!this.isTable(M))};var P=Graph.prototype.splitEdge;-Graph.prototype.splitEdge=function(x,M,Q,V,ia,ka,oa,xa){null==xa&&(xa=this.model.getParent(x),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ka,oa,null,!0,!1));Q=null;this.model.beginUpdate();try{Q=P.apply(this,[x,M,Q,V,ia,ka,oa,xa]);this.model.setValue(Q,"");var ta=this.getChildCells(Q,!0);for(M=0;M<ta.length;M++){var ua=this.getCellGeometry(ta[M]);null!=ua&&ua.relative&&0<ua.x&&this.model.remove(ta[M])}var Fa=this.getChildCells(x,!0);for(M=0;M<Fa.length;M++)ua=this.getCellGeometry(Fa[M]),-null!=ua&&ua.relative&&0>=ua.x&&this.model.remove(Fa[M]);var Na=this.model.getTerminal(Q,!1);if(null!=Na){var Wa=this.getCurrentCellStyle(Na);null!=Wa&&"1"==Wa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[x]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[x]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[Q]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[Q]))}}finally{this.model.endUpdate()}return Q};var R=Graph.prototype.selectCell;Graph.prototype.selectCell=function(x,-M,Q){if(M||Q)R.apply(this,arguments);else{var V=this.getSelectionCell(),ia=null,ka=[],oa=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ka.push(xa),xa==V)ia=ka.length-1;else if(x&&null==V&&0<ka.length||null!=ia&&x&&ka.length>ia||!x&&0<ia)return;for(var ta=0;ta<this.model.getChildCount(xa);ta++)oa(this.model.getChildAt(xa,ta))});oa(this.model.root);0<ka.length&&(ia=null!=ia?mxUtils.mod(ia+(x?1:-1),ka.length):0,this.setSelectionCell(ka[ia]))}};-Graph.prototype.swapShapes=function(x,M){if(this.model.isVertex(x)&&this.model.isVertex(M)&&2==this.getMovableCells([x,M]).length){var Q=this.getCellGeometry(x),V=this.getCellGeometry(M);if(null!=Q&&null!=V){var ia=Q.clone(),ka=V.clone();this.model.beginUpdate();try{ia.x=V.getCenterX()-Q.width/2,ia.y=V.getCenterY()-Q.height/2,ka.x=Q.getCenterX()-V.width/2,ka.y=Q.getCenterY()-V.height/2,this.model.setGeometry(x,ia),this.model.setGeometry(M,ka)}finally{this.model.endUpdate()}}}};var c=Graph.prototype.moveCells;-Graph.prototype.moveCells=function(x,M,Q,V,ia,ka,oa){oa=null!=oa?oa:{};if(this.isTable(ia)){for(var xa=[],ta=0;ta<x.length;ta++)this.isTable(x[ta])?xa=xa.concat(this.model.getChildCells(x[ta],!0).reverse()):xa.push(x[ta]);x=xa}this.model.beginUpdate();try{xa=[];for(ta=0;ta<x.length;ta++)if(null!=ia&&this.isTableRow(x[ta])){var ua=this.model.getParent(x[ta]),Fa=this.getCellGeometry(x[ta]);this.isTable(ua)&&xa.push(ua);if(null!=ua&&null!=Fa&&this.isTable(ua)&&this.isTable(ia)&&(V||ua!=ia)){if(!V){var Na=-this.getCellGeometry(ua);null!=Na&&(Na=Na.clone(),Na.height-=Fa.height,this.model.setGeometry(ua,Na))}Na=this.getCellGeometry(ia);null!=Na&&(Na=Na.clone(),Na.height+=Fa.height,this.model.setGeometry(ia,Na));var Wa=this.model.getChildCells(ia,!0);if(0<Wa.length){x[ta]=V?this.cloneCell(x[ta]):x[ta];var Xa=this.model.getChildCells(x[ta],!0),ab=this.model.getChildCells(Wa[0],!0),Oa=ab.length-Xa.length;if(0<Oa)for(var Qa=0;Qa<Oa;Qa++){var kb=this.cloneCell(Xa[Xa.length-1]);null!=kb&&(kb.value="",this.model.add(x[ta],-kb))}else if(0>Oa)for(Qa=0;Qa>Oa;Qa--)this.model.remove(Xa[Xa.length+Qa-1]);Xa=this.model.getChildCells(x[ta],!0);for(Qa=0;Qa<ab.length;Qa++){var cb=this.getCellGeometry(ab[Qa]),Ya=this.getCellGeometry(Xa[Qa]);null!=cb&&null!=Ya&&(Ya=Ya.clone(),Ya.width=cb.width,this.model.setGeometry(Xa[Qa],Ya))}}}}var gb=c.apply(this,arguments);for(ta=0;ta<xa.length;ta++)!V&&this.model.contains(xa[ta])&&0==this.model.getChildCount(xa[ta])&&this.model.remove(xa[ta]);V&&this.updateCustomLinks(this.createCellMapping(oa,-this.createCellLookup(x)),gb)}finally{this.model.endUpdate()}return gb};var f=Graph.prototype.removeCells;Graph.prototype.removeCells=function(x,M){var Q=[];this.model.beginUpdate();try{for(var V=0;V<x.length;V++)if(this.isTableCell(x[V])){var ia=this.model.getParent(x[V]),ka=this.model.getParent(ia);1==this.model.getChildCount(ia)&&1==this.model.getChildCount(ka)?0>mxUtils.indexOf(x,ka)&&0>mxUtils.indexOf(Q,ka)&&Q.push(ka):this.labelChanged(x[V],"")}else{if(this.isTableRow(x[V])&&(ka=this.model.getParent(x[V]),-0>mxUtils.indexOf(x,ka)&&0>mxUtils.indexOf(Q,ka))){for(var oa=this.model.getChildCells(ka,!0),xa=0,ta=0;ta<oa.length;ta++)0<=mxUtils.indexOf(x,oa[ta])&&xa++;xa==oa.length&&Q.push(ka)}Q.push(x[V])}Q=f.apply(this,[Q,M])}finally{this.model.endUpdate()}return Q};Graph.prototype.updateCustomLinks=function(x,M,Q){Q=null!=Q?Q:new Graph;for(var V=0;V<M.length;V++)null!=M[V]&&Q.updateCustomLinksForCell(x,M[V],Q)};Graph.prototype.updateCustomLinksForCell=function(x,M){this.doUpdateCustomLinksForCell(x,M);for(var Q=-this.model.getChildCount(M),V=0;V<Q;V++)this.updateCustomLinksForCell(x,this.model.getChildAt(M,V))};Graph.prototype.doUpdateCustomLinksForCell=function(x,M){};Graph.prototype.getAllConnectionConstraints=function(x,M){if(null!=x){M=mxUtils.getValue(x.style,"points",null);if(null!=M){x=[];try{var Q=JSON.parse(M);for(M=0;M<Q.length;M++){var V=Q[M];x.push(new mxConnectionConstraint(new mxPoint(V[0],V[1]),2<V.length?"0"!=V[2]:!0,null,3<V.length?V[3]:0,4<V.length?V[4]:0))}}catch(ka){}return x}if(null!=-x.shape&&null!=x.shape.bounds){V=x.shape.direction;M=x.shape.bounds;var ia=x.shape.scale;Q=M.width/ia;M=M.height/ia;if(V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_SOUTH)V=Q,Q=M,M=V;M=x.shape.getConstraints(x.style,Q,M);if(null!=M)return M;if(null!=x.shape.stencil&&null!=x.shape.stencil.constraints)return x.shape.stencil.constraints;if(null!=x.shape.constraints)return x.shape.constraints}}return null};Graph.prototype.flipEdge=function(x){if(null!=x){var M=this.getCurrentCellStyle(x);M=-mxUtils.getValue(M,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,M,[x])}};Graph.prototype.isValidRoot=function(x){for(var M=this.model.getChildCount(x),Q=0,V=0;V<M;V++){var ia=this.model.getChildAt(x,V);this.model.isVertex(ia)&&(ia=this.getCellGeometry(ia),null==ia||ia.relative||Q++)}return 0<Q||this.isContainer(x)};Graph.prototype.isValidDropTarget=function(x,M,-Q){for(var V=this.getCurrentCellStyle(x),ia=!0,ka=!0,oa=0;oa<M.length&&ka;oa++)ia=ia&&this.isTable(M[oa]),ka=ka&&this.isTableRow(M[oa]);return!this.isCellLocked(x)&&(this.isTargetShape(x,M,Q)||("1"!=mxUtils.getValue(V,"part","0")||this.isContainer(x))&&"0"!=mxUtils.getValue(V,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(x))&&!this.isTableRow(x)&&(!this.isTable(x)||ka||ia))};Graph.prototype.createGroupCell=function(){var x=mxGraph.prototype.createGroupCell.apply(this,-arguments);x.setStyle("group");return x};Graph.prototype.isExtendParentsOnAdd=function(x){var M=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(M&&null!=x&&null!=this.layoutManager){var Q=this.model.getParent(x);null!=Q&&(Q=this.layoutManager.getLayout(Q),null!=Q&&Q.constructor==mxStackLayout&&(M=!1))}return M};Graph.prototype.getPreferredSizeForCell=function(x,M,Q){Q=null!=Q?Q:this.gridEnabled;var V=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=V&&(V.width+=-10,V.height+=4,Q&&(V.width=this.snap(V.width),V.height=this.snap(V.height)));return V};Graph.prototype.turnShapes=function(x,M){var Q=this.getModel(),V=[];Q.beginUpdate();try{for(var ia=0;ia<x.length;ia++){var ka=x[ia];if(Q.isEdge(ka)){var oa=Q.getTerminal(ka,!0),xa=Q.getTerminal(ka,!1);Q.setTerminal(ka,xa,!0);Q.setTerminal(ka,oa,!1);var ta=Q.getGeometry(ka);if(null!=ta){ta=ta.clone();null!=ta.points&&ta.points.reverse();var ua=ta.getTerminalPoint(!0),Fa=ta.getTerminalPoint(!1);ta.setTerminalPoint(ua,-!1);ta.setTerminalPoint(Fa,!0);Q.setGeometry(ka,ta);var Na=this.view.getState(ka),Wa=this.view.getState(oa),Xa=this.view.getState(xa);if(null!=Na){var ab=null!=Wa?this.getConnectionConstraint(Na,Wa,!0):null,Oa=null!=Xa?this.getConnectionConstraint(Na,Xa,!1):null;this.setConnectionConstraint(ka,oa,!0,Oa);this.setConnectionConstraint(ka,xa,!1,ab);var Qa=mxUtils.getValue(Na.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Na.style,-mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ka]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Qa,[ka])}V.push(ka)}}else if(Q.isVertex(ka)&&(ta=this.getCellGeometry(ka),null!=ta)){if(!(this.isTable(ka)||this.isTableRow(ka)||this.isTableCell(ka)||this.isSwimlane(ka))){ta=ta.clone();ta.x+=ta.width/2-ta.height/2;ta.y+=ta.height/2-ta.width/2;var kb=ta.width;ta.width=ta.height;ta.height=kb;Q.setGeometry(ka,ta)}var cb=this.view.getState(ka);if(null!=cb){var Ya=[mxConstants.DIRECTION_EAST,-mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],gb=mxUtils.getValue(cb.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Ya[mxUtils.mod(mxUtils.indexOf(Ya,gb)+(M?-1:1),Ya.length)],[ka])}V.push(ka)}}}finally{Q.endUpdate()}return V};Graph.prototype.stencilHasPlaceholders=function(x){if(null!=x&&null!=x.fgNode)for(x=x.fgNode.firstChild;null!=x;){if("text"==x.nodeName&&"1"==x.getAttribute("placeholders"))return!0;-x=x.nextSibling}return!1};var l=Graph.prototype.processChange;Graph.prototype.processChange=function(x){if(x instanceof mxGeometryChange&&(this.isTableCell(x.cell)||this.isTableRow(x.cell))&&(null==x.previous&&null!=x.geometry||null!=x.previous&&!x.previous.equals(x.geometry))){var M=x.cell;this.isTableCell(M)&&(M=this.model.getParent(M));this.isTableRow(M)&&(M=this.model.getParent(M));var Q=this.view.getState(M);null!=Q&&null!=Q.shape&&(this.view.invalidate(M),Q.shape.bounds=null)}l.apply(this,arguments);-x instanceof mxValueChange&&null!=x.cell&&null!=x.cell.value&&"object"==typeof x.cell.value&&this.invalidateDescendantsWithPlaceholders(x.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(x){x=this.model.getDescendants(x);if(0<x.length)for(var M=0;M<x.length;M++){var Q=this.view.getState(x[M]);null!=Q&&null!=Q.shape&&null!=Q.shape.stencil&&this.stencilHasPlaceholders(Q.shape.stencil)?this.removeStateForCell(x[M]):this.isReplacePlaceholders(x[M])&&this.view.invalidate(x[M],!1,!1)}};-Graph.prototype.replaceElement=function(x,M){M=x.ownerDocument.createElement(null!=M?M:"span");for(var Q=Array.prototype.slice.call(x.attributes);attr=Q.pop();)M.setAttribute(attr.nodeName,attr.nodeValue);M.innerHTML=x.innerHTML;x.parentNode.replaceChild(M,x)};Graph.prototype.processElements=function(x,M){if(null!=x){x=x.getElementsByTagName("*");for(var Q=0;Q<x.length;Q++)null!=x[Q]&&M(x[Q])}};Graph.prototype.updateLabelElements=function(x,M,Q){x=null!=x?x:this.getSelectionCells();for(var V=document.createElement("div"),-ia=0;ia<x.length;ia++){var ka=this.getCurrentCellStyle(x[ia]);if(null!=ka&&"1"==ka.html&&(ka=this.convertValueToString(x[ia]),null!=ka&&0<ka.length)){V.innerHTML=Graph.sanitizeHtml(ka);for(var oa=V.getElementsByTagName(null!=Q?Q:"*"),xa=0;xa<oa.length;xa++)M(oa[xa]);V.innerHTML!=ka&&this.cellLabelChanged(x[ia],V.innerHTML)}}};Graph.prototype.cellLabelChanged=function(x,M,Q){M=Graph.zapGremlins(M);this.model.beginUpdate();try{if(null!=x.value&&"object"==typeof x.value){if(this.isReplacePlaceholders(x)&&-null!=x.getAttribute("placeholder"))for(var V=x.getAttribute("placeholder"),ia=x;null!=ia;){if(ia==this.model.getRoot()||null!=ia.value&&"object"==typeof ia.value&&ia.hasAttribute(V)){this.setAttributeForCell(ia,V,M);break}ia=this.model.getParent(ia)}var ka=x.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ka.hasAttribute("label_"+Graph.diagramLanguage)?ka.setAttribute("label_"+Graph.diagramLanguage,M):ka.setAttribute("label",M);M=ka}mxGraph.prototype.cellLabelChanged.apply(this,-arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(x){if(null!=x){for(var M=new mxDictionary,Q=0;Q<x.length;Q++)M.put(x[Q],!0);var V=[];for(Q=0;Q<x.length;Q++){var ia=this.model.getParent(x[Q]);null==ia||M.get(ia)||(M.put(ia,!0),V.push(ia))}for(Q=0;Q<V.length;Q++)if(ia=this.view.getState(V[Q]),null!=ia&&(this.model.isEdge(ia.cell)||this.model.isVertex(ia.cell))&&this.isCellDeletable(ia.cell)&&this.isTransparentState(ia)){for(var ka=!0,oa=0;oa<this.model.getChildCount(ia.cell)&&-ka;oa++)M.get(this.model.getChildAt(ia.cell,oa))||(ka=!1);ka&&x.push(ia.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(x){for(var M=[],Q=0;Q<x.length;Q++)this.isCellDeletable(x[Q])&&this.isTransparentState(this.view.getState(x[Q]))&&M.push(x[Q]);x=M;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(x,M){this.setAttributeForCell(x,"link",M)};Graph.prototype.setTooltipForCell=function(x,-M){var Q="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(x.value)&&x.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(Q="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(x,Q,M)};Graph.prototype.getAttributeForCell=function(x,M,Q){x=null!=x.value&&"object"===typeof x.value?x.value.getAttribute(M):null;return null!=x?x:Q};Graph.prototype.setAttributeForCell=function(x,M,Q){if(null!=x.value&&"object"==typeof x.value)var V=x.value.cloneNode(!0);else V=mxUtils.createXmlDocument().createElement("UserObject"),-V.setAttribute("label",x.value||"");null!=Q?V.setAttribute(M,Q):V.removeAttribute(M);this.model.setValue(x,V)};Graph.prototype.isTargetShape=function(x,M,Q){x=mxUtils.getValue(this.getCurrentCellStyle(x),mxConstants.STYLE_SHAPE,"");for(Q=0;Q<M.length;Q++){var V=mxUtils.getValue(this.getCurrentCellStyle(M[Q]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(V,x))return!0}return!1};var t=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(x,M,Q,V){if(mxEvent.isAltDown(M))return null;-for(var ia=0;ia<x.length;ia++){var ka=this.model.getParent(x[ia]);if(this.model.isEdge(ka)&&0>mxUtils.indexOf(x,ka))return null}ka=t.apply(this,arguments);var oa=!0;for(ia=0;ia<x.length&&oa;ia++)oa=oa&&this.isTableRow(x[ia]);oa&&(this.isTableCell(ka)&&(ka=this.model.getParent(ka)),this.isTableRow(ka)&&(ka=this.model.getParent(ka)),this.isTable(ka)||(ka=null));return ka};Graph.prototype.click=function(x){mxGraph.prototype.click.call(this,x);this.firstClickState=x.getState();this.firstClickSource=x.getSource()};-Graph.prototype.dblClick=function(x,M){this.isEnabled()&&(M=this.insertTextForEvent(x,M),mxGraph.prototype.dblClick.call(this,x,M))};Graph.prototype.insertTextForEvent=function(x,M){var Q=mxUtils.convertPoint(this.container,mxEvent.getClientX(x),mxEvent.getClientY(x));if(null!=x&&!this.model.isVertex(M)){var V=this.model.isEdge(M)?this.view.getState(M):null,ia=mxEvent.getSource(x);this.firstClickState!=V||this.firstClickSource!=ia||null!=V&&null!=V.text&&null!=V.text.node&&null!=V.text.boundingBox&&-(mxUtils.contains(V.text.boundingBox,Q.x,Q.y)||mxUtils.isAncestorNode(V.text.node,mxEvent.getSource(x)))||(null!=V||this.isCellLocked(this.getDefaultParent()))&&(null==V||this.isCellLocked(V.cell))||!(null!=V||mxClient.IS_SVG&&ia==this.view.getCanvas().ownerSVGElement)||(null==V&&(V=this.view.getState(this.getCellAt(Q.x,Q.y))),M=this.addText(Q.x,Q.y,V))}return M};Graph.prototype.getInsertPoint=function(){var x=this.getGridSize(),M=this.container.scrollLeft/this.view.scale-this.view.translate.x,Q=-this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var V=this.getPageLayout(),ia=this.getPageSize();M=Math.max(M,V.x*ia.width);Q=Math.max(Q,V.y*ia.height)}return new mxPoint(this.snap(M+x),this.snap(Q+x))};Graph.prototype.getFreeInsertPoint=function(){var x=this.view,M=this.getGraphBounds(),Q=this.getInsertPoint(),V=this.snap(Math.round(Math.max(Q.x,M.x/x.scale-x.translate.x+(0==M.width?2*this.gridSize:0))));x=this.snap(Math.round(Math.max(Q.y,(M.y+M.height)/x.scale--x.translate.y+2*this.gridSize)));return new mxPoint(V,x)};Graph.prototype.getCenterInsertPoint=function(x){x=null!=x?x:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-x.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/-2/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-x.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(x,M){x=null!=x?x:"";null!=M&&(0<x.length&&";"!=x.charAt(x.length-1)&&(x+=";"),x+="fontSize="+M+";");return x};Graph.prototype.addText=function(x,M,Q){var V=new mxCell;V.value="Text";V.geometry=new mxGeometry(0,0,0,0);V.vertex=!0;if(null!=Q&&this.model.isEdge(Q.cell)){V.style=-"edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);V.geometry.relative=!0;V.connectable=!1;var ia=this.view.getRelativePoint(Q,x,M);V.geometry.x=Math.round(1E4*ia.x)/1E4;V.geometry.y=Math.round(ia.y);V.geometry.offset=new mxPoint(0,0);ia=this.view.getPoint(Q,V.geometry);var ka=this.view.scale;V.geometry.offset=new mxPoint(Math.round((x-ia.x)/ka),Math.round((M-ia.y)/ka))}else ia=this.view.translate,V.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",-this.vertexFontSize),V.geometry.width=40,V.geometry.height=20,V.geometry.x=Math.round(x/this.view.scale)-ia.x-(null!=Q?Q.origin.x:0),V.geometry.y=Math.round(M/this.view.scale)-ia.y-(null!=Q?Q.origin.y:0),V.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([V],null!=Q?Q.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[V])),this.autoSizeCell(V)}finally{this.getModel().endUpdate()}return V};Graph.prototype.addClickHandler=function(x,M,Q){var V=mxUtils.bind(this,-function(){var ta=this.container.getElementsByTagName("a");if(null!=ta)for(var ua=0;ua<ta.length;ua++){var Fa=this.getAbsoluteUrl(ta[ua].getAttribute("href"));null!=Fa&&(ta[ua].setAttribute("rel",this.linkRelation),ta[ua].setAttribute("href",Fa),null!=M&&mxEvent.addGestureListeners(ta[ua],null,null,M))}});this.model.addListener(mxEvent.CHANGE,V);V();var ia=this.container.style.cursor,ka=this.getTolerance(),oa=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=x&&""!=x&&-x!=mxConstants.NONE?new mxCellHighlight(oa,x,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ta){var ua=ta.sourceState;if(null==ua||null==oa.getLinkForCell(ua.cell))ta=oa.getCellAt(ta.getGraphX(),ta.getGraphY(),null,null,null,function(Fa,Na,Wa){return null==oa.getLinkForCell(Fa.cell)}),ua=null==ua||oa.model.isAncestor(ta,ua.cell)?oa.view.getState(ta):null;ua!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ua,null!=this.currentState&&this.activate(this.currentState))},-mouseDown:function(ta,ua){this.startX=ua.getGraphX();this.startY=ua.getGraphY();this.scrollLeft=oa.container.scrollLeft;this.scrollTop=oa.container.scrollTop;null==this.currentLink&&"auto"==oa.container.style.overflow&&(oa.container.style.cursor="move");this.updateCurrentState(ua)},mouseMove:function(ta,ua){if(oa.isMouseDown)null!=this.currentLink&&(ta=Math.abs(this.startX-ua.getGraphX()),ua=Math.abs(this.startY-ua.getGraphY()),(ta>ka||ua>ka)&&this.clear());else{for(ta=ua.getSource();null!=ta&&"a"!=-ta.nodeName.toLowerCase();)ta=ta.parentNode;null!=ta?this.clear():(null!=oa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&oa.tooltipHandler.reset(ua,!0,this.currentState),(null==this.currentState||ua.getState()!=this.currentState&&null!=ua.sourceState||!oa.intersects(this.currentState,ua.getGraphX(),ua.getGraphY()))&&this.updateCurrentState(ua))}},mouseUp:function(ta,ua){var Fa=ua.getSource();for(ta=ua.getEvent();null!=Fa&&"a"!=Fa.nodeName.toLowerCase();)Fa=Fa.parentNode;null==-Fa&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-oa.container.scrollTop)<ka&&(null==ua.sourceState||!ua.isSource(ua.sourceState.control))&&((mxEvent.isLeftMouseButton(ta)||mxEvent.isMiddleMouseButton(ta))&&!mxEvent.isPopupTrigger(ta)||mxEvent.isTouchEvent(ta))&&(null!=this.currentLink?(Fa=oa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Fa||null==M||M(ta,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ta)||-(ta=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ta)?"_blank":Fa?oa.linkTarget:"_top",oa.openLink(this.currentLink,ta),ua.consume())):null!=Q&&!ua.isConsumed()&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-oa.container.scrollTop)<ka&&Math.abs(this.startX-ua.getGraphX())<ka&&Math.abs(this.startY-ua.getGraphY())<ka&&Q(ua.getEvent()));this.clear()},activate:function(ta){this.currentLink=oa.getAbsoluteUrl(oa.getLinkForCell(ta.cell));null!=this.currentLink&&-(this.currentTarget=oa.getLinkTargetForCell(ta.cell),oa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ta))},clear:function(){null!=oa.container&&(oa.container.style.cursor=ia);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=oa.tooltipHandler&&oa.tooltipHandler.hide()}};oa.click=function(ta){};oa.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ta){xa.clear()})};Graph.prototype.duplicateCells=-function(x,M){x=null!=x?x:this.getSelectionCells();M=null!=M?M:!0;for(var Q=0;Q<x.length;Q++)this.isTableCell(x[Q])&&(x[Q]=this.model.getParent(x[Q]));x=this.model.getTopmostCells(x);var V=this.getModel(),ia=this.gridSize,ka=[];V.beginUpdate();try{var oa={},xa=this.createCellLookup(x),ta=this.cloneCells(x,!1,oa,!0);for(Q=0;Q<x.length;Q++){var ua=V.getParent(x[Q]);if(null!=ua){var Fa=this.moveCells([ta[Q]],ia,ia,!1)[0];ka.push(Fa);if(M)V.add(ua,ta[Q]);else{var Na=ua.getIndex(x[Q]);V.add(ua,ta[Q],Na+-1)}if(this.isTable(ua)){var Wa=this.getCellGeometry(ta[Q]),Xa=this.getCellGeometry(ua);null!=Wa&&null!=Xa&&(Xa=Xa.clone(),Xa.height+=Wa.height,V.setGeometry(ua,Xa))}}else ka.push(ta[Q])}this.updateCustomLinks(this.createCellMapping(oa,xa),ta,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ta))}finally{V.endUpdate()}return ka};Graph.prototype.insertImage=function(x,M,Q){if(null!=x&&null!=this.cellEditor.textarea){for(var V=this.cellEditor.textarea.getElementsByTagName("img"),ia=-[],ka=0;ka<V.length;ka++)ia.push(V[ka]);document.execCommand("insertimage",!1,x);x=this.cellEditor.textarea.getElementsByTagName("img");if(x.length==ia.length+1)for(ka=x.length-1;0<=ka;ka--)if(0==ka||x[ka]!=ia[ka-1]){x[ka].setAttribute("width",M);x[ka].setAttribute("height",Q);break}}};Graph.prototype.insertLink=function(x){if(null!=this.cellEditor.textarea)if(0==x.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var M=this.cellEditor.textarea.getElementsByTagName("a"),Q=[],V=-0;V<M.length;V++)Q.push(M[V]);document.execCommand("createlink",!1,mxUtils.trim(x));M=this.cellEditor.textarea.getElementsByTagName("a");if(M.length==Q.length+1)for(V=M.length-1;0<=V;V--)if(M[V]!=Q[V-1]){for(M=M[V].getElementsByTagName("a");0<M.length;){for(Q=M[0].parentNode;null!=M[0].firstChild;)Q.insertBefore(M[0].firstChild,M[0]);Q.removeChild(M[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(x))};Graph.prototype.isCellResizable=function(x){var M=mxGraph.prototype.isCellResizable.apply(this,-arguments),Q=this.getCurrentCellStyle(x);return!this.isTableCell(x)&&!this.isTableRow(x)&&(M||"0"!=mxUtils.getValue(Q,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==Q[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(x,M,Q){null==M&&(M=this.getSelectionCells());if(null!=M&&1<M.length){for(var V=[],ia=null,ka=null,oa=0,xa=0;xa<M.length;xa++)if(this.getModel().isVertex(M[xa])){var ta=this.view.getState(M[xa]);if(null!=ta){var ua=x?ta.getCenterX():ta.getCenterY();ia=null!=ia?Math.max(ia,-ua):ua;ka=null!=ka?Math.min(ka,ua):ua;Q&&(oa+=x?ta.width:ta.height);V.push(ta)}}if(2<V.length){V.sort(function(ab,Oa){return x?ab.x-Oa.x:ab.y-Oa.y});Q&&(oa-=x?V[0].width/2+V[V.length-1].width/2:V[0].height/2+V[V.length-1].height/2);ta=this.view.translate;ua=this.view.scale;ka=ka/ua-(x?ta.x:ta.y);ia=ia/ua-(x?ta.x:ta.y);this.getModel().beginUpdate();try{var Fa=(ia-ka-oa)/(V.length-1),Na=ka+(Q?x?V[0].width/2:V[0].height/2:0);for(xa=1;xa<V.length-1;xa++){var Wa=this.view.getState(this.model.getParent(V[xa].cell)),-Xa=this.getCellGeometry(V[xa].cell);Na+=Fa;null!=Xa&&null!=Wa&&(Xa=Xa.clone(),x?Xa.x=Math.round(Na-(Q?0:Xa.width/2))-Wa.origin.x:Xa.y=Math.round(Na-(Q?0:Xa.height/2))-Wa.origin.y,this.getModel().setGeometry(V[xa].cell,Xa));Q&&(Na+=x?V[xa].width:V[xa].height)}}finally{this.getModel().endUpdate()}}}return M};Graph.prototype.isCloneEvent=function(x){return mxClient.IS_MAC&&mxEvent.isMetaDown(x)||mxEvent.isControlDown(x)};Graph.prototype.createSvgImageExport=function(x){x=new mxImageExport;x.addCellData=-function(Q,V,ia){V.setAttribute("data-cell-id",Q.id);if(ia)if(mxUtils.isNode(Q.value))for(ia=0;ia<Q.value.attributes.length;ia++){var ka=Q.value.attributes[ia];V.setAttribute("data-cell-"+ka.name,ka.value)}else if("object"===typeof Q.value)for(ka in Q.value)V.setAttribute("data-cell-"+ka,Q.value[ka]);else null!=Q.value&&V.setAttribute("data-cell-value",Q.value);return V};var M=x.visitStatesRecursive;x.visitStatesRecursive=function(Q,V,ia){if(null!=Q){var ka=V.root,oa=V.root.ownerDocument;V.root=this.addCellData(Q.cell,-null!=oa.createElementNS?oa.createElementNS(mxConstants.NS_SVG,"g"):oa.createElement("g"),Editor.addSvgMetadata);ka.appendChild(V.root);M.apply(this,arguments);V.root=ka}};x.getLinkForCellState=mxUtils.bind(this,function(Q,V){return this.getLinkForCell(Q.cell)});x.getTitleForCellState=mxUtils.bind(this,function(Q,V){return Editor.convertHtmlToText(this.convertValueToTooltip(Q.cell))});return x};Graph.prototype.parseBackgroundImage=function(x){var M=null;null!=x&&0<x.length&&(x=JSON.parse(x),M=new mxImage(x.src,-x.width,x.height));return M};Graph.prototype.getBackgroundImageObject=function(x){return x};Graph.prototype.getSvg=function(x,M,Q,V,ia,ka,oa,xa,ta,ua,Fa,Na,Wa,Xa,ab,Oa){var Qa=null;if(null!=Xa)for(Qa=new mxDictionary,Fa=0;Fa<Xa.length;Fa++)Qa.put(Xa[Fa],!0);Xa=this.useCssTransforms;var kb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Xa&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{M=null!=M?M:1;Q=null!=Q?Q:0;ia=null!=ia?ia:!0;ka=null!=ka?ka:!0;oa=null!=oa?oa:-!0;ua=null!=ua?ua:!1;var cb="page"==Wa?this.view.getBackgroundPageBounds():ka&&null==Qa||V||"diagram"==Wa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ya=this.backgroundImage,gb=this.view.translate,hb=this.view.scale;"diagram"==Wa&&null!=Ya&&null!=Ya.width&&null!=Ya.height&&(cb=mxRectangle.fromRectangle(cb),cb.add(new mxRectangle((gb.x+Ya.x)*hb,(gb.y+Ya.y)*hb,Ya.width*hb,Ya.height*hb)));if(null==cb)throw Error(mxResources.get("drawingEmpty"));V=M/hb;var vb=Math.max(1,Math.ceil(cb.width*-V)+2*Q)+(ua&&0==Q?5:0),mb=Math.max(1,Math.ceil(cb.height*V)+2*Q)+(ua&&0==Q?5:0);ua=ia?-.5:0;var pb=mxUtils.getLightDarkColor(x),db=Graph.createSvgNode(ua,ua,vb,mb,pb),qb=db.ownerDocument;if(null!=x){var nb=mxUtils.createElementNs(qb,mxConstants.NS_SVG,"rect");nb.setAttribute("fill",pb.light);nb.style.fill=pb.cssText;nb.setAttribute("width","100%");nb.setAttribute("height","100%");nb.setAttribute("x","0");nb.setAttribute("y","0");db.appendChild(nb)}var lb=mxUtils.createElementNs(qb,mxConstants.NS_SVG,-"g");db.appendChild(lb);var eb=this.createSvgCanvas(lb);eb.foOffset=ia?-.5:0;eb.textOffset=ia?-.5:0;eb.imageOffset=ia?-.5:0;eb.translate(Math.floor(Q/M-cb.x/hb),Math.floor(Q/M-cb.y/hb));eb.idPrefix="drawio-svg-"+Editor.guid();var tb=document.createElement("div"),ob=eb.getAlternateText;eb.getAlternateText=function(ib,Bb,sb,xb,zb,rb,Cb,d,n,y,q,v,D){if(null!=rb&&0<this.state.fontSize)try{mxUtils.isNode(rb)?rb=rb.innerText:(tb.innerHTML=rb,rb=mxUtils.extractTextWithWhitespace(tb.childNodes));for(var E=-Math.ceil(2*xb/this.state.fontSize),fa=[],L=0,va=0;(0==E||L<E)&&va<rb.length;){var na=rb.charCodeAt(va);if(10==na||13==na){if(0<L)break}else fa.push(rb.charAt(va)),255>na&&L++;va++}fa.length<rb.length&&1<rb.length-fa.length&&(rb=mxUtils.trim(fa.join(""))+"...");return rb}catch(Va){return ob.apply(this,arguments)}else return ob.apply(this,arguments)};null!=Ya&&null!=Ya.width&&null!=Ya.height&&(x=hb/M,ua=new mxRectangle((Ya.x+gb.x)*x,(Ya.y+gb.y)*x,Ya.width*x,Ya.height*x),mxUtils.intersects(cb,ua)&&-eb.image(Ya.x+gb.x,Ya.y+gb.y,Ya.width,Ya.height,Ya.src,!0));eb.scale(V);eb.textEnabled=oa;xa=null!=xa?xa:this.createSvgImageExport();var ub=xa.getLinkForCellState;xa.getLinkForCellState=function(ib,Bb){var sb=ib.view.graph.getAbsoluteUrl(ub.apply(this,arguments));return null==sb||ib.view.graph.isCustomLink(sb)?null:sb};xa.getLinkTargetForCellState=function(ib,Bb){return ib.view.graph.getLinkTargetForCell(ib.cell)};var Ab=xa.drawCellState,yb=null,wb=mxUtils.bind(this,function(){if(null==yb){yb="ge-flow-animation-"+-Editor.guid();var ib=null!=qb.createElementNS?qb.createElementNS(mxConstants.NS_SVG,"style"):qb.createElement("style");ib.innerHTML=this.createFlowAnimationCss(yb);qb.getElementsByTagName("defs")[0].appendChild(ib)}return yb});xa.drawCellState=function(ib,Bb){for(var sb=ib.view.graph,xb=null!=Qa?Qa.get(ib.cell):sb.isCellSelected(ib.cell),zb=sb.model.getParent(ib.cell);!(ka&&null==Qa||xb)&&null!=zb;)xb=null!=Qa?Qa.get(zb):sb.isCellSelected(zb),zb=sb.model.getParent(zb);if(null!=ib.shape)try{var rb=-ib.shape.isFlowAnimationEnabled,Cb=ib.shape.addFlowAnimationToShape;ib.shape.isFlowAnimationEnabled=function(){return kb&&sb.model.isEdge(ib.cell)&&"1"==mxUtils.getValue(ib.style,"flowAnimation","0")};ib.shape.addFlowAnimationToShape=function(){sb.addFlowAnimationToNode(this.getFlowAnimationPath(),ib.style,M,wb())};if(ka&&null==Qa||xb)sb.view.redrawEnumerationState(ib),Ab.apply(this,arguments),this.doDrawShape(ib.secondLabel,Bb)}finally{ib.shape.isFlowAnimationEnabled=rb,ib.shape.addFlowAnimationToShape=-Cb}};var jb=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;xa.drawState(this.getView().getState(jb),eb);this.addForeignObjectWarning(eb,db);Oa?this.disableSvgLinks(db):this.updateSvgLinks(db,ta,!0);return db}finally{this.enableFlowAnimation=kb,Xa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(x,M){if("0"!=urlParams["svg-warning"]&&0<M.getElementsByTagName("foreignObject").length){var Q=x.createElement("switch"),-V=x.createElement("g");V.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ia=x.createElement("a");ia.setAttribute("transform","translate(0,-5)");null==ia.setAttributeNS||M.ownerDocument!=document&&null==document.documentMode?(ia.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ia.setAttribute("target","_blank")):(ia.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ia.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));-x=x.createElement("text");x.setAttribute("text-anchor","middle");x.setAttribute("font-size","10px");x.setAttribute("x","50%");x.setAttribute("y","100%");mxUtils.write(x,Graph.foreignObjectWarningText);Q.appendChild(V);ia.appendChild(x);Q.appendChild(ia);M.appendChild(Q)}};Graph.prototype.disableSvgLinks=function(x,M){x=x.getElementsByTagName("a");for(var Q=0;Q<x.length;Q++){var V=x[Q].getAttribute("href");null==V&&(V=x[Q].getAttribute("xlink:href"));null!=V&&(x[Q].style.pointerEvents="none",x[Q].setAttribute("href",-""));M&&M(x[Q])}};Graph.prototype.updateSvgLinks=function(x,M,Q){x=x.getElementsByTagName("a");for(var V=0;V<x.length;V++)if(null==x[V].getAttribute("target")){var ia=x[V].getAttribute("href");null==ia&&(ia=x[V].getAttribute("xlink:href"));null!=ia&&(null!=M&&/^https?:\/\//.test(ia)?x[V].setAttribute("target",M):Q&&this.isCustomLink(ia)&&x[V].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(x){x=new mxSvgCanvas2D(x);x.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;-x.adaptiveColors=this.getAdaptiveColors();x.pointerEvents=!0;return x};Graph.prototype.getSelectedElement=function(){var x=null;if(window.getSelection){var M=window.getSelection();M.getRangeAt&&M.rangeCount&&(x=M.getRangeAt(0).commonAncestorContainer)}else document.selection&&(x=document.selection.createRange().parentElement());return x};Graph.prototype.getSelectedEditingElement=function(){var x=null;if(null!=this.cellEditor.textarea)for(x=this.getSelectedElement();null!=x&&x.nodeType!=mxConstants.NODETYPE_ELEMENT;)x=-x.parentNode;return x};Graph.prototype.getParentByName=function(x,M,Q){for(;null!=x&&x.nodeName!=M;){if(x==Q)return null;x=x.parentNode}return x};Graph.prototype.getParentByNames=function(x,M,Q){for(;null!=x&&!(0<=mxUtils.indexOf(M,x.nodeName));){if(x==Q)return null;x=x.parentNode}return x};Graph.prototype.selectNode=function(x){var M=null;if(window.getSelection){if(M=window.getSelection(),M.getRangeAt&&M.rangeCount){var Q=document.createRange();Q.selectNode(x);M.removeAllRanges();M.addRange(Q)}}else(M=-document.selection)&&"Control"!=M.type&&(x=M.createRange(),x.collapse(!0),Q=M.createRange(),Q.setEndPoint("StartToStart",x),Q.select())};Graph.prototype.flipEdgePoints=function(x,M,Q){var V=this.getCellGeometry(x);if(null!=V){V=V.clone();if(null!=V.points)for(var ia=0;ia<V.points.length;ia++)M?V.points[ia].x=Q+(Q-V.points[ia].x):V.points[ia].y=Q+(Q-V.points[ia].y);ia=function(ka){null!=ka&&(M?ka.x=Q+(Q-ka.x):ka.y=Q+(Q-ka.y))};ia(V.getTerminalPoint(!0));ia(V.getTerminalPoint(!1));this.model.setGeometry(x,-V)}};Graph.prototype.flipChildren=function(x,M,Q){this.model.beginUpdate();try{for(var V=this.model.getChildCount(x),ia=0;ia<V;ia++){var ka=this.model.getChildAt(x,ia);if(this.model.isEdge(ka))this.flipEdgePoints(ka,M,Q);else{var oa=this.getCellGeometry(ka);null!=oa&&(oa=oa.clone(),M?oa.x=Q+(Q-oa.x-oa.width):oa.y=Q+(Q-oa.y-oa.height),this.model.setGeometry(ka,oa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(x,M){this.model.beginUpdate();try{x=this.model.getTopmostCells(x);-for(var Q=[],V=0;V<x.length;V++)if(this.model.isEdge(x[V])){var ia=this.view.getState(x[V]);null!=ia&&this.flipEdgePoints(x[V],M,(M?ia.getCenterX():ia.getCenterY())/this.view.scale-(M?ia.origin.x:ia.origin.y)-(M?this.view.translate.x:this.view.translate.y))}else{var ka=this.getCellGeometry(x[V]);null!=ka&&this.flipChildren(x[V],M,M?ka.getCenterX()-ka.x:ka.getCenterY()-ka.y);Q.push(x[V])}this.toggleCellStyles(M?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,Q)}finally{this.model.endUpdate()}};-Graph.prototype.deleteCells=function(x,M){var Q=null;if(null!=x&&0<x.length){this.model.beginUpdate();try{for(var V=0;V<x.length;V++){var ia=this.model.getParent(x[V]);if(this.isTable(ia)){var ka=this.getCellGeometry(x[V]),oa=this.getCellGeometry(ia);null!=ka&&null!=oa&&(oa=oa.clone(),oa.height-=ka.height,this.model.setGeometry(ia,oa))}}var xa=this.selectParentAfterDelete?this.model.getParents(x):null;this.removeCells(x,M)}finally{this.model.endUpdate()}if(null!=xa)for(Q=[],V=0;V<xa.length;V++)this.model.contains(xa[V])&&-(this.model.isVertex(xa[V])||this.model.isEdge(xa[V]))&&Q.push(xa[V])}return Q};Graph.prototype.insertTableColumn=function(x,M){var Q=this.getModel();Q.beginUpdate();try{var V=x,ia=0;if(this.isTableCell(x)){var ka=Q.getParent(x);V=Q.getParent(ka);ia=mxUtils.indexOf(Q.getChildCells(ka,!0),x)}else this.isTableRow(x)?V=Q.getParent(x):x=Q.getChildCells(V,!0)[0],M||(ia=Q.getChildCells(x,!0).length-1);var oa=Q.getChildCells(V,!0),xa=Graph.minTableColumnWidth;for(x=0;x<oa.length;x++){var ta=Q.getChildCells(oa[x],-!0)[ia],ua=Q.cloneCell(ta,!1);null==ua&&(ua=this.createVertex());var Fa=this.getCellGeometry(ua);ua.value=null;ua.style=mxUtils.setStyle(mxUtils.setStyle(ua.style,"rowspan",null),"colspan",null);if(null!=Fa){null!=Fa.alternateBounds&&(Fa.width=Fa.alternateBounds.width,Fa.height=Fa.alternateBounds.height,Fa.alternateBounds=null);xa=Fa.width;var Na=this.getCellGeometry(oa[x]);null!=Na&&(Fa.height=Na.height)}Q.add(oa[x],ua,ia+(M?0:1))}var Wa=this.getCellGeometry(V);null!=Wa&&(Wa=Wa.clone(),Wa.width+=-xa,Q.setGeometry(V,Wa))}finally{Q.endUpdate()}};Graph.prototype.deleteLane=function(x){var M=this.getModel();M.beginUpdate();try{var Q=null;Q="stackLayout"==this.getCurrentCellStyle(x).childLayout?x:M.getParent(x);var V=M.getChildCells(Q,!0);0==V.length?M.remove(Q):(Q==x&&(x=V[V.length-1]),M.remove(x))}finally{M.endUpdate()}};Graph.prototype.insertLane=function(x,M){var Q=this.getModel();Q.beginUpdate();try{var V=null;if("stackLayout"==this.getCurrentCellStyle(x).childLayout){V=x;var ia=Q.getChildCells(V,-!0);x=ia[M?0:ia.length-1]}else V=Q.getParent(x);var ka=V.getIndex(x);x=Q.cloneCell(x,!1);x.value=null;Q.add(V,x,ka+(M?0:1))}finally{Q.endUpdate()}};Graph.prototype.insertTableRow=function(x,M){var Q=this.getModel();Q.beginUpdate();try{var V=x,ia=x;if(this.isTableCell(x))ia=Q.getParent(x),V=Q.getParent(ia);else if(this.isTableRow(x))V=Q.getParent(x);else{var ka=Q.getChildCells(V,!0);ia=ka[M?0:ka.length-1]}var oa=Q.getChildCells(ia,!0),xa=V.getIndex(ia);ia=Q.cloneCell(ia,!1);ia.value=null;var ta=this.getCellGeometry(ia);-if(null!=ta){for(ka=0;ka<oa.length;ka++){x=Q.cloneCell(oa[ka],!1);x.value=null;x.style=mxUtils.setStyle(mxUtils.setStyle(x.style,"rowspan",null),"colspan",null);var ua=this.getCellGeometry(x);null!=ua&&(null!=ua.alternateBounds&&(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null),ua.height=ta.height);ia.insert(x)}Q.add(V,ia,xa+(M?0:1));var Fa=this.getCellGeometry(V);null!=Fa&&(Fa=Fa.clone(),Fa.height+=ta.height,Q.setGeometry(V,Fa))}}finally{Q.endUpdate()}};-Graph.prototype.deleteTableColumn=function(x){var M=this.getModel();M.beginUpdate();try{var Q=x,V=x;this.isTableCell(x)&&(V=M.getParent(x));this.isTableRow(V)&&(Q=M.getParent(V));var ia=M.getChildCells(Q,!0);if(0==ia.length)M.remove(Q);else{this.isTableRow(V)||(V=ia[0]);var ka=M.getChildCells(V,!0);if(1>=ka.length)M.remove(Q);else{var oa=ka.length-1;this.isTableCell(x)&&(oa=mxUtils.indexOf(ka,x));for(V=x=0;V<ia.length;V++){var xa=M.getChildCells(ia[V],!0)[oa];M.remove(xa);var ta=this.getCellGeometry(xa);-null!=ta&&(x=Math.max(x,ta.width))}var ua=this.getCellGeometry(Q);null!=ua&&(ua=ua.clone(),ua.width-=x,M.setGeometry(Q,ua))}}}finally{M.endUpdate()}};Graph.prototype.deleteTableRow=function(x){var M=this.getModel();M.beginUpdate();try{var Q=x,V=x;this.isTableCell(x)&&(x=V=M.getParent(x));this.isTableRow(x)&&(Q=M.getParent(V));var ia=M.getChildCells(Q,!0);if(1>=ia.length)M.remove(Q);else{this.isTableRow(V)||(V=ia[ia.length-1]);M.remove(V);x=0;var ka=this.getCellGeometry(V);null!=ka&&(x=ka.height);-var oa=this.getCellGeometry(Q);null!=oa&&(oa=oa.clone(),oa.height-=x,M.setGeometry(Q,oa))}}finally{M.endUpdate()}};Graph.prototype.insertRow=function(x,M){for(var Q=x.tBodies[0],V=Q.rows[0].cells,ia=x=0;ia<V.length;ia++){var ka=V[ia].getAttribute("colspan");x+=null!=ka?parseInt(ka):1}M=Q.insertRow(M);for(ia=0;ia<x;ia++)mxUtils.br(M.insertCell(-1));return M.cells[0]};Graph.prototype.deleteRow=function(x,M){x.tBodies[0].deleteRow(M)};Graph.prototype.insertColumn=function(x,M){var Q=x.tHead;if(null!=-Q)for(var V=0;V<Q.rows.length;V++){var ia=document.createElement("th");Q.rows[V].appendChild(ia);mxUtils.br(ia)}x=x.tBodies[0];for(Q=0;Q<x.rows.length;Q++)V=x.rows[Q].insertCell(M),mxUtils.br(V);return x.rows[0].cells[0<=M?M:x.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(x,M){if(0<=M){x=x.tBodies[0].rows;for(var Q=0;Q<x.length;Q++)x[Q].cells.length>M&&x[Q].deleteCell(M)}};Graph.prototype.pasteHtmlAtCaret=function(x){if(window.getSelection){var M=window.getSelection();if(M.getRangeAt&&-M.rangeCount){M=M.getRangeAt(0);M.deleteContents();var Q=document.createElement("div");Q.innerHTML=x;x=document.createDocumentFragment();for(var V;V=Q.firstChild;)lastNode=x.appendChild(V);M.insertNode(x)}}else(M=document.selection)&&"Control"!=M.type&&M.createRange().pasteHTML(x)};Graph.prototype.createLinkForHint=function(x,M,Q){function V(ka,oa){ka.length>oa&&(ka=ka.substring(0,Math.round(oa/2))+"..."+ka.substring(ka.length-Math.round(oa/4)));return ka}x=null!=x?x:"javascript:void(0);";if(null==-M||0==M.length)M=this.isCustomLink(x)?this.getLinkTitle(x):x;var ia=document.createElement("a");ia.setAttribute("rel",this.linkRelation);ia.setAttribute("href",this.getAbsoluteUrl(x));ia.setAttribute("title",V(this.isCustomLink(x)?this.getLinkTitle(x):x,80));null!=this.linkTarget&&ia.setAttribute("target",this.linkTarget);mxUtils.write(ia,V(M,40));this.isCustomLink(x)&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ka){this.customLinkClicked(x,Q);mxEvent.consume(ka)}));return ia};Graph.prototype.initTouch=+x&&(new mxCodec(x.ownerDocument)).decode(x,this.getStylesheet())};Graph.prototype.createCellLookup=function(x,L){L=null!=L?L:{};for(var R=0;R<x.length;R++){var W=x[R];L[mxObjectIdentity.get(W)]=W.getId();for(var ja=this.model.getChildCount(W),ka=0;ka<ja;ka++)this.createCellLookup([this.model.getChildAt(W,ka)],L)}return L};Graph.prototype.createCellMapping=function(x,L,R){R=null!=R?R:{};for(var W in x){var ja=L[W];null==R[ja]&&(R[ja]=x[W].getId()||"")}return R};Graph.prototype.importGraphModel=function(x,+L,R,W){L=null!=L?L:0;R=null!=R?R:0;var ja=new mxCodec(x.ownerDocument),ka=new mxGraphModel;ja.decode(x,ka);x=[];ja={};var oa={},va=ka.getChildren(this.cloneCell(ka.root,this.isCloneInvalidEdges(),ja));if(null!=va){var ta=this.createCellLookup([ka.root]);va=va.slice();this.model.beginUpdate();try{if(1!=va.length||this.isCellLocked(this.getDefaultParent()))for(ka=0;ka<va.length;ka++)xa=this.model.getChildren(this.moveCells([va[ka]],L,R,!1,this.model.getRoot())[0]),null!=xa&&(x=x.concat(xa));else{var xa=+ka.getChildren(va[0]);null!=xa&&(x=this.moveCells(xa,L,R,!1,this.getDefaultParent()),oa[ka.getChildAt(ka.root,0).getId()]=this.getDefaultParent().getId())}if(null!=x&&(this.createCellMapping(ja,ta,oa),this.updateCustomLinks(oa,x),W)){this.isGridEnabled()&&(L=this.snap(L),R=this.snap(R));var Fa=this.getBoundingBoxFromGeometry(x,!0);null!=Fa&&this.moveCells(x,L-Fa.x,R-Fa.y)}}finally{this.model.endUpdate()}}return x};Graph.prototype.encodeCells=function(x){for(var L={},R=this.cloneCells(x,null,L),W=+new mxDictionary,ja=0;ja<x.length;ja++)W.put(x[ja],!0);var ka=new mxCodec,oa=new mxGraphModel,va=oa.getChildAt(oa.getRoot(),0);for(ja=0;ja<R.length;ja++){oa.add(va,R[ja]);var ta=this.view.getState(x[ja]);if(null!=ta){var xa=this.getCellGeometry(R[ja]);null!=xa&&xa.relative&&!this.model.isEdge(x[ja])&&null==W.get(this.model.getParent(x[ja]))&&(xa.offset=null,xa.relative=!1,xa.x=ta.x/ta.view.scale-ta.view.translate.x,xa.y=ta.y/ta.view.scale-ta.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(L,+this.createCellLookup(x)),R);return ka.encode(oa)};Graph.prototype.isSwimlane=function(x,L){var R=null;null==x||this.model.isEdge(x)||this.model.getParent(x)==this.model.getRoot()||(R=this.getCurrentCellStyle(x,L)[mxConstants.STYLE_SHAPE]);return R==mxConstants.SHAPE_SWIMLANE||"table"==R||"tableRow"==R};var H=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(x){return null!=x&&H.apply(this,arguments)?this.isTableCell(x)||this.isTableRow(x)?this.isCellEditable(this.model.getParent(x)):+!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(x){return null!=x&&S.apply(this,arguments)?this.isTableCell(x)||this.isTableRow(x)?this.isCellMovable(this.model.getParent(x)):!0:!1};var G=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(x){var L=this.model.getParent(x);if(null!=L){var R=this.getCurrentCellStyle(L);if(null!=R.expand)return"0"!=R.expand}return G.apply(this,arguments)&&(null==L||!this.isTable(L))};var P=Graph.prototype.splitEdge;+Graph.prototype.splitEdge=function(x,L,R,W,ja,ka,oa,va){null==va&&(va=this.model.getParent(x),this.isTable(va)||this.isTableRow(va))&&(va=this.getCellAt(ka,oa,null,!0,!1));R=null;this.model.beginUpdate();try{R=P.apply(this,[x,L,R,W,ja,ka,oa,va]);this.model.setValue(R,"");var ta=this.getChildCells(R,!0);for(L=0;L<ta.length;L++){var xa=this.getCellGeometry(ta[L]);null!=xa&&xa.relative&&0<xa.x&&this.model.remove(ta[L])}var Fa=this.getChildCells(x,!0);for(L=0;L<Fa.length;L++)xa=this.getCellGeometry(Fa[L]),+null!=xa&&xa.relative&&0>=xa.x&&this.model.remove(Fa[L]);var Ma=this.model.getTerminal(R,!1);if(null!=Ma){var Wa=this.getCurrentCellStyle(Ma);null!=Wa&&"1"==Wa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[x]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[x]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{this.model.endUpdate()}return R};var Q=Graph.prototype.selectCell;Graph.prototype.selectCell=function(x,+L,R){if(L||R)Q.apply(this,arguments);else{var W=this.getSelectionCell(),ja=null,ka=[],oa=mxUtils.bind(this,function(va){if(null!=this.view.getState(va)&&(this.model.isVertex(va)||this.model.isEdge(va)))if(ka.push(va),va==W)ja=ka.length-1;else if(x&&null==W&&0<ka.length||null!=ja&&x&&ka.length>ja||!x&&0<ja)return;for(var ta=0;ta<this.model.getChildCount(va);ta++)oa(this.model.getChildAt(va,ta))});oa(this.model.root);0<ka.length&&(ja=null!=ja?mxUtils.mod(ja+(x?1:-1),ka.length):0,this.setSelectionCell(ka[ja]))}};+Graph.prototype.swapShapes=function(x,L){if(this.model.isVertex(x)&&this.model.isVertex(L)&&2==this.getMovableCells([x,L]).length){var R=this.getCellGeometry(x),W=this.getCellGeometry(L);if(null!=R&&null!=W){var ja=R.clone(),ka=W.clone();this.model.beginUpdate();try{ja.x=W.getCenterX()-R.width/2,ja.y=W.getCenterY()-R.height/2,ka.x=R.getCenterX()-W.width/2,ka.y=R.getCenterY()-W.height/2,this.model.setGeometry(x,ja),this.model.setGeometry(L,ka)}finally{this.model.endUpdate()}}}};var c=Graph.prototype.moveCells;+Graph.prototype.moveCells=function(x,L,R,W,ja,ka,oa){oa=null!=oa?oa:{};if(this.isTable(ja)){for(var va=[],ta=0;ta<x.length;ta++)this.isTable(x[ta])?va=va.concat(this.model.getChildCells(x[ta],!0).reverse()):va.push(x[ta]);x=va}this.model.beginUpdate();try{va=[];for(ta=0;ta<x.length;ta++)if(null!=ja&&this.isTableRow(x[ta])){var xa=this.model.getParent(x[ta]),Fa=this.getCellGeometry(x[ta]);this.isTable(xa)&&va.push(xa);if(null!=xa&&null!=Fa&&this.isTable(xa)&&this.isTable(ja)&&(W||xa!=ja)){if(!W){var Ma=+this.getCellGeometry(xa);null!=Ma&&(Ma=Ma.clone(),Ma.height-=Fa.height,this.model.setGeometry(xa,Ma))}Ma=this.getCellGeometry(ja);null!=Ma&&(Ma=Ma.clone(),Ma.height+=Fa.height,this.model.setGeometry(ja,Ma));var Wa=this.model.getChildCells(ja,!0);if(0<Wa.length){x[ta]=W?this.cloneCell(x[ta]):x[ta];var Xa=this.model.getChildCells(x[ta],!0),ab=this.model.getChildCells(Wa[0],!0),Oa=ab.length-Xa.length;if(0<Oa)for(var Ra=0;Ra<Oa;Ra++){var kb=this.cloneCell(Xa[Xa.length-1]);null!=kb&&(kb.value="",this.model.add(x[ta],+kb))}else if(0>Oa)for(Ra=0;Ra>Oa;Ra--)this.model.remove(Xa[Xa.length+Ra-1]);Xa=this.model.getChildCells(x[ta],!0);for(Ra=0;Ra<ab.length;Ra++){var cb=this.getCellGeometry(ab[Ra]),Za=this.getCellGeometry(Xa[Ra]);null!=cb&&null!=Za&&(Za=Za.clone(),Za.width=cb.width,this.model.setGeometry(Xa[Ra],Za))}}}}var gb=c.apply(this,arguments);for(ta=0;ta<va.length;ta++)!W&&this.model.contains(va[ta])&&0==this.model.getChildCount(va[ta])&&this.model.remove(va[ta]);W&&this.updateCustomLinks(this.createCellMapping(oa,+this.createCellLookup(x)),gb)}finally{this.model.endUpdate()}return gb};var f=Graph.prototype.removeCells;Graph.prototype.removeCells=function(x,L){var R=[];this.model.beginUpdate();try{for(var W=0;W<x.length;W++)if(this.isTableCell(x[W])){var ja=this.model.getParent(x[W]),ka=this.model.getParent(ja);1==this.model.getChildCount(ja)&&1==this.model.getChildCount(ka)?0>mxUtils.indexOf(x,ka)&&0>mxUtils.indexOf(R,ka)&&R.push(ka):this.labelChanged(x[W],"")}else{if(this.isTableRow(x[W])&&(ka=this.model.getParent(x[W]),+0>mxUtils.indexOf(x,ka)&&0>mxUtils.indexOf(R,ka))){for(var oa=this.model.getChildCells(ka,!0),va=0,ta=0;ta<oa.length;ta++)0<=mxUtils.indexOf(x,oa[ta])&&va++;va==oa.length&&R.push(ka)}R.push(x[W])}R=f.apply(this,[R,L])}finally{this.model.endUpdate()}return R};Graph.prototype.updateCustomLinks=function(x,L,R){R=null!=R?R:new Graph;for(var W=0;W<L.length;W++)null!=L[W]&&R.updateCustomLinksForCell(x,L[W],R)};Graph.prototype.updateCustomLinksForCell=function(x,L){this.doUpdateCustomLinksForCell(x,L);for(var R=+this.model.getChildCount(L),W=0;W<R;W++)this.updateCustomLinksForCell(x,this.model.getChildAt(L,W))};Graph.prototype.doUpdateCustomLinksForCell=function(x,L){};Graph.prototype.getAllConnectionConstraints=function(x,L){if(null!=x){L=mxUtils.getValue(x.style,"points",null);if(null!=L){x=[];try{var R=JSON.parse(L);for(L=0;L<R.length;L++){var W=R[L];x.push(new mxConnectionConstraint(new mxPoint(W[0],W[1]),2<W.length?"0"!=W[2]:!0,null,3<W.length?W[3]:0,4<W.length?W[4]:0))}}catch(ka){}return x}if(null!=+x.shape&&null!=x.shape.bounds){W=x.shape.direction;L=x.shape.bounds;var ja=x.shape.scale;R=L.width/ja;L=L.height/ja;if(W==mxConstants.DIRECTION_NORTH||W==mxConstants.DIRECTION_SOUTH)W=R,R=L,L=W;L=x.shape.getConstraints(x.style,R,L);if(null!=L)return L;if(null!=x.shape.stencil&&null!=x.shape.stencil.constraints)return x.shape.stencil.constraints;if(null!=x.shape.constraints)return x.shape.constraints}}return null};Graph.prototype.flipEdge=function(x){if(null!=x){var L=this.getCurrentCellStyle(x);L=+mxUtils.getValue(L,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,L,[x])}};Graph.prototype.isValidRoot=function(x){for(var L=this.model.getChildCount(x),R=0,W=0;W<L;W++){var ja=this.model.getChildAt(x,W);this.model.isVertex(ja)&&(ja=this.getCellGeometry(ja),null==ja||ja.relative||R++)}return 0<R||this.isContainer(x)};Graph.prototype.isValidDropTarget=function(x,L,+R){for(var W=this.getCurrentCellStyle(x),ja=!0,ka=!0,oa=0;oa<L.length&&ka;oa++)ja=ja&&this.isTable(L[oa]),ka=ka&&this.isTableRow(L[oa]);return!this.isCellLocked(x)&&(this.isTargetShape(x,L,R)||("1"!=mxUtils.getValue(W,"part","0")||this.isContainer(x))&&"0"!=mxUtils.getValue(W,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(x))&&!this.isTableRow(x)&&(!this.isTable(x)||ka||ja))};Graph.prototype.createGroupCell=function(){var x=mxGraph.prototype.createGroupCell.apply(this,+arguments);x.setStyle("group");return x};Graph.prototype.isExtendParentsOnAdd=function(x){var L=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(L&&null!=x&&null!=this.layoutManager){var R=this.model.getParent(x);null!=R&&(R=this.layoutManager.getLayout(R),null!=R&&R.constructor==mxStackLayout&&(L=!1))}return L};Graph.prototype.getPreferredSizeForCell=function(x,L,R){R=null!=R?R:this.gridEnabled;var W=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=W&&(W.width+=+10,W.height+=4,R&&(W.width=this.snap(W.width),W.height=this.snap(W.height)));return W};Graph.prototype.turnShapes=function(x,L){var R=this.getModel(),W=[];R.beginUpdate();try{for(var ja=0;ja<x.length;ja++){var ka=x[ja];if(R.isEdge(ka)){var oa=R.getTerminal(ka,!0),va=R.getTerminal(ka,!1);R.setTerminal(ka,va,!0);R.setTerminal(ka,oa,!1);var ta=R.getGeometry(ka);if(null!=ta){ta=ta.clone();null!=ta.points&&ta.points.reverse();var xa=ta.getTerminalPoint(!0),Fa=ta.getTerminalPoint(!1);ta.setTerminalPoint(xa,+!1);ta.setTerminalPoint(Fa,!0);R.setGeometry(ka,ta);var Ma=this.view.getState(ka),Wa=this.view.getState(oa),Xa=this.view.getState(va);if(null!=Ma){var ab=null!=Wa?this.getConnectionConstraint(Ma,Wa,!0):null,Oa=null!=Xa?this.getConnectionConstraint(Ma,Xa,!1):null;this.setConnectionConstraint(ka,oa,!0,Oa);this.setConnectionConstraint(ka,va,!1,ab);var Ra=mxUtils.getValue(Ma.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ma.style,+mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ka]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ra,[ka])}W.push(ka)}}else if(R.isVertex(ka)&&(ta=this.getCellGeometry(ka),null!=ta)){if(!(this.isTable(ka)||this.isTableRow(ka)||this.isTableCell(ka)||this.isSwimlane(ka))){ta=ta.clone();ta.x+=ta.width/2-ta.height/2;ta.y+=ta.height/2-ta.width/2;var kb=ta.width;ta.width=ta.height;ta.height=kb;R.setGeometry(ka,ta)}var cb=this.view.getState(ka);if(null!=cb){var Za=[mxConstants.DIRECTION_EAST,+mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],gb=mxUtils.getValue(cb.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Za[mxUtils.mod(mxUtils.indexOf(Za,gb)+(L?-1:1),Za.length)],[ka])}W.push(ka)}}}finally{R.endUpdate()}return W};Graph.prototype.stencilHasPlaceholders=function(x){if(null!=x&&null!=x.fgNode)for(x=x.fgNode.firstChild;null!=x;){if("text"==x.nodeName&&"1"==x.getAttribute("placeholders"))return!0;+x=x.nextSibling}return!1};var l=Graph.prototype.processChange;Graph.prototype.processChange=function(x){if(x instanceof mxGeometryChange&&(this.isTableCell(x.cell)||this.isTableRow(x.cell))&&(null==x.previous&&null!=x.geometry||null!=x.previous&&!x.previous.equals(x.geometry))){var L=x.cell;this.isTableCell(L)&&(L=this.model.getParent(L));this.isTableRow(L)&&(L=this.model.getParent(L));var R=this.view.getState(L);null!=R&&null!=R.shape&&(this.view.invalidate(L),R.shape.bounds=null)}l.apply(this,arguments);+x instanceof mxValueChange&&null!=x.cell&&null!=x.cell.value&&"object"==typeof x.cell.value&&this.invalidateDescendantsWithPlaceholders(x.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(x){x=this.model.getDescendants(x);if(0<x.length)for(var L=0;L<x.length;L++){var R=this.view.getState(x[L]);null!=R&&null!=R.shape&&null!=R.shape.stencil&&this.stencilHasPlaceholders(R.shape.stencil)?this.removeStateForCell(x[L]):this.isReplacePlaceholders(x[L])&&this.view.invalidate(x[L],!1,!1)}};+Graph.prototype.replaceElement=function(x,L){L=x.ownerDocument.createElement(null!=L?L:"span");for(var R=Array.prototype.slice.call(x.attributes);attr=R.pop();)L.setAttribute(attr.nodeName,attr.nodeValue);L.innerHTML=x.innerHTML;x.parentNode.replaceChild(L,x)};Graph.prototype.processElements=function(x,L){if(null!=x){x=x.getElementsByTagName("*");for(var R=0;R<x.length;R++)null!=x[R]&&L(x[R])}};Graph.prototype.updateLabelElements=function(x,L,R){x=null!=x?x:this.getSelectionCells();for(var W=document.createElement("div"),+ja=0;ja<x.length;ja++){var ka=this.getCurrentCellStyle(x[ja]);if(null!=ka&&"1"==ka.html&&(ka=this.convertValueToString(x[ja]),null!=ka&&0<ka.length)){W.innerHTML=Graph.sanitizeHtml(ka);for(var oa=W.getElementsByTagName(null!=R?R:"*"),va=0;va<oa.length;va++)L(oa[va]);W.innerHTML!=ka&&this.cellLabelChanged(x[ja],W.innerHTML)}}};Graph.prototype.cellLabelChanged=function(x,L,R){L=Graph.zapGremlins(L);this.model.beginUpdate();try{if(null!=x.value&&"object"==typeof x.value){if(this.isReplacePlaceholders(x)&&+null!=x.getAttribute("placeholder"))for(var W=x.getAttribute("placeholder"),ja=x;null!=ja;){if(ja==this.model.getRoot()||null!=ja.value&&"object"==typeof ja.value&&ja.hasAttribute(W)){this.setAttributeForCell(ja,W,L);break}ja=this.model.getParent(ja)}var ka=x.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ka.hasAttribute("label_"+Graph.diagramLanguage)?ka.setAttribute("label_"+Graph.diagramLanguage,L):ka.setAttribute("label",L);L=ka}mxGraph.prototype.cellLabelChanged.apply(this,+arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(x){if(null!=x){for(var L=new mxDictionary,R=0;R<x.length;R++)L.put(x[R],!0);var W=[];for(R=0;R<x.length;R++){var ja=this.model.getParent(x[R]);null==ja||L.get(ja)||(L.put(ja,!0),W.push(ja))}for(R=0;R<W.length;R++)if(ja=this.view.getState(W[R]),null!=ja&&(this.model.isEdge(ja.cell)||this.model.isVertex(ja.cell))&&this.isCellDeletable(ja.cell)&&this.isTransparentState(ja)){for(var ka=!0,oa=0;oa<this.model.getChildCount(ja.cell)&&+ka;oa++)L.get(this.model.getChildAt(ja.cell,oa))||(ka=!1);ka&&x.push(ja.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(x){for(var L=[],R=0;R<x.length;R++)this.isCellDeletable(x[R])&&this.isTransparentState(this.view.getState(x[R]))&&L.push(x[R]);x=L;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(x,L){this.setAttributeForCell(x,"link",L)};Graph.prototype.setTooltipForCell=function(x,+L){var R="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(x.value)&&x.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(x,R,L)};Graph.prototype.getAttributeForCell=function(x,L,R){x=null!=x.value&&"object"===typeof x.value?x.value.getAttribute(L):null;return null!=x?x:R};Graph.prototype.setAttributeForCell=function(x,L,R){if(null!=x.value&&"object"==typeof x.value)var W=x.value.cloneNode(!0);else W=mxUtils.createXmlDocument().createElement("UserObject"),+W.setAttribute("label",x.value||"");null!=R?W.setAttribute(L,R):W.removeAttribute(L);this.model.setValue(x,W)};Graph.prototype.isTargetShape=function(x,L,R){x=mxUtils.getValue(this.getCurrentCellStyle(x),mxConstants.STYLE_SHAPE,"");for(R=0;R<L.length;R++){var W=mxUtils.getValue(this.getCurrentCellStyle(L[R]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(W,x))return!0}return!1};var t=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(x,L,R,W){if(mxEvent.isAltDown(L))return null;+for(var ja=0;ja<x.length;ja++){var ka=this.model.getParent(x[ja]);if(this.model.isEdge(ka)&&0>mxUtils.indexOf(x,ka))return null}ka=t.apply(this,arguments);var oa=!0;for(ja=0;ja<x.length&&oa;ja++)oa=oa&&this.isTableRow(x[ja]);oa&&(this.isTableCell(ka)&&(ka=this.model.getParent(ka)),this.isTableRow(ka)&&(ka=this.model.getParent(ka)),this.isTable(ka)||(ka=null));return ka};Graph.prototype.click=function(x){mxGraph.prototype.click.call(this,x);this.firstClickState=x.getState();this.firstClickSource=x.getSource()};+Graph.prototype.dblClick=function(x,L){this.isEnabled()&&(L=this.insertTextForEvent(x,L),mxGraph.prototype.dblClick.call(this,x,L))};Graph.prototype.insertTextForEvent=function(x,L){var R=mxUtils.convertPoint(this.container,mxEvent.getClientX(x),mxEvent.getClientY(x));if(null!=x&&!this.model.isVertex(L)){var W=this.model.isEdge(L)?this.view.getState(L):null,ja=mxEvent.getSource(x);this.firstClickState!=W||this.firstClickSource!=ja||null!=W&&null!=W.text&&null!=W.text.node&&null!=W.text.boundingBox&&+(mxUtils.contains(W.text.boundingBox,R.x,R.y)||mxUtils.isAncestorNode(W.text.node,mxEvent.getSource(x)))||(null!=W||this.isCellLocked(this.getDefaultParent()))&&(null==W||this.isCellLocked(W.cell))||!(null!=W||mxClient.IS_SVG&&ja==this.view.getCanvas().ownerSVGElement)||(null==W&&(W=this.view.getState(this.getCellAt(R.x,R.y))),L=this.addText(R.x,R.y,W))}return L};Graph.prototype.getInsertPoint=function(){var x=this.getGridSize(),L=this.container.scrollLeft/this.view.scale-this.view.translate.x,R=+this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var W=this.getPageLayout(),ja=this.getPageSize();L=Math.max(L,W.x*ja.width);R=Math.max(R,W.y*ja.height)}return new mxPoint(this.snap(L+x),this.snap(R+x))};Graph.prototype.getFreeInsertPoint=function(){var x=this.view,L=this.getGraphBounds(),R=this.getInsertPoint(),W=this.snap(Math.round(Math.max(R.x,L.x/x.scale-x.translate.x+(0==L.width?2*this.gridSize:0))));x=this.snap(Math.round(Math.max(R.y,(L.y+L.height)/x.scale-+x.translate.y+2*this.gridSize)));return new mxPoint(W,x)};Graph.prototype.getCenterInsertPoint=function(x){x=null!=x?x:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-x.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/+2/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-x.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(x,L){x=null!=x?x:"";null!=L&&(0<x.length&&";"!=x.charAt(x.length-1)&&(x+=";"),x+="fontSize="+L+";");return x};Graph.prototype.addText=function(x,L,R){var W=new mxCell;W.value="Text";W.geometry=new mxGeometry(0,0,0,0);W.vertex=!0;if(null!=R&&this.model.isEdge(R.cell)){W.style=+"edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);W.geometry.relative=!0;W.connectable=!1;var ja=this.view.getRelativePoint(R,x,L);W.geometry.x=Math.round(1E4*ja.x)/1E4;W.geometry.y=Math.round(ja.y);W.geometry.offset=new mxPoint(0,0);ja=this.view.getPoint(R,W.geometry);var ka=this.view.scale;W.geometry.offset=new mxPoint(Math.round((x-ja.x)/ka),Math.round((L-ja.y)/ka))}else ja=this.view.translate,W.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",+this.vertexFontSize),W.geometry.width=40,W.geometry.height=20,W.geometry.x=Math.round(x/this.view.scale)-ja.x-(null!=R?R.origin.x:0),W.geometry.y=Math.round(L/this.view.scale)-ja.y-(null!=R?R.origin.y:0),W.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([W],null!=R?R.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[W])),this.autoSizeCell(W)}finally{this.getModel().endUpdate()}return W};Graph.prototype.addClickHandler=function(x,L,R){var W=mxUtils.bind(this,+function(){var ta=this.container.getElementsByTagName("a");if(null!=ta)for(var xa=0;xa<ta.length;xa++){var Fa=this.getAbsoluteUrl(ta[xa].getAttribute("href"));null!=Fa&&(ta[xa].setAttribute("rel",this.linkRelation),ta[xa].setAttribute("href",Fa),null!=L&&mxEvent.addGestureListeners(ta[xa],null,null,L))}});this.model.addListener(mxEvent.CHANGE,W);W();var ja=this.container.style.cursor,ka=this.getTolerance(),oa=this,va={currentState:null,currentLink:null,currentTarget:null,highlight:null!=x&&""!=x&&+x!=mxConstants.NONE?new mxCellHighlight(oa,x,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ta){var xa=ta.sourceState;if(null==xa||null==oa.getLinkForCell(xa.cell))ta=oa.getCellAt(ta.getGraphX(),ta.getGraphY(),null,null,null,function(Fa,Ma,Wa){return null==oa.getLinkForCell(Fa.cell)}),xa=null==xa||oa.model.isAncestor(ta,xa.cell)?oa.view.getState(ta):null;xa!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=xa,null!=this.currentState&&this.activate(this.currentState))},+mouseDown:function(ta,xa){this.startX=xa.getGraphX();this.startY=xa.getGraphY();this.scrollLeft=oa.container.scrollLeft;this.scrollTop=oa.container.scrollTop;null==this.currentLink&&"auto"==oa.container.style.overflow&&(oa.container.style.cursor="move");this.updateCurrentState(xa)},mouseMove:function(ta,xa){if(oa.isMouseDown)null!=this.currentLink&&(ta=Math.abs(this.startX-xa.getGraphX()),xa=Math.abs(this.startY-xa.getGraphY()),(ta>ka||xa>ka)&&this.clear());else{for(ta=xa.getSource();null!=ta&&"a"!=+ta.nodeName.toLowerCase();)ta=ta.parentNode;null!=ta?this.clear():(null!=oa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&oa.tooltipHandler.reset(xa,!0,this.currentState),(null==this.currentState||xa.getState()!=this.currentState&&null!=xa.sourceState||!oa.intersects(this.currentState,xa.getGraphX(),xa.getGraphY()))&&this.updateCurrentState(xa))}},mouseUp:function(ta,xa){var Fa=xa.getSource();for(ta=xa.getEvent();null!=Fa&&"a"!=Fa.nodeName.toLowerCase();)Fa=Fa.parentNode;null==+Fa&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-oa.container.scrollTop)<ka&&(null==xa.sourceState||!xa.isSource(xa.sourceState.control))&&((mxEvent.isLeftMouseButton(ta)||mxEvent.isMiddleMouseButton(ta))&&!mxEvent.isPopupTrigger(ta)||mxEvent.isTouchEvent(ta))&&(null!=this.currentLink?(Fa=oa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Fa||null==L||L(ta,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ta)||+(ta=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ta)?"_blank":Fa?oa.linkTarget:"_top",oa.openLink(this.currentLink,ta),xa.consume())):null!=R&&!xa.isConsumed()&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-oa.container.scrollTop)<ka&&Math.abs(this.startX-xa.getGraphX())<ka&&Math.abs(this.startY-xa.getGraphY())<ka&&R(xa.getEvent()));this.clear()},activate:function(ta){this.currentLink=oa.getAbsoluteUrl(oa.getLinkForCell(ta.cell));null!=this.currentLink&&+(this.currentTarget=oa.getLinkTargetForCell(ta.cell),oa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ta))},clear:function(){null!=oa.container&&(oa.container.style.cursor=ja);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=oa.tooltipHandler&&oa.tooltipHandler.hide()}};oa.click=function(ta){};oa.addMouseListener(va);mxEvent.addListener(document,"mouseleave",function(ta){va.clear()})};Graph.prototype.duplicateCells=+function(x,L){x=null!=x?x:this.getSelectionCells();L=null!=L?L:!0;for(var R=0;R<x.length;R++)this.isTableCell(x[R])&&(x[R]=this.model.getParent(x[R]));x=this.model.getTopmostCells(x);var W=this.getModel(),ja=this.gridSize,ka=[];W.beginUpdate();try{var oa={},va=this.createCellLookup(x),ta=this.cloneCells(x,!1,oa,!0);for(R=0;R<x.length;R++){var xa=W.getParent(x[R]);if(null!=xa){var Fa=this.moveCells([ta[R]],ja,ja,!1)[0];ka.push(Fa);if(L)W.add(xa,ta[R]);else{var Ma=xa.getIndex(x[R]);W.add(xa,ta[R],Ma++1)}if(this.isTable(xa)){var Wa=this.getCellGeometry(ta[R]),Xa=this.getCellGeometry(xa);null!=Wa&&null!=Xa&&(Xa=Xa.clone(),Xa.height+=Wa.height,W.setGeometry(xa,Xa))}}else ka.push(ta[R])}this.updateCustomLinks(this.createCellMapping(oa,va),ta,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ta))}finally{W.endUpdate()}return ka};Graph.prototype.insertImage=function(x,L,R){if(null!=x&&null!=this.cellEditor.textarea){for(var W=this.cellEditor.textarea.getElementsByTagName("img"),ja=+[],ka=0;ka<W.length;ka++)ja.push(W[ka]);document.execCommand("insertimage",!1,x);x=this.cellEditor.textarea.getElementsByTagName("img");if(x.length==ja.length+1)for(ka=x.length-1;0<=ka;ka--)if(0==ka||x[ka]!=ja[ka-1]){x[ka].setAttribute("width",L);x[ka].setAttribute("height",R);break}}};Graph.prototype.insertLink=function(x){if(null!=this.cellEditor.textarea)if(0==x.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var L=this.cellEditor.textarea.getElementsByTagName("a"),R=[],W=+0;W<L.length;W++)R.push(L[W]);document.execCommand("createlink",!1,mxUtils.trim(x));L=this.cellEditor.textarea.getElementsByTagName("a");if(L.length==R.length+1)for(W=L.length-1;0<=W;W--)if(L[W]!=R[W-1]){for(L=L[W].getElementsByTagName("a");0<L.length;){for(R=L[0].parentNode;null!=L[0].firstChild;)R.insertBefore(L[0].firstChild,L[0]);R.removeChild(L[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(x))};Graph.prototype.isCellResizable=function(x){var L=mxGraph.prototype.isCellResizable.apply(this,+arguments),R=this.getCurrentCellStyle(x);return!this.isTableCell(x)&&!this.isTableRow(x)&&(L||"0"!=mxUtils.getValue(R,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==R[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(x,L,R){null==L&&(L=this.getSelectionCells());if(null!=L&&1<L.length){for(var W=[],ja=null,ka=null,oa=0,va=0;va<L.length;va++)if(this.getModel().isVertex(L[va])){var ta=this.view.getState(L[va]);if(null!=ta){var xa=x?ta.getCenterX():ta.getCenterY();ja=null!=ja?Math.max(ja,+xa):xa;ka=null!=ka?Math.min(ka,xa):xa;R&&(oa+=x?ta.width:ta.height);W.push(ta)}}if(2<W.length){W.sort(function(ab,Oa){return x?ab.x-Oa.x:ab.y-Oa.y});R&&(oa-=x?W[0].width/2+W[W.length-1].width/2:W[0].height/2+W[W.length-1].height/2);ta=this.view.translate;xa=this.view.scale;ka=ka/xa-(x?ta.x:ta.y);ja=ja/xa-(x?ta.x:ta.y);this.getModel().beginUpdate();try{var Fa=(ja-ka-oa)/(W.length-1),Ma=ka+(R?x?W[0].width/2:W[0].height/2:0);for(va=1;va<W.length-1;va++){var Wa=this.view.getState(this.model.getParent(W[va].cell)),+Xa=this.getCellGeometry(W[va].cell);Ma+=Fa;null!=Xa&&null!=Wa&&(Xa=Xa.clone(),x?Xa.x=Math.round(Ma-(R?0:Xa.width/2))-Wa.origin.x:Xa.y=Math.round(Ma-(R?0:Xa.height/2))-Wa.origin.y,this.getModel().setGeometry(W[va].cell,Xa));R&&(Ma+=x?W[va].width:W[va].height)}}finally{this.getModel().endUpdate()}}}return L};Graph.prototype.isCloneEvent=function(x){return mxClient.IS_MAC&&mxEvent.isMetaDown(x)||mxEvent.isControlDown(x)};Graph.prototype.createSvgImageExport=function(x){x=new mxImageExport;x.addCellData=+function(R,W,ja){W.setAttribute("data-cell-id",R.id);if(ja)if(mxUtils.isNode(R.value))for(ja=0;ja<R.value.attributes.length;ja++){var ka=R.value.attributes[ja];W.setAttribute("data-cell-"+ka.name,ka.value)}else if("object"===typeof R.value)for(ka in R.value)W.setAttribute("data-cell-"+ka,R.value[ka]);else null!=R.value&&W.setAttribute("data-cell-value",R.value);return W};var L=x.visitStatesRecursive;x.visitStatesRecursive=function(R,W,ja){if(null!=R){var ka=W.root,oa=W.root.ownerDocument;W.root=this.addCellData(R.cell,+null!=oa.createElementNS?oa.createElementNS(mxConstants.NS_SVG,"g"):oa.createElement("g"),Editor.addSvgMetadata);ka.appendChild(W.root);L.apply(this,arguments);W.root=ka}};x.getLinkForCellState=mxUtils.bind(this,function(R,W){return this.getLinkForCell(R.cell)});x.getTitleForCellState=mxUtils.bind(this,function(R,W){return Editor.convertHtmlToText(this.convertValueToTooltip(R.cell))});return x};Graph.prototype.parseBackgroundImage=function(x){var L=null;null!=x&&0<x.length&&(x=JSON.parse(x),L=new mxImage(x.src,+x.width,x.height));return L};Graph.prototype.getBackgroundImageObject=function(x){return x};Graph.prototype.getSvg=function(x,L,R,W,ja,ka,oa,va,ta,xa,Fa,Ma,Wa,Xa,ab,Oa){var Ra=null;if(null!=Xa)for(Ra=new mxDictionary,Fa=0;Fa<Xa.length;Fa++)Ra.put(Xa[Fa],!0);Xa=this.useCssTransforms;var kb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Xa&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{L=null!=L?L:1;R=null!=R?R:0;ja=null!=ja?ja:!0;ka=null!=ka?ka:!0;oa=null!=oa?oa:+!0;xa=null!=xa?xa:!1;var cb="page"==Wa?this.view.getBackgroundPageBounds():ka&&null==Ra||W||"diagram"==Wa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Za=this.backgroundImage,gb=this.view.translate,hb=this.view.scale;"diagram"==Wa&&null!=Za&&null!=Za.width&&null!=Za.height&&(cb=mxRectangle.fromRectangle(cb),cb.add(new mxRectangle((gb.x+Za.x)*hb,(gb.y+Za.y)*hb,Za.width*hb,Za.height*hb)));if(null==cb)throw Error(mxResources.get("drawingEmpty"));W=L/hb;var vb=Math.max(1,Math.ceil(cb.width*+W)+2*R)+(xa&&0==R?5:0),mb=Math.max(1,Math.ceil(cb.height*W)+2*R)+(xa&&0==R?5:0);xa=ja?-.5:0;var pb=mxUtils.getLightDarkColor(x),db=Graph.createSvgNode(xa,xa,vb,mb,pb),qb=db.ownerDocument;if(null!=x){var nb=mxUtils.createElementNs(qb,mxConstants.NS_SVG,"rect");nb.setAttribute("fill",pb.light);nb.style.fill=pb.cssText;nb.setAttribute("width","100%");nb.setAttribute("height","100%");nb.setAttribute("x","0");nb.setAttribute("y","0");db.appendChild(nb)}var lb=mxUtils.createElementNs(qb,mxConstants.NS_SVG,+"g");db.appendChild(lb);var eb=this.createSvgCanvas(lb);eb.foOffset=ja?-.5:0;eb.textOffset=ja?-.5:0;eb.imageOffset=ja?-.5:0;eb.translate(Math.floor(R/L-cb.x/hb),Math.floor(R/L-cb.y/hb));eb.idPrefix="drawio-svg-"+Editor.guid();var tb=document.createElement("div"),ob=eb.getAlternateText;eb.getAlternateText=function(ib,Bb,sb,xb,zb,rb,Cb,d,n,y,q,v,D){if(null!=rb&&0<this.state.fontSize)try{mxUtils.isNode(rb)?rb=rb.innerText:(tb.innerHTML=rb,rb=mxUtils.extractTextWithWhitespace(tb.childNodes));for(var E=+Math.ceil(2*xb/this.state.fontSize),ha=[],M=0,ua=0;(0==E||M<E)&&ua<rb.length;){var na=rb.charCodeAt(ua);if(10==na||13==na){if(0<M)break}else ha.push(rb.charAt(ua)),255>na&&M++;ua++}ha.length<rb.length&&1<rb.length-ha.length&&(rb=mxUtils.trim(ha.join(""))+"...");return rb}catch(Va){return ob.apply(this,arguments)}else return ob.apply(this,arguments)};null!=Za&&null!=Za.width&&null!=Za.height&&(x=hb/L,xa=new mxRectangle((Za.x+gb.x)*x,(Za.y+gb.y)*x,Za.width*x,Za.height*x),mxUtils.intersects(cb,xa)&&+eb.image(Za.x+gb.x,Za.y+gb.y,Za.width,Za.height,Za.src,!0));eb.scale(W);eb.textEnabled=oa;va=null!=va?va:this.createSvgImageExport();var ub=va.getLinkForCellState;va.getLinkForCellState=function(ib,Bb){var sb=ib.view.graph.getAbsoluteUrl(ub.apply(this,arguments));return null==sb||ib.view.graph.isCustomLink(sb)?null:sb};va.getLinkTargetForCellState=function(ib,Bb){return ib.view.graph.getLinkTargetForCell(ib.cell)};var Ab=va.drawCellState,yb=null,wb=mxUtils.bind(this,function(){if(null==yb){yb="ge-flow-animation-"++Editor.guid();var ib=null!=qb.createElementNS?qb.createElementNS(mxConstants.NS_SVG,"style"):qb.createElement("style");ib.innerHTML=this.createFlowAnimationCss(yb);qb.getElementsByTagName("defs")[0].appendChild(ib)}return yb});va.drawCellState=function(ib,Bb){for(var sb=ib.view.graph,xb=null!=Ra?Ra.get(ib.cell):sb.isCellSelected(ib.cell),zb=sb.model.getParent(ib.cell);!(ka&&null==Ra||xb)&&null!=zb;)xb=null!=Ra?Ra.get(zb):sb.isCellSelected(zb),zb=sb.model.getParent(zb);if(null!=ib.shape)try{var rb=+ib.shape.isFlowAnimationEnabled,Cb=ib.shape.addFlowAnimationToShape;ib.shape.isFlowAnimationEnabled=function(){return kb&&sb.model.isEdge(ib.cell)&&"1"==mxUtils.getValue(ib.style,"flowAnimation","0")};ib.shape.addFlowAnimationToShape=function(){sb.addFlowAnimationToNode(this.getFlowAnimationPath(),ib.style,L,wb())};if(ka&&null==Ra||xb)sb.view.redrawEnumerationState(ib),Ab.apply(this,arguments),this.doDrawShape(ib.secondLabel,Bb)}finally{ib.shape.isFlowAnimationEnabled=rb,ib.shape.addFlowAnimationToShape=+Cb}};var jb=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;va.drawState(this.getView().getState(jb),eb);this.addForeignObjectWarning(eb,db);Oa?this.disableSvgLinks(db):this.updateSvgLinks(db,ta,!0);return db}finally{this.enableFlowAnimation=kb,Xa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(x,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var R=x.createElement("switch"),+W=x.createElement("g");W.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ja=x.createElement("a");ja.setAttribute("transform","translate(0,-5)");null==ja.setAttributeNS||L.ownerDocument!=document&&null==document.documentMode?(ja.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ja.setAttribute("target","_blank")):(ja.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ja.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));+x=x.createElement("text");x.setAttribute("text-anchor","middle");x.setAttribute("font-size","10px");x.setAttribute("x","50%");x.setAttribute("y","100%");mxUtils.write(x,Graph.foreignObjectWarningText);R.appendChild(W);ja.appendChild(x);R.appendChild(ja);L.appendChild(R)}};Graph.prototype.disableSvgLinks=function(x,L){x=x.getElementsByTagName("a");for(var R=0;R<x.length;R++){var W=x[R].getAttribute("href");null==W&&(W=x[R].getAttribute("xlink:href"));null!=W&&(x[R].style.pointerEvents="none",x[R].setAttribute("href",+""));L&&L(x[R])}};Graph.prototype.updateSvgLinks=function(x,L,R){x=x.getElementsByTagName("a");for(var W=0;W<x.length;W++)if(null==x[W].getAttribute("target")){var ja=x[W].getAttribute("href");null==ja&&(ja=x[W].getAttribute("xlink:href"));null!=ja&&(null!=L&&/^https?:\/\//.test(ja)?x[W].setAttribute("target",L):R&&this.isCustomLink(ja)&&x[W].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(x){x=new mxSvgCanvas2D(x);x.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;+x.adaptiveColors=this.getAdaptiveColors();x.pointerEvents=!0;return x};Graph.prototype.getSelectedElement=function(){var x=null;if(window.getSelection){var L=window.getSelection();L.getRangeAt&&L.rangeCount&&(x=L.getRangeAt(0).commonAncestorContainer)}else document.selection&&(x=document.selection.createRange().parentElement());return x};Graph.prototype.getSelectedEditingElement=function(){var x=null;if(null!=this.cellEditor.textarea)for(x=this.getSelectedElement();null!=x&&x.nodeType!=mxConstants.NODETYPE_ELEMENT;)x=+x.parentNode;return x};Graph.prototype.getParentByName=function(x,L,R){for(;null!=x&&x.nodeName!=L;){if(x==R)return null;x=x.parentNode}return x};Graph.prototype.getParentByNames=function(x,L,R){for(;null!=x&&!(0<=mxUtils.indexOf(L,x.nodeName));){if(x==R)return null;x=x.parentNode}return x};Graph.prototype.selectNode=function(x){var L=null;if(window.getSelection){if(L=window.getSelection(),L.getRangeAt&&L.rangeCount){var R=document.createRange();R.selectNode(x);L.removeAllRanges();L.addRange(R)}}else(L=+document.selection)&&"Control"!=L.type&&(x=L.createRange(),x.collapse(!0),R=L.createRange(),R.setEndPoint("StartToStart",x),R.select())};Graph.prototype.flipEdgePoints=function(x,L,R){var W=this.getCellGeometry(x);if(null!=W){W=W.clone();if(null!=W.points)for(var ja=0;ja<W.points.length;ja++)L?W.points[ja].x=R+(R-W.points[ja].x):W.points[ja].y=R+(R-W.points[ja].y);ja=function(ka){null!=ka&&(L?ka.x=R+(R-ka.x):ka.y=R+(R-ka.y))};ja(W.getTerminalPoint(!0));ja(W.getTerminalPoint(!1));this.model.setGeometry(x,+W)}};Graph.prototype.flipChildren=function(x,L,R){this.model.beginUpdate();try{for(var W=this.model.getChildCount(x),ja=0;ja<W;ja++){var ka=this.model.getChildAt(x,ja);if(this.model.isEdge(ka))this.flipEdgePoints(ka,L,R);else{var oa=this.getCellGeometry(ka);null!=oa&&(oa=oa.clone(),L?oa.x=R+(R-oa.x-oa.width):oa.y=R+(R-oa.y-oa.height),this.model.setGeometry(ka,oa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(x,L){this.model.beginUpdate();try{x=this.model.getTopmostCells(x);+for(var R=[],W=0;W<x.length;W++)if(this.model.isEdge(x[W])){var ja=this.view.getState(x[W]);null!=ja&&this.flipEdgePoints(x[W],L,(L?ja.getCenterX():ja.getCenterY())/this.view.scale-(L?ja.origin.x:ja.origin.y)-(L?this.view.translate.x:this.view.translate.y))}else{var ka=this.getCellGeometry(x[W]);null!=ka&&this.flipChildren(x[W],L,L?ka.getCenterX()-ka.x:ka.getCenterY()-ka.y);R.push(x[W])}this.toggleCellStyles(L?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,R)}finally{this.model.endUpdate()}};+Graph.prototype.deleteCells=function(x,L){var R=null;if(null!=x&&0<x.length){this.model.beginUpdate();try{for(var W=0;W<x.length;W++){var ja=this.model.getParent(x[W]);if(this.isTable(ja)){var ka=this.getCellGeometry(x[W]),oa=this.getCellGeometry(ja);null!=ka&&null!=oa&&(oa=oa.clone(),oa.height-=ka.height,this.model.setGeometry(ja,oa))}}var va=this.selectParentAfterDelete?this.model.getParents(x):null;this.removeCells(x,L)}finally{this.model.endUpdate()}if(null!=va)for(R=[],W=0;W<va.length;W++)this.model.contains(va[W])&&+(this.model.isVertex(va[W])||this.model.isEdge(va[W]))&&R.push(va[W])}return R};Graph.prototype.insertTableColumn=function(x,L){var R=this.getModel();R.beginUpdate();try{var W=x,ja=0;if(this.isTableCell(x)){var ka=R.getParent(x);W=R.getParent(ka);ja=mxUtils.indexOf(R.getChildCells(ka,!0),x)}else this.isTableRow(x)?W=R.getParent(x):x=R.getChildCells(W,!0)[0],L||(ja=R.getChildCells(x,!0).length-1);var oa=R.getChildCells(W,!0),va=Graph.minTableColumnWidth;for(x=0;x<oa.length;x++){var ta=R.getChildCells(oa[x],+!0)[ja],xa=R.cloneCell(ta,!1);null==xa&&(xa=this.createVertex());var Fa=this.getCellGeometry(xa);xa.value=null;xa.style=mxUtils.setStyle(mxUtils.setStyle(xa.style,"rowspan",null),"colspan",null);if(null!=Fa){null!=Fa.alternateBounds&&(Fa.width=Fa.alternateBounds.width,Fa.height=Fa.alternateBounds.height,Fa.alternateBounds=null);va=Fa.width;var Ma=this.getCellGeometry(oa[x]);null!=Ma&&(Fa.height=Ma.height)}R.add(oa[x],xa,ja+(L?0:1))}var Wa=this.getCellGeometry(W);null!=Wa&&(Wa=Wa.clone(),Wa.width+=+va,R.setGeometry(W,Wa))}finally{R.endUpdate()}};Graph.prototype.deleteLane=function(x){var L=this.getModel();L.beginUpdate();try{var R=null;R="stackLayout"==this.getCurrentCellStyle(x).childLayout?x:L.getParent(x);var W=L.getChildCells(R,!0);0==W.length?L.remove(R):(R==x&&(x=W[W.length-1]),L.remove(x))}finally{L.endUpdate()}};Graph.prototype.insertLane=function(x,L){var R=this.getModel();R.beginUpdate();try{var W=null;if("stackLayout"==this.getCurrentCellStyle(x).childLayout){W=x;var ja=R.getChildCells(W,+!0);x=ja[L?0:ja.length-1]}else W=R.getParent(x);var ka=W.getIndex(x);x=R.cloneCell(x,!1);x.value=null;R.add(W,x,ka+(L?0:1))}finally{R.endUpdate()}};Graph.prototype.insertTableRow=function(x,L){var R=this.getModel();R.beginUpdate();try{var W=x,ja=x;if(this.isTableCell(x))ja=R.getParent(x),W=R.getParent(ja);else if(this.isTableRow(x))W=R.getParent(x);else{var ka=R.getChildCells(W,!0);ja=ka[L?0:ka.length-1]}var oa=R.getChildCells(ja,!0),va=W.getIndex(ja);ja=R.cloneCell(ja,!1);ja.value=null;var ta=this.getCellGeometry(ja);+if(null!=ta){for(ka=0;ka<oa.length;ka++){x=R.cloneCell(oa[ka],!1);x.value=null;x.style=mxUtils.setStyle(mxUtils.setStyle(x.style,"rowspan",null),"colspan",null);var xa=this.getCellGeometry(x);null!=xa&&(null!=xa.alternateBounds&&(xa.width=xa.alternateBounds.width,xa.height=xa.alternateBounds.height,xa.alternateBounds=null),xa.height=ta.height);ja.insert(x)}R.add(W,ja,va+(L?0:1));var Fa=this.getCellGeometry(W);null!=Fa&&(Fa=Fa.clone(),Fa.height+=ta.height,R.setGeometry(W,Fa))}}finally{R.endUpdate()}};+Graph.prototype.deleteTableColumn=function(x){var L=this.getModel();L.beginUpdate();try{var R=x,W=x;this.isTableCell(x)&&(W=L.getParent(x));this.isTableRow(W)&&(R=L.getParent(W));var ja=L.getChildCells(R,!0);if(0==ja.length)L.remove(R);else{this.isTableRow(W)||(W=ja[0]);var ka=L.getChildCells(W,!0);if(1>=ka.length)L.remove(R);else{var oa=ka.length-1;this.isTableCell(x)&&(oa=mxUtils.indexOf(ka,x));for(W=x=0;W<ja.length;W++){var va=L.getChildCells(ja[W],!0)[oa];L.remove(va);var ta=this.getCellGeometry(va);+null!=ta&&(x=Math.max(x,ta.width))}var xa=this.getCellGeometry(R);null!=xa&&(xa=xa.clone(),xa.width-=x,L.setGeometry(R,xa))}}}finally{L.endUpdate()}};Graph.prototype.deleteTableRow=function(x){var L=this.getModel();L.beginUpdate();try{var R=x,W=x;this.isTableCell(x)&&(x=W=L.getParent(x));this.isTableRow(x)&&(R=L.getParent(W));var ja=L.getChildCells(R,!0);if(1>=ja.length)L.remove(R);else{this.isTableRow(W)||(W=ja[ja.length-1]);L.remove(W);x=0;var ka=this.getCellGeometry(W);null!=ka&&(x=ka.height);+var oa=this.getCellGeometry(R);null!=oa&&(oa=oa.clone(),oa.height-=x,L.setGeometry(R,oa))}}finally{L.endUpdate()}};Graph.prototype.insertRow=function(x,L){for(var R=x.tBodies[0],W=R.rows[0].cells,ja=x=0;ja<W.length;ja++){var ka=W[ja].getAttribute("colspan");x+=null!=ka?parseInt(ka):1}L=R.insertRow(L);for(ja=0;ja<x;ja++)mxUtils.br(L.insertCell(-1));return L.cells[0]};Graph.prototype.deleteRow=function(x,L){x.tBodies[0].deleteRow(L)};Graph.prototype.insertColumn=function(x,L){var R=x.tHead;if(null!=+R)for(var W=0;W<R.rows.length;W++){var ja=document.createElement("th");R.rows[W].appendChild(ja);mxUtils.br(ja)}x=x.tBodies[0];for(R=0;R<x.rows.length;R++)W=x.rows[R].insertCell(L),mxUtils.br(W);return x.rows[0].cells[0<=L?L:x.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(x,L){if(0<=L){x=x.tBodies[0].rows;for(var R=0;R<x.length;R++)x[R].cells.length>L&&x[R].deleteCell(L)}};Graph.prototype.pasteHtmlAtCaret=function(x){if(window.getSelection){var L=window.getSelection();if(L.getRangeAt&&+L.rangeCount){L=L.getRangeAt(0);L.deleteContents();var R=document.createElement("div");R.innerHTML=x;x=document.createDocumentFragment();for(var W;W=R.firstChild;)lastNode=x.appendChild(W);L.insertNode(x)}}else(L=document.selection)&&"Control"!=L.type&&L.createRange().pasteHTML(x)};Graph.prototype.createLinkForHint=function(x,L,R){function W(ka,oa){ka.length>oa&&(ka=ka.substring(0,Math.round(oa/2))+"..."+ka.substring(ka.length-Math.round(oa/4)));return ka}x=null!=x?x:"javascript:void(0);";if(null==+L||0==L.length)L=this.isCustomLink(x)?this.getLinkTitle(x):x;var ja=document.createElement("a");ja.setAttribute("rel",this.linkRelation);ja.setAttribute("href",this.getAbsoluteUrl(x));ja.setAttribute("title",W(this.isCustomLink(x)?this.getLinkTitle(x):x,80));null!=this.linkTarget&&ja.setAttribute("target",this.linkTarget);mxUtils.write(ja,W(L,40));this.isCustomLink(x)&&mxEvent.addListener(ja,"click",mxUtils.bind(this,function(ka){this.customLinkClicked(x,R);mxEvent.consume(ka)}));return ja};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ka,oa){this.popupMenuHandler.hideMenu()});var x=this.updateMouseEvent;this.updateMouseEvent=function(ka){ka=x.apply(this,arguments);if(mxEvent.isTouchEvent(ka.getEvent())&&null==ka.getState()){var oa=this.getCellAt(ka.graphX,ka.graphY);null!=oa&&this.isSwimlane(oa)&&this.hitsSwimlaneContent(oa,ka.graphX,ka.graphY)||(ka.state=this.view.getState(oa),-null!=ka.state&&null!=ka.state.shape&&(this.container.style.cursor=ka.state.shape.node.style.cursor))}null==ka.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ka};var M=!1,Q=!1,V=!1,ia=this.fireMouseEvent;this.fireMouseEvent=function(ka,oa,xa){ka==mxEvent.MOUSE_DOWN&&(oa=this.updateMouseEvent(oa),M=this.isCellSelected(oa.getCell()),Q=this.isSelectionEmpty(),V=this.popupMenuHandler.isMenuShowing());ia.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,-function(ka,oa){if(null!=this.freehand&&!this.freehand.isDrawing()){var xa=mxEvent.isMouseEvent(oa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==oa.getState()||!oa.isSource(oa.getState().control))&&(this.popupMenuHandler.popupTrigger||!V&&!xa&&(Q&&null==oa.getCell()&&this.isSelectionEmpty()||M&&this.isCellSelected(oa.getCell())));xa=!M||xa?null:mxUtils.bind(this,function(ta){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ua=mxUtils.getScrollOrigin();-this.popupMenuHandler.popup(oa.getX()+ua.x+1,oa.getY()+ua.y+1,ta,oa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ka,oa,xa])}})};mxCellEditor.prototype.isContentEditing=function(){var x=this.graph.view.getState(this.editingCell);return null!=x&&1==x.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var x=-"";window.getSelection?x=window.getSelection():document.getSelection?x=document.getSelection():document.selection&&(x=document.selection.createRange().text);return""!=x};mxCellEditor.prototype.insertTab=function(x){var M=this.textarea.ownerDocument.defaultView.getSelection(),Q=M.getRangeAt(0);x=Graph.createTabNode(x);Q.insertNode(x);Q.setStartAfter(x);Q.setEndAfter(x);M.removeAllRanges();M.addRange(Q)};mxCellEditor.prototype.alignText=function(x,M){var Q=this.graph.getView().getState(this.editingCell);-if(null!=Q){Q=mxUtils.getValue(Q.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var V=null!=Q&&"vertical-"==Q.substring(0,9),ia=null!=M&&mxEvent.isShiftDown(M);if(ia||null!=window.getSelection&&null!=window.getSelection().containsNode){var ka=!0;this.graph.processElements(this.textarea,function(oa){ia||V||window.getSelection().containsNode(oa,!0)?(oa.removeAttribute("align"),oa.style.textAlign=null):ka=!1});(ka||V)&&this.graph.cellEditor.setAlign(x)}V||document.execCommand("justify"+-x.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var x=window.getSelection();if(x.getRangeAt&&x.rangeCount){for(var M=[],Q=0,V=x.rangeCount;Q<V;++Q)M.push(x.getRangeAt(Q));return M}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(x){try{if(x)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var M=0,Q=x.length;M<-Q;++M)sel.addRange(x[M])}else document.selection&&x.select&&x.select()}catch(V){}};var z=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(x){null!=x.text&&(x.text.replaceLinefeeds="0"!=mxUtils.getValue(x.style,"nl2Br","1"));z.apply(this,arguments)};var C=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(x,M){this.isKeepFocusEvent(x)||!mxEvent.isAltDown(x.getEvent())?C.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=-function(x){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var F=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(x,M){x=this.graph.getStartEditingCell(x,M);F.apply(this,arguments);var Q=this.graph.view.getState(x);this.textarea.className=null!=Q&&1==Q.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?-"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(x)};mxCellEditor.prototype.toggleViewMode=function(){var x=this.graph.view.getState(this.editingCell);if(null!=x){var M=null!=x&&"0"!=mxUtils.getValue(x.style,"nl2Br","1"),Q=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,-xa.length-1));xa=Graph.sanitizeHtml(M?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ta=mxUtils.getValue(x.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);M=mxUtils.getValue(x.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var V=mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ia=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ka=(mxUtils.getValue(x.style,+null!=ka.state&&null!=ka.state.shape&&(this.container.style.cursor=ka.state.shape.node.style.cursor))}null==ka.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ka};var L=!1,R=!1,W=!1,ja=this.fireMouseEvent;this.fireMouseEvent=function(ka,oa,va){ka==mxEvent.MOUSE_DOWN&&(oa=this.updateMouseEvent(oa),L=this.isCellSelected(oa.getCell()),R=this.isSelectionEmpty(),W=this.popupMenuHandler.isMenuShowing());ja.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,+function(ka,oa){if(null!=this.freehand&&!this.freehand.isDrawing()){var va=mxEvent.isMouseEvent(oa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==oa.getState()||!oa.isSource(oa.getState().control))&&(this.popupMenuHandler.popupTrigger||!W&&!va&&(R&&null==oa.getCell()&&this.isSelectionEmpty()||L&&this.isCellSelected(oa.getCell())));va=!L||va?null:mxUtils.bind(this,function(ta){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var xa=mxUtils.getScrollOrigin();+this.popupMenuHandler.popup(oa.getX()+xa.x+1,oa.getY()+xa.y+1,ta,oa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ka,oa,va])}})};mxCellEditor.prototype.isContentEditing=function(){var x=this.graph.view.getState(this.editingCell);return null!=x&&1==x.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var x=+"";window.getSelection?x=window.getSelection():document.getSelection?x=document.getSelection():document.selection&&(x=document.selection.createRange().text);return""!=x};mxCellEditor.prototype.insertTab=function(x){var L=this.textarea.ownerDocument.defaultView.getSelection(),R=L.getRangeAt(0);x=Graph.createTabNode(x);R.insertNode(x);R.setStartAfter(x);R.setEndAfter(x);L.removeAllRanges();L.addRange(R)};mxCellEditor.prototype.alignText=function(x,L){var R=this.graph.getView().getState(this.editingCell);+if(null!=R){R=mxUtils.getValue(R.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var W=null!=R&&"vertical-"==R.substring(0,9),ja=null!=L&&mxEvent.isShiftDown(L);if(ja||null!=window.getSelection&&null!=window.getSelection().containsNode){var ka=!0;this.graph.processElements(this.textarea,function(oa){ja||W||window.getSelection().containsNode(oa,!0)?(oa.removeAttribute("align"),oa.style.textAlign=null):ka=!1});(ka||W)&&this.graph.cellEditor.setAlign(x)}W||document.execCommand("justify"++x.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var x=window.getSelection();if(x.getRangeAt&&x.rangeCount){for(var L=[],R=0,W=x.rangeCount;R<W;++R)L.push(x.getRangeAt(R));return L}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(x){try{if(x)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var L=0,R=x.length;L<+R;++L)sel.addRange(x[L])}else document.selection&&x.select&&x.select()}catch(W){}};var z=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(x){null!=x.text&&(x.text.replaceLinefeeds="0"!=mxUtils.getValue(x.style,"nl2Br","1"));z.apply(this,arguments)};var C=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(x,L){this.isKeepFocusEvent(x)||!mxEvent.isAltDown(x.getEvent())?C.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=+function(x){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var F=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(x,L){x=this.graph.getStartEditingCell(x,L);F.apply(this,arguments);var R=this.graph.view.getState(x);this.textarea.className=null!=R&&1==R.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?+"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(x)};mxCellEditor.prototype.toggleViewMode=function(){var x=this.graph.view.getState(this.editingCell);if(null!=x){var L=null!=x&&"0"!=mxUtils.getValue(x.style,"nl2Br","1"),R=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);va=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<va.length&&"\n"==va.charAt(va.length-1)&&(va=va.substring(0,+va.length-1));va=Graph.sanitizeHtml(L?va.replace(/\n/g,"<br/>"):va,!0);this.textarea.className="mxCellEditor geContentEditable";ta=mxUtils.getValue(x.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);L=mxUtils.getValue(x.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var W=mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ja=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ka=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,oa=[];(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&oa.push("underline");(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&oa.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ta*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=-Math.round(ta)+"px";this.textarea.style.textDecoration=oa.join(" ");this.textarea.style.fontWeight=ia?"bold":"normal";this.textarea.style.fontStyle=ka?"italic":"";this.textarea.style.fontFamily=M;this.textarea.style.textAlign=V;this.textarea.style.padding="0px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,-"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var xa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(xa=mxUtils.replaceTrailingNewlines(xa,"<div><br></div>"));xa=Graph.sanitizeHtml(M?xa.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):xa,!0);this.textarea.className=+Math.round(ta)+"px";this.textarea.style.textDecoration=oa.join(" ");this.textarea.style.fontWeight=ja?"bold":"normal";this.textarea.style.fontStyle=ka?"italic":"";this.textarea.style.fontFamily=L;this.textarea.style.textAlign=W;this.textarea.style.padding="0px";this.textarea.innerHTML!=va&&(this.textarea.innerHTML=va,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,+"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var va=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(va=mxUtils.replaceTrailingNewlines(va,"<div><br></div>"));va=Graph.sanitizeHtml(L?va.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):va,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ta=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ta*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ta)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding=-"2px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=Q;this.resize()}};var N=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(x,M){if(null!=this.textarea)if(x=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=x){var Q=x.view.scale;this.bounds=mxRectangle.fromRectangle(x);if(0==this.bounds.width&&-0==this.bounds.height){this.bounds.width=160*Q;this.bounds.height=60*Q;var V=null!=x.text?x.text.margin:null;null==V&&(V=mxUtils.getAlignmentAsPoint(mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(x.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=V.x*this.bounds.width;this.bounds.y+=V.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/Q)+"px";this.textarea.style.height=Math.round((this.bounds.height--4)/Q)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/Q)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*Q);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/Q)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*-Q);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+Q+","+Q+")")}else this.textarea.style.height="",this.textarea.style.overflow="",N.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(x,M){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);-var Q=this.graph.getEditingValue(x.cell,M);"1"==mxUtils.getValue(x.style,"nl2Br","1")&&(Q=Q.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(Q,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=function(x,M){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(x.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;-mxCellEditor.prototype.getCurrentValue=function(x){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var M=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(x.style,"nl2Br","1")?(M=M.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<M.length&&("<br/>"==M.substring(M.length-5)||"<br>"==M.substring(M.length-4))&&(M=M.substring(0,M.lastIndexOf("<br"))+"<div><br/></div>")):-M=M.replace(/\r\n/g,"").replace(/\n/g,"");return M};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(x){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(x){}};var J=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(x,M){this.graph.getModel().beginUpdate();try{J.apply(this,arguments),""==M&&this.graph.isCellDeletable(x.cell)&&+"2px";this.textarea.innerHTML!=va&&(this.textarea.innerHTML=va);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=R;this.resize()}};var N=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(x,L){if(null!=this.textarea)if(x=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=x){var R=x.view.scale;this.bounds=mxRectangle.fromRectangle(x);if(0==this.bounds.width&&+0==this.bounds.height){this.bounds.width=160*R;this.bounds.height=60*R;var W=null!=x.text?x.text.margin:null;null==W&&(W=mxUtils.getAlignmentAsPoint(mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(x.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=W.x*this.bounds.width;this.bounds.y+=W.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/R)+"px";this.textarea.style.height=Math.round((this.bounds.height-+4)/R)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/R)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*R);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/R)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*+R);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+R+","+R+")")}else this.textarea.style.height="",this.textarea.style.overflow="",N.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(x,L){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);+var R=this.graph.getEditingValue(x.cell,L);"1"==mxUtils.getValue(x.style,"nl2Br","1")&&(R=R.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(R,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=function(x,L){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(x.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;+mxCellEditor.prototype.getCurrentValue=function(x){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var L=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(x.style,"nl2Br","1")?(L=L.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<L.length&&("<br/>"==L.substring(L.length-5)||"<br>"==L.substring(L.length-4))&&(L=L.substring(0,L.lastIndexOf("<br"))+"<div><br/></div>")):+L=L.replace(/\r\n/g,"").replace(/\n/g,"");return L};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(x){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(x){}};var J=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(x,L){this.graph.getModel().beginUpdate();try{J.apply(this,arguments),""==L&&this.graph.isCellDeletable(x.cell)&&0==this.graph.model.getChildCount(x.cell)&&this.graph.isTransparentState(x)&&this.graph.removeCells([x.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(x){x=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);x==mxConstants.NONE&&(x=null);return x};mxCellEditor.prototype.getBorderColor=function(x){x=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);x==mxConstants.NONE&&(x=null);return x};mxCellEditor.prototype.getMinimumSize=-function(x){var M=this.graph.getView().scale;return new mxRectangle(0,0,null==x.text?30:x.text.size*M+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(x,M){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(M.getEvent)};mxGraphView.prototype.formatUnitText=function(x){return x?e(x,this.unit):x};mxGraphHandler.prototype.updateHint=function(x){if(null!=this.pBounds&&(null!=this.shape||-this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var M=this.graph.view.translate,Q=this.graph.view.scale;x=this.roundLength((this.bounds.x+this.currentDx)/Q-M.x);M=this.roundLength((this.bounds.y+this.currentDy)/Q-M.y);Q=this.graph.view.unit;this.hint.innerHTML=e(x,Q)+", "+e(M,Q);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+-Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var da=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,M){da.apply(this,arguments);var Q=this.graph.getCellStyle(x);if(null==Q.childLayout){var V=this.graph.model.getParent(x),ia=null!=V?this.graph.getCellGeometry(V):null;if(null!=ia&&(Q=this.graph.getCellStyle(V),"stackLayout"==Q.childLayout)){var ka=-parseFloat(mxUtils.getValue(Q,"stackBorder",mxStackLayout.prototype.border));Q="1"==mxUtils.getValue(Q,"horizontalStack","1");var oa=this.graph.getActualStartSize(V);ia=ia.clone();Q?ia.height=M.height+oa.y+oa.height+2*ka:ia.width=M.width+oa.x+oa.width+2*ka;this.graph.model.setGeometry(V,ia)}}};var ea=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function x(xa){Q.get(xa)||(Q.put(xa,!0),ia.push(xa))}for(var M=ea.apply(this,-arguments),Q=new mxDictionary,V=this.graph.model,ia=[],ka=0;ka<M.length;ka++){var oa=M[ka];this.graph.isTableCell(oa)?x(V.getParent(V.getParent(oa))):this.graph.isTableRow(oa)&&x(V.getParent(oa));x(oa)}return ia};var ca=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(x){return ca.apply(this,arguments)&&!mxEvent.isControlDown(x.getEvent())&&!mxEvent.isShiftDown(x.getEvent())};var W=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=-function(){return W.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var ba=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(x){var M=ba.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};var ha=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=-function(x){var M=ha.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var x=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+x.x/2,this.bounds.y+this.rotationHandleVSpacing-x.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(x,M){return this.graph.isRecursiveVertexResize(x)&&!mxEvent.isAltDown(M.getEvent())};-mxVertexHandler.prototype.isCenteredEvent=function(x,M){return mxEvent.isControlDown(M.getEvent())||mxEvent.isMetaDown(M.getEvent())};var la=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return la.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?+function(x){var L=this.graph.getView().scale;return new mxRectangle(0,0,null==x.text?30:x.text.size*L+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(x,L){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(L.getEvent)};mxGraphView.prototype.formatUnitText=function(x){return x?e(x,this.unit):x};mxGraphHandler.prototype.updateHint=function(x){if(null!=this.pBounds&&(null!=this.shape||+this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var L=this.graph.view.translate,R=this.graph.view.scale;x=this.roundLength((this.bounds.x+this.currentDx)/R-L.x);L=this.roundLength((this.bounds.y+this.currentDy)/R-L.y);R=this.graph.view.unit;this.hint.innerHTML=e(x,R)+", "+e(L,R);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height++Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var da=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,L){da.apply(this,arguments);var R=this.graph.getCellStyle(x);if(null==R.childLayout){var W=this.graph.model.getParent(x),ja=null!=W?this.graph.getCellGeometry(W):null;if(null!=ja&&(R=this.graph.getCellStyle(W),"stackLayout"==R.childLayout)){var ka=+parseFloat(mxUtils.getValue(R,"stackBorder",mxStackLayout.prototype.border));R="1"==mxUtils.getValue(R,"horizontalStack","1");var oa=this.graph.getActualStartSize(W);ja=ja.clone();R?ja.height=L.height+oa.y+oa.height+2*ka:ja.width=L.width+oa.x+oa.width+2*ka;this.graph.model.setGeometry(W,ja)}}};var ea=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function x(va){R.get(va)||(R.put(va,!0),ja.push(va))}for(var L=ea.apply(this,+arguments),R=new mxDictionary,W=this.graph.model,ja=[],ka=0;ka<L.length;ka++){var oa=L[ka];this.graph.isTableCell(oa)?x(W.getParent(W.getParent(oa))):this.graph.isTableRow(oa)&&x(W.getParent(oa));x(oa)}return ja};var ca=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(x){return ca.apply(this,arguments)&&!mxEvent.isControlDown(x.getEvent())&&!mxEvent.isShiftDown(x.getEvent())};var X=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=+function(){return X.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var aa=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(x){var L=aa.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};var ia=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=+function(x){var L=ia.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var x=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+x.x/2,this.bounds.y+this.rotationHandleVSpacing-x.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(x,L){return this.graph.isRecursiveVertexResize(x)&&!mxEvent.isAltDown(L.getEvent())};+mxVertexHandler.prototype.isCenteredEvent=function(x,L){return mxEvent.isControlDown(L.getEvent())||mxEvent.isMetaDown(L.getEvent())};var la=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return la.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var Y=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return Y.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var ma=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(x){return x.tableHandle||ma.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var x=0;this.graph.isTableRow(this.state.cell)?x=1:this.graph.isTableCell(this.state.cell)&&(x=2);return x};var Z=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return Z.apply(this,arguments).grow(-this.getSelectionBorderInset())};var k=null,A=mxVertexHandler.prototype.createCustomHandles;-mxVertexHandler.prototype.createCustomHandles=function(){null==k&&(k=mxCellRenderer.defaultShapes.tableLine);var x=A.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var M=function(ab,Oa,Qa){for(var kb=[],cb=0;cb<ab.length;cb++){var Ya=ab[cb];kb.push(null==Ya?null:new mxPoint((ta+Ya.x+Oa)*ka,(ua+Ya.y+Qa)*ka))}return kb},Q=this,V=this.graph,ia=V.model,ka=V.view.scale,oa=this.state,xa=this.selectionBorder,ta=this.state.origin.x+V.view.translate.x,-ua=this.state.origin.y+V.view.translate.y;null==x&&(x=[]);var Fa=V.view.getCellStates(ia.getChildCells(this.state.cell,!0));if(0<Fa.length){var Na=ia.getChildCells(Fa[0].cell,!0),Wa=V.getTableLines(this.state.cell,!1,!0),Xa=V.getTableLines(this.state.cell,!0,!1);for(ia=0;ia<Fa.length;ia++)mxUtils.bind(this,function(ab){var Oa=Fa[ab],Qa=null;if(V.isCellMovable(Oa.cell)){Qa=ab<Fa.length-1?Fa[ab+1]:null;Qa=null!=Qa?V.getCellGeometry(Qa.cell):null;var kb=null!=Qa&&null!=Qa.alternateBounds?Qa.alternateBounds:-Qa;Qa=null!=Xa[ab]?new k(Xa[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Qa.isDashed=xa.isDashed;Qa.svgStrokeTolerance++;Qa=new mxHandle(Oa,"row-resize",null,Qa);Qa.tableHandle=!0;var cb=0;Qa.shape.node.parentNode.insertBefore(Qa.shape.node,Qa.shape.node.parentNode.firstChild);Qa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==cb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==k)this.shape.line=M(Xa[ab],0,cb),this.shape.updateBoundsFromLine();else{var gb=-V.getActualStartSize(oa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+cb*ka;this.shape.bounds.x=oa.x+(ab==Fa.length-1?0:gb.x*ka);this.shape.bounds.width=oa.width-(ab==Fa.length-1?0:gb.width+gb.x+ka)}this.shape.redraw()}};var Ya=!1;Qa.setPosition=function(gb,hb,vb){cb=Math.max(Graph.minTableRowHeight-gb.height,hb.y-gb.y-gb.height);Ya=mxEvent.isShiftDown(vb.getEvent());null!=kb&&Ya&&(cb=Math.min(cb,kb.height-Graph.minTableRowHeight))};Qa.execute=function(gb){if(0!=-cb)V.setTableRowHeight(this.state.cell,cb,!Ya);else if(!Q.blockDelayedSelection){var hb=V.getCellAt(gb.getGraphX(),gb.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(hb,gb)}cb=0};Qa.reset=function(){cb=0}}x.push(Qa)})(ia);for(ia=0;ia<Na.length;ia++)mxUtils.bind(this,function(ab){var Oa=V.view.getState(Na[ab]),Qa=V.getCellGeometry(Na[ab]),kb=null!=Qa.alternateBounds?Qa.alternateBounds:Qa;null==Oa&&(Oa=new mxCellState(V.view,Na[ab],V.getCellStyle(Na[ab])),Oa.x=oa.x+Qa.x*ka,Oa.y=oa.y+Qa.y*ka,-Oa.width=kb.width*ka,Oa.height=kb.height*ka,Oa.updateCachedBounds());Qa=ab<Na.length-1?Na[ab+1]:null;Qa=null!=Qa?V.getCellGeometry(Qa):null;var cb=null!=Qa&&null!=Qa.alternateBounds?Qa.alternateBounds:Qa;Qa=null!=Wa[ab]?new k(Wa[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Qa.isDashed=xa.isDashed;Qa.svgStrokeTolerance++;Oa=new mxHandle(Oa,"col-resize",null,Qa);Oa.tableHandle=!0;var Ya=0;Oa.shape.node.parentNode.insertBefore(Oa.shape.node,Oa.shape.node.parentNode.firstChild);-Oa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ya?mxConstants.NONE:xa.stroke;if(this.shape.constructor==k)this.shape.line=M(Wa[ab],Ya,0),this.shape.updateBoundsFromLine();else{var hb=V.getActualStartSize(oa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(kb.width+Ya)*ka;this.shape.bounds.y=oa.y+(ab==Na.length-1?0:hb.y*ka);this.shape.bounds.height=oa.height-(ab==Na.length-1?0:(hb.height+hb.y)*ka)}this.shape.redraw()}};var gb=!1;Oa.setPosition=function(hb,vb,mb){Ya=-Math.max(Graph.minTableColumnWidth-kb.width,vb.x-hb.x-kb.width);gb=mxEvent.isShiftDown(mb.getEvent());null==cb||gb||(Ya=Math.min(Ya,cb.width-Graph.minTableColumnWidth))};Oa.execute=function(hb){if(0!=Ya)V.setTableColumnWidth(this.state.cell,Ya,gb);else if(!Q.blockDelayedSelection){var vb=V.getCellAt(hb.getGraphX(),hb.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(vb,hb)}Ya=0};Oa.positionChanged=function(){};Oa.reset=function(){Ya=0};x.push(Oa)})(ia)}}return null!=x?x.reverse():null};var I=-mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(x){I.apply(this,arguments);if(null!=this.moveHandles)for(var M=0;M<this.moveHandles.length;M++)null!=this.moveHandles[M]&&(this.moveHandles[M].node.style.visibility=x?"":"hidden");if(null!=this.cornerHandles)for(M=0;M<this.cornerHandles.length;M++)this.cornerHandles[M].node.style.visibility=x?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&+mxVertexHandler.prototype.createCustomHandles=function(){null==k&&(k=mxCellRenderer.defaultShapes.tableLine);var x=A.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var L=function(ab,Oa,Ra){for(var kb=[],cb=0;cb<ab.length;cb++){var Za=ab[cb];kb.push(null==Za?null:new mxPoint((ta+Za.x+Oa)*ka,(xa+Za.y+Ra)*ka))}return kb},R=this,W=this.graph,ja=W.model,ka=W.view.scale,oa=this.state,va=this.selectionBorder,ta=this.state.origin.x+W.view.translate.x,+xa=this.state.origin.y+W.view.translate.y;null==x&&(x=[]);var Fa=W.view.getCellStates(ja.getChildCells(this.state.cell,!0));if(0<Fa.length){var Ma=ja.getChildCells(Fa[0].cell,!0),Wa=W.getTableLines(this.state.cell,!1,!0),Xa=W.getTableLines(this.state.cell,!0,!1);for(ja=0;ja<Fa.length;ja++)mxUtils.bind(this,function(ab){var Oa=Fa[ab],Ra=null;if(W.isCellMovable(Oa.cell)){Ra=ab<Fa.length-1?Fa[ab+1]:null;Ra=null!=Ra?W.getCellGeometry(Ra.cell):null;var kb=null!=Ra&&null!=Ra.alternateBounds?Ra.alternateBounds:+Ra;Ra=null!=Xa[ab]?new k(Xa[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ra.isDashed=va.isDashed;Ra.svgStrokeTolerance++;Ra=new mxHandle(Oa,"row-resize",null,Ra);Ra.tableHandle=!0;var cb=0;Ra.shape.node.parentNode.insertBefore(Ra.shape.node,Ra.shape.node.parentNode.firstChild);Ra.redraw=function(){if(null!=this.shape){this.shape.stroke=0==cb?mxConstants.NONE:va.stroke;if(this.shape.constructor==k)this.shape.line=L(Xa[ab],0,cb),this.shape.updateBoundsFromLine();else{var gb=+W.getActualStartSize(oa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+cb*ka;this.shape.bounds.x=oa.x+(ab==Fa.length-1?0:gb.x*ka);this.shape.bounds.width=oa.width-(ab==Fa.length-1?0:gb.width+gb.x+ka)}this.shape.redraw()}};var Za=!1;Ra.setPosition=function(gb,hb,vb){cb=Math.max(Graph.minTableRowHeight-gb.height,hb.y-gb.y-gb.height);Za=mxEvent.isShiftDown(vb.getEvent());null!=kb&&Za&&(cb=Math.min(cb,kb.height-Graph.minTableRowHeight))};Ra.execute=function(gb){if(0!=+cb)W.setTableRowHeight(this.state.cell,cb,!Za);else if(!R.blockDelayedSelection){var hb=W.getCellAt(gb.getGraphX(),gb.getGraphY())||oa.cell;W.graphHandler.selectCellForEvent(hb,gb)}cb=0};Ra.reset=function(){cb=0}}x.push(Ra)})(ja);for(ja=0;ja<Ma.length;ja++)mxUtils.bind(this,function(ab){var Oa=W.view.getState(Ma[ab]),Ra=W.getCellGeometry(Ma[ab]),kb=null!=Ra.alternateBounds?Ra.alternateBounds:Ra;null==Oa&&(Oa=new mxCellState(W.view,Ma[ab],W.getCellStyle(Ma[ab])),Oa.x=oa.x+Ra.x*ka,Oa.y=oa.y+Ra.y*ka,+Oa.width=kb.width*ka,Oa.height=kb.height*ka,Oa.updateCachedBounds());Ra=ab<Ma.length-1?Ma[ab+1]:null;Ra=null!=Ra?W.getCellGeometry(Ra):null;var cb=null!=Ra&&null!=Ra.alternateBounds?Ra.alternateBounds:Ra;Ra=null!=Wa[ab]?new k(Wa[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ra.isDashed=va.isDashed;Ra.svgStrokeTolerance++;Oa=new mxHandle(Oa,"col-resize",null,Ra);Oa.tableHandle=!0;var Za=0;Oa.shape.node.parentNode.insertBefore(Oa.shape.node,Oa.shape.node.parentNode.firstChild);+Oa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Za?mxConstants.NONE:va.stroke;if(this.shape.constructor==k)this.shape.line=L(Wa[ab],Za,0),this.shape.updateBoundsFromLine();else{var hb=W.getActualStartSize(oa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(kb.width+Za)*ka;this.shape.bounds.y=oa.y+(ab==Ma.length-1?0:hb.y*ka);this.shape.bounds.height=oa.height-(ab==Ma.length-1?0:(hb.height+hb.y)*ka)}this.shape.redraw()}};var gb=!1;Oa.setPosition=function(hb,vb,mb){Za=+Math.max(Graph.minTableColumnWidth-kb.width,vb.x-hb.x-kb.width);gb=mxEvent.isShiftDown(mb.getEvent());null==cb||gb||(Za=Math.min(Za,cb.width-Graph.minTableColumnWidth))};Oa.execute=function(hb){if(0!=Za)W.setTableColumnWidth(this.state.cell,Za,gb);else if(!R.blockDelayedSelection){var vb=W.getCellAt(hb.getGraphX(),hb.getGraphY())||oa.cell;W.graphHandler.selectCellForEvent(vb,hb)}Za=0};Oa.positionChanged=function(){};Oa.reset=function(){Za=0};x.push(Oa)})(ja)}}return null!=x?x.reverse():null};var I=+mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(x){I.apply(this,arguments);if(null!=this.moveHandles)for(var L=0;L<this.moveHandles.length;L++)null!=this.moveHandles[L]&&(this.moveHandles[L].node.style.visibility=x?"":"hidden");if(null!=this.cornerHandles)for(L=0;L<this.cornerHandles.length;L++)this.cornerHandles[L].node.style.visibility=x?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var x=this.isMoveHandlesVisible();x&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():x||null==this.moveHandles||this.destroyMoveHandles();if(x&&null==this.moveHandles){for(x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&this.moveHandles[x].parentNode.removeChild(this.moveHandles[x]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var x=-this.graph,M=x.model,Q=[],V=0;V<M.getChildCount(this.state.cell);V++)mxUtils.bind(this,function(ia){if(null!=ia&&M.isVertex(ia.cell)&&x.isCellMovable(ia.cell)){var ka=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ka=new mxImageShape(ka,this.rowHandleImage.src);ka.rowState=ia;ka.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ka.init(this.graph.getView().getOverlayPane());ka.node.style.cursor="move";mxEvent.addGestureListeners(ka.node,-mxUtils.bind(this,function(oa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(oa)&&this.graph.isCellSelected(ia.cell)||this.graph.selectCellForEvent(ia.cell,oa);mxEvent.isPopupTrigger(oa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(oa),mxEvent.getClientY(oa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(oa),this.graph.isMouseDown=!0);mxEvent.consume(oa)}),-null,mxUtils.bind(this,function(oa){mxEvent.isPopupTrigger(oa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(oa),mxEvent.getClientY(oa),ia.cell,oa),mxEvent.consume(oa))}));Q.push(ka)}else Q.push(null)})(this.graph.view.getState(M.getChildAt(this.state.cell,V)));return Q};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&this.moveHandles[x].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=-function(){if(null!=this.cornerHandles){for(var x=0;x<this.cornerHandles.length;x++)null!=this.cornerHandles[x]&&null!=this.cornerHandles[x].node&&null!=this.cornerHandles[x].node.parentNode&&this.cornerHandles[x].node.parentNode.removeChild(this.cornerHandles[x].node);this.cornerHandles=null}};var U=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){U.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();-else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var x=0;4>x;x++){var M=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);M.dialect=mxConstants.DIALECT_SVG;M.init(this.graph.view.getOverlayPane());this.cornerHandles.push(M)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();-x=this.graph.getLinkForCell(this.state.cell);M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var O=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var x=new mxPoint(0,0),M=this.tolerance,Q=this.state.style.shape;null==mxCellRenderer.defaultShapes[Q]&&mxStencilRegistry.getStencil(Q);Q=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!Q&&null!=this.customHandles)for(var V=0;V<this.customHandles.length;V++)if(null!=-this.customHandles[V]&&null!=this.customHandles[V].shape&&null!=this.customHandles[V].shape.bounds){var ia=this.customHandles[V].shape.bounds,ka=ia.getCenterX(),oa=ia.getCenterY();if(Math.abs(this.state.x-ka)<ia.width/2||Math.abs(this.state.y-oa)<ia.height/2||Math.abs(this.state.x+this.state.width-ka)<ia.width/2||Math.abs(this.state.y+this.state.height-oa)<ia.height/2){Q=!0;break}}Q&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(M/=2,this.graph.isTable(this.state.cell)&&(M+=7),x.x=-this.sizers[0].bounds.width+M,x.y=this.sizers[0].bounds.height+M):x=O.apply(this,arguments);return x};mxVertexHandler.prototype.updateHint=function(x){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{x=this.state.view.scale;var M=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/x),M)+" x "+e(this.roundLength(this.bounds.height/-x),M)}x=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==x&&(x=this.bounds);this.hint.style.left=x.x+Math.round((x.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=x.y+x.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display=-"")};var S=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){S.apply(this,arguments);var x=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var X=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,M){X.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};-var aa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(x,M){aa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(x,M,Q){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var V=this.graph.view.translate,ia=this.graph.view.scale,ka=this.roundLength(M.x/ia-V.x);V=this.roundLength(M.y/ia-V.y);var oa=-this.graph.view.unit;this.hint.innerHTML=e(ka,oa)+", "+e(V,oa);this.hint.style.visibility="visible";null!=Q&&(Q.view.updateEdgeBounds(Q),this.hint.innerHTML+=" ("+(oa==mxConstants.POINTS?Math.round(Q.length/ia):e(Q.length/ia,oa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(Q=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*Q.x)+"%, "+Math.round(100*-Q.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(x.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(x.getGraphY(),M.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');+this.graph,L=x.model,R=[],W=0;W<L.getChildCount(this.state.cell);W++)mxUtils.bind(this,function(ja){if(null!=ja&&L.isVertex(ja.cell)&&x.isCellMovable(ja.cell)){var ka=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ka=new mxImageShape(ka,this.rowHandleImage.src);ka.rowState=ja;ka.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ka.init(this.graph.getView().getOverlayPane());ka.node.style.cursor="move";mxEvent.addGestureListeners(ka.node,+mxUtils.bind(this,function(oa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(oa)&&this.graph.isCellSelected(ja.cell)||this.graph.selectCellForEvent(ja.cell,oa);mxEvent.isPopupTrigger(oa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(oa),mxEvent.getClientY(oa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(oa),this.graph.isMouseDown=!0);mxEvent.consume(oa)}),+null,mxUtils.bind(this,function(oa){mxEvent.isPopupTrigger(oa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(oa),mxEvent.getClientY(oa),ja.cell,oa),mxEvent.consume(oa))}));R.push(ka)}else R.push(null)})(this.graph.view.getState(L.getChildAt(this.state.cell,W)));return R};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&this.moveHandles[x].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=+function(){if(null!=this.cornerHandles){for(var x=0;x<this.cornerHandles.length;x++)null!=this.cornerHandles[x]&&null!=this.cornerHandles[x].node&&null!=this.cornerHandles[x].node.parentNode&&this.cornerHandles[x].node.parentNode.removeChild(this.cornerHandles[x].node);this.cornerHandles=null}};var T=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){T.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();+else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var x=0;4>x;x++){var L=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);L.dialect=mxConstants.DIALECT_SVG;L.init(this.graph.view.getOverlayPane());this.cornerHandles.push(L)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();+x=this.graph.getLinkForCell(this.state.cell);L=this.graph.getLinksForState(this.state);this.updateLinkHint(x,L)};var O=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var x=new mxPoint(0,0),L=this.tolerance,R=this.state.style.shape;null==mxCellRenderer.defaultShapes[R]&&mxStencilRegistry.getStencil(R);R=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!R&&null!=this.customHandles)for(var W=0;W<this.customHandles.length;W++)if(null!=+this.customHandles[W]&&null!=this.customHandles[W].shape&&null!=this.customHandles[W].shape.bounds){var ja=this.customHandles[W].shape.bounds,ka=ja.getCenterX(),oa=ja.getCenterY();if(Math.abs(this.state.x-ka)<ja.width/2||Math.abs(this.state.y-oa)<ja.height/2||Math.abs(this.state.x+this.state.width-ka)<ja.width/2||Math.abs(this.state.y+this.state.height-oa)<ja.height/2){R=!0;break}}R&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(L/=2,this.graph.isTable(this.state.cell)&&(L+=7),x.x=+this.sizers[0].bounds.width+L,x.y=this.sizers[0].bounds.height+L):x=O.apply(this,arguments);return x};mxVertexHandler.prototype.updateHint=function(x){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{x=this.state.view.scale;var L=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/x),L)+" x "+e(this.roundLength(this.bounds.height/+x),L)}x=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==x&&(x=this.bounds);this.hint.style.left=x.x+Math.round((x.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=x.y+x.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display=+"")};var U=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){U.apply(this,arguments);var x=this.graph.getLinkForCell(this.state.cell),L=this.graph.getLinksForState(this.state);this.updateLinkHint(x,L)};var V=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,L){V.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};+var ba=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(x,L){ba.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(x,L,R){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var W=this.graph.view.translate,ja=this.graph.view.scale,ka=this.roundLength(L.x/ja-W.x);W=this.roundLength(L.y/ja-W.y);var oa=+this.graph.view.unit;this.hint.innerHTML=e(ka,oa)+", "+e(W,oa);this.hint.style.visibility="visible";null!=R&&(R.view.updateEdgeBounds(R),this.hint.innerHTML+=" ("+(oa==mxConstants.POINTS?Math.round(R.length/ja):e(R.length/ja,oa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(R=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*R.x)+"%, "+Math.round(100*+R.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(x.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(x.getGraphY(),L.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="'+@@ -2706,65 +2706,65 @@ HoverIcons.prototype.endTerminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxGraphHandler.prototype.previewColor="light-dark(#000000, #cccccc)";mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(x){return!mxEvent.isShiftDown(x.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(x){return!mxEvent.isShiftDown(x.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(x){return mxEvent.isMouseEvent(x.getEvent())?-4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(x){var M=x.getEvent();return null==x.getState()&&!mxEvent.isMouseEvent(M)||mxEvent.isPopupTrigger(M)&&(null==x.getState()||mxEvent.isControlDown(M)||mxEvent.isShiftDown(M))}}else mxPanningHandler.prototype.isPanningTrigger=function(x){var M=x.getEvent();return mxEvent.isLeftMouseButton(M)&&(this.useLeftButtonForPanning&&null==x.getState()||mxEvent.isControlDown(M)&&!mxEvent.isShiftDown(M))||this.usePopupTrigger&&mxEvent.isPopupTrigger(M)};-mxRubberband.prototype.isSpaceEvent=function(x){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(x.getEvent())||mxEvent.isMetaDown(x.getEvent()))&&mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(x,M){if(this.cancelled)this.cancelled=!1,M.consume();else{var Q=-null!=this.div&&"none"!=this.div.style.display,V=null,ia=null,ka=x=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(V=this.first.x,ia=this.first.y,x=(this.currentX-V)/this.graph.view.scale,ka=(this.currentY-ia)/this.graph.view.scale,mxEvent.isAltDown(M.getEvent())||(x=this.graph.snap(x),ka=this.graph.snap(ka),this.graph.isGridEnabled()||(Math.abs(x)<this.graph.tolerance&&(x=0),Math.abs(ka)<this.graph.tolerance&&(ka=0))));this.reset();if(Q){if(this.isSpaceEvent(M)){this.graph.model.beginUpdate();-try{var oa=this.graph.getCellsBeyond(V,ia,this.graph.getDefaultParent(),!0,!0);for(Q=0;Q<oa.length;Q++)if(this.graph.isCellMovable(oa[Q])){var xa=this.graph.view.getState(oa[Q]),ta=this.graph.getCellGeometry(oa[Q]);null!=xa&&null!=ta&&(ta=ta.clone(),ta.translate(x,ka),this.graph.model.setGeometry(oa[Q],ta))}}finally{this.graph.model.endUpdate()}}else oa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(oa,M.getEvent());M.consume()}}};mxRubberband.prototype.mouseMove=function(x,-M){if(!M.isConsumed()&&null!=this.first){var Q=mxUtils.getScrollOrigin(this.graph.container);x=mxUtils.getOffset(this.graph.container);Q.x-=x.x;Q.y-=x.y;x=M.getX()+Q.x;Q=M.getY()+Q.y;var V=this.first.x-x,ia=this.first.y-Q,ka=this.graph.tolerance;if(null!=this.div||Math.abs(V)>ka||Math.abs(ia)>ka)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(x,Q),this.isSpaceEvent(M)?(x=this.x+this.width,Q=this.y+this.height,V=this.graph.view.scale,mxEvent.isAltDown(M.getEvent())||-(this.width=this.graph.snap(this.width/V)*V,this.height=this.graph.snap(this.height/V)*V,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=x-this.width),this.y<this.first.y&&(this.y=Q-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=+4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(x){var L=x.getEvent();return null==x.getState()&&!mxEvent.isMouseEvent(L)||mxEvent.isPopupTrigger(L)&&(null==x.getState()||mxEvent.isControlDown(L)||mxEvent.isShiftDown(L))}}else mxPanningHandler.prototype.isPanningTrigger=function(x){var L=x.getEvent();return mxEvent.isLeftMouseButton(L)&&(this.useLeftButtonForPanning&&null==x.getState()||mxEvent.isControlDown(L)&&!mxEvent.isShiftDown(L))||this.usePopupTrigger&&mxEvent.isPopupTrigger(L)};+mxRubberband.prototype.isSpaceEvent=function(x){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(x.getEvent())||mxEvent.isMetaDown(x.getEvent()))&&mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(x,L){if(this.cancelled)this.cancelled=!1,L.consume();else{var R=+null!=this.div&&"none"!=this.div.style.display,W=null,ja=null,ka=x=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(W=this.first.x,ja=this.first.y,x=(this.currentX-W)/this.graph.view.scale,ka=(this.currentY-ja)/this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(x=this.graph.snap(x),ka=this.graph.snap(ka),this.graph.isGridEnabled()||(Math.abs(x)<this.graph.tolerance&&(x=0),Math.abs(ka)<this.graph.tolerance&&(ka=0))));this.reset();if(R){if(this.isSpaceEvent(L)){this.graph.model.beginUpdate();+try{var oa=this.graph.getCellsBeyond(W,ja,this.graph.getDefaultParent(),!0,!0);for(R=0;R<oa.length;R++)if(this.graph.isCellMovable(oa[R])){var va=this.graph.view.getState(oa[R]),ta=this.graph.getCellGeometry(oa[R]);null!=va&&null!=ta&&(ta=ta.clone(),ta.translate(x,ka),this.graph.model.setGeometry(oa[R],ta))}}finally{this.graph.model.endUpdate()}}else oa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(oa,L.getEvent());L.consume()}}};mxRubberband.prototype.mouseMove=function(x,+L){if(!L.isConsumed()&&null!=this.first){var R=mxUtils.getScrollOrigin(this.graph.container);x=mxUtils.getOffset(this.graph.container);R.x-=x.x;R.y-=x.y;x=L.getX()+R.x;R=L.getY()+R.y;var W=this.first.x-x,ja=this.first.y-R,ka=this.graph.tolerance;if(null!=this.div||Math.abs(W)>ka||Math.abs(ja)>ka)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(x,R),this.isSpaceEvent(L)?(x=this.x+this.width,R=this.y+this.height,W=this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||+(this.width=this.graph.snap(this.width/W)*W,this.height=this.graph.snap(this.height/W)*W,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=x-this.width),this.y<this.first.y&&(this.y=R-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)),M.consume()}};var ja=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);ja.apply(this,arguments)};var pa=(new Date).getTime(),sa=0,qa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=-function(x,M,Q,V){qa.apply(this,arguments);Q!=this.currentTerminalState?(pa=(new Date).getTime(),sa=0):sa=(new Date).getTime()-pa;this.currentTerminalState=Q};var wa=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(x){return mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())?!1:null!=this.currentTerminalState&&x.getState()==this.currentTerminalState&&2E3<sa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,-"outlineConnect","1"))&&wa.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(x,M,Q){M=null!=x&&0==x;var V=this.state.getVisibleTerminalState(M);x=null!=x&&null!=this.state.absolutePoints&&(0==x||x>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==x)?this.graph.getConnectionConstraint(this.state,V,M):null;Q=null!=(null!=x?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(M),x):null)?Q?this.endFixedHandleImage:this.fixedHandleImage:-null!=x&&null!=V?Q?this.endTerminalHandleImage:this.terminalHandleImage:Q?this.endHandleImage:this.handleImage;if(null!=Q)return Q=new mxImageShape(new mxRectangle(0,0,Q.width,Q.height),Q.src),Q.preserveImageAspect=!1,Q;Q=mxConstants.HANDLE_SIZE;this.preferHtml&&--Q;return new mxRectangleShape(new mxRectangle(0,0,Q,Q),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Ba=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(x,M,Q,V){V=M==mxEvent.ROTATION_HANDLE?-HoverIcons.prototype.rotationHandle:M==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:V;return Ba.apply(this,arguments)};var za=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(x){if(null!=x&&1==x.length){var M=this.graph.getModel(),Q=M.getParent(x[0]),V=this.graph.getCellGeometry(x[0]);if(M.isEdge(Q)&&null!=V&&V.relative&&(M=this.graph.view.getState(x[0]),null!=M&&2>M.width&&2>M.height&&null!=M.text&&null!=M.text.boundingBox))return mxRectangle.fromRectangle(M.text.boundingBox)}return za.apply(this,-arguments)};var Ea=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var x=Ea.apply(this,arguments),M=[],Q=0;Q<x.length;Q++)"1"!=mxUtils.getValue(x[Q].style,"part","0")&&M.push(x[Q]);return M};var ra=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(x){var M=this.graph.getModel(),Q=M.getParent(x.cell),V=this.graph.getCellGeometry(x.cell);return M.isEdge(Q)&&null!=V&&V.relative&&2>x.width&&2>x.height&&null!=-x.text&&null!=x.text.boundingBox?(M=x.text.unrotatedBoundingBox||x.text.boundingBox,new mxRectangle(Math.round(M.x),Math.round(M.y),Math.round(M.width),Math.round(M.height))):ra.apply(this,arguments)};var ya=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(x,M){var Q=this.graph.getModel(),V=Q.getParent(this.state.cell),ia=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(M)==mxEvent.ROTATION_HANDLE||!Q.isEdge(V)||null==ia||!ia.relative||null==this.state||-2<=this.state.width||2<=this.state.height)&&ya.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var x=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),M=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&x==mxConstants.NONE&&M==mxConstants.NONE?(x=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,-x,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(x,M){Ca.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ma=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=-function(x,M){Ma.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(x,M){try{if(null==x&&(null==M||0==M.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),-this.linkHint=null);else if(null!=x||null!=M&&0<M.length){var Q=document.createElement("img");Q.className="geAdaptiveAsset";Q.setAttribute("src",Editor.editImage);Q.setAttribute("title",mxResources.get("editLink"));Q.setAttribute("width","14");Q.setAttribute("height","14");Q.style.paddingLeft="8px";Q.style.marginLeft="auto";Q.style.marginBottom="-1px";Q.style.cursor="pointer";var V=Q.cloneNode(!0);V.setAttribute("src",Editor.trashImage);V.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));-V.style.paddingLeft="4px";V.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=x){var ia=document.createElement("div");-ia.style.display="flex";ia.style.alignItems="center";ia.appendChild(this.graph.createLinkForHint(x,null,this.state.cell));this.linkHint.appendChild(ia);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ka=Q.cloneNode(!0);ia.appendChild(ka);mxEvent.addListener(ka,"click",mxUtils.bind(this,function(xa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(xa)}));var oa=V.cloneNode(!0);ia.appendChild(oa);mxEvent.addListener(oa,-"click",mxUtils.bind(this,function(xa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(xa)}))}}if(null!=M)for(ia=0;ia<M.length;ia++)mxUtils.bind(this,function(xa,ta){var ua=document.createElement("div");ua.style.display="flex";ua.style.alignItems="center";ua.style.marginTop=null!=x||0<ta?"6px":"0px";ua.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Fa=Q.cloneNode(!0);ua.appendChild(Fa);var Na=mxUtils.bind(this,function(Wa){var Xa=-document.createElement("div");Xa.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var ab=Xa.getElementsByTagName("a")[ta];if(null!=ab){if(null==Wa||""==Wa){for(Wa=ab.cloneNode(!0).firstChild;null!=Wa;)ab.parentNode.insertBefore(Wa.cloneNode(!0),ab),Wa=Wa.nextSibling;ab.parentNode.removeChild(ab)}else ab.setAttribute("href",Wa);this.graph.labelChanged(this.state.cell,Xa.innerHTML)}});mxEvent.addListener(Fa,"click",mxUtils.bind(this,function(Wa){this.graph.showLinkDialog(xa.getAttribute("href")||-"",mxResources.get("ok"),Na);mxEvent.consume(Wa)}));Fa=V.cloneNode(!0);ua.appendChild(Fa);mxEvent.addListener(Fa,"click",mxUtils.bind(this,function(Wa){Na();mxEvent.consume(Wa)}));this.linkHint.appendChild(ua)})(M[ia],ia)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Ha=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var x=Ha.apply(this,-arguments);x.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return x};var Aa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Aa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Ra=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var x=0;x<this.moveHandles.length;x++)null!=-this.moveHandles[x]&&(this.moveHandles[x].bounds.x=Math.round(this.moveHandles[x].rowState.x+this.moveHandles[x].rowState.width-this.moveHandles[x].bounds.width/2),this.moveHandles[x].bounds.y=Math.round(this.moveHandles[x].rowState.y+(this.moveHandles[x].rowState.height-this.moveHandles[x].bounds.height)/2),this.moveHandles[x].redraw());if(null!=this.cornerHandles){x=this.getSelectionBorderInset();var M=this.cornerHandles,Q=M[0].bounds.height/2;M[0].bounds.x=this.state.x-M[0].bounds.width/2+x;M[0].bounds.y=-this.state.y-Q+x;M[0].redraw();M[1].bounds.x=M[0].bounds.x+this.state.width-2*x;M[1].bounds.y=M[0].bounds.y;M[1].redraw();M[2].bounds.x=M[0].bounds.x;M[2].bounds.y=this.state.y+this.state.height-2*x;M[2].redraw();M[3].bounds.x=M[1].bounds.x;M[3].bounds.y=M[2].bounds.y;M[3].redraw();for(x=0;x<this.cornerHandles.length;x++)this.cornerHandles[x].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",-mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Ra.apply(this);null!=this.state&&null!=this.linkHint&&(x=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),M=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),Q=mxUtils.getBoundingBox(M,this.state.style[mxConstants.STYLE_ROTATION]||"0",x),x=null!=Q?mxUtils.getBoundingBox(this.state,-this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,M=null!=this.state.text?this.state.text.boundingBox:null,null==Q&&(Q=this.state),Q=Q.y+Q.height,null!=M&&(Q=Math.max(Q,M.y+M.height)),this.linkHint.style.left=x.x+x.width/2+"px",this.linkHint.style.top=Math.round(Q+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Za=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Za.apply(this,arguments);-this.destroyMoveHandles();this.destroyCornerHandles();null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var La=mxEdgeHandler.prototype.redrawHandles;-mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(La.apply(this),null!=this.state&&null!=this.linkHint)){var x=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(x=new mxRectangle(x.x,x.y,x.width,x.height),x.add(this.state.text.bounds));this.linkHint.style.left=x.x+x.width/2+"px";this.linkHint.style.top=Math.round(x.y+x.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var $a=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=-function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Da=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Da.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,n,y){mxShape.call(this);this.line=d;this.stroke=n;this.strokewidth=null!=y?y:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function u(){mxConnector.call(this)}function p(){mxCylinder.call(this)}function B(){mxActor.call(this)}function H(){mxCylinder.call(this)}function T(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function R(){mxShape.call(this)}+(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),L.consume()}};var fa=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);fa.apply(this,arguments)};var pa=(new Date).getTime(),sa=0,qa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=+function(x,L,R,W){qa.apply(this,arguments);R!=this.currentTerminalState?(pa=(new Date).getTime(),sa=0):sa=(new Date).getTime()-pa;this.currentTerminalState=R};var wa=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(x){return mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())?!1:null!=this.currentTerminalState&&x.getState()==this.currentTerminalState&&2E3<sa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,+"outlineConnect","1"))&&wa.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(x,L,R){L=null!=x&&0==x;var W=this.state.getVisibleTerminalState(L);x=null!=x&&null!=this.state.absolutePoints&&(0==x||x>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==x)?this.graph.getConnectionConstraint(this.state,W,L):null;R=null!=(null!=x?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(L),x):null)?R?this.endFixedHandleImage:this.fixedHandleImage:+null!=x&&null!=W?R?this.endTerminalHandleImage:this.terminalHandleImage:R?this.endHandleImage:this.handleImage;if(null!=R)return R=new mxImageShape(new mxRectangle(0,0,R.width,R.height),R.src),R.preserveImageAspect=!1,R;R=mxConstants.HANDLE_SIZE;this.preferHtml&&--R;return new mxRectangleShape(new mxRectangle(0,0,R,R),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Aa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(x,L,R,W){W=L==mxEvent.ROTATION_HANDLE?+HoverIcons.prototype.rotationHandle:L==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:W;return Aa.apply(this,arguments)};var za=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(x){if(null!=x&&1==x.length){var L=this.graph.getModel(),R=L.getParent(x[0]),W=this.graph.getCellGeometry(x[0]);if(L.isEdge(R)&&null!=W&&W.relative&&(L=this.graph.view.getState(x[0]),null!=L&&2>L.width&&2>L.height&&null!=L.text&&null!=L.text.boundingBox))return mxRectangle.fromRectangle(L.text.boundingBox)}return za.apply(this,+arguments)};var Da=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var x=Da.apply(this,arguments),L=[],R=0;R<x.length;R++)"1"!=mxUtils.getValue(x[R].style,"part","0")&&L.push(x[R]);return L};var ra=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(x){var L=this.graph.getModel(),R=L.getParent(x.cell),W=this.graph.getCellGeometry(x.cell);return L.isEdge(R)&&null!=W&&W.relative&&2>x.width&&2>x.height&&null!=+x.text&&null!=x.text.boundingBox?(L=x.text.unrotatedBoundingBox||x.text.boundingBox,new mxRectangle(Math.round(L.x),Math.round(L.y),Math.round(L.width),Math.round(L.height))):ra.apply(this,arguments)};var ya=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(x,L){var R=this.graph.getModel(),W=R.getParent(this.state.cell),ja=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(L)==mxEvent.ROTATION_HANDLE||!R.isEdge(W)||null==ja||!ja.relative||null==this.state||+2<=this.state.width||2<=this.state.height)&&ya.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var x=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),L=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&x==mxConstants.NONE&&L==mxConstants.NONE?(x=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,+x,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(x,L){Ca.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ka=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=+function(x,L){Ka.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(x,L){try{if(null==x&&(null==L||0==L.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),+this.linkHint=null);else if(null!=x||null!=L&&0<L.length){var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("editLink"));R.setAttribute("width","14");R.setAttribute("height","14");R.style.paddingLeft="8px";R.style.marginLeft="auto";R.style.marginBottom="-1px";R.style.cursor="pointer";var W=R.cloneNode(!0);W.setAttribute("src",Editor.trashImage);W.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));+W.style.paddingLeft="4px";W.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=x){var ja=document.createElement("div");+ja.style.display="flex";ja.style.alignItems="center";ja.appendChild(this.graph.createLinkForHint(x,null,this.state.cell));this.linkHint.appendChild(ja);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ka=R.cloneNode(!0);ja.appendChild(ka);mxEvent.addListener(ka,"click",mxUtils.bind(this,function(va){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(va)}));var oa=W.cloneNode(!0);ja.appendChild(oa);mxEvent.addListener(oa,+"click",mxUtils.bind(this,function(va){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(va)}))}}if(null!=L)for(ja=0;ja<L.length;ja++)mxUtils.bind(this,function(va,ta){var xa=document.createElement("div");xa.style.display="flex";xa.style.alignItems="center";xa.style.marginTop=null!=x||0<ta?"6px":"0px";xa.appendChild(this.graph.createLinkForHint(va.getAttribute("href"),mxUtils.getTextContent(va),this.state.cell));var Fa=R.cloneNode(!0);xa.appendChild(Fa);var Ma=mxUtils.bind(this,function(Wa){var Xa=+document.createElement("div");Xa.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var ab=Xa.getElementsByTagName("a")[ta];if(null!=ab){if(null==Wa||""==Wa){for(Wa=ab.cloneNode(!0).firstChild;null!=Wa;)ab.parentNode.insertBefore(Wa.cloneNode(!0),ab),Wa=Wa.nextSibling;ab.parentNode.removeChild(ab)}else ab.setAttribute("href",Wa);this.graph.labelChanged(this.state.cell,Xa.innerHTML)}});mxEvent.addListener(Fa,"click",mxUtils.bind(this,function(Wa){this.graph.showLinkDialog(va.getAttribute("href")||+"",mxResources.get("ok"),Ma);mxEvent.consume(Wa)}));Fa=W.cloneNode(!0);xa.appendChild(Fa);mxEvent.addListener(Fa,"click",mxUtils.bind(this,function(Wa){Ma();mxEvent.consume(Wa)}));this.linkHint.appendChild(xa)})(L[ja],ja)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(va){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Ha=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var x=Ha.apply(this,+arguments);x.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return x};var Ba=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ba.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Pa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var x=0;x<this.moveHandles.length;x++)null!=+this.moveHandles[x]&&(this.moveHandles[x].bounds.x=Math.round(this.moveHandles[x].rowState.x+this.moveHandles[x].rowState.width-this.moveHandles[x].bounds.width/2),this.moveHandles[x].bounds.y=Math.round(this.moveHandles[x].rowState.y+(this.moveHandles[x].rowState.height-this.moveHandles[x].bounds.height)/2),this.moveHandles[x].redraw());if(null!=this.cornerHandles){x=this.getSelectionBorderInset();var L=this.cornerHandles,R=L[0].bounds.height/2;L[0].bounds.x=this.state.x-L[0].bounds.width/2+x;L[0].bounds.y=+this.state.y-R+x;L[0].redraw();L[1].bounds.x=L[0].bounds.x+this.state.width-2*x;L[1].bounds.y=L[0].bounds.y;L[1].redraw();L[2].bounds.x=L[0].bounds.x;L[2].bounds.y=this.state.y+this.state.height-2*x;L[2].redraw();L[3].bounds.x=L[1].bounds.x;L[3].bounds.y=L[2].bounds.y;L[3].redraw();for(x=0;x<this.cornerHandles.length;x++)this.cornerHandles[x].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",+mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Pa.apply(this);null!=this.state&&null!=this.linkHint&&(x=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),L=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),R=mxUtils.getBoundingBox(L,this.state.style[mxConstants.STYLE_ROTATION]||"0",x),x=null!=R?mxUtils.getBoundingBox(this.state,+this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,L=null!=this.state.text?this.state.text.boundingBox:null,null==R&&(R=this.state),R=R.y+R.height,null!=L&&(R=Math.max(R,L.y+L.height)),this.linkHint.style.left=x.x+x.width/2+"px",this.linkHint.style.top=Math.round(R+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var $a=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){$a.apply(this,arguments);+this.destroyMoveHandles();this.destroyCornerHandles();null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Na=mxEdgeHandler.prototype.redrawHandles;+mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Na.apply(this),null!=this.state&&null!=this.linkHint)){var x=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(x=new mxRectangle(x.x,x.y,x.width,x.height),x.add(this.state.text.bounds));this.linkHint.style.left=x.x+x.width/2+"px";this.linkHint.style.top=Math.round(x.y+x.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var Ya=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=+function(){Ya.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ea=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ea.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,n,y){mxShape.call(this);this.line=d;this.stroke=n;this.strokewidth=null!=y?y:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function u(){mxConnector.call(this)}function p(){mxCylinder.call(this)}function B(){mxActor.call(this)}function H(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function Q(){mxShape.call(this)}function c(){mxShape.call(this)}function f(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1}function l(){mxActor.call(this)}function t(){mxCylinder.call(this)}function z(){mxCylinder.call(this)}function C(){mxActor.call(this)}function F(){mxActor.call(this)}function N(){mxActor.call(this)}function K(){mxActor.call(this)}function J(){mxActor.call(this)}function da(){mxActor.call(this)}function ea(){mxActor.call(this)}function ca(d,n){this.canvas=d;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=n;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ca.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ca.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ca.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ca.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=-mxUtils.bind(this,ca.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ca.prototype.arcTo)}function W(){mxRectangleShape.call(this)}function ba(){mxRectangleShape.call(this)}function ha(){mxActor.call(this)}function la(){mxActor.call(this)}function Y(){mxActor.call(this)}function ma(){mxRectangleShape.call(this)}function Z(){mxRectangleShape.call(this)}function k(){mxCylinder.call(this)}function A(){mxShape.call(this)}function I(){mxShape.call(this)}function U(){mxEllipse.call(this)}-function O(){mxShape.call(this)}function S(){mxShape.call(this)}function X(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function ja(){mxShape.call(this)}function pa(){mxShape.call(this)}function sa(){mxShape.call(this)}function qa(){mxShape.call(this)}function wa(){mxCylinder.call(this)}function Ba(){mxCylinder.call(this)}function za(){mxRectangleShape.call(this)}function Ea(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function ya(){mxArrowConnector.call(this);-this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ma(){mxActor.call(this)}function Ha(){mxRectangleShape.call(this)}function Aa(){mxActor.call(this)}function Ra(){mxActor.call(this)}function Za(){mxActor.call(this)}function La(){mxActor.call(this)}function $a(){mxActor.call(this)}function Da(){mxActor.call(this)}function x(){mxActor.call(this)}function M(){mxActor.call(this)}function Q(){mxActor.call(this)}function V(){mxActor.call(this)}function ia(){mxEllipse.call(this)}-function ka(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function Na(){mxEllipse.call(this)}function Wa(){mxActor.call(this)}function Xa(){mxActor.call(this)}function ab(){mxActor.call(this)}function Oa(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=-!0;this.indent=2;this.rectOutline="single"}function Qa(){mxConnector.call(this)}function kb(d,n,y,q,v,D,E,fa,L,va){E+=L;var na=q.clone();q.x-=v*(2*E+L);q.y-=D*(2*E+L);v*=E+L;D*=E+L;return function(){d.ellipse(na.x-v-E,na.y-D-E,2*E,2*E);va?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var n=0;n<this.line.length;n++){var y=this.line[n];null!=y&&(y=new mxRectangle(y.x,y.y,this.strokewidth,this.strokewidth),null==+mxUtils.bind(this,ca.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ca.prototype.arcTo)}function X(){mxRectangleShape.call(this)}function aa(){mxRectangleShape.call(this)}function ia(){mxActor.call(this)}function la(){mxActor.call(this)}function Y(){mxActor.call(this)}function ma(){mxRectangleShape.call(this)}function Z(){mxRectangleShape.call(this)}function k(){mxCylinder.call(this)}function A(){mxShape.call(this)}function I(){mxShape.call(this)}function T(){mxEllipse.call(this)}+function O(){mxShape.call(this)}function U(){mxShape.call(this)}function V(){mxRectangleShape.call(this)}function ba(){mxShape.call(this)}function fa(){mxShape.call(this)}function pa(){mxShape.call(this)}function sa(){mxShape.call(this)}function qa(){mxShape.call(this)}function wa(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function za(){mxRectangleShape.call(this)}function Da(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function ya(){mxArrowConnector.call(this);+this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ka(){mxActor.call(this)}function Ha(){mxRectangleShape.call(this)}function Ba(){mxActor.call(this)}function Pa(){mxActor.call(this)}function $a(){mxActor.call(this)}function Na(){mxActor.call(this)}function Ya(){mxActor.call(this)}function Ea(){mxActor.call(this)}function x(){mxActor.call(this)}function L(){mxActor.call(this)}function R(){mxActor.call(this)}function W(){mxActor.call(this)}function ja(){mxEllipse.call(this)}+function ka(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function va(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Wa(){mxActor.call(this)}function Xa(){mxActor.call(this)}function ab(){mxActor.call(this)}function Oa(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=+!0;this.indent=2;this.rectOutline="single"}function Ra(){mxConnector.call(this)}function kb(d,n,y,q,v,D,E,ha,M,ua){E+=M;var na=q.clone();q.x-=v*(2*E+M);q.y-=D*(2*E+M);v*=E+M;D*=E+M;return function(){d.ellipse(na.x-v-E,na.y-D-E,2*E,2*E);ua?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var n=0;n<this.line.length;n++){var y=this.line[n];null!=y&&(y=new mxRectangle(y.x,y.y,this.strokewidth,this.strokewidth),null==d?d=y:d.add(y))}this.bounds=null!=d?d:new mxRectangle};b.prototype.paintVertexShape=function(d,n,y,q,v){this.paintTableLine(d,this.line,0,0)};b.prototype.paintTableLine=function(d,n,y,q){if(null!=n){var v=null;d.begin();for(var D=0;D<n.length;D++){var E=n[D];null!=E&&(null==v?d.moveTo(E.x+y,E.y+q):null!=v&&d.lineTo(E.x+y,E.y+q));v=E}d.end();d.stroke()}};b.prototype.intersectsRectangle=function(d){var n=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var y=null,q=0;q<this.line.length&&!n;q++){var v=this.line[q];null!=v&&null!=y&&(n=mxUtils.rectangleIntersectsSegment(d,y,v));y=v}return n};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(d){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(d,n,y,q,v){var D=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):-!1,E=this.isHorizontal(),fa=this.getTitleSize();0==fa||this.outline?Fa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-n,-y));D||this.outline||!(E&&fa<v||!E&&fa<q)||this.paintForeground(d,n,y,q,v)};e.prototype.paintForeground=function(d,n,y,q,v){if(null!=this.state){var D=this.flipH,E=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var fa=D;D=E;E=fa}d.rotate(-this.getShapeRotation(),+!1,E=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Fa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-n,-y));D||this.outline||!(E&&ha<v||!E&&ha<q)||this.paintForeground(d,n,y,q,v)};e.prototype.paintForeground=function(d,n,y,q,v){if(null!=this.state){var D=this.flipH,E=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=D;D=E;E=ha}d.rotate(-this.getShapeRotation(),D,E,n+q/2,y+v/2);s=this.scale;n=this.bounds.x/s;y=this.bounds.y/s;q=this.bounds.width/s;v=this.bounds.height/s;this.paintTableForeground(d,n,y,q,v)}};e.prototype.paintTableForeground=function(d,n,y,q,v){q=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(v=0;v<q.length;v++)b.prototype.paintTableLine(d,q[v],n,y)};e.prototype.configurePointerEvents=function(d){0==this.getTitleSize()?d.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",e);mxUtils.extend(g,e);g.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",g);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(q,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),E=Math.max(-1,Math.min(1,-parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),fa=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));d.translate(n,y);d.begin();d.moveTo(0,0);d.lineTo(q-D,0);d.lineTo(q,D);d.lineTo(q,v);d.lineTo(D,v);d.lineTo(0,v-D);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=E&&(d.setFillAlpha(Math.abs(E)),d.setFillColor(0>E?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(q-D,0),d.lineTo(q,D),-d.lineTo(D,D),d.close(),d.fill()),0!=fa&&(d.setFillAlpha(Math.abs(fa)),d.setFillColor(0>fa?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(D,D),d.lineTo(D,v),d.lineTo(0,v-D),d.close(),d.fill()),d.begin(),d.moveTo(D,v),d.lineTo(D,D),d.lineTo(0,0),d.moveTo(D,D),d.lineTo(q,D),d.end(),d.stroke())};m.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)?(d=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(d,d,0,0)):null};mxCellRenderer.registerShape("cube",-m);var cb=Math.tan(mxUtils.toRadians(30)),Ya=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",B);mxUtils.extend(u,mxConnector);u.prototype.paintEdgeShape=function(d,n){var y=this.createMarker(d,n,!0),q=this.createMarker(d,n,!1);d.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&d.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);d.setShadow(!1);d.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this,+parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));d.translate(n,y);d.begin();d.moveTo(0,0);d.lineTo(q-D,0);d.lineTo(q,D);d.lineTo(q,v);d.lineTo(D,v);d.lineTo(0,v-D);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=E&&(d.setFillAlpha(Math.abs(E)),d.setFillColor(0>E?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(q-D,0),d.lineTo(q,D),+d.lineTo(D,D),d.close(),d.fill()),0!=ha&&(d.setFillAlpha(Math.abs(ha)),d.setFillColor(0>ha?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(D,D),d.lineTo(D,v),d.lineTo(0,v-D),d.close(),d.fill()),d.begin(),d.moveTo(D,v),d.lineTo(D,D),d.lineTo(0,0),d.moveTo(D,D),d.lineTo(q,D),d.end(),d.stroke())};m.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)?(d=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(d,d,0,0)):null};mxCellRenderer.registerShape("cube",+m);var cb=Math.tan(mxUtils.toRadians(30)),Za=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",B);mxUtils.extend(u,mxConnector);u.prototype.paintEdgeShape=function(d,n){var y=this.createMarker(d,n,!0),q=this.createMarker(d,n,!1);d.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&d.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);d.setShadow(!1);d.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);d.setStrokeColor(this.stroke);d.setFillColor(this.stroke);d.setDashed(!1);null!=y&&y();null!=q&&q()};mxCellRenderer.registerShape("wire",u);mxUtils.extend(p,mxCylinder);p.prototype.size=6;p.prototype.paintVertexShape=function(d,n,y,q,v){d.setFillColor(this.stroke);var D=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;d.ellipse(n+.5*(q-D),y+.5*(v-D),D,D);d.fill();d.setFillColor(mxConstants.NONE);d.rect(n,y,q,v);d.fill()};mxCellRenderer.registerShape("waypoint",-p);mxUtils.extend(B,mxActor);B.prototype.size=20;B.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(q,v/cb);d.translate((q-n)/2,(v-n)/2+n/4);d.moveTo(0,.25*n);d.lineTo(.5*n,n*Ya);d.lineTo(n,.25*n);d.lineTo(.5*n,(.5-Ya)*n);d.lineTo(0,.25*n);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",B);mxUtils.extend(H,mxCylinder);H.prototype.size=20;H.prototype.redrawPath=function(d,n,y,q,v,D){n=Math.min(q,v/(.5+cb));D?(d.moveTo(0,.25*n),d.lineTo(.5*n,(.5-Ya)*n),d.lineTo(n,.25*n),d.moveTo(.5*-n,(.5-Ya)*n),d.lineTo(.5*n,(1-Ya)*n)):(d.translate((q-n)/2,(v-n)/2),d.moveTo(0,.25*n),d.lineTo(.5*n,n*Ya),d.lineTo(n,.25*n),d.lineTo(n,.75*n),d.lineTo(.5*n,(1-Ya)*n),d.lineTo(0,.75*n),d.close());d.end()};mxCellRenderer.registerShape("isoCube",H);mxUtils.extend(T,mxCylinder);T.prototype.redrawPath=function(d,n,y,q,v,D){n=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(D&&null!=this.fill||!D&&null==this.fill)d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,n/2),d.moveTo(0,-n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,n/2),d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,-n);D||(d.moveTo(0,n),d.curveTo(0,-n/3,q,-n/3,q,n),d.lineTo(q,v-n),d.curveTo(q,v+n/3,0,v+n/3,0,v-n),d.close())};T.prototype.getLabelMargins=function(d){return new mxRectangle(0,2.5*Math.min(d.height/2,Math.round(d.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",T);mxUtils.extend(G,mxCylinder);G.prototype.size=30;G.prototype.darkOpacity=+p);mxUtils.extend(B,mxActor);B.prototype.size=20;B.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(q,v/cb);d.translate((q-n)/2,(v-n)/2+n/4);d.moveTo(0,.25*n);d.lineTo(.5*n,n*Za);d.lineTo(n,.25*n);d.lineTo(.5*n,(.5-Za)*n);d.lineTo(0,.25*n);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",B);mxUtils.extend(H,mxCylinder);H.prototype.size=20;H.prototype.redrawPath=function(d,n,y,q,v,D){n=Math.min(q,v/(.5+cb));D?(d.moveTo(0,.25*n),d.lineTo(.5*n,(.5-Za)*n),d.lineTo(n,.25*n),d.moveTo(.5*+n,(.5-Za)*n),d.lineTo(.5*n,(1-Za)*n)):(d.translate((q-n)/2,(v-n)/2),d.moveTo(0,.25*n),d.lineTo(.5*n,n*Za),d.lineTo(n,.25*n),d.lineTo(n,.75*n),d.lineTo(.5*n,(1-Za)*n),d.lineTo(0,.75*n),d.close());d.end()};mxCellRenderer.registerShape("isoCube",H);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(d,n,y,q,v,D){n=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(D&&null!=this.fill||!D&&null==this.fill)d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,n/2),d.moveTo(0,+n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,n/2),d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,-n);D||(d.moveTo(0,n),d.curveTo(0,-n/3,q,-n/3,q,n),d.lineTo(q,v-n),d.curveTo(q,v+n/3,0,v+n/3,0,v-n),d.close())};S.prototype.getLabelMargins=function(d){return new mxRectangle(0,2.5*Math.min(d.height/2,Math.round(d.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",S);mxUtils.extend(G,mxCylinder);G.prototype.size=30;G.prototype.darkOpacity=0;G.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(q,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),E=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));d.translate(n,y);d.begin();d.moveTo(0,0);d.lineTo(q-D,0);d.lineTo(q,D);d.lineTo(q,v);d.lineTo(0,v);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=E&&(d.setFillAlpha(Math.abs(E)),d.setFillColor(0>E?"#FFFFFF":"#000000"),-d.begin(),d.moveTo(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.close(),d.fill()),d.begin(),d.moveTo(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.end(),d.stroke())};mxCellRenderer.registerShape("note",G);mxUtils.extend(P,G);mxCellRenderer.registerShape("note2",P);P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,0)}return null};mxUtils.extend(R,mxShape);R.prototype.isoAngle=-15;R.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;D=Math.min(q*Math.tan(D),.5*v);d.translate(n,y);d.begin();d.moveTo(.5*q,0);d.lineTo(q,D);d.lineTo(q,v-D);d.lineTo(.5*q,v);d.lineTo(0,v-D);d.lineTo(0,D);d.close();d.fillAndStroke();d.setShadow(!1);d.begin();d.moveTo(0,D);d.lineTo(.5*q,2*D);d.lineTo(q,D);d.moveTo(.5*q,2*D);d.lineTo(.5*q,v);d.stroke()};mxCellRenderer.registerShape("isoCube2",-R);mxUtils.extend(c,mxShape);c.prototype.size=15;c.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.translate(n,y);0==D?(d.rect(0,0,q,v),d.fillAndStroke()):(d.begin(),d.moveTo(0,D),d.arcTo(.5*q,D,0,0,1,.5*q,0),d.arcTo(.5*q,D,0,0,1,q,D),d.lineTo(q,v-D),d.arcTo(.5*q,D,0,0,1,.5*q,v),d.arcTo(.5*q,D,0,0,1,0,v-D),d.close(),d.fillAndStroke(),d.setShadow(!1),d.begin(),d.moveTo(q,D),d.arcTo(.5*q,D,0,0,1,.5*q,2*D),d.arcTo(.5*+d.begin(),d.moveTo(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.close(),d.fill()),d.begin(),d.moveTo(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.end(),d.stroke())};mxCellRenderer.registerShape("note",G);mxUtils.extend(P,G);mxCellRenderer.registerShape("note2",P);P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,0)}return null};mxUtils.extend(Q,mxShape);Q.prototype.isoAngle=+15;Q.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;D=Math.min(q*Math.tan(D),.5*v);d.translate(n,y);d.begin();d.moveTo(.5*q,0);d.lineTo(q,D);d.lineTo(q,v-D);d.lineTo(.5*q,v);d.lineTo(0,v-D);d.lineTo(0,D);d.close();d.fillAndStroke();d.setShadow(!1);d.begin();d.moveTo(0,D);d.lineTo(.5*q,2*D);d.lineTo(q,D);d.moveTo(.5*q,2*D);d.lineTo(.5*q,v);d.stroke()};mxCellRenderer.registerShape("isoCube2",+Q);mxUtils.extend(c,mxShape);c.prototype.size=15;c.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.translate(n,y);0==D?(d.rect(0,0,q,v),d.fillAndStroke()):(d.begin(),d.moveTo(0,D),d.arcTo(.5*q,D,0,0,1,.5*q,0),d.arcTo(.5*q,D,0,0,1,q,D),d.lineTo(q,v-D),d.arcTo(.5*q,D,0,0,1,.5*q,v),d.arcTo(.5*q,D,0,0,1,0,v-D),d.close(),d.fillAndStroke(),d.setShadow(!1),d.begin(),d.moveTo(q,D),d.arcTo(.5*q,D,0,0,1,.5*q,2*D),d.arcTo(.5*q,D,0,0,1,0,D),d.stroke())};mxCellRenderer.registerShape("cylinder2",c);mxUtils.extend(f,mxCylinder);f.prototype.size=15;f.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"lid",!0);d.translate(n,y);0==D?(d.rect(0,0,q,v),d.fillAndStroke()):(d.begin(),E?(d.moveTo(0,D),d.arcTo(.5*q,D,0,0,1,.5*q,0),d.arcTo(.5*q,D,0,0,1,q,D)):(d.moveTo(0,0),d.arcTo(.5*q,D,0,0,0,.5*q,D),d.arcTo(.5*q,D,0,0,0,q,0)),d.lineTo(q,v-D),d.arcTo(.5*q,D,0,0,1,.5*q,v),d.arcTo(.5*q,D,0,0,1,0,v-D),d.close(),d.fillAndStroke(),d.setShadow(!1),E&&(d.begin(),d.moveTo(q,D),d.arcTo(.5*q,D,0,0,1,.5*q,2*D),d.arcTo(.5*q,D,0,0,1,0,D),d.stroke()))};mxCellRenderer.registerShape("cylinder3",f);mxUtils.extend(l,mxActor);l.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.quadTo(q/2,.5*v,q,0);d.quadTo(.5*q,v/2,q,v);d.quadTo(q/2,.5*v,0,v);d.quadTo(.5*q,v/2,0,0);d.end()};mxCellRenderer.registerShape("switch",l);mxUtils.extend(t,-mxCylinder);t.prototype.tabWidth=60;t.prototype.tabHeight=20;t.prototype.tabPosition="right";t.prototype.arcSize=.1;t.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var D=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),E=mxUtils.getValue(this.style,"rounded",!1),fa=mxUtils.getValue(this.style,-"absoluteArcSize",!1),L=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));fa||(L*=Math.min(q,v));L=Math.min(L,.5*q,.5*(v-y));n=Math.max(n,L);n=Math.min(q-L,n);E||(L=0);d.begin();"left"==D?(d.moveTo(Math.max(L,0),y),d.lineTo(Math.max(L,0),0),d.lineTo(n,0),d.lineTo(n,y)):(d.moveTo(q-n,y),d.lineTo(q-n,0),d.lineTo(q-Math.max(L,0),0),d.lineTo(q-Math.max(L,0),y));E?(d.moveTo(0,L+y),d.arcTo(L,L,0,0,1,L,y),d.lineTo(q-L,y),d.arcTo(L,L,0,0,1,q,L+y),d.lineTo(q,v-L),d.arcTo(L,L,0,0,1,q-L,v),d.lineTo(L,-v),d.arcTo(L,L,0,0,1,0,v-L)):(d.moveTo(0,y),d.lineTo(q,y),d.lineTo(q,v),d.lineTo(0,v));d.close();d.fillAndStroke();d.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(d.begin(),d.moveTo(q-30,y+20),d.lineTo(q-20,y+10),d.lineTo(q-10,y+20),d.close(),d.stroke())};mxCellRenderer.registerShape("folder",t);t.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,+mxCylinder);t.prototype.tabWidth=60;t.prototype.tabHeight=20;t.prototype.tabPosition="right";t.prototype.arcSize=.1;t.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var D=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),E=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style,+"absoluteArcSize",!1),M=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ha||(M*=Math.min(q,v));M=Math.min(M,.5*q,.5*(v-y));n=Math.max(n,M);n=Math.min(q-M,n);E||(M=0);d.begin();"left"==D?(d.moveTo(Math.max(M,0),y),d.lineTo(Math.max(M,0),0),d.lineTo(n,0),d.lineTo(n,y)):(d.moveTo(q-n,y),d.lineTo(q-n,0),d.lineTo(q-Math.max(M,0),0),d.lineTo(q-Math.max(M,0),y));E?(d.moveTo(0,M+y),d.arcTo(M,M,0,0,1,M,y),d.lineTo(q-M,y),d.arcTo(M,M,0,0,1,q,M+y),d.lineTo(q,v-M),d.arcTo(M,M,0,0,1,q-M,v),d.lineTo(M,+v),d.arcTo(M,M,0,0,1,0,v-M)):(d.moveTo(0,y),d.lineTo(q,y),d.lineTo(q,v),d.lineTo(0,v));d.close();d.fillAndStroke();d.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(d.begin(),d.moveTo(q-30,y+20),d.lineTo(q-20,y+10),d.lineTo(q-10,y+20),d.close(),d.stroke())};mxCellRenderer.registerShape("folder",t);t.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var y=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var q=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),D=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(D*=Math.min(d.width,d.height));D=Math.min(D,.5*d.width,.5*(d.height-n));q||(D=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(D,0,Math.min(d.width,d.width-y),Math.min(d.height,d.height-n)):new mxRectangle(Math.min(d.width,d.width-y),0,D,Math.min(d.height,d.height-n))}return new mxRectangle(0,Math.min(d.height,n),0,0)}return null};mxUtils.extend(z,mxCylinder);z.prototype.arcSize=.1;z.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);var D=mxUtils.getValue(this.style,"rounded",!1),E=mxUtils.getValue(this.style,"absoluteArcSize",!1);n=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));y=mxUtils.getValue(this.style,"umlStateConnection",null);E||(n*=Math.min(q,v));n=Math.min(n,.5*q,.5*v);D||(n=0);D=0;null!=y&&(D=10);d.begin();d.moveTo(D,n);d.arcTo(n,n,0,0,1,D+n,0);d.lineTo(q-n,0);d.arcTo(n,n,0,0,1,q,n);d.lineTo(q,v-n);d.arcTo(n,n,0,0,1,q-n,v);d.lineTo(D+n,v);d.arcTo(n,n,0,0,1,D,v-n);d.close();d.fillAndStroke();d.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(d.roundrect(q-40,v-20,10,10,3,3),d.stroke(),d.roundrect(q-20,v-20,10,10,3,3),d.stroke(),d.begin(),d.moveTo(q-30,v-15),d.lineTo(q-20,v-15),@@ -2782,181 +2782,181 @@ n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.minda.prototype.size=.5;da.prototype.redrawPath=function(d,n,y,q,v){d.setFillColor(null);n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(q,0),new mxPoint(n,0),new mxPoint(n,v/2),new mxPoint(0,v/2),new mxPoint(n,v/2),new mxPoint(n,v),new mxPoint(q,v)],this.isRounded,y,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",da);mxUtils.extend(ea,mxActor);ea.prototype.redrawPath=function(d,n,y,q,v){d.setStrokeWidth(1);d.setFillColor(this.stroke);n=q/5;d.rect(0,0,n,v);d.fillAndStroke();d.rect(2*n,0,n,v);d.fillAndStroke();d.rect(4*n,0,n,v);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",ea);ca.prototype.moveTo=function(d,n){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;this.firstX=d;this.firstY=n};ca.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)};ca.prototype.quadTo=function(d,n,y,q){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=y;this.lastY=q};ca.prototype.curveTo=function(d,n,y,q,v,D){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=D};ca.prototype.arcTo=function(d,n,y,q,v,D,E){this.originalArcTo.apply(this.canvas,arguments);this.lastX=D;this.lastY=E};ca.prototype.lineTo=function(d,n){if(null!=this.lastX&&null!=this.lastY){var y=function(na){return"number"===-typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},q=Math.abs(d-this.lastX),v=Math.abs(n-this.lastY),D=Math.sqrt(q*q+v*v);if(2>D){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;return}var E=Math.round(D/10),fa=this.defaultVariation;5>E&&(E=5,fa/=3);var L=y(d-this.lastX)*q/E;y=y(n-this.lastY)*v/E;q/=D;v/=D;for(D=0;D<E;D++){var va=(Math.random()-.5)*fa;this.originalLineTo.call(this.canvas,L*D+this.lastX-va*v,y*D+this.lastY-va*q)}this.originalLineTo.call(this.canvas,d,n)}else this.originalLineTo.apply(this.canvas,+typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},q=Math.abs(d-this.lastX),v=Math.abs(n-this.lastY),D=Math.sqrt(q*q+v*v);if(2>D){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;return}var E=Math.round(D/10),ha=this.defaultVariation;5>E&&(E=5,ha/=3);var M=y(d-this.lastX)*q/E;y=y(n-this.lastY)*v/E;q/=D;v/=D;for(D=0;D<E;D++){var ua=(Math.random()-.5)*ha;this.originalLineTo.call(this.canvas,M*D+this.lastX-ua*v,y*D+this.lastY-ua*q)}this.originalLineTo.call(this.canvas,d,n)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n};ca.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 hb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(d){hb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var vb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(d){vb.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new ca(d,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(d){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(d)};var mb=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&mb.apply(this,arguments)};var pb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(d,n,y,q,v){if(null==d.handJiggle||d.handJiggle.constructor!=ca)pb.apply(this,arguments);else{var D=!0;null!=this.style&&(D="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(D||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)D||null!=this.fill&&this.fill!=mxConstants.NONE||(d.pointerEvents=!1),d.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?D=Math.min(q/2,Math.min(v/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,D=Math.min(q*D,v*D)),d.moveTo(n+-D,y),d.lineTo(n+q-D,y),d.quadTo(n+q,y,n+q,y+D),d.lineTo(n+q,y+v-D),d.quadTo(n+q,y+v,n+q-D,y+v),d.lineTo(n+D,y+v),d.quadTo(n,y+v,n,y+v-D),d.lineTo(n,y+D),d.quadTo(n,y,n+D,y)):(d.moveTo(n,y),d.lineTo(n+q,y),d.lineTo(n+q,y+v),d.lineTo(n,y+v),d.lineTo(n,y)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(W,mxRectangleShape);W.prototype.size=.1;W.prototype.fixedSize=!1;W.prototype.isHtmlAllowed=function(){return!1};W.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,-!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var n=d.width,y=d.height;d=new mxRectangle(d.x,d.y,n,y);var q=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;q=Math.max(q,Math.min(n*v,y*v))}d.x+=Math.round(q);d.width-=Math.round(2*q);return d}return d};W.prototype.paintForeground=+D,y),d.lineTo(n+q-D,y),d.quadTo(n+q,y,n+q,y+D),d.lineTo(n+q,y+v-D),d.quadTo(n+q,y+v,n+q-D,y+v),d.lineTo(n+D,y+v),d.quadTo(n,y+v,n,y+v-D),d.lineTo(n,y+D),d.quadTo(n,y,n+D,y)):(d.moveTo(n,y),d.lineTo(n+q,y),d.lineTo(n+q,y+v),d.lineTo(n,y+v),d.lineTo(n,y)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(X,mxRectangleShape);X.prototype.size=.1;X.prototype.fixedSize=!1;X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,+!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var n=d.width,y=d.height;d=new mxRectangle(d.x,d.y,n,y);var q=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;q=Math.max(q,Math.min(n*v,y*v))}d.x+=Math.round(q);d.width-=Math.round(2*q);return d}return d};X.prototype.paintForeground=function(d,n,y,q,v){var D=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),E=parseFloat(mxUtils.getValue(this.style,"size",this.size));E=D?Math.max(0,Math.min(q,E)):q*Math.max(0,Math.min(1,E));this.isRounded&&(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,E=Math.max(E,Math.min(q*D,v*D)));E=Math.round(E);d.begin();d.moveTo(n+E,y);d.lineTo(n+E,y+v);d.moveTo(n+q-E,y);d.lineTo(n+q-E,y+v);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,-arguments)};mxCellRenderer.registerShape("process",W);mxCellRenderer.registerShape("process2",W);mxUtils.extend(ba,mxRectangleShape);ba.prototype.paintBackground=function(d,n,y,q,v){d.setFillColor(mxConstants.NONE);d.rect(n,y,q,v);d.fill()};ba.prototype.paintForeground=function(d,n,y,q,v){};mxCellRenderer.registerShape("transparent",ba);mxUtils.extend(ha,mxHexagon);ha.prototype.size=30;ha.prototype.position=.5;ha.prototype.position2=.5;ha.prototype.base=20;ha.prototype.getLabelMargins=function(){return new mxRectangle(0,-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(d,n,y,q,v){n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var D=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),E=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",-this.position2)))),fa=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,v-y),new mxPoint(Math.min(q,D+fa),v-y),new mxPoint(E,v),new mxPoint(Math.max(0,D),v-y),new mxPoint(0,v-y)],this.isRounded,n,!0,[4])};mxCellRenderer.registerShape("callout",ha);mxUtils.extend(la,mxActor);la.prototype.size=.2;la.prototype.fixedSize=20;la.prototype.isRoundable=function(){return!0};la.prototype.redrawPath=function(d,+arguments)};mxCellRenderer.registerShape("process",X);mxCellRenderer.registerShape("process2",X);mxUtils.extend(aa,mxRectangleShape);aa.prototype.paintBackground=function(d,n,y,q,v){d.setFillColor(mxConstants.NONE);d.rect(n,y,q,v);d.fill()};aa.prototype.paintForeground=function(d,n,y,q,v){};mxCellRenderer.registerShape("transparent",aa);mxUtils.extend(ia,mxHexagon);ia.prototype.size=30;ia.prototype.position=.5;ia.prototype.position2=.5;ia.prototype.base=20;ia.prototype.getLabelMargins=function(){return new mxRectangle(0,+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(d,n,y,q,v){n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var D=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),E=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",+this.position2)))),ha=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,v-y),new mxPoint(Math.min(q,D+ha),v-y),new mxPoint(E,v),new mxPoint(Math.max(0,D),v-y),new mxPoint(0,v-y)],this.isRounded,n,!0,[4])};mxCellRenderer.registerShape("callout",ia);mxUtils.extend(la,mxActor);la.prototype.size=.2;la.prototype.fixedSize=20;la.prototype.isRoundable=function(){return!0};la.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q-n,0),new mxPoint(q,v/2),new mxPoint(q-n,v),new mxPoint(0,v),new mxPoint(n,v/2)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("step",la);mxUtils.extend(Y,mxHexagon);Y.prototype.size=.25;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,.5*v),new mxPoint(q-n,v),new mxPoint(n,v),new mxPoint(0,.5*v)],this.isRounded,y,!0)};mxCellRenderer.registerShape("hexagon",Y);mxUtils.extend(ma,mxRectangleShape);ma.prototype.isHtmlAllowed=function(){return!1};ma.prototype.paintForeground=function(d,n,y,q,v){var D=Math.min(q/5,v/5)+1;d.begin();d.moveTo(n+q/2,y+D);d.lineTo(n+q/2,y+v-D);d.moveTo(n+D,y+v/2);d.lineTo(n+q-D,y+v/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",ma);var db=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var n=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+n,d.y+n,d.width-2*n,d.height-2*n)}return d};mxRhombus.prototype.paintVertexShape=function(d,n,y,q,v){db.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var D=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);n+=D;y+=D;q-=2*D;v-=2*D;0<q&&0<v&&(d.setShadow(!1),db.apply(this,[d,n,y,q,v]))}};mxUtils.extend(Z,mxRectangleShape);Z.prototype.isHtmlAllowed=function(){return!1};Z.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var n=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+n,d.y+n,d.width-2*n,d.height-2*n)}return d};Z.prototype.paintForeground=function(d,n,y,q,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var D=-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);n+=D;y+=D;q-=2*D;v-=2*D;0<q&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);D=0;do{var E=mxCellRenderer.defaultShapes[this.style["symbol"+D]];if(null!=E){var fa=this.style["symbol"+D+"Align"],L=this.style["symbol"+D+"VerticalAlign"],va=this.style["symbol"+D+"Width"],na=this.style["symbol"+D+"Height"],Va=this.style["symbol"+D+"Spacing"]||0,fb=this.style["symbol"+D+"VSpacing"]||-Va,bb=this.style["symbol"+D+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(q+this.strokewidth,v+this.strokewidth),Va+=bb,fb+=bb);bb=n;var Ga=y;bb=fa==mxConstants.ALIGN_CENTER?bb+(q-va)/2:fa==mxConstants.ALIGN_RIGHT?bb+(q-va-Va):bb+Va;Ga=L==mxConstants.ALIGN_MIDDLE?Ga+(v-na)/2:L==mxConstants.ALIGN_BOTTOM?Ga+(v-na-fb):Ga+fb;d.save();fa=new E;fa.style=this.style;E.prototype.paintVertexShape.call(fa,d,bb,Ga,va,na);d.restore()}D++}while(null!=E)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);n+=D;y+=D;q-=2*D;v-=2*D;0<q&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);D=0;do{var E=mxCellRenderer.defaultShapes[this.style["symbol"+D]];if(null!=E){var ha=this.style["symbol"+D+"Align"],M=this.style["symbol"+D+"VerticalAlign"],ua=this.style["symbol"+D+"Width"],na=this.style["symbol"+D+"Height"],Va=this.style["symbol"+D+"Spacing"]||0,fb=this.style["symbol"+D+"VSpacing"]||+Va,bb=this.style["symbol"+D+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(q+this.strokewidth,v+this.strokewidth),Va+=bb,fb+=bb);bb=n;var Ga=y;bb=ha==mxConstants.ALIGN_CENTER?bb+(q-ua)/2:ha==mxConstants.ALIGN_RIGHT?bb+(q-ua-Va):bb+Va;Ga=M==mxConstants.ALIGN_MIDDLE?Ga+(v-na)/2:M==mxConstants.ALIGN_BOTTOM?Ga+(v-na-fb):Ga+fb;d.save();ha=new E;ha.style=this.style;E.prototype.paintVertexShape.call(ha,d,bb,Ga,ua,na);d.restore()}D++}while(null!=E)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",Z);mxUtils.extend(k,mxCylinder);k.prototype.redrawPath=function(d,n,y,q,v,D){D?(d.moveTo(0,0),d.lineTo(q/2,v/2),d.lineTo(q,0),d.end()):(d.moveTo(0,0),d.lineTo(q,0),d.lineTo(q,v),d.lineTo(0,v),d.close())};mxCellRenderer.registerShape("message",k);mxUtils.extend(A,mxShape);A.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.ellipse(q/4,0,q/2,v/4);d.fillAndStroke();d.begin();d.moveTo(q/2,v/4);d.lineTo(q/2,2*v/3);d.moveTo(q/2,v/3);d.lineTo(0,v/3);d.moveTo(q/2,v/3);d.lineTo(q,v/3);d.moveTo(q/2,2*v/3);d.lineTo(0,v);d.moveTo(q/2,2*v/3);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",A);mxUtils.extend(I,mxShape);I.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};I.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(0,v/4);d.lineTo(0,3*v/4);d.end();d.stroke();d.begin();d.moveTo(0,v/2);d.lineTo(q/6,v/2);d.end();d.stroke();d.ellipse(q/6,0,5*q/6,v);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",-I);mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(n+q/8,y+v);d.lineTo(n+7*q/8,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",U);mxUtils.extend(O,mxShape);O.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(q,0);d.lineTo(0,v);d.moveTo(0,0);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",O);mxUtils.extend(S,mxShape);-S.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};S.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,0);d.end();d.stroke();d.ellipse(0,v/8,q,7*v/8);d.fillAndStroke()};S.prototype.paintForeground=function(d,n,y,q,v){d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,v/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",S);mxUtils.extend(X,mxRectangleShape);X.prototype.size=-40;X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(d){var n=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,n)};X.prototype.paintBackground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"participant");null==E||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,n,-y,q,D):(E=this.state.view.graph.cellRenderer.getShape(E),null!=E&&E!=X&&(E=new E,E.apply(this.state),d.save(),E.paintVertexShape(d,n,y,q,D),d.restore()));D<v&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(n+q/2,y+D),d.lineTo(n+q/2,y+v),d.end(),d.stroke())};X.prototype.paintForeground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,n,y,q,Math.min(v,-D))};mxCellRenderer.registerShape("umlLifeline",X);mxUtils.extend(aa,mxShape);aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.configurePointerEvents=function(d){var n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=n&&n!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};aa.prototype.getLabelMargins=function(d){return new mxRectangle(0,-0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};aa.prototype.paintBackground=function(d,n,y,q,v){var D=this.corner,E=Math.min(q,Math.max(D,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),fa=Math.min(v,Math.max(1.5*D,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),L=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);L!=mxConstants.NONE&&-(d.setFillColor(L),d.rect(n,y,q,v),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,n,y,q,v),d.setGradient(this.fill,this.gradient,n,y,q,v,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;d.begin();d.moveTo(n,y);d.lineTo(n+E,y);d.lineTo(n+E,y+Math.max(0,fa-1.5*D));d.lineTo(n+Math.max(0,E-D),y+fa);d.lineTo(n,y+fa);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(n+E,y);-d.lineTo(n+q,y);d.lineTo(n+q,y+v);d.lineTo(n,y+v);d.lineTo(n,y+fa);d.stroke()};mxCellRenderer.registerShape("umlFrame",aa);mxPerimeter.CenterPerimeter=function(d,n,y,q){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(d,n,y,q){q=X.prototype.size;null!=n&&(q=mxUtils.getValue(n.style,"size",q)*n.view.scale);n=parseFloat(n.style[mxConstants.STYLE_STROKEWIDTH]||1)*n.view.scale/2-1;y.x<d.getCenterX()&&+I);mxUtils.extend(T,mxEllipse);T.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(n+q/8,y+v);d.lineTo(n+7*q/8,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",T);mxUtils.extend(O,mxShape);O.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(q,0);d.lineTo(0,v);d.moveTo(0,0);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",O);mxUtils.extend(U,mxShape);+U.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};U.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,0);d.end();d.stroke();d.ellipse(0,v/8,q,7*v/8);d.fillAndStroke()};U.prototype.paintForeground=function(d,n,y,q,v){d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,v/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",U);mxUtils.extend(V,mxRectangleShape);V.prototype.size=+40;V.prototype.isHtmlAllowed=function(){return!1};V.prototype.getLabelBounds=function(d){var n=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,n)};V.prototype.paintBackground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"participant");null==E||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,n,+y,q,D):(E=this.state.view.graph.cellRenderer.getShape(E),null!=E&&E!=V&&(E=new E,E.apply(this.state),d.save(),E.paintVertexShape(d,n,y,q,D),d.restore()));D<v&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(n+q/2,y+D),d.lineTo(n+q/2,y+v),d.end(),d.stroke())};V.prototype.paintForeground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,n,y,q,Math.min(v,+D))};mxCellRenderer.registerShape("umlLifeline",V);mxUtils.extend(ba,mxShape);ba.prototype.width=60;ba.prototype.height=30;ba.prototype.corner=10;ba.prototype.configurePointerEvents=function(d){var n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=n&&n!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};ba.prototype.getLabelMargins=function(d){return new mxRectangle(0,+0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};ba.prototype.paintBackground=function(d,n,y,q,v){var D=this.corner,E=Math.min(q,Math.max(D,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),ha=Math.min(v,Math.max(1.5*D,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),M=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);M!=mxConstants.NONE&&+(d.setFillColor(M),d.rect(n,y,q,v),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,n,y,q,v),d.setGradient(this.fill,this.gradient,n,y,q,v,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;d.begin();d.moveTo(n,y);d.lineTo(n+E,y);d.lineTo(n+E,y+Math.max(0,ha-1.5*D));d.lineTo(n+Math.max(0,E-D),y+ha);d.lineTo(n,y+ha);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(n+E,y);+d.lineTo(n+q,y);d.lineTo(n+q,y+v);d.lineTo(n,y+v);d.lineTo(n,y+ha);d.stroke()};mxCellRenderer.registerShape("umlFrame",ba);mxPerimeter.CenterPerimeter=function(d,n,y,q){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(d,n,y,q){q=V.prototype.size;null!=n&&(q=mxUtils.getValue(n.style,"size",q)*n.view.scale);n=parseFloat(n.style[mxConstants.STYLE_STROKEWIDTH]||1)*n.view.scale/2-1;y.x<d.getCenterX()&&(n=-1*(n+1));return new mxPoint(d.getCenterX()+n,Math.min(d.y+d.height,Math.max(d.y+q,y.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(d,n,y,q){q=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,n,y,q){q=parseFloat(n.style[mxConstants.STYLE_STROKEWIDTH]||1)*n.view.scale/2-1;null!=n.style.backboneSize&&(q+=parseFloat(n.style.backboneSize)*n.view.scale/2-1);if("south"==n.style[mxConstants.STYLE_DIRECTION]||"north"==n.style[mxConstants.STYLE_DIRECTION])return y.x<d.getCenterX()&&(q=-1*(q+1)),new mxPoint(d.getCenterX()+q,Math.min(d.y+d.height,Math.max(d.y,y.y)));y.y<d.getCenterY()&&(q=-1*(q+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,y.x)),d.getCenterY()+q)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,n,y,q){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,-new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(n.style,"size",ha.prototype.size))*n.view.scale))),n.style),n,y,q)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?K.prototype.fixedSize:K.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height;n=null!=n?mxUtils.getValue(n.style,-mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_NORTH||n==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa)]):(v=v?Math.max(0,Math.min(.5*L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L,fa),new mxPoint(E+L-v,fa+va),new mxPoint(E,fa+va),new mxPoint(E+v,fa)]);va=d.getCenterX();-d=d.getCenterY();d=new mxPoint(va,d);q&&(y.x<E||y.x>E+L?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(fa,d,y)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?J.prototype.fixedSize:J.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height;n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,-mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L-v,fa),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va),new mxPoint(E+v,fa)]):n==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa),new mxPoint(E+L-v,fa+va),new mxPoint(E+v,fa+va),new mxPoint(E,fa)]):n==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,-Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa+v),new mxPoint(E+L,fa),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa+v)]):(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va-v),new mxPoint(E,fa+va),new mxPoint(E,fa)]);va=d.getCenterX();d=d.getCenterY();d=new mxPoint(va,d);q&&(y.x<E||y.x>E+L?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(fa,d,y)};mxStyleRegistry.putValue("trapezoidPerimeter",-mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?la.prototype.fixedSize:la.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,-Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L-v,fa),new mxPoint(E+L,d),new mxPoint(E+L-v,fa+va),new mxPoint(E,fa+va),new mxPoint(E+v,d),new mxPoint(E,fa)]):n==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L,fa),new mxPoint(E+L-v,d),new mxPoint(E+L,fa+va),new mxPoint(E+v,fa+va),new mxPoint(E,d),new mxPoint(E+v,fa)]):n==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,-fa+v),new mxPoint(na,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va),new mxPoint(na,fa+va-v),new mxPoint(E,fa+va),new mxPoint(E,fa+v)]):(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(na,fa+v),new mxPoint(E+L,fa),new mxPoint(E+L,fa+va-v),new mxPoint(na,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa)]);na=new mxPoint(na,d);q&&(y.x<E||y.x>E+L?na.y=y.y:na.x=y.x);return mxUtils.getPerimeterPoint(fa,na,y)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);-mxPerimeter.HexagonPerimeter2=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?Y.prototype.fixedSize:Y.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_NORTH||n==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(va,D)):va*-Math.max(0,Math.min(1,D)),fa=[new mxPoint(na,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va-v),new mxPoint(na,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa+v),new mxPoint(na,fa)]):(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L-v,fa),new mxPoint(E+L,d),new mxPoint(E+L-v,fa+va),new mxPoint(E+v,fa+va),new mxPoint(E,d),new mxPoint(E+v,fa)]);na=new mxPoint(na,d);q&&(y.x<E||y.x>E+L?na.y=y.y:na.x=y.x);return mxUtils.getPerimeterPoint(fa,na,y)};mxStyleRegistry.putValue("hexagonPerimeter2",-mxPerimeter.HexagonPerimeter2);mxUtils.extend(ja,mxShape);ja.prototype.size=10;ja.prototype.paintBackground=function(d,n,y,q,v){var D=parseFloat(mxUtils.getValue(this.style,"size",this.size));d.translate(n,y);d.ellipse((q-D)/2,0,D,D);d.fillAndStroke();d.begin();d.moveTo(q/2,D);d.lineTo(q/2,v);d.end();d.stroke()};mxCellRenderer.registerShape("lollipop",ja);mxUtils.extend(pa,mxShape);pa.prototype.size=10;pa.prototype.inset=2;pa.prototype.paintBackground=function(d,n,y,q,v){var D=parseFloat(mxUtils.getValue(this.style,+new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(n.style,"size",ia.prototype.size))*n.view.scale))),n.style),n,y,q)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?K.prototype.fixedSize:K.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,ha=d.y,M=d.width,ua=d.height;n=null!=n?mxUtils.getValue(n.style,+mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_NORTH||n==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(ua,D)):ua*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha),new mxPoint(E+M,ha+v),new mxPoint(E+M,ha+ua),new mxPoint(E,ha+ua-v),new mxPoint(E,ha)]):(v=v?Math.max(0,Math.min(.5*M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E+v,ha),new mxPoint(E+M,ha),new mxPoint(E+M-v,ha+ua),new mxPoint(E,ha+ua),new mxPoint(E+v,ha)]);ua=d.getCenterX();+d=d.getCenterY();d=new mxPoint(ua,d);q&&(y.x<E||y.x>E+M?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(ha,d,y)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?J.prototype.fixedSize:J.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,ha=d.y,M=d.width,ua=d.height;n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,+mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E+v,ha),new mxPoint(E+M-v,ha),new mxPoint(E+M,ha+ua),new mxPoint(E,ha+ua),new mxPoint(E+v,ha)]):n==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha),new mxPoint(E+M,ha),new mxPoint(E+M-v,ha+ua),new mxPoint(E+v,ha+ua),new mxPoint(E,ha)]):n==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,+Math.min(ua,D)):ua*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha+v),new mxPoint(E+M,ha),new mxPoint(E+M,ha+ua),new mxPoint(E,ha+ua-v),new mxPoint(E,ha+v)]):(v=v?Math.max(0,Math.min(ua,D)):ua*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha),new mxPoint(E+M,ha+v),new mxPoint(E+M,ha+ua-v),new mxPoint(E,ha+ua),new mxPoint(E,ha)]);ua=d.getCenterX();d=d.getCenterY();d=new mxPoint(ua,d);q&&(y.x<E||y.x>E+M?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(ha,d,y)};mxStyleRegistry.putValue("trapezoidPerimeter",+mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?la.prototype.fixedSize:la.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,ha=d.y,M=d.width,ua=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(M,D)):M*Math.max(0,+Math.min(1,D)),ha=[new mxPoint(E,ha),new mxPoint(E+M-v,ha),new mxPoint(E+M,d),new mxPoint(E+M-v,ha+ua),new mxPoint(E,ha+ua),new mxPoint(E+v,d),new mxPoint(E,ha)]):n==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E+v,ha),new mxPoint(E+M,ha),new mxPoint(E+M-v,d),new mxPoint(E+M,ha+ua),new mxPoint(E+v,ha+ua),new mxPoint(E,d),new mxPoint(E+v,ha)]):n==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(ua,D)):ua*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,+ha+v),new mxPoint(na,ha),new mxPoint(E+M,ha+v),new mxPoint(E+M,ha+ua),new mxPoint(na,ha+ua-v),new mxPoint(E,ha+ua),new mxPoint(E,ha+v)]):(v=v?Math.max(0,Math.min(ua,D)):ua*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha),new mxPoint(na,ha+v),new mxPoint(E+M,ha),new mxPoint(E+M,ha+ua-v),new mxPoint(na,ha+ua),new mxPoint(E,ha+ua-v),new mxPoint(E,ha)]);na=new mxPoint(na,d);q&&(y.x<E||y.x>E+M?na.y=y.y:na.x=y.x);return mxUtils.getPerimeterPoint(ha,na,y)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);+mxPerimeter.HexagonPerimeter2=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?Y.prototype.fixedSize:Y.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,ha=d.y,M=d.width,ua=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_NORTH||n==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(ua,D)):ua*+Math.max(0,Math.min(1,D)),ha=[new mxPoint(na,ha),new mxPoint(E+M,ha+v),new mxPoint(E+M,ha+ua-v),new mxPoint(na,ha+ua),new mxPoint(E,ha+ua-v),new mxPoint(E,ha+v),new mxPoint(na,ha)]):(v=v?Math.max(0,Math.min(M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E+v,ha),new mxPoint(E+M-v,ha),new mxPoint(E+M,d),new mxPoint(E+M-v,ha+ua),new mxPoint(E+v,ha+ua),new mxPoint(E,d),new mxPoint(E+v,ha)]);na=new mxPoint(na,d);q&&(y.x<E||y.x>E+M?na.y=y.y:na.x=y.x);return mxUtils.getPerimeterPoint(ha,na,y)};mxStyleRegistry.putValue("hexagonPerimeter2",+mxPerimeter.HexagonPerimeter2);mxUtils.extend(fa,mxShape);fa.prototype.size=10;fa.prototype.paintBackground=function(d,n,y,q,v){var D=parseFloat(mxUtils.getValue(this.style,"size",this.size));d.translate(n,y);d.ellipse((q-D)/2,0,D,D);d.fillAndStroke();d.begin();d.moveTo(q/2,D);d.lineTo(q/2,v);d.end();d.stroke()};mxCellRenderer.registerShape("lollipop",fa);mxUtils.extend(pa,mxShape);pa.prototype.size=10;pa.prototype.inset=2;pa.prototype.paintBackground=function(d,n,y,q,v){var D=parseFloat(mxUtils.getValue(this.style,"size",this.size)),E=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(n,y);d.begin();d.moveTo(q/2,D+E);d.lineTo(q/2,v);d.end();d.stroke();d.begin();d.moveTo((q-D)/2-E,D/2);d.quadTo((q-D)/2-E,D+E,q/2,D+E);d.quadTo((q+D)/2+E,D+E,(q+D)/2+E,D/2);d.end();d.stroke()};mxCellRenderer.registerShape("requires",pa);mxUtils.extend(sa,mxShape);sa.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(0,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,0,v);d.end();d.stroke()};mxCellRenderer.registerShape("requiredInterface",sa);mxUtils.extend(qa,mxShape);qa.prototype.inset=2;qa.prototype.paintBackground=function(d,n,y,q,v){var D=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(n,y);d.ellipse(0,D,q-2*D,v-2*D);d.fillAndStroke();d.begin();d.moveTo(q/2,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,q/2,v);d.end();d.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",qa);mxUtils.extend(wa,mxCylinder);wa.prototype.jettyWidth=-20;wa.prototype.jettyHeight=10;wa.prototype.redrawPath=function(d,n,y,q,v,D){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));n=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));y=E/2;E=y+E/2;var fa=Math.min(n,v-n),L=Math.min(fa+2*n,v-n);D?(d.moveTo(y,fa),d.lineTo(E,fa),d.lineTo(E,fa+n),d.lineTo(y,fa+n),d.moveTo(y,L),d.lineTo(E,L),d.lineTo(E,L+n),d.lineTo(y,L+n)):(d.moveTo(y,0),d.lineTo(q,0),d.lineTo(q,v),d.lineTo(y,v),d.lineTo(y,L+n),d.lineTo(0,L+-n),d.lineTo(0,L),d.lineTo(y,L),d.lineTo(y,fa+n),d.lineTo(0,fa+n),d.lineTo(0,fa),d.lineTo(y,fa),d.close());d.end()};mxCellRenderer.registerShape("module",wa);mxUtils.extend(Ba,mxCylinder);Ba.prototype.jettyWidth=32;Ba.prototype.jettyHeight=12;Ba.prototype.redrawPath=function(d,n,y,q,v,D){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));n=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));y=E/2;E=y+E/2;var fa=.3*v-n/2,L=.7*v-n/2;D?(d.moveTo(y,fa),d.lineTo(E,-fa),d.lineTo(E,fa+n),d.lineTo(y,fa+n),d.moveTo(y,L),d.lineTo(E,L),d.lineTo(E,L+n),d.lineTo(y,L+n)):(d.moveTo(y,0),d.lineTo(q,0),d.lineTo(q,v),d.lineTo(y,v),d.lineTo(y,L+n),d.lineTo(0,L+n),d.lineTo(0,L),d.lineTo(y,L),d.lineTo(y,fa+n),d.lineTo(0,fa+n),d.lineTo(0,fa),d.lineTo(y,fa),d.close());d.end()};mxCellRenderer.registerShape("component",Ba);mxUtils.extend(za,mxRectangleShape);za.prototype.paintForeground=function(d,n,y,q,v){var D=q/2,E=v/2,fa=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,-mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,[new mxPoint(n+D,y),new mxPoint(n+q,y+E),new mxPoint(n+D,y+v),new mxPoint(n,y+E)],this.isRounded,fa,!0);d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",za);mxUtils.extend(Ea,mxDoubleEllipse);Ea.prototype.outerStroke=!0;Ea.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.min(4,Math.min(q/5,v/5));0<q&&0<v&&(d.ellipse(n+D,y+D,q-2*D,v-2*D),d.fillAndStroke());d.setShadow(!1);-this.outerStroke&&(d.ellipse(n,y,q,v),d.stroke())};mxCellRenderer.registerShape("endState",Ea);mxUtils.extend(ra,Ea);ra.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ra);mxUtils.extend(ya,mxArrowConnector);ya.prototype.defaultWidth=4;ya.prototype.isOpenEnded=function(){return!0};ya.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ya.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",+20;wa.prototype.jettyHeight=10;wa.prototype.redrawPath=function(d,n,y,q,v,D){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));n=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));y=E/2;E=y+E/2;var ha=Math.min(n,v-n),M=Math.min(ha+2*n,v-n);D?(d.moveTo(y,ha),d.lineTo(E,ha),d.lineTo(E,ha+n),d.lineTo(y,ha+n),d.moveTo(y,M),d.lineTo(E,M),d.lineTo(E,M+n),d.lineTo(y,M+n)):(d.moveTo(y,0),d.lineTo(q,0),d.lineTo(q,v),d.lineTo(y,v),d.lineTo(y,M+n),d.lineTo(0,M++n),d.lineTo(0,M),d.lineTo(y,M),d.lineTo(y,ha+n),d.lineTo(0,ha+n),d.lineTo(0,ha),d.lineTo(y,ha),d.close());d.end()};mxCellRenderer.registerShape("module",wa);mxUtils.extend(Aa,mxCylinder);Aa.prototype.jettyWidth=32;Aa.prototype.jettyHeight=12;Aa.prototype.redrawPath=function(d,n,y,q,v,D){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));n=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));y=E/2;E=y+E/2;var ha=.3*v-n/2,M=.7*v-n/2;D?(d.moveTo(y,ha),d.lineTo(E,+ha),d.lineTo(E,ha+n),d.lineTo(y,ha+n),d.moveTo(y,M),d.lineTo(E,M),d.lineTo(E,M+n),d.lineTo(y,M+n)):(d.moveTo(y,0),d.lineTo(q,0),d.lineTo(q,v),d.lineTo(y,v),d.lineTo(y,M+n),d.lineTo(0,M+n),d.lineTo(0,M),d.lineTo(y,M),d.lineTo(y,ha+n),d.lineTo(0,ha+n),d.lineTo(0,ha),d.lineTo(y,ha),d.close());d.end()};mxCellRenderer.registerShape("component",Aa);mxUtils.extend(za,mxRectangleShape);za.prototype.paintForeground=function(d,n,y,q,v){var D=q/2,E=v/2,ha=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,+mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,[new mxPoint(n+D,y),new mxPoint(n+q,y+E),new mxPoint(n+D,y+v),new mxPoint(n,y+E)],this.isRounded,ha,!0);d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",za);mxUtils.extend(Da,mxDoubleEllipse);Da.prototype.outerStroke=!0;Da.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.min(4,Math.min(q/5,v/5));0<q&&0<v&&(d.ellipse(n+D,y+D,q-2*D,v-2*D),d.fillAndStroke());d.setShadow(!1);+this.outerStroke&&(d.ellipse(n,y,q,v),d.stroke())};mxCellRenderer.registerShape("endState",Da);mxUtils.extend(ra,Da);ra.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ra);mxUtils.extend(ya,mxArrowConnector);ya.prototype.defaultWidth=4;ya.prototype.isOpenEnded=function(){return!0};ya.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ya.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",ya);mxUtils.extend(Ca,mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth--1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Ma,mxActor);Ma.prototype.size=30;Ma.prototype.isRoundable=function(){return!0};Ma.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(0,n),new mxPoint(q,0),new mxPoint(q,v)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("manualInput",-Ma);mxUtils.extend(Ha,mxRectangleShape);Ha.prototype.dx=20;Ha.prototype.dy=20;Ha.prototype.isHtmlAllowed=function(){return!1};Ha.prototype.paintForeground=function(d,n,y,q,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var D=0;if(this.isRounded){var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;D=Math.max(D,Math.min(q*E,v*E))}E=Math.max(D,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));D=Math.max(D,Math.min(v,-parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.begin();d.moveTo(n,y+D);d.lineTo(n+q,y+D);d.end();d.stroke();d.begin();d.moveTo(n+E,y);d.lineTo(n+E,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("internalStorage",Ha);mxUtils.extend(Aa,mxActor);Aa.prototype.dx=20;Aa.prototype.dy=20;Aa.prototype.redrawPath=function(d,n,y,q,v){n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));-parseFloat(mxUtils.getValue(this.style,"size",this.size));var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,y),new mxPoint(n,y),new mxPoint(n,v),new mxPoint(0,v)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("corner",Aa);mxUtils.extend(Ra,mxActor);Ra.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.lineTo(0,v);d.end();d.moveTo(q,0);d.lineTo(q,v);d.end();d.moveTo(0,v/2);d.lineTo(q,-v/2);d.end()};mxCellRenderer.registerShape("crossbar",Ra);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(d,n,y,q,v){n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,-0),new mxPoint(q,0),new mxPoint(q,y),new mxPoint((q+n)/2,y),new mxPoint((q+n)/2,v),new mxPoint((q-n)/2,v),new mxPoint((q-n)/2,y),new mxPoint(0,y)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("tee",Za);mxUtils.extend(La,mxActor);La.prototype.arrowWidth=.3;La.prototype.arrowSize=.2;La.prototype.redrawPath=function(d,n,y,q,v){var D=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,-"arrowSize",this.arrowSize))));y=(v-D)/2;D=y+D;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,y),new mxPoint(q-n,y),new mxPoint(q-n,0),new mxPoint(q,v/2),new mxPoint(q-n,v),new mxPoint(q-n,D),new mxPoint(0,D)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("singleArrow",La);mxUtils.extend($a,mxActor);$a.prototype.redrawPath=function(d,n,y,q,v){var D=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",-La.prototype.arrowWidth))));n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",La.prototype.arrowSize))));y=(v-D)/2;D=y+D;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v/2),new mxPoint(n,0),new mxPoint(n,y),new mxPoint(q-n,y),new mxPoint(q-n,0),new mxPoint(q,v/2),new mxPoint(q-n,v),new mxPoint(q-n,D),new mxPoint(n,D),new mxPoint(n,v)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",-$a);mxUtils.extend(Da,mxActor);Da.prototype.size=.1;Da.prototype.fixedSize=20;Da.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(n,0);d.lineTo(q,0);d.quadTo(q-2*n,v/2,q,v);d.lineTo(n,v);d.quadTo(n-2*n,v/2,n,0);d.close();d.end()};mxCellRenderer.registerShape("dataStorage",Da);-mxUtils.extend(x,mxActor);x.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,0,v);d.close();d.end()};mxCellRenderer.registerShape("or",x);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,0,v);d.quadTo(q/2,v/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",M);mxUtils.extend(Q,mxActor);Q.prototype.size=20;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(d,-n,y,q,v){n=Math.min(q/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,.8*n),new mxPoint(q,v),new mxPoint(0,v),new mxPoint(0,.8*n)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("loopLimit",Q);mxUtils.extend(V,mxActor);V.prototype.size=.375;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(d,-n,y,q,v){n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,v-n),new mxPoint(q/2,v),new mxPoint(0,v-n)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",V);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);-d.begin();d.moveTo(n+q/2,y+v);d.lineTo(n+q,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ia);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n,y+v/2);d.lineTo(n+q,y+v/2);d.end();d.stroke();d.begin();d.moveTo(n+q/2,y);d.lineTo(n+q/2,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",ka);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=-function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n+.145*q,y+.145*v);d.lineTo(n+.855*q,y+.855*v);d.end();d.stroke();d.begin();d.moveTo(n+.855*q,y+.145*v);d.lineTo(n+.145*q,y+.855*v);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",oa);mxUtils.extend(xa,mxRhombus);xa.prototype.paintVertexShape=function(d,n,y,q,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n,y+v/2);d.lineTo(n+-q,y+v/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(d,n,y,q,v){d.begin();d.moveTo(n,y);d.lineTo(n+q,y);d.lineTo(n+q/2,y+v/2);d.close();d.fillAndStroke();d.begin();d.moveTo(n,y+v);d.lineTo(n+q,y+v);d.lineTo(n+q/2,y+v/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(d,n,y,q,v){var D=d.state.strokeWidth/2,E=10+2*D,fa=y+-v-E/2;d.begin();d.moveTo(n,y);d.lineTo(n,y+v);d.moveTo(n+D,fa);d.lineTo(n+D+E,fa-E/2);d.moveTo(n+D,fa);d.lineTo(n+D+E,fa+E/2);d.moveTo(n+D,fa);d.lineTo(n+q-D,fa);d.moveTo(n+q,y);d.lineTo(n+q,y+v);d.moveTo(n+q-D,fa);d.lineTo(n+q-E-D,fa-E/2);d.moveTo(n+q-D,fa);d.lineTo(n+q-E-D,fa+E/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",ua);mxUtils.extend(Fa,mxEllipse);Fa.prototype.drawHidden=!0;Fa.prototype.paintVertexShape=function(d,n,y,q,v){this.outline||d.setStrokeColor(null);if(null!=-this.style){var D=d.pointerEvents,E=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||E||(d.pointerEvents=!1);var fa="1"==mxUtils.getValue(this.style,"top","1"),L="1"==mxUtils.getValue(this.style,"left","1"),va="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||E||this.outline||fa||va||na||L?(d.rect(n,y,q,v),d.fill(),d.pointerEvents=D,d.setStrokeColor(this.stroke),d.setLineCap("square"),-d.begin(),d.moveTo(n,y),this.outline||fa?d.lineTo(n+q,y):d.moveTo(n+q,y),this.outline||va?d.lineTo(n+q,y+v):d.moveTo(n+q,y+v),this.outline||na?d.lineTo(n,y+v):d.moveTo(n,y+v),(this.outline||L)&&d.lineTo(n,y),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(Na,mxEllipse);Na.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();"vertical"==-mxUtils.getValue(this.style,"line")?(d.moveTo(n+q/2,y),d.lineTo(n+q/2,y+v)):(d.moveTo(n,y+v/2),d.lineTo(n+q,y+v/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Na);mxUtils.extend(Wa,mxActor);Wa.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(q,v/2);d.moveTo(0,0);d.lineTo(q-n,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,q-n,v);d.lineTo(0,v);d.close();d.end()};mxCellRenderer.registerShape("delay",Wa);mxUtils.extend(Xa,mxActor);Xa.prototype.size=.2;Xa.prototype.redrawPath=function(d,n,+1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Ka,mxActor);Ka.prototype.size=30;Ka.prototype.isRoundable=function(){return!0};Ka.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(0,n),new mxPoint(q,0),new mxPoint(q,v)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("manualInput",+Ka);mxUtils.extend(Ha,mxRectangleShape);Ha.prototype.dx=20;Ha.prototype.dy=20;Ha.prototype.isHtmlAllowed=function(){return!1};Ha.prototype.paintForeground=function(d,n,y,q,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var D=0;if(this.isRounded){var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;D=Math.max(D,Math.min(q*E,v*E))}E=Math.max(D,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));D=Math.max(D,Math.min(v,+parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.begin();d.moveTo(n,y+D);d.lineTo(n+q,y+D);d.end();d.stroke();d.begin();d.moveTo(n+E,y);d.lineTo(n+E,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("internalStorage",Ha);mxUtils.extend(Ba,mxActor);Ba.prototype.dx=20;Ba.prototype.dy=20;Ba.prototype.redrawPath=function(d,n,y,q,v){n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));+parseFloat(mxUtils.getValue(this.style,"size",this.size));var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,y),new mxPoint(n,y),new mxPoint(n,v),new mxPoint(0,v)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("corner",Ba);mxUtils.extend(Pa,mxActor);Pa.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.lineTo(0,v);d.end();d.moveTo(q,0);d.lineTo(q,v);d.end();d.moveTo(0,v/2);d.lineTo(q,+v/2);d.end()};mxCellRenderer.registerShape("crossbar",Pa);mxUtils.extend($a,mxActor);$a.prototype.dx=20;$a.prototype.dy=20;$a.prototype.redrawPath=function(d,n,y,q,v){n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,+0),new mxPoint(q,0),new mxPoint(q,y),new mxPoint((q+n)/2,y),new mxPoint((q+n)/2,v),new mxPoint((q-n)/2,v),new mxPoint((q-n)/2,y),new mxPoint(0,y)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("tee",$a);mxUtils.extend(Na,mxActor);Na.prototype.arrowWidth=.3;Na.prototype.arrowSize=.2;Na.prototype.redrawPath=function(d,n,y,q,v){var D=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,+"arrowSize",this.arrowSize))));y=(v-D)/2;D=y+D;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,y),new mxPoint(q-n,y),new mxPoint(q-n,0),new mxPoint(q,v/2),new mxPoint(q-n,v),new mxPoint(q-n,D),new mxPoint(0,D)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("singleArrow",Na);mxUtils.extend(Ya,mxActor);Ya.prototype.redrawPath=function(d,n,y,q,v){var D=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",+Na.prototype.arrowWidth))));n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));y=(v-D)/2;D=y+D;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v/2),new mxPoint(n,0),new mxPoint(n,y),new mxPoint(q-n,y),new mxPoint(q-n,0),new mxPoint(q,v/2),new mxPoint(q-n,v),new mxPoint(q-n,D),new mxPoint(n,D),new mxPoint(n,v)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",+Ya);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.1;Ea.prototype.fixedSize=20;Ea.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(n,0);d.lineTo(q,0);d.quadTo(q-2*n,v/2,q,v);d.lineTo(n,v);d.quadTo(n-2*n,v/2,n,0);d.close();d.end()};mxCellRenderer.registerShape("dataStorage",Ea);+mxUtils.extend(x,mxActor);x.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,0,v);d.close();d.end()};mxCellRenderer.registerShape("or",x);mxUtils.extend(L,mxActor);L.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,0,v);d.quadTo(q/2,v/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",L);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(d,+n,y,q,v){n=Math.min(q/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,.8*n),new mxPoint(q,v),new mxPoint(0,v),new mxPoint(0,.8*n)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("loopLimit",R);mxUtils.extend(W,mxActor);W.prototype.size=.375;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(d,+n,y,q,v){n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,v-n),new mxPoint(q/2,v),new mxPoint(0,v-n)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",W);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);+d.begin();d.moveTo(n+q/2,y+v);d.lineTo(n+q,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ja);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n,y+v/2);d.lineTo(n+q,y+v/2);d.end();d.stroke();d.begin();d.moveTo(n+q/2,y);d.lineTo(n+q/2,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",ka);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=+function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n+.145*q,y+.145*v);d.lineTo(n+.855*q,y+.855*v);d.end();d.stroke();d.begin();d.moveTo(n+.855*q,y+.145*v);d.lineTo(n+.145*q,y+.855*v);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",oa);mxUtils.extend(va,mxRhombus);va.prototype.paintVertexShape=function(d,n,y,q,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n,y+v/2);d.lineTo(n++q,y+v/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",va);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(d,n,y,q,v){d.begin();d.moveTo(n,y);d.lineTo(n+q,y);d.lineTo(n+q/2,y+v/2);d.close();d.fillAndStroke();d.begin();d.moveTo(n,y+v);d.lineTo(n+q,y+v);d.lineTo(n+q/2,y+v/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(d,n,y,q,v){var D=d.state.strokeWidth/2,E=10+2*D,ha=y++v-E/2;d.begin();d.moveTo(n,y);d.lineTo(n,y+v);d.moveTo(n+D,ha);d.lineTo(n+D+E,ha-E/2);d.moveTo(n+D,ha);d.lineTo(n+D+E,ha+E/2);d.moveTo(n+D,ha);d.lineTo(n+q-D,ha);d.moveTo(n+q,y);d.lineTo(n+q,y+v);d.moveTo(n+q-D,ha);d.lineTo(n+q-E-D,ha-E/2);d.moveTo(n+q-D,ha);d.lineTo(n+q-E-D,ha+E/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",xa);mxUtils.extend(Fa,mxEllipse);Fa.prototype.drawHidden=!0;Fa.prototype.paintVertexShape=function(d,n,y,q,v){this.outline||d.setStrokeColor(null);if(null!=+this.style){var D=d.pointerEvents,E=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||E||(d.pointerEvents=!1);var ha="1"==mxUtils.getValue(this.style,"top","1"),M="1"==mxUtils.getValue(this.style,"left","1"),ua="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||E||this.outline||ha||ua||na||M?(d.rect(n,y,q,v),d.fill(),d.pointerEvents=D,d.setStrokeColor(this.stroke),d.setLineCap("square"),+d.begin(),d.moveTo(n,y),this.outline||ha?d.lineTo(n+q,y):d.moveTo(n+q,y),this.outline||ua?d.lineTo(n+q,y+v):d.moveTo(n+q,y+v),this.outline||na?d.lineTo(n,y+v):d.moveTo(n,y+v),(this.outline||M)&&d.lineTo(n,y),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();"vertical"==+mxUtils.getValue(this.style,"line")?(d.moveTo(n+q/2,y),d.lineTo(n+q/2,y+v)):(d.moveTo(n,y+v/2),d.lineTo(n+q,y+v/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Ma);mxUtils.extend(Wa,mxActor);Wa.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(q,v/2);d.moveTo(0,0);d.lineTo(q-n,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,q-n,v);d.lineTo(0,v);d.close();d.end()};mxCellRenderer.registerShape("delay",Wa);mxUtils.extend(Xa,mxActor);Xa.prototype.size=.2;Xa.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(v,q);var D=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(v-D)/2;y=n+D;var E=(q-D)/2;D=E+D;d.moveTo(0,n);d.lineTo(E,n);d.lineTo(E,0);d.lineTo(D,0);d.lineTo(D,n);d.lineTo(q,n);d.lineTo(q,y);d.lineTo(D,y);d.lineTo(D,v);d.lineTo(E,v);d.lineTo(E,y);d.lineTo(0,y);d.close();d.end()};mxCellRenderer.registerShape("cross",Xa);mxUtils.extend(ab,mxActor);ab.prototype.size=.25;ab.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(q,v/2);y=Math.min(q-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*q);d.moveTo(0,v/2);d.lineTo(y,0);d.lineTo(q-n,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,q-n,v);d.lineTo(y,v);d.close();d.end()};mxCellRenderer.registerShape("display",ab);mxUtils.extend(Oa,mxActor);Oa.prototype.cst={RECT2:"mxgraph.basic.rect"};Oa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},-{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Oa.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);this.strictDrawShape(d,0,0,q,v)};Oa.prototype.strictDrawShape=function(d,n,y,q,v,D){var E=D&&D.rectStyle?D.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),fa=D&&D.absoluteCornerSize?D.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",-this.absoluteCornerSize),L=D&&D.size?D.size:Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),va=D&&D.rectOutline?D.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=D&&D.indent?D.indent:Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Va=D&&D.dashed?D.dashed:mxUtils.getValue(this.style,"dashed",!1),fb=D&&D.dashPattern?D.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=D&&D.relIndent?D.relIndent:-Math.max(0,Math.min(50,na)),Ga=D&&D.top?D.top:mxUtils.getValue(this.style,"top",!0),Ka=D&&D.right?D.right:mxUtils.getValue(this.style,"right",!0),Ja=D&&D.bottom?D.bottom:mxUtils.getValue(this.style,"bottom",!0),Ia=D&&D.left?D.left:mxUtils.getValue(this.style,"left",!0),Pa=D&&D.topLeftStyle?D.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Sa=D&&D.topRightStyle?D.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ta=D&&D.bottomRightStyle?D.bottomRightStyle:mxUtils.getValue(this.style,+{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Oa.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);this.strictDrawShape(d,0,0,q,v)};Oa.prototype.strictDrawShape=function(d,n,y,q,v,D){var E=D&&D.rectStyle?D.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ha=D&&D.absoluteCornerSize?D.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",+this.absoluteCornerSize),M=D&&D.size?D.size:Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),ua=D&&D.rectOutline?D.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=D&&D.indent?D.indent:Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Va=D&&D.dashed?D.dashed:mxUtils.getValue(this.style,"dashed",!1),fb=D&&D.dashPattern?D.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=D&&D.relIndent?D.relIndent:+Math.max(0,Math.min(50,na)),Ga=D&&D.top?D.top:mxUtils.getValue(this.style,"top",!0),La=D&&D.right?D.right:mxUtils.getValue(this.style,"right",!0),Ja=D&&D.bottom?D.bottom:mxUtils.getValue(this.style,"bottom",!0),Ia=D&&D.left?D.left:mxUtils.getValue(this.style,"left",!0),Qa=D&&D.topLeftStyle?D.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Sa=D&&D.topRightStyle?D.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ta=D&&D.bottomRightStyle?D.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Ua=D&&D.bottomLeftStyle?D.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=D&&D.fillColor?D.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");D&&D.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Gb=D&&D.strokeWidth?D.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Db=D&&D.fillColor2?D.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Eb=D&&D.gradientColor2?D.gradientColor2:mxUtils.getValue(this.style,-"gradientColor2","none"),Hb=D&&D.gradientDirection2?D.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Ib=D&&D.opacity?D.opacity:mxUtils.getValue(this.style,"opacity","100"),Jb=Math.max(0,Math.min(50,L));D=Oa.prototype;d.setDashed(Va);fb&&""!=fb&&d.setDashPattern(fb);d.setStrokeWidth(Gb);L=Math.min(.5*v,.5*q,L);fa||(L=Jb*Math.min(q,v)/100);L=Math.min(L,.5*Math.min(q,v));fa||(na=Math.min(bb*Math.min(q,v)/100));na=Math.min(na,.5*Math.min(q,v)-L);(Ga||Ka||Ja||Ia)&&"frame"!=-va&&(d.begin(),Ga?D.moveNW(d,n,y,q,v,E,Pa,L,Ia):d.moveTo(0,0),Ga&&D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),Ka&&D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),Ja&&D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),Ia&&D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Db),Va=fa=Ib,"none"==Db&&(fa=0),"none"==Eb&&(Va=0),d.setGradient(Db,Eb,0,0,q,v,Hb,fa,Va),d.begin(),Ga?D.moveNWInner(d,-n,y,q,v,E,Pa,L,na,Ga,Ia):d.moveTo(na,0),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),Ia&&Ja&&D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),Ja&&Ka&&D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),Ka&&Ga&&D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),Ga&&Ia&&D.paintNWInner(d,n,y,q,v,E,Pa,L,na),d.fill(),"none"==Fb&&(d.begin(),D.paintFolds(d,n,y,q,v,E,Pa,Sa,Ta,Ua,L,Ga,Ka,Ja,Ia),d.stroke()));Ga||Ka||-Ja||!Ia?Ga||Ka||!Ja||Ia?!Ga&&!Ka&&Ja&&Ia?"frame"!=va?(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),"double"==va&&(D.moveNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,-n,y,q,v,E,Pa,L,Ga),D.lineNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),d.close(),d.fillAndStroke()):Ga||!Ka||Ja||Ia?!Ga&&Ka&&!Ja&&Ia?"frame"!=va?(d.begin(),D.moveSW(d,n,y,q,v,E,Pa,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),"double"==va&&(D.moveNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia)),d.stroke(),d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,-n,y,q,v,E,Ta,L,Ja),"double"==va&&(D.moveSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,Pa,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.lineNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close(),d.fillAndStroke(),d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.lineSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),d.close(),d.fillAndStroke()):-!Ga&&Ka&&Ja&&!Ia?"frame"!=va?(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),"double"==va&&(D.moveSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),-D.lineSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),d.close(),d.fillAndStroke()):!Ga&&Ka&&Ja&&Ia?"frame"!=va?(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),"double"==va&&(D.moveNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,-n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.lineNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,-n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),d.close(),d.fillAndStroke()):!Ga||Ka||Ja||Ia?Ga&&!Ka&&!Ja&&Ia?"frame"!=va?(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),"double"==va&&(D.moveNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,-n,y,q,v,E,Ua,L,na,Ja,Ia)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.lineNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close(),d.fillAndStroke()):Ga&&!Ka&&Ja&&!Ia?"frame"!=va?(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),"double"==va&&(D.moveNEInner(d,n,y,-q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga)),d.stroke(),d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),"double"==va&&(D.moveSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.lineNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),d.close(),d.fillAndStroke(),d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,-q,v,E,Ua,L,Ia),D.lineSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),d.close(),d.fillAndStroke()):Ga&&!Ka&&Ja&&Ia?"frame"!=va?(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),"double"==va&&(D.moveNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,-n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.lineNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,-n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),d.close(),d.fillAndStroke()):Ga&&Ka&&!Ja&&!Ia?"frame"!=va?(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),"double"==va&&(D.moveSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,-n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.lineSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),d.close(),d.fillAndStroke()):Ga&&Ka&&!Ja&&Ia?"frame"!=va?(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,-Ja),"double"==va&&(D.moveSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.lineSEInner(d,n,y,q,v,E,-Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close(),d.fillAndStroke()):Ga&&Ka&&Ja&&!Ia?"frame"!=va?(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),"double"==va&&(D.moveSWInner(d,-n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.lineSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,-n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),d.close(),d.fillAndStroke()):Ga&&Ka&&Ja&&Ia&&("frame"!=va?(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,-L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),d.close(),"double"==va&&(D.moveSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close()),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintNW(d,-n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),d.close(),D.moveSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,-n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close(),d.fillAndStroke())):"frame"!=va?(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),"double"==va&&(D.moveNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.lineNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),d.close(),d.fillAndStroke()):-"frame"!=va?(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),"double"==va&&(D.moveSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.lineSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),d.close(),d.fillAndStroke()):"frame"!=va?(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),"double"==va&&(D.moveSWInner(d,-n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.lineSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),d.close(),d.fillAndStroke()):"frame"!=va?(d.begin(),D.moveSW(d,n,y,q,v,E,Pa,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),"double"==va&&(D.moveNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,-Pa,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.lineNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close(),d.fillAndStroke());d.begin();D.paintFolds(d,n,y,q,v,E,Pa,Sa,Ta,Ua,L,Ga,Ka,Ja,Ia);d.stroke()};Oa.prototype.moveNW=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.moveTo(0,0):d.moveTo(0,fa)};Oa.prototype.moveNE=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.moveTo(q,0):d.moveTo(q-fa,0)};Oa.prototype.moveSE=function(d,-n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.moveTo(q,v):d.moveTo(q,v-fa)};Oa.prototype.moveSW=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.moveTo(0,v):d.moveTo(fa,v)};Oa.prototype.paintNW=function(d,n,y,q,v,D,E,fa,L){if(L)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(fa,fa,0,0,n,fa,0)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==E&&-"fold"==D)&&d.lineTo(fa,0);else d.lineTo(0,0)};Oa.prototype.paintTop=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.lineTo(q,0):d.lineTo(q-fa,0)};Oa.prototype.paintNE=function(d,n,y,q,v,D,E,fa,L){if(L)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(fa,fa,0,0,n,q,fa)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q,fa);else d.lineTo(q,-0)};Oa.prototype.paintRight=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.lineTo(q,v):d.lineTo(q,v-fa)};Oa.prototype.paintLeft=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.lineTo(0,0):d.lineTo(0,fa)};Oa.prototype.paintSE=function(d,n,y,q,v,D,E,fa,L){if(L)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(fa,fa,0,0,n,q-fa,v)}else("snip"==E||"default"==-E&&"snip"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-fa,v);else d.lineTo(q,v)};Oa.prototype.paintBottom=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.lineTo(0,v):d.lineTo(fa,v)};Oa.prototype.paintSW=function(d,n,y,q,v,D,E,fa,L){if(L)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(fa,fa,0,0,n,0,v-fa)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==-E&&"fold"==D)&&d.lineTo(0,v-fa);else d.lineTo(0,v)};Oa.prototype.paintNWInner=function(d,n,y,q,v,D,E,fa,L){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(fa-.5*L,fa-.5*L,0,0,0,L,.5*L+fa);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(fa+L,fa+L,0,0,1,L,L+fa);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(L,.5*L+fa);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(L+fa,L+fa),d.lineTo(L,L+fa)};Oa.prototype.paintTopInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.lineTo(0,-L):va&&!na?d.lineTo(L,0):va?"square"==E||"default"==E&&"square"==D?d.lineTo(L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(fa+.5*L,L):d.lineTo(fa+L,L):d.lineTo(0,L):d.lineTo(0,0)};Oa.prototype.paintNEInner=function(d,n,y,q,v,D,E,fa,L){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(fa-.5*L,fa-.5*L,0,0,0,q-fa-.5*L,L);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(fa+L,fa+L,0,0,1,q-fa-L,L);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(q--fa-.5*L,L);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(q-fa-L,fa+L),d.lineTo(q-fa-L,L)};Oa.prototype.paintRightInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.lineTo(q-L,0):va&&!na?d.lineTo(q,L):va?"square"==E||"default"==E&&"square"==D?d.lineTo(q-L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-L,fa+.5*L):d.lineTo(q-L,fa+L):d.lineTo(q-L,0):d.lineTo(q,0)};Oa.prototype.paintLeftInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.lineTo(L,-v):va&&!na?d.lineTo(0,v-L):va?"square"==E||"default"==E&&"square"==D?d.lineTo(L,v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(L,v-fa-.5*L):d.lineTo(L,v-fa-L):d.lineTo(L,v):d.lineTo(0,v)};Oa.prototype.paintSEInner=function(d,n,y,q,v,D,E,fa,L){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(fa-.5*L,fa-.5*L,0,0,0,q-L,v-fa-.5*L);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(fa+L,fa+L,0,0,1,q-L,v-fa-L);else if("snip"==E||"default"==E&&"snip"==-D)d.lineTo(q-L,v-fa-.5*L);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(q-fa-L,v-fa-L),d.lineTo(q-L,v-fa-L)};Oa.prototype.paintBottomInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.lineTo(q,v-L):va&&!na?d.lineTo(q-L,v):"square"==E||"default"==E&&"square"==D||!va?d.lineTo(q-L,v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-fa-.5*L,v-L):d.lineTo(q-fa-L,v-L):d.lineTo(q,v)};Oa.prototype.paintSWInner=function(d,n,y,q,v,D,E,fa,L,va){if(!va)d.lineTo(L,-v);else if("square"==E||"default"==E&&"square"==D)d.lineTo(L,v-L);else if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(fa-.5*L,fa-.5*L,0,0,0,fa+.5*L,v-L);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(fa+L,fa+L,0,0,1,fa+L,v-L);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(fa+.5*L,v-L);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(L+fa,v-fa-L),d.lineTo(L+fa,v-L)};Oa.prototype.moveSWInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D?d.moveTo(L,-v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(L,v-fa-.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(L,v-fa-L):d.moveTo(0,v-L)};Oa.prototype.lineSWInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D?d.lineTo(L,v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(L,v-fa-.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==-E&&"fold"==D)&&d.lineTo(L,v-fa-L):d.lineTo(0,v-L)};Oa.prototype.moveSEInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D?d.moveTo(q-L,v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(q-L,v-fa-.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(q-L,v-fa-L):d.moveTo(q-L,v)};Oa.prototype.lineSEInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D?d.lineTo(q-L,-v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-L,v-fa-.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-L,v-fa-L):d.lineTo(q-L,v)};Oa.prototype.moveNEInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D||va?d.moveTo(q-L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(q-L,fa+.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==-E&&"fold"==D)&&d.moveTo(q-L,fa+L):d.moveTo(q,L)};Oa.prototype.lineNEInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D||va?d.lineTo(q-L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-L,fa+.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-L,fa+L):d.lineTo(q,L)};Oa.prototype.moveNWInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.moveTo(L,0):va&&!na?d.moveTo(0,L):"square"==-E||"default"==E&&"square"==D?d.moveTo(L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(L,fa+.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(L,fa+L):d.moveTo(0,0)};Oa.prototype.lineNWInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.lineTo(L,0):va&&!na?d.lineTo(0,L):"square"==E||"default"==E&&"square"==D?d.lineTo(L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(L,-fa+.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(L,fa+L):d.lineTo(0,0)};Oa.prototype.paintFolds=function(d,n,y,q,v,D,E,fa,L,va,na,Va,fb,bb,Ga){if("fold"==D||"fold"==E||"fold"==fa||"fold"==L||"fold"==va)("fold"==E||"default"==E&&"fold"==D)&&Va&&Ga&&(d.moveTo(0,na),d.lineTo(na,na),d.lineTo(na,0)),("fold"==fa||"default"==fa&&"fold"==D)&&Va&&fb&&(d.moveTo(q-na,0),d.lineTo(q-na,na),d.lineTo(q,na)),("fold"==L||"default"==L&&"fold"==D)&&bb&&fb&&(d.moveTo(q--na,v),d.lineTo(q-na,v-na),d.lineTo(q,v-na)),("fold"==va||"default"==va&&"fold"==D)&&bb&&Ga&&(d.moveTo(0,v-na),d.lineTo(na,v-na),d.lineTo(na,v))};mxCellRenderer.registerShape(Oa.prototype.cst.RECT2,Oa);Oa.prototype.constraints=null;mxUtils.extend(Qa,mxConnector);Qa.prototype.origPaintEdgeShape=Qa.prototype.paintEdgeShape;Qa.prototype.paintEdgeShape=function(d,n,y){for(var q=[],v=0;v<n.length;v++)q.push(mxUtils.clone(n[v]));v=d.state.dashed;var D=d.state.fixDash;Qa.prototype.origPaintEdgeShape.apply(this,-[d,q,y]);3<=d.state.strokeWidth&&(q=mxUtils.getValue(this.style,"fillColor",null),null!=q&&(d.setStrokeColor(q),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(v,D),Qa.prototype.origPaintEdgeShape.apply(this,[d,n,y])))};mxCellRenderer.registerShape("filledEdge",Qa);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var n=this.editorUi.getSelectionState(),y=d.apply(this,arguments);"umlFrame"==-n.style.shape&&y.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return y}}();mxMarker.addMarker("dash",function(d,n,y,q,v,D,E,fa,L,va){var na=v*(E+L+1),Va=D*(E+L+1);return function(){d.begin();d.moveTo(q.x-na/2-Va/2,q.y-Va/2+na/2);d.lineTo(q.x+Va/2-3*na/2,q.y-3*Va/2-na/2);d.stroke()}});mxMarker.addMarker("box",function(d,n,y,q,v,D,E,fa,L,va){var na=v*(E+L+1),Va=D*(E+L+1),fb=q.x+na/2,bb=q.y+Va/2;q.x-=na;q.y-=Va;return function(){d.begin();d.moveTo(fb-na/2--Va/2,bb-Va/2+na/2);d.lineTo(fb-na/2+Va/2,bb-Va/2-na/2);d.lineTo(fb+Va/2-3*na/2,bb-3*Va/2-na/2);d.lineTo(fb-Va/2-3*na/2,bb-3*Va/2+na/2);d.close();va?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",function(d,n,y,q,v,D,E,fa,L,va){var na=v*(E+L+1),Va=D*(E+L+1);return function(){d.begin();d.moveTo(q.x-na/2-Va/2,q.y-Va/2+na/2);d.lineTo(q.x+Va/2-3*na/2,q.y-3*Va/2-na/2);d.moveTo(q.x-na/2+Va/2,q.y-Va/2-na/2);d.lineTo(q.x-Va/2-3*na/2,q.y-3*Va/2+na/2);d.stroke()}});mxMarker.addMarker("circle",kb);-mxMarker.addMarker("circlePlus",function(d,n,y,q,v,D,E,fa,L,va){var na=q.clone(),Va=kb.apply(this,arguments),fb=v*(E+2*L),bb=D*(E+2*L);return function(){Va.apply(this,arguments);d.begin();d.moveTo(na.x-v*L,na.y-D*L);d.lineTo(na.x-2*fb+v*L,na.y-2*bb+D*L);d.moveTo(na.x-fb-bb+D*L,na.y-bb+fb-v*L);d.lineTo(na.x+bb-fb-D*L,na.y-bb-fb+v*L);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,n,y,q,v,D,E,fa,L,va){var na=v*(E+L+1),Va=D*(E+L+1),fb=q.clone();q.x-=na;q.y-=Va;return function(){d.begin();d.moveTo(fb.x--Va,fb.y+na);d.quadTo(q.x-Va,q.y+na,q.x,q.y);d.quadTo(q.x+Va,q.y-na,fb.x+Va,fb.y-na);d.stroke()}});mxMarker.addMarker("async",function(d,n,y,q,v,D,E,fa,L,va){n=v*L*1.118;y=D*L*1.118;v*=E+L;D*=E+L;var na=q.clone();na.x-=n;na.y-=y;q.x+=-v-n;q.y+=-D-y;return function(){d.begin();d.moveTo(na.x,na.y);fa?d.lineTo(na.x-v-D/2,na.y-D+v/2):d.lineTo(na.x+D/2-v,na.y-D-v/2);d.lineTo(na.x-v,na.y-D);d.close();va?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:2;return function(n,-y,q,v,D,E,fa,L,va,na){D*=fa+va;E*=fa+va;var Va=v.clone();return function(){n.begin();n.moveTo(Va.x,Va.y);L?n.lineTo(Va.x-D-E/d,Va.y-E+D/d):n.lineTo(Va.x+E/d-D,Va.y-E-D/d);n.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var qb=function(d,n,y){return nb(d,["width"],n,function(q,v,D,E,fa){fa=d.shape.getEdgeWidth()*d.view.scale+y;return new mxPoint(E.x+v*q/4+D*fa/2,E.y+D*q/4-v*fa/2)},function(q,v,D,E,fa,L){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));d.style.width=Math.round(2*-q)/d.view.scale-y})},nb=function(d,n,y,q,v){return jb(d,n,function(D){var E=d.absolutePoints;if(null!=E&&0<E.length){var fa=E.length-1;D=d.view.translate;var L=d.view.scale,va=y?E[0]:E[fa];E=y?E[1]:E[fa-1];fa=E.x-va.x;var na=E.y-va.y,Va=Math.sqrt(fa*fa+na*na);va=q.call(this,Va,fa/Va,na/Va,va,E);return new mxPoint(va.x/L-D.x,va.y/L-D.y)}return null},function(D,E,fa){var L=d.absolutePoints,va=L.length-1;D=d.view.translate;var na=d.view.scale,Va=y?L[0]:L[va];L=y?L[1]:L[va-1];va=L.x-Va.x;var fb=L.y-Va.y,-bb=Math.sqrt(va*va+fb*fb);E.x=(E.x+D.x)*na;E.y=(E.y+D.y)*na;v.call(this,bb,va/bb,fb/bb,Va,L,E,fa)})},lb=function(d,n){return function(y){return[nb(y,["startWidth"],!0,function(q,v,D,E,fa){fa=mxUtils.getNumber(y.style,"startWidth",d)*y.view.scale+n;return new mxPoint(E.x+v*q/4+D*fa/2,E.y+D*q/4-v*fa/2)},function(q,v,D,E,fa,L){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));y.style.startWidth=Math.round(2*q)/y.view.scale-n})]}},eb=function(d){return function(n){return[jb(n,["arrowWidth",-"arrowSize"],function(y){var q=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",La.prototype.arrowWidth))),v=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",La.prototype.arrowSize)));return new mxPoint(y.x+(1-v)*y.width,y.y+(1-q)*y.height/2)},function(y,q){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(y.y+y.height/2-q.y)/y.height*2));this.state.style.arrowSize=Math.max(0,Math.min(d,(y.x+y.width-q.x)/y.width))})]}},tb=function(d){return function(n){return[jb(n,+"gradientColor2","none"),Hb=D&&D.gradientDirection2?D.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Ib=D&&D.opacity?D.opacity:mxUtils.getValue(this.style,"opacity","100"),Jb=Math.max(0,Math.min(50,M));D=Oa.prototype;d.setDashed(Va);fb&&""!=fb&&d.setDashPattern(fb);d.setStrokeWidth(Gb);M=Math.min(.5*v,.5*q,M);ha||(M=Jb*Math.min(q,v)/100);M=Math.min(M,.5*Math.min(q,v));ha||(na=Math.min(bb*Math.min(q,v)/100));na=Math.min(na,.5*Math.min(q,v)-M);(Ga||La||Ja||Ia)&&"frame"!=+ua&&(d.begin(),Ga?D.moveNW(d,n,y,q,v,E,Qa,M,Ia):d.moveTo(0,0),Ga&&D.paintNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),La&&D.paintNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),Ja&&D.paintSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),Ia&&D.paintSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Db),Va=ha=Ib,"none"==Db&&(ha=0),"none"==Eb&&(Va=0),d.setGradient(Db,Eb,0,0,q,v,Hb,ha,Va),d.begin(),Ga?D.moveNWInner(d,+n,y,q,v,E,Qa,M,na,Ga,Ia):d.moveTo(na,0),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),Ia&&Ja&&D.paintSWInner(d,n,y,q,v,E,Ua,M,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),Ja&&La&&D.paintSEInner(d,n,y,q,v,E,Ta,M,na),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),La&&Ga&&D.paintNEInner(d,n,y,q,v,E,Sa,M,na),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),Ga&&Ia&&D.paintNWInner(d,n,y,q,v,E,Qa,M,na),d.fill(),"none"==Fb&&(d.begin(),D.paintFolds(d,n,y,q,v,E,Qa,Sa,Ta,Ua,M,Ga,La,Ja,Ia),d.stroke()));Ga||La||+Ja||!Ia?Ga||La||!Ja||Ia?!Ga&&!La&&Ja&&Ia?"frame"!=ua?(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),D.paintSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),"double"==ua&&(D.moveNWInner(d,n,y,q,v,E,Qa,M,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,M,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),D.paintSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,+n,y,q,v,E,Qa,M,Ga),D.lineNWInner(d,n,y,q,v,E,Qa,M,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,M,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),d.close(),d.fillAndStroke()):Ga||!La||Ja||Ia?!Ga&&La&&!Ja&&Ia?"frame"!=ua?(d.begin(),D.moveSW(d,n,y,q,v,E,Qa,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),"double"==ua&&(D.moveNWInner(d,n,y,q,v,E,Qa,M,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia)),d.stroke(),d.begin(),D.moveNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,+n,y,q,v,E,Ta,M,Ja),"double"==ua&&(D.moveSEInner(d,n,y,q,v,E,Ta,M,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,Qa,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),D.lineNWInner(d,n,y,q,v,E,Qa,M,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),d.close(),d.fillAndStroke(),d.begin(),D.moveNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.lineSEInner(d,n,y,q,v,E,Ta,M,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),d.close(),d.fillAndStroke()):+!Ga&&La&&Ja&&!Ia?"frame"!=ua?(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.paintSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),"double"==ua&&(D.moveSWInner(d,n,y,q,v,E,Ua,M,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,M,na),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.paintSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),+D.lineSWInner(d,n,y,q,v,E,Ua,M,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,M,na),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),d.close(),d.fillAndStroke()):!Ga&&La&&Ja&&Ia?"frame"!=ua?(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.paintSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),D.paintSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),"double"==ua&&(D.moveNWInner(d,n,y,q,v,E,Qa,M,na,Ga,Ia),D.paintLeftInner(d,+n,y,q,v,E,Ua,M,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,M,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,M,na),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.paintSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),D.paintSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),D.lineNWInner(d,n,y,q,v,E,Qa,M,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),D.paintSWInner(d,+n,y,q,v,E,Ua,M,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,M,na),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),d.close(),d.fillAndStroke()):!Ga||La||Ja||Ia?Ga&&!La&&!Ja&&Ia?"frame"!=ua?(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),D.paintNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),"double"==ua&&(D.moveNEInner(d,n,y,q,v,E,Sa,M,na,La),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Qa,M,na),D.paintLeftInner(d,+n,y,q,v,E,Ua,M,na,Ja,Ia)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),D.paintNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.lineNEInner(d,n,y,q,v,E,Sa,M,na,La),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Qa,M,na),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),d.close(),d.fillAndStroke()):Ga&&!La&&Ja&&!Ia?"frame"!=ua?(d.begin(),D.moveNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),"double"==ua&&(D.moveNEInner(d,n,y,+q,v,E,Sa,M,na,La),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga)),d.stroke(),d.begin(),D.moveSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),"double"==ua&&(D.moveSWInner(d,n,y,q,v,E,Ua,M,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.lineNEInner(d,n,y,q,v,E,Sa,M,na,La),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),d.close(),d.fillAndStroke(),d.begin(),D.moveSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,+q,v,E,Ua,M,Ia),D.lineSWInner(d,n,y,q,v,E,Ua,M,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),d.close(),d.fillAndStroke()):Ga&&!La&&Ja&&Ia?"frame"!=ua?(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),D.paintSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),D.paintNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),"double"==ua&&(D.moveNEInner(d,n,y,q,v,E,Sa,M,na,La),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Qa,M,na),D.paintLeftInner(d,+n,y,q,v,E,Ua,M,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,M,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),D.paintSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),D.paintNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.lineNEInner(d,n,y,q,v,E,Sa,M,na,La),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Qa,M,na),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),D.paintSWInner(d,+n,y,q,v,E,Ua,M,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),d.close(),d.fillAndStroke()):Ga&&La&&!Ja&&!Ia?"frame"!=ua?(d.begin(),D.moveNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.paintNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),"double"==ua&&(D.moveSEInner(d,n,y,q,v,E,Ta,M,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),D.paintNEInner(d,n,y,q,v,E,Sa,M,na),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,+n,y,q,v,E,Sa,M,La),D.paintNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.lineSEInner(d,n,y,q,v,E,Ta,M,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),D.paintNEInner(d,n,y,q,v,E,Sa,M,na),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),d.close(),d.fillAndStroke()):Ga&&La&&!Ja&&Ia?"frame"!=ua?(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),D.paintNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.paintNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,+Ja),"double"==ua&&(D.moveSEInner(d,n,y,q,v,E,Ta,M,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),D.paintNEInner(d,n,y,q,v,E,Sa,M,na),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Qa,M,na),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),D.paintNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.paintNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.lineSEInner(d,n,y,q,v,E,+Ta,M,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),D.paintNEInner(d,n,y,q,v,E,Sa,M,na),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Qa,M,na),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),d.close(),d.fillAndStroke()):Ga&&La&&Ja&&!Ia?"frame"!=ua?(d.begin(),D.moveNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.paintNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.paintSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),"double"==ua&&(D.moveSWInner(d,+n,y,q,v,E,Ua,M,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,M,na),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),D.paintNEInner(d,n,y,q,v,E,Sa,M,na),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.paintNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.paintSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),D.lineSWInner(d,n,y,q,v,E,Ua,M,na,Ia),D.paintBottomInner(d,+n,y,q,v,E,Ta,M,na,La,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,M,na),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),D.paintNEInner(d,n,y,q,v,E,Sa,M,na),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),d.close(),d.fillAndStroke()):Ga&&La&&Ja&&Ia&&("frame"!=ua?(d.begin(),D.moveNW(d,n,y,q,v,E,Qa,M,Ia),D.paintNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.paintNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.paintSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),D.paintSW(d,n,y,q,v,E,Ua,+M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),d.close(),"double"==ua&&(D.moveSWInner(d,n,y,q,v,E,Ua,M,na,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,M,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,M,na),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),D.paintNEInner(d,n,y,q,v,E,Sa,M,na),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Qa,M,na),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),d.close()),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Qa,M,Ia),D.paintNW(d,+n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.paintNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.paintSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),D.paintSW(d,n,y,q,v,E,Ua,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),d.close(),D.moveSWInner(d,n,y,q,v,E,Ua,M,na,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,M,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,M,na),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),D.paintNEInner(d,n,y,q,v,E,Sa,M,na),D.paintTopInner(d,+n,y,q,v,E,Qa,M,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Qa,M,na),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),d.close(),d.fillAndStroke())):"frame"!=ua?(d.begin(),D.moveNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),"double"==ua&&(D.moveNEInner(d,n,y,q,v,E,Sa,M,na,La),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Qa,M,Ia),D.paintTop(d,n,y,q,v,E,Sa,M,La),D.lineNEInner(d,n,y,q,v,E,Sa,M,na,La),D.paintTopInner(d,n,y,q,v,E,Qa,M,na,Ia,Ga),d.close(),d.fillAndStroke()):+"frame"!=ua?(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),"double"==ua&&(D.moveSEInner(d,n,y,q,v,E,Ta,M,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,M,Ga),D.paintRight(d,n,y,q,v,E,Ta,M,Ja),D.lineSEInner(d,n,y,q,v,E,Ta,M,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,M,na,Ga,La),d.close(),d.fillAndStroke()):"frame"!=ua?(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),"double"==ua&&(D.moveSWInner(d,+n,y,q,v,E,Ua,M,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,M,La),D.paintBottom(d,n,y,q,v,E,Ua,M,Ia),D.lineSWInner(d,n,y,q,v,E,Ua,M,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,M,na,La,Ja),d.close(),d.fillAndStroke()):"frame"!=ua?(d.begin(),D.moveSW(d,n,y,q,v,E,Qa,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),"double"==ua&&(D.moveNWInner(d,n,y,q,v,E,Qa,M,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,+Qa,M,Ja),D.paintLeft(d,n,y,q,v,E,Qa,M,Ga),D.lineNWInner(d,n,y,q,v,E,Qa,M,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,M,na,Ja,Ia),d.close(),d.fillAndStroke());d.begin();D.paintFolds(d,n,y,q,v,E,Qa,Sa,Ta,Ua,M,Ga,La,Ja,Ia);d.stroke()};Oa.prototype.moveNW=function(d,n,y,q,v,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.moveTo(0,0):d.moveTo(0,ha)};Oa.prototype.moveNE=function(d,n,y,q,v,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.moveTo(q,0):d.moveTo(q-ha,0)};Oa.prototype.moveSE=function(d,+n,y,q,v,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.moveTo(q,v):d.moveTo(q,v-ha)};Oa.prototype.moveSW=function(d,n,y,q,v,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.moveTo(0,v):d.moveTo(ha,v)};Oa.prototype.paintNW=function(d,n,y,q,v,D,E,ha,M){if(M)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(ha,ha,0,0,n,ha,0)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==E&&+"fold"==D)&&d.lineTo(ha,0);else d.lineTo(0,0)};Oa.prototype.paintTop=function(d,n,y,q,v,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.lineTo(q,0):d.lineTo(q-ha,0)};Oa.prototype.paintNE=function(d,n,y,q,v,D,E,ha,M){if(M)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(ha,ha,0,0,n,q,ha)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q,ha);else d.lineTo(q,+0)};Oa.prototype.paintRight=function(d,n,y,q,v,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.lineTo(q,v):d.lineTo(q,v-ha)};Oa.prototype.paintLeft=function(d,n,y,q,v,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.lineTo(0,0):d.lineTo(0,ha)};Oa.prototype.paintSE=function(d,n,y,q,v,D,E,ha,M){if(M)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(ha,ha,0,0,n,q-ha,v)}else("snip"==E||"default"==+E&&"snip"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-ha,v);else d.lineTo(q,v)};Oa.prototype.paintBottom=function(d,n,y,q,v,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.lineTo(0,v):d.lineTo(ha,v)};Oa.prototype.paintSW=function(d,n,y,q,v,D,E,ha,M){if(M)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(ha,ha,0,0,n,0,v-ha)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==+E&&"fold"==D)&&d.lineTo(0,v-ha);else d.lineTo(0,v)};Oa.prototype.paintNWInner=function(d,n,y,q,v,D,E,ha,M){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(ha-.5*M,ha-.5*M,0,0,0,M,.5*M+ha);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(ha+M,ha+M,0,0,1,M,M+ha);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(M,.5*M+ha);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(M+ha,M+ha),d.lineTo(M,M+ha)};Oa.prototype.paintTopInner=function(d,n,y,q,v,D,E,ha,M,ua,na){ua||na?!ua&&na?d.lineTo(0,+M):ua&&!na?d.lineTo(M,0):ua?"square"==E||"default"==E&&"square"==D?d.lineTo(M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(ha+.5*M,M):d.lineTo(ha+M,M):d.lineTo(0,M):d.lineTo(0,0)};Oa.prototype.paintNEInner=function(d,n,y,q,v,D,E,ha,M){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(ha-.5*M,ha-.5*M,0,0,0,q-ha-.5*M,M);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(ha+M,ha+M,0,0,1,q-ha-M,M);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(q-+ha-.5*M,M);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(q-ha-M,ha+M),d.lineTo(q-ha-M,M)};Oa.prototype.paintRightInner=function(d,n,y,q,v,D,E,ha,M,ua,na){ua||na?!ua&&na?d.lineTo(q-M,0):ua&&!na?d.lineTo(q,M):ua?"square"==E||"default"==E&&"square"==D?d.lineTo(q-M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-M,ha+.5*M):d.lineTo(q-M,ha+M):d.lineTo(q-M,0):d.lineTo(q,0)};Oa.prototype.paintLeftInner=function(d,n,y,q,v,D,E,ha,M,ua,na){ua||na?!ua&&na?d.lineTo(M,+v):ua&&!na?d.lineTo(0,v-M):ua?"square"==E||"default"==E&&"square"==D?d.lineTo(M,v-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(M,v-ha-.5*M):d.lineTo(M,v-ha-M):d.lineTo(M,v):d.lineTo(0,v)};Oa.prototype.paintSEInner=function(d,n,y,q,v,D,E,ha,M){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(ha-.5*M,ha-.5*M,0,0,0,q-M,v-ha-.5*M);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(ha+M,ha+M,0,0,1,q-M,v-ha-M);else if("snip"==E||"default"==E&&"snip"==+D)d.lineTo(q-M,v-ha-.5*M);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(q-ha-M,v-ha-M),d.lineTo(q-M,v-ha-M)};Oa.prototype.paintBottomInner=function(d,n,y,q,v,D,E,ha,M,ua,na){ua||na?!ua&&na?d.lineTo(q,v-M):ua&&!na?d.lineTo(q-M,v):"square"==E||"default"==E&&"square"==D||!ua?d.lineTo(q-M,v-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-ha-.5*M,v-M):d.lineTo(q-ha-M,v-M):d.lineTo(q,v)};Oa.prototype.paintSWInner=function(d,n,y,q,v,D,E,ha,M,ua){if(!ua)d.lineTo(M,+v);else if("square"==E||"default"==E&&"square"==D)d.lineTo(M,v-M);else if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(ha-.5*M,ha-.5*M,0,0,0,ha+.5*M,v-M);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(ha+M,ha+M,0,0,1,ha+M,v-M);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(ha+.5*M,v-M);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(M+ha,v-ha-M),d.lineTo(M+ha,v-M)};Oa.prototype.moveSWInner=function(d,n,y,q,v,D,E,ha,M,ua){ua?"square"==E||"default"==E&&"square"==D?d.moveTo(M,+v-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(M,v-ha-.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(M,v-ha-M):d.moveTo(0,v-M)};Oa.prototype.lineSWInner=function(d,n,y,q,v,D,E,ha,M,ua){ua?"square"==E||"default"==E&&"square"==D?d.lineTo(M,v-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(M,v-ha-.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==+E&&"fold"==D)&&d.lineTo(M,v-ha-M):d.lineTo(0,v-M)};Oa.prototype.moveSEInner=function(d,n,y,q,v,D,E,ha,M,ua){ua?"square"==E||"default"==E&&"square"==D?d.moveTo(q-M,v-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(q-M,v-ha-.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(q-M,v-ha-M):d.moveTo(q-M,v)};Oa.prototype.lineSEInner=function(d,n,y,q,v,D,E,ha,M,ua){ua?"square"==E||"default"==E&&"square"==D?d.lineTo(q-M,+v-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-M,v-ha-.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-M,v-ha-M):d.lineTo(q-M,v)};Oa.prototype.moveNEInner=function(d,n,y,q,v,D,E,ha,M,ua){ua?"square"==E||"default"==E&&"square"==D||ua?d.moveTo(q-M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(q-M,ha+.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==+E&&"fold"==D)&&d.moveTo(q-M,ha+M):d.moveTo(q,M)};Oa.prototype.lineNEInner=function(d,n,y,q,v,D,E,ha,M,ua){ua?"square"==E||"default"==E&&"square"==D||ua?d.lineTo(q-M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-M,ha+.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-M,ha+M):d.lineTo(q,M)};Oa.prototype.moveNWInner=function(d,n,y,q,v,D,E,ha,M,ua,na){ua||na?!ua&&na?d.moveTo(M,0):ua&&!na?d.moveTo(0,M):"square"==+E||"default"==E&&"square"==D?d.moveTo(M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(M,ha+.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(M,ha+M):d.moveTo(0,0)};Oa.prototype.lineNWInner=function(d,n,y,q,v,D,E,ha,M,ua,na){ua||na?!ua&&na?d.lineTo(M,0):ua&&!na?d.lineTo(0,M):"square"==E||"default"==E&&"square"==D?d.lineTo(M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(M,+ha+.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(M,ha+M):d.lineTo(0,0)};Oa.prototype.paintFolds=function(d,n,y,q,v,D,E,ha,M,ua,na,Va,fb,bb,Ga){if("fold"==D||"fold"==E||"fold"==ha||"fold"==M||"fold"==ua)("fold"==E||"default"==E&&"fold"==D)&&Va&&Ga&&(d.moveTo(0,na),d.lineTo(na,na),d.lineTo(na,0)),("fold"==ha||"default"==ha&&"fold"==D)&&Va&&fb&&(d.moveTo(q-na,0),d.lineTo(q-na,na),d.lineTo(q,na)),("fold"==M||"default"==M&&"fold"==D)&&bb&&fb&&(d.moveTo(q-+na,v),d.lineTo(q-na,v-na),d.lineTo(q,v-na)),("fold"==ua||"default"==ua&&"fold"==D)&&bb&&Ga&&(d.moveTo(0,v-na),d.lineTo(na,v-na),d.lineTo(na,v))};mxCellRenderer.registerShape(Oa.prototype.cst.RECT2,Oa);Oa.prototype.constraints=null;mxUtils.extend(Ra,mxConnector);Ra.prototype.origPaintEdgeShape=Ra.prototype.paintEdgeShape;Ra.prototype.paintEdgeShape=function(d,n,y){for(var q=[],v=0;v<n.length;v++)q.push(mxUtils.clone(n[v]));v=d.state.dashed;var D=d.state.fixDash;Ra.prototype.origPaintEdgeShape.apply(this,+[d,q,y]);3<=d.state.strokeWidth&&(q=mxUtils.getValue(this.style,"fillColor",null),null!=q&&(d.setStrokeColor(q),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(v,D),Ra.prototype.origPaintEdgeShape.apply(this,[d,n,y])))};mxCellRenderer.registerShape("filledEdge",Ra);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var n=this.editorUi.getSelectionState(),y=d.apply(this,arguments);"umlFrame"==+n.style.shape&&y.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return y}}();mxMarker.addMarker("dash",function(d,n,y,q,v,D,E,ha,M,ua){var na=v*(E+M+1),Va=D*(E+M+1);return function(){d.begin();d.moveTo(q.x-na/2-Va/2,q.y-Va/2+na/2);d.lineTo(q.x+Va/2-3*na/2,q.y-3*Va/2-na/2);d.stroke()}});mxMarker.addMarker("box",function(d,n,y,q,v,D,E,ha,M,ua){var na=v*(E+M+1),Va=D*(E+M+1),fb=q.x+na/2,bb=q.y+Va/2;q.x-=na;q.y-=Va;return function(){d.begin();d.moveTo(fb-na/2-+Va/2,bb-Va/2+na/2);d.lineTo(fb-na/2+Va/2,bb-Va/2-na/2);d.lineTo(fb+Va/2-3*na/2,bb-3*Va/2-na/2);d.lineTo(fb-Va/2-3*na/2,bb-3*Va/2+na/2);d.close();ua?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",function(d,n,y,q,v,D,E,ha,M,ua){var na=v*(E+M+1),Va=D*(E+M+1);return function(){d.begin();d.moveTo(q.x-na/2-Va/2,q.y-Va/2+na/2);d.lineTo(q.x+Va/2-3*na/2,q.y-3*Va/2-na/2);d.moveTo(q.x-na/2+Va/2,q.y-Va/2-na/2);d.lineTo(q.x-Va/2-3*na/2,q.y-3*Va/2+na/2);d.stroke()}});mxMarker.addMarker("circle",kb);+mxMarker.addMarker("circlePlus",function(d,n,y,q,v,D,E,ha,M,ua){var na=q.clone(),Va=kb.apply(this,arguments),fb=v*(E+2*M),bb=D*(E+2*M);return function(){Va.apply(this,arguments);d.begin();d.moveTo(na.x-v*M,na.y-D*M);d.lineTo(na.x-2*fb+v*M,na.y-2*bb+D*M);d.moveTo(na.x-fb-bb+D*M,na.y-bb+fb-v*M);d.lineTo(na.x+bb-fb-D*M,na.y-bb-fb+v*M);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,n,y,q,v,D,E,ha,M,ua){var na=v*(E+M+1),Va=D*(E+M+1),fb=q.clone();q.x-=na;q.y-=Va;return function(){d.begin();d.moveTo(fb.x-+Va,fb.y+na);d.quadTo(q.x-Va,q.y+na,q.x,q.y);d.quadTo(q.x+Va,q.y-na,fb.x+Va,fb.y-na);d.stroke()}});mxMarker.addMarker("async",function(d,n,y,q,v,D,E,ha,M,ua){n=v*M*1.118;y=D*M*1.118;v*=E+M;D*=E+M;var na=q.clone();na.x-=n;na.y-=y;q.x+=-v-n;q.y+=-D-y;return function(){d.begin();d.moveTo(na.x,na.y);ha?d.lineTo(na.x-v-D/2,na.y-D+v/2):d.lineTo(na.x+D/2-v,na.y-D-v/2);d.lineTo(na.x-v,na.y-D);d.close();ua?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:2;return function(n,+y,q,v,D,E,ha,M,ua,na){D*=ha+ua;E*=ha+ua;var Va=v.clone();return function(){n.begin();n.moveTo(Va.x,Va.y);M?n.lineTo(Va.x-D-E/d,Va.y-E+D/d):n.lineTo(Va.x+E/d-D,Va.y-E-D/d);n.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var qb=function(d,n,y){return nb(d,["width"],n,function(q,v,D,E,ha){ha=d.shape.getEdgeWidth()*d.view.scale+y;return new mxPoint(E.x+v*q/4+D*ha/2,E.y+D*q/4-v*ha/2)},function(q,v,D,E,ha,M){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));d.style.width=Math.round(2*+q)/d.view.scale-y})},nb=function(d,n,y,q,v){return jb(d,n,function(D){var E=d.absolutePoints;if(null!=E&&0<E.length){var ha=E.length-1;D=d.view.translate;var M=d.view.scale,ua=y?E[0]:E[ha];E=y?E[1]:E[ha-1];ha=E.x-ua.x;var na=E.y-ua.y,Va=Math.sqrt(ha*ha+na*na);ua=q.call(this,Va,ha/Va,na/Va,ua,E);return new mxPoint(ua.x/M-D.x,ua.y/M-D.y)}return null},function(D,E,ha){var M=d.absolutePoints,ua=M.length-1;D=d.view.translate;var na=d.view.scale,Va=y?M[0]:M[ua];M=y?M[1]:M[ua-1];ua=M.x-Va.x;var fb=M.y-Va.y,+bb=Math.sqrt(ua*ua+fb*fb);E.x=(E.x+D.x)*na;E.y=(E.y+D.y)*na;v.call(this,bb,ua/bb,fb/bb,Va,M,E,ha)})},lb=function(d,n){return function(y){return[nb(y,["startWidth"],!0,function(q,v,D,E,ha){ha=mxUtils.getNumber(y.style,"startWidth",d)*y.view.scale+n;return new mxPoint(E.x+v*q/4+D*ha/2,E.y+D*q/4-v*ha/2)},function(q,v,D,E,ha,M){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));y.style.startWidth=Math.round(2*q)/y.view.scale-n})]}},eb=function(d){return function(n){return[jb(n,["arrowWidth",+"arrowSize"],function(y){var q=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Na.prototype.arrowWidth))),v=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",Na.prototype.arrowSize)));return new mxPoint(y.x+(1-v)*y.width,y.y+(1-q)*y.height/2)},function(y,q){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(y.y+y.height/2-q.y)/y.height*2));this.state.style.arrowSize=Math.max(0,Math.min(d,(y.x+y.width-q.x)/y.width))})]}},tb=function(d){return function(n){return[jb(n,["size"],function(y){var q=Math.max(0,Math.min(.5*y.height,parseFloat(mxUtils.getValue(this.state.style,"size",d))));return new mxPoint(y.x,y.y+q)},function(y,q){this.state.style.size=Math.max(0,q.y-y.y)},!0)]}},ob=function(d,n,y){return function(q){var v=[jb(q,["size"],function(D){var E=Math.max(0,Math.min(D.width,Math.min(D.height,parseFloat(mxUtils.getValue(this.state.style,"size",n)))))*d;return new mxPoint(D.x+E,D.y+E)},function(D,E){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(D.width,-E.x-D.x),Math.min(D.height,E.y-D.y)))/d)},!1)];y&&mxUtils.getValue(q.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(wb(q));return v}},ub=function(d,n,y,q,v){y=null!=y?y:.5;return function(D){var E=[jb(D,["size"],function(fa){var L=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,va=parseFloat(mxUtils.getValue(this.state.style,"size",L?v:d));return new mxPoint(fa.x+Math.max(0,Math.min(.5*fa.width,va*(L?1:fa.width))),fa.getCenterY())},function(fa,L,va){fa=null!=v&&"0"!=mxUtils.getValue(this.state.style,-"fixedSize","0")?L.x-fa.x:Math.max(0,Math.min(y,(L.x-fa.x)/fa.width));this.state.style.size=fa},!1,q)];n&&mxUtils.getValue(D.style,mxConstants.STYLE_ROUNDED,!1)&&E.push(wb(D));return E}},Ab=function(d,n,y){d=null!=d?d:.5;return function(q){var v=[jb(q,["size"],function(D){var E=null!=y?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,fa=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",E?y:n)));return new mxPoint(D.x+Math.min(.75*D.width*d,fa*(E?.75:.75*D.width)),D.y+D.height/+E.x-D.x),Math.min(D.height,E.y-D.y)))/d)},!1)];y&&mxUtils.getValue(q.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(wb(q));return v}},ub=function(d,n,y,q,v){y=null!=y?y:.5;return function(D){var E=[jb(D,["size"],function(ha){var M=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ua=parseFloat(mxUtils.getValue(this.state.style,"size",M?v:d));return new mxPoint(ha.x+Math.max(0,Math.min(.5*ha.width,ua*(M?1:ha.width))),ha.getCenterY())},function(ha,M,ua){ha=null!=v&&"0"!=mxUtils.getValue(this.state.style,+"fixedSize","0")?M.x-ha.x:Math.max(0,Math.min(y,(M.x-ha.x)/ha.width));this.state.style.size=ha},!1,q)];n&&mxUtils.getValue(D.style,mxConstants.STYLE_ROUNDED,!1)&&E.push(wb(D));return E}},Ab=function(d,n,y){d=null!=d?d:.5;return function(q){var v=[jb(q,["size"],function(D){var E=null!=y?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ha=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",E?y:n)));return new mxPoint(D.x+Math.min(.75*D.width*d,ha*(E?.75:.75*D.width)),D.y+D.height/4)},function(D,E){D=null!=y&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?E.x-D.x:Math.max(0,Math.min(d,(E.x-D.x)/D.width*.75));this.state.style.size=D},!1,!0)];mxUtils.getValue(q.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(wb(q));return v}},yb=function(){return function(d){var n=[];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n}},wb=function(d,n){return jb(d,[mxConstants.STYLE_ARCSIZE],function(y){var q=null!=n?n:y.height/8;if("1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(y.x+y.width-Math.min(y.width/2,v),y.y+q)}v=Math.max(0,parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(y.x+y.width-Math.min(Math.max(y.width/2,y.height/2),Math.min(y.width,y.height)*v),y.y+q)},function(y,q,v){"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?-this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(y.width,2*(y.x+y.width-q.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(y.width-q.x+y.x)/Math.min(y.width,y.height))))})},jb=function(d,n,y,q,v,D,E){var fa=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);fa.execute=function(va){for(var na=0;na<n.length;na++)this.copyStyle(n[na]);E&&E(va)};fa.getPosition=y;fa.setPosition=q;fa.ignoreGrid=null!=v?v:!0;if(D){var L=fa.positionChanged;-fa.positionChanged=function(){L.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return fa},ib={link:function(d){return[qb(d,!0,10),qb(d,!1,10)]},flexArrow:function(d){var n=d.view.graph.gridSize/d.view.scale,y=[];mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(y.push(nb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(q,v,D,E,fa){q=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;fa=3*mxUtils.getNumber(d.style,-mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(fa+d.shape.strokewidth*d.view.scale)+D*q/2,E.y+D*(fa+d.shape.strokewidth*d.view.scale)-v*q/2)},function(q,v,D,E,fa,L,va){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,L.x,L.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*q)/d.view.scale;if(mxEvent.isShiftDown(va.getEvent())||-mxEvent.isControlDown(va.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<n/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE])})),y.push(nb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(q,v,D,E,fa){q=(d.shape.getStartArrowWidth()-d.shape.strokewidth)*d.view.scale;-fa=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(fa+d.shape.strokewidth*d.view.scale)+D*q/2,E.y+D*(fa+d.shape.strokewidth*d.view.scale)-v*q/2)},function(q,v,D,E,fa,L,va){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,L.x,L.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*q)-d.shape.getEdgeWidth())/-d.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE],d.style.endWidth=d.style.startWidth;mxEvent.isAltDown(va.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<n/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(d.style.startWidth)-parseFloat(d.style.endWidth))<n&&(d.style.startWidth=-d.style.endWidth))})));mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(y.push(nb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(q,v,D,E,fa){q=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;fa=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(fa+d.shape.strokewidth*d.view.scale)-D*q/2,E.y+D*(fa+d.shape.strokewidth*d.view.scale)+v*q/2)},function(q,-v,D,E,fa,L,va){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,L.x,L.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*q)/d.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<-n/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),y.push(nb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(q,v,D,E,fa){q=(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;fa=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(fa+d.shape.strokewidth*d.view.scale)-D*q/2,E.y+D*(fa+d.shape.strokewidth*d.view.scale)+v*q/2)},function(q,v,D,E,fa,L,-va){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,L.x,L.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.endWidth=Math.max(0,Math.round(2*q)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(va.getEvent())||+this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(y.width,2*(y.x+y.width-q.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(y.width-q.x+y.x)/Math.min(y.width,y.height))))})},jb=function(d,n,y,q,v,D,E){var ha=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);ha.execute=function(ua){for(var na=0;na<n.length;na++)this.copyStyle(n[na]);E&&E(ua)};ha.getPosition=y;ha.setPosition=q;ha.ignoreGrid=null!=v?v:!0;if(D){var M=ha.positionChanged;+ha.positionChanged=function(){M.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return ha},ib={link:function(d){return[qb(d,!0,10),qb(d,!1,10)]},flexArrow:function(d){var n=d.view.graph.gridSize/d.view.scale,y=[];mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(y.push(nb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(q,v,D,E,ha){q=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ha=3*mxUtils.getNumber(d.style,+mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(ha+d.shape.strokewidth*d.view.scale)+D*q/2,E.y+D*(ha+d.shape.strokewidth*d.view.scale)-v*q/2)},function(q,v,D,E,ha,M,ua){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,M.x,M.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*q)/d.view.scale;if(mxEvent.isShiftDown(ua.getEvent())||+mxEvent.isControlDown(ua.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(ua.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<n/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE])})),y.push(nb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(q,v,D,E,ha){q=(d.shape.getStartArrowWidth()-d.shape.strokewidth)*d.view.scale;+ha=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(ha+d.shape.strokewidth*d.view.scale)+D*q/2,E.y+D*(ha+d.shape.strokewidth*d.view.scale)-v*q/2)},function(q,v,D,E,ha,M,ua){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,M.x,M.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*q)-d.shape.getEdgeWidth())/+d.view.scale;if(mxEvent.isShiftDown(ua.getEvent())||mxEvent.isControlDown(ua.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE],d.style.endWidth=d.style.startWidth;mxEvent.isAltDown(ua.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<n/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(d.style.startWidth)-parseFloat(d.style.endWidth))<n&&(d.style.startWidth=+d.style.endWidth))})));mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(y.push(nb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(q,v,D,E,ha){q=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ha=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(ha+d.shape.strokewidth*d.view.scale)-D*q/2,E.y+D*(ha+d.shape.strokewidth*d.view.scale)+v*q/2)},function(q,+v,D,E,ha,M,ua){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,M.x,M.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*q)/d.view.scale;if(mxEvent.isShiftDown(ua.getEvent())||mxEvent.isControlDown(ua.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(ua.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<+n/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),y.push(nb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(q,v,D,E,ha){q=(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;ha=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(ha+d.shape.strokewidth*d.view.scale)-D*q/2,E.y+D*(ha+d.shape.strokewidth*d.view.scale)+v*q/2)},function(q,v,D,E,ha,M,+ua){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,M.x,M.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.endWidth=Math.max(0,Math.round(2*q)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(ua.getEvent())||mxEvent.isControlDown(ua.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(ua.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<n/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(d.style.endWidth)-parseFloat(d.style.startWidth))<n&&(d.style.endWidth=d.style.startWidth))})));return y},swimlane:function(d){var n=[];if(mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED)){var y=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));n.push(wb(d,y/2))}n.push(jb(d,[mxConstants.STYLE_STARTSIZE],function(q){var v=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(q.getCenterX(),q.y+Math.max(0,Math.min(q.height,v))):new mxPoint(q.x+Math.max(0,Math.min(q.width,v)),q.getCenterY())},function(q,v){d.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,-Math.min(q.height,v.y-q.y))):Math.round(Math.max(0,Math.min(q.width,v.x-q.x)))},!1,null,function(q){var v=d.view.graph;if(!mxEvent.isShiftDown(q.getEvent())&&!mxEvent.isControlDown(q.getEvent())&&(v.isTableRow(d.cell)||v.isTableCell(d.cell))){q=v.getSwimlaneDirection(d.style);var D=v.model.getParent(d.cell);D=v.model.getChildCells(D,!0);for(var E=[],fa=0;fa<D.length;fa++)D[fa]!=d.cell&&v.isSwimlane(D[fa])&&v.getSwimlaneDirection(v.getCurrentCellStyle(D[fa]))==q&&E.push(D[fa]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,-d.style[mxConstants.STYLE_STARTSIZE],E)}}));return n},label:yb(),ext:yb(),rectangle:yb(),triangle:yb(),rhombus:yb(),umlLifeline:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size))));return new mxPoint(n.getCenterX(),n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},umlFrame:function(d){return[jb(d,["width","height"],function(n){var y=Math.max(aa.prototype.corner,-Math.min(n.width,mxUtils.getValue(this.state.style,"width",aa.prototype.width))),q=Math.max(1.5*aa.prototype.corner,Math.min(n.height,mxUtils.getValue(this.state.style,"height",aa.prototype.height)));return new mxPoint(n.x+y,n.y+q)},function(n,y){this.state.style.width=Math.round(Math.max(aa.prototype.corner,Math.min(n.width,y.x-n.x)));this.state.style.height=Math.round(Math.max(1.5*aa.prototype.corner,Math.min(n.height,y.y-n.y)))},!1)]},process:function(d){var n=[jb(d,["size"],function(y){var q=-"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size));return q?new mxPoint(y.x+v,y.y+y.height/4):new mxPoint(y.x+y.width*v,y.y+y.height/4)},function(y,q){y="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*y.width,q.x-y.x)):Math.max(0,Math.min(.5,(q.x-y.x)/y.width));this.state.style.size=y},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},cross:function(d){return[jb(d,+Math.min(q.height,v.y-q.y))):Math.round(Math.max(0,Math.min(q.width,v.x-q.x)))},!1,null,function(q){var v=d.view.graph;if(!mxEvent.isShiftDown(q.getEvent())&&!mxEvent.isControlDown(q.getEvent())&&(v.isTableRow(d.cell)||v.isTableCell(d.cell))){q=v.getSwimlaneDirection(d.style);var D=v.model.getParent(d.cell);D=v.model.getChildCells(D,!0);for(var E=[],ha=0;ha<D.length;ha++)D[ha]!=d.cell&&v.isSwimlane(D[ha])&&v.getSwimlaneDirection(v.getCurrentCellStyle(D[ha]))==q&&E.push(D[ha]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,+d.style[mxConstants.STYLE_STARTSIZE],E)}}));return n},label:yb(),ext:yb(),rectangle:yb(),triangle:yb(),rhombus:yb(),umlLifeline:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",V.prototype.size))));return new mxPoint(n.getCenterX(),n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},umlFrame:function(d){return[jb(d,["width","height"],function(n){var y=Math.max(ba.prototype.corner,+Math.min(n.width,mxUtils.getValue(this.state.style,"width",ba.prototype.width))),q=Math.max(1.5*ba.prototype.corner,Math.min(n.height,mxUtils.getValue(this.state.style,"height",ba.prototype.height)));return new mxPoint(n.x+y,n.y+q)},function(n,y){this.state.style.width=Math.round(Math.max(ba.prototype.corner,Math.min(n.width,y.x-n.x)));this.state.style.height=Math.round(Math.max(1.5*ba.prototype.corner,Math.min(n.height,y.y-n.y)))},!1)]},process:function(d){var n=[jb(d,["size"],function(y){var q=+"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size));return q?new mxPoint(y.x+v,y.y+y.height/4):new mxPoint(y.x+y.width*v,y.y+y.height/4)},function(y,q){y="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*y.width,q.x-y.x)):Math.max(0,Math.min(.5,(q.x-y.x)/y.width));this.state.style.size=y},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},cross:function(d){return[jb(d,["size"],function(n){var y=Math.min(n.width,n.height);y=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Xa.prototype.size)))*y/2;return new mxPoint(n.getCenterX()-y,n.getCenterY()-y)},function(n,y){var q=Math.min(n.width,n.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,n.getCenterY()-y.y)/q*2,Math.max(0,n.getCenterX()-y.x)/q*2)))})]},note:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",G.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},note2:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,-n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},manualInput:function(d){var n=[jb(d,["size"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",Ma.prototype.size)));return new mxPoint(y.x+y.width/4,y.y+3*q/4)},function(y,q){this.state.style.size=Math.round(Math.max(0,Math.min(y.height,4*(q.y-y.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},dataStorage:function(d){return[jb(d,["size"],function(n){var y="0"!=mxUtils.getValue(this.state.style,-"fixedSize","0"),q=parseFloat(mxUtils.getValue(this.state.style,"size",y?Da.prototype.fixedSize:Da.prototype.size));return new mxPoint(n.x+n.width-q*(y?1:n.width),n.getCenterY())},function(n,y){n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(n.width,n.x+n.width-y.x)):Math.max(0,Math.min(1,(n.x+n.width-y.x)/n.width));this.state.style.size=n},!1)]},callout:function(d){var n=[jb(d,["size","position"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,-"size",ha.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ha.prototype.position)));mxUtils.getValue(this.state.style,"base",ha.prototype.base);return new mxPoint(y.x+v*y.width,y.y+y.height-q)},function(y,q){mxUtils.getValue(this.state.style,"base",ha.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(y.height,y.y+y.height-q.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(q.x-y.x)/y.width)))/100},!1),jb(d,["position2"],function(y){var q=-Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ha.prototype.position2)));return new mxPoint(y.x+q*y.width,y.y+y.height)},function(y,q){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(q.x-y.x)/y.width)))/100},!1),jb(d,["base"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",ha.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ha.prototype.position))),D=Math.max(0,Math.min(y.width,mxUtils.getValue(this.state.style,-"base",ha.prototype.base)));return new mxPoint(y.x+Math.min(y.width,v*y.width+D),y.y+y.height-q)},function(y,q){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ha.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(y.width,q.x-y.x-v*y.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},internalStorage:function(d){var n=[jb(d,["dx","dy"],function(y){var q=Math.max(0,Math.min(y.width,mxUtils.getValue(this.state.style,+n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},manualInput:function(d){var n=[jb(d,["size"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",Ka.prototype.size)));return new mxPoint(y.x+y.width/4,y.y+3*q/4)},function(y,q){this.state.style.size=Math.round(Math.max(0,Math.min(y.height,4*(q.y-y.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},dataStorage:function(d){return[jb(d,["size"],function(n){var y="0"!=mxUtils.getValue(this.state.style,+"fixedSize","0"),q=parseFloat(mxUtils.getValue(this.state.style,"size",y?Ea.prototype.fixedSize:Ea.prototype.size));return new mxPoint(n.x+n.width-q*(y?1:n.width),n.getCenterY())},function(n,y){n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(n.width,n.x+n.width-y.x)):Math.max(0,Math.min(1,(n.x+n.width-y.x)/n.width));this.state.style.size=n},!1)]},callout:function(d){var n=[jb(d,["size","position"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,+"size",ia.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ia.prototype.position)));mxUtils.getValue(this.state.style,"base",ia.prototype.base);return new mxPoint(y.x+v*y.width,y.y+y.height-q)},function(y,q){mxUtils.getValue(this.state.style,"base",ia.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(y.height,y.y+y.height-q.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(q.x-y.x)/y.width)))/100},!1),jb(d,["position2"],function(y){var q=+Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ia.prototype.position2)));return new mxPoint(y.x+q*y.width,y.y+y.height)},function(y,q){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(q.x-y.x)/y.width)))/100},!1),jb(d,["base"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",ia.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ia.prototype.position))),D=Math.max(0,Math.min(y.width,mxUtils.getValue(this.state.style,+"base",ia.prototype.base)));return new mxPoint(y.x+Math.min(y.width,v*y.width+D),y.y+y.height-q)},function(y,q){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ia.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(y.width,q.x-y.x-v*y.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},internalStorage:function(d){var n=[jb(d,["dx","dy"],function(y){var q=Math.max(0,Math.min(y.width,mxUtils.getValue(this.state.style,"dx",Ha.prototype.dx))),v=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"dy",Ha.prototype.dy)));return new mxPoint(y.x+q,y.y+v)},function(y,q){this.state.style.dx=Math.round(Math.max(0,Math.min(y.width,q.x-y.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(y.height,q.y-y.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},module:function(d){return[jb(d,["jettyWidth","jettyHeight"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,-"jettyWidth",wa.prototype.jettyWidth))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"jettyHeight",wa.prototype.jettyHeight)));return new mxPoint(n.x+y/2,n.y+2*q)},function(n,y){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(n.width,y.x-n.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(n.height,y.y-n.y))/2)})]},corner:function(d){return[jb(d,["dx","dy"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,"dx",Aa.prototype.dx))),-q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"dy",Aa.prototype.dy)));return new mxPoint(n.x+y,n.y+q)},function(n,y){this.state.style.dx=Math.round(Math.max(0,Math.min(n.width,y.x-n.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},tee:function(d){return[jb(d,["dx","dy"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));+"jettyWidth",wa.prototype.jettyWidth))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"jettyHeight",wa.prototype.jettyHeight)));return new mxPoint(n.x+y/2,n.y+2*q)},function(n,y){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(n.width,y.x-n.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(n.height,y.y-n.y))/2)})]},corner:function(d){return[jb(d,["dx","dy"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,"dx",Ba.prototype.dx))),+q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"dy",Ba.prototype.dy)));return new mxPoint(n.x+y,n.y+q)},function(n,y){this.state.style.dx=Math.round(Math.max(0,Math.min(n.width,y.x-n.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},tee:function(d){return[jb(d,["dx","dy"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,"dx",$a.prototype.dx))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"dy",$a.prototype.dy)));return new mxPoint(n.x+(n.width+y)/2,n.y+q)},function(n,y){this.state.style.dx=Math.round(Math.max(0,2*Math.min(n.width/2,y.x-n.x-n.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},singleArrow:eb(1),doubleArrow:eb(.5),"mxgraph.arrows2.wedgeArrow":lb(20,20),"mxgraph.arrows2.wedgeArrowDashed":lb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":lb(20,20),folder:function(d){return[jb(d,["tabWidth","tabHeight"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,"tabWidth",t.prototype.tabWidth))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"tabHeight",t.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",t.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(y=n.width-y);return new mxPoint(n.x+y,n.y+q)},function(n,y){var q=Math.max(0,Math.min(n.width,y.x-n.x));mxUtils.getValue(this.state.style,"tabPosition",t.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(q=n.width-q);this.state.style.tabWidth=Math.round(q);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},document:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(n.x+3*n.width/4,n.y+(1-y)*n.height)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(n.y+n.height-y.y)/n.height))},!1)]},tape:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));-return new mxPoint(n.getCenterX(),n.y+y*n.height/2)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(y.y-n.y)/n.height*2))},!1)]},isoCube2:function(d){return[jb(d,["isoAngle"],function(n){var y=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",R.isoAngle))))*Math.PI/200;return new mxPoint(n.x,n.y+Math.min(n.width*Math.tan(y),.5*n.height))},function(n,y){this.state.style.isoAngle=Math.max(0,50*(y.y-n.y)/n.height)},!0)]},cylinder2:tb(c.prototype.size),cylinder3:tb(f.prototype.size),-offPageConnector:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",V.prototype.size))));return new mxPoint(n.getCenterX(),n.y+(1-y)*n.height)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(n.y+n.height-y.y)/n.height))},!1)]},"mxgraph.basic.rect":function(d){var n=[Graph.createHandle(d,["size"],function(y){var q=Math.max(0,Math.min(y.width/2,y.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));+return new mxPoint(n.getCenterX(),n.y+y*n.height/2)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(y.y-n.y)/n.height*2))},!1)]},isoCube2:function(d){return[jb(d,["isoAngle"],function(n){var y=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",Q.isoAngle))))*Math.PI/200;return new mxPoint(n.x,n.y+Math.min(n.width*Math.tan(y),.5*n.height))},function(n,y){this.state.style.isoAngle=Math.max(0,50*(y.y-n.y)/n.height)},!0)]},cylinder2:tb(c.prototype.size),cylinder3:tb(f.prototype.size),+offPageConnector:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));return new mxPoint(n.getCenterX(),n.y+(1-y)*n.height)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(n.y+n.height-y.y)/n.height))},!1)]},"mxgraph.basic.rect":function(d){var n=[Graph.createHandle(d,["size"],function(y){var q=Math.max(0,Math.min(y.width/2,y.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(y.x+q,y.y+q)},function(y,q){this.state.style.size=Math.round(100*Math.max(0,Math.min(y.height/2,y.width/2,q.x-y.x)))/100})];d=Graph.createHandle(d,["indent"],function(y){var q=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(y.x+.75*y.width,y.y+q*y.height/200)},function(y,q){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(q.y-y.y)/y.height)))/100});n.push(d);return n},step:ub(la.prototype.size,!0,null,-!0,la.prototype.fixedSize),hexagon:ub(Y.prototype.size,!0,.5,!0,Y.prototype.fixedSize),curlyBracket:ub(da.prototype.size,!1),display:ub(ab.prototype.size,!1),cube:ob(1,m.prototype.size,!1),card:ob(.5,C.prototype.size,!0),loopLimit:ob(.5,Q.prototype.size,!0),trapezoid:Ab(.5,J.prototype.size,J.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=jb;Graph.handleFactory=ib;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=+!0,la.prototype.fixedSize),hexagon:ub(Y.prototype.size,!0,.5,!0,Y.prototype.fixedSize),curlyBracket:ub(da.prototype.size,!1),display:ub(ab.prototype.size,!1),cube:ob(1,m.prototype.size,!1),card:ob(.5,C.prototype.size,!0),loopLimit:ob(.5,R.prototype.size,!0),trapezoid:Ab(.5,J.prototype.size,J.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=jb;Graph.handleFactory=ib;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=Bb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var n=this.state.style.shape;null==mxCellRenderer.defaultShapes[n]&&null==mxStencilRegistry.getStencil(n)?n=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(n=mxConstants.SHAPE_SWIMLANE);n=ib[n];null==n&&null!=this.state.shape&&this.state.shape.isRoundable()&&(n=ib[mxConstants.SHAPE_RECTANGLE]);null!=n&&(n=n(this.state),null!=n&&(d=null==d?n:d.concat(n)))}return d};mxEdgeHandler.prototype.createCustomHandles=function(){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_CONNECTOR);d=ib[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var sb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);sb=mxUtils.getRotatedPoint(sb,Math.cos(zb),Math.sin(zb));var rb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(rb),Math.sin(rb));mxEdgeStyle.IsometricConnector=function(d,-n,y,q,v){var D=d.view;q=null!=q&&0<q.length?q[0]:null;var E=d.absolutePoints,fa=E[0];E=E[E.length-1];null!=q&&(q=D.transformControlPoint(d,q));null==fa&&null!=n&&(fa=new mxPoint(n.getCenterX(),n.getCenterY()));null==E&&null!=y&&(E=new mxPoint(y.getCenterX(),y.getCenterY()));var L=sb.x,va=sb.y,na=xb.x,Va=xb.y,fb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=E&&null!=fa){d=function(Ga,Ka,Ja){Ga-=bb.x;var Ia=Ka-bb.y;Ka=(Va*Ga-na*Ia)/(L*Va-va*na);Ga=(va*Ga-L*Ia)/(va*na-L*Va);fb?-(Ja&&(bb=new mxPoint(bb.x+L*Ka,bb.y+va*Ka),v.push(bb)),bb=new mxPoint(bb.x+na*Ga,bb.y+Va*Ga)):(Ja&&(bb=new mxPoint(bb.x+na*Ga,bb.y+Va*Ga),v.push(bb)),bb=new mxPoint(bb.x+L*Ka,bb.y+va*Ka));v.push(bb)};var bb=fa;null==q&&(q=new mxPoint(fa.x+(E.x-fa.x)/2,fa.y+(E.y-fa.y)/2));d(q.x,q.y,!0);d(E.x,E.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Cb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,n){if(n==mxEdgeStyle.IsometricConnector){var y=+n,y,q,v){var D=d.view;q=null!=q&&0<q.length?q[0]:null;var E=d.absolutePoints,ha=E[0];E=E[E.length-1];null!=q&&(q=D.transformControlPoint(d,q));null==ha&&null!=n&&(ha=new mxPoint(n.getCenterX(),n.getCenterY()));null==E&&null!=y&&(E=new mxPoint(y.getCenterX(),y.getCenterY()));var M=sb.x,ua=sb.y,na=xb.x,Va=xb.y,fb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=E&&null!=ha){d=function(Ga,La,Ja){Ga-=bb.x;var Ia=La-bb.y;La=(Va*Ga-na*Ia)/(M*Va-ua*na);Ga=(ua*Ga-M*Ia)/(ua*na-M*Va);fb?+(Ja&&(bb=new mxPoint(bb.x+M*La,bb.y+ua*La),v.push(bb)),bb=new mxPoint(bb.x+na*Ga,bb.y+Va*Ga)):(Ja&&(bb=new mxPoint(bb.x+na*Ga,bb.y+Va*Ga),v.push(bb)),bb=new mxPoint(bb.x+M*La,bb.y+ua*La));v.push(bb)};var bb=ha;null==q&&(q=new mxPoint(ha.x+(E.x-ha.x)/2,ha.y+(E.y-ha.y)/2));d(q.x,q.y,!0);d(E.x,E.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Cb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,n){if(n==mxEdgeStyle.IsometricConnector){var y=new mxElbowEdgeHandler(d);y.snapToTerminals=!1;return y}return Cb.apply(this,arguments)};B.prototype.constraints=[];H.prototype.getConstraints=function(d,n,y){d=[];var q=Math.tan(mxUtils.toRadians(30)),v=(.5-q)/2;q=Math.min(n,y/(.5+q));n=(n-q)/2;y=(y-q)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y+.25*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n+.5*q,y+q*v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n+q,y+.25*q));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,n+q,y+.75*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n+.5*q,y+(1-v)*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y+.75*q));return d};R.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;q=Math.min(n*Math.tan(q),.5*y);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(1,-.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y-q));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));return d};ha.prototype.getConstraints=function(d,n,y){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var q=Math.max(0,Math.min(y,parseFloat(mxUtils.getValue(this.style,+0),!1,null,n+q,y+.75*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n+.5*q,y+(1-v)*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y+.75*q));return d};Q.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;q=Math.min(n*Math.tan(q),.5*y);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(1,+.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y-q));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));return d};ia.prototype.getConstraints=function(d,n,y){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var q=Math.max(0,Math.min(y,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(y-q)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(y-q)));n>=2*q&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};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),@@ -2973,69 +2973,69 @@ function(d,n,y){d=[];var q=Math.max(0,Math.min(n,Math.min(y,parseFloat(mxUtils.g"tabPosition",this.tabPosition)?(d.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,v)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),v))):(d.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-.5*q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,v)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.25*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.75*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y));d.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,-1),!1));return d};Ha.prototype.constraints=mxRectangleShape.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;oa.prototype.constraints=mxEllipse.prototype.constraints;Na.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxRectangleShape.prototype.constraints;Wa.prototype.constraints=mxRectangleShape.prototype.constraints;+1),!1));return d};Ha.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.constraints=mxRectangleShape.prototype.constraints;ja.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;oa.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxEllipse.prototype.constraints;Ka.prototype.constraints=mxRectangleShape.prototype.constraints;Wa.prototype.constraints=mxRectangleShape.prototype.constraints;ab.prototype.getConstraints=function(d,n,y){d=[];var q=Math.min(n,y/2),v=Math.min(n-q,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+n-q),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+n-q),y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));return d};wa.prototype.getConstraints=function(d,n,y){n=parseFloat(mxUtils.getValue(d,"jettyWidth",wa.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",wa.prototype.jettyHeight));var q=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,n),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,n),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(y-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(y-.5*d,3.5*d))];y>5*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,n));y>8*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,n));y>15*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,n));return q};Q.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;+!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(y-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(y-.5*d,3.5*d))];y>5*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,n));y>8*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,n));y>15*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,n));return q};R.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];A.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)];Ba.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,+.5),!1)];Aa.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)];l.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)];F.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)];la.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)];ja.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=+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)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];K.prototype.constraints=mxRectangleShape.prototype.constraints;J.prototype.constraints=mxRectangleShape.prototype.constraints;N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),-!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Za.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(y,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,+!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;$a.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(y,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*n+.25*q,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),.5*(y+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),y));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,.5*(n-q),y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),.5*(y+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*n-.25*q,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return d};Aa.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,+0),!1,null,.5*(n-q),y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),.5*(y+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*n-.25*q,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return d};Ba.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(y,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),v));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,q,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,.5*(y+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*q,y));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return d};Ra.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,-1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];La.prototype.getConstraints=function(d,n,y){d=[];var q=y*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,+0),!1,null,q,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,.5*(y+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*q,y));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return d};Pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,+1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Na.prototype.getConstraints=function(d,n,y){d=[];var q=y*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));q=(y-q)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-v),q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-v,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-v),y-q));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,0,y-q));return d};$a.prototype.getConstraints=function(d,n,y){d=[];var q=y*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",La.prototype.arrowWidth)))),v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",La.prototype.arrowSize))));q=(y-q)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,q));d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,0,y-q));return d};Ya.prototype.getConstraints=function(d,n,y){d=[];var q=y*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth)))),v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));q=(y-q)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-v,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));return d};Xa.prototype.getConstraints=function(d,n,y){d=[];var q=Math.min(y,n),v=Math.max(0,Math.min(q,q*parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=(y-v)/2;var D=q+v,E=(n-v)/2;v=E+v;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,0));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,y-.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,y));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y-.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+v),q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,D));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,.5*(n+v),D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,q));return d};X.prototype.constraints=-null;x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,+0),!1,null,.5*(n+v),D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,q));return d};V.prototype.constraints=+null;x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}-Actions.prototype.init=function(){function b(G){p.escape();G=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),G);null!=G&&p.setSelectionCells(G)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),P=0;P<G.length;P++)p.cellLabelChanged(G[P],"")}finally{p.getModel().endUpdate()}}}function g(G,P,R,c,f){f.getModel().beginUpdate();try{var l=f.getCellGeometry(G);null!=l&&R&&c&&(R/=c,l=l.clone(),1<R?l.height=l.width/R:l.width=l.height*R,f.getModel().setGeometry(G,+Actions.prototype.init=function(){function b(G){p.escape();G=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),G);null!=G&&p.setSelectionCells(G)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),P=0;P<G.length;P++)p.cellLabelChanged(G[P],"")}finally{p.getModel().endUpdate()}}}function g(G,P,Q,c,f){f.getModel().beginUpdate();try{var l=f.getCellGeometry(G);null!=l&&Q&&c&&(Q/=c,l=l.clone(),1<Q?l.height=l.width/Q:l.width=l.height*Q,f.getModel().setGeometry(G,l));f.setCellStyles(mxConstants.STYLE_CLIP_PATH,P,[G]);f.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[G])}finally{f.getModel().endUpdate()}}var m=this.editorUi,u=m.editor,p=u.graph,B=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.put("smartFit",new Action(mxResources.get("fitWindow")+" / "+mxResources.get("resetView"),-function(){p.popupMenuHandler.hideMenu();var G=p.view.scale,P=p.container.scrollLeft,R=p.container.scrollTop,c=p.view.translate.x,f=p.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(G-p.view.scale)&&5>Math.abs(P-p.container.scrollLeft)&&5>Math.abs(R-p.container.scrollTop)&&c==p.view.translate.x&&f==p.view.translate.y&&m.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){p.isSelectionEmpty()?m.actions.get("smartFit").funct():p.isEnabled()&&-p.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){m.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(G,P){try{var R=mxUtils.parseXml(G);u.graph.setSelectionCells(u.graph.importGraphModel(R.documentElement))}catch(c){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+c.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=+function(){p.popupMenuHandler.hideMenu();var G=p.view.scale,P=p.container.scrollLeft,Q=p.container.scrollTop,c=p.view.translate.x,f=p.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(G-p.view.scale)&&5>Math.abs(P-p.container.scrollLeft)&&5>Math.abs(Q-p.container.scrollTop)&&c==p.view.translate.x&&f==p.view.translate.y&&m.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){p.isSelectionEmpty()?m.actions.get("smartFit").funct():p.isEnabled()&&+p.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){m.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(G,P){try{var Q=mxUtils.parseXml(G);u.graph.setSelectionCells(u.graph.importGraphModel(Q.documentElement))}catch(c){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+c.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=B;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=B;this.addAction("saveAs...",function(){m.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S");this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var G=new EditDiagramDialog(m);m.showDialog(G.container,620,420,!0,!1);G.init()}).isEnabled=B;this.addAction("pageSetup...",function(){m.showDialog((new PageSetupDialog(m)).container,320,240,!0,!0)}).isEnabled=B;this.addAction("print...",function(){m.showPrintDialog()},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){m.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){m.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var G=null;try{G=m.copyXml(),null!=G&&p.removeCells(G,!1)}catch(P){}try{null==G&&mxClipboard.cut(p)}catch(P){m.handleError(P)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(G){}try{mxClipboard.copy(p)}catch(G){m.handleError(G)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(P){if(null!=P){p.getModel().beginUpdate();try{m.pasteXml(P,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),G=!0)}catch(P){}G||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(G){function P(c){if(null!=c){for(var f=!0,l=0;l<c.length&&f;l++)f=f&&p.model.isEdge(c[l]);var t=p.view.translate;l=p.view.scale;var z=t.x,C=t.y;t=null;if(1==c.length&&f){var F=p.getCellGeometry(c[0]);null!=F&&(t=F.getTerminalPoint(!0))}t=null!=t?t:p.getBoundingBoxFromGeometry(c,f);null!=t&&(f=Math.round(p.snap(p.popupMenuHandler.triggerX/l-z)),l=Math.round(p.snap(p.popupMenuHandler.triggerY/-l-C)),p.cellsMoved(c,f-t.x,l-t.y))}}function R(){p.getModel().beginUpdate();try{P(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){G=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(c){if(null!=c){p.getModel().beginUpdate();try{P(m.pasteXml(c,!0))}finally{p.getModel().endUpdate()}}else R()}),G=!0)}catch(c){}G||R()}});this.addAction("swap",function(){var G=p.getSelectionCells();2==G.length&&p.swapShapes(G[0],-G[1])});this.addAction("copySize",function(){var G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.getModel().isVertex(G)&&(G=p.getCellGeometry(G),null!=G&&(m.copiedSize=new mxRectangle(G.x,G.y,G.width,G.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var G=p.getResizableCells(p.getSelectionCells()),P=0;P<G.length;P++)if(p.getModel().isVertex(G[P])){var R=p.getCellGeometry(G[P]);-null!=R&&(R=R.clone(),R.width=m.copiedSize.width,R.height=m.copiedSize.height,p.getModel().setGeometry(G[P],R))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var G=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&null!=G&&(G=G.cloneValue(),null==G||isNaN(G.nodeType)||(m.copiedValue=G))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G)try{p.isHtmlLabel(G)?m.writeHtmlToClipboard(p.getLabel(G),-mxUtils.bind(this,function(P){m.handleError(P)})):m.writeTextToClipboard(p.getLabel(G),mxUtils.bind(this,function(P){m.handleError(P)}))}catch(P){m.handleError(P)}});this.addAction("pasteData",function(G,P){function R(l,t){var z=c.getValue(l);t=l.cloneValue(t);t.removeAttribute("placeholders");null==z||isNaN(z.nodeType)||t.setAttribute("placeholders",z.getAttribute("placeholders"));null!=G&&mxEvent.isShiftDown(G)||t.setAttribute("label",p.convertValueToString(l));c.setValue(l,t)}G=null!=P?P:G;var c=-p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){c.beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());if(0==f.length)R(c.getRoot(),m.copiedValue);else for(P=0;P<f.length;P++)R(f[P],m.copiedValue)}finally{c.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(G,P){G=null!=P?P:G;null!=G&&mxEvent.isShiftDown(G)?e():b(null!=G&&(mxEvent.isControlDown(G)||mxEvent.isMetaDown(G)||mxEvent.isAltDown(G)))},null,null,"Delete");this.addAction("deleteAll",+l-C)),p.cellsMoved(c,f-t.x,l-t.y))}}function Q(){p.getModel().beginUpdate();try{P(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){G=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(c){if(null!=c){p.getModel().beginUpdate();try{P(m.pasteXml(c,!0))}finally{p.getModel().endUpdate()}}else Q()}),G=!0)}catch(c){}G||Q()}});this.addAction("swap",function(){var G=p.getSelectionCells();2==G.length&&p.swapShapes(G[0],+G[1])});this.addAction("copySize",function(){var G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.getModel().isVertex(G)&&(G=p.getCellGeometry(G),null!=G&&(m.copiedSize=new mxRectangle(G.x,G.y,G.width,G.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var G=p.getResizableCells(p.getSelectionCells()),P=0;P<G.length;P++)if(p.getModel().isVertex(G[P])){var Q=p.getCellGeometry(G[P]);+null!=Q&&(Q=Q.clone(),Q.width=m.copiedSize.width,Q.height=m.copiedSize.height,p.getModel().setGeometry(G[P],Q))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var G=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&null!=G&&(G=G.cloneValue(),null==G||isNaN(G.nodeType)||(m.copiedValue=G))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G)try{p.isHtmlLabel(G)?m.writeHtmlToClipboard(p.getLabel(G),+mxUtils.bind(this,function(P){m.handleError(P)})):m.writeTextToClipboard(p.getLabel(G),mxUtils.bind(this,function(P){m.handleError(P)}))}catch(P){m.handleError(P)}});this.addAction("pasteData",function(G,P){function Q(l,t){var z=c.getValue(l);t=l.cloneValue(t);t.removeAttribute("placeholders");null==z||isNaN(z.nodeType)||t.setAttribute("placeholders",z.getAttribute("placeholders"));null!=G&&mxEvent.isShiftDown(G)||t.setAttribute("label",p.convertValueToString(l));c.setValue(l,t)}G=null!=P?P:G;var c=+p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){c.beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());if(0==f.length)Q(c.getRoot(),m.copiedValue);else for(P=0;P<f.length;P++)Q(f[P],m.copiedValue)}finally{c.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(G,P){G=null!=P?P:G;null!=G&&mxEvent.isShiftDown(G)?e():b(null!=G&&(mxEvent.isControlDown(G)||mxEvent.isMetaDown(G)||mxEvent.isAltDown(G)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(G){m.handleError(G)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var G=m.getSelectionState();if(null!=G.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",G.rowspan,[G.mergeCell]),p.setCellStyles("colspan",G.colspan,[G.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",new Action(mxResources.get("unmerge"),function(){var G=m.getSelectionState();if(0<G.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,G.cells),p.setCellStyles("colspan",null,G.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(G,P){G=null!=P?P:G;p.turnShapes(p.getResizableCells(p.getSelectionCells()),null!=G?mxEvent.isShiftDown(G):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(G){G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.addSelectionCells(p.getEdges(G))}));this.addAction("selectVertices",function(){p.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){p.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){p.selectAll(null,-!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),P=p.getCurrentCellStyle(p.getSelectionCell()),R=1==mxUtils.getValue(P,mxConstants.STYLE_EDITABLE,1)?0:1;p.setCellStyles(mxConstants.STYLE_MOVABLE,R,G);p.setCellStyles(mxConstants.STYLE_RESIZABLE,R,G);p.setCellStyles(mxConstants.STYLE_ROTATABLE,R,-G);p.setCellStyles(mxConstants.STYLE_DELETABLE,R,G);p.setCellStyles(mxConstants.STYLE_EDITABLE,R,G);p.setCellStyles("locked",1==R?0:1,G);p.setCellStyles("connectable",R,G)}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("explore",function(){p.model.isVertex(p.getSelectionCell())&&Graph.exploreFromCell(m.editor.graph,m.editor.graph.getSelectionCell())});this.addAction("home",function(){p.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){p.exitGroup()},+!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),P=p.getCurrentCellStyle(p.getSelectionCell()),Q=1==mxUtils.getValue(P,mxConstants.STYLE_EDITABLE,1)?0:1;p.setCellStyles(mxConstants.STYLE_MOVABLE,Q,G);p.setCellStyles(mxConstants.STYLE_RESIZABLE,Q,G);p.setCellStyles(mxConstants.STYLE_ROTATABLE,Q,+G);p.setCellStyles(mxConstants.STYLE_DELETABLE,Q,G);p.setCellStyles(mxConstants.STYLE_EDITABLE,Q,G);p.setCellStyles("locked",1==Q?0:1,G);p.setCellStyles("connectable",Q,G)}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("explore",function(){p.model.isVertex(p.getSelectionCell())&&Graph.exploreFromCell(m.editor.graph,m.editor.graph.getSelectionCell())});this.addAction("home",function(){p.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){p.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){p.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){p.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){p.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){p.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){p.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(G){p.orderCells(!1,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+F");this.addAction("sendBackward",function(G){p.orderCells(!0,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+B");this.addAction("group",function(){if(p.isEnabled()){var G=mxUtils.sortCells(p.getSelectionCells(),!0);1!=G.length||p.isTable(G[0])||p.isTableRow(G[0])?(G=p.getCellsForGroup(G),1<G.length&&p.setSelectionCell(p.groupCells(null,0,G))):p.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",-function(){if(p.isEnabled()){var G=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var P=p.ungroupCells();if(null!=G)for(var R=0;R<G.length;R++)p.model.contains(G[R])&&(0==p.model.getChildCount(G[R])&&p.model.isVertex(G[R])&&p.setCellStyles("container","0",[G[R]]),P.push(G[R]))}finally{p.model.endUpdate()}0<P.length&&p.setSelectionCells(P)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var G=p.getSelectionCells();if(null!=G){for(var P=-[],R=0;R<G.length;R++)p.isTableRow(G[R])||p.isTableCell(G[R])||P.push(G[R]);p.removeCellsFromParent(P);0<P.length&&p.scrollCellToVisible(P[0])}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var G=p.getSelectionCell()||p.getModel().getRoot();m.showDataDialog(G)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var P=-"";if(mxUtils.isNode(G.value)){var R=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&G.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R=G.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==R&&(R=G.value.getAttribute("tooltip"));null!=R&&(P=R)}P=new TextareaDialog(m,mxResources.get("editTooltip")+":",P,function(c){p.setTooltipForCell(G,c)});m.showDialog(P.container,320,200,!0,!0);P.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var G=p.getLinkForCell(p.getSelectionCell());-null!=G&&p.openLink(G)});this.addAction("editLink...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var P=p.getLinkForCell(G,!0)||"";m.showLinkDialog(P,mxResources.get("ok"),function(R,c,f){p.getModel().beginUpdate();try{p.setLinkForCell(G,0<R.length?R:null),p.setAttributeForCell(G,"linkTarget",f)}finally{p.getModel().endUpdate()}},!0,p.getLinkTargetForCell(G))}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&-!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=B;this.addAction("editImage...",function(){m.actions.get("image").funct()});this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("ok"),function(G,P,R){G=mxUtils.trim(G);if(0<G.length){var c=null,f=p.getLinkTitle(G);null!=P&&0<P.length&&(c=P[0].iconUrl,f=P[0].name||P[0].type,f=f.charAt(0).toUpperCase()+-f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));P=new mxCell(f,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c:"spacing=10;"));P.vertex=!0;c=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([P],!0));P.geometry.x=c.x;P.geometry.y=c.y;p.setAttributeForCell(P,"linkTarget",R);p.setLinkForCell(P,G);p.cellSizeUpdated(P,!0);p.getModel().beginUpdate();try{P=p.addCell(P),-p.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{p.getModel().endUpdate()}p.setSelectionCell(P);p.scrollCellToVisible(p.getSelectionCell())}},!0)},null,null,"L")).isEnabled=B;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var G=p.getSelectedElement(),P=p.getParentByName(G,"A",p.cellEditor.textarea),R="";if(null==P&&null!=G&&null!=G.getElementsByTagName)for(var c=G.getElementsByTagName("a"),f=0;f<c.length&&null==P;f++)c[f].textContent==-G.textContent&&(P=c[f]);null!=P&&"A"==P.nodeName&&(R=P.getAttribute("href")||"",p.selectNode(P));var l=p.cellEditor.saveSelection();m.showLinkDialog(R,mxResources.get("ok"),mxUtils.bind(this,function(t){p.cellEditor.restoreSelection(l);null!=t&&p.insertLink(t)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=B;this.addAction("autosize",function(){var G=p.getSelectionCells();if(null!=G){p.getModel().beginUpdate();try{for(var P=0;P<G.length;P++){var R=-G[P];p.getModel().isVertex(R)&&(0<p.getModel().getChildCount(R)?p.updateGroupBounds([R],0,!0):p.updateCellSize(R))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var G=p.getCommonStyle(p.getSelectionCells());G="1"==mxUtils.getValue(G,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var P=p.getEditableCells(p.getSelectionCells()),-R=0;R<P.length;R++)if(state=p.getView().getState(P[R]),null!=state){var c=mxUtils.getValue(state.style,"html","0");if("1"==c&&null==G)p.removeTextStyleForCell(state.cell),p.setCellStyles("html",G,[P[R]]);else if("0"==c&&"1"==G){var f=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>"));p.cellLabelChanged(state.cell,Graph.sanitizeHtml(f));p.setCellStyles("html",G,[P[R]])}}m.fireEvent(new mxEventObject("styleChanged",+function(){if(p.isEnabled()){var G=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var P=p.ungroupCells();if(null!=G)for(var Q=0;Q<G.length;Q++)p.model.contains(G[Q])&&(0==p.model.getChildCount(G[Q])&&p.model.isVertex(G[Q])&&p.setCellStyles("container","0",[G[Q]]),P.push(G[Q]))}finally{p.model.endUpdate()}0<P.length&&p.setSelectionCells(P)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var G=p.getSelectionCells();if(null!=G){for(var P=+[],Q=0;Q<G.length;Q++)p.isTableRow(G[Q])||p.isTableCell(G[Q])||P.push(G[Q]);p.removeCellsFromParent(P);0<P.length&&p.scrollCellToVisible(P[0])}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var G=p.getSelectionCell()||p.getModel().getRoot();m.showDataDialog(G)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var P=+"";if(mxUtils.isNode(G.value)){var Q=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&G.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(Q=G.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==Q&&(Q=G.value.getAttribute("tooltip"));null!=Q&&(P=Q)}P=new TextareaDialog(m,mxResources.get("editTooltip")+":",P,function(c){p.setTooltipForCell(G,c)});m.showDialog(P.container,320,200,!0,!0);P.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var G=p.getLinkForCell(p.getSelectionCell());+null!=G&&p.openLink(G)});this.addAction("editLink...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var P=p.getLinkForCell(G,!0)||"";m.showLinkDialog(P,mxResources.get("ok"),function(Q,c,f){p.getModel().beginUpdate();try{p.setLinkForCell(G,0<Q.length?Q:null),p.setAttributeForCell(G,"linkTarget",f)}finally{p.getModel().endUpdate()}},!0,p.getLinkTargetForCell(G))}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&+!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=B;this.addAction("editImage...",function(){m.actions.get("image").funct()});this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("ok"),function(G,P,Q){G=mxUtils.trim(G);if(0<G.length){var c=null,f=p.getLinkTitle(G);null!=P&&0<P.length&&(c=P[0].iconUrl,f=P[0].name||P[0].type,f=f.charAt(0).toUpperCase()++f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));P=new mxCell(f,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c:"spacing=10;"));P.vertex=!0;c=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([P],!0));P.geometry.x=c.x;P.geometry.y=c.y;p.setAttributeForCell(P,"linkTarget",Q);p.setLinkForCell(P,G);p.cellSizeUpdated(P,!0);p.getModel().beginUpdate();try{P=p.addCell(P),+p.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{p.getModel().endUpdate()}p.setSelectionCell(P);p.scrollCellToVisible(p.getSelectionCell())}},!0)},null,null,"L")).isEnabled=B;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var G=p.getSelectedElement(),P=p.getParentByName(G,"A",p.cellEditor.textarea),Q="";if(null==P&&null!=G&&null!=G.getElementsByTagName)for(var c=G.getElementsByTagName("a"),f=0;f<c.length&&null==P;f++)c[f].textContent==+G.textContent&&(P=c[f]);null!=P&&"A"==P.nodeName&&(Q=P.getAttribute("href")||"",p.selectNode(P));var l=p.cellEditor.saveSelection();m.showLinkDialog(Q,mxResources.get("ok"),mxUtils.bind(this,function(t){p.cellEditor.restoreSelection(l);null!=t&&p.insertLink(t)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=B;this.addAction("autosize",function(){var G=p.getSelectionCells();if(null!=G){p.getModel().beginUpdate();try{for(var P=0;P<G.length;P++){var Q=+G[P];p.getModel().isVertex(Q)&&(0<p.getModel().getChildCount(Q)?p.updateGroupBounds([Q],0,!0):p.updateCellSize(Q))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var G=p.getCommonStyle(p.getSelectionCells());G="1"==mxUtils.getValue(G,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var P=p.getEditableCells(p.getSelectionCells()),+Q=0;Q<P.length;Q++)if(state=p.getView().getState(P[Q]),null!=state){var c=mxUtils.getValue(state.style,"html","0");if("1"==c&&null==G)p.removeTextStyleForCell(state.cell),p.setCellStyles("html",G,[P[Q]]);else if("0"==c&&"1"==G){var f=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>"));p.cellLabelChanged(state.cell,Graph.sanitizeHtml(f));p.setCellStyles("html",G,[P[Q]])}}m.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=G?G:"0"],"cells",P))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var G=p.getView().getState(p.getSelectionCell()),P="wrap";p.stopEditing();null!=G&&"wrap"==G.style[mxConstants.STYLE_WHITE_SPACE]&&(P=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,P)});this.addAction("rotation",function(){var G="0",P=p.getView().getState(p.getSelectionCell());null!=P&&(G=P.style[mxConstants.STYLE_ROTATION]||G);G=new FilenameDialog(m,G,mxResources.get("apply"),-function(R){null!=R&&0<R.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,R)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(G.container,375,80,!0,!0);G.init()});this.addAction("resetView",function(){p.zoomTo(1);m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(G){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(G){p.isFastZoomEnabled()?+function(Q){null!=Q&&0<Q.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,Q)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(G.container,375,80,!0,!0);G.init()});this.addAction("resetView",function(){p.zoomTo(1);m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(G){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(G){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,m.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - / Alt+Mousewheel");this.addAction("fitWindow",function(){p.pageVisible&&p.isSelectionEmpty()?p.fitPages():m.fitDiagramToWindow()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(1):this.get("pageView").funct()}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(2):this.get("pageView").funct()}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(1,!0):this.get("pageView").funct()}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(P){P=parseInt(P);!isNaN(P)&&0<P&&p.zoomTo(P/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(G.container,300,80,!0,!0);G.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(P){P=parseInt(P);!isNaN(P)&&0<P&&(P=new ChangePageSetup(m,null,null,null,P/100),P.ignoreColor=!0,P.ignoreImage=!0,p.model.execute(P))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(G.container,300,80,!0,!0);G.init()}));var H=null;H=this.addAction("grid",@@ -3044,7 +3044,7 @@ H.setEnabled(!1);H=this.addAction("animations",function(){Editor.enableAnimationH=this.addAction("collapseExpand",function(){var G=new ChangePageSetup(m);G.ignoreColor=!0;G.ignoreImage=!0;G.foldingEnabled=!p.foldingEnabled;p.model.execute(G)});H.setToggleAction(!0);H.setSelectedCallback(function(){return p.foldingEnabled});H.isEnabled=B;H=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));H.setToggleAction(!0);H.setSelectedCallback(function(){return p.pageVisible});H=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");H.setToggleAction(!0);H.setSelectedCallback(function(){return p.connectionArrowsEnabled});H=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+O");H.setToggleAction(!0);H.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});H=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());m.fireEvent(new mxEventObject("copyConnectChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});H.isEnabled=B;H=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});H.setToggleAction(!0);H.setSelectedCallback(function(){return m.editor.autosave});H.isEnabled=B;H.visible=!1;this.addAction("help",function(){var G="";mxResources.isLanguageSupported(mxClient.language)&&-(G="_"+mxClient.language);p.openLink(RESOURCES_PATH+"/help"+G+".html")});var T=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){T||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){T=!1}),T=!0)}));H=mxUtils.bind(this,function(G,P,R,c){return this.addAction(G,function(){if(null!=R&&p.cellEditor.isContentEditing())R();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,+(G="_"+mxClient.language);p.openLink(RESOURCES_PATH+"/help"+G+".html")});var S=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){S||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){S=!1}),S=!0)}));H=mxUtils.bind(this,function(G,P,Q,c){return this.addAction(G,function(){if(null!=Q&&p.cellEditor.isContentEditing())Q();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,P,f);(P&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?p.updateLabelElements(f,function(t){t.style.fontWeight=null;"B"==t.nodeName&&p.replaceElement(t)}):(P&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(f,function(t){t.style.fontStyle=null;"I"==t.nodeName&&p.replaceElement(t)}):(P&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(f,function(t){t.style.textDecoration=null;"U"==t.nodeName&&p.replaceElement(t)});for(var l=0;l<f.length;l++)0==p.model.getChildCount(f[l])&&p.autoSizeCell(f[l],!1)}finally{p.getModel().endUpdate()}}},null,null,c)});H("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");H("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");H("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000","default",p.shapeForegroundColor)});this.addAction("strokeColor...",function(){m.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",p.shapeForegroundColor)});this.addAction("fillColor...",function(){m.menus.pickColor(mxConstants.STYLE_FILLCOLOR,null,null,"default",p.shapeBackgroundColor)});this.addAction("gradientColor...",function(){m.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR,null,null,"default",p.shapeForegroundColor)});this.addAction("backgroundColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,@@ -3053,19 +3053,19 @@ p.autoSizeCell(f[l],!1)}finally{p.getModel().endUpdate()}}},null,null,c)});H("botry{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dotted",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("sharp",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!p.isSelectionEmpty()&&p.isEnabled()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),P=p.getCurrentCellStyle(G[0]),-R="1"==mxUtils.getValue(P,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,R);p.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[R,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,+Q="1"==mxUtils.getValue(P,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,Q);p.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[Q,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,"1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var G=p.view.getState(p.getSelectionCell()),P="1";null!=G&&null!=p.getFoldingImage(G)&&(P="0");p.setCellStyles("collapsible",P);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[P],"cells",p.getSelectionCells()))});this.addAction("editStyle...",-mxUtils.bind(this,function(){var G=p.getEditableCells(p.getSelectionCells());if(null!=G&&0<G.length){var P=p.getModel();P=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",P.getStyle(G[0])||"",function(R){null!=R&&p.setCellStyle(mxUtils.trim(R),G)},null,null,400,220);this.editorUi.showDialog(P.container,420,300,!0,!0);P.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())},-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var G=p.getSelectionCell();if(null!=G&&p.getModel().isEdge(G)){var P=u.graph.selectionCellsHandler.getHandler(G);if(P instanceof mxEdgeHandler){var R=p.view.translate,c=p.view.scale,f=R.x;R=R.y;G=p.getModel().getParent(G);for(var l=p.getCellGeometry(G);p.getModel().isVertex(G)&&null!=l;)f+=l.x,R+=l.y,G=-p.getModel().getParent(G),l=p.getCellGeometry(G);f=Math.round(p.snap(p.popupMenuHandler.triggerX/c-f));c=Math.round(p.snap(p.popupMenuHandler.triggerY/c-R));P.addPointAt(P.state,f,c)}}});this.addAction("removeWaypoint",function(){var G=m.actions.get("removeWaypoint");null!=G.handler&&G.handler.removePoint(G.handler.state,G.index)});this.addAction("clearAnchors",function(){var G=p.getSelectionCells();if(null!=G){G=p.getEditableCells(p.addAllEdges(G));p.getModel().beginUpdate();try{for(var P=0;P<G.length;P++){var R=-G[P];p.getModel().isEdge(R)&&(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[R]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[R]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{p.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var G=p.getSelectionCells();if(null!=G){G=p.getEditableCells(p.addAllEdges(G));p.getModel().beginUpdate();try{for(var P=0;P<G.length;P++){var R=G[P];if(p.getModel().isEdge(R)){var c=p.getCellGeometry(R);-null!=c&&(c=c.clone(),c.points=null,c.x=0,c.y=0,c.offset=null,p.getModel().setGeometry(R,c))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+R");H=this.addAction("subscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");H=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");H=this.addAction("decreaseFontSize",+mxUtils.bind(this,function(){var G=p.getEditableCells(p.getSelectionCells());if(null!=G&&0<G.length){var P=p.getModel();P=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",P.getStyle(G[0])||"",function(Q){null!=Q&&p.setCellStyle(mxUtils.trim(Q),G)},null,null,400,220);this.editorUi.showDialog(P.container,420,300,!0,!0);P.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())},+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var G=p.getSelectionCell();if(null!=G&&p.getModel().isEdge(G)){var P=u.graph.selectionCellsHandler.getHandler(G);if(P instanceof mxEdgeHandler){var Q=p.view.translate,c=p.view.scale,f=Q.x;Q=Q.y;G=p.getModel().getParent(G);for(var l=p.getCellGeometry(G);p.getModel().isVertex(G)&&null!=l;)f+=l.x,Q+=l.y,G=+p.getModel().getParent(G),l=p.getCellGeometry(G);f=Math.round(p.snap(p.popupMenuHandler.triggerX/c-f));c=Math.round(p.snap(p.popupMenuHandler.triggerY/c-Q));P.addPointAt(P.state,f,c)}}});this.addAction("removeWaypoint",function(){var G=m.actions.get("removeWaypoint");null!=G.handler&&G.handler.removePoint(G.handler.state,G.index)});this.addAction("clearAnchors",function(){var G=p.getSelectionCells();if(null!=G){G=p.getEditableCells(p.addAllEdges(G));p.getModel().beginUpdate();try{for(var P=0;P<G.length;P++){var Q=+G[P];p.getModel().isEdge(Q)&&(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[Q]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[Q]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[Q]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[Q]))}}finally{p.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var G=p.getSelectionCells();if(null!=G){G=p.getEditableCells(p.addAllEdges(G));p.getModel().beginUpdate();try{for(var P=0;P<G.length;P++){var Q=G[P];if(p.getModel().isEdge(Q)){var c=p.getCellGeometry(Q);+null!=c&&(c=c.clone(),c.points=null,c.x=0,c.y=0,c.offset=null,p.getModel().setGeometry(Q,c))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+R");H=this.addAction("subscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");H=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");H=this.addAction("decreaseFontSize",mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var G=p.getCurrentCellStyle(p.getSelectionCell());G=mxUtils.getValue(G,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,G-1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift + (Numpad)");H=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var G=p.getCurrentCellStyle(p.getSelectionCell());G=mxUtils.getValue(G,mxConstants.STYLE_FONTSIZE,-mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,G+1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=mxResources.get("image")+" ("+mxResources.get("url")+"):",P=p.getView().getState(p.getSelectionCell()),R="",c=null;null!=P&&(R=P.style[mxConstants.STYLE_IMAGE]||R,c=P.style[mxConstants.STYLE_CLIP_PATH]||c);var f=p.cellEditor.saveSelection();-m.showImageDialog(G,R,function(l,t,z,C,F,N){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(l,t,z);else{var K=p.getSelectionCells();if(null!=l&&(0<l.length||0<K.length)){var J=null;p.getModel().beginUpdate();try{if(0==K.length){K=[p.insertVertex(p.getDefaultParent(),null,"",0,0,t,z,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var da=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=da.x;K[0].geometry.y=-da.y;null!=C&&g(K[0],C,F,N,p);J=K;p.fireEvent(new mxEventObject("cellsInserted","cells",J))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<l.length?l:null,K);var ea=p.getCurrentCellStyle(K[0]);"image"!=ea[mxConstants.STYLE_SHAPE]&&"label"!=ea[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==l.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==C&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=t&&null!=z)for(l=0;l<K.length;l++){var ca=K[l];if("0"!=p.getCurrentCellStyle(ca).expand){var W=-p.getModel().getGeometry(ca);null!=W&&(W=W.clone(),W.width=t,W.height=z,p.getModel().setGeometry(ca,W))}null!=C&&g(ca,C,F,N,p)}}finally{p.getModel().endUpdate()}null!=J&&(p.setSelectionCells(J),p.scrollCellToVisible(J[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,c)}}).isEnabled=B;this.addAction("crop...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G){var P=p.getCurrentCellStyle(G),R=P[mxConstants.STYLE_IMAGE],-c=P[mxConstants.STYLE_SHAPE];R&&"image"==c&&(P=new CropImageDialog(m,R,P[mxConstants.STYLE_CLIP_PATH],function(f,l,t){g(G,f,l,t,p)}),m.showDialog(P.container,300,390,!0,!0))}}).isEnabled=B;H=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",+mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,G+1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=mxResources.get("image")+" ("+mxResources.get("url")+"):",P=p.getView().getState(p.getSelectionCell()),Q="",c=null;null!=P&&(Q=P.style[mxConstants.STYLE_IMAGE]||Q,c=P.style[mxConstants.STYLE_CLIP_PATH]||c);var f=p.cellEditor.saveSelection();+m.showImageDialog(G,Q,function(l,t,z,C,F,N){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(l,t,z);else{var K=p.getSelectionCells();if(null!=l&&(0<l.length||0<K.length)){var J=null;p.getModel().beginUpdate();try{if(0==K.length){K=[p.insertVertex(p.getDefaultParent(),null,"",0,0,t,z,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var da=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=da.x;K[0].geometry.y=+da.y;null!=C&&g(K[0],C,F,N,p);J=K;p.fireEvent(new mxEventObject("cellsInserted","cells",J))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<l.length?l:null,K);var ea=p.getCurrentCellStyle(K[0]);"image"!=ea[mxConstants.STYLE_SHAPE]&&"label"!=ea[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==l.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==C&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=t&&null!=z)for(l=0;l<K.length;l++){var ca=K[l];if("0"!=p.getCurrentCellStyle(ca).expand){var X=+p.getModel().getGeometry(ca);null!=X&&(X=X.clone(),X.width=t,X.height=z,p.getModel().setGeometry(ca,X))}null!=C&&g(ca,C,F,N,p)}}finally{p.getModel().endUpdate()}null!=J&&(p.setSelectionCells(J),p.scrollCellToVisible(J[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,c)}}).isEnabled=B;this.addAction("crop...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G){var P=p.getCurrentCellStyle(G),Q=P[mxConstants.STYLE_IMAGE],+c=P[mxConstants.STYLE_SHAPE];Q&&"image"==c&&(P=new CropImageDialog(m,Q,P[mxConstants.STYLE_CLIP_PATH],function(f,l,t){g(G,f,l,t,p)}),m.showDialog(P.container,300,390,!0,!0))}}).isEnabled=B;H=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));H=this.addAction("format",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return m.isFormatPanelVisible()}));H=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G&&null!=G.geometry){var P=@@ -3079,25 +3079,25 @@ DrawioFile.prototype.synchronizeFile=function(b,e){if(this.savingFile)null!=e&&efunction(B){g&&(window.clearTimeout(m),this.sync.cleanup(b,e,B))}),u,p):this.updateFile(mxUtils.bind(this,function(){g&&(window.clearTimeout(m),null!=b&&b())}),u,p)}};DrawioFile.prototype.updateFile=function(b,e,g,m,u){null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",u,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(p){try{null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[p]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=p?this.mergeFile(p,b,e,m,u):this.reloadFile(b,e))}catch(B){null!=e&&e(B)}}),e))};-DrawioFile.prototype.mergeFile=function(b,e,g,m,u){try{var p=b.getShadowPages();if(null!=p&&0<p.length){var B=this.getShadowPages(),H=[this.ui.diffPages(null!=m?m:B,p)],T=this.ignorePatches(H);if(T)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",T),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var G=this.isModified()?this.ui.diffPages(B,-this.isRealtime()?this.ownPages:this.ui.pages):null,P=this.ui.patchPages(this.ui.clonePages(B),H[0]),R=this.ui.getHashValueForPages(P,{}),c=this.ui.getHashValueForPages(p,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",B,"pages",p,"patched",P,"patches",H,"changes",G,"checksum",R,"current",c,"valid",R==c,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",u);if(null!=R&&R!=c)this.checksumError(g,H,null,null,"mergeFile",-R,c,b.getCurrentRevisionId());else{this.setShadowPages(p);if(null!=this.sync){var f=this.sync.patchRealtime(H,DrawioFile.LAST_WRITE_WINS?G:null,null,u);null==f||mxUtils.isEmptyObject(f)||H.push(f)}this.patch(H,DrawioFile.LAST_WRITE_WINS?G:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=e&&e()}}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(z);try{var l=this.getCurrentUser(),t=null!=l?+DrawioFile.prototype.mergeFile=function(b,e,g,m,u){try{var p=b.getShadowPages();if(null!=p&&0<p.length){var B=this.getShadowPages(),H=[this.ui.diffPages(null!=m?m:B,p)],S=this.ignorePatches(H);if(S)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var G=this.isModified()?this.ui.diffPages(B,+this.isRealtime()?this.ownPages:this.ui.pages):null,P=this.ui.patchPages(this.ui.clonePages(B),H[0]),Q=this.ui.getHashValueForPages(P,{}),c=this.ui.getHashValueForPages(p,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",B,"pages",p,"patched",P,"patches",H,"changes",G,"checksum",Q,"current",c,"valid",Q==c,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",u);if(null!=Q&&Q!=c)this.checksumError(g,H,null,null,"mergeFile",+Q,c,b.getCurrentRevisionId());else{this.setShadowPages(p);if(null!=this.sync){var f=this.sync.patchRealtime(H,DrawioFile.LAST_WRITE_WINS?G:null,null,u);null==f||mxUtils.isEmptyObject(f)||H.push(f)}this.patch(H,DrawioFile.LAST_WRITE_WINS?G:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=e&&e()}}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(z);try{var l=this.getCurrentUser(),t=null!=l?l.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),t,z)}catch(C){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(z){null!=g&&g(z)}};DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),g=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var u=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(u=this.ui.anonymizeNode(u,!0));u.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,u,!0);g.appendChild(u)}return mxUtils.getPrettyXml(g)};DrawioFile.prototype.compressReportData=function(b,e,g){e=null!=e?e:1E4;null!=g&&null!=b&&b.length>g?b=b.substring(0,g)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};-DrawioFile.prototype.checksumError=function(b,e,g,m,u,p,B,H){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var T=this.getCurrentUser(),G=null!=T?T.id:"unknown",P=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",R=JSON.stringify(e).length,c=null;if(null!=e&&1E3>R){for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);c=JSON.stringify(e);c=null!=c&&1E3>c.length?Graph.compress(c):+DrawioFile.prototype.checksumError=function(b,e,g,m,u,p,B,H){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var S=this.getCurrentUser(),G=null!=S?S.id:"unknown",P=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",Q=JSON.stringify(e).length,c=null;if(null!=e&&1E3>Q){for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);c=JSON.stringify(e);c=null!=c&&1E3>c.length?Graph.compress(c):null}this.getLatestVersion(mxUtils.bind(this,function(f){try{var l=null!=c?"report":"error",t=this.ui.getHashValueForPages(f.getShadowPages()),z="unknown",C="unknown",F="unknown";try{var N=null!=f.initialData&&0<f.initialData.length?mxUtils.parseXml(f.initialData).documentElement:null;null!=N&&(null!=N.getAttribute("version")&&(z=N.getAttribute("version")),null!=N.getAttribute("agent")&&(C=N.getAttribute("agent")),null!=N.getAttribute("type")&&(F=N.getAttribute("type")))}catch(K){}EditorUi.logError("Checksum "+-l+" in "+u,null,this.getMode()+"."+P,"user_"+G+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+R+"-patches_"+e.length+(null!=c?"-json_"+c:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=B?"-current_"+B:"")+(null!=H?"-rev_"+this.ui.hashValue(H):"")+(null!=t?"-latest_"+t:"")+"-latestRev_"+this.ui.hashValue(f.getCurrentRevisionId())+("-latestVersion_"+z)+("-latestAgent_"+C)+("-latestType_"+F));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+P,action:u,label:"user_"+-G+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+R+"-patches_"+e.length+"-size_"+this.getSize()})}catch(K){}}),function(){})}catch(f){}};-DrawioFile.prototype.sendErrorReport=function(b,e,g,m){try{var u=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),B=this.getCurrentUser(),H=null!=B?this.ui.hashValue(B.id):"unknown",T=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",G=this.getTitle(),P=G.lastIndexOf(".");B="xml";0<P&&(B=G.substring(P));var R=null!=g?g.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+B+")\nUser="+H+T+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:-"")+(null!=g?"\n\nError: "+g.message:"")+"\n\nStack:\n"+R+"\n\nShadow:\n"+u+"\n\nData:\n"+p,m)}catch(c){}};+l+" in "+u,null,this.getMode()+"."+P,"user_"+G+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+Q+"-patches_"+e.length+(null!=c?"-json_"+c:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=B?"-current_"+B:"")+(null!=H?"-rev_"+this.ui.hashValue(H):"")+(null!=t?"-latest_"+t:"")+"-latestRev_"+this.ui.hashValue(f.getCurrentRevisionId())+("-latestVersion_"+z)+("-latestAgent_"+C)+("-latestType_"+F));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+P,action:u,label:"user_"++G+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+Q+"-patches_"+e.length+"-size_"+this.getSize()})}catch(K){}}),function(){})}catch(f){}};+DrawioFile.prototype.sendErrorReport=function(b,e,g,m){try{var u=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),B=this.getCurrentUser(),H=null!=B?this.ui.hashValue(B.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",G=this.getTitle(),P=G.lastIndexOf(".");B="xml";0<P&&(B=G.substring(P));var Q=null!=g?g.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()++":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+B+")\nUser="+H+S+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:+"")+(null!=g?"\n\nError: "+g.message:"")+"\n\nStack:\n"+Q+"\n\nShadow:\n"+u+"\n\nData:\n"+p,m)}catch(c){}};DrawioFile.prototype.reloadFile=function(b,e){try{this.stats.fileReloaded++;var g=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),m=this.ui.editor.graph,u=m.getSelectionCells(),p=m.getViewState(),B=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(H){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[g],"viewState",[p],"latestFile",H);null!=H?(this.ui.replaceFileData(H.getData(),-[g]),this.ui.restoreViewState(B,p,u),this.setDescriptor(H.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var T=this.ui.getCurrentFile();null!=T&&(T.stats=this.stats,T.patch([g]),T.fileChanged());this.ui.restoreViewState(B,p,u);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(H){null!=e&&e(H)}};+[g]),this.ui.restoreViewState(B,p,u),this.setDescriptor(H.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var S=this.ui.getCurrentFile();null!=S&&(S.stats=this.stats,S.patch([g]),S.fileChanged());this.ui.restoreViewState(B,p,u);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(H){null!=e&&e(H)}};DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var g=0;g<b.length&&e;g++)e=e&&mxUtils.isEmptyObject(b[g]);return e};-DrawioFile.prototype.patch=function(b,e,g,m){if(null!=b){var u=this.ui.editor.undoManager,p=u.history.slice(),B=u.indexOfNextAdd,H=this.ui.editor.graph;H.container.style.visibility="hidden";var T=this.changeListenerEnabled;this.changeListenerEnabled=g;var G=H.foldingEnabled,P=H.mathEnabled,R=H.cellRenderer.redraw;H.cellRenderer.redraw=function(C){C.view.graph.isEditing(C.cell)&&(C.view.graph.scrollCellToVisible(C.cell),C.view.graph.cellEditor.resize());R.apply(this,arguments)};H.model.beginUpdate();+DrawioFile.prototype.patch=function(b,e,g,m){if(null!=b){var u=this.ui.editor.undoManager,p=u.history.slice(),B=u.indexOfNextAdd,H=this.ui.editor.graph;H.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=g;var G=H.foldingEnabled,P=H.mathEnabled,Q=H.cellRenderer.redraw;H.cellRenderer.redraw=function(C){C.view.graph.isEditing(C.cell)&&(C.view.graph.scrollCellToVisible(C.cell),C.view.graph.cellEditor.resize());Q.apply(this,arguments)};H.model.beginUpdate();try{if(g){for(var c=this.ui.pages.slice(),f=this.ui.currentPage,l=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),t=0;t<l.length;t++){var z=mxUtils.indexOf(this.ui.pages,l[t]);0>z?this.ui.insertPage(l[t],Math.min(t,this.ui.pages.length)):this.ui.movePage(z,t)}for(t=0;t<c.length;t++)0>mxUtils.indexOf(l,c[t])&&this.ui.removePage(c[t]);0<=mxUtils.indexOf(this.ui.pages,f)&&this.ui.selectPage(f,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified());0==this.ui.pages.length&&-this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);H.checkDefaultParent()}finally{H.container.style.visibility="";H.model.endUpdate();H.cellRenderer.redraw=R;this.changeListenerEnabled=T;g||(u.history=p,u.indexOfNextAdd=B,u.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)P!=H.mathEnabled?(this.ui.editor.updateGraphComponents(),H.refresh()):(G!=H.foldingEnabled?+this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);H.checkDefaultParent()}finally{H.container.style.visibility="";H.model.endUpdate();H.cellRenderer.redraw=Q;this.changeListenerEnabled=S;g||(u.history=p,u.indexOfNextAdd=B,u.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)P!=H.mathEnabled?(this.ui.editor.updateGraphComponents(),H.refresh()):(G!=H.foldingEnabled?H.view.revalidate():H.view.validate(),H.sizeDidChange());null!=this.sync&&this.isRealtime()&&!m&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",g)}return b};DrawioFile.prototype.save=function(b,e,g,m,u,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",u,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!u&&this.invalidChecksum)if(null!=g)g({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=g)g({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(B){if(null!=g)g(B);else throw B;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};@@ -3148,7 +3148,7 @@ DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=newmxUtils.bind(this,function(e){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(e,mxUtils.bind(this,function(g){EditorUi.debug("DrawioFile.createSecret",[this],"secret",e,"token",g);b(e,g)}),mxUtils.bind(this,function(){b(e)})):b(e)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};DrawioFile.prototype.fileSaved=function(b,e,g,m,u,p,B){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;p=null!=p?p:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=g&&g()):this.sync.fileSaved(p,e,g,m,u,B)}catch(G){this.invalidChecksum=-this.inConflictState=!0;this.descriptorChanged();null!=m&&m(G);try{var H=this.getCurrentUser(),T=null!=H?H.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),T,G)}catch(P){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(G){this.descriptorChanged(),null!=m&&m(G)}};+this.inConflictState=!0;this.descriptorChanged();null!=m&&m(G);try{var H=this.getCurrentUser(),S=null!=H?H.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,G)}catch(P){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(G){this.descriptorChanged(),null!=m&&m(G)}};DrawioFile.prototype.autosave=function(b,e,g,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());var u=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var p=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==p&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",p,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var B=this.isAutosaveRevision();B&&(this.lastAutosaveRevision=(new Date).getTime());this.save(B,mxUtils.bind(this,function(H){this.autosaveCompleted();null!=g&&g(H)}),mxUtils.bind(this,function(H){null!=m&&m(H)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=g&&g(null)}catch(H){null!=m&&m(H)}}),u);this.autosaveThread=p;EditorUi.debug("DrawioFile.autosave",[this],"thread",p,"delay",b,"maxDelay",e,"actualDelay",u,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};@@ -3157,10 +3157,10 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(thisDrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,g){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,g,m,u,p,B){DrawioFile.call(this,b,e);this.title=g;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=u;this.desc=p;this.editable=B};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,e,g,m,u){this.saveAs(this.title,e,g,m,u)};LocalFile.prototype.saveAs=function(b,e,g,m,u){this.saveFile(b,!1,e,g,null,m,u)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?null!=e&&e({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};-LocalFile.prototype.saveFile=function(b,e,g,m,u,p,B){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;u||this.updateFileData();var H=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var T=this.getData(),G=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),P=mxUtils.bind(this,function(R){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=-!0;var c=mxUtils.bind(this,function(l){this.savingFile=!1;null!=m&&m({error:l})});this.saveDraft(T);this.fileHandle.createWritable().then(mxUtils.bind(this,function(l){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[t],"conflict",this.desc.lastModified!=t.lastModified);B||this.desc.lastModified==t.lastModified?l.write(H?this.ui.base64ToBlob(R,"image/png"):R).then(mxUtils.bind(this,function(){l.close().then(mxUtils.bind(this,-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(z){try{var C=this.desc;this.savingFile=!1;this.desc=z;this.fileSaved(T,C,G,c);this.removeDraft()}catch(F){c(F)}}),c)}),c)}),c):(this.inConflictState=!0,c())}),mxUtils.bind(this,function(t){this.invalidFileHandle=!0;c(t)}))}),c)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(R,b,H?"image/png":"text/xml",H);else if(R.length<MAX_REQUEST_SIZE){var f=b.lastIndexOf(".");f=0<f?b.substring(f+1):"xml";-(new mxXmlRequest(SAVE_URL,"format="+f+"&xml="+encodeURIComponent(R)+"&filename="+encodeURIComponent(b)+(H?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(R)}));G()}});H?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(R){P(R)}),m,this.ui.getCurrentFile()!=this?T:null,e.scale,e.border)):P(T)};+LocalFile.prototype.saveFile=function(b,e,g,m,u,p,B){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;u||this.updateFileData();var H=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),G=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),P=mxUtils.bind(this,function(Q){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=+!0;var c=mxUtils.bind(this,function(l){this.savingFile=!1;null!=m&&m({error:l})});this.saveDraft(S);this.fileHandle.createWritable().then(mxUtils.bind(this,function(l){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[t],"conflict",this.desc.lastModified!=t.lastModified);B||this.desc.lastModified==t.lastModified?l.write(H?this.ui.base64ToBlob(Q,"image/png"):Q).then(mxUtils.bind(this,function(){l.close().then(mxUtils.bind(this,+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(z){try{var C=this.desc;this.savingFile=!1;this.desc=z;this.fileSaved(S,C,G,c);this.removeDraft()}catch(F){c(F)}}),c)}),c)}),c):(this.inConflictState=!0,c())}),mxUtils.bind(this,function(t){this.invalidFileHandle=!0;c(t)}))}),c)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(Q,b,H?"image/png":"text/xml",H);else if(Q.length<MAX_REQUEST_SIZE){var f=b.lastIndexOf(".");f=0<f?b.substring(f+1):"xml";+(new mxXmlRequest(SAVE_URL,"format="+f+"&xml="+encodeURIComponent(Q)+"&filename="+encodeURIComponent(b)+(H?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Q)}));G()}});H?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(Q){P(Q)}),m,this.ui.getCurrentFile()!=this?S:null,e.scale,e.border)):P(S)};LocalFile.prototype.rename=function(b,e,g){this.title=b;this.descriptorChanged();null!=e&&e()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";@@ -3241,34 +3241,34 @@ type:"bool",defVal:!1,isVisible:function(k,A){A=A.editorUi.editor.graph.model;redefVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(k,A){var I=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||A.editorUi.editor.graph.isSwimlane(k.vertices[0])||null==I||I==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(k,A){return 0<k.vertices.length&&A.editorUi.editor.graph.isContainer(k.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## An optional data object can be specified to define the metadata for the connector.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto, width or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,[email protected],default,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';-Editor.createRoughCanvas=function(k){var A=rough.canvas({getContext:function(){return k}});A.draw=function(I){var U=I.sets||[];I=I.options||this.getDefaultOptions();for(var O=0;O<U.length;O++){var S=U[O];switch(S.type){case "path":null!=I.stroke&&this._drawToContext(k,S,I);break;case "fillPath":this._drawToContext(k,S,I);break;case "fillSketch":this.fillSketch(k,S,I)}}};A.fillSketch=function(I,U,O){var S=k.state.strokeColor,X=k.state.strokeWidth,aa=k.state.strokeAlpha,ja=k.state.dashed,pa=O.fillWeight;-0>pa&&(pa=O.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(O.fill||"");k.setStrokeWidth(pa);k.setDashed(!1);this._drawToContext(I,U,O);k.setDashed(ja);k.setStrokeWidth(X);k.setStrokeColor(S);k.setStrokeAlpha(aa)};A._drawToContext=function(I,U,O){I.begin();for(var S=0;S<U.ops.length;S++){var X=U.ops[S],aa=X.data;switch(X.op){case "move":I.moveTo(aa[0],aa[1]);break;case "bcurveTo":I.curveTo(aa[0],aa[1],aa[2],aa[3],aa[4],aa[5]);break;case "lineTo":I.lineTo(aa[0],aa[1])}}I.end();-"fillPath"===U.type&&O.filled?I.fill():I.stroke()};return A};(function(){function k(S,X,aa){this.canvas=S;this.rc=X;this.shape=aa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;+Editor.createRoughCanvas=function(k){var A=rough.canvas({getContext:function(){return k}});A.draw=function(I){var T=I.sets||[];I=I.options||this.getDefaultOptions();for(var O=0;O<T.length;O++){var U=T[O];switch(U.type){case "path":null!=I.stroke&&this._drawToContext(k,U,I);break;case "fillPath":this._drawToContext(k,U,I);break;case "fillSketch":this.fillSketch(k,U,I)}}};A.fillSketch=function(I,T,O){var U=k.state.strokeColor,V=k.state.strokeWidth,ba=k.state.strokeAlpha,fa=k.state.dashed,pa=O.fillWeight;+0>pa&&(pa=O.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(O.fill||"");k.setStrokeWidth(pa);k.setDashed(!1);this._drawToContext(I,T,O);k.setDashed(fa);k.setStrokeWidth(V);k.setStrokeColor(U);k.setStrokeAlpha(ba)};A._drawToContext=function(I,T,O){I.begin();for(var U=0;U<T.ops.length;U++){var V=T.ops[U],ba=V.data;switch(V.op){case "move":I.moveTo(ba[0],ba[1]);break;case "bcurveTo":I.curveTo(ba[0],ba[1],ba[2],ba[3],ba[4],ba[5]);break;case "lineTo":I.lineTo(ba[0],ba[1])}}I.end();+"fillPath"===T.type&&O.filled?I.fill():I.stroke()};return A};(function(){function k(U,V,ba){this.canvas=U;this.rc=V;this.shape=ba;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,k.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,k.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,k.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,k.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,k.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,k.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,k.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,k.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,k.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,-k.prototype.fillAndStroke);this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(S,X){var aa=1;if(null!=this.shape.state){var ja=this.shape.state.cell.id;if(null!=ja)for(var pa=0;pa<ja.length;pa++)aa=(aa<<5)-aa+ja.charCodeAt(pa)<<0}aa={strokeWidth:this.canvas.state.strokeWidth,seed:aa,preserveVertices:!0};ja=this.rc.getDefaultOptions();aa.stroke=S?this.canvas.state.strokeColor===-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;S=null;(aa.filled=X)?(aa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,S=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):aa.fill="";aa.bowing=mxUtils.getValue(this.shape.style,"bowing",ja.bowing);aa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ja.hachureAngle);aa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ja.curveFitting);-aa.roughness=mxUtils.getValue(this.shape.style,"jiggle",ja.roughness);aa.simplification=mxUtils.getValue(this.shape.style,"simplification",ja.simplification);aa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ja.disableMultiStroke);aa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ja.disableMultiStrokeFill);X=mxUtils.getValue(this.shape.style,"hachureGap",-1);aa.hachureGap="auto"==X?-1:X;aa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",-X);aa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",X);aa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",X);X=mxUtils.getValue(this.shape.style,"fillWeight",-1);aa.fillWeight="auto"==X?-1:X;X=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==X&&(X="auto");"auto"==X&&(X=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&X.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&X.push(mxUtils.hex2rgb(Editor.darkColor)),X=-null!=aa.fill&&(null!=S||0<=mxUtils.indexOf(X,mxUtils.hex2rgb(aa.fill)))?"solid":ja.fillStyle);aa.fillStyle=X;return aa};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var S=2;S<arguments.length;S+=2)this.lastX=arguments[S-1],this.lastY=arguments[S],-this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};k.prototype.lineTo=function(S,X){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,S,X),this.lastX=S,this.lastY=X)};k.prototype.moveTo=function(S,X){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,S,X),this.lastX=S,this.lastY=X,this.firstX=S,this.firstY=X)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,-arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(S,X,aa,ja){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,S,X,aa,ja),this.lastX=aa,this.lastY=ja)};k.prototype.curveTo=function(S,X,aa,ja,pa,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,S,X,aa,ja,pa,sa),this.lastX=pa,this.lastY=sa)};k.prototype.arcTo=function(S,X,aa,ja,pa,sa,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);-else{var wa=mxUtils.arcToCurves(this.lastX,this.lastY,S,X,aa,ja,pa,sa,qa);if(null!=wa)for(var Ba=0;Ba<wa.length;Ba+=6)this.curveTo(wa[Ba],wa[Ba+1],wa[Ba+2],wa[Ba+3],wa[Ba+4],wa[Ba+5]);this.lastX=sa;this.lastY=qa}};k.prototype.rect=function(S,X,aa,ja){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(S,X,aa,ja,this.getStyle(!0,!0)))};k.prototype.ellipse=function(S,X,aa,ja){this.passThrough?this.originalEllipse.apply(this.canvas,-arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(S+aa/2,X+ja/2,aa,ja,this.getStyle(!0,!0)))};k.prototype.roundrect=function(S,X,aa,ja,pa,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(S+pa,X),this.lineTo(S+aa-pa,X),this.quadTo(S+aa,X,S+aa,X+sa),this.lineTo(S+aa,X+ja-sa),this.quadTo(S+aa,X+ja,S+aa-pa,X+ja),this.lineTo(S+pa,X+ja),this.quadTo(S,X+ja,S,X+ja-sa),this.lineTo(S,X+sa),this.quadTo(S,X,S+pa,X))};k.prototype.drawPath=function(S){if(0<-this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),S)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var X in S)this.nextShape.options[X]=S[X];S.stroke!=mxConstants.NONE&&null!=S.stroke||delete this.nextShape.options.stroke;S.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,+k.prototype.fillAndStroke);this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(U,V){var ba=1;if(null!=this.shape.state){var fa=this.shape.state.cell.id;if(null!=fa)for(var pa=0;pa<fa.length;pa++)ba=(ba<<5)-ba+fa.charCodeAt(pa)<<0}ba={strokeWidth:this.canvas.state.strokeWidth,seed:ba,preserveVertices:!0};fa=this.rc.getDefaultOptions();ba.stroke=U?this.canvas.state.strokeColor===+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;U=null;(ba.filled=V)?(ba.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,U=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):ba.fill="";ba.bowing=mxUtils.getValue(this.shape.style,"bowing",fa.bowing);ba.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",fa.hachureAngle);ba.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",fa.curveFitting);+ba.roughness=mxUtils.getValue(this.shape.style,"jiggle",fa.roughness);ba.simplification=mxUtils.getValue(this.shape.style,"simplification",fa.simplification);ba.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",fa.disableMultiStroke);ba.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",fa.disableMultiStrokeFill);V=mxUtils.getValue(this.shape.style,"hachureGap",-1);ba.hachureGap="auto"==V?-1:V;ba.dashGap=mxUtils.getValue(this.shape.style,"dashGap",+V);ba.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",V);ba.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",V);V=mxUtils.getValue(this.shape.style,"fillWeight",-1);ba.fillWeight="auto"==V?-1:V;V=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==V&&(V="auto");"auto"==V&&(V=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&V.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&V.push(mxUtils.hex2rgb(Editor.darkColor)),V=+null!=ba.fill&&(null!=U||0<=mxUtils.indexOf(V,mxUtils.hex2rgb(ba.fill)))?"solid":fa.fillStyle);ba.fillStyle=V;return ba};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var U=2;U<arguments.length;U+=2)this.lastX=arguments[U-1],this.lastY=arguments[U],+this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};k.prototype.lineTo=function(U,V){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,U,V),this.lastX=U,this.lastY=V)};k.prototype.moveTo=function(U,V){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,U,V),this.lastX=U,this.lastY=V,this.firstX=U,this.firstY=V)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,+arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(U,V,ba,fa){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,U,V,ba,fa),this.lastX=ba,this.lastY=fa)};k.prototype.curveTo=function(U,V,ba,fa,pa,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,U,V,ba,fa,pa,sa),this.lastX=pa,this.lastY=sa)};k.prototype.arcTo=function(U,V,ba,fa,pa,sa,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);+else{var wa=mxUtils.arcToCurves(this.lastX,this.lastY,U,V,ba,fa,pa,sa,qa);if(null!=wa)for(var Aa=0;Aa<wa.length;Aa+=6)this.curveTo(wa[Aa],wa[Aa+1],wa[Aa+2],wa[Aa+3],wa[Aa+4],wa[Aa+5]);this.lastX=sa;this.lastY=qa}};k.prototype.rect=function(U,V,ba,fa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(U,V,ba,fa,this.getStyle(!0,!0)))};k.prototype.ellipse=function(U,V,ba,fa){this.passThrough?this.originalEllipse.apply(this.canvas,+arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(U+ba/2,V+fa/2,ba,fa,this.getStyle(!0,!0)))};k.prototype.roundrect=function(U,V,ba,fa,pa,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(U+pa,V),this.lineTo(U+ba-pa,V),this.quadTo(U+ba,V,U+ba,V+sa),this.lineTo(U+ba,V+fa-sa),this.quadTo(U+ba,V+fa,U+ba-pa,V+fa),this.lineTo(U+pa,V+fa),this.quadTo(U,V+fa,U,V+fa-sa),this.lineTo(U,V+sa),this.quadTo(U,V,U+pa,V))};k.prototype.drawPath=function(U){if(0<+this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),U)}catch(ba){}this.passThrough=!1}else if(null!=this.nextShape){for(var V in U)this.nextShape.options[V]=U[V];U.stroke!=mxConstants.NONE&&null!=U.stroke||delete this.nextShape.options.stroke;U.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};k.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;-this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(S){return new k(S,Editor.createRoughCanvas(S),this)};var A=mxShape.prototype.createHandJiggle;-mxShape.prototype.createHandJiggle=function(S){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?A.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(S):this.createRoughCanvas(S)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(S,X,aa,ja,pa){null!=S.handJiggle&&S.handJiggle.passThrough||I.apply(this,arguments)};var U=mxShape.prototype.paint;mxShape.prototype.paint=-function(S){var X=S.addTolerance,aa=!0;null!=this.style&&(aa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=S.handJiggle&&S.handJiggle.constructor==k&&!this.outline){S.save();var ja=this.fill,pa=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,qa=S.setStrokeColor;S.setStrokeColor=function(){};var wa=S.setFillColor;S.setFillColor=function(){};aa||null==ja||(this.configurePointerEvents=function(){});S.handJiggle.passThrough=!0;U.apply(this,-arguments);S.handJiggle.passThrough=!1;S.setFillColor=wa;S.setStrokeColor=qa;this.configurePointerEvents=sa;this.stroke=pa;this.fill=ja;S.restore();aa&&null!=ja&&(S.addTolerance=function(){})}U.apply(this,arguments);S.addTolerance=X};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(S,X,aa,ja,pa,sa){null!=S.handJiggle&&S.handJiggle.constructor==k?(S.handJiggle.passThrough=!0,O.apply(this,arguments),S.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=-function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,A,I){if(null!=k&&"undefined"!==typeof pako){var U=k.ownerDocument.getElementsByTagName("div"),O=[];if(null!=U&&0<U.length)for(var S=0;S<U.length;S++)if("mxgraph"==U[S].getAttribute("class")){O.push(U[S]);-break}0<O.length&&(U=O[0].getAttribute("data-mxgraph"),null!=U?(O=JSON.parse(U),null!=O&&null!=O.xml&&(k=mxUtils.parseXml(O.xml),k=k.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&(U=mxUtils.getTextContent(O[0]),U=Graph.decompress(U,null,I),0<U.length&&(k=mxUtils.parseXml(U),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(U=k.getAttribute("content"),null!=U&&"<"!=U.charAt(0)&&"%"!=U.charAt(0)&&(U=unescape(window.atob?atob(U):Base64.decode(cont,U))),null!=U&&"%"==U.charAt(0)&&-(U=decodeURIComponent(U)),null!=U&&0<U.length)k=mxUtils.parseXml(U).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||A||(O=null,"diagram"==k.nodeName?O=k:"mxfile"==k.nodeName&&(U=k.getElementsByTagName("diagram"),0<U.length&&(O=U[Math.max(0,Math.min(U.length-1,urlParams.page||0))])),null!=O&&(k=Editor.parseDiagramNode(O,I)));null==k||"mxGraphModel"==k.nodeName||A&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,A,I){Editor.validateDiagramNode(k);-var U=mxUtils.trim(mxUtils.getTextContent(k)),O=null;0<U.length?(A=Graph.decompress(U,null,A),null!=A&&0<A.length&&(O=mxUtils.parseXml(A).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(O=k[0],I&&(O=Editor.parseDiagramNode(O,A,!1)),A=mxUtils.createXmlDocument(),A.appendChild(A.importNode(O,!0)),O=A.documentElement));return O};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var A=mxUtils.getNodeValue(k),I=null;0<A.length?I=Graph.decompress(A):(k=k.getElementsByTagName("mxGraphModel"),-null!=k&&0<k.length&&(I=mxUtils.getXml(k[0])));return I};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var A=new mxCodec,I=new mxGraphModel;k.appendChild(A.encode(I))}return k};Editor.extractGraphModelFromPdf=function(k){var A=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var I=k.indexOf("EmbeddedFile");if(-1<I){var U=k.indexOf("stream",-I)+9;if(0<k.substring(I,U).indexOf("application#2Fvnd.jgraph.mxfile")){var O=k.indexOf("endstream",U-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(U,O)),{to:"string"})}}for(I=k.indexOf("/ObjStm");0<I;){U=k.indexOf("stream",I)+9;O=k.indexOf("endstream",U-1);U=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(U,O)),{to:"string"});O=U.indexOf("/Subject <");if(0<O){I=U.substring(O+14,U.indexOf(">",O));if(null!=I){A=I;I=[];for(U=0;U<A.length;U+=2)O=A.substr(U,2),"00"!=O&&I.push(String.fromCharCode(parseInt(O,-16)));A=I.join("")}break}I=k.indexOf("/ObjStm",I+1)}}if(null==A&&"%PDF-1.4"==k.substring(0,8)){I="";O=U=0;for(var S=[],X=null;O<k.length;){var aa=k.charCodeAt(O);O+=1;10!=aa&&(I+=String.fromCharCode(aa));aa=="/Subject (%3Cmxfile".charCodeAt(U)?U++:U=0;if(19==U){var ja=k.indexOf("%3C%2Fmxfile%3E",O)+15;O-=9;if(ja>O){A=k.substring(O,ja);break}}10==aa&&("endobj"==I?X=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(X=[],S[I.split(" ")[0]]=X):null!=X&&X.push(I),I="")}}null==A&&null!=-S&&(A=Editor.extractGraphModelFromXref(S));null!=A&&(A=decodeURIComponent(A.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return A};Editor.extractGraphModelFromXref=function(k){var A=k.trailer,I=null;null!=A&&(A=/.* \/Info (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(A=k[A[1]],null!=A&&(A=/.* \/Subject (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(k=k[A[1]],null!=k&&(k=k.join("\n"),I=k.substring(1,k.length-1))))));return I};Editor.extractParserError=function(k,A){var I=null;k=+this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(U){return new k(U,Editor.createRoughCanvas(U),this)};var A=mxShape.prototype.createHandJiggle;+mxShape.prototype.createHandJiggle=function(U){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?A.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(U):this.createRoughCanvas(U)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(U,V,ba,fa,pa){null!=U.handJiggle&&U.handJiggle.passThrough||I.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=+function(U){var V=U.addTolerance,ba=!0;null!=this.style&&(ba="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=U.handJiggle&&U.handJiggle.constructor==k&&!this.outline){U.save();var fa=this.fill,pa=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,qa=U.setStrokeColor;U.setStrokeColor=function(){};var wa=U.setFillColor;U.setFillColor=function(){};ba||null==fa||(this.configurePointerEvents=function(){});U.handJiggle.passThrough=!0;T.apply(this,+arguments);U.handJiggle.passThrough=!1;U.setFillColor=wa;U.setStrokeColor=qa;this.configurePointerEvents=sa;this.stroke=pa;this.fill=fa;U.restore();ba&&null!=fa&&(U.addTolerance=function(){})}T.apply(this,arguments);U.addTolerance=V};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(U,V,ba,fa,pa,sa){null!=U.handJiggle&&U.handJiggle.constructor==k?(U.handJiggle.passThrough=!0,O.apply(this,arguments),U.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=+function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,A,I){if(null!=k&&"undefined"!==typeof pako){var T=k.ownerDocument.getElementsByTagName("div"),O=[];if(null!=T&&0<T.length)for(var U=0;U<T.length;U++)if("mxgraph"==T[U].getAttribute("class")){O.push(T[U]);+break}0<O.length&&(T=O[0].getAttribute("data-mxgraph"),null!=T?(O=JSON.parse(T),null!=O&&null!=O.xml&&(k=mxUtils.parseXml(O.xml),k=k.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&(T=mxUtils.getTextContent(O[0]),T=Graph.decompress(T,null,I),0<T.length&&(k=mxUtils.parseXml(T),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(T=k.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&+(T=decodeURIComponent(T)),null!=T&&0<T.length)k=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||A||(O=null,"diagram"==k.nodeName?O=k:"mxfile"==k.nodeName&&(T=k.getElementsByTagName("diagram"),0<T.length&&(O=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=O&&(k=Editor.parseDiagramNode(O,I)));null==k||"mxGraphModel"==k.nodeName||A&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,A,I){Editor.validateDiagramNode(k);+var T=mxUtils.trim(mxUtils.getTextContent(k)),O=null;0<T.length?(A=Graph.decompress(T,null,A),null!=A&&0<A.length&&(O=mxUtils.parseXml(A).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(O=k[0],I&&(O=Editor.parseDiagramNode(O,A,!1)),A=mxUtils.createXmlDocument(),A.appendChild(A.importNode(O,!0)),O=A.documentElement));return O};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var A=mxUtils.getNodeValue(k),I=null;0<A.length?I=Graph.decompress(A):(k=k.getElementsByTagName("mxGraphModel"),+null!=k&&0<k.length&&(I=mxUtils.getXml(k[0])));return I};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var A=new mxCodec,I=new mxGraphModel;k.appendChild(A.encode(I))}return k};Editor.extractGraphModelFromPdf=function(k){var A=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var I=k.indexOf("EmbeddedFile");if(-1<I){var T=k.indexOf("stream",+I)+9;if(0<k.substring(I,T).indexOf("application#2Fvnd.jgraph.mxfile")){var O=k.indexOf("endstream",T-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(T,O)),{to:"string"})}}for(I=k.indexOf("/ObjStm");0<I;){T=k.indexOf("stream",I)+9;O=k.indexOf("endstream",T-1);T=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(T,O)),{to:"string"});O=T.indexOf("/Subject <");if(0<O){I=T.substring(O+14,T.indexOf(">",O));if(null!=I){A=I;I=[];for(T=0;T<A.length;T+=2)O=A.substr(T,2),"00"!=O&&I.push(String.fromCharCode(parseInt(O,+16)));A=I.join("")}break}I=k.indexOf("/ObjStm",I+1)}}if(null==A&&"%PDF-1.4"==k.substring(0,8)){I="";O=T=0;for(var U=[],V=null;O<k.length;){var ba=k.charCodeAt(O);O+=1;10!=ba&&(I+=String.fromCharCode(ba));ba=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var fa=k.indexOf("%3C%2Fmxfile%3E",O)+15;O-=9;if(fa>O){A=k.substring(O,fa);break}}10==ba&&("endobj"==I?V=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(V=[],U[I.split(" ")[0]]=V):null!=V&&V.push(I),I="")}}null==A&&null!=+U&&(A=Editor.extractGraphModelFromXref(U));null!=A&&(A=decodeURIComponent(A.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return A};Editor.extractGraphModelFromXref=function(k){var A=k.trailer,I=null;null!=A&&(A=/.* \/Info (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(A=k[A[1]],null!=A&&(A=/.* \/Subject (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(k=k[A[1]],null!=k&&(k=k.join("\n"),I=k.substring(1,k.length-1))))));return I};Editor.extractParserError=function(k,A){var I=null;k=null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(I=A||mxResources.get("invalidChars"),A=k[0].getElementsByTagName("div"),0<A.length&&(I=mxUtils.getTextContent(A[0])));return null!=I?mxUtils.trim(I):I};Editor.addRetryToError=function(k,A){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=A))};Editor.mermaidToDrawio=function(k,A,I){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,A,I)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=k.version;k.debug&&(urlParams.test="1");null!=k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);null!=k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);null!=k.selectParentLayer&&(Graph.selectParentLayer=k.selectParentLayer);null!=k.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=k.autosaveDelay);null!=k.templateFile&&(EditorUi.templateFile=k.templateFile);null!=k.styles&&(Array.isArray(k.styles)?Editor.styles=k.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=k.globalVars&&(Editor.globalVars=k.globalVars);null!=k.compressXml&&(Editor.defaultCompressed=k.compressXml,Editor.compressXml=k.compressXml);null!=k.includeDiagram&&@@ -3284,52 +3284,52 @@ k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight)(EditorUi.prototype.maxImageBytes=k.maxImageBytes);null!=k.maxImageSize&&(EditorUi.prototype.maxImageSize=k.maxImageSize);null!=k.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=k.shareCursorPosition);null!=k.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=k.showRemoteCursors);null!=k.restrictExport&&(DrawioFile.RESTRICT_EXPORT=k.restrictExport);null!=k.replaceSvgDataUris&&(Editor.replaceSvgDataUris=k.replaceSvgDataUris);null!=k.foreignObjectImages&&(Editor.foreignObjectImages=k.foreignObjectImages);null!=k.shadowColor&&(mxConstants.SHADOW_COLOR=k.shadowColor);null!=k.shadowOpacity&&(mxConstants.SHADOW_OPACITY=k.shadowOpacity);null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&(Editor.gptApiKey=k.gptApiKey);null!=k.gptModel&&(Editor.gptModel=k.gptModel);null!=k.gptUrl&&(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var A=document.getElementsByTagName("script")[0];if(null!=A&&null!=A.parentNode){var I=document.createElement("style");I.setAttribute("type","text/css");I.appendChild(document.createTextNode(k));-A.parentNode.insertBefore(I,A);k=k.split("url(");for(I=1;I<k.length;I++){var U=k[I].indexOf(")");U=Editor.trimCssUrl(k[I].substring(0,U));var O=document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",U);O.setAttribute("as","font");O.setAttribute("crossorigin","");A.parentNode.insertBefore(O,A)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";+A.parentNode.insertBefore(I,A);k=k.split("url(");for(I=1;I<k.length;I++){var T=k[I].indexOf(")");T=Editor.trimCssUrl(k[I].substring(0,T));var O=document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",T);O.setAttribute("as","font");O.setAttribute("crossorigin","");A.parentNode.insertBefore(O,A)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;for(var A=[],I=0;I<k;I++)A.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return A.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(k){k=null!=k&&"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var A=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(A)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[k],"cause",[A]),Error(mxResources.get("notADiagramFile")+-" ("+A+")");if("mxGraphModel"==k.nodeName){A=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=A&&""!=A)A!=this.graph.currentStyle&&(I=null!=this.graph.themes?this.graph.themes[A]:mxUtils.load(STYLE_PATH+"/"+A+".xml").getDocumentElement(),null!=I&&(U=new mxCodec(I.ownerDocument),U.decode(I,this.graph.getStylesheet())));else{var I=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=I){var U=new mxCodec(I.ownerDocument);-U.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=A;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));A=k.getAttribute("backgroundImage");null!=A?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(A)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==+" ("+A+")");if("mxGraphModel"==k.nodeName){A=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=A&&""!=A)A!=this.graph.currentStyle&&(I=null!=this.graph.themes?this.graph.themes[A]:mxUtils.load(STYLE_PATH+"/"+A+".xml").getDocumentElement(),null!=I&&(T=new mxCodec(I.ownerDocument),T.decode(I,this.graph.getStylesheet())));else{var I=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=I){var T=new mxCodec(I.ownerDocument);+T.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=A;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));A=k.getAttribute("backgroundImage");null!=A?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(A)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==k.getAttribute("shadow"),!1);if(A=k.getAttribute("extFonts"))try{for(A=A.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),I=0;I<A.length;I++)this.graph.addExtFont(A[I].name,A[I].url)}catch(O){console.log("ExtFonts format error: "+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;-Editor.prototype.getGraphXml=function(k,A){k=null!=k?k:!0;var I=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",this.graph.currentStyle);var U=this.graph.getBackgroundImageObject(this.graph.backgroundImage,A);null!=U&&I.setAttribute("backgroundImage",JSON.stringify(U));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?I.setAttribute("adaptiveColors",-this.graph.adaptiveColors):I.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(U=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),I.setAttribute("extFonts",U.join("|")));return I};Editor.prototype.isDataSvg=function(k){try{var A=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=A&&(null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(cont,A))),null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A)),-null!=A&&0<A.length)){var I=mxUtils.parseXml(A).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(U){}return!1};Editor.prototype.extractGraphModel=function(k,A,I){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&-this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,A){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var I=function(){U=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());-else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var U=null;Editor.doMathJaxRender=function(X){try{null==U?(MathJax.typesetClear([X]),MathJax.typeset([X]),I()):U!=X&&Editor.mathJaxQueue.push(X)}catch(aa){MathJax.typesetClear([X]),null!=aa.retry?(U=X,aa.retry.then(function(){MathJax.typesetPromise([X]).then(I)["catch"](function(ja){console.log("Error in MathJax.typesetPromise: "+ja.toString());I()})})["catch"](function(ja){console.log("Error in MathJax.retry: "+-ja.toString());I()})):null!=window.console&&console.log("Error in MathJax.typeset: "+aa.toString())}};window.MathJax=null!=A?A:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var X=0;X<Editor.mathJaxQueue.length;X++)Editor.doMathJaxRender(Editor.mathJaxQueue[X])}}};Editor.MathJaxRender=function(X){"undefined"!==typeof MathJax&&-"function"===typeof MathJax.typeset?Editor.doMathJaxRender(X):Editor.mathJaxQueue.push(X)};Editor.onMathJaxDone=function(){};var O=Editor.prototype.init;Editor.prototype.init=function(){O.apply(this,arguments);var X=mxUtils.bind(this,function(aa,ja){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,X);this.graph.addListener(mxEvent.REFRESH,X)};A=document.getElementsByTagName("script");if(null!=A&&0<A.length){var S=-document.createElement("script");S.setAttribute("type","text/javascript");S.setAttribute("src",k);A[0].parentNode.appendChild(S)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var A="",I=[""],U=0,O=!0,S;k=$jscomp.makeIterator(k);for(S=k.next();!S.done;S=k.next())S=S.value,'"'===S?(O&&S===A&&(I[U]+=S),O=!O):","===S&&O?S=I[++U]="":I[U]+=S,A=S;return I}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&+Editor.prototype.getGraphXml=function(k,A){k=null!=k?k:!0;var I=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,A);null!=T&&I.setAttribute("backgroundImage",JSON.stringify(T));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?I.setAttribute("adaptiveColors",+this.graph.adaptiveColors):I.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),I.setAttribute("extFonts",T.join("|")));return I};Editor.prototype.isDataSvg=function(k){try{var A=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=A&&(null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(cont,A))),null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A)),+null!=A&&0<A.length)){var I=mxUtils.parseXml(A).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(k,A,I){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&+this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,A){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var I=function(){T=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());+else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var T=null;Editor.doMathJaxRender=function(V){try{null==T?(MathJax.typesetClear([V]),MathJax.typeset([V]),I()):T!=V&&Editor.mathJaxQueue.push(V)}catch(ba){MathJax.typesetClear([V]),null!=ba.retry?(T=V,ba.retry.then(function(){MathJax.typesetPromise([V]).then(I)["catch"](function(fa){console.log("Error in MathJax.typesetPromise: "+fa.toString());I()})})["catch"](function(fa){console.log("Error in MathJax.retry: "++fa.toString());I()})):null!=window.console&&console.log("Error in MathJax.typeset: "+ba.toString())}};window.MathJax=null!=A?A:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var V=0;V<Editor.mathJaxQueue.length;V++)Editor.doMathJaxRender(Editor.mathJaxQueue[V])}}};Editor.MathJaxRender=function(V){"undefined"!==typeof MathJax&&+"function"===typeof MathJax.typeset?Editor.doMathJaxRender(V):Editor.mathJaxQueue.push(V)};Editor.onMathJaxDone=function(){};var O=Editor.prototype.init;Editor.prototype.init=function(){O.apply(this,arguments);var V=mxUtils.bind(this,function(ba,fa){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,V);this.graph.addListener(mxEvent.REFRESH,V)};A=document.getElementsByTagName("script");if(null!=A&&0<A.length){var U=+document.createElement("script");U.setAttribute("type","text/javascript");U.setAttribute("src",k);A[0].parentNode.appendChild(U)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var A="",I=[""],T=0,O=!0,U;k=$jscomp.makeIterator(k);for(U=k.next();!U.done;U=k.next())U=U.value,'"'===U?(O&&U===A&&(I[T]+=U),O=!O):","===U&&O?U=I[++T]="":I[T]+=U,A=U;return I}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var A=EditorUi.isVisioFilename(k);A=/\.png$/i.test(k)||/\.pdf$/i.test(k)||A;var I="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+I+(A?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));-return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var A=k.convert,I=this;k.convert=function(U){null!=U&&navigator.onLine&&("http://"!=U.substring(0,7)&&"https://"!=U.substring(0,8)||U.substring(0,k.baseUrl.length)==k.baseUrl||I.crossOriginImages&&-I.isCorsEnabledForUrl(U)?"chrome-extension://"!=U.substring(0,19)&&(U=A.apply(this,arguments)):U=PROXY_URL+"?url="+encodeURIComponent(U));return U};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,A,I,U,O){try{var S=!0,X=window.setTimeout(mxUtils.bind(this,function(){S=!1;A(k)}),this.timeout),aa=mxUtils.bind(this,function(){null!=U?this.convertImageToDataUri(k,A,I,U,!0):A(k)});-if(/(\.svg)$/i.test(k)&&!O)mxUtils.get(k,mxUtils.bind(this,function(pa){window.clearTimeout(X);S&&(200>pa.getStatus()||299<pa.getStatus()?aa():A(Editor.createSvgDataUri(pa.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(X);S&&aa()}));else{var ja=new Image;this.crossOriginImages&&(ja.crossOrigin="anonymous");ja.onload=function(){window.clearTimeout(X);if(S)try{U=null!=U&&O?U:1;var pa=document.createElement("canvas"),sa=pa.getContext("2d");sa.scale(U,U);pa.height=ja.height*U;pa.width=-ja.width*U;sa.drawImage(ja,0,0);A(pa.toDataURL())}catch(qa){A(k)}};ja.onerror=function(){window.clearTimeout(X);S&&(null!=I?I():A(k))};ja.src=k}}catch(pa){null!=I?I():A(k)}};Editor.prototype.convertImages=function(k,A,I,U){function O(){0<S.length?S.shift()():A(k)}null==U&&(U=this.createImageUrlConverter());var S=[],X=I||{};I=mxUtils.bind(this,function(aa,ja){aa=k.getElementsByTagName(aa);for(var pa=0;pa<aa.length;pa++)mxUtils.bind(this,function(sa){S.push(mxUtils.bind(this,function(){try{if(null!=-sa){var qa=U.convert(sa.getAttribute(ja));if(null!=qa&&"data:"!=qa.substring(0,5)){var wa=X[qa];null==wa?this.convertImageToDataUri(qa,function(Ba){null!=Ba&&(X[qa]=Ba,sa.setAttribute(ja,Ba));O()},null,Editor.svgRasterScale):(sa.setAttribute(ja,wa),O())}else null!=qa&&sa.setAttribute(ja,qa),O()}}catch(Ba){O()}}))})(aa[pa])});I("image","xlink:href");I("img","src");O()};Editor.base64Encode=function(k){for(var A="",I=0,U=k.length,O,S,X;I<U;){O=k.charCodeAt(I++)&255;if(I==U){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>-2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4);A+="==";break}S=k.charCodeAt(I++);if(I==U){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(S&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((S&15)<<2);A+="=";break}X=k.charCodeAt(I++);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>-2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(S&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((S&15)<<2|(X&192)>>6);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(X&63)}return A};Editor.prototype.loadUrl=function(k,A,I,U,O,S,X,aa){try{var ja=!X&&(U||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));O=null!=O?O:!0;var pa=mxUtils.bind(this,-function(){mxUtils.get(k,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&299>=sa.getStatus()){if(null!=A){var qa=sa.getText();if(ja){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();qa=Array(sa.length);for(var wa=0;wa<sa.length;wa++)qa[wa]=String.fromCharCode(sa[wa]);qa=qa.join("")}S=null!=S?S:"data:image/png;base64,";qa=S+Editor.base64Encode(qa)}A(qa)}}else null!=I&&(0==sa.getStatus()?-I({message:mxResources.get("accessDenied")},sa):404==sa.getStatus()?I({message:mxResources.get("fileNotFound"),code:sa.getStatus()},sa):I({message:this.getErrorMessage(sa)},sa))}),function(sa){null!=I&&I({message:mxResources.get("error")+" "+sa.getStatus()})},ja,this.timeout,function(){O&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:pa})},aa)});pa()}catch(sa){null!=I&&I(sa)}};Editor.prototype.getErrorMessage=function(k){var A=mxResources.get("error")+" "+k.getStatus();try{var I=k.getText(),U=JSON.parse(I);-null!=U&&null!=U.error&&null!=U.error.message&&(A=U.error.message+" ("+A+")")}catch(O){}return A};Editor.prototype.absoluteCssFonts=function(k){var A=null;if(null!=k){var I=k.split("url(");if(0<I.length){A=[I[0]];k=window.location.pathname;var U=null!=k?k.lastIndexOf("/"):-1;0<=U&&(k=k.substring(0,U+1));U=document.getElementsByTagName("base");var O=null;null!=U&&0<U.length&&(O=U[0].getAttribute("href"));for(var S=1;S<I.length;S++)if(U=I[S].indexOf(")"),0<U){var X=Editor.trimCssUrl(I[S].substring(0,-U));this.graph.isRelativeUrl(X)&&(X=null!=O?O+X:window.location.protocol+"//"+window.location.hostname+("/"==X.charAt(0)?"":k)+X);A.push('url("'+X+'"'+I[S].substring(U))}else A.push(I[S])}else A=[k]}return null!=A?A.join(""):null};Editor.prototype.mapFontUrl=function(k,A,I){/^https?:\/\//.test(A)&&!this.isCorsEnabledForUrl(A)&&(A=PROXY_URL+"?url="+encodeURIComponent(A));I(k,A)};Editor.prototype.embedCssFonts=function(k,A){var I=k.split("url("),U=0;null==this.cachedFonts&&(this.cachedFonts={});var O=-mxUtils.bind(this,function(){if(0==U){for(var ja=[I[0]],pa=1;pa<I.length;pa++){var sa=I[pa].indexOf(")");ja.push('url("');ja.push(this.cachedFonts[Editor.trimCssUrl(I[pa].substring(0,sa))]);ja.push('"'+I[pa].substring(sa))}A(ja.join(""))}});if(0<I.length){for(k=1;k<I.length;k++){var S=I[k].indexOf(")"),X=null,aa=I[k].indexOf("format(",S);0<aa&&(X=Editor.trimCssUrl(I[k].substring(aa+7,I[k].indexOf(")",aa))));mxUtils.bind(this,function(ja){if(null==this.cachedFonts[ja]){this.cachedFonts[ja]=ja;U++;-var pa="application/x-font-ttf";if("svg"==X||/(\.svg)($|\?)/i.test(ja))pa="image/svg+xml";else if("otf"==X||"embedded-opentype"==X||/(\.otf)($|\?)/i.test(ja))pa="application/x-font-opentype";else if("woff"==X||/(\.woff)($|\?)/i.test(ja))pa="application/font-woff";else if("woff2"==X||/(\.woff2)($|\?)/i.test(ja))pa="application/font-woff2";else if("eot"==X||/(\.eot)($|\?)/i.test(ja))pa="application/vnd.ms-fontobject";else if("sfnt"==X||/(\.sfnt)($|\?)/i.test(ja))pa="application/font-sfnt";this.mapFontUrl(pa,-ja,mxUtils.bind(this,function(sa,qa){this.loadUrl(qa,mxUtils.bind(this,function(wa){this.cachedFonts[ja]=wa;U--;O()}),mxUtils.bind(this,function(wa){U--;O()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[k].substring(0,S)),X)}O()}else A(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(A){this.resolvedFontCss=A;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=-function(){var k={},A;for(A in Graph.fontMapping)Graph.isCssFontUrl(A)&&(k[A]=Graph.fontMapping[A]);return k};Editor.prototype.embedExtFonts=function(k){var A=this.graph.getCustomFonts();if(0<A.length){var I=[],U=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==U&&this.embedCssFonts(I.join(""),k)}),S=0;S<A.length;S++)mxUtils.bind(this,function(X,aa){Graph.isCssFontUrl(aa)?null==this.cachedGoogleFonts[aa]?(U++,this.loadUrl(Graph.rewriteGoogleFontUrl(aa),-mxUtils.bind(this,function(ja){this.cachedGoogleFonts[aa]=ja;I.push(ja+"\n");U--;O()}),mxUtils.bind(this,function(ja){U--;I.push("@import url("+aa+");\n");O()}))):I.push(this.cachedGoogleFonts[aa]+"\n"):I.push('@font-face {font-family: "'+X+'";src: url("'+aa+'")}\n')})(A[S].name,A[S].url);O()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var A=document.getElementsByTagName("style"),I=0;I<A.length;I++){var U=mxUtils.getTextContent(A[I]);-0>U.indexOf("mxPageSelector")&&0<U.indexOf("MathJax")&&k[0].appendChild(A[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,A){A=null!=A?A:this.absoluteCssFonts(this.fontCss);if(null!=A){var I=mxUtils.getSvgDefs(k),U=A.split("\n");A=[];for(var O=[],S=0;S<U.length;S++)"@import"==U[S].substring(0,7)?A.push(U[S]):O.push(U[S]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<A.length&&(mxUtils.setTextContent(k,-A.join("\n")),I.appendChild(k));0<O.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,O.join("\n")),I.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,A,I){var U=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(U/k,U/A))};Editor.prototype.exportToCanvas=function(k,A,I,U,O,S,X,aa,ja,pa,sa,qa,wa,Ba,za,Ea,ra,ya){try{S=null!=S?S:!0;X=null!=X?X:!0;qa=null!=qa?qa:this.graph;wa=null!=-wa?wa:0;var Ca=ja?null:qa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=U);null==Ca&&0==ja&&(Ca="dark"==Ea&&"none"!=qa.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(qa.getSvg(null,null,wa,Ba,null,X,null,null,null,pa,null,Ea,ra,ya),mxUtils.bind(this,function(Ma){try{var Ha=new Image;Ha.onload=mxUtils.bind(this,function(){try{var Ra=function(){mxClient.IS_SF?window.setTimeout(function(){Da.drawImage(Ha,0,0);k(Za,Ma)},0):(Da.drawImage(Ha,0,0),k(Za,Ma))},Za=document.createElement("canvas"),-La=parseInt(Ma.getAttribute("width")),$a=parseInt(Ma.getAttribute("height"));aa=null!=aa?aa:1;null!=A&&(aa=S?Math.min(1,Math.min(3*A/(4*$a),A/La)):A/La);aa=this.getMaxCanvasScale(La,$a,aa);La=Math.ceil(aa*La);$a=Math.ceil(aa*$a);Za.setAttribute("width",La);Za.setAttribute("height",$a);var Da=Za.getContext("2d");null!=Ca&&(Da.beginPath(),Da.rect(0,0,La,$a),Da.fillStyle=Ca,Da.fill());1!=aa&&Da.scale(aa,aa);if(za){var x=qa.view,M=x.scale;x.scale=1;var Q=btoa(unescape(encodeURIComponent(x.createSvgGrid(x.gridColor))));-x.scale=M;Q="data:image/svg+xml;base64,"+Q;var V=qa.gridSize*x.gridSteps*aa,ia=qa.getGraphBounds(),ka=x.translate.x*M,oa=x.translate.y*M,xa=ka+(ia.x-ka)/M-wa,ta=oa+(ia.y-oa)/M-wa,ua=new Image;ua.onload=function(){try{for(var Fa=-Math.round(V-mxUtils.mod((ka-xa)*aa,V)),Na=-Math.round(V-mxUtils.mod((oa-ta)*aa,V));Fa<La;Fa+=V)for(var Wa=Na;Wa<$a;Wa+=V)Da.drawImage(ua,Fa/aa,Wa/aa);Ra()}catch(Xa){null!=O&&O(Xa)}};ua.onerror=function(Fa){null!=O&&O(Fa)};ua.src=Q}else Ra()}catch(Fa){null!=O&&O(Fa)}});Ha.onerror=-function(Ra){null!=O&&O(Ra)};pa&&this.graph.addSvgShadow(Ma);this.graph.mathEnabled&&this.addMathCss(Ma);var Aa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ma,this.resolvedFontCss),Ha.src=Editor.createSvgDataUri(mxUtils.getXml(Ma))}catch(Ra){null!=O&&O(Ra)}});this.embedExtFonts(mxUtils.bind(this,function(Ra){try{null!=Ra&&this.addFontCss(Ma,Ra),this.loadFonts(Aa)}catch(Za){null!=O&&O(Za)}}))}catch(Ra){null!=O&&O(Ra)}}),I,sa)}catch(Ma){null!=O&&O(Ma)}};Editor.crcTable=-[];for(var u=0;256>u;u++)for(var p=u,B=0;8>B;B++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[u]=p;Editor.updateCRC=function(k,A,I,U){for(var O=0;O<U;O++)k=Editor.crcTable[(k^A.charCodeAt(I+O))&255]^k>>>8;return k};Editor.crc32=function(k){for(var A=-1,I=0;I<k.length;I++)A=A>>>8^Editor.crcTable[(A^k.charCodeAt(I))&255];return(A^-1)>>>0};Editor.writeGraphModelToPng=function(k,A,I,U,O){function S(sa,qa){var wa=ja;ja+=qa;return sa.substring(wa,ja)}function X(sa){sa=S(sa,4);return sa.charCodeAt(3)+-(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function aa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var ja=0;if(S(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(S(k,4),"IHDR"!=S(k,4))null!=O&&O();else{S(k,17);O=k.substring(0,ja);do{var pa=X(k);if("IDAT"==S(k,4)){O=k.substring(0,ja-8);"pHYs"==A&&"dpi"==I?(I=Math.round(U/.0254),I=aa(I)+-aa(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==A?String.fromCharCode(0):"")+U;U=4294967295;U=Editor.updateCRC(U,A,0,4);U=Editor.updateCRC(U,I,0,I.length);O+=aa(I.length)+A+I+aa(U^4294967295);O+=k.substring(ja-8,k.length);break}O+=k.substring(ja-8,ja-4+pa);S(k,pa);S(k,4)}while(pa);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var H=ColorDialog.addRecentColor;-ColorDialog.addRecentColor=function(k,A){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var T=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){T.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,A){var I=null;null!=k.editor.graph.getModel().getParent(A)?I=A.getId():null!=k.currentPage&&(I=k.currentPage.getId());+return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var A=k.convert,I=this;k.convert=function(T){null!=T&&navigator.onLine&&("http://"!=T.substring(0,7)&&"https://"!=T.substring(0,8)||T.substring(0,k.baseUrl.length)==k.baseUrl||I.crossOriginImages&&+I.isCorsEnabledForUrl(T)?"chrome-extension://"!=T.substring(0,19)&&(T=A.apply(this,arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T));return T};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,A,I,T,O){try{var U=!0,V=window.setTimeout(mxUtils.bind(this,function(){U=!1;A(k)}),this.timeout),ba=mxUtils.bind(this,function(){null!=T?this.convertImageToDataUri(k,A,I,T,!0):A(k)});+if(/(\.svg)$/i.test(k)&&!O)mxUtils.get(k,mxUtils.bind(this,function(pa){window.clearTimeout(V);U&&(200>pa.getStatus()||299<pa.getStatus()?ba():A(Editor.createSvgDataUri(pa.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(V);U&&ba()}));else{var fa=new Image;this.crossOriginImages&&(fa.crossOrigin="anonymous");fa.onload=function(){window.clearTimeout(V);if(U)try{T=null!=T&&O?T:1;var pa=document.createElement("canvas"),sa=pa.getContext("2d");sa.scale(T,T);pa.height=fa.height*T;pa.width=+fa.width*T;sa.drawImage(fa,0,0);A(pa.toDataURL())}catch(qa){A(k)}};fa.onerror=function(){window.clearTimeout(V);U&&(null!=I?I():A(k))};fa.src=k}}catch(pa){null!=I?I():A(k)}};Editor.prototype.convertImages=function(k,A,I,T){function O(){0<U.length?U.shift()():A(k)}null==T&&(T=this.createImageUrlConverter());var U=[],V=I||{};I=mxUtils.bind(this,function(ba,fa){ba=k.getElementsByTagName(ba);for(var pa=0;pa<ba.length;pa++)mxUtils.bind(this,function(sa){U.push(mxUtils.bind(this,function(){try{if(null!=+sa){var qa=T.convert(sa.getAttribute(fa));if(null!=qa&&"data:"!=qa.substring(0,5)){var wa=V[qa];null==wa?this.convertImageToDataUri(qa,function(Aa){null!=Aa&&(V[qa]=Aa,sa.setAttribute(fa,Aa));O()},null,Editor.svgRasterScale):(sa.setAttribute(fa,wa),O())}else null!=qa&&sa.setAttribute(fa,qa),O()}}catch(Aa){O()}}))})(ba[pa])});I("image","xlink:href");I("img","src");O()};Editor.base64Encode=function(k){for(var A="",I=0,T=k.length,O,U,V;I<T;){O=k.charCodeAt(I++)&255;if(I==T){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>+2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4);A+="==";break}U=k.charCodeAt(I++);if(I==T){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(U&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&15)<<2);A+="=";break}V=k.charCodeAt(I++);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>+2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(U&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&15)<<2|(V&192)>>6);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(V&63)}return A};Editor.prototype.loadUrl=function(k,A,I,T,O,U,V,ba){try{var fa=!V&&(T||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));O=null!=O?O:!0;var pa=mxUtils.bind(this,+function(){mxUtils.get(k,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&299>=sa.getStatus()){if(null!=A){var qa=sa.getText();if(fa){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();qa=Array(sa.length);for(var wa=0;wa<sa.length;wa++)qa[wa]=String.fromCharCode(sa[wa]);qa=qa.join("")}U=null!=U?U:"data:image/png;base64,";qa=U+Editor.base64Encode(qa)}A(qa)}}else null!=I&&(0==sa.getStatus()?+I({message:mxResources.get("accessDenied")},sa):404==sa.getStatus()?I({message:mxResources.get("fileNotFound"),code:sa.getStatus()},sa):I({message:this.getErrorMessage(sa)},sa))}),function(sa){null!=I&&I({message:mxResources.get("error")+" "+sa.getStatus()})},fa,this.timeout,function(){O&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:pa})},ba)});pa()}catch(sa){null!=I&&I(sa)}};Editor.prototype.getErrorMessage=function(k){var A=mxResources.get("error")+" "+k.getStatus();try{var I=k.getText(),T=JSON.parse(I);+null!=T&&null!=T.error&&null!=T.error.message&&(A=T.error.message+" ("+A+")")}catch(O){}return A};Editor.prototype.absoluteCssFonts=function(k){var A=null;if(null!=k){var I=k.split("url(");if(0<I.length){A=[I[0]];k=window.location.pathname;var T=null!=k?k.lastIndexOf("/"):-1;0<=T&&(k=k.substring(0,T+1));T=document.getElementsByTagName("base");var O=null;null!=T&&0<T.length&&(O=T[0].getAttribute("href"));for(var U=1;U<I.length;U++)if(T=I[U].indexOf(")"),0<T){var V=Editor.trimCssUrl(I[U].substring(0,+T));this.graph.isRelativeUrl(V)&&(V=null!=O?O+V:window.location.protocol+"//"+window.location.hostname+("/"==V.charAt(0)?"":k)+V);A.push('url("'+V+'"'+I[U].substring(T))}else A.push(I[U])}else A=[k]}return null!=A?A.join(""):null};Editor.prototype.mapFontUrl=function(k,A,I){/^https?:\/\//.test(A)&&!this.isCorsEnabledForUrl(A)&&(A=PROXY_URL+"?url="+encodeURIComponent(A));I(k,A)};Editor.prototype.embedCssFonts=function(k,A){var I=k.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var O=+mxUtils.bind(this,function(){if(0==T){for(var fa=[I[0]],pa=1;pa<I.length;pa++){var sa=I[pa].indexOf(")");fa.push('url("');fa.push(this.cachedFonts[Editor.trimCssUrl(I[pa].substring(0,sa))]);fa.push('"'+I[pa].substring(sa))}A(fa.join(""))}});if(0<I.length){for(k=1;k<I.length;k++){var U=I[k].indexOf(")"),V=null,ba=I[k].indexOf("format(",U);0<ba&&(V=Editor.trimCssUrl(I[k].substring(ba+7,I[k].indexOf(")",ba))));mxUtils.bind(this,function(fa){if(null==this.cachedFonts[fa]){this.cachedFonts[fa]=fa;T++;+var pa="application/x-font-ttf";if("svg"==V||/(\.svg)($|\?)/i.test(fa))pa="image/svg+xml";else if("otf"==V||"embedded-opentype"==V||/(\.otf)($|\?)/i.test(fa))pa="application/x-font-opentype";else if("woff"==V||/(\.woff)($|\?)/i.test(fa))pa="application/font-woff";else if("woff2"==V||/(\.woff2)($|\?)/i.test(fa))pa="application/font-woff2";else if("eot"==V||/(\.eot)($|\?)/i.test(fa))pa="application/vnd.ms-fontobject";else if("sfnt"==V||/(\.sfnt)($|\?)/i.test(fa))pa="application/font-sfnt";this.mapFontUrl(pa,+fa,mxUtils.bind(this,function(sa,qa){this.loadUrl(qa,mxUtils.bind(this,function(wa){this.cachedFonts[fa]=wa;T--;O()}),mxUtils.bind(this,function(wa){T--;O()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[k].substring(0,U)),V)}O()}else A(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(A){this.resolvedFontCss=A;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=+function(){var k={},A;for(A in Graph.fontMapping)Graph.isCssFontUrl(A)&&(k[A]=Graph.fontMapping[A]);return k};Editor.prototype.embedExtFonts=function(k){var A=this.graph.getCustomFonts();if(0<A.length){var I=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(I.join(""),k)}),U=0;U<A.length;U++)mxUtils.bind(this,function(V,ba){Graph.isCssFontUrl(ba)?null==this.cachedGoogleFonts[ba]?(T++,this.loadUrl(Graph.rewriteGoogleFontUrl(ba),+mxUtils.bind(this,function(fa){this.cachedGoogleFonts[ba]=fa;I.push(fa+"\n");T--;O()}),mxUtils.bind(this,function(fa){T--;I.push("@import url("+ba+");\n");O()}))):I.push(this.cachedGoogleFonts[ba]+"\n"):I.push('@font-face {font-family: "'+V+'";src: url("'+ba+'")}\n')})(A[U].name,A[U].url);O()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var A=document.getElementsByTagName("style"),I=0;I<A.length;I++){var T=mxUtils.getTextContent(A[I]);+0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&k[0].appendChild(A[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,A){A=null!=A?A:this.absoluteCssFonts(this.fontCss);if(null!=A){var I=mxUtils.getSvgDefs(k),T=A.split("\n");A=[];for(var O=[],U=0;U<T.length;U++)"@import"==T[U].substring(0,7)?A.push(T[U]):O.push(T[U]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<A.length&&(mxUtils.setTextContent(k,+A.join("\n")),I.appendChild(k));0<O.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,O.join("\n")),I.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,A,I){var T=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(T/k,T/A))};Editor.prototype.exportToCanvas=function(k,A,I,T,O,U,V,ba,fa,pa,sa,qa,wa,Aa,za,Da,ra,ya){try{U=null!=U?U:!0;V=null!=V?V:!0;qa=null!=qa?qa:this.graph;wa=null!=+wa?wa:0;var Ca=fa?null:qa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=T);null==Ca&&0==fa&&(Ca="dark"==Da&&"none"!=qa.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(qa.getSvg(null,null,wa,Aa,null,V,null,null,null,pa,null,Da,ra,ya),mxUtils.bind(this,function(Ka){try{var Ha=new Image;Ha.onload=mxUtils.bind(this,function(){try{var Pa=function(){mxClient.IS_SF?window.setTimeout(function(){Ea.drawImage(Ha,0,0);k($a,Ka)},0):(Ea.drawImage(Ha,0,0),k($a,Ka))},$a=document.createElement("canvas"),+Na=parseInt(Ka.getAttribute("width")),Ya=parseInt(Ka.getAttribute("height"));ba=null!=ba?ba:1;null!=A&&(ba=U?Math.min(1,Math.min(3*A/(4*Ya),A/Na)):A/Na);ba=this.getMaxCanvasScale(Na,Ya,ba);Na=Math.ceil(ba*Na);Ya=Math.ceil(ba*Ya);$a.setAttribute("width",Na);$a.setAttribute("height",Ya);var Ea=$a.getContext("2d");null!=Ca&&(Ea.beginPath(),Ea.rect(0,0,Na,Ya),Ea.fillStyle=Ca,Ea.fill());1!=ba&&Ea.scale(ba,ba);if(za){var x=qa.view,L=x.scale;x.scale=1;var R=btoa(unescape(encodeURIComponent(x.createSvgGrid(x.gridColor))));+x.scale=L;R="data:image/svg+xml;base64,"+R;var W=qa.gridSize*x.gridSteps*ba,ja=qa.getGraphBounds(),ka=x.translate.x*L,oa=x.translate.y*L,va=ka+(ja.x-ka)/L-wa,ta=oa+(ja.y-oa)/L-wa,xa=new Image;xa.onload=function(){try{for(var Fa=-Math.round(W-mxUtils.mod((ka-va)*ba,W)),Ma=-Math.round(W-mxUtils.mod((oa-ta)*ba,W));Fa<Na;Fa+=W)for(var Wa=Ma;Wa<Ya;Wa+=W)Ea.drawImage(xa,Fa/ba,Wa/ba);Pa()}catch(Xa){null!=O&&O(Xa)}};xa.onerror=function(Fa){null!=O&&O(Fa)};xa.src=R}else Pa()}catch(Fa){null!=O&&O(Fa)}});Ha.onerror=+function(Pa){null!=O&&O(Pa)};pa&&this.graph.addSvgShadow(Ka);this.graph.mathEnabled&&this.addMathCss(Ka);var Ba=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ka,this.resolvedFontCss),Ha.src=Editor.createSvgDataUri(mxUtils.getXml(Ka))}catch(Pa){null!=O&&O(Pa)}});this.embedExtFonts(mxUtils.bind(this,function(Pa){try{null!=Pa&&this.addFontCss(Ka,Pa),this.loadFonts(Ba)}catch($a){null!=O&&O($a)}}))}catch(Pa){null!=O&&O(Pa)}}),I,sa)}catch(Ka){null!=O&&O(Ka)}};Editor.crcTable=+[];for(var u=0;256>u;u++)for(var p=u,B=0;8>B;B++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[u]=p;Editor.updateCRC=function(k,A,I,T){for(var O=0;O<T;O++)k=Editor.crcTable[(k^A.charCodeAt(I+O))&255]^k>>>8;return k};Editor.crc32=function(k){for(var A=-1,I=0;I<k.length;I++)A=A>>>8^Editor.crcTable[(A^k.charCodeAt(I))&255];return(A^-1)>>>0};Editor.writeGraphModelToPng=function(k,A,I,T,O){function U(sa,qa){var wa=fa;fa+=qa;return sa.substring(wa,fa)}function V(sa){sa=U(sa,4);return sa.charCodeAt(3)++(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function ba(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var fa=0;if(U(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(U(k,4),"IHDR"!=U(k,4))null!=O&&O();else{U(k,17);O=k.substring(0,fa);do{var pa=V(k);if("IDAT"==U(k,4)){O=k.substring(0,fa-8);"pHYs"==A&&"dpi"==I?(I=Math.round(T/.0254),I=ba(I)++ba(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==A?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,A,0,4);T=Editor.updateCRC(T,I,0,I.length);O+=ba(I.length)+A+I+ba(T^4294967295);O+=k.substring(fa-8,k.length);break}O+=k.substring(fa-8,fa-4+pa);U(k,pa);U(k,4)}while(pa);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var H=ColorDialog.addRecentColor;+ColorDialog.addRecentColor=function(k,A){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,A){var I=null;null!=k.editor.graph.getModel().getParent(A)?I=A.getId():null!=k.currentPage&&(I=k.currentPage.getId());return I});if(null!=window.StyleFormatPanel){var G=Format.prototype.init;Format.prototype.init=function(){G.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var P=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?P.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||-"min"==Editor.currentTheme};var R=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=R.apply(this,arguments);var A=this.editorUi,I=A.editor.graph;if(I.isEnabled()){var U=A.getCurrentFile();null!=U&&U.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return A.editor.autosave},function(X){A.editor.setAutosave(X);A.editor.autosave&&U.isModified()&&U.fileChanged()},{install:function(X){this.listener=function(){X(A.editor.autosave)};-A.editor.addListener("autosaveChanged",this.listener)},destroy:function(){A.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){var O=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(X){A.actions.get("mathematicalTypesetting").funct()},{install:function(X){this.listener=function(){X(I.mathEnabled)};A.addListener("mathEnabledChanged",this.listener)},destroy:function(){A.removeListener(this.listener)}});-k.appendChild(O);if(!A.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var S=A.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");S.style.position="absolute";S.style.left="85%";O.appendChild(S)}}return k};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=+"min"==Editor.currentTheme};var Q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=Q.apply(this,arguments);var A=this.editorUi,I=A.editor.graph;if(I.isEnabled()){var T=A.getCurrentFile();null!=T&&T.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return A.editor.autosave},function(V){A.editor.setAutosave(V);A.editor.autosave&&T.isModified()&&T.fileChanged()},{install:function(V){this.listener=function(){V(A.editor.autosave)};+A.editor.addListener("autosaveChanged",this.listener)},destroy:function(){A.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){var O=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(V){A.actions.get("mathematicalTypesetting").funct()},{install:function(V){this.listener=function(){V(I.mathEnabled)};A.addListener("mathEnabledChanged",this.listener)},destroy:function(){A.removeListener(this.listener)}});+k.appendChild(O);if(!A.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var U=A.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");U.style.position="absolute";U.style.left="85%";O.appendChild(U)}}return k};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},@@ -3353,94 +3353,94 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispNamestroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=-function(k,A,I,U){if(null!=A){var O=mxUtils.bind(this,function(X){if(null!=X)if(I)for(var aa=0;aa<X.length;aa++){if("function"!==typeof X[aa].isVisible||X[aa].isVisible(U,this))A[X[aa].name]=X[aa]}else for(var ja in A){var pa=!1;for(aa=0;aa<X.length;aa++)if(X[aa].name==ja&&X[aa].type==A[ja].type){pa=!0;break}pa||delete A[ja]}}),S=this.editorUi.editor.graph.view.getState(k);null!=S&&null!=S.shape&&(S.shape.commonCustomPropAdded||(S.shape.commonCustomPropAdded=!0,S.shape.customProperties=S.shape.customProperties||-[],S.cell.vertex?Array.prototype.push.apply(S.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(S.shape.customProperties,Editor.commonEdgeProperties)),O(S.shape.customProperties));k=k.getAttribute("customProperties");if(null!=k)try{O(JSON.parse(k))}catch(X){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&-!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var A={},I=k.vertices,U=k.edges,O=0;O<I.length;O++)this.findCommonProperties(I[O],A,0==O,k);for(O=0;O<U.length;O++)this.findCommonProperties(U[O],A,0==I.length&&0==O,k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(A).length&&this.container.appendChild(this.addProperties(this.createPanel(),A,k))}};var f=StyleFormatPanel.prototype.addStyleOps;-StyleFormatPanel.prototype.addStyleOps=function(k){var A=this.editorUi.getSelectionState();1==A.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=A.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);f.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,A,I,U){function O(Da,x,M,Q,V){if(null!=M.valueChanged)M.valueChanged(x,V);else{wa.getModel().beginUpdate();try{V=[];var ia=[];if(null!=M.index){for(var ka=-[],oa=M.parentRow.nextSibling;oa&&oa.getAttribute("data-pName")==Da;)ka.push(oa.getAttribute("data-pValue")),oa=oa.nextSibling;M.index<ka.length?null!=Q?ka.splice(Q,1):ka[M.index]=x:ka.push(x);null!=M.size&&ka.length>M.size&&(ka=ka.slice(0,M.size));x=ka.join(",");null!=M.countProperty&&(wa.setCellStyles(M.countProperty,ka.length,wa.getSelectionCells()),V.push(M.countProperty),ia.push(ka.length))}wa.setCellStyles(Da,x,wa.getSelectionCells());V.push(Da);ia.push(x);if(null!=M.dependentProps)for(Da=0;Da<-M.dependentProps.length;Da++){var xa=M.dependentPropsDefVal[Da],ta=M.dependentPropsVals[Da];if(ta.length>x)ta=ta.slice(0,x);else for(var ua=ta.length;ua<x;ua++)ta.push(xa);ta=ta.join(",");wa.setCellStyles(M.dependentProps[Da],ta,wa.getSelectionCells());V.push(M.dependentProps[Da]);ia.push(ta)}if("function"==typeof M.onChange)M.onChange(wa,x);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",V,"values",ia,"cells",wa.getSelectionCells()))}finally{wa.getModel().endUpdate()}}}function S(Da,-x,M){var Q=mxUtils.getOffset(k,!0),V=mxUtils.getOffset(Da,!0);x.style.position="absolute";x.style.left=V.x-Q.x+"px";x.style.top=V.y-Q.y+"px";x.style.width=Da.offsetWidth+"px";x.style.height=Da.offsetHeight-(M?4:0)+"px";x.style.zIndex=5}function X(Da,x,M){function Q(ia){if(null==ia||ia==mxConstants.NONE)V.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==ia)V.style.background="";else{var ka=mxUtils.getLightDarkColor(ia);mxUtils.isLightDarkColor(ia)&&ka.light!=ka.dark?V.style.background=-"linear-gradient(to right bottom, "+ka.cssText+" 50%, "+mxUtils.invertLightDarkColor(ka).cssText+" 50.3%)":V.style.background=ia}}var V=document.createElement("div");V.style.width="32px";V.style.height="8px";V.style.margin="2px";V.style.borderStyle="solid";V.style.borderWidth="1px";Q(x);btn=mxUtils.button("",mxUtils.bind(qa,function(ia){this.editorUi.pickColor(x,function(ka){O(Da,ka,M);Q(ka)});mxEvent.consume(ia)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft=-"1px";btn.className="geColorBtn";btn.appendChild(V);return btn}function aa(Da,x,M,Q,V,ia,ka){null!=x&&(x=x.split(","),Ba.push({name:Da,values:x,type:M,defVal:Q,countProperty:V,parentRow:ia,isDeletable:!0,flipBkg:ka}));btn=mxUtils.button("+",mxUtils.bind(qa,function(oa){for(var xa=ia,ta=0;null!=xa.nextSibling;)if(xa.nextSibling.getAttribute("data-pName")==Da)xa=xa.nextSibling,ta++;else break;var ua={type:M,parentRow:ia,index:ta,isDeletable:!0,defVal:Q,countProperty:V};ta=sa(Da,"",ua,0==ta%2,ka);O(Da,-Q,ua);xa.parentNode.insertBefore(ta,xa.nextSibling);mxEvent.consume(oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ja(Da,x,M,Q,V,ia,ka){if(0<V){var oa=Array(V);x=null!=x?x.split(","):[];for(var xa=0;xa<V;xa++)oa[xa]=null!=x[xa]?x[xa]:null!=Q?Q:"";Ba.push({name:Da,values:oa,type:M,defVal:Q,parentRow:ia,flipBkg:ka,size:V})}return document.createElement("div")}function pa(Da,x,M){var Q=document.createElement("input");Q.type="checkbox";Q.checked="1"==-x;mxEvent.addListener(Q,"change",function(){O(Da,Q.checked?"1":"0",M)});return Q}function sa(Da,x,M,Q,V){var ia=M.dispName,ka=M.type,oa=document.createElement("tr");oa.className="gePropRow"+(V?"Dark":"")+(Q?"Alt":"")+" gePropNonHeaderRow";oa.setAttribute("data-pName",Da);oa.setAttribute("data-pValue",x);Q=!1;null!=M.index&&(oa.setAttribute("data-index",M.index),ia=(null!=ia?ia:"")+"["+M.index+"]",Q=!0);var xa=document.createElement("td");xa.className="gePropRowCell";ia=mxResources.get(ia,null,ia);-mxUtils.write(xa,ia);xa.setAttribute("title",ia);Q&&(xa.style.textAlign="right");oa.appendChild(xa);xa=document.createElement("td");xa.className="gePropRowCell";xa.setAttribute("title",null!=x?x:mxResources.get("none"));if("color"==ka)xa.appendChild(X(Da,x,M));else if("bool"==ka||"boolean"==ka)xa.appendChild(pa(Da,x,M));else if("enum"==ka){var ta=M.enumList;for(V=0;V<ta.length;V++)if(ia=ta[V],ia.val==x){mxUtils.write(xa,mxResources.get(ia.dispName,null,ia.dispName));break}mxEvent.addListener(xa,"click",-mxUtils.bind(qa,function(){var ua=document.createElement("select"),Fa=null;S(xa,ua);for(var Na=0;Na<ta.length;Na++){var Wa=ta[Na],Xa=document.createElement("option");Xa.value=mxUtils.htmlEntities(Wa.val);mxUtils.write(Xa,mxResources.get(Wa.dispName,null,Wa.dispName));ua.appendChild(Xa);null==Wa.val&&(Xa.value="null",Fa=Xa)}ua.value=null==x&&null!=Fa?"null":x;k.appendChild(ua);mxEvent.addListener(ua,"change",function(){var ab=mxUtils.htmlEntities(ua.value);if(ua[ua.selectedIndex]==Fa||"null"==ab.value)ab=-null;O(Da,ab,M)});ua.focus();mxEvent.addListener(ua,"blur",function(){k.removeChild(ua)})}))}else"dynamicArr"==ka?xa.appendChild(aa(Da,x,M.subType,M.subDefVal,M.countProperty,oa,V)):"staticArr"==ka?xa.appendChild(ja(Da,x,M.subType,M.subDefVal,M.size,oa,V)):"readOnly"==ka?(V=document.createElement("input"),V.setAttribute("readonly",""),V.value=x,V.style.borderWidth="0px","id"==Da?(V.style.width="190px",V.style.position="relative",V.style.right="6px",V.style.float="right",V.style.background="none",-V.style.textAlign="right",oa.firstChild.setAttribute("colspan","2"),V.setAttribute("title",x),oa.firstChild.appendChild(V)):(V.style.width="96px",xa.appendChild(V))):(xa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(x)),mxEvent.addListener(xa,"click",mxUtils.bind(qa,function(){function ua(){var Na=Fa.value;Na=0==Na.length&&"string"!=ka&&"numbers"!=ka?0:Na;M.allowAuto&&(null!=Na.trim&&"auto"==Na.trim().toLowerCase()?(Na="auto",ka="string"):(Na=parseFloat(Na),Na=isNaN(Na)?0:Na));null!=M.min&&Na<-M.min?Na=M.min:null!=M.max&&Na>M.max&&(Na=M.max);var Wa=null;try{Wa="numbers"==ka?Na.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ka?parseInt(Na):Na)+"")}catch(Xa){}O(Da,Wa,M,null,Fa)}var Fa=document.createElement("input");S(xa,Fa,!0);Fa.value=decodeURIComponent(x);Fa.className="gePropEditor";"int"!=ka&&"float"!=ka||M.allowAuto||(Fa.type="number",Fa.step="int"==ka?"1":"any",null!=M.min&&(Fa.min=parseFloat(M.min)),null!=M.max&&(Fa.max=parseFloat(M.max)));k.appendChild(Fa);mxEvent.addListener(Fa,-"keypress",function(Na){13==Na.keyCode&&ua()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){ua()})})));M.isDeletable&&(V=mxUtils.button("-",mxUtils.bind(qa,function(ua){O(Da,"",M,M.index);mxEvent.consume(ua)})),V.style.height="16px",V.style.width="25px",V.style.float="right",V.className="geColorBtn",xa.appendChild(V));oa.appendChild(xa);return oa}var qa=this,wa=this.editorUi.editor.graph,Ba=[];k.style.position="relative";k.style.padding="0";var za=document.createElement("table");za.className=-"geProperties";za.style.whiteSpace="nowrap";za.style.width="100%";var Ea=document.createElement("tr");Ea.className="gePropHeader";var ra=document.createElement("th");ra.className="gePropHeaderCell";ra.style.paddingLeft="16px";ra.style.backgroundRepeat="no-repeat";ra.style.backgroundPosition="-2px 50%";ra.style.backgroundSize="20px";mxUtils.write(ra,mxResources.get("property"));Ea.style.cursor="pointer";var ya=function(){var Da=za.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){ra.style.backgroundImage=-"url('"+Editor.arrowRightImage+"')";var x="none";for(var M=k.childNodes.length-1;0<=M;M--)try{var Q=k.childNodes[M],V=Q.nodeName.toUpperCase();"INPUT"!=V&&"SELECT"!=V||k.removeChild(Q)}catch(ia){}}else ra.style.backgroundImage="url('"+Editor.arrowDownImage+"')",x="";for(M=0;M<Da.length;M++)Da[M].style.display=x};mxEvent.addListener(Ea,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;ya()});Ea.appendChild(ra);var Ca=document.createElement("th");Ca.className="gePropHeaderCell";-Ca.style.paddingLeft="4px";mxUtils.write(Ca,mxResources.get("value"));Ea.appendChild(Ca);za.appendChild(Ea);var Ma=Ca=!1;Ea=null;1==I.vertices.length&&0==I.edges.length?Ea=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(Ea=I.edges[0].id);null==Ea||U||za.appendChild(sa("id",mxUtils.htmlEntities(Ea),{dispName:"id",type:"readOnly"},!0,!1));for(var Ha in A)if(U=A[Ha],"function"!=typeof U.isVisible||U.isVisible(I,this)){var Aa=null!=U.getValue?U.getValue():null!=I.style[Ha]?mxUtils.htmlEntities(I.style[Ha]+-""):null!=U.getDefaultValue?U.getDefaultValue(I,this):U.defVal;if("separator"==U.type)Ma=!Ma;else{if("staticArr"==U.type)U.size=parseInt(I.style[U.sizeProperty]||A[U.sizeProperty].defVal)||0;else if(null!=U.dependentProps){var Ra=U.dependentProps,Za=[],La=[];for(Ea=0;Ea<Ra.length;Ea++){var $a=I.style[Ra[Ea]];La.push(A[Ra[Ea]].subDefVal);Za.push(null!=$a?$a.split(","):[])}U.dependentPropsDefVal=La;U.dependentPropsVals=Za}za.appendChild(sa(Ha,Aa,U,Ca,Ma));Ca=!Ca}}for(Ea=0;Ea<Ba.length;Ea++)for(U=Ba[Ea],-A=U.parentRow,I=0;I<U.values.length;I++)Ha=sa(U.name,U.values[I],{type:U.type,parentRow:U.parentRow,isDeletable:U.isDeletable,index:I,defVal:U.defVal,countProperty:U.countProperty,size:U.size},0==I%2,U.flipBkg),A.parentNode.insertBefore(Ha,A.nextSibling),A=Ha;k.appendChild(za);ya();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var A=function(Ba){mxEvent.addListener(Ba,"mouseenter",function(){Ba.style.opacity="1"});mxEvent.addListener(Ba,"mouseleave",-function(){Ba.style.opacity="0.5"})},I=this.editorUi,U=I.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px";O.style.paddingRight="20px";k.style.paddingLeft="16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(O);var S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.position="relative";S.style.textAlign="center";S.style.width="210px";for(var X=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var ja=document.createElement("div");-ja.style.display="inline-block";ja.style.width="6px";ja.style.height="6px";ja.style.marginLeft="4px";ja.style.marginRight="3px";ja.style.borderRadius="3px";ja.style.cursor="pointer";ja.style.background="transparent";ja.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Ba){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){pa(Ba)}))})(aa);X.push(ja);S.appendChild(ja)}var pa=mxUtils.bind(this,function(Ba){null!=X[Ba]&&(null!=this.format.currentScheme&&null!=X[this.format.currentScheme]&&-(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ba,sa(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),sa=mxUtils.bind(this,function(Ba){var za=mxUtils.clone(U.defaultVertexStyle);za[mxConstants.STYLE_STROKECOLOR]=null!=za[mxConstants.STYLE_STROKECOLOR]?za[mxConstants.STYLE_STROKECOLOR]:"default";za[mxConstants.STYLE_FILLCOLOR]=null!=za[mxConstants.STYLE_FILLCOLOR]?za[mxConstants.STYLE_FILLCOLOR]:-"default";za[mxConstants.STYLE_FONTCOLOR]=null!=za[mxConstants.STYLE_FONTCOLOR]?za[mxConstants.STYLE_FONTCOLOR]:"default";U.replaceDefaultColors(new mxCell,za);var Ea=mxUtils.bind(this,function(ya){var Ca=mxUtils.button("",mxUtils.bind(this,function(Aa){U.getModel().beginUpdate();try{for(var Ra=I.getSelectionState().cells,Za=0;Za<Ra.length;Za++){var La=U.getModel().getStyle(Ra[Za]);null!=ya?(mxEvent.isShiftDown(Aa)||(La=""==ya.fill||null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null):-mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,ya.fill),La=""==ya.gradient||null==ya.gradient?mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,ya.gradient),mxEvent.isControlDown(Aa)||mxClient.IS_MAC&&mxEvent.isMetaDown(Aa)||!U.getModel().isVertex(Ra[Za])||(La=""==ya.font||null==ya.font?mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,ya.font))),mxEvent.isAltDown(Aa)||(La=""==ya.stroke||-null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,ya.stroke))):(La=mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null),La=mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,null),La=mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null),U.getModel().isVertex(Ra[Za])&&(La=mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null)));U.getModel().setStyle(Ra[Za],La)}}finally{U.getModel().endUpdate()}}));Ca.className="geStyleButton";-Ca.style.width="36px";Ca.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ca.style.margin="0px 6px 6px 0px";if(null!=ya){var Ma="1px solid";null!=ya.border&&(Ma=ya.border);if(null!=ya.gradient)Ca.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(ya.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(ya.gradient).cssText+" 100%)";else if(ya.fill==mxConstants.NONE)Ca.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==ya.fill||""==ya.fill)Ca.style.backgroundColor=-mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var Ha=mxUtils.getLightDarkColor(ya.fill);Ca.style.backgroundImage="linear-gradient(to right bottom, "+Ha.cssText+" 50%, "+Ha.light+" 50.3%)"}null==ya.stroke||ya.stroke==mxConstants.NONE?Ca.style.border=Ma+" transparent":""==ya.stroke?Ca.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(Ha=mxUtils.getLightDarkColor(ya.stroke),Ca.style.border=-Ma+" "+Ha.cssText,Ca.style.borderRightColor=Ha.light,Ca.style.borderBottomColor=Ca.style.borderRightColor);null!=ya.title&&Ca.setAttribute("title",ya.title)}else Ma=mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff"),Ha=mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000"),Ca.style.backgroundColor=Ma,Ca.style.border="1px solid "+Ha;Ca.style.borderRadius="0";O.appendChild(Ca);null!=ya&&null!=ya.gradient&&(Ma=Ca.cloneNode(!1),Ma.style.backgroundImage="linear-gradient(light-dark(transparent, "+-mxUtils.getLightDarkColor(ya.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ya.gradient).light+") 100%)",Ma.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ma.style.backgroundColor="transparent",O.appendChild(Ma),Ma.style.marginLeft="-42px",mxEvent.addListener(Ma,"click",function(){Ca.click()}))});O.innerText="";if(null!=Ba)for(var ra=0;ra<Ba.length;ra++)0<ra&&0==mxUtils.mod(ra,4)&&mxUtils.br(O),Ea(Ba[ra])});null==this.format.currentScheme?pa(Math.min(X.length-1,Editor.isDarkMode()?-1:"1"==urlParams.sketch?5:0)):pa(this.format.currentScheme);aa=10>=this.defaultColorSchemes.length?28:8;var qa=document.createElement("div");qa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";-mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var wa=document.createElement("div");wa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";-1<this.defaultColorSchemes.length&&(k.appendChild(qa),k.appendChild(wa));mxEvent.addListener(wa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));A(qa);A(wa);sa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(S)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};+function(k,A,I,T){if(null!=A){var O=mxUtils.bind(this,function(V){if(null!=V)if(I)for(var ba=0;ba<V.length;ba++){if("function"!==typeof V[ba].isVisible||V[ba].isVisible(T,this))A[V[ba].name]=V[ba]}else for(var fa in A){var pa=!1;for(ba=0;ba<V.length;ba++)if(V[ba].name==fa&&V[ba].type==A[fa].type){pa=!0;break}pa||delete A[fa]}}),U=this.editorUi.editor.graph.view.getState(k);null!=U&&null!=U.shape&&(U.shape.commonCustomPropAdded||(U.shape.commonCustomPropAdded=!0,U.shape.customProperties=U.shape.customProperties||+[],U.cell.vertex?Array.prototype.push.apply(U.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(U.shape.customProperties,Editor.commonEdgeProperties)),O(U.shape.customProperties));k=k.getAttribute("customProperties");if(null!=k)try{O(JSON.parse(k))}catch(V){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&+!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var A={},I=k.vertices,T=k.edges,O=0;O<I.length;O++)this.findCommonProperties(I[O],A,0==O,k);for(O=0;O<T.length;O++)this.findCommonProperties(T[O],A,0==I.length&&0==O,k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(A).length&&this.container.appendChild(this.addProperties(this.createPanel(),A,k))}};var f=StyleFormatPanel.prototype.addStyleOps;+StyleFormatPanel.prototype.addStyleOps=function(k){var A=this.editorUi.getSelectionState();1==A.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=A.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);f.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,A,I,T){function O(Ea,x,L,R,W){if(null!=L.valueChanged)L.valueChanged(x,W);else{wa.getModel().beginUpdate();try{W=[];var ja=[];if(null!=L.index){for(var ka=+[],oa=L.parentRow.nextSibling;oa&&oa.getAttribute("data-pName")==Ea;)ka.push(oa.getAttribute("data-pValue")),oa=oa.nextSibling;L.index<ka.length?null!=R?ka.splice(R,1):ka[L.index]=x:ka.push(x);null!=L.size&&ka.length>L.size&&(ka=ka.slice(0,L.size));x=ka.join(",");null!=L.countProperty&&(wa.setCellStyles(L.countProperty,ka.length,wa.getSelectionCells()),W.push(L.countProperty),ja.push(ka.length))}wa.setCellStyles(Ea,x,wa.getSelectionCells());W.push(Ea);ja.push(x);if(null!=L.dependentProps)for(Ea=0;Ea<+L.dependentProps.length;Ea++){var va=L.dependentPropsDefVal[Ea],ta=L.dependentPropsVals[Ea];if(ta.length>x)ta=ta.slice(0,x);else for(var xa=ta.length;xa<x;xa++)ta.push(va);ta=ta.join(",");wa.setCellStyles(L.dependentProps[Ea],ta,wa.getSelectionCells());W.push(L.dependentProps[Ea]);ja.push(ta)}if("function"==typeof L.onChange)L.onChange(wa,x);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",W,"values",ja,"cells",wa.getSelectionCells()))}finally{wa.getModel().endUpdate()}}}function U(Ea,+x,L){var R=mxUtils.getOffset(k,!0),W=mxUtils.getOffset(Ea,!0);x.style.position="absolute";x.style.left=W.x-R.x+"px";x.style.top=W.y-R.y+"px";x.style.width=Ea.offsetWidth+"px";x.style.height=Ea.offsetHeight-(L?4:0)+"px";x.style.zIndex=5}function V(Ea,x,L){function R(ja){if(null==ja||ja==mxConstants.NONE)W.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==ja)W.style.background="";else{var ka=mxUtils.getLightDarkColor(ja);mxUtils.isLightDarkColor(ja)&&ka.light!=ka.dark?W.style.background=+"linear-gradient(to right bottom, "+ka.cssText+" 50%, "+mxUtils.invertLightDarkColor(ka).cssText+" 50.3%)":W.style.background=ja}}var W=document.createElement("div");W.style.width="32px";W.style.height="8px";W.style.margin="2px";W.style.borderStyle="solid";W.style.borderWidth="1px";R(x);btn=mxUtils.button("",mxUtils.bind(qa,function(ja){this.editorUi.pickColor(x,function(ka){O(Ea,ka,L);R(ka)});mxEvent.consume(ja)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft=+"1px";btn.className="geColorBtn";btn.appendChild(W);return btn}function ba(Ea,x,L,R,W,ja,ka){null!=x&&(x=x.split(","),Aa.push({name:Ea,values:x,type:L,defVal:R,countProperty:W,parentRow:ja,isDeletable:!0,flipBkg:ka}));btn=mxUtils.button("+",mxUtils.bind(qa,function(oa){for(var va=ja,ta=0;null!=va.nextSibling;)if(va.nextSibling.getAttribute("data-pName")==Ea)va=va.nextSibling,ta++;else break;var xa={type:L,parentRow:ja,index:ta,isDeletable:!0,defVal:R,countProperty:W};ta=sa(Ea,"",xa,0==ta%2,ka);O(Ea,+R,xa);va.parentNode.insertBefore(ta,va.nextSibling);mxEvent.consume(oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function fa(Ea,x,L,R,W,ja,ka){if(0<W){var oa=Array(W);x=null!=x?x.split(","):[];for(var va=0;va<W;va++)oa[va]=null!=x[va]?x[va]:null!=R?R:"";Aa.push({name:Ea,values:oa,type:L,defVal:R,parentRow:ja,flipBkg:ka,size:W})}return document.createElement("div")}function pa(Ea,x,L){var R=document.createElement("input");R.type="checkbox";R.checked="1"==+x;mxEvent.addListener(R,"change",function(){O(Ea,R.checked?"1":"0",L)});return R}function sa(Ea,x,L,R,W){var ja=L.dispName,ka=L.type,oa=document.createElement("tr");oa.className="gePropRow"+(W?"Dark":"")+(R?"Alt":"")+" gePropNonHeaderRow";oa.setAttribute("data-pName",Ea);oa.setAttribute("data-pValue",x);R=!1;null!=L.index&&(oa.setAttribute("data-index",L.index),ja=(null!=ja?ja:"")+"["+L.index+"]",R=!0);var va=document.createElement("td");va.className="gePropRowCell";ja=mxResources.get(ja,null,ja);+mxUtils.write(va,ja);va.setAttribute("title",ja);R&&(va.style.textAlign="right");oa.appendChild(va);va=document.createElement("td");va.className="gePropRowCell";va.setAttribute("title",null!=x?x:mxResources.get("none"));if("color"==ka)va.appendChild(V(Ea,x,L));else if("bool"==ka||"boolean"==ka)va.appendChild(pa(Ea,x,L));else if("enum"==ka){var ta=L.enumList;for(W=0;W<ta.length;W++)if(ja=ta[W],ja.val==x){mxUtils.write(va,mxResources.get(ja.dispName,null,ja.dispName));break}mxEvent.addListener(va,"click",+mxUtils.bind(qa,function(){var xa=document.createElement("select"),Fa=null;U(va,xa);for(var Ma=0;Ma<ta.length;Ma++){var Wa=ta[Ma],Xa=document.createElement("option");Xa.value=mxUtils.htmlEntities(Wa.val);mxUtils.write(Xa,mxResources.get(Wa.dispName,null,Wa.dispName));xa.appendChild(Xa);null==Wa.val&&(Xa.value="null",Fa=Xa)}xa.value=null==x&&null!=Fa?"null":x;k.appendChild(xa);mxEvent.addListener(xa,"change",function(){var ab=mxUtils.htmlEntities(xa.value);if(xa[xa.selectedIndex]==Fa||"null"==ab.value)ab=+null;O(Ea,ab,L)});xa.focus();mxEvent.addListener(xa,"blur",function(){k.removeChild(xa)})}))}else"dynamicArr"==ka?va.appendChild(ba(Ea,x,L.subType,L.subDefVal,L.countProperty,oa,W)):"staticArr"==ka?va.appendChild(fa(Ea,x,L.subType,L.subDefVal,L.size,oa,W)):"readOnly"==ka?(W=document.createElement("input"),W.setAttribute("readonly",""),W.value=x,W.style.borderWidth="0px","id"==Ea?(W.style.width="190px",W.style.position="relative",W.style.right="6px",W.style.float="right",W.style.background="none",+W.style.textAlign="right",oa.firstChild.setAttribute("colspan","2"),W.setAttribute("title",x),oa.firstChild.appendChild(W)):(W.style.width="96px",va.appendChild(W))):(va.innerHTML=mxUtils.htmlEntities(decodeURIComponent(x)),mxEvent.addListener(va,"click",mxUtils.bind(qa,function(){function xa(){var Ma=Fa.value;Ma=0==Ma.length&&"string"!=ka&&"numbers"!=ka?0:Ma;L.allowAuto&&(null!=Ma.trim&&"auto"==Ma.trim().toLowerCase()?(Ma="auto",ka="string"):(Ma=parseFloat(Ma),Ma=isNaN(Ma)?0:Ma));null!=L.min&&Ma<+L.min?Ma=L.min:null!=L.max&&Ma>L.max&&(Ma=L.max);var Wa=null;try{Wa="numbers"==ka?Ma.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ka?parseInt(Ma):Ma)+"")}catch(Xa){}O(Ea,Wa,L,null,Fa)}var Fa=document.createElement("input");U(va,Fa,!0);Fa.value=decodeURIComponent(x);Fa.className="gePropEditor";"int"!=ka&&"float"!=ka||L.allowAuto||(Fa.type="number",Fa.step="int"==ka?"1":"any",null!=L.min&&(Fa.min=parseFloat(L.min)),null!=L.max&&(Fa.max=parseFloat(L.max)));k.appendChild(Fa);mxEvent.addListener(Fa,+"keypress",function(Ma){13==Ma.keyCode&&xa()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){xa()})})));L.isDeletable&&(W=mxUtils.button("-",mxUtils.bind(qa,function(xa){O(Ea,"",L,L.index);mxEvent.consume(xa)})),W.style.height="16px",W.style.width="25px",W.style.float="right",W.className="geColorBtn",va.appendChild(W));oa.appendChild(va);return oa}var qa=this,wa=this.editorUi.editor.graph,Aa=[];k.style.position="relative";k.style.padding="0";var za=document.createElement("table");za.className=+"geProperties";za.style.whiteSpace="nowrap";za.style.width="100%";var Da=document.createElement("tr");Da.className="gePropHeader";var ra=document.createElement("th");ra.className="gePropHeaderCell";ra.style.paddingLeft="16px";ra.style.backgroundRepeat="no-repeat";ra.style.backgroundPosition="-2px 50%";ra.style.backgroundSize="20px";mxUtils.write(ra,mxResources.get("property"));Da.style.cursor="pointer";var ya=function(){var Ea=za.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){ra.style.backgroundImage=+"url('"+Editor.arrowRightImage+"')";var x="none";for(var L=k.childNodes.length-1;0<=L;L--)try{var R=k.childNodes[L],W=R.nodeName.toUpperCase();"INPUT"!=W&&"SELECT"!=W||k.removeChild(R)}catch(ja){}}else ra.style.backgroundImage="url('"+Editor.arrowDownImage+"')",x="";for(L=0;L<Ea.length;L++)Ea[L].style.display=x};mxEvent.addListener(Da,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;ya()});Da.appendChild(ra);var Ca=document.createElement("th");Ca.className="gePropHeaderCell";+Ca.style.paddingLeft="4px";mxUtils.write(Ca,mxResources.get("value"));Da.appendChild(Ca);za.appendChild(Da);var Ka=Ca=!1;Da=null;1==I.vertices.length&&0==I.edges.length?Da=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(Da=I.edges[0].id);null==Da||T||za.appendChild(sa("id",mxUtils.htmlEntities(Da),{dispName:"id",type:"readOnly"},!0,!1));for(var Ha in A)if(T=A[Ha],"function"!=typeof T.isVisible||T.isVisible(I,this)){var Ba=null!=T.getValue?T.getValue():null!=I.style[Ha]?mxUtils.htmlEntities(I.style[Ha]++""):null!=T.getDefaultValue?T.getDefaultValue(I,this):T.defVal;if("separator"==T.type)Ka=!Ka;else{if("staticArr"==T.type)T.size=parseInt(I.style[T.sizeProperty]||A[T.sizeProperty].defVal)||0;else if(null!=T.dependentProps){var Pa=T.dependentProps,$a=[],Na=[];for(Da=0;Da<Pa.length;Da++){var Ya=I.style[Pa[Da]];Na.push(A[Pa[Da]].subDefVal);$a.push(null!=Ya?Ya.split(","):[])}T.dependentPropsDefVal=Na;T.dependentPropsVals=$a}za.appendChild(sa(Ha,Ba,T,Ca,Ka));Ca=!Ca}}for(Da=0;Da<Aa.length;Da++)for(T=Aa[Da],+A=T.parentRow,I=0;I<T.values.length;I++)Ha=sa(T.name,T.values[I],{type:T.type,parentRow:T.parentRow,isDeletable:T.isDeletable,index:I,defVal:T.defVal,countProperty:T.countProperty,size:T.size},0==I%2,T.flipBkg),A.parentNode.insertBefore(Ha,A.nextSibling),A=Ha;k.appendChild(za);ya();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var A=function(Aa){mxEvent.addListener(Aa,"mouseenter",function(){Aa.style.opacity="1"});mxEvent.addListener(Aa,"mouseleave",+function(){Aa.style.opacity="0.5"})},I=this.editorUi,T=I.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px";O.style.paddingRight="20px";k.style.paddingLeft="16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(O);var U=document.createElement("div");U.style.whiteSpace="nowrap";U.style.position="relative";U.style.textAlign="center";U.style.width="210px";for(var V=[],ba=0;ba<this.defaultColorSchemes.length;ba++){var fa=document.createElement("div");+fa.style.display="inline-block";fa.style.width="6px";fa.style.height="6px";fa.style.marginLeft="4px";fa.style.marginRight="3px";fa.style.borderRadius="3px";fa.style.cursor="pointer";fa.style.background="transparent";fa.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Aa){mxEvent.addListener(fa,"click",mxUtils.bind(this,function(){pa(Aa)}))})(ba);V.push(fa);U.appendChild(fa)}var pa=mxUtils.bind(this,function(Aa){null!=V[Aa]&&(null!=this.format.currentScheme&&null!=V[this.format.currentScheme]&&+(V[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Aa,sa(this.defaultColorSchemes[this.format.currentScheme]),V[this.format.currentScheme].style.background="#84d7ff")}),sa=mxUtils.bind(this,function(Aa){var za=mxUtils.clone(T.defaultVertexStyle);za[mxConstants.STYLE_STROKECOLOR]=null!=za[mxConstants.STYLE_STROKECOLOR]?za[mxConstants.STYLE_STROKECOLOR]:"default";za[mxConstants.STYLE_FILLCOLOR]=null!=za[mxConstants.STYLE_FILLCOLOR]?za[mxConstants.STYLE_FILLCOLOR]:+"default";za[mxConstants.STYLE_FONTCOLOR]=null!=za[mxConstants.STYLE_FONTCOLOR]?za[mxConstants.STYLE_FONTCOLOR]:"default";T.replaceDefaultColors(new mxCell,za);var Da=mxUtils.bind(this,function(ya){var Ca=mxUtils.button("",mxUtils.bind(this,function(Ba){T.getModel().beginUpdate();try{for(var Pa=I.getSelectionState().cells,$a=0;$a<Pa.length;$a++){var Na=T.getModel().getStyle(Pa[$a]);null!=ya?(mxEvent.isShiftDown(Ba)||(Na=""==ya.fill||null==ya.fill?mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,null):+mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,ya.fill),Na=""==ya.gradient||null==ya.gradient?mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,ya.gradient),mxEvent.isControlDown(Ba)||mxClient.IS_MAC&&mxEvent.isMetaDown(Ba)||!T.getModel().isVertex(Pa[$a])||(Na=""==ya.font||null==ya.font?mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,ya.font))),mxEvent.isAltDown(Ba)||(Na=""==ya.stroke||+null==ya.fill?mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,ya.stroke))):(Na=mxUtils.setStyle(Na,mxConstants.STYLE_FILLCOLOR,null),Na=mxUtils.setStyle(Na,mxConstants.STYLE_STROKECOLOR,null),Na=mxUtils.setStyle(Na,mxConstants.STYLE_GRADIENTCOLOR,null),T.getModel().isVertex(Pa[$a])&&(Na=mxUtils.setStyle(Na,mxConstants.STYLE_FONTCOLOR,null)));T.getModel().setStyle(Pa[$a],Na)}}finally{T.getModel().endUpdate()}}));Ca.className="geStyleButton";+Ca.style.width="36px";Ca.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ca.style.margin="0px 6px 6px 0px";if(null!=ya){var Ka="1px solid";null!=ya.border&&(Ka=ya.border);if(null!=ya.gradient)Ca.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(ya.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(ya.gradient).cssText+" 100%)";else if(ya.fill==mxConstants.NONE)Ca.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==ya.fill||""==ya.fill)Ca.style.backgroundColor=+mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var Ha=mxUtils.getLightDarkColor(ya.fill);Ca.style.backgroundImage="linear-gradient(to right bottom, "+Ha.cssText+" 50%, "+Ha.light+" 50.3%)"}null==ya.stroke||ya.stroke==mxConstants.NONE?Ca.style.border=Ka+" transparent":""==ya.stroke?Ca.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(Ha=mxUtils.getLightDarkColor(ya.stroke),Ca.style.border=+Ka+" "+Ha.cssText,Ca.style.borderRightColor=Ha.light,Ca.style.borderBottomColor=Ca.style.borderRightColor);null!=ya.title&&Ca.setAttribute("title",ya.title)}else Ka=mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff"),Ha=mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000"),Ca.style.backgroundColor=Ka,Ca.style.border="1px solid "+Ha;Ca.style.borderRadius="0";O.appendChild(Ca);null!=ya&&null!=ya.gradient&&(Ka=Ca.cloneNode(!1),Ka.style.backgroundImage="linear-gradient(light-dark(transparent, "++mxUtils.getLightDarkColor(ya.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ya.gradient).light+") 100%)",Ka.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ka.style.backgroundColor="transparent",O.appendChild(Ka),Ka.style.marginLeft="-42px",mxEvent.addListener(Ka,"click",function(){Ca.click()}))});O.innerText="";if(null!=Aa)for(var ra=0;ra<Aa.length;ra++)0<ra&&0==mxUtils.mod(ra,4)&&mxUtils.br(O),Da(Aa[ra])});null==this.format.currentScheme?pa(Math.min(V.length-1,Editor.isDarkMode()?+1:"1"==urlParams.sketch?5:0)):pa(this.format.currentScheme);ba=10>=this.defaultColorSchemes.length?28:8;var qa=document.createElement("div");qa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ba+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";+mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var wa=document.createElement("div");wa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ba+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";+1<this.defaultColorSchemes.length&&(k.appendChild(qa),k.appendChild(wa));mxEvent.addListener(wa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));A(qa);A(wa);sa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(U)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.isGoogleFontUrl=function(k){return k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return k};Graph.createFontElement=function(k,A){var I=Graph.fontMapping[A];null==I&&Graph.isCssFontUrl(A)?(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(A))):(null==I&&(I='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+A+'");\n}'),k=document.createElement("style"),mxUtils.write(k,I));return k};Graph.addRecentCustomFont=function(k,A){};Graph.addFont=function(k,A,I){if(null!=k&&0<k.length&&null!=-A&&0<A.length){var U=k.toLowerCase();if("helvetica"!=U&&"arial"!=k&&"sans-serif"!=U){var O=Graph.customFontElements[U];null!=O&&O.url!=A&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=A,"http:"==A.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(A)),O={name:k,url:A,elt:Graph.createFontElement(k,O)},Graph.customFontElements[U]=O,A=document.getElementsByTagName("head")[0],null!=I&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=I,O.elt.onerror=I):I()),null!=A&&A.appendChild(O.elt)):-null!=I&&I()}else null!=I&&I()}else null!=I&&I();return k};Graph.getFontUrl=function(k,A){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(A=k.url);return A};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var A=0;A<k.length;A++){var I=k[A].getAttribute("data-font-src");if(null!=I){var U="FONT"==k[A].nodeName?k[A].getAttribute("face"):k[A].style.fontFamily;null!=U&&Graph.addFont(U,I)}}};Graph.processFontStyle=function(k){if(null!=k){var A=mxUtils.getValue(k,"fontSource",-null);if(null!=A){var I=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=I)try{Graph.addFont(I,decodeURIComponent(A))}catch(U){}}}return k};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur=+A&&0<A.length){var T=k.toLowerCase();if("helvetica"!=T&&"arial"!=k&&"sans-serif"!=T){var O=Graph.customFontElements[T];null!=O&&O.url!=A&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=A,"http:"==A.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(A)),O={name:k,url:A,elt:Graph.createFontElement(k,O)},Graph.customFontElements[T]=O,A=document.getElementsByTagName("head")[0],null!=I&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=I,O.elt.onerror=I):I()),null!=A&&A.appendChild(O.elt)):+null!=I&&I()}else null!=I&&I()}else null!=I&&I();return k};Graph.getFontUrl=function(k,A){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(A=k.url);return A};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var A=0;A<k.length;A++){var I=k[A].getAttribute("data-font-src");if(null!=I){var T="FONT"==k[A].nodeName?k[A].getAttribute("face"):k[A].style.fontFamily;null!=T&&Graph.addFont(T,I)}}};Graph.processFontStyle=function(k){if(null!=k){var A=mxUtils.getValue(k,"fontSource",+null);if(null!=A){var I=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=I)try{Graph.addFont(I,decodeURIComponent(A))}catch(T){}}}return k};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var l=Graph.prototype.init;Graph.prototype.init=function(){function k(O){A=O}l.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var A=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(O){A=null});this.isMouseInsertPoint=function(){return null!=-A};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=A?this.getPointForEvent(A):I.apply(this,arguments)};var U=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var S=this.graph.getCellStyle(O);if(null!=S&&"rack"==S.childLayout){var X=new mxStackLayout(this.graph,!1);X.gridSize=null!=S.rackUnitSize?parseFloat(S.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;X.marginLeft=S.marginLeft||0;X.marginRight=S.marginRight||0;X.marginTop=-S.marginTop||0;X.marginBottom=S.marginBottom||0;X.allowGaps=S.allowGaps||0;X.horizontal="1"==mxUtils.getValue(S,"horizontalRack","0");X.resizeParent=!1;X.fill=!0;return X}return U.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,A){return Graph.processFontStyle(t.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,A,I,U,O,S,X,aa,ja,-pa,sa,qa){z.apply(this,arguments);Graph.processFontAttributes(qa)};var C=mxText.prototype.redraw;mxText.prototype.redraw=function(){C.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,A,I,U){function O(){for(var Ea=aa.getSelectionCells(),ra=[],ya=0;ya<Ea.length;ya++)aa.isCellVisible(Ea[ya])&&ra.push(Ea[ya]);aa.setSelectionCells(ra)}function S(Ea){aa.setHiddenTags(Ea?[]:ja.slice());O();aa.refresh()}-function X(Ea,ra){sa.innerText="";if(0<Ea.length){var ya=document.createElement("table");ya.setAttribute("cellpadding","2");ya.style.boxSizing="border-box";ya.style.tableLayout="fixed";ya.style.width="100%";var Ca=document.createElement("tbody");if(null!=Ea&&0<Ea.length)for(var Ma=0;Ma<Ea.length;Ma++)(function(Ha){function Aa(){var x=aa.getCellsForTags([Ha],null,null,!0);aa.isEnabled()?aa.setSelectionCells(x):aa.highlightCells(x,null,null,70)}var Ra=0>mxUtils.indexOf(aa.hiddenTags,Ha),Za=document.createElement("tr"),-La=document.createElement("td");La.style.align="center";La.style.width="16px";var $a=document.createElement("img");$a.setAttribute("src",Ra?Editor.visibleImage:Editor.hiddenImage);$a.setAttribute("title",mxResources.get(Ra?"hideIt":"show",[Ha]));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter="invert(100%)";La.appendChild($a);mxEvent.addListener($a,"click",function(x){mxEvent.isShiftDown(x)?-S(0<=mxUtils.indexOf(aa.hiddenTags,Ha)):(aa.toggleHiddenTag(Ha),O(),aa.refresh());mxEvent.consume(x)});Za.appendChild(La);La=document.createElement("td");La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.selectImage);$a.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter=-"invert(100%)";mxEvent.addListener($a,"click",function(x){S(!0);Aa();mxEvent.consume(x)});La.appendChild($a);Za.appendChild(La);La=document.createElement("td");La.style.overflow="hidden";La.style.whiteSpace="nowrap";La.style.textOverflow="ellipsis";La.style.verticalAlign="middle";La.style.cursor="pointer";La.setAttribute("title",Ha);a=document.createElement("a");mxUtils.write(a,Ha);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ra?100:40);La.appendChild(a);mxEvent.addListener(La,-"click",function(x){if(mxEvent.isShiftDown(x))S(!0),Aa();else if(Ra&&0<aa.hiddenTags.length)S(!0);else{var M=ja.slice(),Q=mxUtils.indexOf(M,Ha);M.splice(Q,1);aa.setHiddenTags(M);O();aa.refresh()}mxEvent.consume(x)});Za.appendChild(La);if(aa.isEnabled()){La=document.createElement("td");La.style.verticalAlign="middle";La.style.textAlign="center";La.style.width="18px";if(null==ra){La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.trashImage);-$a.setAttribute("title",mxResources.get("removeIt",[Ha]));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter="invert(100%)";mxEvent.addListener($a,"click",function(x){var M=mxUtils.indexOf(ja,Ha);0<=M&&ja.splice(M,1);aa.removeTagsForCells(aa.model.getDescendants(aa.model.getRoot()),[Ha]);aa.refresh();mxEvent.consume(x)});La.appendChild($a)}else{var Da=document.createElement("input");-Da.setAttribute("type","checkbox");Da.style.margin="0px";Da.defaultChecked=null!=ra&&0<=mxUtils.indexOf(ra,Ha);Da.checked=Da.defaultChecked;Da.style.background="transparent";Da.setAttribute("title",mxResources.get(Da.defaultChecked?"removeIt":"add",[Ha]));mxEvent.addListener(Da,"change",function(x){Da.checked?aa.addTagsForCells(aa.getSelectionCells(),[Ha]):aa.removeTagsForCells(aa.getSelectionCells(),[Ha]);mxEvent.consume(x)});La.appendChild(Da)}Za.appendChild(La)}Ca.appendChild(Za)})(Ea[Ma]);ya.appendChild(Ca);-sa.appendChild(ya)}}var aa=this,ja=aa.hiddenTags.slice(),pa=document.createElement("div");pa.style.userSelect="none";pa.style.overflow="hidden";pa.style.padding="10px";pa.style.height="100%";var sa=document.createElement("div");sa.style.position="absolute";sa.style.boxSizing="border-box";sa.style.userSelect="none";sa.style.overflow="auto";sa.style.padding="3px";sa.style.left="0px";sa.style.right="0px";sa.style.top="0px";sa.style.bottom="0px";pa.appendChild(sa);aa.addListener(mxEvent.ROOT,function(){ja=-aa.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Ea,ra){if(k()){Ea=aa.getAllTags();for(ra=0;ra<Ea.length;ra++)0>mxUtils.indexOf(ja,Ea[ra])&&ja.push(Ea[ra]);ja.sort();aa.isSelectionEmpty()?X(ja):X(ja,aa.getCommonTagsForCells(aa.getSelectionCells()))}});aa.selectionModel.addListener(mxEvent.CHANGE,qa);aa.model.addListener(mxEvent.CHANGE,qa);aa.addListener(mxEvent.REFRESH,qa);var wa=document.createElement("div");wa.className="geToolbarContainer";wa.style.position="absolute";wa.style.display=-"flex";wa.style.bottom="0px";wa.style.left="0px";wa.style.right="0px";wa.style.height="26px";wa.style.overflow="hidden";wa.style.padding="3px 4px 4px 4px";wa.style.borderWidth="1px 0px 0px 0px";wa.style.borderStyle="solid";wa.style.whiteSpace="nowrap";if(aa.isEnabled()){sa.style.bottom="34px";var Ba=document.createElement("a");Ba.className="geToolbarButton geAdaptiveAsset geToggleItem";Ba.style.width="16px";Ba.style.height="18px";Ba.style.backgroundPosition="center center";Ba.style.backgroundRepeat=-"no-repeat";Ba.style.backgroundSize="20px";Ba.style.margin="0 2px";Ba.style.display="inline-block";Ba.style.cursor="pointer";var za=Ba.cloneNode(!1);za.style.backgroundImage="url("+Editor.visibleImage+")";za.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(za,"click",function(Ea){aa.setHiddenTags([]);mxEvent.isShiftDown(Ea)||(ja=aa.hiddenTags.slice());O();aa.refresh();mxEvent.consume(Ea)});wa.appendChild(za);null!=I&&(Ba=Ba.cloneNode(!1),Ba.style.backgroundImage="url("+Editor.plusImage+-")",Ba.setAttribute("title",mxResources.get("add")),mxEvent.addListener(Ba,"click",function(Ea){I(ja,function(ra){ja=ra;qa()});mxEvent.consume(Ea)}),wa.appendChild(Ba));pa.appendChild(wa)}null!=U&&wa.appendChild(U);return{div:pa,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var A in Graph.customFontElements){var I=Graph.customFontElements[A];k.push({name:I.name,url:I.url})}return k};Graph.prototype.setFont=function(k,A){Graph.addFont(k,A);var I=-Editor.guid();document.execCommand("fontname",!1,I);for(var U=this.cellEditor.textarea.getElementsByTagName("font"),O=!1,S=0;S<U.length;S++)U[S].getAttribute("face")==I&&(O=!0,U[S].setAttribute("face",k),null!=A?U[S].setAttribute("data-font-src",A):U[S].removeAttribute("data-font-src"));O||document.execCommand("fontname",!1,k)};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=+A};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=A?this.getPointForEvent(A):I.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var U=this.graph.getCellStyle(O);if(null!=U&&"rack"==U.childLayout){var V=new mxStackLayout(this.graph,!1);V.gridSize=null!=U.rackUnitSize?parseFloat(U.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;V.marginLeft=U.marginLeft||0;V.marginRight=U.marginRight||0;V.marginTop=+U.marginTop||0;V.marginBottom=U.marginBottom||0;V.allowGaps=U.allowGaps||0;V.horizontal="1"==mxUtils.getValue(U,"horizontalRack","0");V.resizeParent=!1;V.fill=!0;return V}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,A){return Graph.processFontStyle(t.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,A,I,T,O,U,V,ba,fa,+pa,sa,qa){z.apply(this,arguments);Graph.processFontAttributes(qa)};var C=mxText.prototype.redraw;mxText.prototype.redraw=function(){C.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,A,I,T){function O(){for(var Da=ba.getSelectionCells(),ra=[],ya=0;ya<Da.length;ya++)ba.isCellVisible(Da[ya])&&ra.push(Da[ya]);ba.setSelectionCells(ra)}function U(Da){ba.setHiddenTags(Da?[]:fa.slice());O();ba.refresh()}+function V(Da,ra){sa.innerText="";if(0<Da.length){var ya=document.createElement("table");ya.setAttribute("cellpadding","2");ya.style.boxSizing="border-box";ya.style.tableLayout="fixed";ya.style.width="100%";var Ca=document.createElement("tbody");if(null!=Da&&0<Da.length)for(var Ka=0;Ka<Da.length;Ka++)(function(Ha){function Ba(){var x=ba.getCellsForTags([Ha],null,null,!0);ba.isEnabled()?ba.setSelectionCells(x):ba.highlightCells(x,null,null,70)}var Pa=0>mxUtils.indexOf(ba.hiddenTags,Ha),$a=document.createElement("tr"),+Na=document.createElement("td");Na.style.align="center";Na.style.width="16px";var Ya=document.createElement("img");Ya.setAttribute("src",Pa?Editor.visibleImage:Editor.hiddenImage);Ya.setAttribute("title",mxResources.get(Pa?"hideIt":"show",[Ha]));mxUtils.setOpacity(Ya,Pa?75:25);Ya.className="geAdaptiveAsset";Ya.style.verticalAlign="middle";Ya.style.cursor="pointer";Ya.style.width="16px";if(A||Editor.isDarkMode())Ya.style.filter="invert(100%)";Na.appendChild(Ya);mxEvent.addListener(Ya,"click",function(x){mxEvent.isShiftDown(x)?+U(0<=mxUtils.indexOf(ba.hiddenTags,Ha)):(ba.toggleHiddenTag(Ha),O(),ba.refresh());mxEvent.consume(x)});$a.appendChild(Na);Na=document.createElement("td");Na.style.align="center";Na.style.width="16px";Ya=document.createElement("img");Ya.setAttribute("src",Editor.selectImage);Ya.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Ya,Pa?75:25);Ya.className="geAdaptiveAsset";Ya.style.verticalAlign="middle";Ya.style.cursor="pointer";Ya.style.width="16px";if(A||Editor.isDarkMode())Ya.style.filter=+"invert(100%)";mxEvent.addListener(Ya,"click",function(x){U(!0);Ba();mxEvent.consume(x)});Na.appendChild(Ya);$a.appendChild(Na);Na=document.createElement("td");Na.style.overflow="hidden";Na.style.whiteSpace="nowrap";Na.style.textOverflow="ellipsis";Na.style.verticalAlign="middle";Na.style.cursor="pointer";Na.setAttribute("title",Ha);a=document.createElement("a");mxUtils.write(a,Ha);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Pa?100:40);Na.appendChild(a);mxEvent.addListener(Na,+"click",function(x){if(mxEvent.isShiftDown(x))U(!0),Ba();else if(Pa&&0<ba.hiddenTags.length)U(!0);else{var L=fa.slice(),R=mxUtils.indexOf(L,Ha);L.splice(R,1);ba.setHiddenTags(L);O();ba.refresh()}mxEvent.consume(x)});$a.appendChild(Na);if(ba.isEnabled()){Na=document.createElement("td");Na.style.verticalAlign="middle";Na.style.textAlign="center";Na.style.width="18px";if(null==ra){Na.style.align="center";Na.style.width="16px";Ya=document.createElement("img");Ya.setAttribute("src",Editor.trashImage);+Ya.setAttribute("title",mxResources.get("removeIt",[Ha]));mxUtils.setOpacity(Ya,Pa?75:25);Ya.className="geAdaptiveAsset";Ya.style.verticalAlign="middle";Ya.style.cursor="pointer";Ya.style.width="16px";if(A||Editor.isDarkMode())Ya.style.filter="invert(100%)";mxEvent.addListener(Ya,"click",function(x){var L=mxUtils.indexOf(fa,Ha);0<=L&&fa.splice(L,1);ba.removeTagsForCells(ba.model.getDescendants(ba.model.getRoot()),[Ha]);ba.refresh();mxEvent.consume(x)});Na.appendChild(Ya)}else{var Ea=document.createElement("input");+Ea.setAttribute("type","checkbox");Ea.style.margin="0px";Ea.defaultChecked=null!=ra&&0<=mxUtils.indexOf(ra,Ha);Ea.checked=Ea.defaultChecked;Ea.style.background="transparent";Ea.setAttribute("title",mxResources.get(Ea.defaultChecked?"removeIt":"add",[Ha]));mxEvent.addListener(Ea,"change",function(x){Ea.checked?ba.addTagsForCells(ba.getSelectionCells(),[Ha]):ba.removeTagsForCells(ba.getSelectionCells(),[Ha]);mxEvent.consume(x)});Na.appendChild(Ea)}$a.appendChild(Na)}Ca.appendChild($a)})(Da[Ka]);ya.appendChild(Ca);+sa.appendChild(ya)}}var ba=this,fa=ba.hiddenTags.slice(),pa=document.createElement("div");pa.style.userSelect="none";pa.style.overflow="hidden";pa.style.padding="10px";pa.style.height="100%";var sa=document.createElement("div");sa.style.position="absolute";sa.style.boxSizing="border-box";sa.style.userSelect="none";sa.style.overflow="auto";sa.style.padding="3px";sa.style.left="0px";sa.style.right="0px";sa.style.top="0px";sa.style.bottom="0px";pa.appendChild(sa);ba.addListener(mxEvent.ROOT,function(){fa=+ba.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Da,ra){if(k()){Da=ba.getAllTags();for(ra=0;ra<Da.length;ra++)0>mxUtils.indexOf(fa,Da[ra])&&fa.push(Da[ra]);fa.sort();ba.isSelectionEmpty()?V(fa):V(fa,ba.getCommonTagsForCells(ba.getSelectionCells()))}});ba.selectionModel.addListener(mxEvent.CHANGE,qa);ba.model.addListener(mxEvent.CHANGE,qa);ba.addListener(mxEvent.REFRESH,qa);var wa=document.createElement("div");wa.className="geToolbarContainer";wa.style.position="absolute";wa.style.display=+"flex";wa.style.bottom="0px";wa.style.left="0px";wa.style.right="0px";wa.style.height="26px";wa.style.overflow="hidden";wa.style.padding="3px 4px 4px 4px";wa.style.borderWidth="1px 0px 0px 0px";wa.style.borderStyle="solid";wa.style.whiteSpace="nowrap";if(ba.isEnabled()){sa.style.bottom="34px";var Aa=document.createElement("a");Aa.className="geToolbarButton geAdaptiveAsset geToggleItem";Aa.style.width="16px";Aa.style.height="18px";Aa.style.backgroundPosition="center center";Aa.style.backgroundRepeat=+"no-repeat";Aa.style.backgroundSize="20px";Aa.style.margin="0 2px";Aa.style.display="inline-block";Aa.style.cursor="pointer";var za=Aa.cloneNode(!1);za.style.backgroundImage="url("+Editor.visibleImage+")";za.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(za,"click",function(Da){ba.setHiddenTags([]);mxEvent.isShiftDown(Da)||(fa=ba.hiddenTags.slice());O();ba.refresh();mxEvent.consume(Da)});wa.appendChild(za);null!=I&&(Aa=Aa.cloneNode(!1),Aa.style.backgroundImage="url("+Editor.plusImage++")",Aa.setAttribute("title",mxResources.get("add")),mxEvent.addListener(Aa,"click",function(Da){I(fa,function(ra){fa=ra;qa()});mxEvent.consume(Da)}),wa.appendChild(Aa));pa.appendChild(wa)}null!=T&&wa.appendChild(T);return{div:pa,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var A in Graph.customFontElements){var I=Graph.customFontElements[A];k.push({name:I.name,url:I.url})}return k};Graph.prototype.setFont=function(k,A){Graph.addFont(k,A);var I=+Editor.guid();document.execCommand("fontname",!1,I);for(var T=this.cellEditor.textarea.getElementsByTagName("font"),O=!1,U=0;U<T.length;U++)T[U].getAttribute("face")==I&&(O=!0,T[U].setAttribute("face",k),null!=A?T[U].setAttribute("data-font-src",A):T[U].removeAttribute("data-font-src"));O||document.execCommand("fontname",!1,k)};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.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 k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var A in k)this.globalVars[A]=k[A]}catch(I){null!=window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var N=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=-function(k){var A=N.apply(this,arguments);null==A&&null!=this.globalVars&&(A=this.globalVars[k]);return A};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,A,I,U,O,S,X,aa,ja,pa,sa,qa,wa,Ba,za,Ea){var ra=K.apply(this,-arguments);if(null!=qa){var ya=ra.getAttribute("style");null==ya&&(ya="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;ra.setAttribute("style",ya+(" color-scheme: "+qa+";"))}var Ca=this.getCustomFonts();if(sa&&0<Ca.length){var Ma=ra.ownerDocument;ya=null!=Ma.createElementNS?Ma.createElementNS(mxConstants.NS_SVG,"style"):Ma.createElement("style");null!=Ma.setAttributeNS?ya.setAttributeNS("type","text/css"):ya.setAttribute("type","text/css");-for(var Ha="",Aa="",Ra=0;Ra<Ca.length;Ra++){var Za=Ca[Ra].name,La=Ca[Ra].url;Graph.isCssFontUrl(La)?Ha+="@import url("+Graph.rewriteGoogleFontUrl(La)+");\n":Aa+='@font-face {\nfont-family: "'+Za+'";\nsrc: url("'+La+'");\n}\n'}ya.appendChild(Ma.createTextNode(Ha+Aa));ra.getElementsByTagName("defs")[0].appendChild(ya)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ra);this.mathEnabled&&(document.body.appendChild(ra),Editor.MathJaxRender(ra),+function(k){var A=N.apply(this,arguments);null==A&&null!=this.globalVars&&(A=this.globalVars[k]);return A};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,A,I,T,O,U,V,ba,fa,pa,sa,qa,wa,Aa,za,Da){var ra=K.apply(this,+arguments);if(null!=qa){var ya=ra.getAttribute("style");null==ya&&(ya="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;ra.setAttribute("style",ya+(" color-scheme: "+qa+";"))}var Ca=this.getCustomFonts();if(sa&&0<Ca.length){var Ka=ra.ownerDocument;ya=null!=Ka.createElementNS?Ka.createElementNS(mxConstants.NS_SVG,"style"):Ka.createElement("style");null!=Ka.setAttributeNS?ya.setAttributeNS("type","text/css"):ya.setAttribute("type","text/css");+for(var Ha="",Ba="",Pa=0;Pa<Ca.length;Pa++){var $a=Ca[Pa].name,Na=Ca[Pa].url;Graph.isCssFontUrl(Na)?Ha+="@import url("+Graph.rewriteGoogleFontUrl(Na)+");\n":Ba+='@font-face {\nfont-family: "'+$a+'";\nsrc: url("'+Na+'");\n}\n'}ya.appendChild(Ka.createTextNode(Ha+Ba));ra.getElementsByTagName("defs")[0].appendChild(ya)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ra);this.mathEnabled&&(document.body.appendChild(ra),Editor.MathJaxRender(ra),ra.parentNode.removeChild(ra),ya=ra.ownerDocument.getElementById("MJX-SVG-styles"),null!=ya&&ra.getElementsByTagName("defs")[0].appendChild(ya.cloneNode(!0)));return ra};var J=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){J.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var da=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){da.apply(this,arguments);this.enumerationState=0};var ea=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return ea.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(k){var A="1"==mxUtils.getValue(k.style,"enumerate",0);A&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):A||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);A=k.secondLabel;if(null!=A){var I=k.view.scale,-U=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*I,k.y+4*I,0,0):mxRectangle.fromPoint(k.view.getPoint(k));A.bounds.equals(k)&&A.value==U&&A.scale==I||(A.bounds=k,A.value=U,A.scale=I,A.redraw())}};var ca=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ca.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),-this.view.validateBackgroundImage())};var W=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){W.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,A){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,A))};Graph.prototype.executeCustomActions=function(k,A,I){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&-window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var U=!1,O=0,S=0,X=mxUtils.bind(this,function(){U||(U=!0,this.model.beginUpdate())}),aa=mxUtils.bind(this,function(){U&&(U=!1,this.model.endUpdate())}),ja=mxUtils.bind(this,function(){0<O&&O--;0==O&&pa()}),pa=mxUtils.bind(this,function(){if(S<k.length){var sa=this.stoppingCustomActions,qa=-k[S++],wa=[];if(null!=qa.open)if(aa(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,I))return}else this.openLink(qa.open);null==qa.wait||sa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ja()}),O++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),aa());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,-!0)),qa.opacity.value);null!=qa.fadeIn&&(O++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,ja,sa?0:qa.fadeIn.delay));null!=qa.fadeOut&&(O++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,ja,sa?0:qa.fadeOut.delay));null!=qa.wipeIn&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&-(X(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){X();var Ba=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Ba),1);this.setCellsVisible(Ba,!0)}null!=qa.hide&&(X(),Ba=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Ba),0),this.setCellsVisible(Ba,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&(X(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:-"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(X(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));Ba=[];null!=qa.select&&this.isEnabled()&&(Ba=this.getCellsForAction(qa.select),this.setSelectionCells(Ba));null!=qa.highlight&&(Ba=this.getCellsForAction(qa.highlight),this.highlightCells(Ba,qa.highlight.color,qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(Ba=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&-this.fitWindow(qa.viewbox,qa.viewbox.border);0<Ba.length&&this.scrollCellToVisible(Ba[0]);null!=I&&null!=qa.explore&&Graph.exploreFromCell(this,I,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var za=qa.tags.toggle;0==za.length&&(za=this.getAllTags());for(Ba=0;Ba<za.length;Ba++)this.toggleHiddenTag(za[Ba])}za=null;null!=qa.tags.hidden&&(null==za&&(za=[]),za=za.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==za&&(za=[]);var Ea=this.getAllTags();for(Ba=0;Ba<Ea.length;Ba++)0>mxUtils.indexOf(qa.tags.visible,-Ea[Ba])&&0>mxUtils.indexOf(za,Ea[Ba])&&za.push(Ea[Ba])}null!=za&&this.setHiddenTags(za);this.refresh()}0<wa.length&&(O++,this.executeAnimations(wa,ja,sa?1:qa.steps,sa?0:qa.delay));0==O?pa():aa()}else this.stoppingCustomActions=this.executingCustomActions=!1,aa(),null!=A&&A()});pa()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,A){var I=this.getLinkForCell(A);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(A,this.updateCustomLink(k,I));if(this.isHtmlLabel(A)){var U=document.createElement("div");-U.innerHTML=Graph.sanitizeHtml(this.getLabel(A));for(var O=U.getElementsByTagName("a"),S=!1,X=0;X<O.length;X++)I=O[X].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(O[X].setAttribute("href",this.updateCustomLink(k,I)),S=!0);S&&this.labelChanged(A,U.innerHTML)}};Graph.prototype.updateCustomLink=function(k,A){if("data:action/json,"==A.substring(0,17))try{var I=JSON.parse(A.substring(17));null!=I.actions&&(this.updateCustomLinkActions(k,I.actions),A="data:action/json,"+JSON.stringify(I))}catch(U){}return A};-Graph.prototype.updateCustomLinkActions=function(k,A){for(var I=0;I<A.length;I++){var U=A[I],O;for(O in U)this.updateCustomLinkAction(k,U[O],"cells"),this.updateCustomLinkAction(k,U[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,A,I){if(null!=A&&null!=A[I]){for(var U=[],O=0;O<A[I].length;O++)if("*"==A[I][O])U.push(A[I][O]);else{var S=k[A[I][O]];null!=S?""!=S&&U.push(S):U.push(A[I][O])}A[I]=U}};Graph.prototype.getCellsForAction=function(k,A){A=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,-null,A));if(null!=k.excludeCells){for(var I=[],U=0;U<A.length;U++)0>k.excludeCells.indexOf(A[U].id)&&I.push(A[U]);A=I}return A};Graph.prototype.getCellsById=function(k){var A=[];if(null!=k)for(var I=0;I<k.length;I++)if("*"==k[I]){var U=this.model.getRoot();A=A.concat(this.model.filterDescendants(function(S){return S!=U},U))}else{var O=this.model.getCell(k[I]);null!=O&&A.push(O)}return A};var ba=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return ba.apply(this,arguments)&&+T=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*I,k.y+4*I,0,0):mxRectangle.fromPoint(k.view.getPoint(k));A.bounds.equals(k)&&A.value==T&&A.scale==I||(A.bounds=k,A.value=T,A.scale=I,A.redraw())}};var ca=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ca.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),+this.view.validateBackgroundImage())};var X=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){X.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,A){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,A))};Graph.prototype.executeCustomActions=function(k,A,I){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&+window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var T=!1,O=0,U=0,V=mxUtils.bind(this,function(){T||(T=!0,this.model.beginUpdate())}),ba=mxUtils.bind(this,function(){T&&(T=!1,this.model.endUpdate())}),fa=mxUtils.bind(this,function(){0<O&&O--;0==O&&pa()}),pa=mxUtils.bind(this,function(){if(U<k.length){var sa=this.stoppingCustomActions,qa=+k[U++],wa=[];if(null!=qa.open)if(ba(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,I))return}else this.openLink(qa.open);null==qa.wait||sa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;fa()}),O++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),ba());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,+!0)),qa.opacity.value);null!=qa.fadeIn&&(O++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,fa,sa?0:qa.fadeIn.delay));null!=qa.fadeOut&&(O++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,fa,sa?0:qa.fadeOut.delay));null!=qa.wipeIn&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&+(V(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){V();var Aa=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Aa),1);this.setCellsVisible(Aa,!0)}null!=qa.hide&&(V(),Aa=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Aa),0),this.setCellsVisible(Aa,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&(V(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:+"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(V(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));Aa=[];null!=qa.select&&this.isEnabled()&&(Aa=this.getCellsForAction(qa.select),this.setSelectionCells(Aa));null!=qa.highlight&&(Aa=this.getCellsForAction(qa.highlight),this.highlightCells(Aa,qa.highlight.color,qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(Aa=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&+this.fitWindow(qa.viewbox,qa.viewbox.border);0<Aa.length&&this.scrollCellToVisible(Aa[0]);null!=I&&null!=qa.explore&&Graph.exploreFromCell(this,I,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var za=qa.tags.toggle;0==za.length&&(za=this.getAllTags());for(Aa=0;Aa<za.length;Aa++)this.toggleHiddenTag(za[Aa])}za=null;null!=qa.tags.hidden&&(null==za&&(za=[]),za=za.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==za&&(za=[]);var Da=this.getAllTags();for(Aa=0;Aa<Da.length;Aa++)0>mxUtils.indexOf(qa.tags.visible,+Da[Aa])&&0>mxUtils.indexOf(za,Da[Aa])&&za.push(Da[Aa])}null!=za&&this.setHiddenTags(za);this.refresh()}0<wa.length&&(O++,this.executeAnimations(wa,fa,sa?1:qa.steps,sa?0:qa.delay));0==O?pa():ba()}else this.stoppingCustomActions=this.executingCustomActions=!1,ba(),null!=A&&A()});pa()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,A){var I=this.getLinkForCell(A);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(A,this.updateCustomLink(k,I));if(this.isHtmlLabel(A)){var T=document.createElement("div");+T.innerHTML=Graph.sanitizeHtml(this.getLabel(A));for(var O=T.getElementsByTagName("a"),U=!1,V=0;V<O.length;V++)I=O[V].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(O[V].setAttribute("href",this.updateCustomLink(k,I)),U=!0);U&&this.labelChanged(A,T.innerHTML)}};Graph.prototype.updateCustomLink=function(k,A){if("data:action/json,"==A.substring(0,17))try{var I=JSON.parse(A.substring(17));null!=I.actions&&(this.updateCustomLinkActions(k,I.actions),A="data:action/json,"+JSON.stringify(I))}catch(T){}return A};+Graph.prototype.updateCustomLinkActions=function(k,A){for(var I=0;I<A.length;I++){var T=A[I],O;for(O in T)this.updateCustomLinkAction(k,T[O],"cells"),this.updateCustomLinkAction(k,T[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,A,I){if(null!=A&&null!=A[I]){for(var T=[],O=0;O<A[I].length;O++)if("*"==A[I][O])T.push(A[I][O]);else{var U=k[A[I][O]];null!=U?""!=U&&T.push(U):T.push(A[I][O])}A[I]=T}};Graph.prototype.getCellsForAction=function(k,A){A=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,+null,A));if(null!=k.excludeCells){for(var I=[],T=0;T<A.length;T++)0>k.excludeCells.indexOf(A[T].id)&&I.push(A[T]);A=I}return A};Graph.prototype.getCellsById=function(k){var A=[];if(null!=k)for(var I=0;I<k.length;I++)if("*"==k[I]){var T=this.model.getRoot();A=A.concat(this.model.filterDescendants(function(U){return U!=T},T))}else{var O=this.model.getCell(k[I]);null!=O&&A.push(O)}return A};var aa=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return aa.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var A=mxUtils.indexOf(this.hiddenTags,k);0>A?this.hiddenTags.push(k):0<=A&&this.hiddenTags.splice(A,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;-for(var A=0;A<k.length;A++)if(0>mxUtils.indexOf(this.hiddenTags,k[A]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,A,I,U){var O=[];if(null!=k){A=null!=A?A:this.model.getDescendants(this.model.getRoot());for(var S=0,X={},aa=0;aa<k.length;aa++)0<k[aa].length&&(X[k[aa]]=!0,S++);for(aa=0;aa<A.length;aa++)if(I&&this.model.getParent(A[aa])==this.model.root||this.model.isVertex(A[aa])||this.model.isEdge(A[aa])){var ja=this.getTagsForCell(A[aa]),pa=!1;if(0<ja.length&&(ja=ja.split(" "),ja.length>=-k.length)){for(var sa=pa=0;sa<ja.length&&pa<S;sa++)null!=X[ja[sa]]&&pa++;pa=pa==S}pa&&(1!=U||this.isCellVisible(A[aa]))&&O.push(A[aa])}}return O};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var A=null,I=[],U=0;U<k.length;U++){var O=this.getTagsForCell(k[U]);I=[];if(0<O.length){O=O.split(" ");for(var S={},X=0;X<O.length;X++)if(null==A||null!=A[O[X]])S[O[X]]=!0,I.push(O[X]);-A=S}else return[]}return I};Graph.prototype.getTagsForCells=function(k){for(var A=[],I={},U=0;U<k.length;U++){var O=this.getTagsForCell(k[U]);if(0<O.length){O=O.split(" ");for(var S=0;S<O.length;S++)null==I[O[S]]&&(I[O[S]]=!0,A.push(O[S]))}}return A};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){for(var U=this.getTagsForCell(k[I]),-O=U.split(" "),S=!1,X=0;X<A.length;X++){var aa=mxUtils.trim(A[X]);""!=aa&&0>mxUtils.indexOf(O,aa)&&(U=0<U.length?U+" "+aa:aa,S=!0)}S&&this.setAttributeForCell(k[I],"tags",U)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){var U=this.getTagsForCell(k[I]);if(0<U.length){for(var O=U.split(" "),S=!1,X=0;X<A.length;X++){var aa=mxUtils.indexOf(O,A[X]);0<=aa&&(O.splice(aa,1),S=!0)}S&&this.setAttributeForCell(k[I],-"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var A=0;A<k.length;A++)this.model.setVisible(k[A],!this.model.isVisible(k[A]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,A){this.model.beginUpdate();try{for(var I=0;I<k.length;I++)this.model.setVisible(k[I],A)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,A,I,U){for(var O=0;O<k.length;O++)this.highlightCell(k[O],-A,I,U)};Graph.prototype.highlightCell=function(k,A,I,U,O){A=null!=A?A:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;k=this.view.getState(k);var S=null;null!=k&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+O),S=new mxCellHighlight(this,A,O,!1),null!=U&&(S.opacity=U),S.highlight(k),window.setTimeout(function(){null!=S.shape&&(mxUtils.setPrefixedStyle(S.shape.node.style,"transition","all 1200ms ease-in-out"),S.shape.node.style.opacity=0);window.setTimeout(function(){S.destroy()},-1200)},I));return S};Graph.prototype.addSvgShadow=function(k,A,I,U){I=null!=I?I:!1;U=null!=U?U:!0;var O=k.ownerDocument,S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");S.setAttribute("id",this.shadowId);var X=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");X.setAttribute("in","SourceAlpha");X.setAttribute("stdDeviation",this.svgShadowBlur);X.setAttribute("result","blur");S.appendChild(X);-X=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");X.setAttribute("in","blur");X.setAttribute("dx",this.svgShadowSize);X.setAttribute("dy",this.svgShadowSize);X.setAttribute("result","offsetBlur");S.appendChild(X);X=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");X.setAttribute("flood-color",this.svgShadowColor);X.setAttribute("flood-opacity",this.svgShadowOpacity);X.setAttribute("result","offsetColor");-S.appendChild(X);X=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");X.setAttribute("in","offsetColor");X.setAttribute("in2","offsetBlur");X.setAttribute("operator","in");X.setAttribute("result","offsetBlur");S.appendChild(X);X=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");X.setAttribute("in","SourceGraphic");X.setAttribute("in2","offsetBlur");S.appendChild(X);X=k.getElementsByTagName("defs");-0==X.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=k.firstChild?k.insertBefore(O,k.firstChild):k.appendChild(O)):O=X[0];O.appendChild(S);I||(A=null!=A?A:k.getElementsByTagName("g")[0],null!=A&&(A.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&U&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),A=k.getAttribute("viewBox"),-null!=A&&0<A.length&&(A=A.split(" "),3<A.length&&(w=parseFloat(A[2])+6,h=parseFloat(A[3])+6,k.setAttribute("viewBox",A[0]+" "+A[1]+" "+w+" "+h))))));return S};Graph.prototype.setShadowVisible=function(k,A){mxClient.IS_SVG&&!mxClient.IS_SF&&(A=null!=A?A:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),A&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==+for(var A=0;A<k.length;A++)if(0>mxUtils.indexOf(this.hiddenTags,k[A]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,A,I,T){var O=[];if(null!=k){A=null!=A?A:this.model.getDescendants(this.model.getRoot());for(var U=0,V={},ba=0;ba<k.length;ba++)0<k[ba].length&&(V[k[ba]]=!0,U++);for(ba=0;ba<A.length;ba++)if(I&&this.model.getParent(A[ba])==this.model.root||this.model.isVertex(A[ba])||this.model.isEdge(A[ba])){var fa=this.getTagsForCell(A[ba]),pa=!1;if(0<fa.length&&(fa=fa.split(" "),fa.length>=+k.length)){for(var sa=pa=0;sa<fa.length&&pa<U;sa++)null!=V[fa[sa]]&&pa++;pa=pa==U}pa&&(1!=T||this.isCellVisible(A[ba]))&&O.push(A[ba])}}return O};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var A=null,I=[],T=0;T<k.length;T++){var O=this.getTagsForCell(k[T]);I=[];if(0<O.length){O=O.split(" ");for(var U={},V=0;V<O.length;V++)if(null==A||null!=A[O[V]])U[O[V]]=!0,I.push(O[V]);+A=U}else return[]}return I};Graph.prototype.getTagsForCells=function(k){for(var A=[],I={},T=0;T<k.length;T++){var O=this.getTagsForCell(k[T]);if(0<O.length){O=O.split(" ");for(var U=0;U<O.length;U++)null==I[O[U]]&&(I[O[U]]=!0,A.push(O[U]))}}return A};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){for(var T=this.getTagsForCell(k[I]),+O=T.split(" "),U=!1,V=0;V<A.length;V++){var ba=mxUtils.trim(A[V]);""!=ba&&0>mxUtils.indexOf(O,ba)&&(T=0<T.length?T+" "+ba:ba,U=!0)}U&&this.setAttributeForCell(k[I],"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){var T=this.getTagsForCell(k[I]);if(0<T.length){for(var O=T.split(" "),U=!1,V=0;V<A.length;V++){var ba=mxUtils.indexOf(O,A[V]);0<=ba&&(O.splice(ba,1),U=!0)}U&&this.setAttributeForCell(k[I],+"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var A=0;A<k.length;A++)this.model.setVisible(k[A],!this.model.isVisible(k[A]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,A){this.model.beginUpdate();try{for(var I=0;I<k.length;I++)this.model.setVisible(k[I],A)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,A,I,T){for(var O=0;O<k.length;O++)this.highlightCell(k[O],+A,I,T)};Graph.prototype.highlightCell=function(k,A,I,T,O){A=null!=A?A:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;k=this.view.getState(k);var U=null;null!=k&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+O),U=new mxCellHighlight(this,A,O,!1),null!=T&&(U.opacity=T),U.highlight(k),window.setTimeout(function(){null!=U.shape&&(mxUtils.setPrefixedStyle(U.shape.node.style,"transition","all 1200ms ease-in-out"),U.shape.node.style.opacity=0);window.setTimeout(function(){U.destroy()},+1200)},I));return U};Graph.prototype.addSvgShadow=function(k,A,I,T){I=null!=I?I:!1;T=null!=T?T:!0;var O=k.ownerDocument,U=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");U.setAttribute("id",this.shadowId);var V=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");V.setAttribute("in","SourceAlpha");V.setAttribute("stdDeviation",this.svgShadowBlur);V.setAttribute("result","blur");U.appendChild(V);+V=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");V.setAttribute("in","blur");V.setAttribute("dx",this.svgShadowSize);V.setAttribute("dy",this.svgShadowSize);V.setAttribute("result","offsetBlur");U.appendChild(V);V=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");V.setAttribute("flood-color",this.svgShadowColor);V.setAttribute("flood-opacity",this.svgShadowOpacity);V.setAttribute("result","offsetColor");+U.appendChild(V);V=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");V.setAttribute("in","offsetColor");V.setAttribute("in2","offsetBlur");V.setAttribute("operator","in");V.setAttribute("result","offsetBlur");U.appendChild(V);V=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");V.setAttribute("in","SourceGraphic");V.setAttribute("in2","offsetBlur");U.appendChild(V);V=k.getElementsByTagName("defs");+0==V.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=k.firstChild?k.insertBefore(O,k.firstChild):k.appendChild(O)):O=V[0];O.appendChild(U);I||(A=null!=A?A:k.getElementsByTagName("g")[0],null!=A&&(A.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&T&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),A=k.getAttribute("viewBox"),+null!=A&&0<A.length&&(A=A.split(" "),3<A.length&&(w=parseFloat(A[2])+6,h=parseFloat(A[3])+6,k.setAttribute("viewBox",A[0]+" "+A[1]+" "+w+" "+h))))));return U};Graph.prototype.setShadowVisible=function(k,A){mxClient.IS_SVG&&!mxClient.IS_SF&&(A=null!=A?A:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),A&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=this.model.getChildCount(this.model.root),A=0;do var I=this.model.getChildAt(this.model.root,A);while(A++<k&&"1"==mxUtils.getValue(this.getCellStyle(I),"locked","0"));null!=I&&this.setDefaultParent(I)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=@@ -3453,33 +3453,33 @@ this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultPar"/ibm.xml"];mxStencilRegistry.libraries.ibmcloud=[STENCIL_PATH+"/ibm_cloud.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.salesforce=-[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var A=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?A="mxgraph.er":"sysML"==k.substring(0,5)&&(A="mxgraph.sysml"));return A};var ha=mxMarker.createMarker;mxMarker.createMarker=function(k,A,I,U,O,S,X,aa,ja,pa){if(null!=I&&null==mxMarker.markers[I]){var sa=this.getPackageForType(I);-null!=sa&&mxStencilRegistry.getStencil(sa)}return ha.apply(this,arguments)};var la=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,A,I,U,O,S){"1"==mxUtils.getValue(A.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(A.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return la.apply(this,arguments)};PrintDialog.prototype.create=function(k,A,I){function U(){Ba.value=Math.max(1,Math.min(pa,Math.max(parseInt(Ba.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(pa,-Math.min(parseInt(Ba.value),parseInt(wa.value))))}function O(ua){k.lastPrintPagesRadioChecked=qa.checked;k.lastPrintSelectionOnlyChecked=Ea.checked;k.lastPrintCropRadioChecked=ya.checked;k.lastPrintFitRadioChecked=Ca.checked;qa.checked&&wa.value<Ba.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ba.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);V.value=Math.max(1,Math.min(1600,parseInt(V.value)))+"%";k.lastPrintZoom=V.value;k.lastPrintBorder=Q.value;k.lastPrintGrid=-ia.checked;k.lastPrintTransparent=ka.checked;k.lastPrintInclude=oa.checked;k.lastPrintSheetsAcross=x.value;k.lastPrintSheetsDown=M.value;var Fa={};Fa.border=parseInt(Q.value);Fa.scale=parseInt(V.value)/100;Fa.grid=ia.checked;Fa.transparent=ka.checked;Fa.includeCopy=oa.checked;Fa.sheetsAcross=parseInt(x.value);Fa.sheetsDown=parseInt(M.value);Fa.pagesFrom=parseInt(wa.value);Fa.pagesTo=parseInt(Ba.value);Fa.allPages=sa.checked;Fa.selection=Ea.checked;Fa.pageView=ra.checked;Fa.crop=ya.checked;Fa.fit=-Ca.checked;return null!=I?I(!ua,Fa):k.print(!ua,Fa)}var S=k.editor.graph,X=document.createElement("div"),aa=document.createElement("h3");aa.style.width="100%";aa.style.textAlign="center";aa.style.marginTop="0px";mxUtils.write(aa,A||mxResources.get("print"));X.appendChild(aa);var ja=1,pa=1;aa=document.createElement("div");aa.style.whiteSpace="nowrap";var sa=document.createElement("input");sa.style.marginRight="8px";sa.style.marginBottom="8px";sa.setAttribute("type","radio");sa.setAttribute("name",-"pages-printdialog");aa.appendChild(sa);A=document.createElement("span");mxUtils.write(A,mxResources.get("allPages"));mxEvent.addListener(A,"click",function(){sa.checked=!0});aa.appendChild(A);mxUtils.br(aa);var qa=sa.cloneNode(!0);aa.appendChild(qa);A=document.createElement("span");mxUtils.write(A,mxResources.get("pages")+":");aa.appendChild(A);mxEvent.addListener(A,"click",function(){qa.checked=!0});var wa=document.createElement("input");wa.style.margin="0 4px";wa.setAttribute("value","1");wa.setAttribute("type",-"number");wa.setAttribute("min","1");wa.style.width="40px";aa.appendChild(wa);A=document.createElement("span");mxUtils.write(A,mxResources.get("to"));aa.appendChild(A);var Ba=wa.cloneNode(!0);aa.appendChild(Ba);mxEvent.addListener(wa,"focus",function(){qa.checked=!0});mxEvent.addListener(Ba,"focus",function(){qa.checked=!0});mxEvent.addListener(wa,"change",U);mxEvent.addListener(Ba,"change",U);if(null!=k.pages&&(pa=k.pages.length,null!=k.currentPage))for(var za=0;za<pa;za++)if(k.currentPage==k.pages[za]){ja=-za+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(wa.value=Math.min(pa,Math.max(1,k.lastPrintPagesFromInput)),Ba.value=Math.min(pa,Math.max(1,k.lastPrintPagesToInput))):(wa.value=ja,Ba.value=ja);wa.setAttribute("max",pa);Ba.setAttribute("max",pa);za=mxUtils.button(mxResources.get("currentPage"),function(ua){wa.value=ja;Ba.value=ja;qa.checked=!0});za.setAttribute("title",mxResources.get("currentPage"));za.style.marginLeft="4px";za.style.maxWidth="100px";za.style.overflow="hidden";-za.style.textOverflow="ellipsis";za.style.whiteSpace="nowrap";aa.appendChild(za);1<pa&&X.appendChild(aa);aa=document.createElement("div");aa.style.borderBottom="1px solid lightGray";aa.style.paddingBottom="12px";aa.style.marginBottom="12px";aa.style.whiteSpace="nowrap";var Ea=document.createElement("input");Ea.setAttribute("name","pages-printdialog");Ea.setAttribute("type",1==pa?"checkbox":"radio");Ea.style.marginRight="8px";S.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");S.isEnabled()&&-(aa.appendChild(Ea),A=document.createElement("span"),mxUtils.write(A,mxResources.get("selectionOnly")),aa.appendChild(A));(S.isEnabled()||1<pa)&&X.appendChild(aa);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?qa.checked=!0:!S.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?Ea.checked=!0:sa.checked=!0;S.isSelectionEmpty()||mxEvent.addListener(A,"click",function(){Ea.checked=!Ea.checked});S=document.createElement("div");S.style.whiteSpace="nowrap";var ra=document.createElement("input");ra.style.marginBottom=-"8px";ra.style.marginRight="8px";ra.setAttribute("type","radio");ra.setAttribute("name","printSize");S.appendChild(ra);A=document.createElement("span");mxUtils.write(A,mxResources.get("pageView"));S.appendChild(A);mxEvent.addListener(S,"click",function(){ra.checked=!0});X.appendChild(S);S=document.createElement("div");S.style.whiteSpace="nowrap";var ya=document.createElement("input");ya.style.marginBottom="8px";ya.style.marginRight="8px";ya.setAttribute("type","radio");ya.setAttribute("name","printSize");-S.appendChild(ya);A=document.createElement("span");mxUtils.write(A,mxResources.get("crop"));S.appendChild(A);mxEvent.addListener(S,"click",function(){ya.checked=!0});X.appendChild(S);S=document.createElement("div");S.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.style.marginBottom="8px";Ca.style.marginRight="8px";Ca.setAttribute("type","radio");Ca.setAttribute("name","printSize");A=document.createElement("div");A.style.display="inline-block";A.style.verticalAlign="top";A.style.paddingTop=-"2px";A.appendChild(Ca);S.appendChild(A);aa=document.createElement("table");aa.style.display="inline-block";aa.style.borderSpacing="0";za=document.createElement("tbody");var Ma=document.createElement("tr"),Ha=Ma.cloneNode(!0),Aa=document.createElement("td"),Ra=Aa.cloneNode(!0),Za=Aa.cloneNode(!0),La=Aa.cloneNode(!0),$a=Aa.cloneNode(!0),Da=Aa.cloneNode(!0);Aa.style.textAlign="right";La.style.textAlign="right";mxUtils.write(Aa,mxResources.get("fitTo"));mxEvent.addListener(S,"click",function(ua){mxEvent.getSource(ua)!=-Ca&&(Ca.checked=!Ca.checked)});var x=document.createElement("input");x.style.margin="0 2px";x.style.boxSizing="border-box";x.setAttribute("value",k.lastPrintSheetsAcross||"1");x.setAttribute("min","1");x.setAttribute("type","number");x.style.width="40px";Ra.appendChild(x);A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsAcross"));Za.appendChild(A);mxUtils.write(La,mxResources.get("fitToBy"));var M=x.cloneNode(!0);M.setAttribute("value",k.lastPrintSheetsDown||"1");$a.appendChild(M);-mxEvent.addListener(x,"click",function(ua){Ca.checked=!0;mxEvent.consume(ua)});mxEvent.addListener(M,"click",function(ua){Ca.checked=!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?ya.checked=!0:k.lastPrintFitRadioChecked?Ca.checked=!0:ra.checked=!0;A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsDown"));Da.appendChild(A);Ma.appendChild(Aa);Ma.appendChild(Ra);Ma.appendChild(Za);Ha.appendChild(La);Ha.appendChild($a);Ha.appendChild(Da);za.appendChild(Ma);za.appendChild(Ha);-aa.appendChild(za);S.appendChild(aa);X.appendChild(S);S=document.createElement("div");S.style.borderTop="1px solid lightGray";S.style.whiteSpace="nowrap";S.style.paddingTop="12px";S.style.marginTop="12px";S.style.paddingLeft="8px";mxUtils.write(S,mxResources.get("borderWidth")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="4px";Q.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;-S.appendChild(Q);A=document.createElement("span");A.style.marginLeft="8px";mxUtils.write(A,mxResources.get("zoom")+":");S.appendChild(A);var V=document.createElement("input");V.style.width="60px";V.style.marginLeft="4px";V.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";S.appendChild(V);mxUtils.br(S);var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;S.appendChild(ia);A=document.createElement("span");-A.style.marginLeft="4px";A.style.marginRight="8px";mxUtils.write(A,mxResources.get("grid"));S.appendChild(A);mxEvent.addListener(A,"click",function(ua){ia.checked=!0;mxEvent.consume(ua)});var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="10px";ka.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=I&&(S.appendChild(ka),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("transparentBackground")),S.appendChild(A),-mxEvent.addListener(A,"click",function(ua){ka.checked=!0;mxEvent.consume(ua)}));var oa=document.createElement("input");oa.setAttribute("type","checkbox");oa.style.marginTop="10px";oa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(S),S.appendChild(oa),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram")),S.appendChild(A),mxEvent.addListener(A,-"click",function(ua){oa.checked=!0;mxEvent.consume(ua)}));X.appendChild(S);A=document.createElement("div");A.style.marginTop="40px";A.style.textAlign="right";A.style.whiteSpace="nowrap";k.isOffline()||null!=I||A.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));S=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});S.className="geBtn";k.editor.cancelFirst&&A.appendChild(S);PrintDialog.previewEnabled&&null==I&&(aa=mxUtils.button(mxResources.get("preview"),-function(){try{k.hideDialog(),O(!1)}catch(ua){k.handleError(ua)}}),aa.className="geBtn",A.appendChild(aa));aa=mxUtils.button(mxResources.get(null!=I?"export":PrintDialog.previewEnabled?"print":"ok"),function(){try{k.hideDialog(),O(!0)}catch(ua){k.handleError(ua)}});aa.className="geBtn gePrimaryBtn";A.appendChild(aa);k.editor.cancelFirst||A.appendChild(S);X.appendChild(A);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?(X.classList.add("geDarkMode"),X.style.colorScheme="dark"):-(X.classList.remove("geDarkMode"),X.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ta=function(ua,Fa){ua=Fa.getProperty("dialog");X.parentNode==ua.container&&(k.editor.removeListener(ta),k.removeListener(xa))};k.editor.addListener("hideDialog",ta)}this.container=X};var Y=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||+[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var A=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?A="mxgraph.er":"sysML"==k.substring(0,5)&&(A="mxgraph.sysml"));return A};var ia=mxMarker.createMarker;mxMarker.createMarker=function(k,A,I,T,O,U,V,ba,fa,pa){if(null!=I&&null==mxMarker.markers[I]){var sa=this.getPackageForType(I);+null!=sa&&mxStencilRegistry.getStencil(sa)}return ia.apply(this,arguments)};var la=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,A,I,T,O,U){"1"==mxUtils.getValue(A.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(A.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return la.apply(this,arguments)};PrintDialog.prototype.create=function(k,A,I,T){function O(){za.value=Math.max(1,Math.min(sa,Math.max(parseInt(za.value),parseInt(Aa.value))));Aa.value=Math.max(1,Math.min(sa,+Math.min(parseInt(za.value),parseInt(Aa.value))))}function U(Fa){k.lastPrintPagesRadioChecked=wa.checked;k.lastPrintSelectionOnlyChecked=ra.checked;k.lastPrintCropRadioChecked=Ca.checked;k.lastPrintFitRadioChecked=Ka.checked;wa.checked&&Aa.value<za.value?(k.lastPrintPagesFromInput=Aa.value,k.lastPrintPagesToInput=za.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);ja.value=Math.max(1,Math.min(1600,parseInt(ja.value)))+"%";k.lastPrintZoom=ja.value;k.lastPrintBorder=W.value;k.lastPrintGrid=+ka.checked;k.lastPrintTransparent=oa.checked;k.lastPrintInclude=va.checked;k.lastPrintSheetsAcross=L.value;k.lastPrintSheetsDown=R.value;var Ma={};Ma.border=parseInt(W.value);Ma.scale=parseInt(ja.value)/100;Ma.grid=ka.checked;Ma.transparent=oa.checked;Ma.includeCopy=va.checked;Ma.sheetsAcross=parseInt(L.value);Ma.sheetsDown=parseInt(R.value);Ma.pagesFrom=parseInt(Aa.value);Ma.pagesTo=parseInt(za.value);Ma.allPages=qa.checked;Ma.selection=ra.checked;Ma.pageView=ya.checked;Ma.crop=Ca.checked;Ma.fit=+Ka.checked;return null!=I?I(!Fa,Ma):k.print(!Fa,Ma)}var V=k.editor.graph,ba=document.createElement("div"),fa=document.createElement("h3");fa.style.width="100%";fa.style.textAlign="center";fa.style.marginTop="0px";mxUtils.write(fa,A||mxResources.get("print"));ba.appendChild(fa);var pa=1,sa=1;fa=document.createElement("div");fa.style.whiteSpace="nowrap";var qa=document.createElement("input");qa.style.marginRight="8px";qa.style.marginBottom="8px";qa.setAttribute("type","radio");qa.setAttribute("name",+"pages-printdialog");fa.appendChild(qa);A=document.createElement("span");mxUtils.write(A,mxResources.get("allPages"));mxEvent.addListener(A,"click",function(){qa.checked=!0});fa.appendChild(A);mxUtils.br(fa);var wa=qa.cloneNode(!0);fa.appendChild(wa);A=document.createElement("span");mxUtils.write(A,mxResources.get("pages")+":");fa.appendChild(A);mxEvent.addListener(A,"click",function(){wa.checked=!0});var Aa=document.createElement("input");Aa.style.margin="0 4px";Aa.setAttribute("value","1");Aa.setAttribute("type",+"number");Aa.setAttribute("min","1");Aa.style.width="40px";fa.appendChild(Aa);A=document.createElement("span");mxUtils.write(A,mxResources.get("to"));fa.appendChild(A);var za=Aa.cloneNode(!0);fa.appendChild(za);mxEvent.addListener(Aa,"focus",function(){wa.checked=!0});mxEvent.addListener(za,"focus",function(){wa.checked=!0});mxEvent.addListener(Aa,"change",O);mxEvent.addListener(za,"change",O);if(null!=k.pages&&(sa=k.pages.length,null!=k.currentPage))for(var Da=0;Da<sa;Da++)if(k.currentPage==k.pages[Da]){pa=+Da+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(Aa.value=Math.min(sa,Math.max(1,k.lastPrintPagesFromInput)),za.value=Math.min(sa,Math.max(1,k.lastPrintPagesToInput))):(Aa.value=pa,za.value=pa);Aa.setAttribute("max",sa);za.setAttribute("max",sa);Da=mxUtils.button(mxResources.get("currentPage"),function(Fa){Aa.value=pa;za.value=pa;wa.checked=!0});Da.setAttribute("title",mxResources.get("currentPage"));Da.style.marginLeft="4px";Da.style.maxWidth="100px";Da.style.overflow="hidden";+Da.style.textOverflow="ellipsis";Da.style.whiteSpace="nowrap";fa.appendChild(Da);1<sa&&ba.appendChild(fa);fa=document.createElement("div");fa.style.borderBottom="1px solid lightGray";fa.style.paddingBottom="12px";fa.style.marginBottom="12px";fa.style.whiteSpace="nowrap";var ra=document.createElement("input");ra.setAttribute("name","pages-printdialog");ra.setAttribute("type",1==sa?"checkbox":"radio");ra.style.marginRight="8px";V.isSelectionEmpty()&&ra.setAttribute("disabled","disabled");V.isEnabled()&&+(fa.appendChild(ra),A=document.createElement("span"),mxUtils.write(A,mxResources.get("selectionOnly")),fa.appendChild(A));(V.isEnabled()||1<sa)&&ba.appendChild(fa);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?wa.checked=!0:!V.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?ra.checked=!0:qa.checked=!0;V.isSelectionEmpty()||mxEvent.addListener(A,"click",function(){ra.checked=!ra.checked});V=document.createElement("div");V.style.whiteSpace="nowrap";var ya=document.createElement("input");ya.style.marginBottom=+"8px";ya.style.marginRight="8px";ya.setAttribute("type","radio");ya.setAttribute("name","printSize");V.appendChild(ya);A=document.createElement("span");mxUtils.write(A,mxResources.get("pageView"));V.appendChild(A);mxEvent.addListener(V,"click",function(){ya.checked=!0});ba.appendChild(V);V=document.createElement("div");V.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.style.marginBottom="8px";Ca.style.marginRight="8px";Ca.setAttribute("type","radio");Ca.setAttribute("name","printSize");+V.appendChild(Ca);A=document.createElement("span");mxUtils.write(A,mxResources.get("crop"));V.appendChild(A);mxEvent.addListener(V,"click",function(){Ca.checked=!0});ba.appendChild(V);V=document.createElement("div");V.style.whiteSpace="nowrap";var Ka=document.createElement("input");Ka.style.marginBottom="8px";Ka.style.marginRight="8px";Ka.setAttribute("type","radio");Ka.setAttribute("name","printSize");A=document.createElement("div");A.style.display="inline-block";A.style.verticalAlign="top";A.style.paddingTop=+"2px";A.appendChild(Ka);V.appendChild(A);fa=document.createElement("table");fa.style.display="inline-block";fa.style.borderSpacing="0";Da=document.createElement("tbody");var Ha=document.createElement("tr"),Ba=Ha.cloneNode(!0),Pa=document.createElement("td"),$a=Pa.cloneNode(!0),Na=Pa.cloneNode(!0),Ya=Pa.cloneNode(!0),Ea=Pa.cloneNode(!0),x=Pa.cloneNode(!0);Pa.style.textAlign="right";Ya.style.textAlign="right";mxUtils.write(Pa,mxResources.get("fitTo"));mxEvent.addListener(V,"click",function(Fa){mxEvent.getSource(Fa)!=+Ka&&(Ka.checked=!Ka.checked)});var L=document.createElement("input");L.style.margin="0 2px";L.style.boxSizing="border-box";L.setAttribute("value",k.lastPrintSheetsAcross||"1");L.setAttribute("min","1");L.setAttribute("type","number");L.style.width="40px";$a.appendChild(L);A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsAcross"));Na.appendChild(A);mxUtils.write(Ya,mxResources.get("fitToBy"));var R=L.cloneNode(!0);R.setAttribute("value",k.lastPrintSheetsDown||"1");Ea.appendChild(R);+mxEvent.addListener(L,"click",function(Fa){Ka.checked=!0;mxEvent.consume(Fa)});mxEvent.addListener(R,"click",function(Fa){Ka.checked=!0;mxEvent.consume(Fa)});k.lastPrintCropRadioChecked?Ca.checked=!0:k.lastPrintFitRadioChecked?Ka.checked=!0:ya.checked=!0;A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsDown"));x.appendChild(A);Ha.appendChild(Pa);Ha.appendChild($a);Ha.appendChild(Na);Ba.appendChild(Ya);Ba.appendChild(Ea);Ba.appendChild(x);Da.appendChild(Ha);Da.appendChild(Ba);+fa.appendChild(Da);V.appendChild(fa);ba.appendChild(V);V=document.createElement("div");V.style.borderTop="1px solid lightGray";V.style.whiteSpace="nowrap";V.style.paddingTop="12px";V.style.marginTop="12px";V.style.paddingLeft="8px";mxUtils.write(V,mxResources.get("borderWidth")+":");var W=document.createElement("input");W.setAttribute("type","number");W.setAttribute("min","0");W.style.width="40px";W.style.marginLeft="4px";W.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;+V.appendChild(W);A=document.createElement("span");A.style.marginLeft="8px";mxUtils.write(A,mxResources.get("zoom")+":");V.appendChild(A);var ja=document.createElement("input");ja.style.width="60px";ja.style.marginLeft="4px";ja.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";V.appendChild(ja);mxUtils.br(V);var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="12px";ka.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;V.appendChild(ka);A=document.createElement("span");+A.style.marginLeft="4px";A.style.marginRight="8px";mxUtils.write(A,mxResources.get("grid"));V.appendChild(A);mxEvent.addListener(A,"click",function(Fa){ka.checked=!0;mxEvent.consume(Fa)});var oa=document.createElement("input");oa.setAttribute("type","checkbox");oa.style.marginTop="10px";oa.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=I&&(V.appendChild(oa),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("transparentBackground")),V.appendChild(A),+mxEvent.addListener(A,"click",function(Fa){oa.checked=!0;mxEvent.consume(Fa)}));var va=document.createElement("input");va.setAttribute("type","checkbox");va.style.marginTop="10px";va.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(V),V.appendChild(va),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram")),V.appendChild(A),mxEvent.addListener(A,+"click",function(Fa){va.checked=!0;mxEvent.consume(Fa)}));ba.appendChild(V);A=document.createElement("div");A.style.marginTop="40px";A.style.textAlign="right";A.style.whiteSpace="nowrap";k.isOffline()||null!=I||A.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));V=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});V.className="geBtn";k.editor.cancelFirst&&A.appendChild(V);PrintDialog.previewEnabled&&null==I&&(fa=mxUtils.button(mxResources.get("preview"),+function(){try{k.hideDialog(),U(!1)}catch(Fa){k.handleError(Fa)}}),fa.className="geBtn",A.appendChild(fa));T=null!=T?T:null!=I?"export":PrintDialog.previewEnabled?"print":"ok";T=mxUtils.button(mxResources.get(T),function(){try{k.hideDialog(),U(!0)}catch(Fa){k.handleError(Fa)}});T.className="geBtn gePrimaryBtn";A.appendChild(T);k.editor.cancelFirst||A.appendChild(V);ba.appendChild(A);if(k.editor.isChromelessView()){var ta=function(){Editor.isDarkMode()?(ba.classList.add("geDarkMode"),ba.style.colorScheme=+"dark"):(ba.classList.remove("geDarkMode"),ba.style.colorScheme="light")};k.addListener("darkModeChanged",ta);ta();var xa=function(Fa,Ma){Fa=Ma.getProperty("dialog");ba.parentNode==Fa.container&&(k.editor.removeListener(xa),k.removeListener(ta))};k.editor.addListener("hideDialog",xa)}this.container=ba};var Y=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else Y.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),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 ma=document.createElement("canvas"),Z=new Image;Z.onload=function(){try{ma.getContext("2d").drawImage(Z,0,0);var k=ma.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=k&&6<k.length}catch(A){}};Z.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(k){}Editor.prototype.useCanvasForExport=!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;m.previousAdaptiveColors=m.adaptiveColors;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})();-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.16";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.1.0";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");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"}};@@ -3499,10 +3499,10 @@ f,l)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalDatEditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var f=this.editor.graph;f.mathEnabled=c;null!=f.view.backgroundImage&&(f.view.backgroundImage.destroy(),f.view.backgroundImage=null);this.editor.updateGraphComponents();f.refresh();f.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,f,l){var t=null==c||null==f;l=null!=l?l:24;var z=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",-speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),C=this.timeout,F=z.spin,N=null,K=null,J=mxUtils.bind(this,function(ea){null!=ea&&ea()});z.spin=function(ea,ca,W,ba){ba=null!=ba?ba:C;var ha=!1;if(!this.active){var la=Date.now();null!=W&&(N=window.setTimeout(function(){z.stop();N=null;W({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:K})},ba));F.call(this,ea);this.active=!0;null!=ca&&(t&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/-2-2),ha=document.createElement("div"),ha.className="geSpinnerStatus",ha.style.position="absolute",ha.style.whiteSpace="nowrap",ha.style.background="#4B4243",ha.style.color="white",ha.style.fontFamily=Editor.defaultHtmlFont,ha.style.fontSize="9pt",ha.style.padding="6px",ha.style.paddingLeft="10px",ha.style.paddingRight="10px",ha.style.zIndex=2E9,ha.style.left=Math.max(0,c)+"px",ha.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(ha.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(ha.style,-"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(ha.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=ca.substring(ca.length-3,ca.length)&&"!"!=ca.charAt(ca.length-1)&&(ca+="..."),ha.innerHTML=mxUtils.htmlEntities(ca),ea.appendChild(ha),z.status=ha);this.pause=mxUtils.bind(this,function(){var Y=J;this.active&&(ba=Math.max(0,ba-(Date.now()-la)),Y=mxUtils.bind(this,function(ma){this.spin(ea,ca,W,ba);if(null!=ma)try{ma(),K=mxUtils.bind(this,function(){this.spin(ea,ca,-W,ba);try{ma()}catch(Z){null!=W&&W(Z)}})}catch(Z){null!=W&&W(Z)}}));this.stop();return Y});ha=!0}return ha};var da=z.stop;z.stop=function(){da.call(this);this.active&&(this.active=!1,null!=N&&(window.clearTimeout(N),N=null),null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status),z.status=null)};z.pause=function(){return J};return z};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=+speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),C=this.timeout,F=z.spin,N=null,K=null,J=mxUtils.bind(this,function(ea){null!=ea&&ea()});z.spin=function(ea,ca,X,aa){aa=null!=aa?aa:C;var ia=!1;if(!this.active){var la=Date.now();null!=X&&(N=window.setTimeout(function(){z.stop();N=null;X({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:K})},aa));F.call(this,ea);this.active=!0;null!=ca&&(t&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/+2-2),ia=document.createElement("div"),ia.className="geSpinnerStatus",ia.style.position="absolute",ia.style.whiteSpace="nowrap",ia.style.background="#4B4243",ia.style.color="white",ia.style.fontFamily=Editor.defaultHtmlFont,ia.style.fontSize="9pt",ia.style.padding="6px",ia.style.paddingLeft="10px",ia.style.paddingRight="10px",ia.style.zIndex=2E9,ia.style.left=Math.max(0,c)+"px",ia.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(ia.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(ia.style,+"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(ia.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=ca.substring(ca.length-3,ca.length)&&"!"!=ca.charAt(ca.length-1)&&(ca+="..."),ia.innerHTML=mxUtils.htmlEntities(ca),ea.appendChild(ia),z.status=ia);this.pause=mxUtils.bind(this,function(){var Y=J;this.active&&(aa=Math.max(0,aa-(Date.now()-la)),Y=mxUtils.bind(this,function(ma){this.spin(ea,ca,X,aa);if(null!=ma)try{ma(),K=mxUtils.bind(this,function(){this.spin(ea,ca,+X,aa);try{ma()}catch(Z){null!=X&&X(Z)}})}catch(Z){null!=X&&X(Z)}}));this.stop();return Y});ia=!0}return ia};var da=z.stop;z.stop=function(){da.call(this);this.active&&(this.active=!1,null!=N&&(window.clearTimeout(N),N=null),null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status),z.status=null)};z.pause=function(){return J};return z};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=l&&0==l.getElementsByTagName("parsererror").length}catch(t){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var l=f.getFunction,t=this.editor.graph,z=this;f.getFunction=function(C){if(t.isSelectionEmpty()&&null!=z.pages&&0<z.pages.length){var F=z.getSelectedPageIndex();if(mxEvent.isShiftDown(C)){if(37==C.keyCode)return function(){0<F&&z.movePage(F,F-1)};if(38==C.keyCode)return function(){0<F&&z.movePage(F,0)};if(39==C.keyCode)return function(){F<z.pages.length-1&&z.movePage(F,F+1)};if(40==C.keyCode)return function(){F<@@ -3511,11 +3511,11 @@ mxEvent.isShiftDown(C)||mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMetC=this.editor.extractGraphModel(z.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=C?mxUtils.getXml(C):""}}catch(F){}return f};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var f=c.indexOf('<meta charset="utf-8">');0<=f&&(c=c.slice(0,f)+'<meta charset="utf-8"/>'+c.slice(f+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,f){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",f);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var l=null!=c?this.editor.extractGraphModel(c,!0):null;null!=l&&(c=l);if(null!=c){l=this.editor.graph;l.model.beginUpdate();try{var t=null!=this.pages?this.pages.slice():null,z=c.getElementsByTagName("diagram");if(1<z.length||1==z.length&&z[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var C=z.length-1;0<=C;C--){var F=this.updatePageRoot(new DiagramPage(z[C]));null==F.getName()&&F.setName(mxResources.get("pageWithNumber",[C+1]));l.model.execute(new ChangePage(this,F,0==C?F:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,-l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=t)for(C=0;C<t.length;C++)l.model.execute(new ChangePage(this,t[C],null));var N=this.getCurrentFile();null!=N&&N.fileReplaced(f)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;K=null!=K?K:!0;da=null!=da?da:!Editor.defaultCompressed;var W=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var ba=-"_blank";else W=ba=t;if(null==c)return"";var ha=c;if("mxfile"!=ha.nodeName.toLowerCase()){if(da){var la=c.ownerDocument.createElement("diagram");la.setAttribute("name",mxResources.get("pageWithNumber",[1]));la.setAttribute("id",Editor.guid());la.appendChild(c)}else{la=Graph.zapGremlins(mxUtils.getXml(c));ha=Graph.compress(la);if(Graph.decompress(ha)!=la)return la;la=c.ownerDocument.createElement("diagram");la.setAttribute("name",mxResources.get("pageWithNumber",[1]));la.setAttribute("id",Editor.guid());-mxUtils.setTextContent(la,ha)}ha=c.ownerDocument.createElement("mxfile");ha.appendChild(la)}J?(ha=ha.cloneNode(!0),ha.removeAttribute("modified"),ha.removeAttribute("host"),ha.removeAttribute("agent"),ha.removeAttribute("etag"),ha.removeAttribute("userAgent"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("type")):(ha.removeAttribute("userAgent"),ha.removeAttribute("modified"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("pages"),ha.removeAttribute("type"),-ha.removeAttribute("etag"),mxClient.IS_CHROMEAPP?ha.setAttribute("host","Chrome"):EditorUi.isElectronApp?ha.setAttribute("host","Electron"):ha.setAttribute("host",window.location.hostname),ha.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),ha.setAttribute("version",EditorUi.VERSION),1<ha.getElementsByTagName("diagram").length&&null!=this.pages&&ha.setAttribute("pages",this.pages.length));null!=ea&&(ha=ha.cloneNode(!0),ha.setAttribute("scale",ea));null!=ca&&-(ha=ha.cloneNode(!0),ha.setAttribute("border",ca));c=da?mxUtils.getPrettyXml(ha):mxUtils.getXml(ha);if(!C&&!z&&(F||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(ha),f,null!=l?l.getTitle():null,ba,W);else if(C||!z&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(t=null),l=this.getSvgFileProperties(ha),c=this.getEmbeddedSvg(c,f,t,null,N,K,W,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=+l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=t)for(C=0;C<t.length;C++)l.model.execute(new ChangePage(this,t[C],null));var N=this.getCurrentFile();null!=N&&N.fileReplaced(f)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;K=null!=K?K:!0;da=null!=da?da:!Editor.defaultCompressed;var X=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var aa=+"_blank";else X=aa=t;if(null==c)return"";var ia=c;if("mxfile"!=ia.nodeName.toLowerCase()){if(da){var la=c.ownerDocument.createElement("diagram");la.setAttribute("name",mxResources.get("pageWithNumber",[1]));la.setAttribute("id",Editor.guid());la.appendChild(c)}else{la=Graph.zapGremlins(mxUtils.getXml(c));ia=Graph.compress(la);if(Graph.decompress(ia)!=la)return la;la=c.ownerDocument.createElement("diagram");la.setAttribute("name",mxResources.get("pageWithNumber",[1]));la.setAttribute("id",Editor.guid());+mxUtils.setTextContent(la,ia)}ia=c.ownerDocument.createElement("mxfile");ia.appendChild(la)}J?(ia=ia.cloneNode(!0),ia.removeAttribute("modified"),ia.removeAttribute("host"),ia.removeAttribute("agent"),ia.removeAttribute("etag"),ia.removeAttribute("userAgent"),ia.removeAttribute("version"),ia.removeAttribute("editor"),ia.removeAttribute("type")):(ia.removeAttribute("userAgent"),ia.removeAttribute("modified"),ia.removeAttribute("version"),ia.removeAttribute("editor"),ia.removeAttribute("pages"),ia.removeAttribute("type"),+ia.removeAttribute("etag"),mxClient.IS_CHROMEAPP?ia.setAttribute("host","Chrome"):EditorUi.isElectronApp?ia.setAttribute("host","Electron"):ia.setAttribute("host",window.location.hostname),ia.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),ia.setAttribute("version",EditorUi.VERSION),1<ia.getElementsByTagName("diagram").length&&null!=this.pages&&ia.setAttribute("pages",this.pages.length));null!=ea&&(ia=ia.cloneNode(!0),ia.setAttribute("scale",ea));null!=ca&&+(ia=ia.cloneNode(!0),ia.setAttribute("border",ca));c=da?mxUtils.getPrettyXml(ia):mxUtils.getXml(ia);if(!C&&!z&&(F||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(ia),f,null!=l?l.getTitle():null,aa,X);else if(C||!z&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(t=null),l=this.getSvgFileProperties(ia),c=this.getEmbeddedSvg(c,f,t,null,N,K,X,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,f,l,t){c=null!=c?c:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var z=this.editor.getGraphXml(c,t);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(K){var J=K.getElementsByTagName("mxGraphModel"),da=0<J.length?J[0]:null;J=K;null==da&&l?(da=mxUtils.getNodeValue(K),0<da.length&&(da=Graph.decompress(da),null!=da&&0<da.length&&(J=K.cloneNode(!1),J.appendChild(mxUtils.parseXml(da).documentElement)))):null==da||l?J=K.cloneNode(!0):(J=K.cloneNode(!1),mxUtils.setTextContent(J,Graph.compressNode(da)));z.appendChild(J)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(z),z=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var C=this.pages[f],F=C.node;if(C!=this.currentPage)if(C.needsUpdate){var N=new mxCodec(mxUtils.createXmlDocument());N=N.encode(new mxGraphModel(C.root));this.editor.graph.saveViewState(C.viewState,N,null,t);EditorUi.removeChildNodes(F);F.appendChild(N);delete C.needsUpdate}else t&&(this.updatePageRoot(C),null!=C.viewState.backgroundImage&&(null!=C.viewState.backgroundImage.originalSrc?C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.originalSrc,C):Graph.isPageLink(C.viewState.backgroundImage.src)&&(C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.src,C))),null!=C.viewState.backgroundImage&&null!=C.viewState.backgroundImage.originalSrc&&(N=new mxCodec(mxUtils.createXmlDocument()),N=N.encode(new mxGraphModel(C.root)),@@ -3525,9 +3525,9 @@ c[EditorUi.DIFF_UPDATE][t];null!=z.name&&(z.name=this.anonymizeString(z.name));ndelete z.cells);mxUtils.isEmptyObject(z)&&delete c[EditorUi.DIFF_UPDATE][t]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,f){if(null!=c.attributes)for(var l=0;l<c.attributes.length;l++)"as"!=c.attributes[l].name&&c.setAttribute(c.attributes[l].name,this.anonymizeString(c.attributes[l].value,f));if(null!=c.childNodes)for(l=0;l<c.childNodes.length;l++)this.anonymizeAttributes(c.childNodes[l],f)};EditorUi.prototype.anonymizeNode=function(c,f){f=c.getElementsByTagName("mxCell");for(var l=0;l<f.length;l++)null!=f[l].getAttribute("value")&&f[l].setAttribute("value","["+f[l].getAttribute("value").length+"]"),null!=f[l].getAttribute("xmlValue")&&f[l].setAttribute("xmlValue","["+f[l].getAttribute("xmlValue").length+"]"),null!=f[l].getAttribute("style")&&f[l].setAttribute("style","["+f[l].getAttribute("style").length+"]"),null!=f[l].parentNode&&"root"!=f[l].parentNode.nodeName&&null!=f[l].parentNode.parentNode&&(f[l].setAttribute("id",f[l].parentNode.getAttribute("id")),f[l].parentNode.parentNode.replaceChild(f[l],f[l].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==-DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();f.handleFileError(l,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){f.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){z=null!=z?z:!0;C=null!=C?C:!1;J=null!=J?J:!Editor.defaultCompressed;var W=this.editor.graph;if((f||!c&&null!=K&&/(\.svg)$/i.test(K.getTitle()))&&null!=this.pages&&this.currentPage!=-this.pages[0]){var ba=W.getGlobalVariable;W=this.createTemporaryGraph(W.getStylesheet());W.setBackgroundImage=this.editor.graph.setBackgroundImage;W.background=this.editor.graph.background;var ha=null!=this.pages?this.pages[0]:null;null==ha||this.currentPage==ha?W.setBackgroundImage(this.editor.graph.backgroundImage):null!=ha.viewState&&null!=ha.viewState&&W.setBackgroundImage(ha.viewState.backgroundImage);W.getGlobalVariable=function(la){return"page"==la&&null!=ha?ha.getName():"pagenumber"==la?1:-ba.apply(this,arguments)};document.body.appendChild(W.container);null!=ha&&W.model.setRoot(ha.root)}F=null!=F?F:this.getXmlFileData(z,C,J,da);K=null!=K?K:this.getCurrentFile();c=this.createFileData(F,W,K,window.location.href,c,f,l,t,z,N,J,ea,ca);W!=this.editor.graph&&W.container.parentNode.removeChild(W.container);return c};EditorUi.prototype.getHtml=function(c,f,l,t,z,C){C=null!=C?C:!0;var F=null,N=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=C?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());+DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();f.handleFileError(l,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){f.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){z=null!=z?z:!0;C=null!=C?C:!1;J=null!=J?J:!Editor.defaultCompressed;var X=this.editor.graph;if((f||!c&&null!=K&&/(\.svg)$/i.test(K.getTitle()))&&null!=this.pages&&this.currentPage!=+this.pages[0]){var aa=X.getGlobalVariable;X=this.createTemporaryGraph(X.getStylesheet());X.setBackgroundImage=this.editor.graph.setBackgroundImage;X.background=this.editor.graph.background;var ia=null!=this.pages?this.pages[0]:null;null==ia||this.currentPage==ia?X.setBackgroundImage(this.editor.graph.backgroundImage):null!=ia.viewState&&null!=ia.viewState&&X.setBackgroundImage(ia.viewState.backgroundImage);X.getGlobalVariable=function(la){return"page"==la&&null!=ia?ia.getName():"pagenumber"==la?1:+aa.apply(this,arguments)};document.body.appendChild(X.container);null!=ia&&X.model.setRoot(ia.root)}F=null!=F?F:this.getXmlFileData(z,C,J,da);K=null!=K?K:this.getCurrentFile();c=this.createFileData(F,X,K,window.location.href,c,f,l,t,z,N,J,ea,ca);X!=this.editor.graph&&X.container.parentNode.removeChild(X.container);return c};EditorUi.prototype.getHtml=function(c,f,l,t,z,C){C=null!=C?C:!0;var F=null,N=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=C?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var K=f.view.scale;C=Math.floor(F.x/K-f.view.translate.x);K=Math.floor(F.y/K-f.view.translate.y);F=f.background;null==z&&(f=this.getBasenames().join(";"),0<f.length&&(N=EditorUi.drawHost+"/embed.js?s="+f));c.setAttribute("x0",C);c.setAttribute("y0",K)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=t&&c.setAttribute("edit",t));null!=z&&(z=z.replace(/&/g,"&"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";t=Graph.compress(c);Graph.decompress(t)!=c&&(t=encodeURIComponent(c));return(null==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+"</head>\n<body"+(null==z&&null!=F&&F!=mxConstants.NONE?' style="background-color:'+F+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+t+"</div>\n</div>\n"+(null==z?'<script type="text/javascript" src="'+N+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};@@ -3538,20 +3538,20 @@ z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo1null!=t.pageId&&f.getId()==t.pageId)z=f;if(null==l[f.getId()])l[f.getId()]=f;else throw Error(f.getId()+": Duplicate page ID");}this.currentPage=null!=z?z:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var F=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(C=0;C<F.length;C++)f[F[C]]=!0;var N=this.editor.graph.getModel(),K=N.getChildren(N.root);for(C=0;C<K.length;C++){var J=K[C];N.setVisible(J,f[J.id]||!1)}}catch(da){}};EditorUi.prototype.getBaseFilename=function(c){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(c,f,l,t,z,-C,F,N,K,J,da,ea,ca,W,ba,ha){try{t=null!=t?t:this.editor.graph.isSelectionEmpty();var la=this.getBaseFilename(!z),Y=la+("xml"==c||"pdf"==c&&da?".drawio":"")+"."+c;if("xml"==c){var ma=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,t,z,null,null,null,f);this.saveData(Y,c,ma,"text/xml")}else if("html"==c)ma=this.getHtml2(this.getFileData(!0),this.editor.graph,la),this.saveData(Y,c,ma,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==-c?Y=la+".png":"jpeg"==c&&(Y=la+".jpg"),this.saveRequest(Y,c,mxUtils.bind(this,function(U,O){try{return this.createDownloadRequest(U,c,t,O,F,z,N,K,J,da,ea,void 0,void 0,!C,ca,W,ba,ha)}catch(S){this.handleError(S)}}));else{var Z=null,k=mxUtils.bind(this,function(U){U.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",U,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==c){var A=this.editor.graph.background;-if(F||A==mxConstants.NONE)A=null;var I=this.editor.graph.getSvg(A,null,null,null,null,t);l&&this.editor.graph.addSvgShadow(I);this.editor.convertImages(I,mxUtils.bind(this,mxUtils.bind(this,function(U){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(U))})))}else Y=la+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(U){this.spinner.stop();k(U)}),t)}}catch(U){this.handleError(U)}};EditorUi.prototype.createDownloadRequest=function(c,f,l,t,z,C,F,N,K,-J,da,ea,ca,W,ba,ha,la,Y){c=this.downloadRequestBuilder(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W,ba,ha,la,Y);f="";for(var ma in c)l=c[ma],null!=l&&(f+=ma+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W,ba,ha,la,Y){var ma=this.editor.graph,Z=ma.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==C?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var k=null,A=null,I=null;if(!EditorUi.isElectronApp&&+C,F,N,K,J,da,ea,ca,X,aa,ia){try{t=null!=t?t:this.editor.graph.isSelectionEmpty();var la=this.getBaseFilename(!z),Y=la+("xml"==c||"pdf"==c&&da?".drawio":"")+"."+c;if("xml"==c){var ma=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,t,z,null,null,null,f);this.saveData(Y,c,ma,"text/xml")}else if("html"==c)ma=this.getHtml2(this.getFileData(!0),this.editor.graph,la),this.saveData(Y,c,ma,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==+c?Y=la+".png":"jpeg"==c&&(Y=la+".jpg"),this.saveRequest(Y,c,mxUtils.bind(this,function(T,O){try{return this.createDownloadRequest(T,c,t,O,F,z,N,K,J,da,ea,void 0,void 0,!C,ca,X,aa,ia)}catch(U){this.handleError(U)}}));else{var Z=null,k=mxUtils.bind(this,function(T){T.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==c){var A=this.editor.graph.background;+if(F||A==mxConstants.NONE)A=null;var I=this.editor.graph.getSvg(A,null,null,null,null,t);l&&this.editor.graph.addSvgShadow(I);this.editor.convertImages(I,mxUtils.bind(this,mxUtils.bind(this,function(T){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(T))})))}else Y=la+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(T){this.spinner.stop();k(T)}),t)}}catch(T){this.handleError(T)}};EditorUi.prototype.createDownloadRequest=function(c,f,l,t,z,C,F,N,K,+J,da,ea,ca,X,aa,ia,la,Y){c=this.downloadRequestBuilder(c,f,l,t,z,C,F,N,K,J,da,ea,ca,X,aa,ia,la,Y);f="";for(var ma in c)l=c[ma],null!=l&&(f+=ma+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca,X,aa,ia,la,Y){var ma=this.editor.graph,Z=ma.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==C?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var k=null,A=null,I=null;if(!EditorUi.isElectronApp&&(Z.width*Z.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};J=J?"1":"0";"pdf"==f&&(null!=da?(k=da.from,A=da.to):0==C&&(I="1"));"xmlpng"==f&&(J="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(C=0;C<this.pages.length;C++)if(this.pages[C]==this.currentPage){k=C;break}C=ma.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!z?z||null!=C&&C!=mxConstants.NONE||(C="#ffffff"):C=mxConstants.NONE;z={globalVars:ma.getExportVariables()};-K&&(z.grid={size:ma.gridSize,steps:ma.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:ma.view.gridColor});Graph.translateDiagram&&(z.diagramLanguage=Graph.diagramLanguage);return{format:f,from:k,to:A,allPages:I,bg:null!=C?C:mxConstants.NONE,base64:t,embedXml:J,xml:l,filename:null!=c?c:"",extras:JSON.stringify(z),scale:F,border:N,pageMargin:ba,w:ea&&isFinite(ea)?ea:null,h:ca&&isFinite(ca)?ca:null,crop:null!=W&&W?"1":"0",fit:null!=ha&&ha?"1":"0",sheetsAcross:la,+K&&(z.grid={size:ma.gridSize,steps:ma.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:ma.view.gridColor});Graph.translateDiagram&&(z.diagramLanguage=Graph.diagramLanguage);return{format:f,from:k,to:A,allPages:I,bg:null!=C?C:mxConstants.NONE,base64:t,embedXml:J,xml:l,filename:null!=c?c:"",extras:JSON.stringify(z),scale:F,border:N,pageMargin:aa,w:ea&&isFinite(ea)?ea:null,h:ca&&isFinite(ca)?ca:null,crop:null!=X&&X?"1":"0",fit:null!=ia&&ia?"1":"0",sheetsAcross:la,sheetsDown:Y}};EditorUi.prototype.setMode=function(c,f){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var f=c.indexOf("#");0<=f&&(c=c.substring(0,f))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,f={};if(null!=c&&0<c.length){var l=c.lastIndexOf("#");if(0<l){c=decodeURIComponent(c.substring(l+1));try{f=JSON.parse(c)}catch(t){}}}return f};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var f=window.location.hash;if(null==f||""==f)f="#";var l=f.lastIndexOf("#");0<l&&(f=f.substring(0,l));try{null==c||mxUtils.isEmptyObject(c)||(f=f+"#"+encodeURIComponent(JSON.stringify(c)))}catch(t){}0<l&&0<f.lastIndexOf("#")?window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,l){var t=window.location.hash,z=mxUtils.bind(this,function(F){var N=null!=c.data?c.data:"";null!=F&&0<F.length&&(0<N.length&&(N+="\n"),N+=F);F=new LocalFile(this,"csv"!=c.format&&0<N.length?N:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);F.getHash=function(){return t};this.fileLoaded(F);"csv"==c.format&&this.importCsv(N,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();-this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var K=null!=c.interval?parseInt(c.interval):6E4,J=null,da=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(W){ca===this.currentPage&&(200<=W.getStatus()&&300>=W.getStatus()?(this.updateDiagram(W.getText()),ea()):this.handleError({message:mxResources.get("error")+" "+W.getStatus()}))}),mxUtils.bind(this,-function(W){this.handleError(W)}))}),ea=mxUtils.bind(this,function(){window.clearTimeout(J);J=window.setTimeout(da,K)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ea();da()}));ea();da()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var C=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(C,mxUtils.bind(this,function(F){z(F)}),mxUtils.bind(this,function(F){null!=l&&l(F)}))}else z("")};EditorUi.prototype.updateDiagram=function(c){function f(Z){var k=new mxCellOverlay(Z.image||+this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var K=null!=c.interval?parseInt(c.interval):6E4,J=null,da=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(X){ca===this.currentPage&&(200<=X.getStatus()&&300>=X.getStatus()?(this.updateDiagram(X.getText()),ea()):this.handleError({message:mxResources.get("error")+" "+X.getStatus()}))}),mxUtils.bind(this,+function(X){this.handleError(X)}))}),ea=mxUtils.bind(this,function(){window.clearTimeout(J);J=window.setTimeout(da,K)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ea();da()}));ea();da()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var C=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(C,mxUtils.bind(this,function(F){z(F)}),mxUtils.bind(this,function(F){null!=l&&l(F)}))}else z("")};EditorUi.prototype.updateDiagram=function(c){function f(Z){var k=new mxCellOverlay(Z.image||z.warningImage,Z.tooltip,Z.align,Z.valign,Z.offset);k.addListener(mxEvent.CLICK,function(A,I){t.alert(Z.tooltip)});return k}var l=null,t=this;if(null!=c&&0<c.length&&(l=mxUtils.parseXml(c),c=null!=l?l.documentElement:null,null!=c&&"updates"==c.nodeName)){var z=this.editor.graph,C=z.getModel();C.beginUpdate();var F=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var N=C.getCell(c.getAttribute("id"));if(null!=N){try{var K=c.getAttribute("value");if(null!=K){var J=mxUtils.parseXml(K).documentElement;-if(null!=J)if("1"==J.getAttribute("replace-value"))C.setValue(N,J);else for(var da=J.attributes,ea=0;ea<da.length;ea++)z.setAttributeForCell(N,da[ea].nodeName,0<da[ea].nodeValue.length?da[ea].nodeValue:null)}}catch(Z){null!=window.console&&console.log("Error in value for "+N.id+": "+Z)}try{var ca=c.getAttribute("style");null!=ca&&z.model.setStyle(N,ca)}catch(Z){null!=window.console&&console.log("Error in style for "+N.id+": "+Z)}try{var W=c.getAttribute("icon");if(null!=W){var ba=0<W.length?JSON.parse(W):-null;null!=ba&&ba.append||z.removeCellOverlays(N);null!=ba&&z.addCellOverlay(N,f(ba))}}catch(Z){null!=window.console&&console.log("Error in icon for "+N.id+": "+Z)}try{var ha=c.getAttribute("geometry");if(null!=ha){ha=JSON.parse(ha);var la=z.getCellGeometry(N);if(null!=la){la=la.clone();for(key in ha){var Y=parseFloat(ha[key]);"dx"==key?la.x+=Y:"dy"==key?la.y+=Y:"dw"==key?la.width+=Y:"dh"==key?la.height+=Y:la[key]=parseFloat(ha[key])}z.model.setGeometry(N,la)}}}catch(Z){null!=window.console&&console.log("Error in icon for "++if(null!=J)if("1"==J.getAttribute("replace-value"))C.setValue(N,J);else for(var da=J.attributes,ea=0;ea<da.length;ea++)z.setAttributeForCell(N,da[ea].nodeName,0<da[ea].nodeValue.length?da[ea].nodeValue:null)}}catch(Z){null!=window.console&&console.log("Error in value for "+N.id+": "+Z)}try{var ca=c.getAttribute("style");null!=ca&&z.model.setStyle(N,ca)}catch(Z){null!=window.console&&console.log("Error in style for "+N.id+": "+Z)}try{var X=c.getAttribute("icon");if(null!=X){var aa=0<X.length?JSON.parse(X):+null;null!=aa&&aa.append||z.removeCellOverlays(N);null!=aa&&z.addCellOverlay(N,f(aa))}}catch(Z){null!=window.console&&console.log("Error in icon for "+N.id+": "+Z)}try{var ia=c.getAttribute("geometry");if(null!=ia){ia=JSON.parse(ia);var la=z.getCellGeometry(N);if(null!=la){la=la.clone();for(key in ia){var Y=parseFloat(ia[key]);"dx"==key?la.x+=Y:"dy"==key?la.y+=Y:"dw"==key?la.width+=Y:"dh"==key?la.height+=Y:la[key]=parseFloat(ia[key])}z.model.setGeometry(N,la)}}}catch(Z){null!=window.console&&console.log("Error in icon for "+N.id+": "+Z)}}}else if("model"==c.nodeName){for(var ma=c.firstChild;null!=ma&&ma.nodeType!=mxConstants.NODETYPE_ELEMENT;)ma=ma.nextSibling;null!=ma&&(new mxCodec(c.firstChild)).decode(ma,C)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(z.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))z.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(F=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{C.endUpdate()}null!=F&&this.chromelessResize&&this.chromelessResize(!0,F)}return l};EditorUi.prototype.getCopyFilename=function(c,f){var l=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var t=l.lastIndexOf(".");0<=t&&(c=l.substring(t),l=l.substring(0,t));if(f){f=l;var z=new Date;l=z.getFullYear();t=z.getMonth()+1;var C=z.getDate(),F=z.getHours(),N=z.getMinutes();z=z.getSeconds();l=f+(" "+(l+"-"+t+"-"+C+"-"+F+"-"+N+"-"+z))}return l=mxResources.get("copyOf",[l])+c};EditorUi.prototype.logIfModified=function(c,f){try{null!=c&&f&&EditorUi.debug("File.closed",[c])}catch(l){}};EditorUi.prototype.fileLoaded=function(c,f,l){var t=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var z=!1;this.hideDialog();null!=t&&(t.removeListener(this.descriptorChangedListener),this.logIfModified(t,!0),t.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var C=mxUtils.bind(this,function(){this.setGraphEnabled(!1);@@ -3572,17 +3572,17 @@ this.libraryLoaded(c,t,l.documentElement.getAttribute("title"),f)}else throw{mes(null==F&&(F=document.createElement("div"),F.className="geDropTarget",mxUtils.write(F,mxResources.get("dragElementsHere"))),ma.appendChild(F)):this.addLibraryEntries(Y,ma)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==l&&(l=c.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));var K=this.sidebar.addPalette(c.getHash(),l,null!=t?t:!0,mxUtils.bind(this,function(Y){N(f,Y)}));null!=z&&(z.div=K);this.repositionLibrary(C,"L.scratchpad"!=c.getHash());t=K.parentNode.previousSibling;l=t.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&t.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var J=document.createElement("div");J.style.backgroundColor="inherit";t.style.position="relative";var da=document.createElement("img");da.className="geAdaptiveAsset";da.setAttribute("src",Editor.crossImage);da.setAttribute("title",mxResources.get("close"));da.setAttribute("valign","absmiddle");da.setAttribute("border","0");da.style.position="relative";da.style.top="2px";da.style.width="14px";da.style.cursor="pointer";da.style.margin="0 3px";var ea=null;if(".scratchpad"!=c.title||this.closableScratchpad)J.appendChild(da),mxEvent.addListener(da,"click",mxUtils.bind(this,function(Y){if(!mxEvent.isConsumed(Y)){var ma=mxUtils.bind(this,function(){null!=z&&mxUtils.remove(z,this.openLibraries);this.closeLibrary(c)});null!=ea?this.confirm(mxResources.get("allChangesLost"),null,ma,mxResources.get("cancel"),mxResources.get("discardChanges")):ma();mxEvent.consume(Y)}}));if(c.isEditable()){var ca=-this.editor.graph,W=null;l=mxUtils.bind(this,function(Y){this.showLibraryDialog(c.getTitle(),K,f,c,c.getMode());mxEvent.consume(Y)});var ba=mxUtils.bind(this,function(Y){c.setModified(!0);c.isAutosave()?(null!=W&&null!=W.parentNode&&W.parentNode.removeChild(W),W=da.cloneNode(!1),W.setAttribute("src",Editor.spinImage),W.setAttribute("title",mxResources.get("saving")),W.style.cursor="default",W.style.marginRight="2px",W.style.marginTop="-2px",J.insertBefore(W,J.firstChild),this.saveLibrary(c.getTitle(),-f,c,c.getMode(),!0,!0,function(){null!=W&&null!=W.parentNode&&W.parentNode.removeChild(W)})):null==ea&&(ea=da.cloneNode(!1),ea.setAttribute("src",Editor.saveImage),ea.setAttribute("title",mxResources.get("save")),J.insertBefore(ea,J.firstChild),mxEvent.addListener(ea,"click",mxUtils.bind(this,function(ma){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==ea||c.isModified()||(ea.parentNode.removeChild(ea),ea=null)});mxEvent.consume(ma)})))}),ha=mxUtils.bind(this,-function(Y,ma,Z,k){Y=ca.cloneCells(mxUtils.sortCells(ca.model.getTopmostCells(Y)));for(var A=0;A<Y.length;A++){var I=ca.getCellGeometry(Y[A]);null!=I&&I.translate(-ma.x,-ma.y)}K.appendChild(this.sidebar.createVertexTemplateFromCells(Y,ma.width,ma.height,k||"",!0,null,!1));Y=mxUtils.getXml(this.editor.graph.encodeCells(Y));Editor.defaultCompressed&&(Y=Graph.compress(Y));ma={xml:Y,w:ma.width,h:ma.height};null!=k&&(ma.title=k);f.push(ma);ba(Z);null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),-F=null)}),la=mxUtils.bind(this,function(Y){if(ca.isSelectionEmpty())ca.getRubberband().isActive()?(ca.getRubberband().execute(Y),ca.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ma=ca.getSelectionCells(),Z=ca.view.getBounds(ma);if(null!=Z&&0<Z.width&&0<Z.height){var k=ca.view.scale;Z.x/=k;Z.y/=k;Z.width/=k;Z.height/=k;Z.x-=ca.view.translate.x;Z.y-=ca.view.translate.y;ha(ma,Z)}else this.showError(mxResources.get("error"),+this.editor.graph,X=null;l=mxUtils.bind(this,function(Y){this.showLibraryDialog(c.getTitle(),K,f,c,c.getMode());mxEvent.consume(Y)});var aa=mxUtils.bind(this,function(Y){c.setModified(!0);c.isAutosave()?(null!=X&&null!=X.parentNode&&X.parentNode.removeChild(X),X=da.cloneNode(!1),X.setAttribute("src",Editor.spinImage),X.setAttribute("title",mxResources.get("saving")),X.style.cursor="default",X.style.marginRight="2px",X.style.marginTop="-2px",J.insertBefore(X,J.firstChild),this.saveLibrary(c.getTitle(),+f,c,c.getMode(),!0,!0,function(){null!=X&&null!=X.parentNode&&X.parentNode.removeChild(X)})):null==ea&&(ea=da.cloneNode(!1),ea.setAttribute("src",Editor.saveImage),ea.setAttribute("title",mxResources.get("save")),J.insertBefore(ea,J.firstChild),mxEvent.addListener(ea,"click",mxUtils.bind(this,function(ma){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==ea||c.isModified()||(ea.parentNode.removeChild(ea),ea=null)});mxEvent.consume(ma)})))}),ia=mxUtils.bind(this,+function(Y,ma,Z,k){Y=ca.cloneCells(mxUtils.sortCells(ca.model.getTopmostCells(Y)));for(var A=0;A<Y.length;A++){var I=ca.getCellGeometry(Y[A]);null!=I&&I.translate(-ma.x,-ma.y)}K.appendChild(this.sidebar.createVertexTemplateFromCells(Y,ma.width,ma.height,k||"",!0,null,!1));Y=mxUtils.getXml(this.editor.graph.encodeCells(Y));Editor.defaultCompressed&&(Y=Graph.compress(Y));ma={xml:Y,w:ma.width,h:ma.height};null!=k&&(ma.title=k);f.push(ma);aa(Z);null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),+F=null)}),la=mxUtils.bind(this,function(Y){if(ca.isSelectionEmpty())ca.getRubberband().isActive()?(ca.getRubberband().execute(Y),ca.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ma=ca.getSelectionCells(),Z=ca.view.getBounds(ma);if(null!=Z&&0<Z.width&&0<Z.height){var k=ca.view.scale;Z.x/=k;Z.y/=k;Z.width/=k;Z.height/=k;Z.x-=ca.view.translate.x;Z.y-=ca.view.translate.y;ia(ma,Z)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(Y)});mxEvent.addGestureListeners(K,function(){},mxUtils.bind(this,function(Y){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler.first&&(ca.graphHandler.suspend(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="hidden"),K.style.backgroundColor="light-dark(#fefefe, #000000)",K.style.cursor="copy",ca.panningManager.stop(),ca.autoScroll=!1,mxEvent.consume(Y))}),mxUtils.bind(this,function(Y){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler&&(K.style.backgroundColor="",K.style.cursor="default",this.sidebar.showTooltips=!0,ca.panningManager.stop(),ca.graphHandler.reset(),ca.isMouseDown=!1,ca.autoScroll=!0,la(Y),mxEvent.consume(Y))}));mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(Y){ca.isMouseDown&&null!=ca.graphHandler.first&&(ca.graphHandler.resume(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="visible"),K.style.backgroundColor="",K.style.cursor="",ca.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Y){K.style.backgroundColor="light-dark(#fefefe, #000000)";Y.dataTransfer.dropEffect="copy";K.style.cursor="copy";this.sidebar.hideTooltip();Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Y){K.style.cursor="";K.style.backgroundColor="";0<Y.dataTransfer.files.length&&this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(ma,-Z,k,A,I,U,O,S,X){if(null!=ma&&"image/"==Z.substring(0,6))ma="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ma),ma=[new mxCell("",new mxGeometry(0,0,I,U),ma)],ma[0].vertex=!0,ha(ma,new mxRectangle(0,0,I,U),Y,mxEvent.isAltDown(Y)?null:O.substring(0,O.lastIndexOf(".")).replace(/_/g," ")),null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null);else{var aa=!1,ja=mxUtils.bind(this,function(pa,sa){null!=pa&&"application/pdf"==-sa&&(sa=Editor.extractGraphModelFromPdf(pa),null!=sa&&0<sa.length&&(pa=sa));if(null!=pa)if(pa=mxUtils.parseXml(pa),"mxlibrary"==pa.documentElement.nodeName)try{var qa=JSON.parse(mxUtils.getTextContent(pa.documentElement));N(qa,K);f=f.concat(qa);ba(Y);this.spinner.stop();aa=!0}catch(Ea){}else if("mxfile"==pa.documentElement.nodeName)try{var wa=pa.documentElement.getElementsByTagName("diagram");for(qa=0;qa<wa.length;qa++){var Ba=this.stringToCells(Editor.getDiagramNodeXml(wa[qa])),za=this.editor.graph.getBoundingBoxFromGeometry(Ba);-null!=za&&ha(Ba,new mxRectangle(0,0,za.width,za.height),Y)}aa=!0}catch(Ea){null!=window.console&&console.log("error in drop handler:",Ea)}aa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null)});null!=X&&null!=O&&EditorUi.isVisioFilename(O)?this.importVisio(X,function(pa){ja(pa,"text/xml")},null,O):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(ma,O)&&null!=X?this.isExternalDataComms()?-this.parseFile(X,mxUtils.bind(this,function(pa){4==pa.readyState&&(this.spinner.stop(),200<=pa.status&&299>=pa.status?ja(pa.responseText,"text/xml"):this.handleError({message:mxResources.get(413==pa.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):ja(ma,Z)}}));Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"dragleave",function(Y){K.style.cursor=+Z,k,A,I,T,O,U,V){if(null!=ma&&"image/"==Z.substring(0,6))ma="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ma),ma=[new mxCell("",new mxGeometry(0,0,I,T),ma)],ma[0].vertex=!0,ia(ma,new mxRectangle(0,0,I,T),Y,mxEvent.isAltDown(Y)?null:O.substring(0,O.lastIndexOf(".")).replace(/_/g," ")),null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null);else{var ba=!1,fa=mxUtils.bind(this,function(pa,sa){null!=pa&&"application/pdf"==+sa&&(sa=Editor.extractGraphModelFromPdf(pa),null!=sa&&0<sa.length&&(pa=sa));if(null!=pa)if(pa=mxUtils.parseXml(pa),"mxlibrary"==pa.documentElement.nodeName)try{var qa=JSON.parse(mxUtils.getTextContent(pa.documentElement));N(qa,K);f=f.concat(qa);aa(Y);this.spinner.stop();ba=!0}catch(Da){}else if("mxfile"==pa.documentElement.nodeName)try{var wa=pa.documentElement.getElementsByTagName("diagram");for(qa=0;qa<wa.length;qa++){var Aa=this.stringToCells(Editor.getDiagramNodeXml(wa[qa])),za=this.editor.graph.getBoundingBoxFromGeometry(Aa);+null!=za&&ia(Aa,new mxRectangle(0,0,za.width,za.height),Y)}ba=!0}catch(Da){null!=window.console&&console.log("error in drop handler:",Da)}ba||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null)});null!=V&&null!=O&&EditorUi.isVisioFilename(O)?this.importVisio(V,function(pa){fa(pa,"text/xml")},null,O):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(ma,O)&&null!=V?this.isExternalDataComms()?+this.parseFile(V,mxUtils.bind(this,function(pa){4==pa.readyState&&(this.spinner.stop(),200<=pa.status&&299>=pa.status?fa(pa.responseText,"text/xml"):this.handleError({message:mxResources.get(413==pa.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):fa(ma,Z)}}));Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"dragleave",function(Y){K.style.cursor="";K.style.backgroundColor="";Y.stopPropagation();Y.preventDefault()}));da=da.cloneNode(!1);da.setAttribute("src",Editor.editImage);da.setAttribute("title",mxResources.get("edit"));J.insertBefore(da,J.firstChild);mxEvent.addListener(da,"click",l);l=da.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));J.insertBefore(l,J.firstChild);mxEvent.addListener(l,"click",la);".scratchpad"==c.title&&(this.addSelectionToScratchpad=la);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(l=this.createHelpIcon(EditorUi.scratchpadHelpLink),C=l.getElementsByTagName("img")[0],l.style.marginRight="1px",C.style.marginTop="-2px",C.style.opacity="",J.insertBefore(l,J.firstChild))}t.appendChild(J);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var l=0;l<c.length;l++)try{var t=c[l],z=t.data;if(null!=z){z="data:"==z.substring(0,5)?this.convertDataUri(z):z;var C="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==t.aspect&&(C+="aspect=fixed;");C=C+"image="+z+";";null!=t.style&&(C+=t.style);f.appendChild(this.sidebar.createVertexTemplate(C,t.w,t.h,"",t.title||"",!1,null,!0))}else if(null!=t.xml){var F=this.stringToCells("<"==t.xml.charAt(0)?t.xml:Graph.decompress(t.xml)),N=0==F.length?mxResources.get("drawingEmpty"):null!=t.title?t.title:"";f.appendChild(this.sidebar.createVertexTemplateFromCells(F,t.w,t.h,N,!0,null,!0))}}catch(K){N=null!=K.message?mxResources.get("error")+": "+K.message:String(K),@@ -3594,25 +3594,25 @@ f,l,t,z){c=new LibraryDialog(this,c,f,l,t,z);this.showDialog(c.container,640,440t,z,C,F){var N=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},K=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{F||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!F||null==window.console||console.error("EditorUi.handleError:",c)}catch(ca){}if(null!=K||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var J=mxResources.get("ok"),da=null;f=null!=f?f:mxResources.get("error");if(null!=K){null!=K.retry&&(J=mxResources.get("cancel"),da=function(){N();K.retry()});if(404==K.code||404==K.status||403==K.code){F=403==K.code?null!=K.message?mxUtils.htmlEntities(K.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=z?z:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var ea=null!=z?null:null!=C?C:window.location.hash;if(null!=ea&&("#G"==ea.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ea.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==K.code||404==K.status)){ea="#U"==ea.substring(0,2)?ea.substring(45,ea.lastIndexOf("%26ex")):ea.substring(2);this.showError(f,F,mxResources.get("tryOpeningViaThisPage"),-mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ea);null!=t&&t()}),da,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){la.innerText="";for(var Y=0;Y<W.length;Y++){var ma=document.createElement("option");mxUtils.write(ma,W[Y].displayName);ma.value=Y;la.appendChild(ma);ma=document.createElement("option");ma.innerHTML=" ";mxUtils.write(ma,"<"+W[Y].email+">");ma.setAttribute("disabled","disabled");la.appendChild(ma)}ma=-document.createElement("option");mxUtils.write(ma,mxResources.get("addAccount"));ma.value=W.length;la.appendChild(ma)}var W=this.drive.getUsersList(),ba=document.createElement("div"),ha=document.createElement("div");ha.style.marginBottom="6px";mxUtils.write(ha,mxResources.get("changeUser")+": ");ba.appendChild(ha);var la=document.createElement("select");la.style.width="100%";ca();mxEvent.addListener(la,"change",mxUtils.bind(this,function(){var Y=la.value,ma=W.length!=Y;ma&&this.drive.setUser(W[Y]);-this.drive.authorize(ma,mxUtils.bind(this,function(){ma||(W=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));ba.appendChild(la);ba=new CustomDialog(this,ba,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ba.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=K.message?F=""==K.message&&null!=K.name?mxUtils.htmlEntities(K.name,+mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ea);null!=t&&t()}),da,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){la.innerText="";for(var Y=0;Y<X.length;Y++){var ma=document.createElement("option");mxUtils.write(ma,X[Y].displayName);ma.value=Y;la.appendChild(ma);ma=document.createElement("option");ma.innerHTML=" ";mxUtils.write(ma,"<"+X[Y].email+">");ma.setAttribute("disabled","disabled");la.appendChild(ma)}ma=+document.createElement("option");mxUtils.write(ma,mxResources.get("addAccount"));ma.value=X.length;la.appendChild(ma)}var X=this.drive.getUsersList(),aa=document.createElement("div"),ia=document.createElement("div");ia.style.marginBottom="6px";mxUtils.write(ia,mxResources.get("changeUser")+": ");aa.appendChild(ia);var la=document.createElement("select");la.style.width="100%";ca();mxEvent.addListener(la,"change",mxUtils.bind(this,function(){var Y=la.value,ma=X.length!=Y;ma&&this.drive.setUser(X[Y]);+this.drive.authorize(ma,mxUtils.bind(this,function(){ma||(X=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));aa.appendChild(la);aa=new CustomDialog(this,aa,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(aa.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=K.message?F=""==K.message&&null!=K.name?mxUtils.htmlEntities(K.name,!1):mxUtils.htmlEntities(K.message,!1):null!=K.response&&null!=K.response.error?F=mxUtils.htmlEntities(K.response.error,!1):"undefined"!==typeof window.App&&(K.code==App.ERROR_TIMEOUT?F=mxUtils.htmlEntities(mxResources.get("timeout"),!1):K.code==App.ERROR_BUSY?F=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof K&&0<K.length&&(F=mxUtils.htmlEntities(K,!1)))}z=c=null;null!=K&&null!=K.helpLink?(c=mxResources.get("help"),z=mxUtils.bind(this,function(){return this.editor.graph.openLink(K.helpLink)})):null!=K&&null!=K.ownerEmail?(c=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+c+": "+K.ownerEmail+")",!1),z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(K.ownerEmail))})):null!=K&&null!=K.alternateAction&&(c=K.alternateAction.label,z=K.alternateAction.funct);this.showError(f,F,J,l,da,null,null,c,z,null,null,null,t?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(c,f,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,l||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,l,t,z,C){c=null!=c?c:"";var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},N=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){F();null!=f&&f()},function(){F();null!=l&&l()},t,z,null,null,null,null,N);this.showDialog(c.container,340,46+N,!0,C);c.init()};EditorUi.prototype.showBanner=function(c,f,l,t,z,C,F,N,K){var J=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){C=null!=C?C:"bottom:10px;left:50%;";F=null!=F?F:"translate(-50%,120%)";N=null!=N?N:"translate(-50%,0%)";var da=z?500:1E3;J=z?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var ea=document.createElement("div");ea.style.cssText="position:absolute;"+C+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";"+J;mxUtils.setPrefixedStyle(ea.style,"transform",F);mxUtils.setPrefixedStyle(ea.style,"transition","all "+da+"ms ease");ea.className="geBtn gePrimaryBtn"+(z?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(ea.style,"box-shadow","1px 1px 2px 0px #ddd");null!=K&&mxUtils.setPrefixedStyle(ea.style,"transform-origin",K);if(!z){var ca=document.createElement("img");ca.setAttribute("src",IMAGE_PATH+"/logo.png");ca.setAttribute("border","0");ca.setAttribute("align","absmiddle");ca.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";ea.appendChild(ca);ca=document.createElement("img");ca.setAttribute("src",Dialog.prototype.closeImage);ca.setAttribute("title",mxResources.get(t?"doNotShowAgain":"close"));ca.setAttribute("border","0");ca.style.cssText=(z?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";ea.appendChild(ca)}mxUtils.write(ea,f);document.body.appendChild(ea);this.bannerShowing=-!0;f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var W=document.createElement("input");W.setAttribute("type","checkbox");W.setAttribute("id","geDoNotShowAgainCheckbox");W.style.marginRight="6px";if(!t){f.appendChild(W);var ba=document.createElement("label");ba.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ba,mxResources.get("doNotShowAgain"));f.appendChild(ba);-ea.style.paddingBottom=z?"16px":"30px";ea.appendChild(f)}var ha=mxUtils.bind(this,function(){null!=ea.parentNode&&(ea.parentNode.removeChild(ea),this.bannerShowing=!1,W.checked||t)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=ca&&mxEvent.addListener(ca,"click",mxUtils.bind(this,function(Y){mxEvent.consume(Y);ha()}));var la=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(ea.style,"transform",F);window.setTimeout(mxUtils.bind(this,-function(){ha()}),da)});mxEvent.addListener(ea,"click",mxUtils.bind(this,function(Y){var ma=mxEvent.getSource(Y);ma!=W&&ma!=ba?(null!=l&&l(),ha(),mxEvent.consume(Y)):la()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(ea.style,"transform",N)}),da/2);window.setTimeout(la,z?4E3:3E4);J=!0}return J};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=+!0;f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var X=document.createElement("input");X.setAttribute("type","checkbox");X.setAttribute("id","geDoNotShowAgainCheckbox");X.style.marginRight="6px";if(!t){f.appendChild(X);var aa=document.createElement("label");aa.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(aa,mxResources.get("doNotShowAgain"));f.appendChild(aa);+ea.style.paddingBottom=z?"16px":"30px";ea.appendChild(f)}var ia=mxUtils.bind(this,function(){null!=ea.parentNode&&(ea.parentNode.removeChild(ea),this.bannerShowing=!1,X.checked||t)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=ca&&mxEvent.addListener(ca,"click",mxUtils.bind(this,function(Y){mxEvent.consume(Y);ia()}));var la=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(ea.style,"transform",F);window.setTimeout(mxUtils.bind(this,+function(){ia()}),da)});mxEvent.addListener(ea,"click",mxUtils.bind(this,function(Y){var ma=mxEvent.getSource(Y);ma!=X&&ma!=aa?(null!=l&&l(),ia(),mxEvent.consume(Y)):la()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(ea.style,"transform",N)}),da/2);window.setTimeout(la,z?4E3:3E4);J=!0}return J};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,f,l,t){c=c.toDataURL("image/"+l);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<t&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",t));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,f,l,t,z){var C="jpeg"==l?"jpg":l;t=this.getBaseFilename(t)+(null!=f?".drawio":"")+"."+C;c=this.createImageDataUri(c,f,l,z);this.saveData(t,C,c.substring(c.lastIndexOf(",")+1),"image/"+l,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,f){c=new TextareaDialog(this,c,f,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,f,l,t,z,C){"text/xml"!=l||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=C?C:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=t?this.base64ToBlob(c,l):new Blob([c],{type:l}),navigator.msSaveOrOpenBlob(c,f);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==l?mxUtils.popup(c,!0):(l.document.write(c),l.document.close(),l.document.execCommand("SaveAs",!0,f),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(f+":",c):this.openInNewWindow(c,l,t);else{var F=document.createElement("a");C=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var N=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);C=65==(N?parseInt(N[2],10):!1)?!1:C}if(C||this.isOffline()){F.href=URL.createObjectURL(t?this.base64ToBlob(c,l):new Blob([c],{type:l}));C?F.download=f:F.setAttribute("target","_blank");document.body.appendChild(F);try{window.setTimeout(function(){URL.revokeObjectURL(F.href)},2E4),F.click(),F.parentNode.removeChild(F)}catch(K){}}else this.createEchoRequest(c,f,l,t,z).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,l,t,z,C){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=-l?"&mime="+l:"")+(null!=z?"&format="+z:"")+(null!=C?"&base64="+C:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(t?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,l,t,z,C,F,N){C=null!=C?C:!1;F=null!=F?F:"vsdx"!=z&&(!mxClient.IS_IOS||!navigator.standalone);var K=mxUtils.bind(this,function(da,ea,ca,W){try{if("_blank"==ea)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,t);else if(null!=l&&"text/html"==l.substring(0,9)){var ba=new EmbedDialog(this,c);this.showDialog(ba.container,-450,240,!0,!0);ba.init()}else{var ha=window.open("about:blank");null==ha?mxUtils.popup(c,!0):(ha.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),ha.document.close())}else if(ea==App.MODE_DEVICE||"download"==ea)this.doSaveLocalFile(c,da,l,t,null,N);else if(null!=da&&0<da.length){var la=mxUtils.bind(this,function(Y){try{this.exportFile(c,da,l,t,ea,Y)}catch(ma){this.handleError(ma)}});null!=W?la(W):this.pickFolder(ea,la)}}catch(Y){this.handleError(Y)}});z=[];C||z.push(App.MODE_BROWSER);F||+l?"&mime="+l:"")+(null!=z?"&format="+z:"")+(null!=C?"&base64="+C:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(t?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,l,t,z,C,F,N){C=null!=C?C:!1;F=null!=F?F:"vsdx"!=z&&(!mxClient.IS_IOS||!navigator.standalone);var K=mxUtils.bind(this,function(da,ea,ca,X){try{if("_blank"==ea)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,t);else if(null!=l&&"text/html"==l.substring(0,9)){var aa=new EmbedDialog(this,c);this.showDialog(aa.container,+450,240,!0,!0);aa.init()}else{var ia=window.open("about:blank");null==ia?mxUtils.popup(c,!0):(ia.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),ia.document.close())}else if(ea==App.MODE_DEVICE||"download"==ea)this.doSaveLocalFile(c,da,l,t,null,N);else if(null!=da&&0<da.length){var la=mxUtils.bind(this,function(Y){try{this.exportFile(c,da,l,t,ea,Y)}catch(ma){this.handleError(ma)}});null!=X?la(X):this.pickFolder(ea,la)}}catch(Y){this.handleError(Y)}});z=[];C||z.push(App.MODE_BROWSER);F||z.push("_blank");var J=new SaveDialog(this,f,mxUtils.bind(this,function(da,ea,ca){K(da.value,ea,da,ca);this.hideDialog(null,null,J.container)}),z,c,l,t);this.showDialog(J.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));J.init()};EditorUi.prototype.openInNewWindow=function(c,f,l){var t=window.open("about:blank");if(null==t||null==t.document)mxUtils.popup(c,!0);else{var z="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var C=mxUtils.parseXml(c).documentElement.style.backgroundColor;""!=C&&(z="background: "+C+";")}z='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+z+'">';"image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||l?(C=l?c:btoa(unescape(encodeURIComponent(c))),t.document.write(z+'<img style="max-width:100%;" src="data:'+f+";base64,"+C+'"/></body></html>')):t.document.write(z+c+"</body></html>"):t.document.write(z+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");t.document.close()}};var m=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=c(mxUtils.bind(this,function(t){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),@@ -3627,18 +3627,18 @@ null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});F.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",z);this.editor.exportToCanvas(mxUtils.bind(this,function(N){F.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var K=this.createImageDataUri(N,null,"png");N=document.createElement("img");N.style.maxWidth="140px";N.style.maxHeight="140px";N.style.cursor="pointer";N.style.backgroundColor="white";N.setAttribute("title",mxResources.get("openInNewWindow"));N.setAttribute("border","0");N.setAttribute("src",K);this.exportDialog.appendChild(N);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.openInNewWindow(K.substring(K.indexOf(",")+1),"image/png",!0);z.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(N){F.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(N)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(t)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,f,l,t,z){this.isLocalFileSave()?this.saveLocalFile(l,c,t,z,f):this.saveRequest(c,f,mxUtils.bind(this,function(C,F){return this.createEchoRequest(l,C,t,z,f,F)}),l,z,t)};EditorUi.prototype.saveRequest=function(c,f,l,t,z,C,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;var N=mxUtils.bind(this,-function(J,da,ea,ca){if("_blank"==da||null!=J&&0<J.length){var W=l("_blank"==da?null:J,da==App.MODE_DEVICE||"download"==da||null==da||"_blank"==da?"0":"1");null!=W&&(da==App.MODE_DEVICE||"download"==da||"_blank"==da?W.simulate(document,"_blank"):(ea=mxUtils.bind(this,function(ba){C=null!=C?C:"pdf"==f?"application/pdf":"image/"+f;if(null!=t)try{this.exportFile(t,J,C,!0,da,ba)}catch(ha){this.handleError(ha)}else this.spinner.spin(document.body,mxResources.get("saving"))&&W.send(mxUtils.bind(this,function(){this.spinner.stop();-if(200<=W.getStatus()&&299>=W.getStatus())try{this.exportFile(W.getText(),J,C,!0,da,ba)}catch(ha){this.handleError(ha)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(ha){this.spinner.stop();this.handleError(ha)}))}),null!=ca?ea(ca):this.pickFolder(da,ea)))}});z=[App.MODE_BROWSER];F||z.push("_blank");var K=new SaveDialog(this,c,mxUtils.bind(this,function(J,da,ea){N(J.value,da,J,ea);this.hideDialog(null,null,K.container)}),z,null,"application/pdf");+function(J,da,ea,ca){if("_blank"==da||null!=J&&0<J.length){var X=l("_blank"==da?null:J,da==App.MODE_DEVICE||"download"==da||null==da||"_blank"==da?"0":"1");null!=X&&(da==App.MODE_DEVICE||"download"==da||"_blank"==da?X.simulate(document,"_blank"):(ea=mxUtils.bind(this,function(aa){C=null!=C?C:"pdf"==f?"application/pdf":"image/"+f;if(null!=t)try{this.exportFile(t,J,C,!0,da,aa)}catch(ia){this.handleError(ia)}else this.spinner.spin(document.body,mxResources.get("saving"))&&X.send(mxUtils.bind(this,function(){this.spinner.stop();+if(200<=X.getStatus()&&299>=X.getStatus())try{this.exportFile(X.getText(),J,C,!0,da,aa)}catch(ia){this.handleError(ia)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(ia){this.spinner.stop();this.handleError(ia)}))}),null!=ca?ea(ca):this.pickFolder(da,ea)))}});z=[App.MODE_BROWSER];F||z.push("_blank");var K=new SaveDialog(this,c,mxUtils.bind(this,function(J,da,ea){N(J.value,da,J,ea);this.hideDialog(null,null,K.container)}),z,null,"application/pdf");this.showDialog(K.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));K.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,f,l,t,z,C){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,f,l){f(null)};EditorUi.prototype.exportSvg=-function(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(S){Editor.addRetryToError(S,mxUtils.bind(this,function(){this.exportSvg(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W)}));this.handleError(S)})))try{var ba=this.editor.graph.isSelectionEmpty();l=null!=l?l:ba;var ha=f?null:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);null==ha&&0==f&&(ha=this.editor.graph.shapeBackgroundColor);var la=this.editor.graph.addForeignObjectWarning;-Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var Y=mxUtils.lightDarkColorSupported,ma=mxUtils.preferDarkColor;if("light"==da||"dark"==da)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==da;var Z=this.editor.graph.createSvgImageExport(z),k=this.editor.graph.getSvg(ha,c,F,N,null,l,null,Z,"blank"==J?"_blank":"self"==J?"_top":null,null,!ca,da,ea);mxUtils.lightDarkColorSupported=Y;mxUtils.preferDarkColor=ma;this.editor.graph.addForeignObjectWarning=-la;t&&this.editor.graph.addSvgShadow(k);var A=this.getBaseFilename()+(z?".drawio":"")+".svg";W=null!=W?W:mxUtils.bind(this,function(S){this.isLocalFileSave()||S.length<=MAX_REQUEST_SIZE?this.saveData(A,"svg",S,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(S)}))});var I=mxUtils.bind(this,function(S){this.spinner.stop();z&&S.setAttribute("content",this.getFileData(!0,null,null,null,l,K,null,null,null,-null,null,c,F));W(Graph.xmlDeclaration+"\n"+(z?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(S))});this.editor.graph.mathEnabled&&this.editor.addMathCss(k);var U=mxUtils.bind(this,function(S){Editor.replaceSvgDataUris&&C&&EditorUi.embedSvgImages(S);Editor.foreignObjectImages&&ca?this.replaceAlternateContent(S,da,I):I(S)}),O=mxUtils.bind(this,function(S){C&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(S,-U,this.thumbImageCache)):U(S)});ca?this.embedFonts(k,O):(this.editor.addFontCss(k),O(k))}catch(S){this.handleError(S)}};EditorUi.prototype.replaceAlternateContent=function(c,f,l){function t(ea,ca,W,ba,ha){var la=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");la.setAttribute("x",ca);la.setAttribute("y",W+.5);la.setAttribute("width",ba.width);la.setAttribute("height",ba.height);null==la.setAttributeNS?la.setAttribute("xlink:href",ha):la.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",-ha);ea.replaceChild(la,ea.lastChild);N()}function z(){if(F<da.length)da[F++](z)}var C="";f=c.getElementsByTagName("style");for(var F=0;F<f.length;F++)C+=f[F].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var N=mxUtils.bind(this,function(){counter--;0==counter&&l(c)}),K={},J={},da=[];for(F=0;F<f.length;F++)mxUtils.bind(this,function(ea){var ca=ea.getElementsByTagName("div");if(0<ca.length)try{var W=ca[0].cloneNode(!0),ba=parseInt(W.style.marginLeft),ha=parseInt(W.style.paddingTop),-la=W.getElementsByTagName("div")[1],Y=ca=!1,ma=W.style.alignItems,Z=W.style.justifyContent;if(null!=W.style.writingMode){var k=W.style.writingMode;Y="vertical-"==k.substring(0,9);ca="-rl"==k.substring(k.length-3)}var A=!Y&&"1px"==W.style.width||Y&&"1px"==W.style.height;if(!Y&&"1px"==W.style.height||Y&&"1px"==W.style.width)W.style.alignItems=Y&&ca?"unsafe flex-end":"unsafe flex-start";A&&(W.style.justifyContent="unsafe flex-start");W.style.paddingTop="";W.style.marginLeft="";var I=W.outerHTML,U=K[I];-null==U&&(W.style.position="absolute",W.style.visibility="hidden",document.body.appendChild(W),k=1,k="1px"==W.style.width?la.offsetWidth:parseInt(W.style.width),A=1,A="1px"==W.style.height?la.offsetHeight:parseInt(W.style.height),document.body.removeChild(W),U=new mxRectangle(ba,ha,k,A),K[I]=U);"1px"==W.style.height&&("unsafe center"==ma?ha-=U.height/2:"unsafe flex-end"==ma&&(ha-=U.height));if("1px"==W.style.width)if(!Y&&"unsafe center"==Z||Y&&"unsafe center"==ma)ba-=U.width/2;else if(!Y&&"unsafe flex-end"==-Z||Y&&(!ca&&"unsafe flex-end"==ma||ca&&"unsafe flex-start"==ma))ba-=U.width;U=new mxRectangle(ba,ha,U.width,U.height+parseInt(la.style.fontSize)/4);da.push(mxUtils.bind(this,function(O){var S=J[I];null==S?Graph.htmlToPng(I,U.width,U.height,mxUtils.bind(this,function(X){t(ea,ba,ha,U,X);J[I]=X;O()}),C):(t(ea,ba,ha,U,S),O())}))}catch(O){N()}else N()})(f[F]);0==counter&&l(c);F=0;z()};EditorUi.prototype.addRadiobox=function(c,f,l,t,z,C,F){return this.addCheckbox(c,l,t,z,C,F,!0,f)};EditorUi.prototype.addCheckbox=+function(c,f,l,t,z,C,F,N,K,J,da,ea,ca,X){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(U){Editor.addRetryToError(U,mxUtils.bind(this,function(){this.exportSvg(c,f,l,t,z,C,F,N,K,J,da,ea,ca,X)}));this.handleError(U)})))try{var aa=this.editor.graph.isSelectionEmpty();l=null!=l?l:aa;var ia=f?null:this.editor.graph.background;ia==mxConstants.NONE&&(ia=null);null==ia&&0==f&&(ia=this.editor.graph.shapeBackgroundColor);var la=this.editor.graph.addForeignObjectWarning;+Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var Y=mxUtils.lightDarkColorSupported,ma=mxUtils.preferDarkColor;if("light"==da||"dark"==da)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==da;var Z=this.editor.graph.createSvgImageExport(z),k=this.editor.graph.getSvg(ia,c,F,N,null,l,null,Z,"blank"==J?"_blank":"self"==J?"_top":null,null,!ca,da,ea);mxUtils.lightDarkColorSupported=Y;mxUtils.preferDarkColor=ma;this.editor.graph.addForeignObjectWarning=+la;t&&this.editor.graph.addSvgShadow(k);var A=this.getBaseFilename()+(z?".drawio":"")+".svg";X=null!=X?X:mxUtils.bind(this,function(U){this.isLocalFileSave()||U.length<=MAX_REQUEST_SIZE?this.saveData(A,"svg",U,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});var I=mxUtils.bind(this,function(U){this.spinner.stop();z&&U.setAttribute("content",this.getFileData(!0,null,null,null,l,K,null,null,null,+null,null,c,F));X(Graph.xmlDeclaration+"\n"+(z?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(U))});this.editor.graph.mathEnabled&&this.editor.addMathCss(k);var T=mxUtils.bind(this,function(U){Editor.replaceSvgDataUris&&C&&EditorUi.embedSvgImages(U);Editor.foreignObjectImages&&ca?this.replaceAlternateContent(U,da,I):I(U)}),O=mxUtils.bind(this,function(U){C&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(U,+T,this.thumbImageCache)):T(U)});ca?this.embedFonts(k,O):(this.editor.addFontCss(k),O(k))}catch(U){this.handleError(U)}};EditorUi.prototype.replaceAlternateContent=function(c,f,l){function t(ea,ca,X,aa,ia){var la=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");la.setAttribute("x",ca);la.setAttribute("y",X+.5);la.setAttribute("width",aa.width);la.setAttribute("height",aa.height);null==la.setAttributeNS?la.setAttribute("xlink:href",ia):la.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",+ia);ea.replaceChild(la,ea.lastChild);N()}function z(){if(F<da.length)da[F++](z)}var C="";f=c.getElementsByTagName("style");for(var F=0;F<f.length;F++)C+=f[F].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var N=mxUtils.bind(this,function(){counter--;0==counter&&l(c)}),K={},J={},da=[];for(F=0;F<f.length;F++)mxUtils.bind(this,function(ea){var ca=ea.getElementsByTagName("div");if(0<ca.length)try{var X=ca[0].cloneNode(!0),aa=parseInt(X.style.marginLeft),ia=parseInt(X.style.paddingTop),+la=X.getElementsByTagName("div")[1],Y=ca=!1,ma=X.style.alignItems,Z=X.style.justifyContent;if(null!=X.style.writingMode){var k=X.style.writingMode;Y="vertical-"==k.substring(0,9);ca="-rl"==k.substring(k.length-3)}var A=!Y&&"1px"==X.style.width||Y&&"1px"==X.style.height;if(!Y&&"1px"==X.style.height||Y&&"1px"==X.style.width)X.style.alignItems=Y&&ca?"unsafe flex-end":"unsafe flex-start";A&&(X.style.justifyContent="unsafe flex-start");X.style.paddingTop="";X.style.marginLeft="";var I=X.outerHTML,T=K[I];+null==T&&(X.style.position="absolute",X.style.visibility="hidden",document.body.appendChild(X),k=1,k="1px"==X.style.width?la.offsetWidth:parseInt(X.style.width),A=1,A="1px"==X.style.height?la.offsetHeight:parseInt(X.style.height),document.body.removeChild(X),T=new mxRectangle(aa,ia,k,A),K[I]=T);"1px"==X.style.height&&("unsafe center"==ma?ia-=T.height/2:"unsafe flex-end"==ma&&(ia-=T.height));if("1px"==X.style.width)if(!Y&&"unsafe center"==Z||Y&&"unsafe center"==ma)aa-=T.width/2;else if(!Y&&"unsafe flex-end"==+Z||Y&&(!ca&&"unsafe flex-end"==ma||ca&&"unsafe flex-start"==ma))aa-=T.width;T=new mxRectangle(aa,ia,T.width,T.height+parseInt(la.style.fontSize)/4);da.push(mxUtils.bind(this,function(O){var U=J[I];null==U?Graph.htmlToPng(I,T.width,T.height,mxUtils.bind(this,function(V){t(ea,aa,ia,T,V);J[I]=V;O()}),C):(t(ea,aa,ia,T,U),O())}))}catch(O){N()}else N()})(f[F]);0==counter&&l(c);F=0;z()};EditorUi.prototype.addRadiobox=function(c,f,l,t,z,C,F){return this.addCheckbox(c,l,t,z,C,F,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;var K=document.createElement("input");K.style.marginRight="8px";K.style.marginTop="16px";K.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();K.id=F;null!=N&&K.setAttribute("name",N);l&&(K.setAttribute("checked","checked"),K.defaultChecked=!0);t&&K.setAttribute("disabled","disabled");C&&(c.appendChild(K),l=document.createElement("label"),mxUtils.write(l,f),l.setAttribute("for",F),c.appendChild(l),z||mxUtils.br(c));return K};EditorUi.prototype.addEditButton=function(c,f){var l=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);l.style.marginLeft="24px";var t=this.getCurrentFile(),z="";null!=t&&t.getMode()!=App.MODE_DEVICE&&t.getMode()!=App.MODE_BROWSER&&(z=window.location.href);var C=document.createElement("select");C.style.maxWidth="200px";C.style.width="auto";C.style.marginLeft="8px";C.style.marginRight="10px";C.className="geBtn";t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("makeCopy"));C.appendChild(t);var F=document.createElement("option");F.setAttribute("value","custom");mxUtils.write(F,mxResources.get("custom")+"...");C.appendChild(F);c.appendChild(C);mxEvent.addListener(C,"change",mxUtils.bind(this,function(){if("custom"==C.value){var N=new FilenameDialog(this,z,mxResources.get("ok"),function(K){null!=K?(z=K,F.setAttribute("title",K)):(C.value="blank",F.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){C.value="blank"});this.showDialog(N.container,@@ -3647,47 +3647,47 @@ C.appendChild(t);var F=document.createElement("option");F.setAttribute("value","z.setAttribute("value","auto");mxUtils.write(z,mxResources.get("automatic"));t.appendChild(z);z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));t.appendChild(z);z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));t.appendChild(z);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),t.appendChild(f));c.appendChild(t);mxUtils.write(c,mxResources.get("borderColor")+":");var C="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(N){this.pickColor(C||"none",function(K){C=K;l()});mxEvent.consume(N)}));l();F.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";F.style.marginLeft="4px";F.style.height="22px";F.style.width="22px";F.style.position="relative";F.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";c.appendChild(F);mxUtils.br(c);return{getColor:function(){return C},getTarget:function(){return t.value},focus:function(){t.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,l,t,z,C){C=null!=C?C:[];l&&(C.push("lightbox=1"),"auto"!=c&&C.push("target="+c),null!=f&&f!=mxConstants.NONE&&C.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=t&&0<t.length&&C.push("edit="+encodeURIComponent(t)),z&&C.push("layers=1"),this.editor.graph.foldingEnabled&&C.push("nav=1"));return C};EditorUi.prototype.createLink=-function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){var W=this.getCurrentFile();K=this.createUrlParameters(c,f,t,z,C,K);c=!0;null!=F?l="#U"+encodeURIComponent(F):N||null==W||""==W.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+W.getHash(),c=!1);c&&null!=W&&null!=W.getTitle()&&W.getTitle()!=this.defaultFilename&&K.push("title="+encodeURIComponent(W.getTitle()));J&&1<l.length&&(K.push("open="+l.substring(1)),-l="");da&&null!=this.currentPage&&K.push("page-id="+this.currentPage.getId());ea&&K.push("transparent=1");null!=ca&&K.push("dark="+ca);return(t&&(null!=F||null!=W&&W.getMode()!=App.MODE_GITHUB&&W.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<K.length?"?"+K.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){this.getBasenames();-var W={};""!=z&&z!=mxConstants.NONE&&(W.highlight=z);"auto"!==t&&(W.target=t);J||(W.lightbox=!1);W.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(W.zoom=l/100);l=[];F&&(l.push("pages"),W.resize=!0,null!=this.pages&&null!=this.currentPage&&(W.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),W.resize=!0);N&&l.push("layers");K&&l.push("tags");null!=ca&&(W["dark-mode"]=ca);0<l.length&&(J&&l.push("lightbox"),W.toolbar=l.join(" "));null!=da&&0<da.length&&(W.edit=-da);null!=c?W.url=c:W.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(C?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(W))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ea(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":+function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){var X=this.getCurrentFile();K=this.createUrlParameters(c,f,t,z,C,K);c=!0;null!=F?l="#U"+encodeURIComponent(F):N||null==X||""==X.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+X.getHash(),c=!1);c&&null!=X&&null!=X.getTitle()&&X.getTitle()!=this.defaultFilename&&K.push("title="+encodeURIComponent(X.getTitle()));J&&1<l.length&&(K.push("open="+l.substring(1)),+l="");da&&null!=this.currentPage&&K.push("page-id="+this.currentPage.getId());ea&&K.push("transparent=1");null!=ca&&K.push("dark="+ca);return(t&&(null!=F||null!=X&&X.getMode()!=App.MODE_GITHUB&&X.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<K.length?"?"+K.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){this.getBasenames();+var X={};""!=z&&z!=mxConstants.NONE&&(X.highlight=z);"auto"!==t&&(X.target=t);J||(X.lightbox=!1);X.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(X.zoom=l/100);l=[];F&&(l.push("pages"),X.resize=!0,null!=this.pages&&null!=this.currentPage&&(X.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),X.resize=!0);N&&l.push("layers");K&&l.push("tags");null!=ca&&(X["dark-mode"]=ca);0<l.length&&(J&&l.push("lightbox"),X.toolbar=l.join(" "));null!=da&&0<da.length&&(X.edit=+da);null!=c?X.url=c:X.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(C?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(X))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ea(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,f,l,t){var z=document.createElement("div");z.style.whiteSpace="nowrap";var C=document.createElement("h3");mxUtils.write(C,mxResources.get("html"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(C);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var N=document.createElement("input");N.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";N.setAttribute("value","url");N.setAttribute("type","radio");N.setAttribute("name","type-embedhtmldialog");C=N.cloneNode(!0);C.setAttribute("value","copy");F.appendChild(C);var K=document.createElement("span");mxUtils.write(K,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(K);mxUtils.br(F);F.appendChild(N);K=document.createElement("span");mxUtils.write(K,mxResources.get("publicDiagramUrl"));F.appendChild(K);var J=this.getCurrentFile();null==l&&null!=J&&J.constructor==window.DriveFile&&(K=document.createElement("a"),K.style.paddingLeft="12px",K.style.color="gray",K.style.cursor="pointer",mxUtils.write(K,mxResources.get("share")),F.appendChild(K),mxEvent.addListener(K,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(J.getId(),J)})));C.setAttribute("checked","checked");null==l&&N.setAttribute("disabled","disabled");z.appendChild(F);F=380;var da=this.addLinkSection(z),ea=document.createElement("select");ea.style.maxWidth="260px";ea.style.marginLeft="8px";ea.style.marginTop="16px";K=document.createElement("option");K.setAttribute("value","light");mxUtils.write(K,mxResources.get("light"));ea.appendChild(K);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));ea.appendChild(K);K=document.createElement("option");K.setAttribute("value","auto");mxUtils.write(K,mxResources.get("automatic"));K.setAttribute("selected",-"selected");ea.appendChild(K);K.setAttribute("selected","selected");mxUtils.write(z,mxResources.get("appearance")+":");z.appendChild(ea);mxUtils.br(z);F+=26;var ca=this.addCheckbox(z,mxResources.get("zoom"),!0,null,!0);mxUtils.write(z,":");var W=document.createElement("input");W.setAttribute("type","text");W.style.marginRight="16px";W.style.width="60px";W.style.marginLeft="4px";W.style.marginRight="12px";W.value="100%";z.appendChild(W);var ba=this.addCheckbox(z,mxResources.get("fit"),!0);K=null!=-this.pages&&1<this.pages.length;var ha=ha=this.addCheckbox(z,mxResources.get("allPages"),K,!K),la=this.addCheckbox(z,mxResources.get("layers"),!0),Y=this.addCheckbox(z,mxResources.get("tags"),!0),ma=this.addCheckbox(z,mxResources.get("lightbox"),!0),Z=null;if(EditorUi.enableHtmlEditOption){Z=this.addEditButton(z,ma);var k=Z.getEditInput();k.style.marginBottom="16px";F+=50;mxEvent.addListener(ma,"change",function(){ma.checked?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled");k.checked&&-ma.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,z,mxUtils.bind(this,function(){t(N.checked?l:null,ca.checked,W.value,da.getTarget(),da.getColor(),ba.checked,ha.checked,la.checked,Y.checked,ma.checked,null!=Z?Z.getLink():null,null!=ea?ea.value:null)}),null,c,f);this.showDialog(c.container,340,F,!0,!0);C.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,l,t,z,C,F,N,K,J,da){var ea=document.createElement("div");-ea.style.whiteSpace="nowrap";var ca=document.createElement("h3");mxUtils.write(ca,c||mxResources.get("publish"));ca.style.width="100%";ca.style.textAlign="center";ca.style.marginTop="2px";ca.style.marginBottom="20px";ea.appendChild(ca);var W=document.createElement("select");c=30;W.className="geBtn";W.style.marginBottom="8px";W.style.marginLeft="0px";W.style.width="100%";W.style.boxSizing="border-box";if(null==N||""==N.getHash())z=null!=z?z:"https://www.drawio.com/doc/faq/publish-diagram-as-link",-ca=document.createElement("option"),mxUtils.write(ca,mxResources.get("makeCopy")),ca.setAttribute("value","copy"),W.appendChild(ca);ca=document.createElement("option");mxUtils.write(ca,mxResources.get("authorizationRequired"));ca.setAttribute("value","auth");W.appendChild(ca);null!=N&&""!=N.getHash()||ca.setAttribute("disabled","disabled");N=document.createElement("option");N.setAttribute("value","public");W.appendChild(N);null!=F?(mxUtils.write(N,mxResources.get("publicDiagramUrl")),N.setAttribute("title",-F),W.value="public"):(mxUtils.write(N,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),N.setAttribute("disabled","disabled"));ea.appendChild(W);mxUtils.br(ea);W.focus();var ba=null,ha=null;if(null!=f||null!=l)c+=30,mxUtils.write(ea,mxResources.get("width")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value=-"100%",ea.appendChild(ba),mxUtils.write(ea,mxResources.get("height")+":"),ha=document.createElement("input"),ha.setAttribute("type","text"),ha.style.width="50px",ha.style.marginLeft="6px",ha.style.marginBottom="10px",ha.value=l+"px",ea.appendChild(ha),mxUtils.br(ea);var la=this.addLinkSection(ea,t),Y=J?this.addCheckbox(ea,mxResources.get("transparentBackground"),!1):null;null!=Y&&(c+=20);var ma=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?+"selected");ea.appendChild(K);K.setAttribute("selected","selected");mxUtils.write(z,mxResources.get("appearance")+":");z.appendChild(ea);mxUtils.br(z);F+=26;var ca=this.addCheckbox(z,mxResources.get("zoom"),!0,null,!0);mxUtils.write(z,":");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="100%";z.appendChild(X);var aa=this.addCheckbox(z,mxResources.get("fit"),!0);K=null!=+this.pages&&1<this.pages.length;var ia=ia=this.addCheckbox(z,mxResources.get("allPages"),K,!K),la=this.addCheckbox(z,mxResources.get("layers"),!0),Y=this.addCheckbox(z,mxResources.get("tags"),!0),ma=this.addCheckbox(z,mxResources.get("lightbox"),!0),Z=null;if(EditorUi.enableHtmlEditOption){Z=this.addEditButton(z,ma);var k=Z.getEditInput();k.style.marginBottom="16px";F+=50;mxEvent.addListener(ma,"change",function(){ma.checked?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled");k.checked&&+ma.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,z,mxUtils.bind(this,function(){t(N.checked?l:null,ca.checked,X.value,da.getTarget(),da.getColor(),aa.checked,ia.checked,la.checked,Y.checked,ma.checked,null!=Z?Z.getLink():null,null!=ea?ea.value:null)}),null,c,f);this.showDialog(c.container,340,F,!0,!0);C.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,l,t,z,C,F,N,K,J,da){var ea=document.createElement("div");+ea.style.whiteSpace="nowrap";var ca=document.createElement("h3");mxUtils.write(ca,c||mxResources.get("publish"));ca.style.width="100%";ca.style.textAlign="center";ca.style.marginTop="2px";ca.style.marginBottom="20px";ea.appendChild(ca);var X=document.createElement("select");c=30;X.className="geBtn";X.style.marginBottom="8px";X.style.marginLeft="0px";X.style.width="100%";X.style.boxSizing="border-box";if(null==N||""==N.getHash())z=null!=z?z:"https://www.drawio.com/doc/faq/publish-diagram-as-link",+ca=document.createElement("option"),mxUtils.write(ca,mxResources.get("makeCopy")),ca.setAttribute("value","copy"),X.appendChild(ca);ca=document.createElement("option");mxUtils.write(ca,mxResources.get("authorizationRequired"));ca.setAttribute("value","auth");X.appendChild(ca);null!=N&&""!=N.getHash()||ca.setAttribute("disabled","disabled");N=document.createElement("option");N.setAttribute("value","public");X.appendChild(N);null!=F?(mxUtils.write(N,mxResources.get("publicDiagramUrl")),N.setAttribute("title",+F),X.value="public"):(mxUtils.write(N,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),N.setAttribute("disabled","disabled"));ea.appendChild(X);mxUtils.br(ea);X.focus();var aa=null,ia=null;if(null!=f||null!=l)c+=30,mxUtils.write(ea,mxResources.get("width")+":"),aa=document.createElement("input"),aa.setAttribute("type","text"),aa.style.marginRight="16px",aa.style.width="50px",aa.style.marginLeft="6px",aa.style.marginRight="16px",aa.style.marginBottom="10px",aa.value=+"100%",ea.appendChild(aa),mxUtils.write(ea,mxResources.get("height")+":"),ia=document.createElement("input"),ia.setAttribute("type","text"),ia.style.width="50px",ia.style.marginLeft="6px",ia.style.marginBottom="10px",ia.value=l+"px",ea.appendChild(ia),mxUtils.br(ea);var la=this.addLinkSection(ea,t),Y=J?this.addCheckbox(ea,mxResources.get("transparentBackground"),!1):null;null!=Y&&(c+=20);var ma=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),ma=this.addCheckbox(ea,mxResources.get("selectedPage")+": "+f));var Z=document.createElement("select");Z.style.maxWidth="260px";Z.style.marginLeft="8px";Z.style.marginTop="16px";f=document.createElement("option");f.setAttribute("value","0");mxUtils.write(f,mxResources.get("light"));Z.appendChild(f);f=document.createElement("option");f.setAttribute("value","1");mxUtils.write(f,mxResources.get("dark"));Z.appendChild(f);f=document.createElement("option");-f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));f.setAttribute("selected","selected");Z.appendChild(f);da&&(mxUtils.write(ea,mxResources.get("appearance")+":"),ea.appendChild(Z),mxUtils.br(ea),c+=30);var k=this.addCheckbox(ea,mxResources.get("lightbox"),!0,null,null,!t),A=this.addEditButton(ea,k),I=A.getEditInput();t&&(I.style.marginLeft=k.style.marginLeft,k.style.display="none",c-=20);var U=this.addCheckbox(ea,mxResources.get("layers"),!0);U.style.marginLeft=I.style.marginLeft;-U.style.marginTop="8px";var O=this.addCheckbox(ea,mxResources.get("tags"),!0);O.style.marginLeft=I.style.marginLeft;O.style.marginBottom="16px";O.style.marginTop="16px";mxEvent.addListener(k,"change",function(){k.checked?(U.removeAttribute("disabled"),I.removeAttribute("disabled"),O.removeAttribute("disabled")):(U.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));I.checked&&k.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled",-"disabled")});t=new CustomDialog(this,ea,mxUtils.bind(this,function(){K(la.getTarget(),la.getColor(),null==ma?!1:ma.checked,k.checked,A.getLink(),U.checked,null!=ba?ba.value:null,null!=ha?ha.value:null,O.checked,W.value,null!=Y?Y.checked:!1,Z.value)}),null,mxResources.get("create"),z,C);this.showDialog(t.container,340,296+c,!0,!0);null!=ba?(ba.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)):null==W.parentNode;la.focus()};EditorUi.prototype.showRemoteExportDialog=+f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));f.setAttribute("selected","selected");Z.appendChild(f);da&&(mxUtils.write(ea,mxResources.get("appearance")+":"),ea.appendChild(Z),mxUtils.br(ea),c+=30);var k=this.addCheckbox(ea,mxResources.get("lightbox"),!0,null,null,!t),A=this.addEditButton(ea,k),I=A.getEditInput();t&&(I.style.marginLeft=k.style.marginLeft,k.style.display="none",c-=20);var T=this.addCheckbox(ea,mxResources.get("layers"),!0);T.style.marginLeft=I.style.marginLeft;+T.style.marginTop="8px";var O=this.addCheckbox(ea,mxResources.get("tags"),!0);O.style.marginLeft=I.style.marginLeft;O.style.marginBottom="16px";O.style.marginTop="16px";mxEvent.addListener(k,"change",function(){k.checked?(T.removeAttribute("disabled"),I.removeAttribute("disabled"),O.removeAttribute("disabled")):(T.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));I.checked&&k.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled",+"disabled")});t=new CustomDialog(this,ea,mxUtils.bind(this,function(){K(la.getTarget(),la.getColor(),null==ma?!1:ma.checked,k.checked,A.getLink(),T.checked,null!=aa?aa.value:null,null!=ia?ia.value:null,O.checked,X.value,null!=Y?Y.checked:!1,Z.value)}),null,mxResources.get("create"),z,C);this.showDialog(t.container,340,296+c,!0,!0);null!=aa?(aa.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?aa.select():document.execCommand("selectAll",!1,null)):null==X.parentNode;la.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,f,l,t,z){var C=document.createElement("div");C.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:"+(z?"10":"4")+"px";C.appendChild(F);if(z){mxUtils.write(C,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";C.appendChild(N);mxUtils.write(C,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";C.appendChild(K);mxUtils.br(C)}var J=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),da=t?null:this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);F=this.editor.graph;-var ea=t?null:this.addCheckbox(C,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=ea&&(ea.style.marginBottom="16px");c=new CustomDialog(this,C,mxUtils.bind(this,function(){var ca=parseInt(N.value)/100||1,W=parseInt(K.value)||0;l(!J.checked,null!=da?da.checked:!1,null!=ea?ea.checked:!1,ca,W)}),null,c,f);this.showDialog(c.container,300,(z?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,l,t,z,C,F,N,K){F=null!=F?F:Editor.defaultIncludeDiagram;-var J=document.createElement("div");J.style.whiteSpace="nowrap";var da=this.editor.graph,ea="jpeg"==N||"webp"==N?220:320,ca=document.createElement("h3");mxUtils.write(ca,c);ca.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";J.appendChild(ca);mxUtils.write(J,mxResources.get("zoom")+":");var W=document.createElement("input");W.setAttribute("type","text");W.style.marginRight="16px";W.style.width="60px";W.style.marginLeft="4px";W.style.marginRight="12px";W.value=this.lastExportZoom||-"100%";J.appendChild(W);mxUtils.write(J,mxResources.get("borderWidth")+":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.value=this.lastExportBorder||"0";J.appendChild(ba);mxUtils.br(J);var ha=this.addCheckbox(J,mxResources.get("selectionOnly"),!1,da.isSelectionEmpty()),la=document.createElement("input");la.style.marginTop="16px";la.style.marginRight="8px";la.style.marginLeft="24px";la.setAttribute("disabled",+var ea=t?null:this.addCheckbox(C,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=ea&&(ea.style.marginBottom="16px");c=new CustomDialog(this,C,mxUtils.bind(this,function(){var ca=parseInt(N.value)/100||1,X=parseInt(K.value)||0;l(!J.checked,null!=da?da.checked:!1,null!=ea?ea.checked:!1,ca,X)}),null,c,f);this.showDialog(c.container,300,(z?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,l,t,z,C,F,N,K){F=null!=F?F:Editor.defaultIncludeDiagram;+var J=document.createElement("div");J.style.whiteSpace="nowrap";var da=this.editor.graph,ea="jpeg"==N||"webp"==N?220:320,ca=document.createElement("h3");mxUtils.write(ca,c);ca.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";J.appendChild(ca);mxUtils.write(J,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%";J.appendChild(X);mxUtils.write(J,mxResources.get("borderWidth")+":");var aa=document.createElement("input");aa.setAttribute("type","text");aa.style.marginRight="16px";aa.style.width="60px";aa.style.marginLeft="4px";aa.value=this.lastExportBorder||"0";J.appendChild(aa);mxUtils.br(J);var ia=this.addCheckbox(J,mxResources.get("selectionOnly"),!1,da.isSelectionEmpty()),la=document.createElement("input");la.style.marginTop="16px";la.style.marginRight="8px";la.style.marginLeft="24px";la.setAttribute("disabled","disabled");la.setAttribute("type","checkbox");var Y=document.createElement("select");Y.style.marginTop="16px";Y.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(ca=0;ca<c.length;ca++)if(!da.isSelectionEmpty()||"selectionOnly"!=c[ca]){var ma=document.createElement("option");mxUtils.write(ma,mxResources.get(c[ca]));ma.setAttribute("value",c[ca]);Y.appendChild(ma)}K?(mxUtils.write(J,mxResources.get("size")+":"),J.appendChild(Y),mxUtils.br(J),ea+=26,mxEvent.addListener(Y,"change",function(){"selectionOnly"==-Y.value&&(ha.checked=!0)})):C&&(J.appendChild(la),mxUtils.write(J,mxResources.get("crop")),mxUtils.br(J),ea+=30,mxEvent.addListener(ha,"change",function(){ha.checked?la.removeAttribute("disabled"):la.setAttribute("disabled","disabled")}));da.isSelectionEmpty()?K&&(ha.style.display="none",ha.nextSibling.style.display="none",ha.nextSibling.nextSibling.style.display="none",ea-=30):(Y.value="diagram",la.setAttribute("checked","checked"),la.defaultChecked=!0,mxEvent.addListener(ha,"change",function(){Y.value=-ha.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(J,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=N&&"webp"!=N),k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";C=document.createElement("option");C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));k.appendChild(C);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));k.appendChild(K);+Y.value&&(ia.checked=!0)})):C&&(J.appendChild(la),mxUtils.write(J,mxResources.get("crop")),mxUtils.br(J),ea+=30,mxEvent.addListener(ia,"change",function(){ia.checked?la.removeAttribute("disabled"):la.setAttribute("disabled","disabled")}));da.isSelectionEmpty()?K&&(ia.style.display="none",ia.nextSibling.style.display="none",ia.nextSibling.nextSibling.style.display="none",ea-=30):(Y.value="diagram",la.setAttribute("checked","checked"),la.defaultChecked=!0,mxEvent.addListener(ia,"change",function(){Y.value=+ia.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(J,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=N&&"webp"!=N),k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";C=document.createElement("option");C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));k.appendChild(C);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));k.appendChild(K);"svg"==N&&mxUtils.lightDarkColorSupported?(C=document.createElement("option"),C.setAttribute("value","auto"),mxUtils.write(C,mxResources.get("automatic")),C.setAttribute("selected","selected"),k.appendChild(C)):Editor.isDarkMode()?K.setAttribute("selected","selected"):C.setAttribute("selected","selected");mxUtils.write(J,mxResources.get("appearance")+":");J.appendChild(k);mxUtils.br(J);ea+=26;var A=this.addCheckbox(J,mxResources.get("shadow"),da.shadowVisible),I=null;if("png"==N||"jpeg"==N||"webp"==-N)I=this.addCheckbox(J,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ea+=30;var U=this.addCheckbox(J,mxResources.get("includeCopyOfMyDiagram")+":",F,null,null,"jpeg"!=N&&"webp"!=N),O=document.createElement("select");O.style.maxWidth="260px";O.style.marginLeft="28px";"png"==N||"svg"==N?(F=function(){U.checked?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")},da=document.createElement("option"),da.setAttribute("value","allPages"),mxUtils.write(da,mxResources.get("allPages")),-O.appendChild(da),da=document.createElement("option"),da.setAttribute("value","currentPage"),mxUtils.write(da,mxResources.get("currentPage")),O.appendChild(da),U.style.marginBottom="12px",O.style.marginBottom="16px",J.appendChild(O),mxUtils.br(J),ea+=20,null!=this.lastEmbedInclude&&(O.value=this.lastEmbedInclude),mxEvent.addListener(U,"change",F),F()):U.style.marginBottom="16px";var S=document.createElement("input");S.style.marginBottom="16px";S.style.marginRight="8px";S.setAttribute("type","checkbox");-var X=document.createElement("input");X.style.marginBottom="16px";X.style.marginRight="8px";X.setAttribute("type","checkbox");f&&(S.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,J.appendChild(S),mxUtils.write(J,mxResources.get("embedImages")),mxUtils.br(J),X.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,J.appendChild(X),mxUtils.write(J,mxResources.get("embedFonts")),mxUtils.br(J),ea+=50);var aa=document.createElement("select");aa.style.maxWidth="260px";aa.style.marginLeft=-"8px";C=document.createElement("option");C.setAttribute("value","auto");mxUtils.write(C,mxResources.get("automatic"));aa.appendChild(C);F=document.createElement("option");F.setAttribute("value","blank");mxUtils.write(F,mxResources.get("openInNewWindow"));aa.appendChild(F);F=document.createElement("option");F.setAttribute("value","self");mxUtils.write(F,mxResources.get("openInThisWindow"));aa.appendChild(F);F=document.createElement("div");mxUtils.write(F,mxResources.get("LinksLost"));F.style.margin=-"7px";F.style.display="none";"svg"==N&&(mxUtils.write(J,mxResources.get("links")+":"),J.appendChild(aa),J.appendChild(F),mxUtils.br(J),mxUtils.br(J),ea+=50);l=new CustomDialog(this,J,mxUtils.bind(this,function(){this.lastExportBorder=ba.value;this.lastExportZoom=W.value;this.lastEmbedImages=S.checked;this.lastEmbedFonts=X.checked;this.lastEmbedInclude=O.value;z(W.value,Z.checked,!ha.checked,A.checked,U.checked,S.checked&&f,ba.value,la.checked,("png"==N||"svg"==N)&&"currentPage"==O.value,aa.value,-null!=I?I.checked:null,null!=k?k.value:null,Y.value,X.checked)}),null,l,t);this.showDialog(l.container,340,ea,!0,!0,null,null,null,null,!0);W.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?W.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,l,t,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var N=document.createElement("h3");mxUtils.write(N,f);N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";-C.appendChild(N)}var K=this.addCheckbox(C,mxResources.get("fit"),!0),J=this.addCheckbox(C,mxResources.get("shadow"),F.shadowVisible&&t,!t),da=this.addCheckbox(C,l),ea=this.addCheckbox(C,mxResources.get("lightbox"),!0),ca=this.addEditButton(C,ea),W=ca.getEditInput(),ba=1<F.model.getChildCount(F.model.getRoot()),ha=this.addCheckbox(C,mxResources.get("layers"),ba,!ba);ha.style.marginLeft=W.style.marginLeft;ha.style.marginBottom="12px";ha.style.marginTop="8px";mxEvent.addListener(ea,"change",function(){ea.checked?-(ba&&ha.removeAttribute("disabled"),W.removeAttribute("disabled")):(ha.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"));W.checked&&ea.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){c(K.checked,J.checked,da.checked,ea.checked,ca.getLink(),ha.checked)}),null,mxResources.get("embed"),z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=-function(c,f,l,t,z,C,F,N){function K(W){var ba=" ",ha="";t&&(ba=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=da?"&page="+da:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",-ha+="cursor:pointer;");c&&(ha+="max-width:100%;");var la="";l&&(la=' width="'+Math.round(J.width)+'" height="'+Math.round(J.height)+'"');F('<img src="'+W+'"'+la+(""!=ha?' style="'+ha+'"':"")+ba+"/>")}var J=this.editor.graph.getGraphBounds(),da=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(W){var ba=t?this.getFileData(!0):null;W=this.createImageDataUri(W,ba,"png");K(W)}),null,null,null,mxUtils.bind(this,function(W){N({message:mxResources.get("unknownError")})}),+N)I=this.addCheckbox(J,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ea+=30;var T=this.addCheckbox(J,mxResources.get("includeCopyOfMyDiagram")+":",F,null,null,"jpeg"!=N&&"webp"!=N),O=document.createElement("select");O.style.maxWidth="260px";O.style.marginLeft="28px";"png"==N||"svg"==N?(F=function(){T.checked?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")},da=document.createElement("option"),da.setAttribute("value","allPages"),mxUtils.write(da,mxResources.get("allPages")),+O.appendChild(da),da=document.createElement("option"),da.setAttribute("value","currentPage"),mxUtils.write(da,mxResources.get("currentPage")),O.appendChild(da),T.style.marginBottom="12px",O.style.marginBottom="16px",J.appendChild(O),mxUtils.br(J),ea+=20,null!=this.lastEmbedInclude&&(O.value=this.lastEmbedInclude),mxEvent.addListener(T,"change",F),F()):T.style.marginBottom="16px";var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");+var V=document.createElement("input");V.style.marginBottom="16px";V.style.marginRight="8px";V.setAttribute("type","checkbox");f&&(U.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,J.appendChild(U),mxUtils.write(J,mxResources.get("embedImages")),mxUtils.br(J),V.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,J.appendChild(V),mxUtils.write(J,mxResources.get("embedFonts")),mxUtils.br(J),ea+=50);var ba=document.createElement("select");ba.style.maxWidth="260px";ba.style.marginLeft=+"8px";C=document.createElement("option");C.setAttribute("value","auto");mxUtils.write(C,mxResources.get("automatic"));ba.appendChild(C);F=document.createElement("option");F.setAttribute("value","blank");mxUtils.write(F,mxResources.get("openInNewWindow"));ba.appendChild(F);F=document.createElement("option");F.setAttribute("value","self");mxUtils.write(F,mxResources.get("openInThisWindow"));ba.appendChild(F);F=document.createElement("div");mxUtils.write(F,mxResources.get("LinksLost"));F.style.margin=+"7px";F.style.display="none";"svg"==N&&(mxUtils.write(J,mxResources.get("links")+":"),J.appendChild(ba),J.appendChild(F),mxUtils.br(J),mxUtils.br(J),ea+=50);l=new CustomDialog(this,J,mxUtils.bind(this,function(){this.lastExportBorder=aa.value;this.lastExportZoom=X.value;this.lastEmbedImages=U.checked;this.lastEmbedFonts=V.checked;this.lastEmbedInclude=O.value;z(X.value,Z.checked,!ia.checked,A.checked,T.checked,U.checked&&f,aa.value,la.checked,("png"==N||"svg"==N)&&"currentPage"==O.value,ba.value,+null!=I?I.checked:null,null!=k?k.value:null,Y.value,V.checked)}),null,l,t);this.showDialog(l.container,340,ea,!0,!0,null,null,null,null,!0);X.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?X.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,l,t,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var N=document.createElement("h3");mxUtils.write(N,f);N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";+C.appendChild(N)}var K=this.addCheckbox(C,mxResources.get("fit"),!0),J=this.addCheckbox(C,mxResources.get("shadow"),F.shadowVisible&&t,!t),da=this.addCheckbox(C,l),ea=this.addCheckbox(C,mxResources.get("lightbox"),!0),ca=this.addEditButton(C,ea),X=ca.getEditInput(),aa=1<F.model.getChildCount(F.model.getRoot()),ia=this.addCheckbox(C,mxResources.get("layers"),aa,!aa);ia.style.marginLeft=X.style.marginLeft;ia.style.marginBottom="12px";ia.style.marginTop="8px";mxEvent.addListener(ea,"change",function(){ea.checked?+(aa&&ia.removeAttribute("disabled"),X.removeAttribute("disabled")):(ia.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"));X.checked&&ea.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){c(K.checked,J.checked,da.checked,ea.checked,ca.getLink(),ia.checked)}),null,mxResources.get("embed"),z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=+function(c,f,l,t,z,C,F,N){function K(X){var aa=" ",ia="";t&&(aa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=da?"&page="+da:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",+ia+="cursor:pointer;");c&&(ia+="max-width:100%;");var la="";l&&(la=' width="'+Math.round(J.width)+'" height="'+Math.round(J.height)+'"');F('<img src="'+X+'"'+la+(""!=ia?' style="'+ia+'"':"")+aa+"/>")}var J=this.editor.graph.getGraphBounds(),da=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(X){var aa=t?this.getFileData(!0):null;X=this.createImageDataUri(X,aa,"png");K(X)}),null,null,null,mxUtils.bind(this,function(X){N({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),J.width*J.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ea="";l&&(ea="&w="+Math.round(2*J.width)+"&h="+Math.round(2*J.height));var ca=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(t?"1":"0")+ea+"&xml="+encodeURIComponent(f));ca.send(mxUtils.bind(this,function(){200<=ca.getStatus()&&299>=ca.getStatus()?K("data:image/png;base64,"+ca.getText()):N({message:mxResources.get("unknownError")})}))}else N({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,f,l,t,z,C,F){var N=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),K=N.getElementsByTagName("a");if(null!=K)for(var J=0;J<K.length;J++){var da=K[J].getAttribute("href");null!=da&&"#"==da.charAt(0)&&"_blank"==K[J].getAttribute("target")&&K[J].removeAttribute("target")}t&&N.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(N);if(l){var ea=" ",ca="";t&&(ea="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+-EditorUi.lightboxHost+"/?client=1"+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ca+="cursor:pointer;");c&&(ca+="max-width:100%;");this.editor.convertImages(N,mxUtils.bind(this,function(W){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(W))+'"'+(""!=ca?' style="'+ca+'"':"")+ea+"/>")}))}else ca="",t&&(f=this.getSelectedPageIndex(),N.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"++EditorUi.lightboxHost+"/?client=1"+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ca+="cursor:pointer;");c&&(ca+="max-width:100%;");this.editor.convertImages(N,mxUtils.bind(this,function(X){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(X))+'"'+(""!=ca?' style="'+ca+'"':"")+ea+"/>")}))}else ca="",t&&(f=this.getSelectedPageIndex(),N.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}}})(this);"),ca+="cursor:pointer;"),c&&(c=parseInt(N.getAttribute("width")),z=parseInt(N.getAttribute("height")),N.setAttribute("viewBox","-0.5 -0.5 "+c+" "+z),ca+="max-width:100%;max-height:"+z+"px;",N.removeAttribute("height")),""!=ca&&N.setAttribute("style",ca),this.editor.addFontCss(N),this.editor.graph.mathEnabled&&this.editor.addMathCss(N),F(mxUtils.getXml(N))};EditorUi.prototype.timeSince=function(c){c=Math.floor((new Date-c)/1E3);var f=Math.floor(c/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(c/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(c/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(c/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(c/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,f){if(null!=c){var l=null;if("diagram"==c.nodeName)l=c;else if("mxfile"==c.nodeName){var t=c.getElementsByTagName("diagram");if(0<t.length){l=t[0];var z=f.getGlobalVariable;f.getGlobalVariable=function(C){return"page"==C?l.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==C?1:z.apply(this,arguments)}}}null!=l&&(c=Editor.parseDiagramNode(l))}t=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(c)}catch(C){}finally{this.editor.graph=t}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};@@ -3695,283 +3695,284 @@ EditorUi.prototype.getPngFileProperties=function(c){var f=1,l=0;if(null!=c){if(c!0),C),F=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){C=this.createTemporaryGraph(C.getStylesheet());var N=C.getGlobalVariable;C.setBackgroundImage=this.editor.graph.setBackgroundImage;var K=this.pages[0];this.currentPage==K?C.setBackgroundImage(this.editor.graph.backgroundImage):null!=K.viewState&&null!=K.viewState&&C.setBackgroundImage(K.viewState.backgroundImage);C.getGlobalVariable=function(J){return"page"==J?K.getName():"pagenumber"==J?1:N.apply(this,arguments)};document.body.appendChild(C.container);C.model.setRoot(K.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(J){try{null==F&&(F=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var da=J.toDataURL("image/png");da=Editor.writeGraphModelToPng(da,"tEXt","mxfile",encodeURIComponent(F));c(da.substring(da.lastIndexOf(",")+1));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container)}catch(ea){null!=f&&f(ea)}}),null,null,null,mxUtils.bind(this,function(J){null!=f&&f(J)}),null,null,t,null,C.shadowVisible,null,C,z,null,null,null,"diagram",null)}catch(J){null!=f&&f(J)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){N=null!=N?N:!0;da=null!=da?da:0;F=null!=K?K:f.background;F==mxConstants.NONE&&(F=null);null==F&&"none"==f.getAdaptiveColors()&&(F="#ffffff");K=this.editor.graph.createSvgImageExport(null!=c);C=f.getSvg(F,J,da,null,null,C,null,K,null,f.shadowVisible||ea,null,ca,"diagram");(f.shadowVisible||ea)&&f.addSvgShadow(C,null,null,0==da);null!=c&&C.setAttribute("content",c);null!=-l&&C.setAttribute("resource",l);var W=mxUtils.bind(this,function(ba){ba=(t?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(ba);null!=z&&z(ba);return ba});f.mathEnabled&&this.editor.addMathCss(C);if(null!=z)this.embedFonts(C,mxUtils.bind(this,function(ba){N?this.editor.convertImages(ba,mxUtils.bind(this,function(ha){W(ha)})):W(ba)}));else return W(C)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=-this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),f(c)}catch(t){f(c)}}))}catch(l){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){K=null!=K?K:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(ba){Editor.addRetryToError(ba,mxUtils.bind(this,function(){this.exportImage(c,f,l,t,z,C,F,N,K,J,da,ea,-ca)}));this.handleError(ba)}))){var W=this.editor.graph.isSelectionEmpty();l=null!=l?l:W;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(ba){this.spinner.stop();try{this.saveCanvas(ba,z?this.getFileData(!0,null,null,null,l,N,null,null,null,null,null,c,C):null,K,null==this.pages||0==this.pages.length,da)}catch(ha){this.handleError(ha)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(ba){this.spinner.stop();this.handleError(ba)}),-null,l,c||1,f,t,null,null,C,F,J,ea,ca)}catch(ba){this.spinner.stop(),this.handleError(ba)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,l,t,z,C,F){f=null!=f?f:0;l=null!=l?l:0;var N=[];try{var K=this.editor.graph;if(null!=c&&0<+l&&C.setAttribute("resource",l);var X=mxUtils.bind(this,function(aa){aa=(t?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(aa);null!=z&&z(aa);return aa});f.mathEnabled&&this.editor.addMathCss(C);if(null!=z)this.embedFonts(C,mxUtils.bind(this,function(aa){N?this.editor.convertImages(aa,mxUtils.bind(this,function(ia){X(ia)})):X(aa)}));else return X(C)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=+this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),f(c)}catch(t){f(c)}}))}catch(l){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){K=null!=K?K:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(aa){Editor.addRetryToError(aa,mxUtils.bind(this,function(){this.exportImage(c,f,l,t,z,C,F,N,K,J,da,ea,+ca)}));this.handleError(aa)}))){var X=this.editor.graph.isSelectionEmpty();l=null!=l?l:X;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(aa){this.spinner.stop();try{this.saveCanvas(aa,z?this.getFileData(!0,null,null,null,l,N,null,null,null,null,null,c,C):null,K,null==this.pages||0==this.pages.length,da)}catch(ia){this.handleError(ia)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(aa){this.spinner.stop();this.handleError(aa)}),+null,l,c||1,f,t,null,null,C,F,J,ea,ca)}catch(aa){this.spinner.stop(),this.handleError(aa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,l,t,z,C,F){f=null!=f?f:0;l=null!=l?l:0;var N=[];try{var K=this.editor.graph;if(null!=c&&0<c.length){K.model.beginUpdate();try{var J=mxUtils.parseXml(c);c={};var da=this.editor.extractGraphModel(J.documentElement,null!=this.pages);if(null!=da&&"mxfile"==da.nodeName&&null!=this.pages){var ea=da.getElementsByTagName("diagram");if(1==ea.length&&!C){if(da=Editor.parseDiagramNode(ea[0]),null!=this.currentPage&&(c[ea[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ca=ea[0].getAttribute("name");null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,-ca))}}else if(0<ea.length){C=[];var W=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ea[0].getAttribute("id")]=this.pages[0].getId(),ca=ea[0].getAttribute("name"),null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ca)),da=Editor.parseDiagramNode(ea[0]),t=!1,W=1);for(;W<ea.length;W++){var ba=ea[W].getAttribute("id");ea[W].removeAttribute("id");var ha=this.updatePageRoot(new DiagramPage(ea[W]));c[ba]=ea[W].getAttribute("id");var la=this.pages.length;-null==ha.getName()&&ha.setName(mxResources.get("pageWithNumber",[la+1]));K.model.execute(new ChangePage(this,ha,ha,la,!0));C.push(ha)}this.updatePageLinks(c,C)}}if(null!=da&&"mxGraphModel"===da.nodeName){N=K.importGraphModel(da,f,l,t);if(null!=N)for(this.addLocalPagesToMapping(c),W=0;W<N.length;W++)this.updatePageLinksForCell(c,N[W]);var Y=K.parseBackgroundImage(da.getAttribute("backgroundImage"));if(null!=Y&&null!=Y.originalSrc){this.updateBackgroundPageLink(c,Y);var ma=new ChangePageSetup(this,+ca))}}else if(0<ea.length){C=[];var X=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ea[0].getAttribute("id")]=this.pages[0].getId(),ca=ea[0].getAttribute("name"),null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ca)),da=Editor.parseDiagramNode(ea[0]),t=!1,X=1);for(;X<ea.length;X++){var aa=ea[X].getAttribute("id");ea[X].removeAttribute("id");var ia=this.updatePageRoot(new DiagramPage(ea[X]));c[aa]=ea[X].getAttribute("id");var la=this.pages.length;+null==ia.getName()&&ia.setName(mxResources.get("pageWithNumber",[la+1]));K.model.execute(new ChangePage(this,ia,ia,la,!0));C.push(ia)}this.updatePageLinks(c,C)}}if(null!=da&&"mxGraphModel"===da.nodeName){N=K.importGraphModel(da,f,l,t);if(null!=N)for(this.addLocalPagesToMapping(c),X=0;X<N.length;X++)this.updatePageLinksForCell(c,N[X]);var Y=K.parseBackgroundImage(da.getAttribute("backgroundImage"));if(null!=Y&&null!=Y.originalSrc){this.updateBackgroundPageLink(c,Y);var ma=new ChangePageSetup(this,null,Y);ma.ignoreColor=!0;K.model.execute(ma)}}F&&K.pasteCellStyles(K.includeDescendants(N),K.defaultVertexStyle,K.defaultEdgeStyle)}finally{K.model.endUpdate()}}}catch(Z){if(z)throw Z;this.handleError(Z)}return N};EditorUi.prototype.updatePageLinks=function(c,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(c,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(c,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=c[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=l&&(f.originalSrc="data:page/id,"+l)}}catch(t){}};EditorUi.prototype.updatePageLinksForCell=function(c,f){var l=document.createElement("div"),t=this.editor.graph,z=t.getLinkForCell(f);null!=z&&t.setLinkForCell(f,this.updatePageLink(c,z));if(t.isHtmlLabel(f)){l.innerHTML=Graph.sanitizeHtml(t.getLabel(f));for(var C=l.getElementsByTagName("a"),F=!1,N=0;N<C.length;N++)z=C[N].getAttribute("href"),null!=z&&(C[N].setAttribute("href",this.updatePageLink(c,z)),F=!0);F&&t.labelChanged(f,l.innerHTML)}for(N=0;N<t.model.getChildCount(f);N++)this.updatePageLinksForCell(c,t.model.getChildAt(f,N))};EditorUi.prototype.updatePageLink=function(c,f){if(Graph.isPageLink(f)){var l=c[f.substring(f.indexOf(",")+1)];f=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==f.substring(0,17))try{var t=JSON.parse(f.substring(17));if(null!=t.actions){for(var z=0;z<t.actions.length;z++){var C=t.actions[z];if(null!=C.open&&Graph.isPageLink(C.open)){var F=C.open.substring(C.open.indexOf(",")+1);l=c[F];null!=l?C.open="data:page/id,"+l:null==this.getPageById(F)&&delete C.open}}f="data:action/json,"+JSON.stringify(t)}}catch(N){}return f};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,f,l,t,z){var C=mxUtils.bind(this,function(F){this.loadingExtensions=!1;null!=l?l(F):this.handleError(F)});this.createTimeout(null,mxUtils.bind(this,function(F){t=null!=t?t:c.name;var N=mxUtils.bind(this,-function(J){F.clear()&&C(J)}),K=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var J=this.isRemoteVisioFormat(t);try{var da=t.lastIndexOf(".");if(0<=da&&da<t.length)t.substring(da+1).toUpperCase();else{var ea=t.lastIndexOf("/");0<=ea&&ea<t.length&&(t=t.substring(ea+1))}}catch(W){}if(J)if(null==VSD_CONVERT_URL||this.isOffline())N({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{J=new FormData;-J.append("file1",c,t);var ca=new XMLHttpRequest;ca.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(t)?"?stencil=1":""));ca.responseType="blob";this.addRemoteServiceSecurityCheck(ca);null!=z&&ca.setRequestHeader("x-convert-custom",z);ca.onreadystatechange=mxUtils.bind(this,function(){if(4==ca.readyState&&F.clear())if(200<=ca.status&&299>=ca.status)try{var W=ca.response;if("text/xml"==W.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(ha){try{f(ha.target.result)}catch(la){N({message:mxResources.get("errorLoadingFile")})}});-ba.readAsText(W)}else this.doImportVisio(W,f,N,t)}catch(ha){N(ha)}else try{""==ca.responseType||"text"==ca.responseType?N({message:ca.responseText}):(ba=new FileReader,ba.onload=function(){try{N({message:JSON.parse(ba.result).Message})}catch(ha){N(ha)}},ba.readAsText(ca.response))}catch(ha){N({})}});ca.send(J)}else if(F.clear())try{this.doImportVisio(c,f,N,t)}catch(W){N(W)}}else N({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?+function(J){F.clear()&&C(J)}),K=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var J=this.isRemoteVisioFormat(t);try{var da=t.lastIndexOf(".");if(0<=da&&da<t.length)t.substring(da+1).toUpperCase();else{var ea=t.lastIndexOf("/");0<=ea&&ea<t.length&&(t=t.substring(ea+1))}}catch(X){}if(J)if(null==VSD_CONVERT_URL||this.isOffline())N({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{J=new FormData;+J.append("file1",c,t);var ca=new XMLHttpRequest;ca.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(t)?"?stencil=1":""));ca.responseType="blob";this.addRemoteServiceSecurityCheck(ca);null!=z&&ca.setRequestHeader("x-convert-custom",z);ca.onreadystatechange=mxUtils.bind(this,function(){if(4==ca.readyState&&F.clear())if(200<=ca.status&&299>=ca.status)try{var X=ca.response;if("text/xml"==X.type){var aa=new FileReader;aa.onload=mxUtils.bind(this,function(ia){try{f(ia.target.result)}catch(la){N({message:mxResources.get("errorLoadingFile")})}});+aa.readAsText(X)}else this.doImportVisio(X,f,N,t)}catch(ia){N(ia)}else try{""==ca.responseType||"text"==ca.responseType?N({message:ca.responseText}):(aa=new FileReader,aa.onload=function(){try{N({message:JSON.parse(aa.result).Message})}catch(ia){N(ia)}},aa.readAsText(ca.response))}catch(ia){N({})}});ca.send(J)}else if(F.clear())try{this.doImportVisio(c,f,N,t)}catch(X){N(X)}}else N({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?K():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",K,null,null,null,N))}),C)};EditorUi.prototype.importGraphML=function(c,f,l){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=l?l(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(N){z.clear()&&t(N)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,f,t)}catch(N){C(N)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});-this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?F():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))}),t)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var f=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.createTimeout(null,mxUtils.bind(this,function(l){var t=mxUtils.bind(this,function(C){l.clear()&&f(C)}),z=mxUtils.bind(this,function(){this.loadingExtensions=-!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||t({message:mxResources.get("unknownError")})}catch(C){t(C)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))}),f)}};EditorUi.prototype.convertLucidChart=function(c,-f,l){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=l?l(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(N){z.clear()&&t(N)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if("undefined"!==typeof window.LucidImporter)try{var N=JSON.parse(c);f(LucidImporter.importState(N));try{if(null!=window.console&&"1"==urlParams.test){var K=[(new Date).toISOString(),"convertLucidChart",N];null!=N.state&&-K.push(JSON.parse(N.state));if(null!=N.svgThumbs)for(var J=0;J<N.svgThumbs.length;J++)K.push(Editor.createSvgDataUri(N.svgThumbs[J]));null!=N.thumb&&K.push(N.thumb);console.log.apply(console,K)}}catch(da){}}catch(da){null!=window.console&&console.error(da),C(da)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",-function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",F,null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))}),t)};EditorUi.prototype.createMermaidXml=function(c,f,l,t,z,C){var F=new Graph(document.createElement("div"));-l=F.insertVertex(null,null,null,0,0,t,z,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");F.setAttributeForCell(l,"mermaidData",JSON.stringify({data:c,config:f},null,2));null!=C&&F.setAttributeForCell(l,"templatePrompt",C);c=(new mxCodec).encode(F.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,f,l){var t=0,z=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(C){var F=new mxXmlRequest("https://www.draw.io/generate/v2",-c,"POST"),N=mxUtils.bind(this,function(K){C.clear()&&l(K)});F.send(mxUtils.bind(this,function(K){if(C.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var da=mxUtils.trim(K.getText());this.generateMermaidImage(da,null,mxUtils.bind(this,function(ea,ca,W){this.tryAndHandle(mxUtils.bind(this,function(){C.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",da),f(da,ea,ca,W))}),N)}),N,mxUtils.bind(this,function(ea){3>-t++?C.clear()&&z():N(ea)}))}),N);else{var J={message:mxResources.get("error")+" "+K.getStatus()};try{J=JSON.parse(K.getText()),J=J.error}catch(da){}N(J)}}),N)}),l)});z()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var l=1<f.length?-f[1]:null;if(null!=l){var t=l.indexOf("-");0<t&&(l=l.substring(0,t))}if(0<f.length&&"mermaid"==mxUtils.trim(f[0])||null!=l&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l))f.shift(),c=mxUtils.trim(f.join("\n")),f=c.split("\n");l=f[0].split(" ")[0].replace(/:$/,"");t=l.indexOf("-");0<t&&(l=l.substring(0,t));try{"mindmap"==l&&2<f.length&&(c=extractMermaidMindmap(f))}catch(z){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,-f,l,t,z){var C=mxUtils.bind(this,function(N){this.loadingMermaid=!1;null!=t?t(N):this.handleError(N)}),F=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(f.theme="dark");var N=mxUtils.bind(this,function(K){try{if(mxClient.IS_IE||mxClient.IS_IE11)K=-K.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var J=mxUtils.parseXml(K).getElementsByTagName("svg");if(0<J.length&&"error"!=J[0].getAttribute("aria-roledescription")){var da=parseFloat(J[0].getAttribute("width")),ea=parseFloat(J[0].getAttribute("height"));if(isNaN(da)||isNaN(ea))try{var ca=J[0].getAttribute("viewBox").split(/\s+/);da=parseFloat(ca[2]);ea=parseFloat(ca[3])}catch(W){da=da||100,ea=ea||100}l(this.convertDataUri(Editor.createSvgDataUri(K)),-da,ea)}else null!=z?z():t({message:mxResources.get("invalidInput")})}catch(W){t(W)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(K){N(K.svg)}).catch(function(K){null!=z?z(K):t(K)})}catch(K){t(K)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(N){this.importXml(N,-null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",F,null,null,null,C)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))};EditorUi.prototype.generatePlantUmlImage=function(c,f,l,t){function z(N,K,J){c1=N>>2;c2=(N&3)<<4|K>>4;c3=(K&15)<<2|J>>6;c4=J&63;r="";r+=C(c1&63);r+=C(c2&63);r+=C(c3&63);return r+=C(c4&63)}function C(N){if(10>N)return String.fromCharCode(48+N);N-=10;if(26>N)return String.fromCharCode(65+N);N-=26;if(26>N)return String.fromCharCode(97+-N);N-=26;return 0==N?"-":1==N?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(N){r="";for(i=0;i<N.length;i+=3)r=i+2==N.length?r+z(N.charCodeAt(i),N.charCodeAt(i+1),0):i+1==N.length?r+z(N.charCodeAt(i),0,0):r+z(N.charCodeAt(i),N.charCodeAt(i+1),N.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(N){if(200<=this.status&&300>this.status)if("txt"==-f)l(this.response);else{var K=new FileReader;K.readAsDataURL(this.response);K.onloadend=function(J){var da=new Image;da.onload=function(){try{var ea=da.width,ca=da.height;if(0==ea&&0==ca){var W=K.result,ba=W.indexOf(","),ha=decodeURIComponent(escape(atob(W.substring(ba+1)))),la=mxUtils.parseXml(ha).getElementsByTagName("svg");0<la.length&&(ea=parseFloat(la[0].getAttribute("width")),ca=parseFloat(la[0].getAttribute("height")))}l(K.result,ea,ca)}catch(Y){t(Y)}};da.src=K.result};K.onerror=function(J){t(J)}}else t(N)};-F.onerror=function(N){t(N)};F.send()};EditorUi.prototype.insertAsPreText=function(c,f,l){var t=this.editor.graph,z=null;t.getModel().beginUpdate();try{z=t.insertVertex(null,null,"<pre>"+c+"</pre>",f,l,1,1,"text;html=1;align=left;verticalAlign=top;"),t.updateCellSize(z,!0)}finally{t.getModel().endUpdate()}return z};EditorUi.prototype.insertTextAt=function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;F=null!=F?F:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(ca){4==ca.readyState&&200<=ca.status&&299>=ca.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ca.responseText,f,l,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(z||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var K=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var J=Editor.extractGraphModelFromPdf(c);if(null!=-J&&0<J.length)return this.importXml(J,f,l,C,!0,N)}if(Editor.isPngDataUrl(c)&&(J=Editor.extractGraphModelFromPng(c),null!=J&&0<J.length))return this.importXml(J,f,l,C,!0,N);if("data:image/svg+xml;"==c.substring(0,19))try{J=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(J=c.substring(c.indexOf(",")+1),J=window.atob&&!mxClient.IS_SF?atob(J):Base64.decode(J,!0)):J=decodeURIComponent(c.substring(c.indexOf(",")+1));var da=this.importXml(J,f,l,C,!0,N);if(0<da.length)return da}catch(ca){}this.loadImage(c,-mxUtils.bind(this,function(ca){if("data:"==c.substring(0,5))this.resizeImage(ca,c,mxUtils.bind(this,function(ha,la,Y){K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),la,Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ha)+";"))}),F,this.maxImageSize);else{var W=Math.min(1,Math.min(this.maxImageSize/ca.width,this.maxImageSize/ca.height)),ba=Math.round(ca.width*W);ca=Math.round(ca.height*-W);K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),ba,ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var ca=null;K.getModel().beginUpdate();try{ca=K.insertVertex(K.getDefaultParent(),null,c,K.snap(f),K.snap(l),1,1,"text;"+(t?"html=1;":"")),K.updateCellSize(ca),K.fireEvent(new mxEventObject("textInserted","cells",[ca]))}finally{K.getModel().endUpdate()}K.setSelectionCell(ca)}))}else{c=-Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,l,C,null,N);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(ca){this.editor.graph.setSelectionCells(this.importXml(ca,f,l,C,null,N))}),mxUtils.bind(this,function(ca){this.handleError(ca)}));else{K=this.editor.graph;z=null;K.getModel().beginUpdate();try{z=K.insertVertex(K.getDefaultParent(),null,"",K.snap(f),K.snap(l),1,1,"text;whiteSpace=wrap;"+(t?"html=1;":""));-K.fireEvent(new mxEventObject("textInserted","cells",[z]));t&&(c=K.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");z.value=c;K.updateCellSize(z);if(0<this.maxTextWidth&&z.geometry.width>this.maxTextWidth){var ea=K.getPreferredSizeForCell(z,this.maxTextWidth);z.geometry.width=ea.width;z.geometry.height=ea.height}Graph.isLink(z.value)&&K.setLinkForCell(z,z.value);z.geometry.width+=K.gridSize;z.geometry.height+=K.gridSize}finally{K.getModel().endUpdate()}return[z]}}return[]};-EditorUi.prototype.formatFileSize=function(c){var f=-1;do c/=1024,f++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var f=c.indexOf(";");0<f&&(c=c.substring(0,f)+c.substring(c.indexOf(",",f+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,f){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=-c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,f){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=-l}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(F,N){StorageFile.listFiles(this,"F",F,N)});window.openBrowserFile=mxUtils.bind(this,function(F,N,K){StorageFile.getFileContent(this,F,N,K)});window.deleteBrowserFile=mxUtils.bind(this,function(F,N,K){StorageFile.deleteFile(this,F,N,K)});if(!f){var t=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));-window.openFile.setConsumer(mxUtils.bind(this,function(F,N){null!=N&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(N)?(F=new Blob([F],{type:"application/octet-stream"}),this.importVisio(F,mxUtils.bind(this,function(K){this.importXml(K,0,0,!0)}),null,N)):this.editor.graph.setSelectionCells(this.importXml(F,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var z=this.dialog,C=z.close;-this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=t;C.apply(z,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,f,l){var t=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(C){if(mxUtils.isEmptyObject(C.files))l();else{var F=0,N,K=!1;C.forEach(function(J,da){J=da.name.toLowerCase();"diagram/diagram.xml"==J?(K=!0,da.async("string").then(function(ea){0==-ea.indexOf("<mxfile ")?f(ea):l()})):0==J.indexOf("versions/")&&(J=parseInt(J.substr(9)),J>F&&(F=J,N=da))});0<F?N.async("string").then(function(J){(new XMLHttpRequest).upload&&t.isRemoteFileFormat(J,c.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):t.parseFileData(J,mxUtils.bind(this,function(da){4==da.readyState&&(200<=da.status&&299>=da.status?f(da.responseText):l())}),c.name):l()}):K||l()}},function(C){l(C)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||-this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,l))};EditorUi.prototype.importFile=function(c,f,l,t,z,C,F,N,K,J,da,ea){J=null!=J?J:!0;var ca=!1,W=null,ba=mxUtils.bind(this,function(ha){var la=null;null!=ha&&"<mxlibrary"==ha.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,ha,F)),this.showSidebar()):la=this.importXml(ha,l,t,J,null,null!=ea?mxEvent.isControlDown(ea):null);null!=N&&N(la)});"image"==f.substring(0,5)?(K=-!1,"image/png"==f.substring(0,9)&&(da=da?null:this.extractGraphModelFromPng(c),null!=da&&0<da.length&&(W=this.importXml(da,l,t,J,null,null!=ea?mxEvent.isControlDown(ea):null),K=!0)),K||(K=this.editor.graph,da=c.indexOf(";"),0<da&&(c=c.substring(0,da)+c.substring(c.indexOf(",",da+1))),J&&K.isGridEnabled()&&(l=K.snap(l),t=K.snap(t)),da="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(da+="editableCssRules=.*;"),-W=[K.insertVertex(null,null,"",l,t,z,C,da+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ca=!0,this.importGraphML(c,ba)):null!=K&&null!=F&&EditorUi.isVisioFilename(F)?(ca=!0,this.importVisio(K,ba)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,f=mxUtils.bind(this,function(ha){4==ha.readyState&&(200<=ha.status&&299>=ha.status?ba(ha.responseText):null!=N&&(N(null),this.showError(mxResources.get("error"),-413==ha.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,F):this.parseFile(K,f,F)):0==c.indexOf("PK")&&null!=K?(ca=!0,this.importZipFile(K,ba,mxUtils.bind(this,function(){W=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J);N(W)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(W=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J,null,null!=ea?mxEvent.isControlDown(ea):null));ca||null==N||N(W);return W};EditorUi.prototype.importFiles=-function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){t=null!=t?t:this.maxImageSize;J=null!=J?J:this.maxImageBytes;var W=null!=f&&null!=l,ba=!0;f=null!=f?f:0;l=null!=l?l:0;var ha=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var la=da||this.resampleThreshold,Y=0;Y<c.length;Y++)if("image/svg"!==c[Y].type.substring(0,9)&&"image/"===c[Y].type.substring(0,6)&&c[Y].size>la){ha=!0;break}var ma=mxUtils.bind(this,function(){var Z=this.editor.graph,k=Z.gridSize;z=null!=z?z:mxUtils.bind(this,function(X,aa,ja,pa,sa,qa,wa,Ba,za){try{if(null!=-X&&"<mxlibrary"==X.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,X,wa)),this.showSidebar(),null;this.isCompatibleString(X)&&1==c.length&&null!=ca&&"drop"==ca.type&&this.isBlankFile()&&!this.canUndo()&&(W=!1,pa=ja=0);return this.importFile(X,aa,ja,pa,sa,qa,wa,Ba,za,W,ea,ca)}catch(Ea){return this.handleError(Ea),null}});C=null!=C?C:mxUtils.bind(this,function(X){Z.setSelectionCells(X)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var A=c.length,-I=A,U=[],O=mxUtils.bind(this,function(X,aa){U[X]=aa;if(0==--I){this.spinner.stop();if(null!=N)N(U);else{var ja=[];Z.getModel().beginUpdate();try{for(X=0;X<U.length;X++){var pa=U[X]();null!=pa&&(ja=ja.concat(pa))}}finally{Z.getModel().endUpdate()}}C(ja)}}),S=0;S<A;S++)mxUtils.bind(this,function(X){var aa=c[X];if(null!=aa){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(pa){if(null==F||F(aa))try{if("image/"==aa.type.substring(0,6))if("image/svg"==aa.type.substring(0,9)){var sa=Graph.clipSvgDataUri(pa.target.result),-qa=sa.indexOf(","),wa=decodeURIComponent(escape(atob(sa.substring(qa+1)))),Ba=mxUtils.parseXml(wa),za=Ba.getElementsByTagName("svg");if(0<za.length){var Ea=za[0],ra=ea?null:Ea.getAttribute("content");null!=ra&&"<"!=ra.charAt(0)&&"%"!=ra.charAt(0)&&(ra=unescape(window.atob?atob(ra):Base64.decode(ra,!0)));null!=ra&&"%"==ra.charAt(0)&&(ra=decodeURIComponent(ra));null==ra||"<mxfile "!==ra.substring(0,8)&&"<mxGraphModel "!==ra.substring(0,14)?O(X,mxUtils.bind(this,function(){try{if(null!=Ba){var Ma=Ba.getElementsByTagName("svg");-if(0<Ma.length){var Ha=Ma[0],Aa=Ha.getAttribute("width"),Ra=Ha.getAttribute("height");Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;Ra=null!=Ra&&"%"!=Ra.charAt(Ra.length-1)?parseFloat(Ra):NaN;var Za=Ha.getAttribute("viewBox");if(null==Za||0==Za.length)Ha.setAttribute("viewBox","0 0 "+Aa+" "+Ra);else if(isNaN(Aa)||isNaN(Ra)){var La=Za.split(" ");3<La.length&&(Aa=parseFloat(La[2]),Ra=parseFloat(La[3]))}sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var $a=Math.min(1,Math.min(t/Math.max(1,-Aa)),t/Math.max(1,Ra)),Da=z(sa,aa.type,f+X*k,l+X*k,Math.max(1,Math.round(Aa*$a)),Math.max(1,Math.round(Ra*$a)),aa.name);if(null!=Da&&(isNaN(Aa)||isNaN(Ra))){var x=new Image;x.onload=mxUtils.bind(this,function(){Aa=Math.max(1,x.width);Ra=Math.max(1,x.height);Da[0].geometry.width=Aa;Da[0].geometry.height=Ra;Ha.setAttribute("viewBox","0 0 "+Aa+" "+Ra);sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var M=sa.indexOf(";");0<M&&(sa=sa.substring(0,M)+sa.substring(sa.indexOf(",",M+1)));Z.setCellStyles("image",-sa,[Da[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(Ha))}return Da}}}catch(M){}return null})):O(X,mxUtils.bind(this,function(){return z(ra,"text/xml",f+X*k,l+X*k,0,0,aa.name)}))}else O(X,mxUtils.bind(this,function(){return null}))}else{qa=!1;if("image/png"==aa.type){var ya=ea?null:this.extractGraphModelFromPng(pa.target.result);if(null!=ya&&0<ya.length){var Ca=new Image;Ca.src=pa.target.result;O(X,mxUtils.bind(this,function(){return z(ya,"text/xml",f+X*k,l+X*k,Ca.width,Ca.height,aa.name)}));-qa=!0}}qa||(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(pa.target.result,mxUtils.bind(this,function(Ma){this.resizeImage(Ma,pa.target.result,mxUtils.bind(this,function(Ha,Aa,Ra){O(X,mxUtils.bind(this,function(){if(null!=Ha&&Ha.length<J){var Za=ba&&this.isResampleImageSize(aa.size,-da)?Math.min(1,Math.min(t/Aa,t/Ra)):1;return z(Ha,aa.type,f+X*k,l+X*k,Math.round(Aa*Za),Math.round(Ra*Za),aa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),ba,t,da,aa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else sa=pa.target.result,z(sa,aa.type,f+X*k,l+X*k,240,160,aa.name,function(Ma){O(X,function(){return Ma})},aa)}catch(Ma){O(X,mxUtils.bind(this,function(){return null})),null!=window.console&&-console.error(Ma,aa)}else O(X,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(aa.name)?z(null,aa.type,f+X*k,l+X*k,240,160,aa.name,function(pa){O(X,function(){return pa})},aa):"image"==aa.type.substring(0,5)||"application/pdf"==aa.type?ja.readAsDataURL(aa):ja.readAsText(aa)}})(S)});if(ha){ha=[];for(Y=0;Y<c.length;Y++)ha.push(c[Y]);c=ha;this.confirmImageResize(function(Z){ba=Z;ma()},K)}else ma()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&-this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,f){f=null!=f?f:!1;var l=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},t=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,z=function(C,F){if(C||f)mxSettings.setResizeImages(C?F:null),mxSettings.save();l();c(F)};null==t||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(C){z(C,-!0)},function(C){z(C,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):z(!1,t)};EditorUi.prototype.parseFile=function(c,f,l){l=null!=l?l:c.name;var t=new FileReader;t.onload=mxUtils.bind(this,function(){this.parseFileData(t.result,f,l)});t.readAsText(c)};EditorUi.prototype.parseFileData=-function(c,f,l){var t=new XMLHttpRequest;t.open("POST",OPEN_URL);t.setRequestHeader("Content-Type","application/x-www-form-urlencoded");t.onreadystatechange=function(){f(t)};t.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(z){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>f};EditorUi.prototype.resizeImage=function(c,f,l,t,z,C,-F){z=null!=z?z:this.maxImageSize;var N=Math.max(1,c.width),K=Math.max(1,c.height),J=f;if(t&&this.isResampleImageSize(null!=F?F:f.length,C))try{var da=Math.max(N/z,K/z);if(1<da){var ea=Math.round(N/da),ca=Math.round(K/da),W=document.createElement("canvas");W.width=ea;W.height=ca;W.getContext("2d").drawImage(c,0,0,ea,ca);var ba=W.toDataURL();if(ba.length<f.length){var ha=document.createElement("canvas");ha.width=ea;ha.height=ca;var la=ha.toDataURL();ba!==la&&(f=ba,N=ea,K=ca)}}}catch(Y){}t&&J!=f&&z>-this.maxImageSize/2&&f.length>this.maxImageBytes?this.resizeImage(c,f,l,t,z/1.5,C,F):l(f,N,K)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,f,l){try{var t=new Image;t.onload=function(){t.width=0<t.width?t.width:120;t.height=0<t.height?t.height:120;f(t)};null!=l&&(t.onerror=l);t.src=c}catch(z){if(null!=l)l(z);else throw z;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=-(null!=urlParams.rough?urlParams.rough:c)};var u=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());u.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};-var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,f=this.editor.graph,l=f.isEnabled;f.isEnabled=function(){return l.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(k){var A=k.getEvent();return null==k.getState()&&!mxEvent.isMouseEvent(A)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(A)&&(null==k.getState()||mxEvent.isControlDown(A)||mxEvent.isShiftDown(A))});-f.cellEditor.editPlantUmlData=function(k,A,I){var U=JSON.parse(I);A=new TextareaDialog(c,mxResources.get("plantUml")+":",U.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(O,U.format,function(S,X,aa){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==U.format)f.labelChanged(k,"<pre>"+S+"</pre>"),f.updateCellSize(k,!0);else{f.setCellStyles("image",c.convertDataUri(S),[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=-X,ja.height=aa,f.cellsResized([k],[ja],!1))}f.setAttributeForCell(k,"plantUmlData",JSON.stringify({data:O,format:U.format}))}finally{f.getModel().endUpdate()}},function(S){c.handleError(S)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};f.cellEditor.editMermaidData=function(k,A,I){var U=JSON.parse(I);A=new TextareaDialog(c,mxResources.get("mermaid")+":",U.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(O,U.config,-function(S,X,aa){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",S,[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=Math.max(ja.width,X),ja.height=Math.max(ja.height,aa),f.cellsResized([k],[ja],!1));f.setAttributeForCell(k,"mermaidData",JSON.stringify({data:O,config:U.config},null,2))}finally{f.getModel().endUpdate()}},function(S){c.handleError(S)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};var t=f.cellEditor.startEditing;f.cellEditor.startEditing=-function(k,A){try{var I=this.graph.getAttributeForCell(k,"plantUmlData");if(null!=I)this.editPlantUmlData(k,A,I);else if(I=this.graph.getAttributeForCell(k,"mermaidData"),null!=I&&window.isMermaidEnabled)this.editMermaidData(k,A,I);else{var U=f.getCellStyle(k);"1"==mxUtils.getValue(U,"metaEdit","0")?c.showDataDialog(k):t.apply(this,arguments)}}catch(O){c.handleError(O)}};f.getLinkTitle=function(k){return c.getLinkTitle(k)};f.customLinkClicked=function(k,A){var I=!1;try{var U=this.getGraphBounds();-c.handleCustomLink(k,A);I=!0;c.chromelessResize&&!U.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(A))}catch(O){c.handleError(O)}return I};var z=f.parseBackgroundImage;f.parseBackgroundImage=function(k){var A=z.apply(this,arguments);null!=A&&null!=A.src&&Graph.isPageLink(A.src)&&(A={originalSrc:A.src});return A};var C=f.setBackgroundImage;f.setBackgroundImage=function(k){null!=k&&null!=k.originalSrc&&(k=c.createImageForPageLink(k.originalSrc,c.currentPage,this));C.apply(this,-arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(k,A){k=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=k){var I=k.indexOf(",");if(0<I)for(k=k.substring(I+1),A=A.getProperty("patches"),I=0;I<A.length;I++)if(null!=A[I][EditorUi.DIFF_UPDATE]&&null!=A[I][EditorUi.DIFF_UPDATE][k]||-null!=A[I][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(A[I][EditorUi.DIFF_REMOVE],k)){f.refreshBackgroundImage();break}}}));var F=f.getBackgroundImageObject;f.getBackgroundImageObject=function(k,A){var I=F.apply(this,arguments);null!=I&&null!=I.originalSrc&&(I=A?c.createImageForPageLink(I.originalSrc,null,null,!0):{src:I.originalSrc});return I};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");-if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var N=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(k){k=null!=k?k:"";"1"==urlParams.dev&&(k+=(0<k.length?"&":"?")+"dev=1");return N.apply(this,arguments)};var K=f.addClickHandler;f.addClickHandler=function(k,A,I){var U=A;A=function(O,S,X){if(null==S){var aa=mxEvent.getSource(O);"a"==aa.nodeName.toLowerCase()&&(S=aa.getAttribute("href"))}null!=-S&&f.isCustomLink(S)&&(mxEvent.isTouchEvent(O)||!mxEvent.isPopupTrigger(O))&&f.customLinkClicked(S,X)&&mxEvent.consume(O);null!=U&&U(O,S,X)};K.call(this,k,A,I)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var J=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,A,I){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["zoomIn","zoomOut","-"],null,I);J.apply(this,arguments);-f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(k,["-","addToScratchpad"],null,I);f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["-","exitGroup","home"],null,I)};var da=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(k,A,I){if(c.editor.graph.isSelectionEmpty())da.apply(this,arguments),c.menus.addMenuItems(k,["copyAsImage"],null,I);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(k,A,I):this.addPopupMenuArrangeItems(k,-A,I),this.addMenuItems(k,"- cut copy copyAsImage duplicate -".split(" "),null,I),this.isShowCellEditItems()||this.addPopupDeleteItem(k,A,I),this.addMenuItems(k,["lockUnlock","-"],null,I),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(A)&&f.isCellEditable(A)&&(this.addSubmenu("editCell",k,null,mxResources.get("edit")),k.addSeparator(),f.getModel().isEdge(A))){this.addSubmenu("line",k);var U=f.getModel().getGeometry(A);null!=U&&null!=U.points&&0<U.points.length&&this.addMenuItems(k,-["clearWaypoints"],null,I)}1==f.getSelectionCount()&&this.addMenuItems(k,["enterGroup"],null,I);U=c.getSelectionState();null!=U.mergeCell?this.addMenuItem(k,"mergeCells"):(1<U.style.colspan||1<U.style.rowspan)&&this.addMenuItem(k,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;-this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var ea=f.getExportVariables;f.getExportVariables=function(){var k=ea.apply(this,arguments),A=c.getCurrentFile();null!=A&&(k.filename=A.getTitle());k.pagecount=null!=c.pages?c.pages.length:1;k.page=null!=c.currentPage?c.currentPage.getName():"";k.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var ca=f.getGlobalVariable;f.getGlobalVariable=-function(k){var A=c.getCurrentFile();return"filename"==k&&null!=A?A.getTitle():"page"==k&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==k?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==k?null!=c.pages?c.pages.length:1:ca.apply(this,arguments)};var W=null,ba=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var k=this.getCurrentFile(),A=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;W!=A&&k==ba&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),-f.view.validate());W=A;ba=k}));var ha=f.labelLinkClicked;f.labelLinkClicked=function(k,A,I){var U=A.getAttribute("href");if(null==U||!f.isCustomLink(U)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))ha.apply(this,arguments);else{if(!f.isEnabled()||null!=k&&f.isCellLocked(k.cell))f.customLinkClicked(U),f.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=function(){var k=c.defaultFilename,A=c.getCurrentFile();null!=A&&(k=null!=A.getTitle()?A.getTitle():k);return k};-var la=this.actions.get("print");la.setEnabled(!mxClient.IS_IOS||!navigator.standalone);la.visible=la.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,-!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&f.addListener(mxEvent.ESCAPE,function(k,A){null!=A&&f.isEnabled()&&!f.isEditing()&&null!=-A.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(k){var A=f.cellEditor.text2,I=null;null!=A&&(mxEvent.addListener(A,"dragleave",function(U){null!=I&&(I.parentNode.removeChild(I),I=null);U.stopPropagation();-U.preventDefault()}),mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(U){null==I&&(!mxClient.IS_IE||10<document.documentMode)&&(I=this.highlightElement(A));U.stopPropagation();U.preventDefault()})),mxEvent.addListener(A,"drop",mxUtils.bind(this,function(U){null!=I&&(I.parentNode.removeChild(I),I=null);if(0<U.dataTransfer.files.length)this.importFiles(U.dataTransfer.files,0,0,this.maxImageSize,function(S,X,aa,ja,pa,sa){f.insertImage(S,pa,sa)},function(){},function(S){return"image/"==S.type.substring(0,-6)},function(S){for(var X=0;X<S.length;X++)S[X]()},mxEvent.isControlDown(U));else if(0<=mxUtils.indexOf(U.dataTransfer.types,"text/uri-list")){var O=U.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?this.loadImage(decodeURIComponent(O),mxUtils.bind(this,function(S){var X=Math.max(1,S.width);S=Math.max(1,S.height);var aa=this.maxImageSize;aa=Math.min(1,Math.min(aa/Math.max(1,X)),aa/Math.max(1,S));f.insertImage(decodeURIComponent(O),X*aa,S*aa)})):document.execCommand("insertHTML",-!1,U.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(U.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,U.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(U.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,U.dataTransfer.getData("text/plain"));U.stopPropagation();U.preventDefault()})))}));if(Editor.isSettingsEnabled()){la=this.editor.graph.view;var Y=mxSettings.getUnit();la.setUnit(Y);Editor.pageSizeUnit=Y==mxConstants.METERS?mxConstants.MILLIMETERS:-Y;la.addListener("unitChanged",function(k,A){k=A.getProperty("unit");mxSettings.setUnit(k);mxSettings.save();Editor.pageSizeUnit=k==mxConstants.METERS?mxConstants.MILLIMETERS:k});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,la.unit);this.refresh()}if("1"==urlParams.styledev){la=document.getElementById("geFooter");null!=la&&(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)})),la.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,-mxUtils.bind(this,function(k,A){0<this.editor.graph.getSelectionCount()?(k=this.editor.graph.getSelectionCell(),k=this.editor.graph.getModel().getStyle(k),this.styleInput.value=k||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var ma=this.isSelectionAllowed;this.isSelectionAllowed=function(k){return mxEvent.getSource(k)==this.styleInput?!0:ma.apply(this,arguments)}}la=document.getElementById("geInfo");null!=la&&la.parentNode.removeChild(la);if(Graph.fileSupport&&-(!this.editor.chromeless||this.editor.editable)){var Z=null;mxEvent.addListener(f.container,"dragleave",function(k){f.isEnabled()&&(null!=Z&&(Z.parentNode.removeChild(Z),Z=null),k.stopPropagation(),k.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(k){null==Z&&(!mxClient.IS_IE||10<document.documentMode)&&(Z=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();k.stopPropagation();k.preventDefault()}));mxEvent.addListener(f.container,-"drop",mxUtils.bind(this,function(k){null!=Z&&(Z.parentNode.removeChild(Z),Z=null);if(f.isEnabled()){var A=mxUtils.convertPoint(f.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),I=k.dataTransfer.files,U=f.view.translate,O=f.view.scale,S=A.x/O-U.x,X=A.y/O-U.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(k)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(k)&&(X=S=null),this.importFiles(I,S,X,this.maxImageSize,-null,null,null,null,mxEvent.isControlDown(k),null,null,mxEvent.isShiftDown(k),k));else{mxEvent.isAltDown(k)&&(X=S=0);var aa=0<=mxUtils.indexOf(k.dataTransfer.types,"text/uri-list")?k.dataTransfer.getData("text/uri-list"):null;A=this.extractGraphModelFromEvent(k,null!=this.pages);if(null!=A)f.setSelectionCells(this.importXml(A,S,X,!0));else if(0<=mxUtils.indexOf(k.dataTransfer.types,"text/html")){var ja=k.dataTransfer.getData("text/html");A=document.createElement("div");A.innerHTML=Graph.sanitizeHtml(ja);-var pa=null;I=A.getElementsByTagName("img");null!=I&&1==I.length?(ja=I[0].getAttribute("src"),null==ja&&(ja=I[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ja)||(pa=!0)):(I=A.getElementsByTagName("a"),null!=I&&1==I.length?ja=I[0].getAttribute("href"):(A=A.getElementsByTagName("pre"),null!=A&&1==A.length&&(ja=mxUtils.getTextContent(A[0]))));var sa=!0,qa=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(ja,S,X,!0,pa,null,sa,mxEvent.isControlDown(k)))});pa&&null!=-ja&&ja.length>this.resampleThreshold?this.confirmImageResize(function(wa){sa=wa;qa()},mxEvent.isControlDown(k)):qa()}else null!=aa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,function(wa){var Ba=Math.max(1,wa.width);wa=Math.max(1,wa.height);var za=this.maxImageSize;za=Math.min(1,Math.min(za/Math.max(1,Ba)),za/Math.max(1,wa));f.setSelectionCell(f.insertVertex(null,null,"",S,X,Ba*za,wa*za,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+-aa+";"))}),mxUtils.bind(this,function(wa){f.setSelectionCells(this.insertTextAt(aa,S,X,!0))})):0<=mxUtils.indexOf(k.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(k.dataTransfer.getData("text/plain"),S,X,!0))}}k.stopPropagation();k.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();-this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var k=parseInt(this.div.offsetLeft),A=parseInt(this.div.offsetWidth),I=c.embedViewport.x+c.embedViewport.width,U=parseInt(this.div.offsetTop),O=parseInt(this.div.offsetHeight),-S=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(k,I-A))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(U,S-O))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(la=Editor.currentTheme,"simple"==la||"sketch"==la)Editor.currentTheme="",this.doSetCurrentTheme(la,-mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}),!0);la=!1;null!=urlParams.dark?la=urlParams.dark:(la="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||la&&"auto"!=mxSettings.settings.darkMode||(la=mxSettings.settings.darkMode));"auto"==la&&-this.isAutoDarkModeSupported()&&(la=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof la?"1"==la:la);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(k){this.isAutoDarkMode()&&this.setDarkMode(k.matches)}))}catch(k){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&-null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(k,A){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts()};var B=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==-Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=f&&c<f?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<f&&c>=f&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}B.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=-this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(J){mxEvent.getSource(J)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var z=document.createElement("div");z.style.position="absolute";z.style.width="10px";z.style.height="10px";z.style.borderRadius=-"5px";z.style.border="1px solid gray";z.style.background="#ffffff";z.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(z);this.bottomResizer=z;var C=null,F=null,N=null,K=null;mxEvent.addGestureListeners(z,mxUtils.bind(this,function(J){K=parseInt(this.diagramContainer.style.height);F=mxEvent.getClientY(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));z=z.cloneNode(!1);z.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(z);this.rightResizer=z;mxEvent.addGestureListeners(z,-mxUtils.bind(this,function(J){N=parseInt(this.diagramContainer.style.width);C=mxEvent.getClientX(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(J){var da=!1;null!=C&&(this.diagramContainer.style.width=Math.max(20,N+mxEvent.getClientX(J)-C)+"px",da=!0);null!=F&&(this.diagramContainer.style.height=Math.max(20,K+mxEvent.getClientY(J)-F)+"px",da=!0);da&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",-fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(J){null==C&&null==F||mxEvent.consume(J);F=C=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";-this.addListener("editInlineStart",mxUtils.bind(this,function(J){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(J){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,-function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var l=f.clipboardData||f.originalEvent.clipboardData,t=!1,z=0;z<l.types.length;z++)if("text/"===l.types[z].substring(0,5)){t=!0;break}if(!t){var C=l.items;for(index in C){var F=C[index];if("file"===F.kind){if(c.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,-function(K,J,da,ea,ca,W){c.insertImage(K,ca,W)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var J=0;J<K.length;J++)K[J]()});else{var N=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],N.x,N.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(K){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML=" ";l.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,-l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily="monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize=-"none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=!0;l.innerHTML=" ";var t=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(C){var F=mxEvent.getSource(C);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||"true"==F.contentEditable||-224!=C.keyCode&&(mxClient.IS_MAC||17!=C.keyCode)&&(!mxClient.IS_MAC||91!=C.keyCode&&93!=C.keyCode)||t||(l.style.left=f.container.scrollLeft+10+"px",l.style.top=f.container.scrollTop+10+"px",C=f.container.scrollLeft,F=f.container.scrollTop,f.container.appendChild(l),t=!0,l.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=C,f.container.scrollTop=F)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(C){var F=C.keyCode;window.setTimeout(mxUtils.bind(this,function(){!t||-224!=F&&17!=F&&91!=F&&93!=F||(t=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(l),c()}catch(F){this.handleError(F)}}));mxEvent.addListener(l,"cut",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(l,!0),c()}catch(F){this.handleError(F)}}));-mxEvent.addListener(l,"paste",mxUtils.bind(this,function(C){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(l.innerHTML=" ",l.focus(),null!=C.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(C,l,!0,!0)),!mxEvent.isConsumed(C)){var F=f.container.scrollLeft,N=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=F,f.container.scrollTop=N,Graph.removePasteFormatting(l.firstChild),this.pasteCells(C,l,!1,!0)}catch(K){this.handleError(K)}}),-0)}}catch(K){this.handleError(K)}}),!0);var z=this.isSelectionAllowed;this.isSelectionAllowed=function(C){return mxEvent.getSource(C)==l?!0:z.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,f){mxSettings.setUi(c);(f=this.doSetCurrentTheme(c)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,f,l){function t(N){return"simple"==-N||"sketch"==N}var z=Editor.currentTheme,C="simple"==z&&this.isDefaultTheme(c)||this.isDefaultTheme(z)&&"simple"==c;if((C||l)&&!this.themeSwitching){var F=this.saveScrollState();this.editor.graph.stopEditing(!1);this.container.style.opacity=0;Editor.currentTheme=c;this.themeSwitching=!0;window.setTimeout(mxUtils.bind(this,function(){t(z)&&this.isDefaultTheme(c)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="",this.tabContainer.style.display="",this.hsplit.style.display=-"block",this.menubarHeight=App.prototype.menubarHeight):this.isDefaultTheme(z)&&t(c)&&(this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.menubarHeight=0,"simple"!=c?(this.tabContainer.style.display="none",this.hsplit.style.display="none",this.hsplitPosition=0):this.tabContainer.style.display="");this.switchTheme(c);this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();-this.restoreScrollState(F);this.container.style.opacity="";delete this.themeSwitching;isLocalStorage&&t(c)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:!0);null!=f&&f()}),0)}return C};EditorUi.prototype.saveScrollState=function(){var c=this.editor.graph.view.translate,f=this.diagramContainer.scrollLeft,l=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(f-=this.embedViewport.x,l-=this.embedViewport.y):(f+=this.embedViewport.x,-l+=this.embedViewport.y));return{x:f,y:l,tx:c.x,ty:c.y}};EditorUi.prototype.restoreScrollState=function(c){var f=this.editor.graph.view.scale,l=this.editor.graph.view.translate;this.diagramContainer.scrollLeft=c.x+(l.x-c.tx)*f;this.diagramContainer.scrollTop=c.y+(l.y-c.ty)*f};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&-(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var t=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=t&&null!=t.getAttribute("class");if(!f&&null!=t){t=t.getAttribute("title");var z=-this.getCurrentFile();z=null!=z?z.savingStatusKey:DrawioFile.prototype.savingStatusKey;t==mxResources.get(z)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(z))+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";t=32>=c.clientWidth;c.style.visibility=t&&""==this.editor.getStatus()?"hidden":"";if(t||f)this.statusContainer.style.display="inline-flex",f=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display=-"inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(c){this.isDefaultTheme(c)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&-this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createWrapperForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);-this.createMenubarForTheme(c);this.sidebarContainer.style.display="";if("sketch"==c){this.createFormatWindow();this.formatContainer.style.left="0px";this.formatContainer.style.top="0px";this.formatContainer.style.width="";this.formatContainer.style.zIndex="";this.formatContainer.style.border="none";var f=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);this.createShapesWindow();this.sidebarContainer.className="";this.sidebarContainer.style.position="absolute";this.sidebarContainer.style.left=-"0px";this.sidebarContainer.style.top="0px";this.sidebarContainer.style.bottom=f?"32px":"0px";this.sidebarContainer.style.width="100%"}null!=this.format&&(c=this.isDefaultTheme(c)||"atlas"==c,this.format.showCloseButton!=c&&(this.format.showCloseButton=c,this.format.refresh()))};EditorUi.prototype.getWindows=function(){var c=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(c=c.concat([this.menus.tagsWindow,-this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.fit()};EditorUi.prototype.hideWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),-this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=-null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(c){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=-Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);if("simple"==c||"sketch"==c){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||null==Editor.config.defaultEdgeLength)f.defaultEdgeLength=120;null==urlParams.grid&&(f.defaultGridEnabled=!1);null==urlParams.pv&&(f.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.switchCssForTheme=function(c){};EditorUi.prototype.createWrapperForTheme=function(c){null!=-this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=function(c){};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.createFooterMenuForTheme=function(c){};EditorUi.prototype.createPickerMenuForTheme=-function(c){};EditorUi.prototype.getNetworkStatus=function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var f=this.getCurrentFile();null!=f&&(f.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==f.sync||f.sync.enabled&&f.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==f.sync||f.sync.isConnected()?f.isRealtimeEnabled()&&f.isRealtimeSupported()&&1<f.getRealtimeState()&&(c=f.getRealtimeError(),c=mxResources.get("realtimeCollaboration")+-": "+(null!=c&&null!=c.message?c.message:mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity=-"",this.menubar.container.appendChild(this.statusContainer));null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);c=this.menubar.langIcon;null!=c&&(c.style.position="absolute",c.style.height="18px",c.style.width="18px",c.style.flexShrink="",c.style.opacity="",this.menubarContainer.parentNode.insertBefore(c,this.menubarContainer));null!=this.buttonContainer&&(this.buttonContainer.style.display="",this.buttonContainer.style.padding="",this.menubar.container.appendChild(this.buttonContainer))};-EditorUi.prototype.createMenu=function(c,f,l,t){l=null!=l?l:"geToolbarButton";var z=this.menus.get(c);t=this.menubar.addMenu(mxResources.get(c),z.funct,null,t);t.className=l;t.style.display="inline-block";t.style.cursor="pointer";t.style.height="24px";t.setAttribute("title",mxResources.get(c));this.menus.menuCreated(z,t,l);null!=f&&(t.style.backgroundImage="url("+f+")",t.style.backgroundPosition="center center",t.style.backgroundRepeat="no-repeat",t.style.backgroundSize="100% 100%",t.style.width=-"24px",t.innerText="");return t};EditorUi.prototype.createToolbarButton=function(c,f,l,t){t=null!=t?t:24;var z=document.createElement("a");z.className="geToolbarButton geAdaptiveAsset";z.setAttribute("title",f);z.style.backgroundImage="url("+c+")";z.style.backgroundPosition="center center";z.style.backgroundRepeat="no-repeat";z.style.backgroundSize="100% 100%";z.style.display="inline-block";z.style.cursor="pointer";z.style.marginLeft="6px";z.style.width=t+"px";z.style.height=t+"px";z.style.flexShrink=-"0";z.style.flexGrow="0";null!=l&&(mxEvent.addListener(z,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()})),mxEvent.addListener(z,"click",function(C){"disabled"!=z.getAttribute("disabled")&&l(C);mxEvent.consume(C)}));return z};EditorUi.prototype.createMenuItem=function(c,f,l){var t=this.actions.get(c),z=null!=t?t.funct:null,C=this.createToolbarButton(f,mxResources.get(c)+(null!=t&&null!=t.shortcut?" ("+t.shortcut+")":""),z);null==t||l||(c=function(){t.isEnabled()?-(C.removeAttribute("disabled"),C.style.cursor="pointer"):(C.setAttribute("disabled","disabled"),C.style.cursor="default");C.style.opacity=t.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",c),t.addListener("stateChanged",c),c());return C};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight--10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,60,240,f,mxUtils.bind(this,function(z){z.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var l=this.formatWindow.window.toggleMinimized,t=240;this.formatWindow.window.toggleMinimized=function(){l.apply(this,arguments);this.minimized?(t=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",-this.div.style.left=parseInt(this.div.style.left)+t-140+"px"):(this.div.style.width=t+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-t+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(z){mxEvent.getSource(z)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?-(c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,(1200>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||708>c)&&this.formatWindow.window.toggleMinimized()):this.formatWindow.window.setVisible(!1)}};var H=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var f=this.formatWindow;null!=f?f.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):H.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=-function(c){if(this.isShapesPanelVisible()!=c){var f=EditorUi.prototype.hsplitPosition;0==f&&(f=this.defaultSidebarWidth);var l=this.hsplitPosition,t=mxUtils.bind(this,function(){this.hsplitPosition=z;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),z=c?f:0;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==z?"translateX(0)":"translateX(-100%)");0!=z&&t();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",-0==z?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform 0.3s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==z&&t()}),-300)}),10)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var T=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():T.apply(this,arguments)};var G=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){c=null!=c?c:!0;if("1"!=urlParams.embedInline){var f=this.container.clientWidth;this.container==-document.body&&(f=document.body.clientWidth||document.documentElement.clientWidth);var l=this.getDiagramContainerOffset();var t=l.x;var z=l.y;"simple"==Editor.currentTheme&&(z+=this.sketchMainMenuElt.offsetHeight);this.diagramContainer.style.top=z+"px";this.diagramContainer.style.bottom="0";"simple"==Editor.currentTheme?(this.hsplit.style.top=this.sketchMainMenuElt.offsetHeight+"px",this.sidebarContainer.style.top=this.hsplit.style.top,this.formatContainer.style.top=this.hsplit.style.top,f=Math.max(0,-Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.formatWidth,Math.min(this.hsplitPosition,f-this.splitSize-40))),this.sidebarContainer.style.width=f+"px",this.diagramContainer.style.left=f+t+"px",this.tabContainer.style.left=f+"px",this.tabContainer.style.right=this.formatWidth+1+"px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",this.hsplit.style.left=f+"px",this.diagramContainer.style.right=this.formatWidth+"px",-this.formatContainer.style.width=this.formatWidth+"px",this.hsplit.style.bottom=this.tabContainer.offsetHeight+"px",this.diagramContainer.style.bottom=this.hsplit.style.bottom,this.checkTabScrollerOverflow()):(this.diagramContainer.style.left=l.x+"px",this.diagramContainer.style.right="0")}c&&this.editor.graph.sizeDidChange()}else G.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var f=mxUtils.bind(this,function(t){t=this.createMenu(t,null,"geTitle");t.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";-c.appendChild(t);return t});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))f=document.createElement("div"),f.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;",f.className="geTitle",mxUtils.write(f,mxResources.get("newLibrary")),c.appendChild(f),mxEvent.addListener(f,-"click",this.actions.get("newLibrary").funct),f=f.cloneNode(!1),f.style.left="50%",f.style.borderLeftStyle="solid",mxUtils.write(f,mxResources.get("openLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("openLibrary").funct);else{var l=f("newLibrary");l.style.fontSize="11px";l.style.left="0";l=f("openLibraryFrom");l.style.borderLeftStyle="solid";l.style.fontSize="11px";l.style.left="50%"}c.appendChild(this.sidebarContainer);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=-function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),l="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),l&&"1"!=urlParams.embedInline?66:10,l&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,c-6,f-6,mxUtils.bind(this,function(t){this.createShapesPanel(t)}));-this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(c){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());-this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setAndPersistDarkMode=function(c){var f=c;"auto"==c&&(f=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(f);mxSettings.settings.darkMode=c;mxSettings.save();c=mxSettings.getUi();null==urlParams.ui&&"dark"==c&&this.setCurrentTheme("kennedy",!0)};EditorUi.prototype.setAndPersistLanguage=function(c){mxSettings.setLanguage(c);mxSettings.save();mxClient.language=c;mxResources.loadDefaultBundle=-!1;mxResources.add(RESOURCE_BASE)};EditorUi.prototype.setAndPersistHighContrast=function(c){this.setHighContrast(c);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=c,mxSettings.save())};EditorUi.prototype.isHighContrast=function(){var c=document.getElementById("high-contrast-stylesheet");return null!=c&&window.matchMedia?(c=c.getAttribute("media"),"all"==c||"not all"!=c&&window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(c){var f=document.getElementById("high-contrast-stylesheet");-if(null!=f&&window.matchMedia){var l=window.matchMedia("(forced-colors: active)").matches,t=f.getAttribute("media");(t="all"==t||"not all"!=t&&l)&&!c?f.setAttribute("media",l?"not all":"(forced-colors: active)"):!t&&c&&f.setAttribute("media",l?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(c){var f=this.getDiagramContainerOffset();mxSettings.setRulerOn(c);mxSettings.save();c||null==this.ruler?c&&-null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.refresh();this.fireEvent(new mxEventObject("rulerVisibleChanged"));c=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=c.x-f.x;this.diagramContainer.scrollTop+=c.x-f.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=window.matchMedia};EditorUi.prototype.isAutoDarkMode=function(c){return!c&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&-"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=function(c){Editor.darkMode=c;c=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container;mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff";null!=c&&(Editor.isDarkMode()?(c.classList.add("geDarkMode"),c.style.colorScheme="dark"):(c.classList.remove("geDarkMode"),c.style.colorScheme="light"));null!=this.ruler&&this.ruler.updateStyle();this.fireEvent(new mxEventObject("darkModeChanged"))};-EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,f){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,this.sidebar.refresh(),Editor.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=-function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",l.style.left=-"10px",l.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width=-"",this.diagramContainer.style.height="");else{var z=this.diagramContainer.getAttribute("data-bounds");if(null!=z){this.diagramContainer.removeAttribute("data-bounds");t.getGraphBounds();var C=z.split(" ");t=mxUtils.getDocumentSize();this.diagramContainer.style.top=C[0];this.diagramContainer.style.left=C[1];z=parseInt(C[2]);C=parseInt(C[3]);z=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,z):z,t.width-80);C=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,C):C,t.height--80);this.diagramContainer.style.width=z+"px";this.diagramContainer.style.height=C+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}f.style.left=this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=-this.diagramContainer.offsetTop+"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=f.style.top;c.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+-this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;f.style.visibility="";c.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(c){Editor.sketchMode!=c&&(Editor.sketchMode=c,this.updateDefaultStyles())};-EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);c.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.vertexFontSize=16,c.edgeFontSize=c.vertexFontSize-4):"sketch"==Editor.currentTheme?(c.vertexFontSize=20,c.edgeFontSize=c.vertexFontSize--4):(c.vertexFontSize=Graph.prototype.vertexFontSize,c.edgeFontSize=Graph.prototype.edgeFontSize),c.defaultEdgeStyle.fontSize=c.edgeFontSize;if(null==Editor.config||null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.endSize="8",c.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved=-"1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize="auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize="14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==Editor.config||null==Editor.config.defaultFonts){if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=-urlParams.embedInline||Editor.sketchMode)c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(c.defaultVertexStyle.sketch="1",c.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultVertexStyle.hachureGap="4",c.defaultEdgeStyle.sketch="1",-c.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var f=Graph.prototype.getLinkTitle.apply(this,-arguments);if(Graph.isPageLink(c)){var l=c.indexOf(",");0<l&&(f=this.getPageById(c.substring(l+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(f=this.getCustomLinkTitle(c));return f};EditorUi.prototype.getCustomLinkTitle=function(c){var f=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var l=JSON.parse(c.substring(17));null!=l&&null!=l.title&&(f=l.title)}catch(t){}return f};EditorUi.prototype.handleCustomLink=function(c,f){if(Graph.isPageLink(c))if(f=-c.indexOf(","),c=this.getPageById(c.substring(f+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(c,f)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var c=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(f){f.key==mxSettings.key&&-(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(f,l){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));-this.addListener("copyConnectChanged",mxUtils.bind(this,function(f,l){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(f,l){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=mxSettings.getGridColor(!1);c.view.gridColor="light-dark("+-c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(f,l){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(f,l){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||-this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(f,l){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",-mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,f,l){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,-function(t,z){try{this.spinner.stop();var C=this.createImageDataUri(t,f,"png"),F=parseInt(z.getAttribute("width")),N=parseInt(z.getAttribute("height"));this.writeImageToClipboard(C,F,N,mxUtils.bind(this,function(K){this.handleError(K)}))}catch(K){this.handleError(K)}}),null,null,null,mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)}),null,null,null!=l?l:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?-c:null)}catch(t){this.handleError(t)}};EditorUi.prototype.copyCells=function(c,f){var l=this.editor.graph;if(l.isSelectionEmpty())c.innerText="";else{var t=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),z=mxUtils.getXml(l.encodeCells(t));mxUtils.setTextContent(c,encodeURIComponent(z));f?(l.removeCells(t,!1),l.lastPasteXml=null):(l.lastPasteXml=z,l.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var f=-this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(c)),navigator.clipboard.writeText(f))}return c};EditorUi.prototype.pasteXml=function(c,f,l,t,z){z=null!=z?z:!0;var C=this.editor.graph,F=null;C.lastPasteXml==c?C.pasteCounter++:(C.lastPasteXml=c,C.pasteCounter=0);var N=C.pasteCounter*C.gridSize;if(l||this.isCompatibleString(c))F=this.importXml(c,N,N),C.setSelectionCells(F);else if(f&&1==-C.getSelectionCount()){z=C.getStartEditingCell(C.getSelectionCell(),t);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==C.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE])C.setCellStyles(mxConstants.STYLE_IMAGE,c,[z]);else{C.model.beginUpdate();try{C.labelChanged(z,c),Graph.isLink(c)&&C.setLinkForCell(z,c)}finally{C.model.endUpdate()}}C.setSelectionCell(z)}else F=C.getInsertPoint(),C.isMouseInsertPoint()&&(N=0,C.lastPasteXml==c&&0<C.pasteCounter&&C.pasteCounter--),F=this.insertTextAt(c,F.x+N,-F.y+N,z),C.setSelectionCells(F);C.isSelectionEmpty()||(C.scrollCellToVisible(C.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(C.view.getState(C.getSelectionCell())));return F};EditorUi.prototype.pasteCells=function(c,f,l,t){if(!mxEvent.isConsumed(c)){var z=f,C=!1;if(l&&null!=c.clipboardData&&c.clipboardData.getData){var F=c.clipboardData.getData("text/plain"),N=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var K=decodeURIComponent(F);this.isCompatibleString(K)&&-(N=!0,F=K)}catch(ba){}N=N?null:c.clipboardData.getData("text/html");null!=N&&0<N.length?(z=this.parseHtmlData(N),C="text/plain"!=z.getAttribute("data-type")):null!=F&&0<F.length&&(z=document.createElement("div"),mxUtils.setTextContent(z,N))}F=z.getElementsByTagName("span");if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))l=F[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(ba){var ha=-this.editor.graph;ha.lastPasteXml==ba?ha.pasteCounter++:(ha.lastPasteXml=ba,ha.pasteCounter=0);var la=ha.pasteCounter*ha.gridSize;ha.setSelectionCells(this.importXml(ba,la,la));ha.scrollCellToVisible(ha.getSelectionCell())}),mxUtils.bind(this,function(ba){this.handleError(ba)})),mxEvent.consume(c));else{var J=!1,da="";da=C?null!=z.textContent&&"<mxfile"==z.textContent.substring(0,7)&&"</mxfile>"==z.textContent.substring(z.textContent.length-9)||"<mxGraphModel"==z.textContent.substring(0,13)&&"</mxGraphModel>"==-z.textContent.substring(z.textContent.length-15)?z.textContent.replace(/\u00a0/g," "):z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText);try{var ea=da.lastIndexOf("%3E");0<=ea&&ea<da.length-3&&(da=da.substring(0,ea+3))}catch(ba){}try{F=z.getElementsByTagName("span"),(K=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(da))&&(this.isCompatibleString(K)||0==K.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(J=!0,da=-K)}catch(ba){}try{if(null!=da&&0<da.length){if(0==da.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ca=mxUtils.bind(this,function(){try{da=(new MiroImporter).importMiroJson(JSON.parse(da)),this.pasteXml(da,t,J,c)}catch(ba){console.log("Miro import error:",ba)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ca):ca()}else this.pasteXml(da,t,J,c,C);try{mxEvent.consume(c)}catch(ba){}}else if(!l){var W=this.editor.graph;W.lastPasteXml=null;W.pasteCounter=-0}}catch(ba){this.handleError(ba)}}}f.innerHTML=" "};EditorUi.prototype.showPrintDialog=function(c,f){var l=320;this.editor.graph.isEnabled()&&(l+=40);null!=this.pages&&1<this.pages.length&&(l+=40,this.editor.graph.isEnabled()||(l+=10));null==f||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(l+=20);this.showDialog((new PrintDialog(this,c,f)).container,320,l,!0,!0)};EditorUi.prototype.print=function(c,f){var l=this.editor,t=l.graph,z=this.getPageIndex(this.currentPage),C=null!=z?z+-1:1,F=mxUtils.bind(this,function(la,Y,ma,Z){var k=la.useCssTransforms,A=la.currentTranslate,I=la.currentScale,U=la.view.translate,O=la.view.scale;la.useCssTransforms&&(la.useCssTransforms=!1,la.currentTranslate=new mxPoint(0,0),la.currentScale=1,la.view.translate=new mxPoint(0,0),la.view.scale=1);var S=la.getGraphBounds(),X=0,aa=0,ja=mxRectangle.fromRectangle(la.pageFormat),pa=f.fit||f.crop||!la.pageVisible,sa=f.scale;ja.width=Math.ceil(ja.width*la.pageScale);ja.height=Math.ceil(ja.height*la.pageScale);-var qa=1;if(f.fit){qa=f.sheetsAcross;var wa=f.sheetsDown;isNaN(sa)||(ja.width=Math.ceil(ja.width*sa),ja.height=Math.ceil(ja.height*sa));qa=Math.min(ja.height*wa/(S.height/la.view.scale),ja.width*qa/(S.width/la.view.scale))}else qa=isNaN(sa)?1:sa;qa*=1;!pa&&la.pageVisible?(sa=la.getPageLayout(),X-=sa.x*ja.width,aa-=sa.y*ja.height):pa=!0;f.crop&&(f.selection&&(S=t.getBoundingBox(t.getSelectionCells())),ja.width=(S.width+1)*qa/la.view.scale,ja.height=(S.height+1)*qa/la.view.scale);ja.width=Math.ceil(1*-ja.width);ja.height=Math.ceil(1*ja.height);Z=null!=Z?"page/id,"+Z:null;if(null==Y){Y=PrintDialog.createPrintPreview(la,qa,null,0,X,aa,pa);Y.title=this.getBaseFilename(!0);Y.pageSelector=!1;Y.mathEnabled=!1;X=f.border;isNaN(X)||(Y.pageMargin=X);f.selection&&(Y.isCellVisible=function(ra){return la.isCellSelected(ra)});var Ba=Y.writeHead;Y.writeHead=function(ra){Ba.apply(this,arguments);mxClient.IS_GC&&(ra.writeln('<style type="text/css">'),ra.writeln("@media print {"),ra.writeln(".MathJax svg { shape-rendering: crispEdges; }"),-ra.writeln("}"),ra.writeln("</style>"));null!=l.fontCss&&(ra.writeln('<style type="text/css">'),ra.writeln(mxUtils.htmlEntities(l.fontCss,!1,!1,!1)),ra.writeln("</style>"));for(var ya=la.getCustomFonts(),Ca=0;Ca<ya.length;Ca++){var Ma=ya[Ca].name,Ha=ya[Ca].url;Graph.isCssFontUrl(Ha)?ra.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Ha))+'" charset="UTF-8" type="text/css">'):(ra.writeln('<style type="text/css">'),ra.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Ma)+-'";\nsrc: url("'+mxUtils.htmlEntities(Ha)+'");\n}'),ra.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var za=Y.drawBackgroundImage;Y.drawBackgroundImage=function(ra){za.apply(this,arguments);null!=ra.node&&(EditorUi.embedSvgImages(ra.node),t.disableSvgLinks(ra.node,function(ya){ya.setAttribute("href","javascript:void(0)")}))}}var Ea=Y.addGraphFragment;Y.addGraphFragment=function(ra,ya,Ca,Ma,Ha,Aa){Ea.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:Ha.classList.add("geDisableMathJax")};-f.grid&&(Y.gridSize=la.gridSize,Y.gridSteps=la.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:la.view.gridColor);Y.open(null,null,ma,!0,Z,ja,f.selection?la.getSelectionCells():null)}else{S=la.background;if(null==S||""==S||S==mxConstants.NONE)S="#ffffff";Y.backgroundColor=S;Y.autoOrigin=pa;f.grid&&(Y.gridSize=la.gridSize,Y.gridSteps=la.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:la.view.gridColor);Y.appendGraph(la,qa,-X,aa,ma,!0,Z,ja,f.selection?la.getSelectionCells():null);ma=la.getCustomFonts();if(null!=Y.wnd)for(ja=0;ja<ma.length;ja++)X=ma[ja].name,aa=ma[ja].url,Graph.isCssFontUrl(aa)?Y.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(aa)+'" charset="UTF-8" type="text/css">'):(Y.wnd.document.writeln('<style type="text/css">'),Y.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(X)+'";\nsrc: url("'+mxUtils.htmlEntities(aa)+'");\n}'),Y.wnd.document.writeln("</style>"))}k&&-(la.useCssTransforms=k,la.currentTranslate=A,la.currentScale=I,la.view.translate=U,la.view.scale=O);return Y}),N=f.pagesFrom,K=f.pagesTo,J=!f.allPages;z=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);else{J&&(J=f.selection||N==C&&K==C);if(!J&&null!=this.pages&&this.pages.length){J=0;C=this.pages.length-1;f.allPages||(J=parseInt(N)-1,C=parseInt(K)-1);for(var da=J;da<=C;da++){var ea=this.pages[da];N=ea==this.currentPage?t:null;if(null==N){N=this.createTemporaryGraph(t.stylesheet);-N.shapeForegroundColor=t.shapeForegroundColor;N.shapeBackgroundColor=t.shapeBackgroundColor;K=!0;J=!1;var ca=null,W=null;null==ea.viewState&&null==ea.root&&this.updatePageRoot(ea);null!=ea.viewState&&(K=ea.viewState.pageVisible,J=ea.viewState.mathEnabled,ca=ea.viewState.background,W=ea.viewState.backgroundImage,N.pageFormat=ea.viewState.pageFormat,N.gridSize=ea.viewState.gridSize);null!=W&&null!=W.originalSrc&&(W=this.createImageForPageLink(W.originalSrc,ea));N.background=ca;N.backgroundImage=null!=-W?new mxImage(W.src,W.width,W.height,W.x,W.y):null;N.pageVisible=K;N.mathEnabled=J;var ba=N.getGraphBounds;N.getGraphBounds=function(){var la=ba.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var ma=this.view.translate,Z=this.view.scale;la=mxRectangle.fromRectangle(la);la.add(new mxRectangle((ma.x+Y.x)*Z,(ma.y+Y.y)*Z,Y.width*Z,Y.height*Z))}return la};var ha=N.getGlobalVariable;N.getGlobalVariable=function(la){return"page"==la?ea.getName():"pagenumber"==la?-da+1:"pagecount"==la?null!=this.pages?this.pages.length:1:ha.apply(this,arguments)};document.body.appendChild(N.container);this.updatePageRoot(ea);N.model.setRoot(ea.root)}z=F(N,z,da!=C,ea.getId());N!=t&&N.container.parentNode.removeChild(N.container)}}else z=F(t);null==z||null==z.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(z.mathEnabled&&(F=z.wnd.document,c||(z.wnd.IMMEDIATE_PRINT=!0),F.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),z.closeDocument(),-Graph.rewritePageLinks(z.wnd.document,!0),z.mathEnabled||c||PrintDialog.printPreview(z));return z}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,l=0;l<c.length;l++)mxEvent.addListener(c[l],"dragleave",function(t){null!=f&&(f.parentNode.removeChild(f),f=null);t.stopPropagation();t.preventDefault()}),mxEvent.addListener(c[l],"dragover",mxUtils.bind(this,function(t){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&-12>document.documentMode)&&(f=this.highlightElement());t.stopPropagation();t.preventDefault()})),mxEvent.addListener(c[l],"drop",mxUtils.bind(this,function(t){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<t.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(t.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(t)&&!mxEvent.isShiftDown(t)):this.openFiles(t.dataTransfer.files,!0);-else{var z=this.extractGraphModelFromEvent(t);if(null==z){var C=null!=t.dataTransfer?t.dataTransfer:t.clipboardData;null!=C&&(10==document.documentMode||11==document.documentMode?z=C.getData("Text"):(z=null,z=0<=mxUtils.indexOf(C.types,"text/uri-list")?t.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(C.types,"text/html")?C.getData("text/html"):null,null!=z&&0<z.length?(C=document.createElement("div"),C.innerHTML=Graph.sanitizeHtml(z),C=C.getElementsByTagName("img"),0<C.length&&(z=C[0].getAttribute("src"))):-0<=mxUtils.indexOf(C.types,"text/plain")&&(z=C.getData("text/plain"))),null!=z&&(Editor.isPngDataUrl(z)?(z=Editor.extractGraphModelFromPng(z),null!=z&&0<z.length&&this.openLocalFile(z,null,!0)):this.isRemoteFileFormat(z)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(z))).send(mxUtils.bind(this,function(F){200<=F.getStatus()&&299>=F.getStatus()?this.openLocalFile(F.getText(),null,!0):this.showError(mxResources.get("error"),-413==F.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(z)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(z):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(z)))))}else this.openLocalFile(z,null,!0)}t.stopPropagation();t.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var f=0,l=0;if(null==c){var t=document.body;-var z=document.documentElement;var C=(t.clientWidth||z.clientWidth)-3;t=Math.max(t.clientHeight||0,z.clientHeight)-3}else f=c.offsetTop,l=c.offsetLeft,C=c.clientWidth,t=c.clientHeight;z=document.createElement("div");z.style.zIndex=mxPopupMenu.prototype.zIndex+2;z.style.border="3px dotted rgb(254, 137, 12)";z.style.pointerEvents="none";z.style.position="absolute";z.style.top=f+"px";z.style.left=l+"px";z.style.width=Math.max(0,C-3)+"px";z.style.height=Math.max(0,t-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?-this.editor.graph.container.appendChild(z):document.body.appendChild(z);return z};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var f=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=f){var l=new mxCodec(f.ownerDocument),t=new mxGraphModel;l.decode(f,t);f=t.getChildAt(t.getRoot(),0);for(l=0;l<t.getChildCount(f);l++)c.push(t.getChildAt(f,l))}return c};EditorUi.prototype.openFileHandle=function(c,f,l,t,z,C){if(null!=f&&0<f.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(f)||-/(\.pdf)$/i.test(f))f=f.substring(0,f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var F=mxUtils.bind(this,function(K){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==K.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,K,f)),this.showSidebar()}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(K,-f,t)});if(EditorUi.isVisioFilename(f))this.importVisio(l,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(K){4==K.readyState&&(this.spinner.stop(),-200<=K.status&&299>=K.status?F(K.responseText):this.handleError({message:mxResources.get(413==K.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(K){this.spinner.stop();this.openLocalFile(K,f,t)}),mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();-null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,c,l.name)),this.showSidebar()}catch(K){this.handleError(K,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,f,t)}));else{if("image/png"==l.type.substring(0,9))c=this.extractGraphModelFromPng(c);-else if("application/pdf"==l.type){var N=Editor.extractGraphModelFromPdf(c);null!=N&&(z=null,t=!0,c=N)}this.spinner.stop();this.openLocalFile(c,f,t,z,null!=z?l:null,C)}}};EditorUi.prototype.openFiles=function(c,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=0;l<c.length;l++)mxUtils.bind(this,function(t){var z=new FileReader;z.onload=mxUtils.bind(this,function(C){try{this.openFileHandle(C.target.result,t.name,t,f)}catch(F){this.handleError(F)}});z.onerror=mxUtils.bind(this,-function(C){this.spinner.stop();this.handleError(C);window.openFile=null});"image"!==t.type.substring(0,5)&&"application/pdf"!==t.type||"image/svg"===t.type.substring(0,9)?z.readAsText(t):z.readAsDataURL(t)})(c[l])};EditorUi.prototype.openLocalFile=function(c,f,l,t,z,C){var F=this.getCurrentFile(),N=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var K=mxUtils.parseXml(c);null!=K&&(this.editor.setGraphXml(K.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,-c,f||this.defaultFilename,l,t,z,C))});if(null!=c&&0<c.length)null==F||!F.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)?N():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)&&null!=F&&F.isModified()?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,f),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=-F&&F.isModified()?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):N()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);f=[];for(var l in c)f.push(l);return f};EditorUi.prototype.addBasenamesForCell=-function(c,f){function l(F){if(null!=F){var N=F.lastIndexOf(".");0<N&&(F=F.substring(N+1,F.length));null==f[F]&&(f[F]=!0)}}var t=this.editor.graph,z=t.getCellStyle(c);l(mxStencilRegistry.getBasenameForStencil(z[mxConstants.STYLE_SHAPE]));t.model.isEdge(c)&&(l(mxMarker.getPackageForType(z[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(z[mxConstants.STYLE_ENDARROW])));z=t.model.getChildCount(c);for(var C=0;C<z;C++)this.addBasenamesForCell(t.model.getChildAt(c,C),f)};EditorUi.prototype.setGraphEnabled=-function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=c&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme?"":"none";this.editor.graph.setEnabled(c);null!=this.tabContainer&&(this.tabContainer.style.visibility=c&&0<parseInt(this.tabContainer.style.height)?"":"hidden");null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=c?"":"hidden",this.ruler.vRuler.container.style.visibility=-c?"":"hidden");c||this.hideWindows()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(f,l,t,z){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;-this.setFileData(f);if(z)try{var C=this.editor.graph;C.setGridEnabled(!1);C.pageVisible=!1;var F=C.model.cells,N;for(N in F){var K=F[N];null!=K&&null!=K.style&&(K.style+=";sketch=1;"+(-1==K.style.indexOf("fontFamily=")||-1<K.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(J){console.log(J)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();-this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=t?t:!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(c,-f){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();f(l)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;-f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var l=window.opener||window.parent;if(this.editor.modified){var t=f.background;if(null==t||t==mxConstants.NONE)t=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(z){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(z)}),"*")}),null,null,!0,t,1,this.embedExportBorder,null,this.embedExportTheme)}else c||-l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(z){c||this.handleError(z)}};EditorUi.prototype.installMessageHandler=function(c){var f=null,l=!1,t=!1,z=null,C=mxUtils.bind(this,function(K,J){this.editor.modified&&-"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,C);mxEvent.addListener(window,"message",mxUtils.bind(this,function(K){if(K.source==(window.opener||window.parent)){var J=K.data,da=null,ea=mxUtils.bind(this,function(ra){if(null!=ra&&"function"===typeof ra.charAt&&"<"!=ra.charAt(0))try{Editor.isPngDataUrl(ra)?ra=Editor.extractGraphModelFromPng(ra):-"data:image/svg+xml;base64,"==ra.substring(0,26)?ra=atob(ra.substring(26)):"data:image/svg+xml;utf8,"==ra.substring(0,24)&&(ra=ra.substring(24)),null!=ra&&(""==ra.trim()?ra=null:"%"==ra.charAt(0)?ra=decodeURIComponent(ra):"<"!=ra.charAt(0)&&(ra=Graph.decompress(ra)))}catch(ya){}return ra});if("json"==urlParams.proto){var ca=!1;try{J=JSON.parse(J),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[K],"data",[J])}catch(ra){J=null}try{if(null==J)return;if("dialog"==J.action){this.showError(null!=-J.titleKey?mxResources.get(J.titleKey):J.title,null!=J.messageKey?mxResources.get(J.messageKey):mxUtils.htmlEntities(J.message),null!=J.buttonKey?mxResources.get(J.buttonKey):J.button);null!=J.modified&&(this.editor.modified=J.modified);return}if("layout"==J.action){this.executeLayouts(this.editor.graph.createLayouts(J.layouts));return}if("prompt"==J.action){this.spinner.stop();var W=new FilenameDialog(this,J.defaultValue||"",null!=J.okKey?mxResources.get(J.okKey):J.ok,function(ra){null!=ra?F.postMessage(JSON.stringify({event:"prompt",-value:ra,message:J}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")},null!=J.titleKey?mxResources.get(J.titleKey):J.title,null,null,null,null,function(){F.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")});this.showDialog(W.container,300,80,!0,!1);W.init();return}if("draft"==J.action){var ba=ea(J.xml);this.spinner.stop();W=new DraftDialog(this,mxResources.get("draftFound",[J.name||this.defaultFilename]),ba,mxUtils.bind(this,function(){this.hideDialog();-F.postMessage(JSON.stringify({event:"draft",result:"edit",message:J}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"discard",message:J}),"*")}),J.editKey?mxResources.get(J.editKey):null,J.discardKey?mxResources.get(J.discardKey):null,J.ignore?mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:J}),"*")}):null);this.showDialog(W.container,640,480,!0,!1,mxUtils.bind(this,function(ra){ra&&-this.actions.get("exit").funct()}));try{W.init()}catch(ra){F.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:J}),"*")}return}if("template"==J.action){this.spinner.stop();var ha=1==J.enableRecent,la=1==J.enableSearch,Y=1==J.enableCustomTemp;W=new NewDialog(this,!1,J.templatesOnly?!1:null!=J.callback,mxUtils.bind(this,function(ra,ya,Ca,Ma){ra=ra||this.emptyDiagramXml;null!=J.callback?F.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:ya,tempUrl:Ca,-libs:Ma,builtIn:!0,message:J}),"*"):(c(ra,K,ra!=this.emptyDiagramXml,J.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ha?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,"Network Error!")})}):null,la?mxUtils.bind(this,function(ra,ya){this.remoteInvoke("searchDiagrams",[ra,null],null,ya,function(){ya(null,"Network Error!")})}):null,mxUtils.bind(this,function(ra,ya,Ca){F.postMessage(JSON.stringify({event:"template",-docUrl:ra,info:ya,name:Ca}),"*")}),null,null,Y?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==J.withoutType);this.showDialog(W.container,620,460,!0,!1,mxUtils.bind(this,function(ra){null!=this.sidebar&&this.sidebar.hideTooltip();ra&&this.actions.get("exit").funct()}));W.init();return}if("textContent"==J.action){var ma=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:ma,message:J}),"*");return}if("status"==-J.action){null!=J.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(J.messageKey))):null!=J.message&&this.editor.setStatus(mxUtils.htmlEntities(J.message));null!=J.modified&&(this.editor.modified=J.modified);return}if("spinner"==J.action){var Z=null!=J.messageKey?mxResources.get(J.messageKey):J.message;null==J.show||J.show?this.spinner.spin(document.body,Z):this.spinner.stop();return}if("exit"==J.action){this.actions.get("exit").funct();return}if("viewport"==J.action){null!=J.viewport&&-(this.embedViewport=J.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==J.action){W=null;try{var k=this.diagramContainer.getAttribute("data-scrollState");null!=k&&(this.diagramContainer.removeAttribute("data-scrollState"),W=JSON.parse(k))}catch(ra){}Editor.inlineFullscreen=J.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=W&&this.restoreScrollState(W);return}if("snapshot"==J.action){this.sendEmbeddedSvgExport(!0);-return}if("export"==J.action){if("png"==J.format||"xmlpng"==J.format){if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){var A=null!=J.xml?J.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,U=mxUtils.bind(this,function(ra,ya){if(J.withSvg)J.withSvg=!1,this.getEmbeddedSvg(A,this.editor.graph,null,!0,function(Ma){U(ra,Ma)},null,null,J.embedImages,this.editor.graph.background,J.scale,J.border,J.shadow,-"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var Ca=this.createLoadMessage("export");Ca.format=J.format;Ca.message=J;Ca.data=ra;Ca.svg=ya;Ca.xml=A;F.postMessage(JSON.stringify(Ca),"*")}}),O=mxUtils.bind(this,function(ra){null==ra&&(ra=Editor.blankImage);"xmlpng"==J.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(A)));I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);U(ra)}),S=J.pageId||(null!=this.pages?J.currentPage?this.currentPage.getId():-this.pages[0].getId():null);if(this.isExportToCanvas()){var X=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=S){var ra=I.getGlobalVariable;I=this.createTemporaryGraph(I.getStylesheet());for(var ya,Ca=0;Ca<this.pages.length;Ca++)if(this.pages[Ca].getId()==S){ya=this.updatePageRoot(this.pages[Ca]);break}null==ya&&(ya=this.currentPage);I.getGlobalVariable=function(Ra){return"page"==Ra?ya.getName():"pagenumber"==Ra?1:ra.apply(this,arguments)};document.body.appendChild(I.container);-I.model.setRoot(ya.root)}if(null!=J.layerIds){var Ma=I.model,Ha=Ma.getChildCells(Ma.getRoot()),Aa={};for(Ca=0;Ca<J.layerIds.length;Ca++)Aa[J.layerIds[Ca]]=!0;for(Ca=0;Ca<Ha.length;Ca++)Ma.setVisible(Ha[Ca],Aa[Ha[Ca].id]||!1)}Ca=null;J.keepTheme&&(Ca=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ra){O(Ra.toDataURL("image/png"))}),J.width,null,J.background,mxUtils.bind(this,function(){O(null)}),null,null,J.scale,J.transparent,J.shadow,null,I,J.border,null,-J.grid,Ca)});null!=J.xml&&0<J.xml.length&&(l=!0,this.setFileData(A),l=!1);X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==J.format?"1":"0")+(null!=S?"&pageId="+S:"")+(null!=J.layerIds&&0<J.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:J.layerIds})):"")+(null!=J.scale?"&scale="+J.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?U("data:image/png;base64,"+ra.getText()):O(null)}),-mxUtils.bind(this,function(){O(null)}))}}else if(X=mxUtils.bind(this,function(){var ra=this.createLoadMessage("export");ra.message=J;if("html2"==J.format||"html"==J.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ya=this.getXmlFileData();ra.xml=mxUtils.getXml(ya);ra.data=this.getFileData(null,null,!0,null,null,null,ya);ra.format=J.format}else if("html"==J.format)ya=this.editor.getGraphXml(),ra.data=this.getHtml(ya,this.editor.graph),ra.xml=mxUtils.getXml(ya),ra.format=J.format;-else{mxSvgCanvas2D.prototype.foAltText=null;ya=null!=J.background?J.background:this.editor.graph.background;ya==mxConstants.NONE&&(ya=null);ra.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ra.format="svg";var Ca=mxUtils.bind(this,function(Ha){this.editor.graph.setEnabled(!0);this.spinner.stop();ra.data=Editor.createSvgDataUri(Ha);F.postMessage(JSON.stringify(ra),"*")}),Ma="auto";J.keepTheme&&(Ma=Editor.isDarkMode()?"dark":"light");null!=J.theme&&(Ma=J.theme);if("xmlsvg"==J.format){if(null==-J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){Ma=null;if(this.isAutoDarkMode()||Editor.isDarkMode())Ma="auto";null!=J.theme&&(Ma=J.theme);this.getEmbeddedSvg(ra.xml,this.editor.graph,null,!0,Ca,null,null,J.embedImages,ya,J.scale,J.border,J.shadow,Ma)}}else if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin))this.editor.graph.setEnabled(!1),ya=this.editor.graph.getSvg(ya,-J.scale,J.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||J.shadow,null,Ma),(this.editor.graph.shadowVisible||J.shadow)&&this.editor.graph.addSvgShadow(ya),this.embedFonts(ya,mxUtils.bind(this,function(Ha){J.embedImages||null==J.embedImages?this.editor.convertImages(Ha,mxUtils.bind(this,function(Aa){Ca(mxUtils.getXml(Aa))})):Ca(mxUtils.getXml(Ha))}));return}F.postMessage(JSON.stringify(ra),"*")}),null!=J.xml&&0<J.xml.length){if(this.editor.graph.mathEnabled){var aa=Editor.onMathJaxDone;-Editor.onMathJaxDone=function(){aa.apply(this,arguments);X()}}l=!0;this.setFileData(J.xml);l=!1;this.editor.graph.mathEnabled||X()}else X();return}if("load"==J.action){ca=J.toSketch;t=1==J.autosave;this.hideDialog();null!=J.modified&&null==urlParams.modified&&(urlParams.modified=J.modified);null!=J.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=J.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||-this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=J.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=J.noSaveBtn);if(null!=J.rough){var ja=Editor.sketchMode;this.doSetSketchMode(J.rough);ja!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=J.dark&&this.setDarkMode(J.dark);null!=J.border&&(this.embedExportBorder=-J.border);null!=J.theme&&(this.embedExportTheme=J.theme);null!=J.background&&(this.embedExportBackground=J.background);null!=J.viewport&&(this.embedViewport=J.viewport);this.embedExitPoint=null;if(null!=J.rect){var pa=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,J.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,J.rect.top)+"px";this.minInlineWidth=J.minWidth;this.minInlineHeight=J.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom=-"";this.diagramContainer.style.right="";var sa=J.maxFitScale,qa=J.rect.width+2*pa,wa=J.rect.height+2*pa;da=mxUtils.bind(this,function(){var ra=mxUtils.getDocumentSize();qa=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,qa):qa,ra.width-80);ra=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,wa):wa,ra.height-80);this.diagramContainer.style.width=qa+"px";this.diagramContainer.style.height=ra+"px";var ya=this.editor.graph;ra=ya.maxFitScale;ya.maxFitScale=sa;ya.fit(2*-pa,null,null,null,null,null,wa);this.setPageVisible(!1);if(null!=this.minInlineWidth&&ya.getGraphBounds().width<this.minInlineWidth){var Ca=ya.container.scrollTop;this.resetScrollbars();ya.container.scrollTop=Ca}ya.maxFitScale=ra;ya.container.scrollTop-=pa;ya.container.scrollLeft-=pa;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[J]));ya.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&-(this.formatWindow.window.div.style.top=ya.container.style.top);var Ma=ya.getGraphBounds();ya.container.clientWidth>Ma.width+2*pa&&(ya.container.scrollLeft=Ma.x+(Ma.width+pa-ya.container.clientWidth)/2)}),10)})}null!=J.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=J.noExitBtn);null!=J.title&&null!=this.buttonContainer&&(ba=this.createStatusDiv(""),mxUtils.write(ba,J.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(ba),-this.embedFilenameSpan=ba);try{J.libs&&this.sidebar.showEntries(J.libs)}catch(ra){}J=null!=J.xmlpng?this.extractGraphModelFromPng(J.xmlpng):null!=J.descriptor?J.descriptor:J.xml}else{if("merge"==J.action){var Ba=this.getCurrentFile();null!=Ba&&(ba=ea(J.xml),null!=ba&&""!=ba&&Ba.mergeFile(new LocalFile(this,ba),function(){F.postMessage(JSON.stringify({event:"merge",message:J}),"*")},function(ra){F.postMessage(JSON.stringify({event:"merge",message:J,error:ra}),"*")}))}else"remoteInvokeReady"==J.action?-this.handleRemoteInvokeReady(F):"remoteInvoke"==J.action?this.handleRemoteInvoke(J,K.origin):"remoteInvokeResponse"==J.action?this.handleRemoteInvokeResponse(J):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(J)}),"*");return}}catch(ra){this.handleError(ra)}}var za=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ea=mxUtils.bind(this,function(ra,ya){l=!0;try{c(ra,-ya,null,ca)}catch(Ca){this.handleError(Ca)}l=!1;null!=urlParams.modified&&this.editor.setStatus("");z=za();t&&null==f&&(f=mxUtils.bind(this,function(Ca,Ma){Ca=za();Ca==z||l||(Ma=this.createLoadMessage("autosave"),Ma.xml=Ca,(window.opener||window.parent).postMessage(JSON.stringify(Ma),"*"));z=Ca}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",-f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ya=this.createLoadMessage("load"),ya.xml=ra,F.postMessage(JSON.stringify(ya),"*");null!=da&&da()});null!=J&&"function"===typeof J.substring&&"data:application/vnd.visio;base64,"==-J.substring(0,34)?(ea="0M8R4KGxGuE"==J.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(J.substring(J.indexOf(",")+1)),function(ra){Ea(ra,K)},mxUtils.bind(this,function(ra){this.handleError(ra)}),ea)):null!=J&&"function"===typeof J.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(J,mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&-299>=ra.status&&"<mxGraphModel"==ra.responseText.substring(0,13)?Ea(ra.responseText,K):this.handleError({message:413==ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=J&&"function"===typeof J.substring&&this.isLucidChartData(J)?this.convertLucidChart(J,mxUtils.bind(this,function(ra){Ea(ra)}),mxUtils.bind(this,function(ra){this.handleError(ra)})):null==J||"object"!==typeof J||null==J.format||null==J.data&&null==J.url?(J=ea(J),Ea(J,K)):this.loadDescriptor(J,-mxUtils.bind(this,function(ra){Ea(za(),K)}),mxUtils.bind(this,function(ra){this.handleError(ra,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;C="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(C,"*");if("json"==urlParams.proto){var N=this.editor.graph.openLink;this.editor.graph.openLink=function(K,J,da){N.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:K,target:J,allowOpener:da}),"*")}}};EditorUi.prototype.createEmbedButton=-function(c,f,l,t){var z="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,C=document.createElement("button");C.setAttribute("title",c+(null!=l?" ("+l+")":""));C.style.marginLeft="6px";mxUtils.write(C,c);z?(C.className=t?"gePrimaryBtn":"",C.style.marginLeft="8px",C.style.padding="6px"):C.className="geBigButton"+(t?"":" geBigStandardButton");mxEvent.addListener(C,"click",f);return C};EditorUi.prototype.addEmbedButtons=function(){var c=document.createElement("div");-c.style.display="inline-flex";c.style.alignItems="center";c.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&(c.style.marginRight="66px",c.style.order="1","atlas"==Editor.currentTheme&&(c.style.marginTop="2px"));document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),-this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(c.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&c.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?-mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||null==this.buttonContainer?null!=this.menubar&&(this.toolbar.container.style.paddingLeft="6px",this.toolbar.container.appendChild(c),this.toolbar.staticElements.push(c)):(this.buttonContainer.appendChild(c),this.editor.fireEvent(new mxEventObject("statusChanged")))};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&-(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var f=-new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(l){if(0<l.length)try{var t=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(t));this.customLayoutConfig=t;this.hideDialog()}catch(z){this.handleError(z)}}),null,null,null,null,mxUtils.bind(this,function(l,t){var z=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var C=t.value;t.value=JSON.stringify(JSON.parse(C));t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?-t.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));t.value=C}catch(F){this.handleError(F)}}));z.setAttribute("title","copy");z.className="geBtn";l.appendChild(z)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var l=mxUtils.bind(this,function(){this.loadingOrgChart=-!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),t=mxUtils.bind(this,function(z){this.loadingOrgChart=!1;f.clear()&&this.handleError(z)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",-function(){mxscript("js/orgchart/mxOrgChartLayout.js",l,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,t))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var l=c.split("\n"),t=[],z=[],C=[],F={};if(0<l.length){var N={},K=this.editor.graph,J=null,da=null,ea=null,ca=-null,W=null,ba=null,ha=null,la="whiteSpace=wrap;html=1;",Y=null,ma=null,Z="",k="auto",A="auto",I=!1,U=null,O=null,S=40,X=40,aa=100,ja=0,pa=mxUtils.bind(this,function(){null!=f?f(ua):(K.setSelectionCells(ua),K.scrollCellToVisible(K.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),sa=K.getFreeInsertPoint(),qa=sa.x,wa=sa.y;sa=wa;var Ba=null,za="auto";ma=null;for(var Ea=[],ra=null,ya=null,Ca=0;Ca<l.length&&"#"==l[Ca].charAt(0);){c=-l[Ca].replace(/\r$/,"");for(Ca++;Ca<l.length&&"\\"==c.charAt(c.length-1)&&"#"==l[Ca].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(l[Ca].substring(1)),Ca++;if("#"!=c.charAt(1)){var Ma=c.indexOf(":");if(0<Ma){var Ha=mxUtils.trim(c.substring(1,Ma)),Aa=mxUtils.trim(c.substring(Ma+1));"label"==Ha?Ba=Graph.sanitizeHtml(Aa):"labelname"==Ha&&0<Aa.length&&"-"!=Aa?W=Aa:"labels"==Ha&&0<Aa.length&&"-"!=Aa?ha=JSON.parse(Aa):"style"==Ha?da=Aa:"parentstyle"==Ha?la=Aa:"unknownStyle"==Ha&&"-"!=Aa?ba=Aa:"stylename"==-Ha&&0<Aa.length&&"-"!=Aa?ca=Aa:"styles"==Ha&&0<Aa.length&&"-"!=Aa?ea=JSON.parse(Aa):"vars"==Ha&&0<Aa.length&&"-"!=Aa?J=JSON.parse(Aa):"identity"==Ha&&0<Aa.length&&"-"!=Aa?Y=Aa:"parent"==Ha&&0<Aa.length&&"-"!=Aa?ma=Aa:"namespace"==Ha&&0<Aa.length&&"-"!=Aa?Z=Aa:"width"==Ha?k=Aa:"height"==Ha?A=Aa:"collapsed"==Ha&&"-"!=Aa?I="true"==Aa:"left"==Ha&&0<Aa.length?U=Aa:"top"==Ha&&0<Aa.length?O=Aa:"ignore"==Ha?ya=Aa.split(","):"connect"==Ha?Ea.push(JSON.parse(Aa)):"link"==Ha?ra=Aa:"padding"==Ha?ja=parseFloat(Aa):-"edgespacing"==Ha?S=parseFloat(Aa):"nodespacing"==Ha?X=parseFloat(Aa):"levelspacing"==Ha?aa=parseFloat(Aa):"layout"==Ha&&(za=Aa)}}}if(null==l[Ca])throw Error(mxResources.get("invalidOrMissingFile"));var Ra=this.editor.csvToArray(l[Ca].replace(/\r$/,""));Ma=c=null;Ha=[];for(Aa=0;Aa<Ra.length;Aa++)Y==Ra[Aa]&&(c=Aa),ma==Ra[Aa]&&(Ma=Aa),Ha.push(mxUtils.trim(Ra[Aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Ha[0]+"%");if(null!=Ea)for(var Za=0;Za<Ea.length;Za++)null==-N[Ea[Za].to]&&(N[Ea[Za].to]={});Y=[];for(Aa=Ca+1;Aa<l.length;Aa++){var La=this.editor.csvToArray(l[Aa].replace(/\r$/,""));if(null==La){var $a=40<l[Aa].length?l[Aa].substring(0,40)+"...":l[Aa];throw Error($a+" ("+Aa+"):\n"+mxResources.get("containsValidationErrors"));}0<La.length&&Y.push(La)}K.model.beginUpdate();try{for(Aa=0;Aa<Y.length;Aa++){La=Y[Aa];var Da=null,x=null!=c?Z+La[c]:null;l=!1;null!=x&&(Da=K.model.getCell(x),l=null==Da||0<=mxUtils.indexOf(t,Da));var M=new mxCell(Ba,new mxGeometry(qa,-sa,0,0),da||"whiteSpace=wrap;html=1;");M.collapsed=I;M.vertex=!0;M.id=x;null==Da||l||K.model.setCollapsed(Da,I);for(var Q=0;Q<La.length;Q++)K.setAttributeForCell(M,Ha[Q],La[Q]),null==Da||l||K.setAttributeForCell(Da,Ha[Q],La[Q]);if(null!=W&&null!=ha){var V=ha[M.getAttribute(W)];null!=V&&(K.labelChanged(M,V),null==Da||l||K.cellLabelChanged(Da,V))}if(null!=ca&&null!=ea){var ia=ea[M.getAttribute(ca)];null!=ia&&(M.style=ia)}K.setAttributeForCell(M,"placeholders","1");M.style=K.replacePlaceholders(M,M.style,-J);null==Da||l?K.fireEvent(new mxEventObject("cellsInserted","cells",[M])):(K.model.setStyle(Da,M.style),0>mxUtils.indexOf(C,Da)&&C.push(Da),K.fireEvent(new mxEventObject("cellsInserted","cells",[Da])));l=null!=Da;Da=M;if(!l)for(Za=0;Za<Ea.length;Za++)N[Ea[Za].to][Da.getAttribute(Ea[Za].to)]=Da;null!=ra&&"link"!=ra&&(K.setLinkForCell(Da,Da.getAttribute(ra)),K.setAttributeForCell(Da,ra,null));var ka=this.editor.graph.getPreferredSizeForCell(Da);ma=null!=Ma?K.model.getCell(Z+La[Ma]):null;if(Da.vertex){$a=-null!=ma?0:qa;Ca=null!=ma?0:wa;null!=U&&null!=Da.getAttribute(U)&&(Da.geometry.x=$a+parseFloat(Da.getAttribute(U)));null!=O&&null!=Da.getAttribute(O)&&(Da.geometry.y=Ca+parseFloat(Da.getAttribute(O)));var oa="@"==k.charAt(0)?Da.getAttribute(k.substring(1)):null;Da.geometry.width=null!=oa&&"auto"!=oa?parseFloat(Da.getAttribute(k.substring(1))):"auto"==k||"auto"==oa?ka.width+ja:parseFloat(k);var xa="@"==A.charAt(0)?Da.getAttribute(A.substring(1)):null;Da.geometry.height=null!=xa&&"auto"!=xa&&"width"!=-A?parseFloat(xa):"auto"==A||"auto"==xa?ka.height+ja:"width"==A?Da.geometry.width:parseFloat(A);sa+=Da.geometry.height+X}l?(null==F[x]&&(F[x]=[]),F[x].push(Da)):(t.push(Da),null!=ma?(ma.style=K.replacePlaceholders(ma,la,J),K.addCell(Da,ma),z.push(ma)):C.push(K.addCell(Da)))}for(Aa=0;Aa<z.length;Aa++)oa="@"==k.charAt(0)?z[Aa].getAttribute(k.substring(1)):null,xa="@"==A.charAt(0)?z[Aa].getAttribute(A.substring(1)):null,"auto"!=k&&"auto"!=oa||"auto"!=A&&"auto"!=xa||K.updateGroupBounds([z[Aa]],ja,!0);-var ta=C.slice(),ua=C.slice();for(Za=0;Za<Ea.length;Za++){var Fa=Ea[Za];for(Aa=0;Aa<t.length;Aa++){Da=t[Aa];var Na=mxUtils.bind(this,function(mb,pb,db){var qb=pb.getAttribute(db.from);if(null!=qb&&""!=qb){qb=qb.split(",");for(var nb=0;nb<qb.length;nb++){var lb=N[db.to][qb[nb]];if(null==lb&&null!=ba){lb=new mxCell(qb[nb],new mxGeometry(qa,wa,0,0),ba);lb.style=K.replacePlaceholders(pb,lb.style,J);var eb=this.editor.graph.getPreferredSizeForCell(lb);lb.geometry.width=eb.width+ja;lb.geometry.height=eb.height+-ja;N[db.to][qb[nb]]=lb;lb.vertex=!0;lb.id=qb[nb];C.push(K.addCell(lb))}if(null!=lb){eb=db.label;null!=db.fromlabel&&(eb=(pb.getAttribute(db.fromlabel)||"")+(eb||""));null!=db.sourcelabel&&(eb=K.replacePlaceholders(pb,db.sourcelabel,J)+(eb||""));null!=db.tolabel&&(eb=(eb||"")+(lb.getAttribute(db.tolabel)||""));null!=db.targetlabel&&(eb=(eb||"")+K.replacePlaceholders(lb,db.targetlabel,J));var tb="target"==db.placeholders==!db.invert?lb:mb;tb=null!=db.style?K.replacePlaceholders(tb,db.style,J):K.createCurrentEdgeStyle();-eb=K.insertEdge(null,null,eb||"",db.invert?lb:mb,db.invert?mb:lb,tb);if(null!=db.labels)for(tb=0;tb<db.labels.length;tb++){var ob=db.labels[tb],ub=new mxCell(ob.label||tb,new mxGeometry(null!=ob.x?ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=ob.placeholders&&(ub.value=K.replacePlaceholders("target"==ob.placeholders==!db.invert?lb:mb,ub.value,J));if(null!=ob.dx||null!=ob.dy)ub.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=-ob.dy?ob.dy:0);eb.insert(ub)}if(null!=db.data)for(var Ab in db.data)K.setAttributeForCell(eb,Ab,db.data[Ab]);ua.push(eb);mxUtils.remove(db.invert?mb:lb,ta)}}}});Na(Da,Da,Fa);if(null!=F[Da.id])for(Q=0;Q<F[Da.id].length;Q++)Na(Da,F[Da.id][Q],Fa)}}if(null!=ya)for(Aa=0;Aa<t.length;Aa++)for(Da=t[Aa],Q=0;Q<ya.length;Q++)K.setAttributeForCell(Da,mxUtils.trim(ya[Q]),null);if(0<C.length){var Wa=new mxParallelEdgeLayout(K);Wa.spacing=S;Wa.checkOverlap=!0;var Xa=function(){0<Wa.spacing&&Wa.execute(K.getDefaultParent());-for(var mb=0;mb<C.length;mb++){var pb=K.getCellGeometry(C[mb]);pb.x=Math.round(K.snap(pb.x));pb.y=Math.round(K.snap(pb.y));"auto"==k&&(pb.width=Math.round(K.snap(pb.width)));"auto"==A&&(pb.height=Math.round(K.snap(pb.height)))}};if("["==za.charAt(0)){var ab=pa;K.view.validate();this.executeLayouts(K.createLayouts(JSON.parse(za)),function(){Xa();ab()});pa=null}else if("circle"==za){var Oa=new mxCircleLayout(K);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Qa=Oa.isVertexIgnored;Oa.isVertexIgnored=function(mb){return Qa.apply(this,-arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Oa.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}else if("horizontaltree"==za||"verticaltree"==za||"auto"==za&&ua.length==2*C.length-1&&1==ta.length){K.view.validate();var kb=new mxCompactTreeLayout(K,"horizontaltree"==za);kb.levelDistance=X;kb.edgeRouting=!1;kb.resetEdges=!1;kb.sortEdges=!0;this.executeLayout(function(){kb.execute(K.getDefaultParent(),0<ta.length?ta[0]:null)},!0,pa);pa=null}else if("horizontalflow"==za||"verticalflow"==-za||"auto"==za&&1==ta.length){K.view.validate();var cb=new mxHierarchicalLayout(K,"horizontalflow"==za?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);cb.intraCellSpacing=X;cb.parallelEdgeSpacing=S;cb.interRankCellSpacing=aa;cb.disableEdgeStyle=!1;this.executeLayout(function(){cb.execute(K.getDefaultParent(),ua);K.moveCells(ua,qa,wa)},!0,pa);pa=null}else if("orgchart"==za){K.view.validate();var Ya=new mxOrgChartLayout(K,2,aa,X),gb=Ya.isVertexIgnored;Ya.isVertexIgnored=function(mb){return gb.apply(this,-arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Ya.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}else if("organic"==za||"auto"==za&&ua.length>C.length){K.view.validate();var hb=new mxFastOrganicLayout(K);hb.forceConstant=3*X;hb.disableEdgeStyle=!1;hb.resetEdges=!1;var vb=hb.isVertexIgnored;hb.isVertexIgnored=function(mb){return vb.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){hb.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}}this.hideDialog()}finally{K.model.endUpdate()}null!=-pa&&pa()}}catch(mb){this.handleError(mb)}};EditorUi.prototype.getSearch=function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",t;for(t in urlParams)0>mxUtils.indexOf(c,t)&&null!=urlParams[t]&&(f+=l+t+"="+urlParams[t],l="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),-t;for(t in urlParams)0>mxUtils.indexOf(l,t)&&(c=0==f?c+"?":c+"&",null!=urlParams[t]&&(c+=t+"="+urlParams[t],f++))}return c};EditorUi.prototype.showLinkDialog=function(c,f,l,t,z){c=new LinkDialog(this,c,f,l,!0,t,z);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||-f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;c&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),f=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var l=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!l);+this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?F():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))}),t)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var f=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(l){var t=mxUtils.bind(this,function(C){l.clear()&&f(C)}),+z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||t({message:mxResources.get("unknownError")})}catch(C){t(C)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,+t))}),f):f({message:mxResources.get("serviceUnavailableOrBlocked")})}};EditorUi.prototype.convertLucidChart=function(c,f,l){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=l?l(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(N){z.clear()&&t(N)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if("undefined"!==typeof window.LucidImporter)try{var N=JSON.parse(c);f(LucidImporter.importState(N));try{if(null!=+window.console&&"1"==urlParams.test){var K=[(new Date).toISOString(),"convertLucidChart",N];null!=N.state&&K.push(JSON.parse(N.state));if(null!=N.svgThumbs)for(var J=0;J<N.svgThumbs.length;J++)K.push(Editor.createSvgDataUri(N.svgThumbs[J]));null!=N.thumb&&K.push(N.thumb);console.log.apply(console,K)}}catch(da){}}catch(da){null!=window.console&&console.error(da),C(da)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||+this.isOffline(!0)?window.setTimeout(F,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",F,null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,+null,null,C))}),t)};EditorUi.prototype.createMermaidXml=function(c,f,l,t,z,C){var F=new Graph(document.createElement("div"));l=F.insertVertex(null,null,null,0,0,t,z,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");F.setAttributeForCell(l,"mermaidData",JSON.stringify({data:c,config:f},null,2));null!=C&&F.setAttributeForCell(l,"templatePrompt",C);c=(new mxCodec).encode(F.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,f,l){var t=+0,z=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(C){var F=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),N=mxUtils.bind(this,function(K){C.clear()&&l(K)});F.send(mxUtils.bind(this,function(K){if(C.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var da=mxUtils.trim(K.getText());this.generateMermaidImage(da,null,mxUtils.bind(this,function(ea,ca,X){this.tryAndHandle(mxUtils.bind(this,function(){C.clear()&&+(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",da),f(da,ea,ca,X))}),N)}),N,mxUtils.bind(this,function(ea){3>t++?C.clear()&&z():N(ea)}))}),N);else{var J={message:mxResources.get("error")+" "+K.getStatus()};try{J=JSON.parse(K.getText()),J=J.error}catch(da){}N(J)}}),N)}),l)});z()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?+f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var l=1<f.length?f[1]:null;if(null!=l){var t=l.indexOf("-");0<t&&(l=l.substring(0,t))}if(0<f.length&&"mermaid"==mxUtils.trim(f[0])||null!=l&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l))f.shift(),c=mxUtils.trim(f.join("\n")),f=c.split("\n");l=f[0].split(" ")[0].replace(/:$/,"");t=l.indexOf("-");0<t&&(l=l.substring(0,t));try{"mindmap"==l&&2<f.length&&(c=extractMermaidMindmap(f))}catch(z){}0>+mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,f,l,t,z){var C=mxUtils.bind(this,function(N){this.loadingMermaid=!1;null!=t?t(N):this.handleError(N)}),F=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=+!0);Editor.isDarkMode()&&(f.theme="dark");var N=mxUtils.bind(this,function(K){try{if(mxClient.IS_IE||mxClient.IS_IE11)K=K.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var J=mxUtils.parseXml(K).getElementsByTagName("svg");if(0<J.length&&"error"!=J[0].getAttribute("aria-roledescription")){var da=parseFloat(J[0].getAttribute("width")),ea=parseFloat(J[0].getAttribute("height"));if(isNaN(da)||isNaN(ea))try{var ca=+J[0].getAttribute("viewBox").split(/\s+/);da=parseFloat(ca[2]);ea=parseFloat(ca[3])}catch(X){da=da||100,ea=ea||100}l(this.convertDataUri(Editor.createSvgDataUri(K)),da,ea)}else null!=z?z():t({message:mxResources.get("invalidInput")})}catch(X){t(X)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(K){N(K.svg)}).catch(function(K){null!=z?z(K):t(K)})}catch(K){t(K)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?+window.setTimeout(F,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(N){this.importXml(N,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",F,null,null,null,C)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))};EditorUi.prototype.generatePlantUmlImage=function(c,f,l,t){function z(N,K,J){c1=N>>2;c2=(N&3)<<4|K>>4;c3=(K&15)<<2|J>>6;c4=J&63;r="";r+=C(c1&63);r+=C(c2&+63);r+=C(c3&63);return r+=C(c4&63)}function C(N){if(10>N)return String.fromCharCode(48+N);N-=10;if(26>N)return String.fromCharCode(65+N);N-=26;if(26>N)return String.fromCharCode(97+N);N-=26;return 0==N?"-":1==N?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(N){r="";for(i=0;i<N.length;i+=3)r=i+2==N.length?r+z(N.charCodeAt(i),N.charCodeAt(i+1),0):i+1==N.length?r+z(N.charCodeAt(i),0,0):r+z(N.charCodeAt(i),N.charCodeAt(i++1),N.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(N){if(200<=this.status&&300>this.status)if("txt"==f)l(this.response);else{var K=new FileReader;K.readAsDataURL(this.response);K.onloadend=function(J){var da=new Image;da.onload=function(){try{var ea=da.width,ca=da.height;if(0==ea&&0==ca){var X=K.result,aa=X.indexOf(","),ia=decodeURIComponent(escape(atob(X.substring(aa+1)))),la=mxUtils.parseXml(ia).getElementsByTagName("svg");+0<la.length&&(ea=parseFloat(la[0].getAttribute("width")),ca=parseFloat(la[0].getAttribute("height")))}l(K.result,ea,ca)}catch(Y){t(Y)}};da.src=K.result};K.onerror=function(J){t(J)}}else t(N)};F.onerror=function(N){t(N)};F.send()};EditorUi.prototype.insertAsPreText=function(c,f,l){var t=this.editor.graph,z=null;t.getModel().beginUpdate();try{z=t.insertVertex(null,null,"<pre>"+c+"</pre>",f,l,1,1,"text;html=1;align=left;verticalAlign=top;"),t.updateCellSize(z,!0)}finally{t.getModel().endUpdate()}return z};+EditorUi.prototype.insertTextAt=function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;F=null!=F?F:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(ca){4==ca.readyState&&200<=ca.status&&299>=ca.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ca.responseText,f,l,!0))}));else if("data:"==c.substring(0,+5)||!this.isOffline()&&(z||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var K=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var J=Editor.extractGraphModelFromPdf(c);if(null!=J&&0<J.length)return this.importXml(J,f,l,C,!0,N)}if(Editor.isPngDataUrl(c)&&(J=Editor.extractGraphModelFromPng(c),null!=J&&0<J.length))return this.importXml(J,f,l,C,!0,N);if("data:image/svg+xml;"==c.substring(0,19))try{J=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(J=c.substring(c.indexOf(",")++1),J=window.atob&&!mxClient.IS_SF?atob(J):Base64.decode(J,!0)):J=decodeURIComponent(c.substring(c.indexOf(",")+1));var da=this.importXml(J,f,l,C,!0,N);if(0<da.length)return da}catch(ca){}this.loadImage(c,mxUtils.bind(this,function(ca){if("data:"==c.substring(0,5))this.resizeImage(ca,c,mxUtils.bind(this,function(ia,la,Y){K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),la,Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="++this.convertDataUri(ia)+";"))}),F,this.maxImageSize);else{var X=Math.min(1,Math.min(this.maxImageSize/ca.width,this.maxImageSize/ca.height)),aa=Math.round(ca.width*X);ca=Math.round(ca.height*X);K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),aa,ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var ca=null;K.getModel().beginUpdate();try{ca=K.insertVertex(K.getDefaultParent(),+null,c,K.snap(f),K.snap(l),1,1,"text;"+(t?"html=1;":"")),K.updateCellSize(ca),K.fireEvent(new mxEventObject("textInserted","cells",[ca]))}finally{K.getModel().endUpdate()}K.setSelectionCell(ca)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,l,C,null,N);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(ca){this.editor.graph.setSelectionCells(this.importXml(ca,f,l,C,null,N))}),mxUtils.bind(this,function(ca){this.handleError(ca)}));+else{K=this.editor.graph;z=null;K.getModel().beginUpdate();try{z=K.insertVertex(K.getDefaultParent(),null,"",K.snap(f),K.snap(l),1,1,"text;whiteSpace=wrap;"+(t?"html=1;":""));K.fireEvent(new mxEventObject("textInserted","cells",[z]));t&&(c=K.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");z.value=c;K.updateCellSize(z);if(0<this.maxTextWidth&&z.geometry.width>this.maxTextWidth){var ea=K.getPreferredSizeForCell(z,this.maxTextWidth);z.geometry.width=ea.width;z.geometry.height=+ea.height}Graph.isLink(z.value)&&K.setLinkForCell(z,z.value);z.geometry.width+=K.gridSize;z.geometry.height+=K.gridSize}finally{K.getModel().endUpdate()}return[z]}}return[]};EditorUi.prototype.formatFileSize=function(c){var f=-1;do c/=1024,f++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var f=c.indexOf(";");0<f&&(c=c.substring(0,f)+c.substring(c.indexOf(",",f+1)))}return c};+EditorUi.prototype.isRemoteFileFormat=function(c,f){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,f){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=+l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=l}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(F,N){StorageFile.listFiles(this,"F",F,N)});window.openBrowserFile=mxUtils.bind(this,function(F,N,K){StorageFile.getFileContent(this,F,N,K)});window.deleteBrowserFile=mxUtils.bind(this,function(F,+N,K){StorageFile.deleteFile(this,F,N,K)});if(!f){var t=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));window.openFile.setConsumer(mxUtils.bind(this,function(F,N){null!=N&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(N)?(F=new Blob([F],{type:"application/octet-stream"}),this.importVisio(F,mxUtils.bind(this,function(K){this.importXml(K,0,0,!0)}),null,N)):this.editor.graph.setSelectionCells(this.importXml(F,0,0,!0))}));+this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var z=this.dialog,C=z.close;this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=t;C.apply(z,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,f,l){var t=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?+JSZip.loadAsync(c).then(function(C){if(mxUtils.isEmptyObject(C.files))l();else{var F=0,N,K=!1;C.forEach(function(J,da){J=da.name.toLowerCase();"diagram/diagram.xml"==J?(K=!0,da.async("string").then(function(ea){0==ea.indexOf("<mxfile ")?f(ea):l()})):0==J.indexOf("versions/")&&(J=parseInt(J.substr(9)),J>F&&(F=J,N=da))});0<F?N.async("string").then(function(J){(new XMLHttpRequest).upload&&t.isRemoteFileFormat(J,c.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),+null,l):t.parseFileData(J,mxUtils.bind(this,function(da){4==da.readyState&&(200<=da.status&&299>=da.status?f(da.responseText):l())}),c.name):l()}):K||l()}},function(C){l(C)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,l))};EditorUi.prototype.importFile=function(c,f,l,t,z,C,F,N,K,J,da,ea){J=null!=J?J:!0;var ca=!1,X=null,aa=mxUtils.bind(this,function(ia){var la=+null;null!=ia&&"<mxlibrary"==ia.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,ia,F)),this.showSidebar()):la=this.importXml(ia,l,t,J,null,null!=ea?mxEvent.isControlDown(ea):null);null!=N&&N(la)});"image"==f.substring(0,5)?(K=!1,"image/png"==f.substring(0,9)&&(da=da?null:this.extractGraphModelFromPng(c),null!=da&&0<da.length&&(X=this.importXml(da,l,t,J,null,null!=ea?mxEvent.isControlDown(ea):null),K=!0)),K||(K=this.editor.graph,da=c.indexOf(";"),0<da&&(c=c.substring(0,da)+c.substring(c.indexOf(",",+da+1))),J&&K.isGridEnabled()&&(l=K.snap(l),t=K.snap(t)),da="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(da+="editableCssRules=.*;"),X=[K.insertVertex(null,null,"",l,t,z,C,da+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ca=!0,this.importGraphML(c,aa)):null!=K&&null!=F&&EditorUi.isVisioFilename(F)?(ca=!0,this.importVisio(K,aa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,F)?this.isOffline()?+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,f=mxUtils.bind(this,function(ia){4==ia.readyState&&(200<=ia.status&&299>=ia.status?aa(ia.responseText):null!=N&&(N(null),this.showError(mxResources.get("error"),413==ia.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,F):this.parseFile(K,f,F)):0==c.indexOf("PK")&&null!=K?(ca=!0,this.importZipFile(K,aa,mxUtils.bind(this,function(){X=this.insertTextAt(this.validateFileData(c),+l,t,!0,null,J);N(X)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(X=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J,null,null!=ea?mxEvent.isControlDown(ea):null));ca||null==N||N(X);return X};EditorUi.prototype.importFiles=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){t=null!=t?t:this.maxImageSize;J=null!=J?J:this.maxImageBytes;var X=null!=f&&null!=l,aa=!0;f=null!=f?f:0;l=null!=l?l:0;var ia=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var la=da||this.resampleThreshold,Y=0;Y<c.length;Y++)if("image/svg"!==+c[Y].type.substring(0,9)&&"image/"===c[Y].type.substring(0,6)&&c[Y].size>la){ia=!0;break}var ma=mxUtils.bind(this,function(){var Z=this.editor.graph,k=Z.gridSize;z=null!=z?z:mxUtils.bind(this,function(V,ba,fa,pa,sa,qa,wa,Aa,za){try{if(null!=V&&"<mxlibrary"==V.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,V,wa)),this.showSidebar(),null;this.isCompatibleString(V)&&1==c.length&&null!=ca&&"drop"==ca.type&&this.isBlankFile()&&!this.canUndo()&&(X=!1,pa=fa=0);return this.importFile(V,+ba,fa,pa,sa,qa,wa,Aa,za,X,ea,ca)}catch(Da){return this.handleError(Da),null}});C=null!=C?C:mxUtils.bind(this,function(V){Z.setSelectionCells(V)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var A=c.length,I=A,T=[],O=mxUtils.bind(this,function(V,ba){T[V]=ba;if(0==--I){this.spinner.stop();if(null!=N)N(T);else{var fa=[];Z.getModel().beginUpdate();try{for(V=0;V<T.length;V++){var pa=T[V]();null!=pa&&(fa=fa.concat(pa))}}finally{Z.getModel().endUpdate()}}C(fa)}}),U=0;U<A;U++)mxUtils.bind(this,+function(V){var ba=c[V];if(null!=ba){var fa=new FileReader;fa.onload=mxUtils.bind(this,function(pa){if(null==F||F(ba))try{if("image/"==ba.type.substring(0,6))if("image/svg"==ba.type.substring(0,9)){var sa=Graph.clipSvgDataUri(pa.target.result),qa=sa.indexOf(","),wa=decodeURIComponent(escape(atob(sa.substring(qa+1)))),Aa=mxUtils.parseXml(wa),za=Aa.getElementsByTagName("svg");if(0<za.length){var Da=za[0],ra=ea?null:Da.getAttribute("content");null!=ra&&"<"!=ra.charAt(0)&&"%"!=ra.charAt(0)&&(ra=unescape(window.atob?+atob(ra):Base64.decode(ra,!0)));null!=ra&&"%"==ra.charAt(0)&&(ra=decodeURIComponent(ra));null==ra||"<mxfile "!==ra.substring(0,8)&&"<mxGraphModel "!==ra.substring(0,14)?O(V,mxUtils.bind(this,function(){try{if(null!=Aa){var Ka=Aa.getElementsByTagName("svg");if(0<Ka.length){var Ha=Ka[0],Ba=Ha.getAttribute("width"),Pa=Ha.getAttribute("height");Ba=null!=Ba&&"%"!=Ba.charAt(Ba.length-1)?parseFloat(Ba):NaN;Pa=null!=Pa&&"%"!=Pa.charAt(Pa.length-1)?parseFloat(Pa):NaN;var $a=Ha.getAttribute("viewBox");if(null==+$a||0==$a.length)Ha.setAttribute("viewBox","0 0 "+Ba+" "+Pa);else if(isNaN(Ba)||isNaN(Pa)){var Na=$a.split(" ");3<Na.length&&(Ba=parseFloat(Na[2]),Pa=parseFloat(Na[3]))}sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var Ya=Math.min(1,Math.min(t/Math.max(1,Ba)),t/Math.max(1,Pa)),Ea=z(sa,ba.type,f+V*k,l+V*k,Math.max(1,Math.round(Ba*Ya)),Math.max(1,Math.round(Pa*Ya)),ba.name);if(null!=Ea&&(isNaN(Ba)||isNaN(Pa))){var x=new Image;x.onload=mxUtils.bind(this,function(){Ba=Math.max(1,x.width);Pa=Math.max(1,+x.height);Ea[0].geometry.width=Ba;Ea[0].geometry.height=Pa;Ha.setAttribute("viewBox","0 0 "+Ba+" "+Pa);sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var L=sa.indexOf(";");0<L&&(sa=sa.substring(0,L)+sa.substring(sa.indexOf(",",L+1)));Z.setCellStyles("image",sa,[Ea[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(Ha))}return Ea}}}catch(L){}return null})):O(V,mxUtils.bind(this,function(){return z(ra,"text/xml",f+V*k,l+V*k,0,0,ba.name)}))}else O(V,mxUtils.bind(this,function(){return null}))}else{qa=+!1;if("image/png"==ba.type){var ya=ea?null:this.extractGraphModelFromPng(pa.target.result);if(null!=ya&&0<ya.length){var Ca=new Image;Ca.src=pa.target.result;O(V,mxUtils.bind(this,function(){return z(ya,"text/xml",f+V*k,l+V*k,Ca.width,Ca.height,ba.name)}));qa=!0}}qa||(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(pa.target.result,mxUtils.bind(this,function(Ka){this.resizeImage(Ka,pa.target.result,mxUtils.bind(this,function(Ha,Ba,Pa){O(V,mxUtils.bind(this,function(){if(null!=Ha&&Ha.length<J){var $a=aa&&this.isResampleImageSize(ba.size,da)?Math.min(1,Math.min(t/Ba,t/Pa)):1;return z(Ha,ba.type,f+V*k,l+V*k,Math.round(Ba*$a),Math.round(Pa*$a),ba.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),aa,t,da,ba.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else sa=+pa.target.result,z(sa,ba.type,f+V*k,l+V*k,240,160,ba.name,function(Ka){O(V,function(){return Ka})},ba)}catch(Ka){O(V,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(Ka,ba)}else O(V,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(ba.name)?z(null,ba.type,f+V*k,l+V*k,240,160,ba.name,function(pa){O(V,function(){return pa})},ba):"image"==ba.type.substring(0,5)||"application/pdf"==ba.type?fa.readAsDataURL(ba):fa.readAsText(ba)}})(U)});if(ia){ia=[];+for(Y=0;Y<c.length;Y++)ia.push(c[Y]);c=ia;this.confirmImageResize(function(Z){aa=Z;ma()},K)}else ma()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,f){f=null!=f?f:!1;var l=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},t=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():+null,z=function(C,F){if(C||f)mxSettings.setResizeImages(C?F:null),mxSettings.save();l();c(F)};null==t||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(C){z(C,!0)},function(C){z(C,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,+!0,!0):z(!1,t)};EditorUi.prototype.parseFile=function(c,f,l){l=null!=l?l:c.name;var t=new FileReader;t.onload=mxUtils.bind(this,function(){this.parseFileData(t.result,f,l)});t.readAsText(c)};EditorUi.prototype.parseFileData=function(c,f,l){var t=new XMLHttpRequest;t.open("POST",OPEN_URL);t.setRequestHeader("Content-Type","application/x-www-form-urlencoded");t.onreadystatechange=function(){f(t)};t.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",+action:"size_"+file.size})}catch(z){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>f};EditorUi.prototype.resizeImage=function(c,f,l,t,z,C,F){z=null!=z?z:this.maxImageSize;var N=Math.max(1,c.width),K=Math.max(1,c.height),J=f;if(t&&this.isResampleImageSize(null!=F?F:f.length,C))try{var da=Math.max(N/z,K/z);if(1<da){var ea=Math.round(N/da),ca=Math.round(K/da),X=document.createElement("canvas");X.width=ea;X.height=ca;X.getContext("2d").drawImage(c,+0,0,ea,ca);var aa=X.toDataURL();if(aa.length<f.length){var ia=document.createElement("canvas");ia.width=ea;ia.height=ca;var la=ia.toDataURL();aa!==la&&(f=aa,N=ea,K=ca)}}}catch(Y){}t&&J!=f&&z>this.maxImageSize/2&&f.length>this.maxImageBytes?this.resizeImage(c,f,l,t,z/1.5,C,F):l(f,N,K)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,f,l){try{var t=new Image;t.onload=function(){t.width=0<t.width?t.width:120;t.height=+0<t.height?t.height:120;f(t)};null!=l&&(t.onerror=l);t.src=c}catch(z){if(null!=l)l(z);else throw z;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var u=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());u.apply(this,+arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,f=this.editor.graph,l=f.isEnabled;f.isEnabled=function(){return l.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=+function(k){var A=k.getEvent();return null==k.getState()&&!mxEvent.isMouseEvent(A)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(A)&&(null==k.getState()||mxEvent.isControlDown(A)||mxEvent.isShiftDown(A))});f.cellEditor.editPlantUmlData=function(k,A,I){var T=JSON.parse(I);A=new TextareaDialog(c,mxResources.get("plantUml")+":",T.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(O,T.format,function(U,V,ba){c.spinner.stop();f.getModel().beginUpdate();+try{if("txt"==T.format)f.labelChanged(k,"<pre>"+U+"</pre>"),f.updateCellSize(k,!0);else{f.setCellStyles("image",c.convertDataUri(U),[k]);var fa=f.model.getGeometry(k);null!=fa&&(fa=fa.clone(),fa.width=V,fa.height=ba,f.cellsResized([k],[fa],!1))}f.setAttributeForCell(k,"plantUmlData",JSON.stringify({data:O,format:T.format}))}finally{f.getModel().endUpdate()}},function(U){c.handleError(U)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};f.cellEditor.editMermaidData=function(k,+A,I){var T=JSON.parse(I);A=new TextareaDialog(c,mxResources.get("mermaid")+":",T.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(O,T.config,function(U,V,ba){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",U,[k]);var fa=f.model.getGeometry(k);null!=fa&&(fa=fa.clone(),fa.width=Math.max(fa.width,V),fa.height=Math.max(fa.height,ba),f.cellsResized([k],[fa],!1));f.setAttributeForCell(k,"mermaidData",JSON.stringify({data:O,+config:T.config},null,2))}finally{f.getModel().endUpdate()}},function(U){c.handleError(U)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};var t=f.cellEditor.startEditing;f.cellEditor.startEditing=function(k,A){try{var I=this.graph.getAttributeForCell(k,"plantUmlData");if(null!=I)this.editPlantUmlData(k,A,I);else if(I=this.graph.getAttributeForCell(k,"mermaidData"),null!=I&&window.isMermaidEnabled)this.editMermaidData(k,A,I);else{var T=f.getCellStyle(k);"1"==mxUtils.getValue(T,+"metaEdit","0")?c.showDataDialog(k):t.apply(this,arguments)}}catch(O){c.handleError(O)}};f.getLinkTitle=function(k){return c.getLinkTitle(k)};f.customLinkClicked=function(k,A){var I=!1;try{var T=this.getGraphBounds();c.handleCustomLink(k,A);I=!0;c.chromelessResize&&!T.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(A))}catch(O){c.handleError(O)}return I};var z=f.parseBackgroundImage;f.parseBackgroundImage=function(k){var A=z.apply(this,arguments);null!=A&&null!=A.src&&+Graph.isPageLink(A.src)&&(A={originalSrc:A.src});return A};var C=f.setBackgroundImage;f.setBackgroundImage=function(k){null!=k&&null!=k.originalSrc&&(k=c.createImageForPageLink(k.originalSrc,c.currentPage,this));C.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(k,A){k=+null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=k){var I=k.indexOf(",");if(0<I)for(k=k.substring(I+1),A=A.getProperty("patches"),I=0;I<A.length;I++)if(null!=A[I][EditorUi.DIFF_UPDATE]&&null!=A[I][EditorUi.DIFF_UPDATE][k]||null!=A[I][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(A[I][EditorUi.DIFF_REMOVE],k)){f.refreshBackgroundImage();break}}}));var F=f.getBackgroundImageObject;f.getBackgroundImageObject=function(k,A){var I=F.apply(this,arguments);null!=I&&null!=I.originalSrc&&(I=+A?c.createImageForPageLink(I.originalSrc,null,null,!0):{src:I.originalSrc});return I};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var N=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(k){k=null!=k?k:"";"1"==+urlParams.dev&&(k+=(0<k.length?"&":"?")+"dev=1");return N.apply(this,arguments)};var K=f.addClickHandler;f.addClickHandler=function(k,A,I){var T=A;A=function(O,U,V){if(null==U){var ba=mxEvent.getSource(O);"a"==ba.nodeName.toLowerCase()&&(U=ba.getAttribute("href"))}null!=U&&f.isCustomLink(U)&&(mxEvent.isTouchEvent(O)||!mxEvent.isPopupTrigger(O))&&f.customLinkClicked(U,V)&&mxEvent.consume(O);null!=T&&T(O,U,V)};K.call(this,k,A,I)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,+null,!0);if(null!=this.menus){var J=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,A,I){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["zoomIn","zoomOut","-"],null,I);J.apply(this,arguments);f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(k,["-","addToScratchpad"],null,I);f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["-","exitGroup","home"],null,I)};var da=Menus.prototype.addPopupMenuEditItems;+this.menus.addPopupMenuEditItems=function(k,A,I){if(c.editor.graph.isSelectionEmpty())da.apply(this,arguments),c.menus.addMenuItems(k,["copyAsImage"],null,I);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(k,A,I):this.addPopupMenuArrangeItems(k,A,I),this.addMenuItems(k,"- cut copy copyAsImage duplicate -".split(" "),null,I),this.isShowCellEditItems()||this.addPopupDeleteItem(k,A,I),this.addMenuItems(k,["lockUnlock","-"],null,I),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(A)&&+f.isCellEditable(A)&&(this.addSubmenu("editCell",k,null,mxResources.get("edit")),k.addSeparator(),f.getModel().isEdge(A))){this.addSubmenu("line",k);var T=f.getModel().getGeometry(A);null!=T&&null!=T.points&&0<T.points.length&&this.addMenuItems(k,["clearWaypoints"],null,I)}1==f.getSelectionCount()&&this.addMenuItems(k,["enterGroup"],null,I);T=c.getSelectionState();null!=T.mergeCell?this.addMenuItem(k,"mergeCells"):(1<T.style.colspan||1<T.style.rowspan)&&this.addMenuItem(k,"unmergeCells")}};this.menus.isShowStyleItems=+function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var ea=f.getExportVariables;f.getExportVariables=function(){var k=ea.apply(this,arguments),A=c.getCurrentFile();null!=A&&(k.filename=A.getTitle());+k.pagecount=null!=c.pages?c.pages.length:1;k.page=null!=c.currentPage?c.currentPage.getName():"";k.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var ca=f.getGlobalVariable;f.getGlobalVariable=function(k){var A=c.getCurrentFile();return"filename"==k&&null!=A?A.getTitle():"page"==k&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==k?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==k?null!=c.pages?+c.pages.length:1:ca.apply(this,arguments)};var X=null,aa=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var k=this.getCurrentFile(),A=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;X!=A&&k==aa&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),f.view.validate());X=A;aa=k}));var ia=f.labelLinkClicked;f.labelLinkClicked=function(k,A,I){var T=A.getAttribute("href");if(null==T||!f.isCustomLink(T)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))ia.apply(this,+arguments);else{if(!f.isEnabled()||null!=k&&f.isCellLocked(k.cell))f.customLinkClicked(T),f.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=function(){var k=c.defaultFilename,A=c.getCurrentFile();null!=A&&(k=null!=A.getTitle()?A.getTitle():k);return k};var la=this.actions.get("print");la.setEnabled(!mxClient.IS_IOS||!navigator.standalone);la.visible=la.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,+!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",+!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&f.addListener(mxEvent.ESCAPE,function(k,A){null!=A&&f.isEnabled()&&!f.isEditing()&&null!=A.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));+this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(k){var A=f.cellEditor.text2,I=null;null!=A&&(mxEvent.addListener(A,"dragleave",function(T){null!=I&&(I.parentNode.removeChild(I),I=null);T.stopPropagation();T.preventDefault()}),mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(T){null==I&&(!mxClient.IS_IE||10<document.documentMode)&&(I=this.highlightElement(A));T.stopPropagation();T.preventDefault()})),mxEvent.addListener(A,+"drop",mxUtils.bind(this,function(T){null!=I&&(I.parentNode.removeChild(I),I=null);if(0<T.dataTransfer.files.length)this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,function(U,V,ba,fa,pa,sa){f.insertImage(U,pa,sa)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var V=0;V<U.length;V++)U[V]()},mxEvent.isControlDown(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var O=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?+this.loadImage(decodeURIComponent(O),mxUtils.bind(this,function(U){var V=Math.max(1,U.width);U=Math.max(1,U.height);var ba=this.maxImageSize;ba=Math.min(1,Math.min(ba/Math.max(1,V)),ba/Math.max(1,U));f.insertImage(decodeURIComponent(O),V*ba,U*ba)})):document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(T.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(T.dataTransfer.types,"text/plain")&&+document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"));T.stopPropagation();T.preventDefault()})))}));if(Editor.isSettingsEnabled()){la=this.editor.graph.view;var Y=mxSettings.getUnit();la.setUnit(Y);Editor.pageSizeUnit=Y==mxConstants.METERS?mxConstants.MILLIMETERS:Y;la.addListener("unitChanged",function(k,A){k=A.getProperty("unit");mxSettings.setUnit(k);mxSettings.save();Editor.pageSizeUnit=k==mxConstants.METERS?mxConstants.MILLIMETERS:k});this.ruler=!this.canvasSupported||9==+document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,la.unit);this.refresh()}if("1"==urlParams.styledev){la=document.getElementById("geFooter");null!=la&&(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)})),la.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(k,A){0<this.editor.graph.getSelectionCount()?(k=this.editor.graph.getSelectionCell(),k=this.editor.graph.getModel().getStyle(k),this.styleInput.value=k||"",this.styleInput.style.visibility=+"visible"):this.styleInput.style.visibility="hidden"})));var ma=this.isSelectionAllowed;this.isSelectionAllowed=function(k){return mxEvent.getSource(k)==this.styleInput?!0:ma.apply(this,arguments)}}la=document.getElementById("geInfo");null!=la&&la.parentNode.removeChild(la);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var Z=null;mxEvent.addListener(f.container,"dragleave",function(k){f.isEnabled()&&(null!=Z&&(Z.parentNode.removeChild(Z),Z=null),k.stopPropagation(),k.preventDefault())});+mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(k){null==Z&&(!mxClient.IS_IE||10<document.documentMode)&&(Z=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();k.stopPropagation();k.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(k){null!=Z&&(Z.parentNode.removeChild(Z),Z=null);if(f.isEnabled()){var A=mxUtils.convertPoint(f.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),I=k.dataTransfer.files,T=f.view.translate,+O=f.view.scale,U=A.x/O-T.x,V=A.y/O-T.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(k)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(k)&&(V=U=null),this.importFiles(I,U,V,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(k),null,null,mxEvent.isShiftDown(k),k));else{mxEvent.isAltDown(k)&&(V=U=0);var ba=0<=mxUtils.indexOf(k.dataTransfer.types,"text/uri-list")?k.dataTransfer.getData("text/uri-list"):+null;A=this.extractGraphModelFromEvent(k,null!=this.pages);if(null!=A)f.setSelectionCells(this.importXml(A,U,V,!0));else if(0<=mxUtils.indexOf(k.dataTransfer.types,"text/html")){var fa=k.dataTransfer.getData("text/html");A=document.createElement("div");A.innerHTML=Graph.sanitizeHtml(fa);var pa=null;I=A.getElementsByTagName("img");null!=I&&1==I.length?(fa=I[0].getAttribute("src"),null==fa&&(fa=I[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(fa)||(pa=!0)):(I=A.getElementsByTagName("a"),+null!=I&&1==I.length?fa=I[0].getAttribute("href"):(A=A.getElementsByTagName("pre"),null!=A&&1==A.length&&(fa=mxUtils.getTextContent(A[0]))));var sa=!0,qa=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(fa,U,V,!0,pa,null,sa,mxEvent.isControlDown(k)))});pa&&null!=fa&&fa.length>this.resampleThreshold?this.confirmImageResize(function(wa){sa=wa;qa()},mxEvent.isControlDown(k)):qa()}else null!=ba&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ba)?this.loadImage(decodeURIComponent(ba),mxUtils.bind(this,+function(wa){var Aa=Math.max(1,wa.width);wa=Math.max(1,wa.height);var za=this.maxImageSize;za=Math.min(1,Math.min(za/Math.max(1,Aa)),za/Math.max(1,wa));f.setSelectionCell(f.insertVertex(null,null,"",U,V,Aa*za,wa*za,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ba+";"))}),mxUtils.bind(this,function(wa){f.setSelectionCells(this.insertTextAt(ba,U,V,!0))})):0<=mxUtils.indexOf(k.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(k.dataTransfer.getData("text/plain"),+U,V,!0))}}k.stopPropagation();k.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));+c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var k=parseInt(this.div.offsetLeft),A=parseInt(this.div.offsetWidth),I=c.embedViewport.x+c.embedViewport.width,T=parseInt(this.div.offsetTop),O=parseInt(this.div.offsetHeight),U=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(k,I-A))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(T,U-O))+"px";this.div.style.height=Math.min(c.embedViewport.height,+parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(la=Editor.currentTheme,"simple"==la||"sketch"==la)Editor.currentTheme="",this.doSetCurrentTheme(la,mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);+this.fireEvent(new mxEventObject("themeInitialized"))}),!0);la=!1;null!=urlParams.dark?la=urlParams.dark:(la="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||la&&"auto"!=mxSettings.settings.darkMode||(la=mxSettings.settings.darkMode));"auto"==la&&this.isAutoDarkModeSupported()&&(la=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof la?"1"==la:la);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",+mxUtils.bind(this,function(k){this.isAutoDarkMode()&&this.setDarkMode(k.matches)}))}catch(k){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(k,A){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));+f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts()};var B=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=f&&c<f?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):+null!=this.lastWindowWidth&&this.lastWindowWidth<f&&c>=f&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}B.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(J){mxEvent.getSource(J)==this.diagramContainer.parentNode&&(this.embedExitPoint=+new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var z=document.createElement("div");z.style.position="absolute";z.style.width="10px";z.style.height="10px";z.style.borderRadius="5px";z.style.border="1px solid gray";z.style.background="#ffffff";z.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(z);this.bottomResizer=z;var C=null,F=null,N=null,K=null;mxEvent.addGestureListeners(z,mxUtils.bind(this,function(J){K=+parseInt(this.diagramContainer.style.height);F=mxEvent.getClientY(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));z=z.cloneNode(!1);z.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(z);this.rightResizer=z;mxEvent.addGestureListeners(z,mxUtils.bind(this,function(J){N=parseInt(this.diagramContainer.style.width);C=mxEvent.getClientX(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(J){var da=+!1;null!=C&&(this.diagramContainer.style.width=Math.max(20,N+mxEvent.getClientX(J)-C)+"px",da=!0);null!=F&&(this.diagramContainer.style.height=Math.max(20,K+mxEvent.getClientY(J)-F)+"px",da=!0);da&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(J){null==C&&null==F||mxEvent.consume(J);F=C=null});document.body.style.backgroundColor=+"transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(J){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(J){this.diagramContainer.style.width="10px";this.diagramContainer.style.height=+"10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var l=f.clipboardData||+f.originalEvent.clipboardData,t=!1,z=0;z<l.types.length;z++)if("text/"===l.types[z].substring(0,5)){t=!0;break}if(!t){var C=l.items;for(index in C){var F=C[index];if("file"===F.kind){if(c.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,function(K,J,da,ea,ca,X){c.insertImage(K,ca,X)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var J=0;J<K.length;J++)K[J]()});else{var N=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],N.x,N.y,+this.maxImageSize);mxEvent.consume(f)}break}}}}catch(K){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML=" ";l.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily=+"monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize="none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=!0;l.innerHTML=" ";var t=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,+null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(C){var F=mxEvent.getSource(C);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||"true"==F.contentEditable||224!=C.keyCode&&(mxClient.IS_MAC||17!=C.keyCode)&&(!mxClient.IS_MAC||91!=C.keyCode&&93!=C.keyCode)||t||(l.style.left=f.container.scrollLeft+10+"px",l.style.top=f.container.scrollTop+10+"px",C=f.container.scrollLeft,F=f.container.scrollTop,f.container.appendChild(l),+t=!0,l.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=C,f.container.scrollTop=F)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(C){var F=C.keyCode;window.setTimeout(mxUtils.bind(this,function(){!t||224!=F&&17!=F&&91!=F&&93!=F||(t=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),+this.copyCells(l),c()}catch(F){this.handleError(F)}}));mxEvent.addListener(l,"cut",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(l,!0),c()}catch(F){this.handleError(F)}}));mxEvent.addListener(l,"paste",mxUtils.bind(this,function(C){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(l.innerHTML=" ",l.focus(),null!=C.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(C,l,!0,!0)),!mxEvent.isConsumed(C)){var F=f.container.scrollLeft,+N=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=F,f.container.scrollTop=N,Graph.removePasteFormatting(l.firstChild),this.pasteCells(C,l,!1,!0)}catch(K){this.handleError(K)}}),0)}}catch(K){this.handleError(K)}}),!0);var z=this.isSelectionAllowed;this.isSelectionAllowed=function(C){return mxEvent.getSource(C)==l?!0:z.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,f){mxSettings.setUi(c);(f=this.doSetCurrentTheme(c)||f)||this.alert(mxResources.get("restartForChangeRequired"))};+EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,f,l){function t(N){return"simple"==N||"sketch"==N}var z=Editor.currentTheme,C="simple"==z&&this.isDefaultTheme(c)||this.isDefaultTheme(z)&&"simple"==c;if((C||l)&&!this.themeSwitching){var F=this.saveScrollState();this.editor.graph.stopEditing(!1);this.container.style.opacity=0;Editor.currentTheme=c;this.themeSwitching=!0;window.setTimeout(mxUtils.bind(this,+function(){t(z)&&this.isDefaultTheme(c)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="",this.tabContainer.style.display="",this.hsplit.style.display="block",this.menubarHeight=App.prototype.menubarHeight):this.isDefaultTheme(z)&&t(c)&&(this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.menubarHeight=0,"simple"!=c?(this.tabContainer.style.display="none",this.hsplit.style.display="none",this.hsplitPosition=0):this.tabContainer.style.display=+"");this.switchTheme(c);this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();this.restoreScrollState(F);this.container.style.opacity="";delete this.themeSwitching;isLocalStorage&&t(c)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:!0);null!=f&&f()}),0)}return C};EditorUi.prototype.saveScrollState=function(){var c=this.editor.graph.view.translate,f=this.diagramContainer.scrollLeft,+l=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(f-=this.embedViewport.x,l-=this.embedViewport.y):(f+=this.embedViewport.x,l+=this.embedViewport.y));return{x:f,y:l,tx:c.x,ty:c.y}};EditorUi.prototype.restoreScrollState=function(c){var f=this.editor.graph.view.scale,l=this.editor.graph.view.translate;this.diagramContainer.scrollLeft=c.x+(l.x-c.tx)*f;this.diagramContainer.scrollTop=c.y+(l.y-c.ty)*f};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?+c:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var t=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?+this.statusContainer.firstChild:null;f=null!=t&&null!=t.getAttribute("class");if(!f&&null!=t){t=t.getAttribute("title");var z=this.getCurrentFile();z=null!=z?z.savingStatusKey:DrawioFile.prototype.savingStatusKey;t==mxResources.get(z)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(z))+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";t=32>=c.clientWidth;c.style.visibility=t&&""==this.editor.getStatus()?"hidden":+"";if(t||f)this.statusContainer.style.display="inline-flex",f=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(c){this.isDefaultTheme(c)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex=+"1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(c);+this.switchCssForTheme(c);this.createWrapperForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);this.sidebarContainer.style.display="";if("sketch"==c){this.createFormatWindow();this.formatContainer.style.left="0px";this.formatContainer.style.top="0px";this.formatContainer.style.width="";this.formatContainer.style.zIndex="";this.formatContainer.style.border="none";var f=Editor.enableCustomLibraries&&("1"!=urlParams.embed||+"1"==urlParams.libraries);this.createShapesWindow();this.sidebarContainer.className="";this.sidebarContainer.style.position="absolute";this.sidebarContainer.style.left="0px";this.sidebarContainer.style.top="0px";this.sidebarContainer.style.bottom=f?"32px":"0px";this.sidebarContainer.style.width="100%"}null!=this.format&&(c=this.isDefaultTheme(c)||"atlas"==c,this.format.showCloseButton!=c&&(this.format.showCloseButton=c,this.format.refresh()))};EditorUi.prototype.getWindows=function(){var c=[this.sidebarWindow,+this.formatWindow,this.freehandWindow];null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(c=c.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.fit()};EditorUi.prototype.hideWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.setVisible(!1)};+EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=+this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=+function(c){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);if("simple"==c||"sketch"==c){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||null==Editor.config.defaultEdgeLength)f.defaultEdgeLength=120;null==urlParams.grid&&(f.defaultGridEnabled=!1);null==urlParams.pv&&+(f.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.switchCssForTheme=function(c){};EditorUi.prototype.createWrapperForTheme=function(c){null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=function(c){};EditorUi.prototype.isPageMenuVisible=function(){return null!=+this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.createFooterMenuForTheme=function(c){};EditorUi.prototype.createPickerMenuForTheme=function(c){};EditorUi.prototype.getNetworkStatus=function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var f=this.getCurrentFile();null!=f&&(f.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==f.sync||f.sync.enabled&&f.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?+null==f.sync||f.sync.isConnected()?f.isRealtimeEnabled()&&f.isRealtimeSupported()&&1<f.getRealtimeState()&&(c=f.getRealtimeError(),c=mxResources.get("realtimeCollaboration")+": "+(null!=c&&null!=c.message?c.message:mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink=+"",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity="",this.menubar.container.appendChild(this.statusContainer));null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);c=this.menubar.langIcon;null!=c&&(c.style.position="absolute",c.style.height="18px",c.style.width="18px",c.style.flexShrink="",c.style.opacity="",this.menubarContainer.parentNode.insertBefore(c,this.menubarContainer));+null!=this.buttonContainer&&(this.buttonContainer.style.display="",this.buttonContainer.style.padding="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(c,f,l,t){l=null!=l?l:"geToolbarButton";var z=this.menus.get(c);t=this.menubar.addMenu(mxResources.get(c),z.funct,null,t);t.className=l;t.style.display="inline-block";t.style.cursor="pointer";t.style.height="24px";t.setAttribute("title",mxResources.get(c));this.menus.menuCreated(z,t,l);null!=f&&(t.style.backgroundImage=+"url("+f+")",t.style.backgroundPosition="center center",t.style.backgroundRepeat="no-repeat",t.style.backgroundSize="100% 100%",t.style.width="24px",t.innerText="");return t};EditorUi.prototype.createToolbarButton=function(c,f,l,t){t=null!=t?t:24;var z=document.createElement("a");z.className="geToolbarButton geAdaptiveAsset";z.setAttribute("title",f);z.style.backgroundImage="url("+c+")";z.style.backgroundPosition="center center";z.style.backgroundRepeat="no-repeat";z.style.backgroundSize="100% 100%";+z.style.display="inline-block";z.style.cursor="pointer";z.style.marginLeft="6px";z.style.width=t+"px";z.style.height=t+"px";z.style.flexShrink="0";z.style.flexGrow="0";null!=l&&(mxEvent.addListener(z,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()})),mxEvent.addListener(z,"click",function(C){"disabled"!=z.getAttribute("disabled")&&l(C);mxEvent.consume(C)}));return z};EditorUi.prototype.createMenuItem=function(c,f,l){var t=this.actions.get(c),z=null!=+t?t.funct:null,C=this.createToolbarButton(f,mxResources.get(c)+(null!=t&&null!=t.shortcut?" ("+t.shortcut+")":""),z);null==t||l||(c=function(){t.isEnabled()?(C.removeAttribute("disabled"),C.style.cursor="pointer"):(C.setAttribute("disabled","disabled"),C.style.cursor="default");C.style.opacity=t.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",c),t.addListener("stateChanged",c),c());return C};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=Math.max(10,+this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,60,240,f,mxUtils.bind(this,function(z){z.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var l=this.formatWindow.window.toggleMinimized,t=240;this.formatWindow.window.toggleMinimized=+function(){l.apply(this,arguments);this.minimized?(t=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+t-140+"px"):(this.div.style.width=t+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-t+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(z){mxEvent.getSource(z)==this.formatWindow.window.title&&+this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?(c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,(1200>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||708>c)&&this.formatWindow.window.toggleMinimized()):this.formatWindow.window.setVisible(!1)}};var H=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var f=+this.formatWindow;null!=f?f.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):H.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){if(this.isShapesPanelVisible()!=c){var f=EditorUi.prototype.hsplitPosition;0==f&&(f=this.defaultSidebarWidth);var l=this.hsplitPosition,t=mxUtils.bind(this,function(){this.hsplitPosition=z;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),z=c?f:0;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==z?"translateX(0)":+"translateX(-100%)");0!=z&&t();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==z?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform 0.3s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,+"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==z&&t()}),300)}),10)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var S=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():S.apply(this,arguments)};var G=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){c=+null!=c?c:!0;if("1"!=urlParams.embedInline){var f=this.container.clientWidth;this.container==document.body&&(f=document.body.clientWidth||document.documentElement.clientWidth);var l=this.getDiagramContainerOffset();var t=l.x;var z=l.y;"simple"==Editor.currentTheme&&(z+=this.sketchMainMenuElt.offsetHeight);this.diagramContainer.style.top=z+"px";this.diagramContainer.style.bottom="0";"simple"==Editor.currentTheme?(this.hsplit.style.top=this.sketchMainMenuElt.offsetHeight+"px",this.sidebarContainer.style.top=+this.hsplit.style.top,this.formatContainer.style.top=this.hsplit.style.top,f=Math.max(0,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.formatWidth,Math.min(this.hsplitPosition,f-this.splitSize-40))),this.sidebarContainer.style.width=f+"px",this.diagramContainer.style.left=f+t+"px",this.tabContainer.style.left=f+"px",this.tabContainer.style.right=this.formatWidth+1+"px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",+this.hsplit.style.left=f+"px",this.diagramContainer.style.right=this.formatWidth+"px",this.formatContainer.style.width=this.formatWidth+"px",this.hsplit.style.bottom=this.tabContainer.offsetHeight+"px",this.diagramContainer.style.bottom=this.hsplit.style.bottom,this.checkTabScrollerOverflow()):(this.diagramContainer.style.left=l.x+"px",this.diagramContainer.style.right="0")}c&&this.editor.graph.sizeDidChange()}else G.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var f=mxUtils.bind(this,+function(t){t=this.createMenu(t,null,"geTitle");t.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";c.appendChild(t);return t});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))f=document.createElement("div"),f.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;",+f.className="geTitle",mxUtils.write(f,mxResources.get("newLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("newLibrary").funct),f=f.cloneNode(!1),f.style.left="50%",f.style.borderLeftStyle="solid",mxUtils.write(f,mxResources.get("openLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("openLibrary").funct);else{var l=f("newLibrary");l.style.fontSize="11px";l.style.left="0";l=f("openLibraryFrom");l.style.borderLeftStyle="solid";l.style.fontSize="11px";+l.style.left="50%"}c.appendChild(this.sidebarContainer);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),l="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),l&&"1"!=urlParams.embedInline?66:10,l&&"1"!=urlParams.embedInline?+Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,c-6,f-6,mxUtils.bind(this,function(t){this.createShapesPanel(t)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(c){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,+function(){this.spinner.stop();this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setAndPersistDarkMode=function(c){var f=c;"auto"==c&&(f=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(f);mxSettings.settings.darkMode=c;mxSettings.save();c=mxSettings.getUi();null==urlParams.ui&&"dark"==c&&this.setCurrentTheme("kennedy",!0)};+EditorUi.prototype.setAndPersistLanguage=function(c){mxSettings.setLanguage(c);mxSettings.save();mxClient.language=c;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE)};EditorUi.prototype.setAndPersistHighContrast=function(c){this.setHighContrast(c);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=c,mxSettings.save())};EditorUi.prototype.isHighContrast=function(){var c=document.getElementById("high-contrast-stylesheet");return null!=c&&window.matchMedia?(c=c.getAttribute("media"),+"all"==c||"not all"!=c&&window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(c){var f=document.getElementById("high-contrast-stylesheet");if(null!=f&&window.matchMedia){var l=window.matchMedia("(forced-colors: active)").matches,t=f.getAttribute("media");(t="all"==t||"not all"!=t&&l)&&!c?f.setAttribute("media",l?"not all":"(forced-colors: active)"):!t&&c&&f.setAttribute("media",l?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=+this.ruler};EditorUi.prototype.setRulerVisible=function(c){var f=this.getDiagramContainerOffset();mxSettings.setRulerOn(c);mxSettings.save();c||null==this.ruler?c&&null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.refresh();this.fireEvent(new mxEventObject("rulerVisibleChanged"));c=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=c.x-f.x;this.diagramContainer.scrollTop+=c.x-f.x};EditorUi.prototype.isAutoDarkModeSupported=+function(){return null!=window.matchMedia};EditorUi.prototype.isAutoDarkMode=function(c){return!c&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=function(c){Editor.darkMode=c;c=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container;mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff";null!=c&&(Editor.isDarkMode()?(c.classList.add("geDarkMode"),c.style.colorScheme=+"dark"):(c.classList.remove("geDarkMode"),c.style.colorScheme="light"));null!=this.ruler&&this.ruler.updateStyle();this.fireEvent(new mxEventObject("darkModeChanged"))};EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,f){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,this.sidebar.refresh(),+Editor.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=+function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",l.style.left="10px",l.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),+this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var z=this.diagramContainer.getAttribute("data-bounds");if(null!=z){this.diagramContainer.removeAttribute("data-bounds");t.getGraphBounds();var C=z.split(" ");t=mxUtils.getDocumentSize();this.diagramContainer.style.top=C[0];this.diagramContainer.style.left=C[1];+z=parseInt(C[2]);C=parseInt(C[3]);z=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,z):z,t.width-80);C=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,C):C,t.height-80);this.diagramContainer.style.width=z+"px";this.diagramContainer.style.height=C+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}f.style.left=+this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=f.style.top;c.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/+2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=+this.bottomResizer.style.visibility;f.style.visibility="";c.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(c){Editor.sketchMode!=c&&(Editor.sketchMode=c,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);c.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==+Editor.currentTheme||"1"==urlParams.embedInline?(c.vertexFontSize=16,c.edgeFontSize=c.vertexFontSize-4):"sketch"==Editor.currentTheme?(c.vertexFontSize=20,c.edgeFontSize=c.vertexFontSize-4):(c.vertexFontSize=Graph.prototype.vertexFontSize,c.edgeFontSize=Graph.prototype.edgeFontSize),c.defaultEdgeStyle.fontSize=c.edgeFontSize;if(null==Editor.config||null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved=+"1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.endSize="8",c.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize="auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize="14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==+Editor.config||null==Editor.config.defaultFonts){if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline||Editor.sketchMode)c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(c.defaultVertexStyle.sketch="1",+c.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultVertexStyle.hachureGap="4",c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}c.currentVertexStyle=+mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var l=c.indexOf(",");0<l&&(f=this.getPageById(c.substring(l+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(f=this.getCustomLinkTitle(c));return f};EditorUi.prototype.getCustomLinkTitle=function(c){var f=mxResources.get("action");+if("data:action/json,"==c.substring(0,17))try{var l=JSON.parse(c.substring(17));null!=l&&null!=l.title&&(f=l.title)}catch(t){}return f};EditorUi.prototype.handleCustomLink=function(c,f){if(Graph.isPageLink(c))if(f=c.indexOf(","),c=this.getPageById(c.substring(f+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(c,f)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var c=this.editor.graph;Editor.pagesVisible=+mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(f){f.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",+mxUtils.bind(this,function(f,l){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(f,l){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",+mxUtils.bind(this,function(f,l){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=mxSettings.getGridColor(!1);c.view.gridColor="light-dark("+c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(f,l){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||+EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(f,l){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(f,l){mxSettings.settings.enableAnimations=Editor.enableAnimations;+mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);+mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,f,l){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(t,z){try{this.spinner.stop();var C=this.createImageDataUri(t,f,"png"),F=parseInt(z.getAttribute("width")),N=parseInt(z.getAttribute("height"));this.writeImageToClipboard(C,F,N,mxUtils.bind(this,function(K){this.handleError(K)}))}catch(K){this.handleError(K)}}),+null,null,null,mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)}),null,null,null!=l?l:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(t){this.handleError(t)}};EditorUi.prototype.copyCells=function(c,f){var l=this.editor.graph;if(l.isSelectionEmpty())c.innerText="";else{var t=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),z=mxUtils.getXml(l.encodeCells(t));mxUtils.setTextContent(c,+encodeURIComponent(z));f?(l.removeCells(t,!1),l.lastPasteXml=null):(l.lastPasteXml=z,l.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(c)),navigator.clipboard.writeText(f))}return c};EditorUi.prototype.pasteXml=function(c,f,l,t,z){z=+null!=z?z:!0;var C=this.editor.graph,F=null;C.lastPasteXml==c?C.pasteCounter++:(C.lastPasteXml=c,C.pasteCounter=0);var N=C.pasteCounter*C.gridSize;if(l||this.isCompatibleString(c))F=this.importXml(c,N,N),C.setSelectionCells(F);else if(f&&1==C.getSelectionCount()){z=C.getStartEditingCell(C.getSelectionCell(),t);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==C.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE])C.setCellStyles(mxConstants.STYLE_IMAGE,c,[z]);else{C.model.beginUpdate();try{C.labelChanged(z,+c),Graph.isLink(c)&&C.setLinkForCell(z,c)}finally{C.model.endUpdate()}}C.setSelectionCell(z)}else F=C.getInsertPoint(),C.isMouseInsertPoint()&&(N=0,C.lastPasteXml==c&&0<C.pasteCounter&&C.pasteCounter--),F=this.insertTextAt(c,F.x+N,F.y+N,z),C.setSelectionCells(F);C.isSelectionEmpty()||(C.scrollCellToVisible(C.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(C.view.getState(C.getSelectionCell())));return F};EditorUi.prototype.pasteCells=function(c,f,l,t){if(!mxEvent.isConsumed(c)){var z=+f,C=!1;if(l&&null!=c.clipboardData&&c.clipboardData.getData){var F=c.clipboardData.getData("text/plain"),N=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var K=decodeURIComponent(F);this.isCompatibleString(K)&&(N=!0,F=K)}catch(aa){}N=N?null:c.clipboardData.getData("text/html");null!=N&&0<N.length?(z=this.parseHtmlData(N),C="text/plain"!=z.getAttribute("data-type")):null!=F&&0<F.length&&(z=document.createElement("div"),mxUtils.setTextContent(z,N))}F=z.getElementsByTagName("span");+if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))l=F[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(aa){var ia=this.editor.graph;ia.lastPasteXml==aa?ia.pasteCounter++:(ia.lastPasteXml=aa,ia.pasteCounter=0);var la=ia.pasteCounter*ia.gridSize;ia.setSelectionCells(this.importXml(aa,la,la));ia.scrollCellToVisible(ia.getSelectionCell())}),mxUtils.bind(this,function(aa){this.handleError(aa)})),+mxEvent.consume(c));else{var J=!1,da="";da=C?null!=z.textContent&&"<mxfile"==z.textContent.substring(0,7)&&"</mxfile>"==z.textContent.substring(z.textContent.length-9)||"<mxGraphModel"==z.textContent.substring(0,13)&&"</mxGraphModel>"==z.textContent.substring(z.textContent.length-15)?z.textContent.replace(/\u00a0/g," "):z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText);try{var ea=da.lastIndexOf("%3E");0<=ea&&ea<da.length-3&&(da=da.substring(0,ea+3))}catch(aa){}try{F=+z.getElementsByTagName("span"),(K=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(da))&&(this.isCompatibleString(K)||0==K.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(J=!0,da=K)}catch(aa){}try{if(null!=da&&0<da.length){if(0==da.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ca=mxUtils.bind(this,function(){try{da=(new MiroImporter).importMiroJson(JSON.parse(da)),this.pasteXml(da,t,J,c)}catch(aa){console.log("Miro import error:",+aa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ca):ca()}else this.pasteXml(da,t,J,c,C);try{mxEvent.consume(c)}catch(aa){}}else if(!l){var X=this.editor.graph;X.lastPasteXml=null;X.pasteCounter=0}}catch(aa){this.handleError(aa)}}}f.innerHTML=" "};EditorUi.prototype.showPrintDialog=function(c,f,l){var t=320;this.editor.graph.isEnabled()&&(t+=40);null!=this.pages&&1<this.pages.length&&(t+=40,this.editor.graph.isEnabled()||(t+=10));null==f||mxClient.IS_CHROMEAPP||+"draw.io"!=this.getServiceName()||(t+=20);this.showDialog((new PrintDialog(this,c,f,l)).container,320,t,!0,!0)};EditorUi.prototype.print=function(c,f){var l=this.editor,t=l.graph,z=this.getPageIndex(this.currentPage),C=null!=z?z+1:1,F=mxUtils.bind(this,function(la,Y,ma,Z){var k=la.useCssTransforms,A=la.currentTranslate,I=la.currentScale,T=la.view.translate,O=la.view.scale;la.useCssTransforms&&(la.useCssTransforms=!1,la.currentTranslate=new mxPoint(0,0),la.currentScale=1,la.view.translate=new mxPoint(0,+0),la.view.scale=1);var U=la.getGraphBounds(),V=0,ba=0,fa=mxRectangle.fromRectangle(la.pageFormat),pa=f.fit||f.crop||!la.pageVisible,sa=f.scale;fa.width=Math.ceil(fa.width*la.pageScale);fa.height=Math.ceil(fa.height*la.pageScale);var qa=1;if(f.fit){qa=f.sheetsAcross;var wa=f.sheetsDown;isNaN(sa)||(fa.width=Math.ceil(fa.width*sa),fa.height=Math.ceil(fa.height*sa));qa=Math.min(fa.height*wa/(U.height/la.view.scale),fa.width*qa/(U.width/la.view.scale))}else qa=isNaN(sa)?1:sa;qa*=1;!pa&&la.pageVisible?+(sa=la.getPageLayout(),V-=sa.x*fa.width,ba-=sa.y*fa.height):pa=!0;f.crop&&(f.selection&&(U=t.getBoundingBox(t.getSelectionCells())),fa.width=(U.width+1)*qa/la.view.scale,fa.height=(U.height+1)*qa/la.view.scale);fa.width=Math.ceil(1*fa.width);fa.height=Math.ceil(1*fa.height);Z=null!=Z?"page/id,"+Z:null;if(null==Y){Y=PrintDialog.createPrintPreview(la,qa,null,0,V,ba,pa);Y.title=this.getBaseFilename(!0);Y.pageSelector=!1;Y.mathEnabled=!1;V=f.border;isNaN(V)||(Y.pageMargin=V);f.selection&&(Y.isCellVisible=+function(ra){return la.isCellSelected(ra)});var Aa=Y.writeHead;Y.writeHead=function(ra){Aa.apply(this,arguments);mxClient.IS_GC&&(ra.writeln('<style type="text/css">'),ra.writeln("@media print {"),ra.writeln(".MathJax svg { shape-rendering: crispEdges; }"),ra.writeln("}"),ra.writeln("</style>"));null!=l.fontCss&&(ra.writeln('<style type="text/css">'),ra.writeln(mxUtils.htmlEntities(l.fontCss,!1,!1,!1)),ra.writeln("</style>"));for(var ya=la.getCustomFonts(),Ca=0;Ca<ya.length;Ca++){var Ka=ya[Ca].name,+Ha=ya[Ca].url;Graph.isCssFontUrl(Ha)?ra.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Ha))+'" charset="UTF-8" type="text/css">'):(ra.writeln('<style type="text/css">'),ra.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Ka)+'";\nsrc: url("'+mxUtils.htmlEntities(Ha)+'");\n}'),ra.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var za=Y.drawBackgroundImage;Y.drawBackgroundImage=function(ra){za.apply(this,arguments);null!=ra.node&&(EditorUi.embedSvgImages(ra.node),+t.disableSvgLinks(ra.node,function(ya){ya.setAttribute("href","javascript:void(0)")}))}}var Da=Y.addGraphFragment;Y.addGraphFragment=function(ra,ya,Ca,Ka,Ha,Ba){Da.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:Ha.classList.add("geDisableMathJax")};f.grid&&(Y.gridSize=la.gridSize,Y.gridSteps=la.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:la.view.gridColor);Y.open(null,null,ma,!0,Z,fa,f.selection?la.getSelectionCells():null)}else{U=+la.background;if(null==U||""==U||U==mxConstants.NONE)U="#ffffff";Y.backgroundColor=U;Y.autoOrigin=pa;f.grid&&(Y.gridSize=la.gridSize,Y.gridSteps=la.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:la.view.gridColor);Y.appendGraph(la,qa,V,ba,ma,!0,Z,fa,f.selection?la.getSelectionCells():null);ma=la.getCustomFonts();if(null!=Y.wnd)for(fa=0;fa<ma.length;fa++)V=ma[fa].name,ba=ma[fa].url,Graph.isCssFontUrl(ba)?Y.wnd.document.writeln('<link rel="stylesheet" href="'++mxUtils.htmlEntities(ba)+'" charset="UTF-8" type="text/css">'):(Y.wnd.document.writeln('<style type="text/css">'),Y.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(V)+'";\nsrc: url("'+mxUtils.htmlEntities(ba)+'");\n}'),Y.wnd.document.writeln("</style>"))}k&&(la.useCssTransforms=k,la.currentTranslate=A,la.currentScale=I,la.view.translate=T,la.view.scale=O);return Y}),N=f.pagesFrom,K=f.pagesTo,J=!f.allPages;z=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);+else{J&&(J=f.selection||N==C&&K==C);if(!J&&null!=this.pages&&this.pages.length){J=0;C=this.pages.length-1;f.allPages||(J=parseInt(N)-1,C=parseInt(K)-1);for(var da=J;da<=C;da++){var ea=this.pages[da];N=ea==this.currentPage?t:null;if(null==N){N=this.createTemporaryGraph(t.stylesheet);N.shapeForegroundColor=t.shapeForegroundColor;N.shapeBackgroundColor=t.shapeBackgroundColor;K=!0;J=!1;var ca=null,X=null;null==ea.viewState&&null==ea.root&&this.updatePageRoot(ea);null!=ea.viewState&&(K=ea.viewState.pageVisible,+J=ea.viewState.mathEnabled,ca=ea.viewState.background,X=ea.viewState.backgroundImage,N.pageFormat=ea.viewState.pageFormat,N.gridSize=ea.viewState.gridSize);null!=X&&null!=X.originalSrc&&(X=this.createImageForPageLink(X.originalSrc,ea));N.background=ca;N.backgroundImage=null!=X?new mxImage(X.src,X.width,X.height,X.x,X.y):null;N.pageVisible=K;N.mathEnabled=J;var aa=N.getGraphBounds;N.getGraphBounds=function(){var la=aa.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var ma=+this.view.translate,Z=this.view.scale;la=mxRectangle.fromRectangle(la);la.add(new mxRectangle((ma.x+Y.x)*Z,(ma.y+Y.y)*Z,Y.width*Z,Y.height*Z))}return la};var ia=N.getGlobalVariable;N.getGlobalVariable=function(la){return"page"==la?ea.getName():"pagenumber"==la?da+1:"pagecount"==la?null!=this.pages?this.pages.length:1:ia.apply(this,arguments)};document.body.appendChild(N.container);this.updatePageRoot(ea);N.model.setRoot(ea.root)}z=F(N,z,da!=C,ea.getId());N!=t&&N.container.parentNode.removeChild(N.container)}}else z=+F(t);null==z||null==z.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(z.mathEnabled&&(F=z.wnd.document,c||(z.wnd.IMMEDIATE_PRINT=!0),F.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),z.closeDocument(),Graph.rewritePageLinks(z.wnd.document,!0),z.mathEnabled||c||PrintDialog.printPreview(z));return z}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,l=0;l<c.length;l++)mxEvent.addListener(c[l],"dragleave",function(t){null!=+f&&(f.parentNode.removeChild(f),f=null);t.stopPropagation();t.preventDefault()}),mxEvent.addListener(c[l],"dragover",mxUtils.bind(this,function(t){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());t.stopPropagation();t.preventDefault()})),mxEvent.addListener(c[l],"drop",mxUtils.bind(this,function(t){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<+t.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(t.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(t)&&!mxEvent.isShiftDown(t)):this.openFiles(t.dataTransfer.files,!0);else{var z=this.extractGraphModelFromEvent(t);if(null==z){var C=null!=t.dataTransfer?t.dataTransfer:t.clipboardData;null!=C&&(10==document.documentMode||11==document.documentMode?z=C.getData("Text"):(z=null,z=0<=mxUtils.indexOf(C.types,"text/uri-list")?t.dataTransfer.getData("text/uri-list"):+0<=mxUtils.indexOf(C.types,"text/html")?C.getData("text/html"):null,null!=z&&0<z.length?(C=document.createElement("div"),C.innerHTML=Graph.sanitizeHtml(z),C=C.getElementsByTagName("img"),0<C.length&&(z=C[0].getAttribute("src"))):0<=mxUtils.indexOf(C.types,"text/plain")&&(z=C.getData("text/plain"))),null!=z&&(Editor.isPngDataUrl(z)?(z=Editor.extractGraphModelFromPng(z),null!=z&&0<z.length&&this.openLocalFile(z,null,!0)):this.isRemoteFileFormat(z)?this.isOffline()?this.showError(mxResources.get("error"),+mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(z))).send(mxUtils.bind(this,function(F){200<=F.getStatus()&&299>=F.getStatus()?this.openLocalFile(F.getText(),null,!0):this.showError(mxResources.get("error"),413==F.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(z)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(z):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost++"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(z)))))}else this.openLocalFile(z,null,!0)}t.stopPropagation();t.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var f=0,l=0;if(null==c){var t=document.body;var z=document.documentElement;var C=(t.clientWidth||z.clientWidth)-3;t=Math.max(t.clientHeight||0,z.clientHeight)-3}else f=c.offsetTop,l=c.offsetLeft,C=c.clientWidth,t=c.clientHeight;z=document.createElement("div");z.style.zIndex=mxPopupMenu.prototype.zIndex++2;z.style.border="3px dotted rgb(254, 137, 12)";z.style.pointerEvents="none";z.style.position="absolute";z.style.top=f+"px";z.style.left=l+"px";z.style.width=Math.max(0,C-3)+"px";z.style.height=Math.max(0,t-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(z):document.body.appendChild(z);return z};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var f=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=f){var l=new mxCodec(f.ownerDocument),+t=new mxGraphModel;l.decode(f,t);f=t.getChildAt(t.getRoot(),0);for(l=0;l<t.getChildCount(f);l++)c.push(t.getChildAt(f,l))}return c};EditorUi.prototype.openFileHandle=function(c,f,l,t,z,C){if(null!=f&&0<f.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(f)||/(\.pdf)$/i.test(f))f=f.substring(0,f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var F=mxUtils.bind(this,function(K){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==K.substring(0,10)){null==+this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,K,f)),this.showSidebar()}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(K,f,t)});if(EditorUi.isVisioFilename(f))this.importVisio(l,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}));else if(Graph.fileSupport&&+(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(K){4==K.readyState&&(this.spinner.stop(),200<=K.status&&299>=K.status?F(K.responseText):this.handleError({message:mxResources.get(413==K.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(f)&&(f=f.substring(0,+f.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(K){this.spinner.stop();this.openLocalFile(K,f,t)}),mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,c,l.name)),this.showSidebar()}catch(K){this.handleError(K,mxResources.get("errorLoadingFile"))}}else if(0==+c.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,f,t)}));else{if("image/png"==l.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==l.type){var N=Editor.extractGraphModelFromPdf(c);null!=N&&(z=null,t=!0,c=N)}this.spinner.stop();this.openLocalFile(c,f,t,z,null!=z?l:null,C)}}};EditorUi.prototype.openFiles=function(c,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=+0;l<c.length;l++)mxUtils.bind(this,function(t){var z=new FileReader;z.onload=mxUtils.bind(this,function(C){try{this.openFileHandle(C.target.result,t.name,t,f)}catch(F){this.handleError(F)}});z.onerror=mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C);window.openFile=null});"image"!==t.type.substring(0,5)&&"application/pdf"!==t.type||"image/svg"===t.type.substring(0,9)?z.readAsText(t):z.readAsDataURL(t)})(c[l])};EditorUi.prototype.openLocalFile=function(c,f,l,t,z,C){var F=this.getCurrentFile(),+N=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var K=mxUtils.parseXml(c);null!=K&&(this.editor.setGraphXml(K.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,f||this.defaultFilename,l,t,z,C))});if(null!=c&&0<c.length)null==F||!F.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)?N():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)&&null!=F&&F.isModified()?this.confirm(mxResources.get("allChangesLost"),+null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,f),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=F&&F.isModified()?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):N()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var f=+0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);f=[];for(var l in c)f.push(l);return f};EditorUi.prototype.addBasenamesForCell=function(c,f){function l(F){if(null!=F){var N=F.lastIndexOf(".");0<N&&(F=F.substring(N+1,F.length));null==f[F]&&(f[F]=!0)}}var t=this.editor.graph,z=t.getCellStyle(c);l(mxStencilRegistry.getBasenameForStencil(z[mxConstants.STYLE_SHAPE]));t.model.isEdge(c)&&+(l(mxMarker.getPackageForType(z[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(z[mxConstants.STYLE_ENDARROW])));z=t.model.getChildCount(c);for(var C=0;C<z;C++)this.addBasenamesForCell(t.model.getChildAt(c,C),f)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=c&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme?+"":"none";this.editor.graph.setEnabled(c);null!=this.tabContainer&&(this.tabContainer.style.visibility=c&&0<parseInt(this.tabContainer.style.height)?"":"hidden");null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=c?"":"hidden",this.ruler.vRuler.container.style.visibility=c?"":"hidden");c||this.hideWindows()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=+!1;this.installMessageHandler(mxUtils.bind(this,function(f,l,t,z){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(z)try{var C=this.editor.graph;C.setGridEnabled(!1);C.pageVisible=!1;var F=C.model.cells,N;for(N in F){var K=F[N];null!=K&&null!=K.style&&(K.style+=";sketch=1;"+(-1==K.style.indexOf("fontFamily=")||-1<K.style.indexOf("fontFamily=Helvetica;")?+"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(J){console.log(J)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=t?t:!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(c,f){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();f(l)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,+translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var l=window.opener||window.parent;if(this.editor.modified){var t=f.background;if(null==t||t==mxConstants.NONE)t=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,+null,null,!1),f,null,!0,mxUtils.bind(this,function(z){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(z)}),"*")}),null,null,!0,t,1,this.embedExportBorder,null,this.embedExportTheme)}else c||l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=+!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(z){c||this.handleError(z)}};EditorUi.prototype.installMessageHandler=function(c){var f=null,l=!1,t=!1,z=null,C=mxUtils.bind(this,function(K,J){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,C);mxEvent.addListener(window,"message",mxUtils.bind(this,+function(K){if(K.source==(window.opener||window.parent)){var J=K.data,da=null,ea=mxUtils.bind(this,function(ra){if(null!=ra&&"function"===typeof ra.charAt&&"<"!=ra.charAt(0))try{Editor.isPngDataUrl(ra)?ra=Editor.extractGraphModelFromPng(ra):"data:image/svg+xml;base64,"==ra.substring(0,26)?ra=atob(ra.substring(26)):"data:image/svg+xml;utf8,"==ra.substring(0,24)&&(ra=ra.substring(24)),null!=ra&&(""==ra.trim()?ra=null:"%"==ra.charAt(0)?ra=decodeURIComponent(ra):"<"!=ra.charAt(0)&&(ra=Graph.decompress(ra)))}catch(ya){}return ra});+if("json"==urlParams.proto){var ca=!1;try{J=JSON.parse(J),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[K],"data",[J])}catch(ra){J=null}try{if(null==J)return;if("dialog"==J.action){this.showError(null!=J.titleKey?mxResources.get(J.titleKey):J.title,null!=J.messageKey?mxResources.get(J.messageKey):mxUtils.htmlEntities(J.message),null!=J.buttonKey?mxResources.get(J.buttonKey):J.button);null!=J.modified&&(this.editor.modified=J.modified);return}if("layout"==J.action){this.executeLayouts(this.editor.graph.createLayouts(J.layouts));+return}if("prompt"==J.action){this.spinner.stop();var X=new FilenameDialog(this,J.defaultValue||"",null!=J.okKey?mxResources.get(J.okKey):J.ok,function(ra){null!=ra?F.postMessage(JSON.stringify({event:"prompt",value:ra,message:J}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")},null!=J.titleKey?mxResources.get(J.titleKey):J.title,null,null,null,null,function(){F.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")});this.showDialog(X.container,300,80,!0,!1);+X.init();return}if("draft"==J.action){var aa=ea(J.xml);this.spinner.stop();X=new DraftDialog(this,mxResources.get("draftFound",[J.name||this.defaultFilename]),aa,mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"edit",message:J}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"discard",message:J}),"*")}),J.editKey?mxResources.get(J.editKey):null,J.discardKey?mxResources.get(J.discardKey):null,+J.ignore?mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:J}),"*")}):null);this.showDialog(X.container,640,480,!0,!1,mxUtils.bind(this,function(ra){ra&&this.actions.get("exit").funct()}));try{X.init()}catch(ra){F.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:J}),"*")}return}if("template"==J.action){this.spinner.stop();var ia=1==J.enableRecent,la=1==J.enableSearch,Y=1==J.enableCustomTemp;X=new NewDialog(this,+!1,J.templatesOnly?!1:null!=J.callback,mxUtils.bind(this,function(ra,ya,Ca,Ka){ra=ra||this.emptyDiagramXml;null!=J.callback?F.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:ya,tempUrl:Ca,libs:Ka,builtIn:!0,message:J}),"*"):(c(ra,K,ra!=this.emptyDiagramXml,J.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ia?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,+"Network Error!")})}):null,la?mxUtils.bind(this,function(ra,ya){this.remoteInvoke("searchDiagrams",[ra,null],null,ya,function(){ya(null,"Network Error!")})}):null,mxUtils.bind(this,function(ra,ya,Ca){F.postMessage(JSON.stringify({event:"template",docUrl:ra,info:ya,name:Ca}),"*")}),null,null,Y?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==J.withoutType);this.showDialog(X.container,620,460,!0,!1,mxUtils.bind(this,function(ra){null!=+this.sidebar&&this.sidebar.hideTooltip();ra&&this.actions.get("exit").funct()}));X.init();return}if("textContent"==J.action){var ma=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:ma,message:J}),"*");return}if("status"==J.action){null!=J.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(J.messageKey))):null!=J.message&&this.editor.setStatus(mxUtils.htmlEntities(J.message));null!=J.modified&&(this.editor.modified=J.modified);return}if("spinner"==+J.action){var Z=null!=J.messageKey?mxResources.get(J.messageKey):J.message;null==J.show||J.show?this.spinner.spin(document.body,Z):this.spinner.stop();return}if("exit"==J.action){this.actions.get("exit").funct();return}if("viewport"==J.action){null!=J.viewport&&(this.embedViewport=J.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==J.action){X=null;try{var k=this.diagramContainer.getAttribute("data-scrollState");null!=k&&+(this.diagramContainer.removeAttribute("data-scrollState"),X=JSON.parse(k))}catch(ra){}Editor.inlineFullscreen=J.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=X&&this.restoreScrollState(X);return}if("snapshot"==J.action){this.sendEmbeddedSvgExport(!0);return}if("export"==J.action){if("png"==J.format||"xmlpng"==J.format){if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){var A=null!=J.xml?J.xml:this.getFileData(!0);+this.editor.graph.setEnabled(!1);var I=this.editor.graph,T=mxUtils.bind(this,function(ra,ya){if(J.withSvg)J.withSvg=!1,this.getEmbeddedSvg(A,this.editor.graph,null,!0,function(Ka){T(ra,Ka)},null,null,J.embedImages,this.editor.graph.background,J.scale,J.border,J.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var Ca=this.createLoadMessage("export");Ca.format=J.format;Ca.message=J;Ca.data=ra;Ca.svg=ya;Ca.xml=A;F.postMessage(JSON.stringify(Ca),"*")}}),O=mxUtils.bind(this,function(ra){null==+ra&&(ra=Editor.blankImage);"xmlpng"==J.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(A)));I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);T(ra)}),U=J.pageId||(null!=this.pages?J.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var V=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=U){var ra=I.getGlobalVariable;I=this.createTemporaryGraph(I.getStylesheet());for(var ya,Ca=0;Ca<+this.pages.length;Ca++)if(this.pages[Ca].getId()==U){ya=this.updatePageRoot(this.pages[Ca]);break}null==ya&&(ya=this.currentPage);I.getGlobalVariable=function(Pa){return"page"==Pa?ya.getName():"pagenumber"==Pa?1:ra.apply(this,arguments)};document.body.appendChild(I.container);I.model.setRoot(ya.root)}if(null!=J.layerIds){var Ka=I.model,Ha=Ka.getChildCells(Ka.getRoot()),Ba={};for(Ca=0;Ca<J.layerIds.length;Ca++)Ba[J.layerIds[Ca]]=!0;for(Ca=0;Ca<Ha.length;Ca++)Ka.setVisible(Ha[Ca],Ba[Ha[Ca].id]||!1)}Ca=+null;J.keepTheme&&(Ca=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Pa){O(Pa.toDataURL("image/png"))}),J.width,null,J.background,mxUtils.bind(this,function(){O(null)}),null,null,J.scale,J.transparent,J.shadow,null,I,J.border,null,J.grid,Ca)});null!=J.xml&&0<J.xml.length&&(l=!0,this.setFileData(A),l=!1);V()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==J.format?"1":"0")+(null!=U?"&pageId="+U:"")+(null!=J.layerIds&&0<J.layerIds.length?+"&extras="+encodeURIComponent(JSON.stringify({layerIds:J.layerIds})):"")+(null!=J.scale?"&scale="+J.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?T("data:image/png;base64,"+ra.getText()):O(null)}),mxUtils.bind(this,function(){O(null)}))}}else if(V=mxUtils.bind(this,function(){var ra=this.createLoadMessage("export");ra.message=J;if("html2"==J.format||"html"==J.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ya=+this.getXmlFileData();ra.xml=mxUtils.getXml(ya);ra.data=this.getFileData(null,null,!0,null,null,null,ya);ra.format=J.format}else if("html"==J.format)ya=this.editor.getGraphXml(),ra.data=this.getHtml(ya,this.editor.graph),ra.xml=mxUtils.getXml(ya),ra.format=J.format;else{mxSvgCanvas2D.prototype.foAltText=null;ya=null!=J.background?J.background:this.editor.graph.background;ya==mxConstants.NONE&&(ya=null);ra.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ra.format="svg";var Ca=mxUtils.bind(this,+function(Ha){this.editor.graph.setEnabled(!0);this.spinner.stop();ra.data=Editor.createSvgDataUri(Ha);F.postMessage(JSON.stringify(ra),"*")}),Ka="auto";J.keepTheme&&(Ka=Editor.isDarkMode()?"dark":"light");null!=J.theme&&(Ka=J.theme);if("xmlsvg"==J.format){if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){Ka=null;if(this.isAutoDarkMode()||Editor.isDarkMode())Ka="auto";null!=J.theme&&(Ka=J.theme);this.getEmbeddedSvg(ra.xml,this.editor.graph,+null,!0,Ca,null,null,J.embedImages,ya,J.scale,J.border,J.shadow,Ka)}}else if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin))this.editor.graph.setEnabled(!1),ya=this.editor.graph.getSvg(ya,J.scale,J.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||J.shadow,null,Ka),(this.editor.graph.shadowVisible||J.shadow)&&this.editor.graph.addSvgShadow(ya),this.embedFonts(ya,mxUtils.bind(this,function(Ha){J.embedImages||null==+J.embedImages?this.editor.convertImages(Ha,mxUtils.bind(this,function(Ba){Ca(mxUtils.getXml(Ba))})):Ca(mxUtils.getXml(Ha))}));return}F.postMessage(JSON.stringify(ra),"*")}),null!=J.xml&&0<J.xml.length){if(this.editor.graph.mathEnabled){var ba=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){ba.apply(this,arguments);V()}}l=!0;this.setFileData(J.xml);l=!1;this.editor.graph.mathEnabled||V()}else V();return}if("load"==J.action){ca=J.toSketch;t=1==J.autosave;this.hideDialog();null!=J.modified&&null==+urlParams.modified&&(urlParams.modified=J.modified);null!=J.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=J.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=J.noSaveBtn&&null==urlParams.noSaveBtn&&+(urlParams.noSaveBtn=J.noSaveBtn);if(null!=J.rough){var fa=Editor.sketchMode;this.doSetSketchMode(J.rough);fa!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=J.dark&&this.setDarkMode(J.dark);null!=J.border&&(this.embedExportBorder=J.border);null!=J.theme&&(this.embedExportTheme=J.theme);null!=J.background&&(this.embedExportBackground=J.background);null!=J.viewport&&(this.embedViewport=J.viewport);this.embedExitPoint=null;if(null!=J.rect){var pa=this.embedExportBorder;+this.diagramContainer.style.left=Math.max(60,J.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,J.rect.top)+"px";this.minInlineWidth=J.minWidth;this.minInlineHeight=J.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var sa=J.maxFitScale,qa=J.rect.width+2*pa,wa=J.rect.height+2*pa;da=mxUtils.bind(this,function(){var ra=mxUtils.getDocumentSize();qa=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,+qa):qa,ra.width-80);ra=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,wa):wa,ra.height-80);this.diagramContainer.style.width=qa+"px";this.diagramContainer.style.height=ra+"px";var ya=this.editor.graph;ra=ya.maxFitScale;ya.maxFitScale=sa;ya.fit(2*pa,null,null,null,null,null,wa);this.setPageVisible(!1);if(null!=this.minInlineWidth&&ya.getGraphBounds().width<this.minInlineWidth){var Ca=ya.container.scrollTop;this.resetScrollbars();ya.container.scrollTop=Ca}ya.maxFitScale=ra;ya.container.scrollTop-=+pa;ya.container.scrollLeft-=pa;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[J]));ya.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=ya.container.style.top);var Ka=ya.getGraphBounds();ya.container.clientWidth>Ka.width+2*pa&&(ya.container.scrollLeft=Ka.x+(Ka.width+pa-ya.container.clientWidth)/2)}),10)})}null!=J.noExitBtn&&null==urlParams.noExitBtn&&+(urlParams.noExitBtn=J.noExitBtn);null!=J.title&&null!=this.buttonContainer&&(aa=this.createStatusDiv(""),mxUtils.write(aa,J.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(aa),this.embedFilenameSpan=aa);try{J.libs&&this.sidebar.showEntries(J.libs)}catch(ra){}J=null!=J.xmlpng?this.extractGraphModelFromPng(J.xmlpng):null!=J.descriptor?J.descriptor:J.xml}else{if("merge"==J.action){var Aa=this.getCurrentFile();+null!=Aa&&(aa=ea(J.xml),null!=aa&&""!=aa&&Aa.mergeFile(new LocalFile(this,aa),function(){F.postMessage(JSON.stringify({event:"merge",message:J}),"*")},function(ra){F.postMessage(JSON.stringify({event:"merge",message:J,error:ra}),"*")}))}else"remoteInvokeReady"==J.action?this.handleRemoteInvokeReady(F):"remoteInvoke"==J.action?this.handleRemoteInvoke(J,K.origin):"remoteInvokeResponse"==J.action?this.handleRemoteInvokeResponse(J):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(J)}),+"*");return}}catch(ra){this.handleError(ra)}}var za=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Da=mxUtils.bind(this,function(ra,ya){l=!0;try{c(ra,ya,null,ca)}catch(Ca){this.handleError(Ca)}l=!1;null!=urlParams.modified&&this.editor.setStatus("");z=za();t&&null==f&&(f=mxUtils.bind(this,function(Ca,Ka){Ca=za();Ca==z||l||(Ka=this.createLoadMessage("autosave"),Ka.xml=Ca,(window.opener||+window.parent).postMessage(JSON.stringify(Ka),"*"));z=Ca}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",+f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ya=this.createLoadMessage("load"),ya.xml=ra,F.postMessage(JSON.stringify(ya),"*");null!=da&&da()});null!=J&&"function"===typeof J.substring&&"data:application/vnd.visio;base64,"==J.substring(0,34)?(ea="0M8R4KGxGuE"==J.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(J.substring(J.indexOf(",")+1)),function(ra){Da(ra,K)},mxUtils.bind(this,+function(ra){this.handleError(ra)}),ea)):null!=J&&"function"===typeof J.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(J,mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&299>=ra.status&&"<mxGraphModel"==ra.responseText.substring(0,13)?Da(ra.responseText,K):this.handleError({message:413==ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),+""):null!=J&&"function"===typeof J.substring&&this.isLucidChartData(J)?this.convertLucidChart(J,mxUtils.bind(this,function(ra){Da(ra)}),mxUtils.bind(this,function(ra){this.handleError(ra)})):null==J||"object"!==typeof J||null==J.format||null==J.data&&null==J.url?(J=ea(J),Da(J,K)):this.loadDescriptor(J,mxUtils.bind(this,function(ra){Da(za(),K)}),mxUtils.bind(this,function(ra){this.handleError(ra,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;C="json"==urlParams.proto?+JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(C,"*");if("json"==urlParams.proto){var N=this.editor.graph.openLink;this.editor.graph.openLink=function(K,J,da){N.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:K,target:J,allowOpener:da}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,f,l,t){var z="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,C=document.createElement("button");C.setAttribute("title",+c+(null!=l?" ("+l+")":""));C.style.marginLeft="6px";mxUtils.write(C,c);z?(C.className=t?"gePrimaryBtn":"",C.style.marginLeft="8px",C.style.padding="6px"):C.className="geBigButton"+(t?"":" geBigStandardButton");mxEvent.addListener(C,"click",f);return C};EditorUi.prototype.addEmbedButtons=function(){var c=document.createElement("div");c.style.display="inline-flex";c.style.alignItems="center";c.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&+(c.style.marginRight="66px",c.style.order="1","atlas"==Editor.currentTheme&&(c.style.marginTop="2px"));document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(c.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),+"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&c.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||null==+this.buttonContainer?null!=this.menubar&&(this.toolbar.container.style.paddingLeft="6px",this.toolbar.container.appendChild(c),this.toolbar.staticElements.push(c)):(this.buttonContainer.appendChild(c),this.editor.fireEvent(new mxEventObject("statusChanged")))};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,+null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var f=new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(l){if(0<l.length)try{var t=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(t));+this.customLayoutConfig=t;this.hideDialog()}catch(z){this.handleError(z)}}),null,null,null,null,mxUtils.bind(this,function(l,t){var z=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var C=t.value;t.value=JSON.stringify(JSON.parse(C));t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));t.value=C}catch(F){this.handleError(F)}}));z.setAttribute("title",+"copy");z.className="geBtn";l.appendChild(z)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var l=mxUtils.bind(this,function(){this.loadingOrgChart=!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),t=mxUtils.bind(this,function(z){this.loadingOrgChart=!1;f.clear()&&this.handleError(z)});"undefined"!==+typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",l,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",+l,null,null,null,t))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var l=c.split("\n"),t=[],z=[],C=[],F={};if(0<l.length){var N={},K=this.editor.graph,J=null,da=null,ea=null,ca=null,X=null,aa=null,ia=null,la="whiteSpace=wrap;html=1;",Y=null,ma=null,Z="",k="auto",A="auto",I=!1,T=null,O=null,U=40,V=40,ba=100,fa=0,pa=mxUtils.bind(this,function(){null!=f?f(xa):(K.setSelectionCells(xa),+K.scrollCellToVisible(K.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),sa=K.getFreeInsertPoint(),qa=sa.x,wa=sa.y;sa=wa;var Aa=null,za="auto";ma=null;for(var Da=[],ra=null,ya=null,Ca=0;Ca<l.length&&"#"==l[Ca].charAt(0);){c=l[Ca].replace(/\r$/,"");for(Ca++;Ca<l.length&&"\\"==c.charAt(c.length-1)&&"#"==l[Ca].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(l[Ca].substring(1)),Ca++;if("#"!=c.charAt(1)){var Ka=c.indexOf(":");+if(0<Ka){var Ha=mxUtils.trim(c.substring(1,Ka)),Ba=mxUtils.trim(c.substring(Ka+1));"label"==Ha?Aa=Graph.sanitizeHtml(Ba):"labelname"==Ha&&0<Ba.length&&"-"!=Ba?X=Ba:"labels"==Ha&&0<Ba.length&&"-"!=Ba?ia=JSON.parse(Ba):"style"==Ha?da=Ba:"parentstyle"==Ha?la=Ba:"unknownStyle"==Ha&&"-"!=Ba?aa=Ba:"stylename"==Ha&&0<Ba.length&&"-"!=Ba?ca=Ba:"styles"==Ha&&0<Ba.length&&"-"!=Ba?ea=JSON.parse(Ba):"vars"==Ha&&0<Ba.length&&"-"!=Ba?J=JSON.parse(Ba):"identity"==Ha&&0<Ba.length&&"-"!=Ba?Y=Ba:"parent"==Ha&&0<Ba.length&&+"-"!=Ba?ma=Ba:"namespace"==Ha&&0<Ba.length&&"-"!=Ba?Z=Ba:"width"==Ha?k=Ba:"height"==Ha?A=Ba:"collapsed"==Ha&&"-"!=Ba?I="true"==Ba:"left"==Ha&&0<Ba.length?T=Ba:"top"==Ha&&0<Ba.length?O=Ba:"ignore"==Ha?ya=Ba.split(","):"connect"==Ha?Da.push(JSON.parse(Ba)):"link"==Ha?ra=Ba:"padding"==Ha?fa=parseFloat(Ba):"edgespacing"==Ha?U=parseFloat(Ba):"nodespacing"==Ha?V=parseFloat(Ba):"levelspacing"==Ha?ba=parseFloat(Ba):"layout"==Ha&&(za=Ba)}}}if(null==l[Ca])throw Error(mxResources.get("invalidOrMissingFile"));+var Pa=this.editor.csvToArray(l[Ca].replace(/\r$/,""));Ka=c=null;Ha=[];for(Ba=0;Ba<Pa.length;Ba++)Y==Pa[Ba]&&(c=Ba),ma==Pa[Ba]&&(Ka=Ba),Ha.push(mxUtils.trim(Pa[Ba]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Aa&&(Aa="%"+Ha[0]+"%");if(null!=Da)for(var $a=0;$a<Da.length;$a++)null==N[Da[$a].to]&&(N[Da[$a].to]={});Y=[];for(Ba=Ca+1;Ba<l.length;Ba++){var Na=this.editor.csvToArray(l[Ba].replace(/\r$/,""));if(null==Na){var Ya=40<l[Ba].length?l[Ba].substring(0,40)+"...":l[Ba];+throw Error(Ya+" ("+Ba+"):\n"+mxResources.get("containsValidationErrors"));}0<Na.length&&Y.push(Na)}K.model.beginUpdate();try{for(Ba=0;Ba<Y.length;Ba++){Na=Y[Ba];var Ea=null,x=null!=c?Z+Na[c]:null;l=!1;null!=x&&(Ea=K.model.getCell(x),l=null==Ea||0<=mxUtils.indexOf(t,Ea));var L=new mxCell(Aa,new mxGeometry(qa,sa,0,0),da||"whiteSpace=wrap;html=1;");L.collapsed=I;L.vertex=!0;L.id=x;null==Ea||l||K.model.setCollapsed(Ea,I);for(var R=0;R<Na.length;R++)K.setAttributeForCell(L,Ha[R],Na[R]),null==Ea||l||K.setAttributeForCell(Ea,+Ha[R],Na[R]);if(null!=X&&null!=ia){var W=ia[L.getAttribute(X)];null!=W&&(K.labelChanged(L,W),null==Ea||l||K.cellLabelChanged(Ea,W))}if(null!=ca&&null!=ea){var ja=ea[L.getAttribute(ca)];null!=ja&&(L.style=ja)}K.setAttributeForCell(L,"placeholders","1");L.style=K.replacePlaceholders(L,L.style,J);null==Ea||l?K.fireEvent(new mxEventObject("cellsInserted","cells",[L])):(K.model.setStyle(Ea,L.style),0>mxUtils.indexOf(C,Ea)&&C.push(Ea),K.fireEvent(new mxEventObject("cellsInserted","cells",[Ea])));l=null!=+Ea;Ea=L;if(!l)for($a=0;$a<Da.length;$a++)N[Da[$a].to][Ea.getAttribute(Da[$a].to)]=Ea;null!=ra&&"link"!=ra&&(K.setLinkForCell(Ea,Ea.getAttribute(ra)),K.setAttributeForCell(Ea,ra,null));var ka=this.editor.graph.getPreferredSizeForCell(Ea);ma=null!=Ka?K.model.getCell(Z+Na[Ka]):null;if(Ea.vertex){Ya=null!=ma?0:qa;Ca=null!=ma?0:wa;null!=T&&null!=Ea.getAttribute(T)&&(Ea.geometry.x=Ya+parseFloat(Ea.getAttribute(T)));null!=O&&null!=Ea.getAttribute(O)&&(Ea.geometry.y=Ca+parseFloat(Ea.getAttribute(O)));var oa=+"@"==k.charAt(0)?Ea.getAttribute(k.substring(1)):null;Ea.geometry.width=null!=oa&&"auto"!=oa?parseFloat(Ea.getAttribute(k.substring(1))):"auto"==k||"auto"==oa?ka.width+fa:parseFloat(k);var va="@"==A.charAt(0)?Ea.getAttribute(A.substring(1)):null;Ea.geometry.height=null!=va&&"auto"!=va&&"width"!=A?parseFloat(va):"auto"==A||"auto"==va?ka.height+fa:"width"==A?Ea.geometry.width:parseFloat(A);sa+=Ea.geometry.height+V}l?(null==F[x]&&(F[x]=[]),F[x].push(Ea)):(t.push(Ea),null!=ma?(ma.style=K.replacePlaceholders(ma,+la,J),K.addCell(Ea,ma),z.push(ma)):C.push(K.addCell(Ea)))}for(Ba=0;Ba<z.length;Ba++)oa="@"==k.charAt(0)?z[Ba].getAttribute(k.substring(1)):null,va="@"==A.charAt(0)?z[Ba].getAttribute(A.substring(1)):null,"auto"!=k&&"auto"!=oa||"auto"!=A&&"auto"!=va||K.updateGroupBounds([z[Ba]],fa,!0);var ta=C.slice(),xa=C.slice();for($a=0;$a<Da.length;$a++){var Fa=Da[$a];for(Ba=0;Ba<t.length;Ba++){Ea=t[Ba];var Ma=mxUtils.bind(this,function(mb,pb,db){var qb=pb.getAttribute(db.from);if(null!=qb&&""!=qb){qb=qb.split(",");+for(var nb=0;nb<qb.length;nb++){var lb=N[db.to][qb[nb]];if(null==lb&&null!=aa){lb=new mxCell(qb[nb],new mxGeometry(qa,wa,0,0),aa);lb.style=K.replacePlaceholders(pb,lb.style,J);var eb=this.editor.graph.getPreferredSizeForCell(lb);lb.geometry.width=eb.width+fa;lb.geometry.height=eb.height+fa;N[db.to][qb[nb]]=lb;lb.vertex=!0;lb.id=qb[nb];C.push(K.addCell(lb))}if(null!=lb){eb=db.label;null!=db.fromlabel&&(eb=(pb.getAttribute(db.fromlabel)||"")+(eb||""));null!=db.sourcelabel&&(eb=K.replacePlaceholders(pb,+db.sourcelabel,J)+(eb||""));null!=db.tolabel&&(eb=(eb||"")+(lb.getAttribute(db.tolabel)||""));null!=db.targetlabel&&(eb=(eb||"")+K.replacePlaceholders(lb,db.targetlabel,J));var tb="target"==db.placeholders==!db.invert?lb:mb;tb=null!=db.style?K.replacePlaceholders(tb,db.style,J):K.createCurrentEdgeStyle();eb=K.insertEdge(null,null,eb||"",db.invert?lb:mb,db.invert?mb:lb,tb);if(null!=db.labels)for(tb=0;tb<db.labels.length;tb++){var ob=db.labels[tb],ub=new mxCell(ob.label||tb,new mxGeometry(null!=ob.x?+ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=ob.placeholders&&(ub.value=K.replacePlaceholders("target"==ob.placeholders==!db.invert?lb:mb,ub.value,J));if(null!=ob.dx||null!=ob.dy)ub.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=ob.dy?ob.dy:0);eb.insert(ub)}if(null!=db.data)for(var Ab in db.data)K.setAttributeForCell(eb,Ab,db.data[Ab]);xa.push(eb);mxUtils.remove(db.invert?mb:lb,ta)}}}});Ma(Ea,Ea,Fa);if(null!=F[Ea.id])for(R=+0;R<F[Ea.id].length;R++)Ma(Ea,F[Ea.id][R],Fa)}}if(null!=ya)for(Ba=0;Ba<t.length;Ba++)for(Ea=t[Ba],R=0;R<ya.length;R++)K.setAttributeForCell(Ea,mxUtils.trim(ya[R]),null);if(0<C.length){var Wa=new mxParallelEdgeLayout(K);Wa.spacing=U;Wa.checkOverlap=!0;var Xa=function(){0<Wa.spacing&&Wa.execute(K.getDefaultParent());for(var mb=0;mb<C.length;mb++){var pb=K.getCellGeometry(C[mb]);pb.x=Math.round(K.snap(pb.x));pb.y=Math.round(K.snap(pb.y));"auto"==k&&(pb.width=Math.round(K.snap(pb.width)));"auto"==A&&+(pb.height=Math.round(K.snap(pb.height)))}};if("["==za.charAt(0)){var ab=pa;K.view.validate();this.executeLayouts(K.createLayouts(JSON.parse(za)),function(){Xa();ab()});pa=null}else if("circle"==za){var Oa=new mxCircleLayout(K);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Ra=Oa.isVertexIgnored;Oa.isVertexIgnored=function(mb){return Ra.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Oa.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}else if("horizontaltree"==za||"verticaltree"==+za||"auto"==za&&xa.length==2*C.length-1&&1==ta.length){K.view.validate();var kb=new mxCompactTreeLayout(K,"horizontaltree"==za);kb.levelDistance=V;kb.edgeRouting=!1;kb.resetEdges=!1;kb.sortEdges=!0;this.executeLayout(function(){kb.execute(K.getDefaultParent(),0<ta.length?ta[0]:null)},!0,pa);pa=null}else if("horizontalflow"==za||"verticalflow"==za||"auto"==za&&1==ta.length){K.view.validate();var cb=new mxHierarchicalLayout(K,"horizontalflow"==za?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);+cb.intraCellSpacing=V;cb.parallelEdgeSpacing=U;cb.interRankCellSpacing=ba;cb.disableEdgeStyle=!1;this.executeLayout(function(){cb.execute(K.getDefaultParent(),xa);K.moveCells(xa,qa,wa)},!0,pa);pa=null}else if("orgchart"==za){K.view.validate();var Za=new mxOrgChartLayout(K,2,ba,V),gb=Za.isVertexIgnored;Za.isVertexIgnored=function(mb){return gb.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Za.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}else if("organic"==za||"auto"==+za&&xa.length>C.length){K.view.validate();var hb=new mxFastOrganicLayout(K);hb.forceConstant=3*V;hb.disableEdgeStyle=!1;hb.resetEdges=!1;var vb=hb.isVertexIgnored;hb.isVertexIgnored=function(mb){return vb.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){hb.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}}this.hideDialog()}finally{K.model.endUpdate()}null!=pa&&pa()}}catch(mb){this.handleError(mb)}};EditorUi.prototype.getSearch=function(c){var f="";if("1"!=urlParams.offline&&+"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",t;for(t in urlParams)0>mxUtils.indexOf(c,t)&&null!=urlParams[t]&&(f+=l+t+"="+urlParams[t],l="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),t;for(t in urlParams)0>mxUtils.indexOf(l,+t)&&(c=0==f?c+"?":c+"&",null!=urlParams[t]&&(c+=t+"="+urlParams[t],f++))}return c};EditorUi.prototype.showLinkDialog=function(c,f,l,t,z){c=new LinkDialog(this,c,f,l,!0,t,z);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=+this.gitLab&&f++;c&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),f=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var l=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!l);this.actions.get("print").setEnabled(!l);this.menus.get("exportAs").setEnabled(!l);this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("smartFit").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("darkMode").setEnabled("atlas"!=Editor.currentTheme);this.actions.get("lightMode").setEnabled("atlas"!=Editor.currentTheme);l=this.actions.get("autoMode");l.setEnabled(l.isEnabled()&&"atlas"!=Editor.currentTheme);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(c),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(c));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&@@ -3980,14 +3981,14 @@ urlParams.embed&&this.editor.graph.isEnabled()||null!=f&&f.isEditable();this.actl.image&&0<l.cells.length);this.actions.get("crop").setEnabled(t&&l.image&&0<l.cells.length);this.actions.get("pageSetup").setEnabled(t);this.actions.get("shadowVisible").setEnabled(t);this.actions.get("connectionArrows").setEnabled(t);this.actions.get("connectionPoints").setEnabled(t);this.actions.get("copyStyle").setEnabled(t&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&t&&0<l.cells.length);this.actions.get("editGeometry").setEnabled(0<l.vertices.length);this.actions.get("createShape").setEnabled(t);this.actions.get("createRevision").setEnabled(t);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(t&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.actions.get("properties").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=-this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(t&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var R=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);R.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=+this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(t&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);Q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,l,t,z,C,F,N){var K=c.editor.graph;if("xml"==l)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(K.getSvg(t,z,C)),"image/svg+xml");else{var J=c.getFileData(!0,null,null,null,null,!0),da=K.getGraphBounds(),ea=Math.floor(da.width*z/K.view.scale),ca=Math.floor(da.height*z/K.view.scale);if(J.length<=MAX_REQUEST_SIZE&&ea*ca<MAX_AREA)if(c.hideDialog(),-"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.isExportToCanvas()){var W={globalVars:K.getExportVariables()};N&&(W.grid={size:K.gridSize,steps:K.view.gridSteps,color:K.view.gridColor});c.saveRequest(f,l,function(ba,ha){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(ha||"0")+(null!=ba?"&filename="+encodeURIComponent(ba):"")+"&extras="+encodeURIComponent(JSON.stringify(W))+(0<F?"&dpi="+F:"")+"&bg="+(null!=t?t:"none")+"&w="+ea+"&h="+ca+"&border="+C+"&xml="+encodeURIComponent(J))})}else"png"==l?c.exportImage(z,+"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.isExportToCanvas()){var X={globalVars:K.getExportVariables()};N&&(X.grid={size:K.gridSize,steps:K.view.gridSteps,color:K.view.gridColor});c.saveRequest(f,l,function(aa,ia){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(ia||"0")+(null!=aa?"&filename="+encodeURIComponent(aa):"")+"&extras="+encodeURIComponent(JSON.stringify(X))+(0<F?"&dpi="+F:"")+"&bg="+(null!=t?t:"none")+"&w="+ea+"&h="+ca+"&border="+C+"&xml="+encodeURIComponent(J))})}else"png"==l?c.exportImage(z,null==t||"none"==t,!0,!1,!1,C,!0,!1,null,N,F):c.exportImage(z,!1,!0,!1,!1,C,!0,!1,"jpeg",N);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,f="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var t=c;this.currentPage!=this.pages[l]&&(t=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[l]),t.model.setRoot(this.pages[l].root));f+=this.pages[l].getName()+" "+t.getIndexableText()+" "}else f=c.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var f={},l=document.createElement("div");l.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,mxUtils.htmlEntities(c));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(t);var z=document.createElement("div");z.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";z.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var C={};try{var F=mxSettings.getCustomLibraries();for(c=0;c<F.length;c++){var N=F[c];if("R"==N.substring(0,1)){var K=JSON.parse(decodeURIComponent(N.substring(1)));C[K[0]]={id:K[0],title:K[1],downloadUrl:K[2]}}}}catch(J){}this.remoteInvoke("getCustomLibraries",null,null,function(J){z.innerText="";if(0==J.length)z.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+-"</div>";else for(var da=0;da<J.length;da++){var ea=J[da];C[ea.id]&&(f[ea.id]=ea);var ca=this.addCheckbox(z,ea.title,C[ea.id]);(function(W,ba){mxEvent.addListener(ba,"change",function(){this.checked?f[W.id]=W:delete f[W.id]})})(ea,ca)}},mxUtils.bind(this,function(J){z.innerText="";var da=document.createElement("div");da.style.padding="8px";da.style.textAlign="center";mxUtils.write(da,mxResources.get("error")+": ");mxUtils.write(da,null!=J&&null!=J.message?J.message:mxResources.get("unknownError"));-z.appendChild(da)}));l.appendChild(z);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var J=0,da;for(da in f)null==C[da]&&(J++,mxUtils.bind(this,function(ea){this.remoteInvoke("getFileContent",[ea.downloadUrl],null,mxUtils.bind(this,function(ca){J--;0==J&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ca,ea)),this.showSidebar()}catch(W){this.handleError(W,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){J--;+"</div>";else for(var da=0;da<J.length;da++){var ea=J[da];C[ea.id]&&(f[ea.id]=ea);var ca=this.addCheckbox(z,ea.title,C[ea.id]);(function(X,aa){mxEvent.addListener(aa,"change",function(){this.checked?f[X.id]=X:delete f[X.id]})})(ea,ca)}},mxUtils.bind(this,function(J){z.innerText="";var da=document.createElement("div");da.style.padding="8px";da.style.textAlign="center";mxUtils.write(da,mxResources.get("error")+": ");mxUtils.write(da,null!=J&&null!=J.message?J.message:mxResources.get("unknownError"));+z.appendChild(da)}));l.appendChild(z);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var J=0,da;for(da in f)null==C[da]&&(J++,mxUtils.bind(this,function(ea){this.remoteInvoke("getFileContent",[ea.downloadUrl],null,mxUtils.bind(this,function(ca){J--;0==J&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ca,ea)),this.showSidebar()}catch(X){this.handleError(X,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){J--;0==J&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[da]));for(da in C)f[da]||this.closeLibrary(new RemoteLibrary(this,null,C[da]));0==J&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var f=0;f<this.remoteInvokeQueue.length;f++)c.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var f=c.msgMarkers,l=this.remoteInvokeCallbacks[f.callbackId];if(null==l)throw Error("No callback for "+(null!=f?f.callbackId:"null"));c.error?l.error&&l.error(c.error.errResp):l.callback&&l.callback.apply(this,c.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,f,l,t,z){var C=!0,F=window.setTimeout(mxUtils.bind(this,function(){C=!1;z({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),N=mxUtils.bind(this,function(){window.clearTimeout(F);C&&t.apply(this,arguments)}),K=mxUtils.bind(this,function(){window.clearTimeout(F);@@ -3995,46 +3996,47 @@ C&&z.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.len(ea.resp=J);this.remoteWin.postMessage(JSON.stringify(ea),"*")});try{var t=c.funtionName,z=this.remoteInvokableFns[t];if(null!=z&&"function"===typeof this[t]){if(z.allowedDomains){for(var C=!1,F=0;F<z.allowedDomains.length;F++)if(f=="https://"+z.allowedDomains[F]){C=!0;break}if(!C){l(null,"Invalid Call: "+t+" is not allowed.");return}}var N=c.functionArgs;Array.isArray(N)||(N=[]);if(z.isAsync)N.push(function(){l(Array.prototype.slice.apply(arguments))}),N.push(function(J){l(null,J||"Unkown Error")}),this[t].apply(this,N);else{var K=this[t].apply(this,N);l([K])}}else l(null,"Invalid Call: "+t+" is not found.")}catch(J){l(null,"Invalid Call: An error occurred, "+J.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var t=l.open("database",2);t.onupgradeneeded=function(z){try{var C=t.result;1>z.oldVersion&&C.createObjectStore("objects",{keyPath:"key"});2>z.oldVersion&&(C.createObjectStore("files",{keyPath:"title"}),C.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};t.onsuccess=mxUtils.bind(this,function(z){try{var C=t.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(F){if(!F||"1"==urlParams.forceMigration){var N=-document.createElement("iframe");N.style.display="none";N.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(N);var K=!0,J=!1,da,ea=0,ca=mxUtils.bind(this,function(){J=!0;this.setDatabaseItem(".drawioMigrated3",!0);N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),W=mxUtils.bind(this,function(){ea++;ba()}),ba=mxUtils.bind(this,function(){try{if(ea>=da.length)ca();else{var la=-da[ea];StorageFile.getFileContent(this,la,mxUtils.bind(this,function(Y){null==Y||".scratchpad"==la&&Y==this.emptyLibraryXml?N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[la]}),"*"):W()}),W)}}catch(Y){console.log(Y)}}),ha=mxUtils.bind(this,function(la){try{this.setDatabaseItem(null,[{title:la.title,size:la.data.length,lastModified:Date.now(),type:la.isLib?"L":"F"},{title:la.title,data:la.data}],W,W,["filesInfo","files"])}catch(Y){console.log(Y)}});-F=mxUtils.bind(this,function(la){try{if(la.source==N.contentWindow){var Y={};try{Y=JSON.parse(la.data)}catch(ma){}"init"==Y.event?(N.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=Y.event||J||(K?null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?(da=Y.resp[0],K=!1,ba()):ca():null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?ha(Y.resp[0]):W())}}catch(ma){console.log(ma)}});+document.createElement("iframe");N.style.display="none";N.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(N);var K=!0,J=!1,da,ea=0,ca=mxUtils.bind(this,function(){J=!0;this.setDatabaseItem(".drawioMigrated3",!0);N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),X=mxUtils.bind(this,function(){ea++;aa()}),aa=mxUtils.bind(this,function(){try{if(ea>=da.length)ca();else{var la=+da[ea];StorageFile.getFileContent(this,la,mxUtils.bind(this,function(Y){null==Y||".scratchpad"==la&&Y==this.emptyLibraryXml?N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[la]}),"*"):X()}),X)}}catch(Y){console.log(Y)}}),ia=mxUtils.bind(this,function(la){try{this.setDatabaseItem(null,[{title:la.title,size:la.data.length,lastModified:Date.now(),type:la.isLib?"L":"F"},{title:la.title,data:la.data}],X,X,["filesInfo","files"])}catch(Y){console.log(Y)}});+F=mxUtils.bind(this,function(la){try{if(la.source==N.contentWindow){var Y={};try{Y=JSON.parse(la.data)}catch(ma){}"init"==Y.event?(N.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=Y.event||J||(K?null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?(da=Y.resp[0],K=!1,aa()):ca():null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?ia(Y.resp[0]):X())}}catch(ma){console.log(ma)}});window.addEventListener("message",F)}})));c(C);C.onversionchange=function(){C.close()}}catch(F){null!=f?f(F):null!=window.console&&console.warn(F)}});t.onerror=f;t.onblocked=function(){}}catch(z){null!=f?f(z):null!=window.console&&console.error(z)}else null!=f&&f(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,f,l,t,z){this.openDatabase(mxUtils.bind(this,function(C){try{z=z||"objects";Array.isArray(z)||(z=[z],c=[c],f=[f]);var F=C.transaction(z,"readwrite");F.oncomplete=l;F.onerror=t;for(C=0;C<z.length;C++)F.objectStore(z[C]).put(null!=c&&null!=c[C]?{key:c[C],data:f[C]}:f[C])}catch(N){null!=t&&t(N)}}),t)};EditorUi.prototype.removeDatabaseItem=function(c,f,l,t){this.openDatabase(mxUtils.bind(this,function(z){try{t=t||"objects";Array.isArray(t)||(t=[t],c=[c]);var C=z.transaction(t,"readwrite");C.oncomplete=f;C.onerror=l;for(z=0;z<t.length;z++)C.objectStore(t[z]).delete(c[z])}catch(F){null!=l&&l(F)}}),l)};EditorUi.prototype.getDatabaseItem=function(c,f,l,t){this.openDatabase(mxUtils.bind(this,function(z){try{t=t||"objects";var C=z.transaction([t],"readonly").objectStore(t).get(c);C.onsuccess=function(){f(C.result)};C.onerror=l}catch(F){null!=l&&l(F)}}),l)};EditorUi.prototype.getDatabaseItems=function(c,f,l){this.openDatabase(mxUtils.bind(this,function(t){try{l=l||"objects";var z=t.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),C=[];z.onsuccess=function(F){null==F.target.result?c(C):(C.push(F.target.result.value),F.target.result.continue())};z.onerror=f}catch(F){null!=f&&f(F)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(c,f,l){this.openDatabase(mxUtils.bind(this,function(t){try{l=l||"objects";var z=t.transaction([l],"readonly").objectStore(l).getAllKeys();z.onsuccess=function(){c(z.result)};z.onerror=f}catch(C){null!=f&&f(C)}}),f)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,f){var l=this.getCurrentFile();null!=l?l.getComments(c,f):c([])};EditorUi.prototype.addComment=function(c,f,l){var t=this.getCurrentFile();null!=t?t.addComment(c,f,l):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,f){var l=this.getCurrentFile();return null!=l?l.newComment(c,f):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,f){var l=this.getCurrentFile();null!=-l&&l.getRevisions?l.getRevisions(c,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,f,l,t,z,C,F,N){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");-return this.editor.loadUrl(c,f,l,t,z,C,F,N)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");-return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W,ba,ha){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W,ba,ha)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");-return this.editor.convertImages(c,f,l,t)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,f)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,f,l,t)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");-return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,f,l,t,z){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,f,l,t,z)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],f=0;f<localStorage.length;f++){var l=localStorage.key(f),t=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<t.length){var z=-"<mxfile "===t.substring(0,8)||"<?xml"===t.substring(0,5)||"\x3c!--[if IE]>"===t.substring(0,12);t="<mxlibrary>"===t.substring(0,11);(z||t)&&c.push(l)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(c);return{title:c,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();-var CommentsWindow=function(b,e,g,m,u,p){function B(){for(var ba=F.getElementsByTagName("div"),ha=0,la=0;la<ba.length;la++)"none"!=ba[la].style.display&&ba[la].parentNode==F&&ha++;N.style.display=0==ha?"block":"none"}function H(ba,ha,la,Y){function ma(){ha.removeChild(A);ha.removeChild(I);k.style.display="block";Z.style.display="block"}t={div:ha,comment:ba,saveCallback:la,deleteOnCancel:Y};var Z=ha.querySelector(".geCommentTxt"),k=ha.querySelector(".geCommentActionsList"),A=document.createElement("textarea");-A.className="geCommentEditTxtArea";A.style.minHeight=Z.offsetHeight+"px";A.value=ba.content;ha.insertBefore(A,Z);var I=document.createElement("div");I.className="geCommentEditBtns";var U=mxUtils.button(mxResources.get("cancel"),function(){Y?(ha.parentNode.removeChild(ha),B()):ma();t=null});U.className="geCommentEditBtn";I.appendChild(U);var O=mxUtils.button(mxResources.get("save"),function(){Z.innerText="";ba.content=A.value;mxUtils.write(Z,ba.content);ma();la(ba);t=null});mxEvent.addListener(A,"keydown",-mxUtils.bind(this,function(S){mxEvent.isConsumed(S)||((mxEvent.isControlDown(S)||mxClient.IS_MAC&&mxEvent.isMetaDown(S))&&13==S.keyCode?(O.click(),mxEvent.consume(S)):27==S.keyCode&&(U.click(),mxEvent.consume(S)))}));O.focus();O.className="geCommentEditBtn gePrimaryBtn";I.appendChild(O);ha.insertBefore(I,Z);k.style.display="none";Z.style.display="none";A.focus()}function T(ba,ha){ha.innerText="";ba=new Date(ba.modifiedDate);var la=b.timeSince(ba);null==la&&(la=mxResources.get("lessThanAMinute"));-mxUtils.write(ha,mxResources.get("timeAgo",[la],"{1} ago"));ha.setAttribute("title",ba.toLocaleDateString()+" "+ba.toLocaleTimeString())}function G(ba){var ha=document.createElement("img");ha.className="geCommentBusyImg";ha.src=IMAGE_PATH+"/spin.gif";ba.appendChild(ha);ba.busyImg=ha}function P(ba){ba.style.border="1px solid red";ba.busyImg.parentNode==ba&&ba.removeChild(ba.busyImg)}function R(ba){ba.style.border="";ba.busyImg.parentNode==ba&&ba.removeChild(ba.busyImg)}function c(ba,ha,la,Y,ma){function Z(aa,-ja,pa){var sa=document.createElement("li");sa.className="geCommentAction";var qa=document.createElement("a");qa.className="geCommentActionLnk";mxUtils.write(qa,aa);sa.appendChild(qa);mxEvent.addListener(qa,"click",function(wa){ja(wa,ba);wa.preventDefault();mxEvent.consume(wa)});X.appendChild(sa);pa&&(sa.style.display="none")}function k(){function aa(sa){ja.push(pa);if(null!=sa.replies)for(var qa=0;qa<sa.replies.length;qa++)pa=pa.nextSibling,aa(sa.replies[qa])}var ja=[],pa=I;aa(ba);return{pdiv:pa,-replies:ja}}function A(aa,ja,pa,sa,qa){function wa(){G(ra);ba.addReply(Ea,function(ya){Ea.id=ya;ba.replies.push(Ea);R(ra);pa&&pa()},function(ya){Ba();P(ra);b.handleError(ya,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},sa,qa)}function Ba(){H(Ea,ra,function(ya){wa()},!0)}var za=k().pdiv,Ea=b.newComment(aa,b.getCurrentUser());Ea.pCommentId=ba.id;null==ba.replies&&(ba.replies=[]);var ra=c(Ea,ba.replies,za,Y+1);ja?Ba():wa()}if(ma||!ba.isResolved){N.style.display="none";var I=-document.createElement("div");I.className="geCommentContainer";I.setAttribute("data-commentId",ba.id);I.style.marginLeft=20*Y+5+"px";ba.isResolved&&(z.style.opacity="0.7");var U=document.createElement("div");U.className="geCommentHeader";var O=document.createElement("img");O.className="geCommentUserImg";O.src=null!=ba.user&&null!=ba.user.pictureUrl?ba.user.pictureUrl:Editor.userImage;U.appendChild(O);O=document.createElement("div");O.className="geCommentHeaderTxt";U.appendChild(O);var S=document.createElement("div");-S.className="geCommentUsername";mxUtils.write(S,null!=ba.user?ba.user.displayName:mxResources.get("unknownUser"));O.appendChild(S);S=document.createElement("div");S.className="geCommentDate";S.setAttribute("data-commentId",ba.id);T(ba,S);O.appendChild(S);I.appendChild(U);U=document.createElement("div");U.className="geCommentTxt";mxUtils.write(U,ba.content||"");I.appendChild(U);ba.isLocked&&(I.style.opacity="0.5");U=document.createElement("div");U.className="geCommentActions";var X=document.createElement("ul");-X.className="geCommentActionsList";U.appendChild(X);f||ba.isLocked||0!=Y&&!l||Z(mxResources.get("reply"),function(){A("",!0)},ba.isResolved);O=b.getCurrentUser();null==O||null==ba.user||O.id!=ba.user.id||f||ba.isLocked||(Z(mxResources.get("edit"),function(){function aa(){H(ba,I,function(){G(I);ba.editComment(ba.content,function(){R(I)},function(ja){P(I);aa();b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}aa()},ba.isResolved),Z(mxResources.get("delete"),-function(){b.confirm(mxResources.get("areYouSure"),function(){G(I);ba.deleteComment(function(aa){if(!0===aa){aa=I.querySelector(".geCommentTxt");aa.innerText="";mxUtils.write(aa,mxResources.get("msgDeleted"));var ja=I.querySelectorAll(".geCommentAction");for(aa=0;aa<ja.length;aa++)ja[aa].parentNode.removeChild(ja[aa]);R(I);I.style.opacity="0.5"}else{ja=k(ba).replies;for(aa=0;aa<ja.length;aa++)F.removeChild(ja[aa]);for(aa=0;aa<ha.length;aa++)if(ha[aa]==ba){ha.splice(aa,1);break}N.style.display=0==-F.getElementsByTagName("div").length?"block":"none"}},function(aa){P(I);b.handleError(aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},ba.isResolved));f||ba.isLocked||0!=Y||Z(ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(aa){function ja(){var pa=aa.target;pa.innerText="";ba.isResolved=!ba.isResolved;mxUtils.write(pa,ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var sa=ba.isResolved?"none":"",qa=k(ba).replies,wa=-"light-dark("+(ba.isResolved?"ghostWhite":"white")+", transparent)",Ba=0;Ba<qa.length;Ba++){qa[Ba].style.backgroundColor=wa;for(var za=qa[Ba].querySelectorAll(".geCommentAction"),Ea=0;Ea<za.length;Ea++)za[Ea]!=pa.parentNode&&(za[Ea].style.display=sa);ea||(qa[Ba].style.display="none")}B()}ba.isResolved?A(mxResources.get("reOpened")+": ",!0,ja,!1,!0):A(mxResources.get("markedAsResolved"),!1,ja,!0)});I.appendChild(U);null!=la?F.insertBefore(I,la.nextSibling):F.appendChild(I);for(la=0;null!=ba.replies&&-la<ba.replies.length;la++)U=ba.replies[la],U.isResolved=ba.isResolved,c(U,ba.replies,null,Y+1,ma);null!=t&&(t.comment.id==ba.id?(ma=ba.content,ba.content=t.comment.content,H(ba,I,t.saveCallback,t.deleteOnCancel),ba.content=ma):null==t.comment.id&&t.comment.pCommentId==ba.id&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return I}}var f=!b.canComment(),l=b.canReplyToReplies(),t=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="light-dark(whiteSmoke, "++l&&l.getRevisions?l.getRevisions(c,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language",+"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,f,l,t,z,C,F,N){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,f,l,t,z,C,F,N)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");+return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca,X,aa,ia){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,l,t,z,C,F,N,K,J,da,ea,ca,X,aa,ia)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");+return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,f,l,t)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,f)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=+function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,f,l,t)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,f,l,t,z){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,f,l,t,z)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=+urlParams.forceMigration)return null;for(var c=[],f=0;f<localStorage.length;f++){var l=localStorage.key(f),t=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<t.length){var z="<mxfile "===t.substring(0,8)||"<?xml"===t.substring(0,5)||"\x3c!--[if IE]>"===t.substring(0,12);t="<mxlibrary>"===t.substring(0,11);(z||t)&&c.push(l)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;+var f=localStorage.getItem(c);return{title:c,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();+var CommentsWindow=function(b,e,g,m,u,p){function B(){for(var aa=F.getElementsByTagName("div"),ia=0,la=0;la<aa.length;la++)"none"!=aa[la].style.display&&aa[la].parentNode==F&&ia++;N.style.display=0==ia?"block":"none"}function H(aa,ia,la,Y){function ma(){ia.removeChild(A);ia.removeChild(I);k.style.display="block";Z.style.display="block"}t={div:ia,comment:aa,saveCallback:la,deleteOnCancel:Y};var Z=ia.querySelector(".geCommentTxt"),k=ia.querySelector(".geCommentActionsList"),A=document.createElement("textarea");+A.className="geCommentEditTxtArea";A.style.minHeight=Z.offsetHeight+"px";A.value=aa.content;ia.insertBefore(A,Z);var I=document.createElement("div");I.className="geCommentEditBtns";var T=mxUtils.button(mxResources.get("cancel"),function(){Y?(ia.parentNode.removeChild(ia),B()):ma();t=null});T.className="geCommentEditBtn";I.appendChild(T);var O=mxUtils.button(mxResources.get("save"),function(){Z.innerText="";aa.content=A.value;mxUtils.write(Z,aa.content);ma();la(aa);t=null});mxEvent.addListener(A,"keydown",+mxUtils.bind(this,function(U){mxEvent.isConsumed(U)||((mxEvent.isControlDown(U)||mxClient.IS_MAC&&mxEvent.isMetaDown(U))&&13==U.keyCode?(O.click(),mxEvent.consume(U)):27==U.keyCode&&(T.click(),mxEvent.consume(U)))}));O.focus();O.className="geCommentEditBtn gePrimaryBtn";I.appendChild(O);ia.insertBefore(I,Z);k.style.display="none";Z.style.display="none";A.focus()}function S(aa,ia){ia.innerText="";aa=new Date(aa.modifiedDate);var la=b.timeSince(aa);null==la&&(la=mxResources.get("lessThanAMinute"));+mxUtils.write(ia,mxResources.get("timeAgo",[la],"{1} ago"));ia.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString())}function G(aa){var ia=document.createElement("img");ia.className="geCommentBusyImg";ia.src=IMAGE_PATH+"/spin.gif";aa.appendChild(ia);aa.busyImg=ia}function P(aa){aa.style.border="1px solid red";aa.busyImg.parentNode==aa&&aa.removeChild(aa.busyImg)}function Q(aa){aa.style.border="";aa.busyImg.parentNode==aa&&aa.removeChild(aa.busyImg)}function c(aa,ia,la,Y,ma){function Z(ba,+fa,pa){var sa=document.createElement("li");sa.className="geCommentAction";var qa=document.createElement("a");qa.className="geCommentActionLnk";mxUtils.write(qa,ba);sa.appendChild(qa);mxEvent.addListener(qa,"click",function(wa){fa(wa,aa);wa.preventDefault();mxEvent.consume(wa)});V.appendChild(sa);pa&&(sa.style.display="none")}function k(){function ba(sa){fa.push(pa);if(null!=sa.replies)for(var qa=0;qa<sa.replies.length;qa++)pa=pa.nextSibling,ba(sa.replies[qa])}var fa=[],pa=I;ba(aa);return{pdiv:pa,+replies:fa}}function A(ba,fa,pa,sa,qa){function wa(){G(ra);aa.addReply(Da,function(ya){Da.id=ya;aa.replies.push(Da);Q(ra);pa&&pa()},function(ya){Aa();P(ra);b.handleError(ya,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},sa,qa)}function Aa(){H(Da,ra,function(ya){wa()},!0)}var za=k().pdiv,Da=b.newComment(ba,b.getCurrentUser());Da.pCommentId=aa.id;null==aa.replies&&(aa.replies=[]);var ra=c(Da,aa.replies,za,Y+1);fa?Aa():wa()}if(ma||!aa.isResolved){N.style.display="none";var I=+document.createElement("div");I.className="geCommentContainer";I.setAttribute("data-commentId",aa.id);I.style.marginLeft=20*Y+5+"px";aa.isResolved&&(z.style.opacity="0.7");var T=document.createElement("div");T.className="geCommentHeader";var O=document.createElement("img");O.className="geCommentUserImg";O.src=null!=aa.user&&null!=aa.user.pictureUrl?aa.user.pictureUrl:Editor.userImage;T.appendChild(O);O=document.createElement("div");O.className="geCommentHeaderTxt";T.appendChild(O);var U=document.createElement("div");+U.className="geCommentUsername";mxUtils.write(U,null!=aa.user?aa.user.displayName:mxResources.get("unknownUser"));O.appendChild(U);U=document.createElement("div");U.className="geCommentDate";U.setAttribute("data-commentId",aa.id);S(aa,U);O.appendChild(U);I.appendChild(T);T=document.createElement("div");T.className="geCommentTxt";mxUtils.write(T,aa.content||"");I.appendChild(T);aa.isLocked&&(I.style.opacity="0.5");T=document.createElement("div");T.className="geCommentActions";var V=document.createElement("ul");+V.className="geCommentActionsList";T.appendChild(V);f||aa.isLocked||0!=Y&&!l||Z(mxResources.get("reply"),function(){A("",!0)},aa.isResolved);O=b.getCurrentUser();null==O||null==aa.user||O.id!=aa.user.id||f||aa.isLocked||(Z(mxResources.get("edit"),function(){function ba(){H(aa,I,function(){G(I);aa.editComment(aa.content,function(){Q(I)},function(fa){P(I);ba();b.handleError(fa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}ba()},aa.isResolved),Z(mxResources.get("delete"),+function(){b.confirm(mxResources.get("areYouSure"),function(){G(I);aa.deleteComment(function(ba){if(!0===ba){ba=I.querySelector(".geCommentTxt");ba.innerText="";mxUtils.write(ba,mxResources.get("msgDeleted"));var fa=I.querySelectorAll(".geCommentAction");for(ba=0;ba<fa.length;ba++)fa[ba].parentNode.removeChild(fa[ba]);Q(I);I.style.opacity="0.5"}else{fa=k(aa).replies;for(ba=0;ba<fa.length;ba++)F.removeChild(fa[ba]);for(ba=0;ba<ia.length;ba++)if(ia[ba]==aa){ia.splice(ba,1);break}N.style.display=0==+F.getElementsByTagName("div").length?"block":"none"}},function(ba){P(I);b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},aa.isResolved));f||aa.isLocked||0!=Y||Z(aa.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(ba){function fa(){var pa=ba.target;pa.innerText="";aa.isResolved=!aa.isResolved;mxUtils.write(pa,aa.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var sa=aa.isResolved?"none":"",qa=k(aa).replies,wa=+"light-dark("+(aa.isResolved?"ghostWhite":"white")+", transparent)",Aa=0;Aa<qa.length;Aa++){qa[Aa].style.backgroundColor=wa;for(var za=qa[Aa].querySelectorAll(".geCommentAction"),Da=0;Da<za.length;Da++)za[Da]!=pa.parentNode&&(za[Da].style.display=sa);ea||(qa[Aa].style.display="none")}B()}aa.isResolved?A(mxResources.get("reOpened")+": ",!0,fa,!1,!0):A(mxResources.get("markedAsResolved"),!1,fa,!0)});I.appendChild(T);null!=la?F.insertBefore(I,la.nextSibling):F.appendChild(I);for(la=0;null!=aa.replies&&+la<aa.replies.length;la++)T=aa.replies[la],T.isResolved=aa.isResolved,c(T,aa.replies,null,Y+1,ma);null!=t&&(t.comment.id==aa.id?(ma=aa.content,aa.content=t.comment.content,H(aa,I,t.saveCallback,t.deleteOnCancel),aa.content=ma):null==t.comment.id&&t.comment.pCommentId==aa.id&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return I}}var f=!b.canComment(),l=b.canReplyToReplies(),t=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="light-dark(whiteSmoke, "+Editor.darkColor+")";var C=EditorUi.compactUi?"26px":"30px",F=document.createElement("div");F.className="geCommentsList";F.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+")";F.style.bottom=parseInt(C)+7+"px";z.appendChild(F);var N=document.createElement("span");N.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(N,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=C;K.style.padding="3px 4px 4px 4px";C=document.createElement("a");C.className="geToolbarButton geAdaptiveAsset geToggleItem";C.style.width="16px";C.style.height="18px";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="20px";C.style.margin="0 2px";C.style.display="inline-block";C.style.cursor="pointer";if(!f){var J=C.cloneNode();J.style.backgroundImage="url("+Editor.plusImage+")";J.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(J,-"click",function(ba){function ha(){H(la,Y,function(ma){G(Y);b.addComment(ma,function(Z){ma.id=Z;ca.push(ma);R(Y)},function(Z){P(Y);ha();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var la=b.newComment("",b.getCurrentUser()),Y=c(la,ca,null,0);ha();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(J)}var da=C.cloneNode();da.classList.add("geToggleItem");da.style.backgroundImage="url("+Editor.checkImage+")";da.setAttribute("title",mxResources.get("showResolved"));-var ea=!1;mxEvent.addListener(da,"click",function(ba){(ea=!ea)?da.classList.add("geActiveItem"):da.classList.remove("geActiveItem");W();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(da);b.commentsRefreshNeeded()&&(J=C.cloneNode(),J.style.backgroundImage="url("+Editor.refreshImage+")",J.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(J,"click",function(ba){W();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(J));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML=-'<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),C.className="geButton geAdaptiveAsset",mxEvent.addListener(C,"click",function(ba){p();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(C));z.appendChild(K);var ca=[],W=mxUtils.bind(this,function(){this.hasError=!1;if(null!=t)try{t.div=t.div.cloneNode(!0);var ba=t.div.querySelector(".geCommentEditTxtArea"),ha=t.div.querySelector(".geCommentEditBtns");t.comment.content=ba.value;-ba.parentNode.removeChild(ba);ha.parentNode.removeChild(ha)}catch(la){b.handleError(la)}F.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";l=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(la){function Y(ma){if(null!=ma){ma.sort(function(k,A){return new Date(k.modifiedDate)-new Date(A.modifiedDate)});for(var Z=0;Z<ma.length;Z++)Y(ma[Z].replies)}}la.sort(function(ma,+"click",function(aa){function ia(){H(la,Y,function(ma){G(Y);b.addComment(ma,function(Z){ma.id=Z;ca.push(ma);Q(Y)},function(Z){P(Y);ia();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var la=b.newComment("",b.getCurrentUser()),Y=c(la,ca,null,0);ia();aa.preventDefault();mxEvent.consume(aa)});K.appendChild(J)}var da=C.cloneNode();da.classList.add("geToggleItem");da.style.backgroundImage="url("+Editor.checkImage+")";da.setAttribute("title",mxResources.get("showResolved"));+var ea=!1;mxEvent.addListener(da,"click",function(aa){(ea=!ea)?da.classList.add("geActiveItem"):da.classList.remove("geActiveItem");X();aa.preventDefault();mxEvent.consume(aa)});K.appendChild(da);b.commentsRefreshNeeded()&&(J=C.cloneNode(),J.style.backgroundImage="url("+Editor.refreshImage+")",J.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(J,"click",function(aa){X();aa.preventDefault();mxEvent.consume(aa)}),K.appendChild(J));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML=+'<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),C.className="geButton geAdaptiveAsset",mxEvent.addListener(C,"click",function(aa){p();aa.preventDefault();mxEvent.consume(aa)}),K.appendChild(C));z.appendChild(K);var ca=[],X=mxUtils.bind(this,function(){this.hasError=!1;if(null!=t)try{t.div=t.div.cloneNode(!0);var aa=t.div.querySelector(".geCommentEditTxtArea"),ia=t.div.querySelector(".geCommentEditBtns");t.comment.content=aa.value;+aa.parentNode.removeChild(aa);ia.parentNode.removeChild(ia)}catch(la){b.handleError(la)}F.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";l=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(la){function Y(ma){if(null!=ma){ma.sort(function(k,A){return new Date(k.modifiedDate)-new Date(A.modifiedDate)});for(var Z=0;Z<ma.length;Z++)Y(ma[Z].replies)}}la.sort(function(ma,Z){return new Date(ma.modifiedDate)-new Date(Z.modifiedDate)});F.innerText="";F.appendChild(N);N.style.display="block";ca=la;for(la=0;la<ca.length;la++)Y(ca[la].replies),c(ca[la],ca,null,0,ea);null!=t&&null==t.comment.id&&null==t.comment.pCommentId&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel))},mxUtils.bind(this,function(la){F.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(la&&la.message?": "+la.message:""));this.hasError=!0})):F.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});-W();this.refreshComments=W;K=mxUtils.bind(this,function(){function ba(Z){var k=la[Z.id];if(null!=k)for(T(Z,k),k=0;null!=Z.replies&&k<Z.replies.length;k++)ba(Z.replies[k])}if(this.window.isVisible()){for(var ha=F.querySelectorAll(".geCommentDate"),la={},Y=0;Y<ha.length;Y++){var ma=ha[Y];la[ma.getAttribute("data-commentId")]=ma}for(Y=0;Y<ca.length;Y++)ba(ca[Y])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=new mxWindow(mxResources.get("comments"),z,e,g,m,u,!0,!0);this.window.minimumSize=-new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,g,m,u,p,B,H,T,G,P){var R=document.createElement("div");R.style.textAlign="center";P=null!=P?P:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=-P+"px";c.style.lineHeight="1.2em";mxUtils.write(c,e);R.appendChild(c);null!=G&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",G),c.appendChild(e),R.appendChild(c));G=document.createElement("div");G.style.textAlign="center";G.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(f.checked)});p.className="geBtn";+X();this.refreshComments=X;K=mxUtils.bind(this,function(){function aa(Z){var k=la[Z.id];if(null!=k)for(S(Z,k),k=0;null!=Z.replies&&k<Z.replies.length;k++)aa(Z.replies[k])}if(this.window.isVisible()){for(var ia=F.querySelectorAll(".geCommentDate"),la={},Y=0;Y<ia.length;Y++){var ma=ia[Y];la[ma.getAttribute("data-commentId")]=ma}for(Y=0;Y<ca.length;Y++)aa(ca[Y])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=new mxWindow(mxResources.get("comments"),z,e,g,m,u,!0,!0);this.window.minimumSize=+new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,g,m,u,p,B,H,S,G,P){var Q=document.createElement("div");Q.style.textAlign="center";P=null!=P?P:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=+P+"px";c.style.lineHeight="1.2em";mxUtils.write(c,e);Q.appendChild(c);null!=G&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",G),c.appendChild(e),Q.appendChild(c));G=document.createElement("div");G.style.textAlign="center";G.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(f.checked)});p.className="geBtn";null!=H&&(p.innerHTML=H+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&G.appendChild(p);var l=mxUtils.button(u||mxResources.get("ok"),function(){b.hideDialog();null!=g&&g(f.checked)});G.appendChild(l);null!=B?(l.innerHTML=B+"<br>"+l.innerHTML+"<br>",l.style.paddingBottom="8px",l.style.paddingTop="8px",l.style.height="auto",l.className="geBtn",l.style.width="40%"):l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||-G.appendChild(p);R.appendChild(G);T?(G.style.marginTop="10px",c=document.createElement("p"),c.style.marginTop="20px",c.style.marginBottom="0px",c.appendChild(f),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),c.appendChild(u),R.appendChild(c),mxEvent.addListener(u,"click",function(t){f.checked=!f.checked;mxEvent.consume(t)})):G.style.marginTop="12px";this.init=function(){l.focus()};this.container=R},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),+G.appendChild(p);Q.appendChild(G);S?(G.style.marginTop="10px",c=document.createElement("p"),c.style.marginTop="20px",c.style.marginBottom="0px",c.appendChild(f),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),c.appendChild(u),Q.appendChild(c),mxEvent.addListener(u,"click",function(t){f.checked=!f.checked;mxEvent.consume(t)})):G.style.marginTop="12px";this.init=function(){l.focus()};this.container=Q},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,e,g){this.ui=b;this.page=e;this.previous=this.name=g}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(b,e,g){this.ui=b;this.oldIndex=e;this.newIndex=g}@@ -4056,7 +4058,7 @@ function(){b.checkDefaultParent()}));var p=mxUtils.bind(this,function(){this.updthis.toolbar&&this.toolbar.updateZoom()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(B,H){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}))}};EditorUi.prototype.scrollToPage=function(b,e){var g=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),m=null!=b?b:this.currentPage;null!=g&&null!=this.tabScroller&&this.tabScroller.children.length>g&&null!=this.tabScroller.children[g]&&(m!=this.lastScrollPage||e)&&(this.tabScroller.children[g].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[g].className="geTab gePageTab geActivePage",this.lastScrollPage=m)};EditorUi.prototype.restoreViewState=function(b,e,g){b=null!=b?this.getPageById(b.getId()):null;var m=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(m.setViewState(e),this.editor.updateGraphComponents(),m.view.revalidate(),m.sizeDidChange()),m.container.scrollLeft=m.view.translate.x*m.view.scale+e.scrollLeft,m.container.scrollTop=m.view.translate.y*m.view.scale+e.scrollTop,m.restoreSelection(g))};-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),g=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),u=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),B=this.parseBackgroundImage(b.getAttribute("backgroundImage")),H=b.getAttribute("extFonts");if(H)try{H=H.split("|").map(function(T){T=T.split("^");return{name:T[0],url:T[1]}})}catch(T){console.log("ExtFonts format error: "+T.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),g=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),u=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),B=this.parseBackgroundImage(b.getAttribute("backgroundImage")),H=b.getAttribute("extFonts");if(H)try{H=H.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}})}catch(S){console.log("ExtFonts format error: "+S.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:B,pageScale:isNaN(g)?mxGraph.prototype.pageScale:g,pageFormat:isNaN(m)||isNaN(u)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,m,u),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:H||[]}};Graph.prototype.saveViewState=function(b,e,g,m){g||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",@@ -4080,7 +4082,7 @@ EditorUi.prototype.insertPage=function(b,e,g){this.editor.graph.isEnabled()&&(thEditorUi.prototype.createPage=function(b,e,g){e=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e,g);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var g=this.pages[e].getName();null!=g&&0<g.length&&(b[g]=g)}e=this.pages.length;do g=mxResources.get("pageWithNumber",[++e]);while(null!=b[g]);return g};EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,g=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=g){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var m=this.currentPage;m==b&&1<this.pages.length?(g==this.pages.length-1?g--:g++,m=this.pages[g]):1>=this.pages.length&&(m=this.insertPage(),e.model.execute(new RenamePage(this,m,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,m))}finally{e.model.endUpdate()}}}catch(u){this.handleError(u)}return b};EditorUi.prototype.duplicatePage=function(b,e){var g=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var u=b.node.cloneNode(!1);u.removeAttribute("id");var p={},B=m.createCellLookup([m.model.root]);g=new DiagramPage(u);g.root=m.cloneCell(m.model.root,null,p);var H=new mxGraphModel;H.prefix=Editor.guid()+"-";H.setRoot(g.root);m.updateCustomLinks(m.createCellMapping(p,B),[g.root]);g.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(g);-g.viewState.scale=1;delete g.viewState.scrollLeft;delete g.viewState.scrollTop;delete g.viewState.currentRoot;delete g.viewState.defaultParent;g.setName(e);g=this.insertPage(g,mxUtils.indexOf(this.pages,b)+1)}}catch(T){this.handleError(T)}return g};EditorUi.prototype.initDiagramNode=function(b,e){null==e&&(e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,e);EditorUi.removeChildNodes(b.node);b.node.appendChild(e)};+g.viewState.scale=1;delete g.viewState.scrollLeft;delete g.viewState.scrollTop;delete g.viewState.currentRoot;delete g.viewState.defaultParent;g.setName(e);g=this.insertPage(g,mxUtils.indexOf(this.pages,b)+1)}}catch(S){this.handleError(S)}return g};EditorUi.prototype.initDiagramNode=function(b,e){null==e&&(e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,e);EditorUi.removeChildNodes(b.node);b.node.appendChild(e)};EditorUi.prototype.clonePages=function(b){for(var e=[],g=[],m=0;m<b.length;m++)try{g.push(this.clonePage(b[m]))}catch(u){e.push(mxResources.get("pageWithNumber",[m+1])+": "+u.toString())}if(0<e.length){b=Error(e.join("\n"));try{0<g.length&&(b.fallbackFileData=this.getXmlForPages(g))}catch(u){}throw b;}return g};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),g=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(g,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);e.diagramModified=b.diagramModified;return e};EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(g){null!=g&&0<g.length&&this.editor.graph.model.execute(new RenamePage(this,b,g))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};@@ -4098,63 +4100,63 @@ EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(nEditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.thinArrowRightImage,mxUtils.bind(this,function(b){var e=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:e,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=e;mxEvent.consume(b)}))};EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.verticalDotsImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(mxUtils.bind(this,function(u,p){this.menus.get("pages").funct(u,p)}));e.div.className+=" geMenubarMenu";e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);e.destroy()});var g=mxEvent.getClientX(b),m=mxEvent.getClientY(b);e.popup(g,m,null,b);this.setCurrentMenu(e);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,e){var g=this.createTab(),m=b.getName()||mxResources.get("untitled"),u=b.getId();g.setAttribute("title",m+(null!=u?" ("+u+")":"")+" ["+e+"]");e=document.createElement("span");e.style.maxWidth="160px";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,m);g.appendChild(e);this.addTabListeners(b,g);return g};-EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var g=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(T){this.renamePage(b);mxEvent.consume(T)}));var m=document.createElement("div");m.className="geTabMenuButton";m.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";m.style.backgroundSize="10px";e.appendChild(m);var u=!1,p=!1,B=mxUtils.bind(this,-function(T){u=null!=this.currentMenu;p=b==this.currentPage;this.scrollToPage(b);g.isMouseDown||p||this.selectPage(b)}),H=mxUtils.bind(this,function(T){if(g.isEnabled()&&!g.isMouseDown&&(p&&(mxEvent.isTouchEvent(T)||mxEvent.getSource(T)==m)||mxEvent.isPopupTrigger(T))&&(g.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(T)||!u)){var G=new mxPopupMenu(this.createPageMenu(b));G.div.className+=" geMenubarMenu";G.smartSeparators=!0;G.showDisabled=!0;G.autoExpand=!0;G.hideMenu=mxUtils.bind(this,-function(){mxPopupMenu.prototype.hideMenu.apply(G,arguments);this.resetCurrentMenu();G.destroy()});var P=mxEvent.getClientX(T),R=mxEvent.getClientY(T);G.popup(P,R,null,T);this.setCurrentMenu(G,e)}mxEvent.consume(T)});mxEvent.addGestureListeners(m,B,null,H);mxEvent.addGestureListeners(e,B,null,H)};+EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var g=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(S){this.renamePage(b);mxEvent.consume(S)}));var m=document.createElement("div");m.className="geTabMenuButton";m.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";m.style.backgroundSize="10px";e.appendChild(m);var u=!1,p=!1,B=mxUtils.bind(this,+function(S){u=null!=this.currentMenu;p=b==this.currentPage;this.scrollToPage(b);g.isMouseDown||p||this.selectPage(b)}),H=mxUtils.bind(this,function(S){if(g.isEnabled()&&!g.isMouseDown&&(p&&(mxEvent.isTouchEvent(S)||mxEvent.getSource(S)==m)||mxEvent.isPopupTrigger(S))&&(g.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(S)||!u)){var G=new mxPopupMenu(this.createPageMenu(b));G.div.className+=" geMenubarMenu";G.smartSeparators=!0;G.showDisabled=!0;G.autoExpand=!0;G.hideMenu=mxUtils.bind(this,+function(){mxPopupMenu.prototype.hideMenu.apply(G,arguments);this.resetCurrentMenu();G.destroy()});var P=mxEvent.getClientX(S),Q=mxEvent.getClientY(S);G.popup(P,Q,null,S);this.setCurrentMenu(G,e)}mxEvent.consume(S)});mxEvent.addGestureListeners(m,B,null,H);mxEvent.addGestureListeners(e,B,null,H)};EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(g,m){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||g.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),m));g.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),m);g.addSeparator(m);this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",g,m,mxResources.get("move"));g.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),m);g.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,e)}),m)})};(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){e=m.oldIndex;m.oldIndex=m.newIndex;m.newIndex=e;return m};mxCodecRegistry.register(b)})();(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){e=m.previous;m.previous=m.name;m.name=e;return m};mxCodecRegistry.register(b)})();(function(){var b=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","page","previousPage"]);b.afterEncode=function(e,g,m){m.setAttribute("relatedPage",g.relatedPage.getId());null==g.index&&(m.setAttribute("name",g.relatedPage.getName()),null!=g.relatedPage.viewState&&m.setAttribute("viewState",JSON.stringify(g.relatedPage.viewState,function(u,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,u)?p:void 0})),null!=g.relatedPage.root&&e.encodeCell(g.relatedPage.root,m));return m};b.beforeDecode=function(e,g,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(g.getAttribute("relatedPage"));if(null==m.relatedPage){var u=g.ownerDocument.createElement("diagram");u.setAttribute("id",g.getAttribute("relatedPage"));u.setAttribute("name",g.getAttribute("name"));m.relatedPage=new DiagramPage(u);u=g.getAttribute("viewState");null!=u&&(m.relatedPage.viewState=JSON.parse(u),g.removeAttribute("viewState"));g=g.cloneNode(!0);u=g.firstChild;if(null!=u)for(m.relatedPage.root=e.decodeCell(u,!1),m=-u.nextSibling,u.parentNode.removeChild(u),u=m;null!=u;){m=u.nextSibling;if(u.nodeType==mxConstants.NODETYPE_ELEMENT){var p=u.getAttribute("id");null==e.lookup(p)&&e.decodeCell(u)}u.parentNode.removeChild(u);u=m}}return g};b.afterDecode=function(e,g,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,u,p,B,H){u=null!=u?u:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var T=p.slice(),G=0;G<p.length;G++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[G]),"treeFolding","0")&&this.foldTreeCell(m,p[G]);p=T;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=function(m,u){this.model.beginUpdate();try{var p=-[];this.traverse(u,!0,mxUtils.bind(this,function(H,T){var G=null!=T&&this.isTreeEdge(T);G&&p.push(T);H==u||null!=T&&!G||p.push(H);return(null==T||G)&&(H==u||!this.model.isCollapsed(H))}));this.model.setCollapsed(u,m);for(var B=0;B<p.length;B++)this.model.setVisible(p[B],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,u,p,B,H,T){return this.model.filterCells(this.getEdges(m,u,p,B,H,T),mxUtils.bind(this,+u.nextSibling,u.parentNode.removeChild(u),u=m;null!=u;){m=u.nextSibling;if(u.nodeType==mxConstants.NODETYPE_ELEMENT){var p=u.getAttribute("id");null==e.lookup(p)&&e.decodeCell(u)}u.parentNode.removeChild(u);u=m}}return g};b.afterDecode=function(e,g,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,u,p,B,H){u=null!=u?u:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var S=p.slice(),G=0;G<p.length;G++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[G]),"treeFolding","0")&&this.foldTreeCell(m,p[G]);p=S;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=function(m,u){this.model.beginUpdate();try{var p=+[];this.traverse(u,!0,mxUtils.bind(this,function(H,S){var G=null!=S&&this.isTreeEdge(S);G&&p.push(S);H==u||null!=S&&!G||p.push(H);return(null==S||G)&&(H==u||!this.model.isCollapsed(H))}));this.model.setCollapsed(u,m);for(var B=0;B<p.length;B++)this.model.setVisible(p[B],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,u,p,B,H,S){return this.model.filterCells(this.getEdges(m,u,p,B,H,S),mxUtils.bind(this,function(G){return this.isTreeEdge(G)}))};Graph.prototype.getIncomingTreeEdges=function(m,u){return this.getTreeEdges(m,u,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,u){return this.getTreeEdges(m,u,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(Y){return t.isVertex(Y)&&p(Y)}function u(Y){var ma=!1;null!=Y&&(ma="1"==l.getCurrentCellStyle(Y).treeMoving);return ma}function p(Y){var ma=!1;null!=Y&&(Y=t.getParent(Y),ma=l.view.getState(Y),ma="tree"==(null!=ma?ma.style:l.getCellStyle(Y)).containerType);return ma}function B(Y){var ma=!1;null!=Y&&(Y=t.getParent(Y),ma=l.view.getState(Y),l.view.getState(Y),ma=null!=(null!=ma?ma.style:l.getCellStyle(Y)).childLayout);return ma}function H(Y){Y=l.view.getState(Y);if(null!=Y){var ma=l.getIncomingTreeEdges(Y.cell);if(0<ma.length&&(ma=l.view.getState(ma[0]),null!=ma&&(ma=-ma.absolutePoints,null!=ma&&0<ma.length&&(ma=ma[ma.length-1],null!=ma)))){if(ma.y==Y.y&&Math.abs(ma.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_SOUTH;if(ma.y==Y.y+Y.height&&Math.abs(ma.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_NORTH;if(ma.x>Y.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function T(Y,ma){ma=null!=ma?ma:!0;l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=l.cloneCells([k[0],Y]);l.model.setTerminal(A[0],-l.model.getTerminal(k[0],!0),!0);var I=H(Y),U=Z.geometry;I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?A[1].geometry.x+=ma?Y.geometry.width+10:-A[1].geometry.width-10:A[1].geometry.y+=ma?Y.geometry.height+10:-A[1].geometry.height-10;l.view.currentRoot!=Z&&(A[1].geometry.x-=U.x,A[1].geometry.y-=U.y);var O=l.view.getState(Y),S=l.view.scale;if(null!=O){var X=mxRectangle.fromRectangle(O);I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?X.x+=(ma?Y.geometry.width+10:-A[1].geometry.width--10)*S:X.y+=(ma?Y.geometry.height+10:-A[1].geometry.height-10)*S;var aa=l.getOutgoingTreeEdges(l.model.getTerminal(k[0],!0));if(null!=aa){for(var ja=I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH,pa=U=k=0;pa<aa.length;pa++){var sa=l.model.getTerminal(aa[pa],!1);if(I==H(sa)){var qa=l.view.getState(sa);sa!=Y&&null!=qa&&(ja&&ma!=qa.getCenterX()<O.getCenterX()||!ja&&ma!=qa.getCenterY()<O.getCenterY())&&mxUtils.intersects(X,qa)&&(k=10+Math.max(k,(Math.min(X.x+X.width,qa.x+qa.width)-Math.max(X.x,-qa.x))/S),U=10+Math.max(U,(Math.min(X.y+X.height,qa.y+qa.height)-Math.max(X.y,qa.y))/S))}}ja?U=0:k=0;for(pa=0;pa<aa.length;pa++)if(sa=l.model.getTerminal(aa[pa],!1),I==H(sa)&&(qa=l.view.getState(sa),sa!=Y&&null!=qa&&(ja&&ma!=qa.getCenterX()<O.getCenterX()||!ja&&ma!=qa.getCenterY()<O.getCenterY()))){var wa=[];l.traverse(qa.cell,!0,function(Ba,za){var Ea=null!=za&&l.isTreeEdge(za);Ea&&wa.push(za);(null==za||Ea)&&wa.push(Ba);return null==za||Ea});l.moveCells(wa,(ma?1:-1)*k,(ma?1:-1)*U)}}}return l.addCells(A,-Z)}finally{l.model.endUpdate()}}function G(Y){l.model.beginUpdate();try{var ma=H(Y),Z=l.getIncomingTreeEdges(Y),k=l.cloneCells([Z[0],Y]);l.model.setTerminal(Z[0],k[1],!1);l.model.setTerminal(k[0],k[1],!0);l.model.setTerminal(k[0],Y,!1);var A=l.model.getParent(Y),I=A.geometry,U=[];l.view.currentRoot!=A&&(k[1].geometry.x-=I.x,k[1].geometry.y-=I.y);l.traverse(Y,!0,function(X,aa){var ja=null!=aa&&l.isTreeEdge(aa);ja&&U.push(aa);(null==aa||ja)&&U.push(X);return null==aa||ja});var O=Y.geometry.width+40,-S=Y.geometry.height+40;ma==mxConstants.DIRECTION_SOUTH?O=0:ma==mxConstants.DIRECTION_NORTH?(O=0,S=-S):ma==mxConstants.DIRECTION_WEST?(O=-O,S=0):ma==mxConstants.DIRECTION_EAST&&(S=0);l.moveCells(U,O,S);return l.addCells(k,A)}finally{l.model.endUpdate()}}function P(Y,ma){l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=H(Y);0==k.length&&(k=[l.createEdge(Z,null,"",null,null,l.createCurrentEdgeStyle())],A=ma);var I=l.cloneCells([k[0],Y]);l.model.setTerminal(I[0],Y,!0);-null==l.model.getTerminal(I[0],!1)&&(l.model.setTerminal(I[0],I[1],!1),l.applyNewEdgeStyle(I[1],[I[0]],A));k=l.getOutgoingTreeEdges(Y);var U=Z.geometry;ma=[];l.view.currentRoot==Z&&(U=new mxRectangle);for(var O=0;O<k.length;O++){var S=l.model.getTerminal(k[O],!1);null!=S&&ma.push(S)}var X=l.view.getBounds(ma),aa=l.view.translate,ja=l.view.scale;A==mxConstants.DIRECTION_SOUTH?(I[1].geometry.x=null==X?Y.geometry.x+(Y.geometry.width-I[1].geometry.width)/2:(X.x+X.width)/ja-aa.x-U.x+10,I[1].geometry.y+=-I[1].geometry.height-U.y+40):A==mxConstants.DIRECTION_NORTH?(I[1].geometry.x=null==X?Y.geometry.x+(Y.geometry.width-I[1].geometry.width)/2:(X.x+X.width)/ja-aa.x+-U.x+10,I[1].geometry.y-=I[1].geometry.height+U.y+40):(I[1].geometry.x=A==mxConstants.DIRECTION_WEST?I[1].geometry.x-(I[1].geometry.width+U.x+40):I[1].geometry.x+(I[1].geometry.width-U.x+40),I[1].geometry.y=null==X?Y.geometry.y+(Y.geometry.height-I[1].geometry.height)/2:(X.y+X.height)/ja-aa.y+-U.y+10);return l.addCells(I,Z)}finally{l.model.endUpdate()}}-function R(Y,ma,Z){Y=l.getOutgoingTreeEdges(Y);Z=l.view.getState(Z);var k=[];if(null!=Z&&null!=Y){for(var A=0;A<Y.length;A++){var I=l.view.getState(l.model.getTerminal(Y[A],!1));null!=I&&(!ma&&Math.min(I.x+I.width,Z.x+Z.width)>=Math.max(I.x,Z.x)||ma&&Math.min(I.y+I.height,Z.y+Z.height)>=Math.max(I.y,Z.y))&&k.push(I)}k.sort(function(U,O){return ma?U.x+U.width-O.x-O.width:U.y+U.height-O.y-O.height})}return k}function c(Y,ma){var Z=H(Y),k=ma==mxConstants.DIRECTION_EAST||ma==mxConstants.DIRECTION_WEST;-(Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST)==k&&Z!=ma?f.actions.get("selectParent").funct():Z==ma?(ma=l.getOutgoingTreeEdges(Y),null!=ma&&0<ma.length&&l.setSelectionCell(l.model.getTerminal(ma[0],!1))):(Z=l.getIncomingTreeEdges(Y),null!=Z&&0<Z.length&&(k=R(l.model.getTerminal(Z[0],!0),k,Y),Y=l.view.getState(Y),null!=Y&&(Y=mxUtils.indexOf(k,Y),0<=Y&&(Y+=ma==mxConstants.DIRECTION_NORTH||ma==mxConstants.DIRECTION_WEST?-1:1,0<=Y&&Y<=k.length-1&&l.setSelectionCell(k[Y].cell)))))}var f=+ma.absolutePoints,null!=ma&&0<ma.length&&(ma=ma[ma.length-1],null!=ma)))){if(ma.y==Y.y&&Math.abs(ma.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_SOUTH;if(ma.y==Y.y+Y.height&&Math.abs(ma.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_NORTH;if(ma.x>Y.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(Y,ma){ma=null!=ma?ma:!0;l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=l.cloneCells([k[0],Y]);l.model.setTerminal(A[0],+l.model.getTerminal(k[0],!0),!0);var I=H(Y),T=Z.geometry;I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?A[1].geometry.x+=ma?Y.geometry.width+10:-A[1].geometry.width-10:A[1].geometry.y+=ma?Y.geometry.height+10:-A[1].geometry.height-10;l.view.currentRoot!=Z&&(A[1].geometry.x-=T.x,A[1].geometry.y-=T.y);var O=l.view.getState(Y),U=l.view.scale;if(null!=O){var V=mxRectangle.fromRectangle(O);I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?V.x+=(ma?Y.geometry.width+10:-A[1].geometry.width-+10)*U:V.y+=(ma?Y.geometry.height+10:-A[1].geometry.height-10)*U;var ba=l.getOutgoingTreeEdges(l.model.getTerminal(k[0],!0));if(null!=ba){for(var fa=I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH,pa=T=k=0;pa<ba.length;pa++){var sa=l.model.getTerminal(ba[pa],!1);if(I==H(sa)){var qa=l.view.getState(sa);sa!=Y&&null!=qa&&(fa&&ma!=qa.getCenterX()<O.getCenterX()||!fa&&ma!=qa.getCenterY()<O.getCenterY())&&mxUtils.intersects(V,qa)&&(k=10+Math.max(k,(Math.min(V.x+V.width,qa.x+qa.width)-Math.max(V.x,+qa.x))/U),T=10+Math.max(T,(Math.min(V.y+V.height,qa.y+qa.height)-Math.max(V.y,qa.y))/U))}}fa?T=0:k=0;for(pa=0;pa<ba.length;pa++)if(sa=l.model.getTerminal(ba[pa],!1),I==H(sa)&&(qa=l.view.getState(sa),sa!=Y&&null!=qa&&(fa&&ma!=qa.getCenterX()<O.getCenterX()||!fa&&ma!=qa.getCenterY()<O.getCenterY()))){var wa=[];l.traverse(qa.cell,!0,function(Aa,za){var Da=null!=za&&l.isTreeEdge(za);Da&&wa.push(za);(null==za||Da)&&wa.push(Aa);return null==za||Da});l.moveCells(wa,(ma?1:-1)*k,(ma?1:-1)*T)}}}return l.addCells(A,+Z)}finally{l.model.endUpdate()}}function G(Y){l.model.beginUpdate();try{var ma=H(Y),Z=l.getIncomingTreeEdges(Y),k=l.cloneCells([Z[0],Y]);l.model.setTerminal(Z[0],k[1],!1);l.model.setTerminal(k[0],k[1],!0);l.model.setTerminal(k[0],Y,!1);var A=l.model.getParent(Y),I=A.geometry,T=[];l.view.currentRoot!=A&&(k[1].geometry.x-=I.x,k[1].geometry.y-=I.y);l.traverse(Y,!0,function(V,ba){var fa=null!=ba&&l.isTreeEdge(ba);fa&&T.push(ba);(null==ba||fa)&&T.push(V);return null==ba||fa});var O=Y.geometry.width+40,+U=Y.geometry.height+40;ma==mxConstants.DIRECTION_SOUTH?O=0:ma==mxConstants.DIRECTION_NORTH?(O=0,U=-U):ma==mxConstants.DIRECTION_WEST?(O=-O,U=0):ma==mxConstants.DIRECTION_EAST&&(U=0);l.moveCells(T,O,U);return l.addCells(k,A)}finally{l.model.endUpdate()}}function P(Y,ma){l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=H(Y);0==k.length&&(k=[l.createEdge(Z,null,"",null,null,l.createCurrentEdgeStyle())],A=ma);var I=l.cloneCells([k[0],Y]);l.model.setTerminal(I[0],Y,!0);+null==l.model.getTerminal(I[0],!1)&&(l.model.setTerminal(I[0],I[1],!1),l.applyNewEdgeStyle(I[1],[I[0]],A));k=l.getOutgoingTreeEdges(Y);var T=Z.geometry;ma=[];l.view.currentRoot==Z&&(T=new mxRectangle);for(var O=0;O<k.length;O++){var U=l.model.getTerminal(k[O],!1);null!=U&&ma.push(U)}var V=l.view.getBounds(ma),ba=l.view.translate,fa=l.view.scale;A==mxConstants.DIRECTION_SOUTH?(I[1].geometry.x=null==V?Y.geometry.x+(Y.geometry.width-I[1].geometry.width)/2:(V.x+V.width)/fa-ba.x-T.x+10,I[1].geometry.y+=+I[1].geometry.height-T.y+40):A==mxConstants.DIRECTION_NORTH?(I[1].geometry.x=null==V?Y.geometry.x+(Y.geometry.width-I[1].geometry.width)/2:(V.x+V.width)/fa-ba.x+-T.x+10,I[1].geometry.y-=I[1].geometry.height+T.y+40):(I[1].geometry.x=A==mxConstants.DIRECTION_WEST?I[1].geometry.x-(I[1].geometry.width+T.x+40):I[1].geometry.x+(I[1].geometry.width-T.x+40),I[1].geometry.y=null==V?Y.geometry.y+(Y.geometry.height-I[1].geometry.height)/2:(V.y+V.height)/fa-ba.y+-T.y+10);return l.addCells(I,Z)}finally{l.model.endUpdate()}}+function Q(Y,ma,Z){Y=l.getOutgoingTreeEdges(Y);Z=l.view.getState(Z);var k=[];if(null!=Z&&null!=Y){for(var A=0;A<Y.length;A++){var I=l.view.getState(l.model.getTerminal(Y[A],!1));null!=I&&(!ma&&Math.min(I.x+I.width,Z.x+Z.width)>=Math.max(I.x,Z.x)||ma&&Math.min(I.y+I.height,Z.y+Z.height)>=Math.max(I.y,Z.y))&&k.push(I)}k.sort(function(T,O){return ma?T.x+T.width-O.x-O.width:T.y+T.height-O.y-O.height})}return k}function c(Y,ma){var Z=H(Y),k=ma==mxConstants.DIRECTION_EAST||ma==mxConstants.DIRECTION_WEST;+(Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST)==k&&Z!=ma?f.actions.get("selectParent").funct():Z==ma?(ma=l.getOutgoingTreeEdges(Y),null!=ma&&0<ma.length&&l.setSelectionCell(l.model.getTerminal(ma[0],!1))):(Z=l.getIncomingTreeEdges(Y),null!=Z&&0<Z.length&&(k=Q(l.model.getTerminal(Z[0],!0),k,Y),Y=l.view.getState(Y),null!=Y&&(Y=mxUtils.indexOf(k,Y),0<=Y&&(Y+=ma==mxConstants.DIRECTION_NORTH||ma==mxConstants.DIRECTION_WEST?-1:1,0<=Y&&Y<=k.length-1&&l.setSelectionCell(k[Y].cell)))))}var f=this,l=f.editor.graph,t=l.getModel(),z=f.menus.createPopupMenu;f.menus.createPopupMenu=function(Y,ma,Z){z.apply(this,arguments);if(1==l.getSelectionCount()){ma=l.getSelectionCell();var k=l.getOutgoingTreeEdges(ma);Y.addSeparator();0<k.length&&(m(l.getSelectionCell())&&this.addMenuItems(Y,["selectChildren"],null,Z),this.addMenuItems(Y,["selectDescendants"],null,Z));m(l.getSelectionCell())?(Y.addSeparator(),0<l.getIncomingTreeEdges(ma).length&&this.addMenuItems(Y,["selectSiblings","selectParent"],null,Z)):0<l.model.getEdgeCount(ma)&&this.addMenuItems(Y,["selectConnections"],null,Z)}};f.actions.addAction("selectChildren",function(Y){if(l.isEnabled()&&1==l.getSelectionCount()){var ma=l.getSelectionCell();Y=mxEvent.isControlDown(Y)?null:l.getOutgoingTreeEdges(ma);if(null!=Y&&0<Y.length){ma=[];for(var Z=0;Z<Y.length;Z++)ma.push(l.model.getTerminal(Y[Z],!1));l.setSelectionCells(ma)}else l.setSelectionCells(l.model.getChildren(ma))}},null,null,"Alt+Shift+C");f.actions.addAction("selectDescendants",function(Y){var ma=l.getSelectionCell();if(l.isEnabled()&&null!=ma){var Z=[];mxEvent.isControlDown(Y)||l.traverse(ma,!0,function(k,A){var I=null!=A&&l.isTreeEdge(A);I&&mxEvent.isControlDown(Y)&&Z.push(A);(null==A||I)&&Z.push(k);return null==A||I});if(0==Z.length||1==Z.length&&Z[0]==ma)Z=l.model.getDescendants(ma);l.setSelectionCells(Z)}},null,null,"Alt+Shift+X");f.actions.addAction("selectParent",function(Y){var ma=l.getSelectionCell();l.isEnabled()&&null!=ma&&(Y=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(ma),null!=Y&&0<Y.length?l.setSelectionCell(l.model.getTerminal(Y[0],!0)):l.selectParentCell())},null,null,"Alt+Shift+P");f.actions.addAction("selectSiblings",function(Y){if(l.isEnabled()&&1==l.getSelectionCount()){var ma=l.getSelectionCell(),Z=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(ma);Y=[];if(null!=Z&&0<Z.length&&(Z=l.getOutgoingTreeEdges(l.model.getTerminal(Z[0],!0)),null!=Z))for(var k=0;k<Z.length;k++)Y.push(l.model.getTerminal(Z[k],!1));0==Y.length&&(Y=l.model.getChildren(l.model.getParent(ma)));-l.setSelectionCells(Y)}},null,null,"Alt+Shift+S");var C=l.removeCells;l.removeCells=function(Y,ma){ma=null!=ma?ma:!0;null==Y&&(Y=this.getDeletableCells(this.getSelectionCells()));ma&&(Y=this.getDeletableCells(this.addAllEdges(Y)));for(var Z=[],k=0;k<Y.length;k++){var A=Y[k];t.isEdge(A)&&p(A)&&(Z.push(A),A=t.getTerminal(A,!1));if(m(A)){var I=[];l.traverse(A,!0,function(U,O){var S=null!=O&&l.isTreeEdge(O);S&&I.push(O);(null==O||S)&&I.push(U);return null==O||S});0<I.length&&(Z=Z.concat(I),A=l.getIncomingTreeEdges(Y[k]),-Y=Y.concat(A))}else null!=A&&Z.push(Y[k])}Y=Z;return C.apply(this,arguments)};f.hoverIcons.getStateAt=function(Y,ma,Z){return m(Y.cell)?null:this.graph.view.getState(this.graph.getCellAt(ma,Z))};var F=l.duplicateCells;l.duplicateCells=function(Y,ma){Y=null!=Y?Y:this.getSelectionCells();for(var Z=Y.slice(0),k=0;k<Z.length;k++){var A=l.view.getState(Z[k]);if(null!=A&&m(A.cell)){var I=l.getIncomingTreeEdges(A.cell);for(A=0;A<I.length;A++)mxUtils.remove(I[A],Y)}}this.model.beginUpdate();try{var U=F.call(this,-Y,ma);if(U.length==Y.length)for(k=0;k<Y.length;k++)if(m(Y[k])){var O=l.getIncomingTreeEdges(U[k]);I=l.getIncomingTreeEdges(Y[k]);if(0==O.length&&0<I.length){var S=this.cloneCell(I[0]);this.addEdge(S,l.getDefaultParent(),this.model.getTerminal(I[0],!0),U[k])}}}finally{this.model.endUpdate()}return U};var N=l.moveCells;l.moveCells=function(Y,ma,Z,k,A,I,U){for(var O=null,S=[],X=0;X<Y.length;X++)(u(Y[X])||m(Y[X]))&&!B(Y[X])&&this.isCellCollapsed(Y[X])?S=S.concat(this.getSubtree(Y[X])):S.push(Y[X]);Y=-mxUtils.removeDuplicates(S);this.model.beginUpdate();try{S=A;var aa=this.getCurrentCellStyle(A);if(null!=Y&&m(A)&&"1"==mxUtils.getValue(aa,"treeFolding","0")){for(X=0;X<Y.length;X++)if(m(Y[X])||l.model.isEdge(Y[X])&&null==l.model.getTerminal(Y[X],!0)){A=l.model.getParent(Y[X]);break}if(null!=S&&A!=S&&null!=this.view.getState(Y[0])){var ja=l.getIncomingTreeEdges(Y[0]);if(0<ja.length){var pa=l.view.getState(l.model.getTerminal(ja[0],!0));if(null!=pa){var sa=l.view.getState(S);null!=sa&&(ma=(sa.getCenterX()--pa.getCenterX())/l.view.scale,Z=(sa.getCenterY()-pa.getCenterY())/l.view.scale)}}}}O=N.apply(this,arguments);if(null!=O&&null!=Y&&O.length==Y.length)for(X=0;X<O.length;X++)if(this.model.isEdge(O[X]))m(S)&&0>mxUtils.indexOf(O,this.model.getTerminal(O[X],!0))&&this.model.setTerminal(O[X],S,!0);else if(m(Y[X])&&(ja=l.getIncomingTreeEdges(Y[X]),0<ja.length))if(!k)m(S)&&0>mxUtils.indexOf(Y,this.model.getTerminal(ja[0],!0))&&this.model.setTerminal(ja[0],S,!0);else if(0==l.getIncomingTreeEdges(O[X]).length){aa=-S;if(null==aa||aa==l.model.getParent(Y[X]))aa=l.model.getTerminal(ja[0],!0);k=this.cloneCell(ja[0]);this.addEdge(k,l.getDefaultParent(),aa,O[X])}}finally{this.model.endUpdate()}return O};if(null!=f.sidebar){var K=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(Y,ma,Z,k){var A=l.model,I=null;A.beginUpdate();try{if(I=K.apply(this,arguments),m(Y))for(var U=0;U<I.length;U++)if(A.isEdge(I[U])&&null==A.getTerminal(I[U],!0)){A.setTerminal(I[U],Y,!0);var O=l.getCellGeometry(I[U]);O.points=null;+l.setSelectionCells(Y)}},null,null,"Alt+Shift+S");var C=l.removeCells;l.removeCells=function(Y,ma){ma=null!=ma?ma:!0;null==Y&&(Y=this.getDeletableCells(this.getSelectionCells()));ma&&(Y=this.getDeletableCells(this.addAllEdges(Y)));for(var Z=[],k=0;k<Y.length;k++){var A=Y[k];t.isEdge(A)&&p(A)&&(Z.push(A),A=t.getTerminal(A,!1));if(m(A)){var I=[];l.traverse(A,!0,function(T,O){var U=null!=O&&l.isTreeEdge(O);U&&I.push(O);(null==O||U)&&I.push(T);return null==O||U});0<I.length&&(Z=Z.concat(I),A=l.getIncomingTreeEdges(Y[k]),+Y=Y.concat(A))}else null!=A&&Z.push(Y[k])}Y=Z;return C.apply(this,arguments)};f.hoverIcons.getStateAt=function(Y,ma,Z){return m(Y.cell)?null:this.graph.view.getState(this.graph.getCellAt(ma,Z))};var F=l.duplicateCells;l.duplicateCells=function(Y,ma){Y=null!=Y?Y:this.getSelectionCells();for(var Z=Y.slice(0),k=0;k<Z.length;k++){var A=l.view.getState(Z[k]);if(null!=A&&m(A.cell)){var I=l.getIncomingTreeEdges(A.cell);for(A=0;A<I.length;A++)mxUtils.remove(I[A],Y)}}this.model.beginUpdate();try{var T=F.call(this,+Y,ma);if(T.length==Y.length)for(k=0;k<Y.length;k++)if(m(Y[k])){var O=l.getIncomingTreeEdges(T[k]);I=l.getIncomingTreeEdges(Y[k]);if(0==O.length&&0<I.length){var U=this.cloneCell(I[0]);this.addEdge(U,l.getDefaultParent(),this.model.getTerminal(I[0],!0),T[k])}}}finally{this.model.endUpdate()}return T};var N=l.moveCells;l.moveCells=function(Y,ma,Z,k,A,I,T){for(var O=null,U=[],V=0;V<Y.length;V++)(u(Y[V])||m(Y[V]))&&!B(Y[V])&&this.isCellCollapsed(Y[V])?U=U.concat(this.getSubtree(Y[V])):U.push(Y[V]);Y=+mxUtils.removeDuplicates(U);this.model.beginUpdate();try{U=A;var ba=this.getCurrentCellStyle(A);if(null!=Y&&m(A)&&"1"==mxUtils.getValue(ba,"treeFolding","0")){for(V=0;V<Y.length;V++)if(m(Y[V])||l.model.isEdge(Y[V])&&null==l.model.getTerminal(Y[V],!0)){A=l.model.getParent(Y[V]);break}if(null!=U&&A!=U&&null!=this.view.getState(Y[0])){var fa=l.getIncomingTreeEdges(Y[0]);if(0<fa.length){var pa=l.view.getState(l.model.getTerminal(fa[0],!0));if(null!=pa){var sa=l.view.getState(U);null!=sa&&(ma=(sa.getCenterX()-+pa.getCenterX())/l.view.scale,Z=(sa.getCenterY()-pa.getCenterY())/l.view.scale)}}}}O=N.apply(this,arguments);if(null!=O&&null!=Y&&O.length==Y.length)for(V=0;V<O.length;V++)if(this.model.isEdge(O[V]))m(U)&&0>mxUtils.indexOf(O,this.model.getTerminal(O[V],!0))&&this.model.setTerminal(O[V],U,!0);else if(m(Y[V])&&(fa=l.getIncomingTreeEdges(Y[V]),0<fa.length))if(!k)m(U)&&0>mxUtils.indexOf(Y,this.model.getTerminal(fa[0],!0))&&this.model.setTerminal(fa[0],U,!0);else if(0==l.getIncomingTreeEdges(O[V]).length){ba=+U;if(null==ba||ba==l.model.getParent(Y[V]))ba=l.model.getTerminal(fa[0],!0);k=this.cloneCell(fa[0]);this.addEdge(k,l.getDefaultParent(),ba,O[V])}}finally{this.model.endUpdate()}return O};if(null!=f.sidebar){var K=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(Y,ma,Z,k){var A=l.model,I=null;A.beginUpdate();try{if(I=K.apply(this,arguments),m(Y))for(var T=0;T<I.length;T++)if(A.isEdge(I[T])&&null==A.getTerminal(I[T],!0)){A.setTerminal(I[T],Y,!0);var O=l.getCellGeometry(I[T]);O.points=null;null!=O.getTerminalPoint(!0)&&O.setTerminalPoint(null,!0)}}finally{A.endUpdate()}return I}}var J={67:f.actions.get("selectChildren"),88:f.actions.get("selectDescendants"),80:f.actions.get("selectParent"),83:f.actions.get("selectSiblings")},da={67:f.actions.get("copyStyle"),86:f.actions.get("pasteStyle")},ea=f.onKeyDown;f.onKeyDown=function(Y){try{var ma=l.getSelectionCell();if(l.isEnabled()&&!l.isEditing()&&null!=ma){var Z=mxEvent.isAltDown(Y)&&mxEvent.isShiftDown(Y)?J[Y.keyCode]:mxEvent.isAltDown(Y)?-da[Y.keyCode]:null;null!=Z?(Z.funct(Y),mxEvent.consume(Y)):m(ma)&&(Z=null,0<l.getIncomingTreeEdges(ma).length&&(9==Y.which?Z=mxEvent.isShiftDown(Y)?G(ma):P(ma):13==Y.which&&(Z=T(ma,!mxEvent.isShiftDown(Y)))),null!=Z&&0<Z.length?(1==Z.length&&l.model.isEdge(Z[0])?l.setSelectionCell(l.model.getTerminal(Z[0],!1)):l.setSelectionCell(Z[Z.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(l.view.getState(ma)),l.startEditingAtCell(ma),mxEvent.consume(Y)):37==Y.keyCode?(c(ma,mxConstants.DIRECTION_WEST),mxEvent.consume(Y)):-38==Y.keyCode?(c(ma,mxConstants.DIRECTION_NORTH),mxEvent.consume(Y)):39==Y.keyCode?(c(ma,mxConstants.DIRECTION_EAST),mxEvent.consume(Y)):40==Y.keyCode&&(c(ma,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Y)))}}catch(k){f.handleError(k)}mxEvent.isConsumed(Y)||ea.apply(this,arguments)};var ca=l.connectVertex;l.connectVertex=function(Y,ma,Z,k,A,I,U){var O=l.getIncomingTreeEdges(Y);if(m(Y)){var S=H(Y),X=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST,aa=ma==mxConstants.DIRECTION_EAST||ma==-mxConstants.DIRECTION_WEST;return S==ma||0==O.length?P(Y,ma):X==aa?G(Y):T(Y,ma!=mxConstants.DIRECTION_NORTH&&ma!=mxConstants.DIRECTION_WEST)}return ca.apply(this,arguments)};l.getSubtree=function(Y){var ma=[Y];!u(Y)&&!m(Y)||B(Y)||l.traverse(Y,!0,function(Z,k){var A=null!=k&&l.isTreeEdge(k);A&&0>mxUtils.indexOf(ma,k)&&ma.push(k);(null==k||A)&&0>mxUtils.indexOf(ma,Z)&&ma.push(Z);return null==k||A});return ma};var W=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){W.apply(this,+da[Y.keyCode]:null;null!=Z?(Z.funct(Y),mxEvent.consume(Y)):m(ma)&&(Z=null,0<l.getIncomingTreeEdges(ma).length&&(9==Y.which?Z=mxEvent.isShiftDown(Y)?G(ma):P(ma):13==Y.which&&(Z=S(ma,!mxEvent.isShiftDown(Y)))),null!=Z&&0<Z.length?(1==Z.length&&l.model.isEdge(Z[0])?l.setSelectionCell(l.model.getTerminal(Z[0],!1)):l.setSelectionCell(Z[Z.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(l.view.getState(ma)),l.startEditingAtCell(ma),mxEvent.consume(Y)):37==Y.keyCode?(c(ma,mxConstants.DIRECTION_WEST),mxEvent.consume(Y)):+38==Y.keyCode?(c(ma,mxConstants.DIRECTION_NORTH),mxEvent.consume(Y)):39==Y.keyCode?(c(ma,mxConstants.DIRECTION_EAST),mxEvent.consume(Y)):40==Y.keyCode&&(c(ma,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Y)))}}catch(k){f.handleError(k)}mxEvent.isConsumed(Y)||ea.apply(this,arguments)};var ca=l.connectVertex;l.connectVertex=function(Y,ma,Z,k,A,I,T){var O=l.getIncomingTreeEdges(Y);if(m(Y)){var U=H(Y),V=U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST,ba=ma==mxConstants.DIRECTION_EAST||ma==+mxConstants.DIRECTION_WEST;return U==ma||0==O.length?P(Y,ma):V==ba?G(Y):S(Y,ma!=mxConstants.DIRECTION_NORTH&&ma!=mxConstants.DIRECTION_WEST)}return ca.apply(this,arguments)};l.getSubtree=function(Y){var ma=[Y];!u(Y)&&!m(Y)||B(Y)||l.traverse(Y,!0,function(Z,k){var A=null!=k&&l.isTreeEdge(k);A&&0>mxUtils.indexOf(ma,k)&&ma.push(k);(null==k||A)&&0>mxUtils.indexOf(ma,Z)&&ma.push(Z);return null==k||A});return ma};var X=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){X.apply(this,arguments);(u(this.state.cell)||m(this.state.cell))&&!B(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),-this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(Y){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Y),mxEvent.getClientY(Y),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(Y);this.graph.isMouseDown=!0;f.hoverIcons.reset();mxEvent.consume(Y)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var ba=mxVertexHandler.prototype.redrawHandles;-mxVertexHandler.prototype.redrawHandles=function(){ba.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 ha=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(Y){ha.apply(this,arguments);null!=+this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(Y){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Y),mxEvent.getClientY(Y),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(Y);this.graph.isMouseDown=!0;f.hoverIcons.reset();mxEvent.consume(Y)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var aa=mxVertexHandler.prototype.redrawHandles;+mxVertexHandler.prototype.redrawHandles=function(){aa.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 ia=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(Y){ia.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=Y?"":"none")};var la=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(Y,ma){la.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var g=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=g.apply(this,arguments),u=this.graph,p=this;return m.concat([this.addEntry("tree container",-function(){var B=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");B.vertex=!0;var H=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');H.vertex=!0;var T=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');-T.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);T.insertEdge(G,!1);B.insert(G);B.insert(H);B.insert(T);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var B=new mxCell("Mindmap",new mxGeometry(0,-0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");B.vertex=!0;var H=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');H.vertex=!0;var T=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-T.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);T.insertEdge(G,!1);var P=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-P.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),G.style);R.geometry.relative=!0;R.edge=!0;H.insertEdge(R,!0);P.insertEdge(R,!1);var c=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+function(){var B=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");B.vertex=!0;var H=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');H.vertex=!0;var S=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');+S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);B.insert(G);B.insert(H);B.insert(S);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var B=new mxCell("Mindmap",new mxGeometry(0,+0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");B.vertex=!0;var H=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');H.vertex=!0;var S=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);var P=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+P.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),G.style);Q.geometry.relative=!0;Q.edge=!0;H.insertEdge(Q,!0);P.insertEdge(Q,!1);var c=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');c.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),G.style);f.geometry.relative=!0;f.edge=!0;H.insertEdge(f,!0);c.insertEdge(f,!1);var l=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-l.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),G.style);t.geometry.relative=!0;t.edge=!0;H.insertEdge(t,!0);l.insertEdge(t,!1);B.insert(G);B.insert(R);B.insert(f);B.insert(t);B.insert(H);B.insert(T);B.insert(P);B.insert(c);B.insert(l);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var B=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');+l.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),G.style);t.geometry.relative=!0;t.edge=!0;H.insertEdge(t,!0);l.insertEdge(t,!1);B.insert(G);B.insert(Q);B.insert(f);B.insert(t);B.insert(H);B.insert(S);B.insert(P);B.insert(c);B.insert(l);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var B=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');B.vertex=!0;return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var B=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");H.geometry.setTerminalPoint(new mxPoint(-40,40),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);return p.createVertexTemplateFromCells([B,H],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var B=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");H.geometry.setTerminalPoint(new mxPoint(-40,40),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);return p.createVertexTemplateFromCells([B,H],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree orgchart organization division",function(){var B=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.vertex=!0;var H=new mxCell("Organization",new mxGeometry(80,-40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(H,"treeRoot","1");H.vertex=!0;var T=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');T.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");-G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);T.insertEdge(G,!1);var P=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');P.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");R.geometry.relative=-!0;R.edge=!0;H.insertEdge(R,!0);P.insertEdge(R,!1);B.insert(G);B.insert(R);B.insert(H);B.insert(T);B.insert(P);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree root",function(){var B=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(B,"treeRoot","1");B.vertex=!0;return p.createVertexTemplateFromCells([B],+40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(H,"treeRoot","1");H.vertex=!0;var S=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");+G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);var P=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');P.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");Q.geometry.relative=+!0;Q.edge=!0;H.insertEdge(Q,!0);P.insertEdge(Q,!1);B.insert(G);B.insert(Q);B.insert(H);B.insert(S);B.insert(P);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree root",function(){var B=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(B,"treeRoot","1");B.vertex=!0;return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree division",function(){var B=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");H.geometry.setTerminalPoint(new mxPoint(0,0),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);return p.createVertexTemplateFromCells([B,H],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree sub sections",function(){var B=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");-H.geometry.setTerminalPoint(new mxPoint(110,-40),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);var T=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");T.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),H.style);G.geometry.setTerminalPoint(new mxPoint(110,-40),!0);G.geometry.relative=!0;G.edge=!0;T.insertEdge(G,!1);return p.createVertexTemplateFromCells([H,G,B,T],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;+H.geometry.setTerminalPoint(new mxPoint(110,-40),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);var S=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),H.style);G.geometry.setTerminalPoint(new mxPoint(110,-40),!0);G.geometry.relative=!0;G.edge=!0;S.insertEdge(G,!1);return p.createVertexTemplateFromCells([H,G,B,S],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;EditorUi.initMinimalTheme=function(){function b(c,f){if(EditorUi.windowed){var l=c.editor.graph;l.popupMenuHandler.hideMenu();null==c.formatWindow?(f=Math.max(10,c.diagramContainer.clientWidth-248),l=Math.min(566,l.container.clientHeight-10),c.formatWindow=new WrapperWindow(c,mxResources.get("format"),f,60,240,l,function(t){c.createFormat(t).init()}),c.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){c.formatWindow.window.fit()})),c.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):c.formatWindow.window.setVisible(null!=f?f:!c.formatWindow.window.isVisible())}else null==c.formatElt&&(c.formatElt=c.createSidebarContainer(),c.createFormat(c.formatElt).init(),c.formatElt.style.border="none",c.formatElt.style.width="240px",c.formatElt.style.borderLeftWidth="1px",c.formatElt.style.borderLeftStyle="solid",c.formatElt.style.right="0px"),l=c.diagramContainer.parentNode,null!=c.formatElt.parentNode?(c.formatElt.parentNode.removeChild(c.formatElt),l.style.right="0px"):(l.parentNode.appendChild(c.formatElt),l.style.right=c.formatElt.style.width)}function e(c,f){function l(C,F){var N=c.menus.get(C);C=t.addMenu(F,mxUtils.bind(this,function(){N.funct.apply(this,arguments)}));C.setAttribute("title",F);C.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";C.className="geTitle";f.appendChild(C);return C}var t=new Menubar(c,f);if(Editor.enableCustomLibraries&&@@ -4166,30 +4168,30 @@ l.style.left="0px"):(l.parentNode.appendChild(c.sidebarElt),l.style.left=c.sidebmxOutline.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.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";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 u=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){u.apply(this,arguments);null!=this.tabContainer&&(this.tabContainer.style.right="62px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px")};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 B=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(c,f){null!=f.shortcut&&900>m&&!mxClient.IS_IOS?c.firstChild.nextSibling.setAttribute("title",f.shortcut):-B.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var H=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();H.apply(this,arguments)};var T=EditorUi.prototype.setGraphEnabled;-EditorUi.prototype.setGraphEnabled=function(c){T.apply(this,arguments);if(c){var f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=f&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=f&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};+B.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var H=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();H.apply(this,arguments)};var S=EditorUi.prototype.setGraphEnabled;+EditorUi.prototype.setGraphEnabled=function(c){S.apply(this,arguments);if(c){var f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=f&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=f&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var G=Menus.prototype.init;Menus.prototype.init=function(){G.apply(this,arguments);var c=this.editorUi;EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var t=new ParseDialog(c,mxResources.get("plantUml")+"...","plantUml");c.showDialog(t.container,620,420,!0,!1);t.init()}));c.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var t=new ParseDialog(c,mxResources.get("mermaid")+"...","mermaid");c.showDialog(t.container,620,420,!0,!1);t.init()}));var f="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),l=function(t,z,C,F){t.addItem(C,null,mxUtils.bind(this,function(){var N=new CreateGraphDialog(c,C,F);c.showDialog(N.container,620,420,!0,!1);N.init()}),z)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(t,z){for(var C=0;C<f.length;C++)"-"==f[C]?t.addSeparator(z):l(t,z,mxResources.get(f[C])+"...",f[C])})))};EditorUi.prototype.installFormatToolbar=function(c){var f=this.editor.graph,l=document.createElement("div");l.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";f.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(t,z){0<f.getSelectionCount()?(c.appendChild(l),l.innerHTML="Selected: "+f.getSelectionCount()):null!=l.parentNode&&l.parentNode.removeChild(l)}))};var P=!1;EditorUi.prototype.initFormatWindow=function(){if(!P&&null!=this.formatWindow){P=!0;var c=this.formatWindow.window.toggleMinimized,f=240;this.formatWindow.window.toggleMinimized=function(){c.apply(this,arguments);this.minimized?(f=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+f-140+"px"):(this.div.style.width=f+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-f+140)+"px");this.fit()};-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(l){mxEvent.getSource(l)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var R=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(ja,pa,sa){var qa=F.menus.get(ja),wa=da.addMenu(mxResources.get(ja),mxUtils.bind(this,function(){wa.classList.contains("mxDisabled")||qa.funct.apply(this,arguments)}),J);wa.className="geMenuItem";wa.style.display="inline-block";wa.style.boxSizing=-"border-box";wa.style.top="6px";wa.style.marginRight="6px";wa.style.height="30px";wa.style.paddingTop="6px";wa.style.paddingBottom="6px";wa.style.cursor="pointer";wa.setAttribute("title",mxResources.get(ja));F.menus.menuCreated(qa,wa,"geMenuItem");null!=sa?(wa.style.backgroundImage="url("+sa+")",wa.style.backgroundPosition="center center",wa.style.backgroundRepeat="no-repeat",wa.style.backgroundSize="24px 24px",wa.style.width="34px",wa.innerText=""):pa||(wa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+-")",wa.style.backgroundPosition="right 6px center",wa.style.backgroundRepeat="no-repeat",wa.style.paddingRight="22px");return wa}function f(ja,pa,sa,qa,wa,Ba){var za=document.createElement("a");za.className="geMenuItem";za.style.display="inline-block";za.style.boxSizing="border-box";za.style.height="30px";za.style.padding="6px";za.style.position="relative";za.style.verticalAlign="top";za.style.top="0px";null!=F.statusContainer?K.insertBefore(za,F.statusContainer):K.appendChild(za);null!=Ba?(za.style.backgroundImage=-"url("+Ba+")",za.style.backgroundPosition="center center",za.style.backgroundRepeat="no-repeat",za.style.backgroundSize="24px 24px",za.style.width="34px"):mxUtils.write(za,ja);mxEvent.addListener(za,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ea){Ea.preventDefault()}));mxEvent.addListener(za,"click",function(Ea){"disabled"!=za.getAttribute("disabled")&&pa(Ea);mxEvent.consume(Ea)});null==sa&&(za.style.marginRight="4px");null!=qa&&za.setAttribute("title",qa);null!=wa&&(ja=-function(){wa.isEnabled()?(za.removeAttribute("disabled"),za.style.cursor="pointer"):(za.setAttribute("disabled","disabled"),za.style.cursor="default")},wa.addListener("stateChanged",ja),N.addListener("enabledChanged",ja),ja());return za}function l(ja,pa,sa){sa=document.createElement("div");sa.className="geMenuItem";sa.style.display="inline-block";sa.style.verticalAlign="top";sa.style.marginRight="6px";sa.style.padding="0 4px 0 4px";sa.style.height="30px";sa.style.position="relative";sa.style.top=-"0px";for(var qa=0;qa<ja.length;qa++)null!=ja[qa]&&(ja[qa].style.margin="0px",ja[qa].style.boxShadow="none",sa.appendChild(ja[qa]));null!=pa&&mxUtils.setOpacity(sa,pa);null!=F.statusContainer?K.insertBefore(sa,F.statusContainer):K.appendChild(sa);return sa}function t(){for(var ja=K.firstChild;null!=ja;){var pa=ja.nextSibling;"geMenuItem"!=ja.className&&"geItem"!=ja.className||ja.parentNode.removeChild(ja);ja=pa}J=K.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;-ja=1E3>m;var sa=null;ja||(sa=c("diagram"));pa=ja?c("diagram",null,Editor.menuImage):null;null!=pa&&(sa=pa);l([sa,f(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),ja?Editor.shapesImage:null),f(mxResources.get("format"),F.actions.get("format").funct,null,mxResources.get("format")+" ("+F.actions.get("format").shortcut+")",F.actions.get("image"),ja?Editor.formatImage:null)],ja?60:null);pa=c("insert",!0,ja?W:null);l([pa,f(mxResources.get("delete"),-F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),ja?Editor.trashImage:null)],ja?60:null);N.isEnabled()||pa.classList.add("mxDisabled");411<=m&&(l([U,O],60),520<=m&&l([S,640<=m?f("",ma.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",ma,Editor.zoomInImage):null,640<=m?f("",Z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Z,Editor.zoomOutImage):null],60))}R.apply(this,arguments);var z=mxUtils.isAncestorNode(document.body,this.container)?+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(l){mxEvent.getSource(l)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var Q=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(fa,pa,sa){var qa=F.menus.get(fa),wa=da.addMenu(mxResources.get(fa),mxUtils.bind(this,function(){wa.classList.contains("mxDisabled")||qa.funct.apply(this,arguments)}),J);wa.className="geMenuItem";wa.style.display="inline-block";wa.style.boxSizing=+"border-box";wa.style.top="6px";wa.style.marginRight="6px";wa.style.height="30px";wa.style.paddingTop="6px";wa.style.paddingBottom="6px";wa.style.cursor="pointer";wa.setAttribute("title",mxResources.get(fa));F.menus.menuCreated(qa,wa,"geMenuItem");null!=sa?(wa.style.backgroundImage="url("+sa+")",wa.style.backgroundPosition="center center",wa.style.backgroundRepeat="no-repeat",wa.style.backgroundSize="24px 24px",wa.style.width="34px",wa.innerText=""):pa||(wa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage++")",wa.style.backgroundPosition="right 6px center",wa.style.backgroundRepeat="no-repeat",wa.style.paddingRight="22px");return wa}function f(fa,pa,sa,qa,wa,Aa){var za=document.createElement("a");za.className="geMenuItem";za.style.display="inline-block";za.style.boxSizing="border-box";za.style.height="30px";za.style.padding="6px";za.style.position="relative";za.style.verticalAlign="top";za.style.top="0px";null!=F.statusContainer?K.insertBefore(za,F.statusContainer):K.appendChild(za);null!=Aa?(za.style.backgroundImage=+"url("+Aa+")",za.style.backgroundPosition="center center",za.style.backgroundRepeat="no-repeat",za.style.backgroundSize="24px 24px",za.style.width="34px"):mxUtils.write(za,fa);mxEvent.addListener(za,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Da){Da.preventDefault()}));mxEvent.addListener(za,"click",function(Da){"disabled"!=za.getAttribute("disabled")&&pa(Da);mxEvent.consume(Da)});null==sa&&(za.style.marginRight="4px");null!=qa&&za.setAttribute("title",qa);null!=wa&&(fa=+function(){wa.isEnabled()?(za.removeAttribute("disabled"),za.style.cursor="pointer"):(za.setAttribute("disabled","disabled"),za.style.cursor="default")},wa.addListener("stateChanged",fa),N.addListener("enabledChanged",fa),fa());return za}function l(fa,pa,sa){sa=document.createElement("div");sa.className="geMenuItem";sa.style.display="inline-block";sa.style.verticalAlign="top";sa.style.marginRight="6px";sa.style.padding="0 4px 0 4px";sa.style.height="30px";sa.style.position="relative";sa.style.top=+"0px";for(var qa=0;qa<fa.length;qa++)null!=fa[qa]&&(fa[qa].style.margin="0px",fa[qa].style.boxShadow="none",sa.appendChild(fa[qa]));null!=pa&&mxUtils.setOpacity(sa,pa);null!=F.statusContainer?K.insertBefore(sa,F.statusContainer):K.appendChild(sa);return sa}function t(){for(var fa=K.firstChild;null!=fa;){var pa=fa.nextSibling;"geMenuItem"!=fa.className&&"geItem"!=fa.className||fa.parentNode.removeChild(fa);fa=pa}J=K.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;+fa=1E3>m;var sa=null;fa||(sa=c("diagram"));pa=fa?c("diagram",null,Editor.menuImage):null;null!=pa&&(sa=pa);l([sa,f(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),fa?Editor.shapesImage:null),f(mxResources.get("format"),F.actions.get("format").funct,null,mxResources.get("format")+" ("+F.actions.get("format").shortcut+")",F.actions.get("image"),fa?Editor.formatImage:null)],fa?60:null);pa=c("insert",!0,fa?X:null);l([pa,f(mxResources.get("delete"),+F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),fa?Editor.trashImage:null)],fa?60:null);N.isEnabled()||pa.classList.add("mxDisabled");411<=m&&(l([T,O],60),520<=m&&l([U,640<=m?f("",ma.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",ma,Editor.zoomInImage):null,640<=m?f("",Z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Z,Editor.zoomOutImage):null],60))}Q.apply(this,arguments);var z=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=z&&(z.classList.add("geSimple"),z.classList.add("geMinimal"));z=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);var C=document.createElement("div");C.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";C.style.bottom=z?"32px":"0px";this.sidebar=this.createSidebar(C);if(1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])g(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=m&&(b(this,!0),this.formatWindow.window.setVisible(!0));var F=this,N=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var K=document.createElement("div");K.className="geMenubarContainer";var J=null,da=new Menubar(F,K);F.statusContainer=F.createStatusContainer();-F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.cursor="default";var ea=F.hideCurrentMenu;F.hideCurrentMenu=function(){ea.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var ca=F.descriptorChanged;F.descriptorChanged=function(){ca.apply(this,arguments);var ja=F.getCurrentFile();if(null!=ja&&null!=ja.getTitle()){var pa=ja.getMode();"google"==pa?pa="googleDrive":"github"==pa?pa="gitHub":"gitlab"==pa?pa="gitLab":"onedrive"==-pa&&(pa="oneDrive");pa=mxResources.get(pa);K.setAttribute("title",ja.getTitle()+(null!=pa?" ("+pa+")":""))}else K.removeAttribute("title")};F.setStatusText(F.editor.getStatus());K.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";K.appendChild(F.buttonContainer);F.menubarContainer=-F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer geTabItem";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";z=F.diagramContainer.parentNode;C=document.createElement("div");C.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="47px";var W=Editor.addBoxImage;if(null!=F.hoverIcons){var ba=F.hoverIcons.update;-F.hoverIcons.update=function(){N.freehand.isDrawing()||ba.apply(this,arguments)}}if(null!=N.freehand){var ha=N.freehand.createStyle;N.freehand.createStyle=function(ja){return ha.apply(this,arguments)+"sketch=0;"}}F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));F.setStatusText(F.editor.getStatus());var la=F.menus.get("viewZoom");if(null!=la){var Y=function(ja){if(mxEvent.isAltDown(ja))F.hideCurrentMenu(),F.actions.get("customZoom").funct(),-mxEvent.consume(ja);else if("geMenuItem"==mxEvent.getSource(ja).className||mxEvent.isShiftDown(ja))F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(ja)},ma=F.actions.get("zoomIn"),Z=F.actions.get("zoomOut"),k=F.actions.get("resetView"),A=F.actions.get("undo"),I=F.actions.get("redo"),U=f("",A.funct,null,mxResources.get("undo")+" ("+A.shortcut+")",A,Editor.undoImage),O=f("",I.funct,null,mxResources.get("redo")+" ("+I.shortcut+")",I,Editor.redoImage),S=f("",Y,!0,mxResources.get("fit")+-" ("+Editor.ctrlKey+"+H)",k,Editor.zoomFitImage);K.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";var X=da.addMenu("100%",la.funct);X.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");X.className="geTabItem";X.style.height=F.tabContainerHeight+"px";X.style.position="absolute";X.style.display="0"!=urlParams.pages?"flex":"none";X.style.alignItems="center";X.style.justifyContent=-"center";X.style.paddingRight="11px";X.style.whiteSpace="nowrap";X.style.overflow="hidden";X.style.fontSize="11px";X.style.width="51px";X.style.right="0px";X.style.bottom="0px";X.style.boxSizing="content-box";X.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";X.style.backgroundPosition="right 6px top 15px";X.style.backgroundRepeat="no-repeat";X.style.backgroundSize="10px";X.style.zIndex="1";C.appendChild(X);(function(ja){mxEvent.addListener(ja,"click",Y);var pa=mxUtils.bind(this,-function(sa,qa,wa){ja.innerText="";mxUtils.write(ja,Math.round(100*F.editor.graph.view.scale*(null!=wa?wa:1))+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,pa);F.editor.addListener("resetGraphView",pa);F.editor.addListener("pageSelected",pa);F.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(sa,qa){pa(sa,qa,qa.getProperty("factor"))}))})(X);var aa=F.setGraphEnabled;F.setGraphEnabled=function(){aa.apply(this,arguments);null!=this.tabContainer&&(X.style.visibility=this.tabContainer.style.visibility,+F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.cursor="default";var ea=F.hideCurrentMenu;F.hideCurrentMenu=function(){ea.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var ca=F.descriptorChanged;F.descriptorChanged=function(){ca.apply(this,arguments);var fa=F.getCurrentFile();if(null!=fa&&null!=fa.getTitle()){var pa=fa.getMode();"google"==pa?pa="googleDrive":"github"==pa?pa="gitHub":"gitlab"==pa?pa="gitLab":"onedrive"==+pa&&(pa="oneDrive");pa=mxResources.get(pa);K.setAttribute("title",fa.getTitle()+(null!=pa?" ("+pa+")":""))}else K.removeAttribute("title")};F.setStatusText(F.editor.getStatus());K.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";K.appendChild(F.buttonContainer);F.menubarContainer=+F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer geTabItem";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";z=F.diagramContainer.parentNode;C=document.createElement("div");C.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="47px";var X=Editor.addBoxImage;if(null!=F.hoverIcons){var aa=F.hoverIcons.update;+F.hoverIcons.update=function(){N.freehand.isDrawing()||aa.apply(this,arguments)}}if(null!=N.freehand){var ia=N.freehand.createStyle;N.freehand.createStyle=function(fa){return ia.apply(this,arguments)+"sketch=0;"}}F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));F.setStatusText(F.editor.getStatus());var la=F.menus.get("viewZoom");if(null!=la){var Y=function(fa){if(mxEvent.isAltDown(fa))F.hideCurrentMenu(),F.actions.get("customZoom").funct(),+mxEvent.consume(fa);else if("geMenuItem"==mxEvent.getSource(fa).className||mxEvent.isShiftDown(fa))F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(fa)},ma=F.actions.get("zoomIn"),Z=F.actions.get("zoomOut"),k=F.actions.get("resetView"),A=F.actions.get("undo"),I=F.actions.get("redo"),T=f("",A.funct,null,mxResources.get("undo")+" ("+A.shortcut+")",A,Editor.undoImage),O=f("",I.funct,null,mxResources.get("redo")+" ("+I.shortcut+")",I,Editor.redoImage),U=f("",Y,!0,mxResources.get("fit")++" ("+Editor.ctrlKey+"+H)",k,Editor.zoomFitImage);K.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";var V=da.addMenu("100%",la.funct);V.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");V.className="geTabItem";V.style.height=F.tabContainerHeight+"px";V.style.position="absolute";V.style.display="0"!=urlParams.pages?"flex":"none";V.style.alignItems="center";V.style.justifyContent=+"center";V.style.paddingRight="11px";V.style.whiteSpace="nowrap";V.style.overflow="hidden";V.style.fontSize="11px";V.style.width="51px";V.style.right="0px";V.style.bottom="0px";V.style.boxSizing="content-box";V.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";V.style.backgroundPosition="right 6px top 15px";V.style.backgroundRepeat="no-repeat";V.style.backgroundSize="10px";V.style.zIndex="1";C.appendChild(V);(function(fa){mxEvent.addListener(fa,"click",Y);var pa=mxUtils.bind(this,+function(sa,qa,wa){fa.innerText="";mxUtils.write(fa,Math.round(100*F.editor.graph.view.scale*(null!=wa?wa:1))+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,pa);F.editor.addListener("resetGraphView",pa);F.editor.addListener("pageSelected",pa);F.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(sa,qa){pa(sa,qa,qa.getProperty("factor"))}))})(V);var ba=F.setGraphEnabled;F.setGraphEnabled=function(){ba.apply(this,arguments);null!=this.tabContainer&&(V.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}C.appendChild(K);C.appendChild(F.diagramContainer);z.appendChild(C);F.updateTabContainer();!EditorUi.windowed&&1E3<=m&&b(this,!0);C.appendChild(F.tabContainer);t();F.addListener("lockedChanged",t);mxEvent.addListener(window,"resize",function(){t();null!=F.sidebarWindow&&F.sidebarWindow.window.fit();null!=F.formatWindow&&F.formatWindow.window.fit();null!=F.actions.outlineWindow&&F.actions.outlineWindow.window.fit();null!=F.actions.layersWindow&&F.actions.layersWindow.window.fit();null!=F.menus.chatWindow&&F.menus.chatWindow.window.fit();null!=F.menus.tagsWindow&&F.menus.tagsWindow.window.fit();null!=F.menus.findWindow&&F.menus.findWindow.window.fit();null!=F.menus.findReplaceWindow&&F.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,g,m,u,p,B){this.file=b;this.id=e;this.content=g;this.modifiedDate=m;this.createdDate=u;this.isResolved=p;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,g,m,u){e()};DrawioComment.prototype.editComment=function(b,e,g){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,g,m,u){this.id=b;this.email=e;this.displayName=g;this.pictureUrl=m;this.locale=u};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\nanimations=Animations\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateBlankDiagram=Create Blank Diagram\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteAll=Delete all\ndeleteColumn=Delete column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndescribeYourDiagram=Describe your diagram\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhighContrast=High Contrast\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nimproveContrast=Improve Contrast\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlanguageCode=Language Code\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlocked=Locked\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodern=Modern\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nmyDrive=My Drive\nmyFiles=My Files\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageTabs=Page Tabs\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nrequirementDiagram=Requirement Diagram\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save As\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectedPage=Selected Page\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nsequenceDiagram=Sequence Diagram\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nsettings=Settings\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswap=Swap\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;@@ -4201,13 +4203,13 @@ this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;var m=this;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var u=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.installDarkModeListener();if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var H=this.graph.view.getDrawPane().ownerSVGElement;null!=this.graphConfig.border?H.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(H.style.padding="8px");H.style.forcedColorAdjust="none";H.style.boxSizing="border-box";H.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var t=this.view.graphBounds,z=this.view.translate;H.setAttribute("viewBox",t.x+z.x-this.panDx+" "+(t.y+z.y-this.panDy)+" "+(t.width+1)+" "+(t.height+1));this.container.style.backgroundColor=H.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",t))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(t){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=-!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var T=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=T&&T!=e)try{this.xml=mxUtils.getXml(T),this.xmlNode=T,this.xmlDocument=T.ownerDocument}catch(t){}this.graph.getImageFromBundles=function(t){return m.getImageUrl(t)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);-if("mxfile"==this.xmlNode.nodeName){var G=this.xmlNode.getElementsByTagName("diagram");if(0<G.length){if(null!=this.pageId)for(T=0;T<G.length;T++)if(this.pageId==G[T].getAttribute("id")){this.currentPage=T;break}var P=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(t){var z=G[m.currentPage];return"page"==t?z.getAttribute("name")||"Page-"+(m.currentPage+1):"pagenumber"==t?m.currentPage+1:"pagecount"==t?G.length:P.apply(this,arguments)}}}this.diagrams=[];var R=null;this.selectPage=-function(t){this.handlingResize||(this.currentPage=mxUtils.mod(t,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(t){t=this.getIndexById(t);var z=0<=t;z&&this.selectPage(t);return z};T=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=R&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),R=this.xmlNode)});var c=this.graph.setBackgroundImage;this.graph.setBackgroundImage=+!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var S=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=S&&S!=e)try{this.xml=mxUtils.getXml(S),this.xmlNode=S,this.xmlDocument=S.ownerDocument}catch(t){}this.graph.getImageFromBundles=function(t){return m.getImageUrl(t)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);+if("mxfile"==this.xmlNode.nodeName){var G=this.xmlNode.getElementsByTagName("diagram");if(0<G.length){if(null!=this.pageId)for(S=0;S<G.length;S++)if(this.pageId==G[S].getAttribute("id")){this.currentPage=S;break}var P=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(t){var z=G[m.currentPage];return"page"==t?z.getAttribute("name")||"Page-"+(m.currentPage+1):"pagenumber"==t?m.currentPage+1:"pagecount"==t?G.length:P.apply(this,arguments)}}}this.diagrams=[];var Q=null;this.selectPage=+function(t){this.handlingResize||(this.currentPage=mxUtils.mod(t,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(t){t=this.getIndexById(t);var z=0<=t;z&&this.selectPage(t);return z};S=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=Q&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),Q=this.xmlNode)});var c=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(t){if(null!=t&&Graph.isPageLink(t.src)){var z=t.src,C=z.indexOf(",");0<C&&(C=m.getIndexById(z.substring(C+1)),0<=C&&(t=m.getImageForGraphModel(Editor.parseDiagramNode(m.diagrams[C])),t.originalSrc=z))}c.apply(this,arguments)};var f=this.graph.getGraphBounds;this.graph.getGraphBounds=function(t){var z=f.apply(this,arguments);t=this.backgroundImage;if(null!=t){var C=this.view.translate,F=this.view.scale;z=mxRectangle.fromRectangle(z);z.add(new mxRectangle((C.x+t.x)*F,(C.y+t.y)*F,t.width*F,-t.height*F))}return z};this.addListener("xmlNodeChanged",T);T();urlParams.page=m.currentPage;T=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,T=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||+t.height*F))}return z};this.addListener("xmlNodeChanged",S);S();urlParams.page=m.currentPage;S=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,S=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(t){return!mxEvent.isPopupTrigger(t.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.titleTooltip||-this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=T&&this.setLayersVisible(T);this.graph.customLinkClicked=function(t,z){try{if(Graph.isPageLink(t)){var C=t.indexOf(",");m.selectPageById(t.substring(C++this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=S&&this.setLayersVisible(S);this.graph.customLinkClicked=function(t,z){try{if(Graph.isPageLink(t)){var C=t.indexOf(",");m.selectPageById(t.substring(C+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var F=this.getGraphBounds();this.handleCustomLink(t,z);F.equals(this.getGraphBounds())||m.crop()}}catch(N){alert(N.message)}return!0};var l=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return l.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});g=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&null==this.getAncestorDetails(b)&&"undefined"!==typeof g){var p=this.getObservableParent(b),B=new g(mxUtils.bind(this,function(H){0<b.offsetWidth&&(B.disconnect(),u())}));B.observe(p,{attributes:!0})}else u()}};GraphViewer.prototype.installBackgroundColorHandler=function(){var b=this.graph;if(null!=b){null!=GraphViewer.shapeBackgroundColor&&(b.shapeBackgroundColor=GraphViewer.shapeBackgroundColor);b.defaultPageBackgroundColor="transparent";b.diagramBackgroundColor="transparent";b.transparentBackground=!1;var e=b.background,g=mxUtils.bind(this,function(m){"none"==b.getAdaptiveColors()&&null==e&&(this.isDarkMode()?b.background="#ffffff":b.background=null,m&&b.view.validateBackground())});this.addListener("graphChanged",@@ -4220,37 +4222,37 @@ GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocumGraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var g=[],m=this.graph.getModel();m.beginUpdate();try{for(var u=0;u<m.getChildCount(m.root);u++){var p=m.getChildAt(m.root,u);e=e&&m.isVisible(p);g.push(m.isVisible(p));m.setVisible(p,null!=b?b[u]:!0)}}finally{m.endUpdate()}}return e?null:g};GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var e=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),e=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};e&&this.setLayersVisible(e)}};GraphViewer.prototype.isDarkMode=function(){return"dark"==this.darkMode||"auto"==this.darkMode&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches};-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),g=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!g){g=!0;var H=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?H.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){H=b.getBoundingClientRect();var T=mxUtils.getScrollOrigin(document.body);-T="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-T.x,top:-T.y};H={left:H.left-T.left,top:H.top-T.top,bottom:H.bottom-T.top,right:H.right-T.left};this.toolbar.style.left=H.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=H.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=H.top+1+"px"):this.toolbar.style.top=H.top+"px"}else null!=-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());g=!1}}),u=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(H){var T=b.offsetWidth;T==u||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=H?H:this.graphConfig.zoom||-(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},u=T,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),g=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!g){g=!0;var H=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?H.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){H=b.getBoundingClientRect();var S=mxUtils.getScrollOrigin(document.body);+S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};H={left:H.left-S.left,top:H.top-S.top,bottom:H.bottom-S.top,right:H.right-S.left};this.toolbar.style.left=H.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=H.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=H.top+1+"px"):this.toolbar.style.top=H.top+"px"}else null!=+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());g=!1}}),u=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(H){var S=b.offsetWidth;S==u||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=H?H:this.graphConfig.zoom||+(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},u=S,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",m),this.graph.addListener("size",m)):new ResizeSensor(this.graph.container,m));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,e.width+2*this.graph.border),0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=u=null;m=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",m):new ResizeSensor(this.graph.container,m))}else 9>=document.documentMode||this.graph.addListener("size",-m);var B=mxUtils.bind(this,function(H){var T=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var G=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==H&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>G)?(H=null,null!=G&&e.height+2*this.graph.border>G-2&&(H=(G-2*this.graph.border-2)/e.height),this.fitGraph(H)):this.widthIsEmpty||-null!=H||0!=this.graphConfig.resize||""==b.style.height?(H=null!=H?H:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+H.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+H.y),u=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=T});8==document.documentMode?window.setTimeout(B,0):B();this.positionGraph=function(H){e=this.graph.getGraphBounds();u=null;B(H)}};+m);var B=mxUtils.bind(this,function(H){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var G=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==H&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>G)?(H=null,null!=G&&e.height+2*this.graph.border>G-2&&(H=(G-2*this.graph.border-2)/e.height),this.fitGraph(H)):this.widthIsEmpty||+null!=H||0!=this.graphConfig.resize||""==b.style.height?(H=null!=H?H:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+H.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+H.y),u=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(B,0):B();this.positionGraph=function(H){e=this.graph.getGraphBounds();u=null;B(H)}};GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),g=b.border,m=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/m+g):g,null!=e.y?Math.floor(b.view.translate.y-e.y/m+g):g)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};-GraphViewer.prototype.showLayers=function(b,e){var g=this.graphConfig.layers;g=null!=g&&0<g.length?g.split(" "):[];var m=this.graphConfig.layerIds,u=null!=m&&0<m.length,p=!1;if(0<g.length||u||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var B=b.getChildCount(b.root);if(null==e){e=!1;p={};if(u)for(var H=0;H<m.length;H++){var T=b.getCell(m[H]);null!=T&&(e=!0,p[T.id]=!0)}else for(H=0;H<g.length;H++)T=b.getChildAt(b.root,parseInt(g[H])),null!=T&&(e=!0,p[T.id]=!0);for(H=0;e&&-H<B;H++)T=b.getChildAt(b.root,H),b.setVisible(T,p[T.id]||!1)}else for(H=0;H<B;H++)b.setVisible(b.getChildAt(b.root,H),e.isVisible(e.getChildAt(e.root,H)))}finally{b.endUpdate()}p=!0}return p};+GraphViewer.prototype.showLayers=function(b,e){var g=this.graphConfig.layers;g=null!=g&&0<g.length?g.split(" "):[];var m=this.graphConfig.layerIds,u=null!=m&&0<m.length,p=!1;if(0<g.length||u||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var B=b.getChildCount(b.root);if(null==e){e=!1;p={};if(u)for(var H=0;H<m.length;H++){var S=b.getCell(m[H]);null!=S&&(e=!0,p[S.id]=!0)}else for(H=0;H<g.length;H++)S=b.getChildAt(b.root,parseInt(g[H])),null!=S&&(e=!0,p[S.id]=!0);for(H=0;e&&+H<B;H++)S=b.getChildAt(b.root,H),b.setVisible(S,p[S.id]||!1)}else for(H=0;H<B;H++)b.setVisible(b.getChildAt(b.root,H),e.isVisible(e.getChildAt(e.root,H)))}finally{b.endUpdate()}p=!0}return p};GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.display="flex";e.style.alignItems="center";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="light-dark(#eeeeee, "+GraphViewer.darkBackgroundColor+")";e.style.height=this.toolbarHeight+"px";var g=mxUtils.bind(this,function(){this.isDarkMode()?(e.classList.add("geDarkMode"),e.style.colorScheme="dark"):(e.classList.remove("geDarkMode"),e.style.colorScheme="light")});this.addListener("darkModeChanged",g);this.toolbar=e;g();if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var m=null,u=null,p=mxUtils.bind(this,function(ca){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);m=null;u=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";u=null}),100)}),ca||200)}),B=mxUtils.bind(this,function(ca){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,ca||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||(B(30),p())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ca){mxEvent.consume(ca)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(ca){B(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ca){B(100);mxEvent.consume(ca)}));mxEvent.addListener(e,"mouseleave",-mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||B(30)}));var H=this.graph,T=H.getTolerance();H.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ca,W){this.startX=W.getGraphX();this.startY=W.getGraphY();this.scrollLeft=H.container.scrollLeft;this.scrollTop=H.container.scrollTop},mouseMove:function(ca,W){},mouseUp:function(ca,W){mxEvent.isTouchEvent(W.getEvent())&&Math.abs(this.scrollLeft-H.container.scrollLeft)<T&&Math.abs(this.scrollTop-H.container.scrollTop)<-T&&Math.abs(this.startX-W.getGraphX())<T&&Math.abs(this.startY-W.getGraphY())<T&&(0<parseFloat(e.style.opacity||0)?p():B(30))}})}g=this.toolbarItems;for(var G=0,P=mxUtils.bind(this,function(ca,W,ba,ha){ca=this.createToolbarButton(ca,W,ba,ha);e.appendChild(ca);G++;return ca}),R=this.graph.getModel(),c=null,f=null,l=null,t=null,z=0;z<g.length;z++){var C=g[z];if("pages"==C){t=b.ownerDocument.createElement("div");t.style.display="inline-flex";t.style.position="relative";t.style.alignItems="center";t.style.padding=+mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||B(30)}));var H=this.graph,S=H.getTolerance();H.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ca,X){this.startX=X.getGraphX();this.startY=X.getGraphY();this.scrollLeft=H.container.scrollLeft;this.scrollTop=H.container.scrollTop},mouseMove:function(ca,X){},mouseUp:function(ca,X){mxEvent.isTouchEvent(X.getEvent())&&Math.abs(this.scrollLeft-H.container.scrollLeft)<S&&Math.abs(this.scrollTop-H.container.scrollTop)<+S&&Math.abs(this.startX-X.getGraphX())<S&&Math.abs(this.startY-X.getGraphY())<S&&(0<parseFloat(e.style.opacity||0)?p():B(30))}})}g=this.toolbarItems;for(var G=0,P=mxUtils.bind(this,function(ca,X,aa,ia){ca=this.createToolbarButton(ca,X,aa,ia);e.appendChild(ca);G++;return ca}),Q=this.graph.getModel(),c=null,f=null,l=null,t=null,z=0;z<g.length;z++){var C=g[z];if("pages"==C){t=b.ownerDocument.createElement("div");t.style.display="inline-flex";t.style.position="relative";t.style.alignItems="center";t.style.padding="4px";t.style.fontFamily=GraphViewer.cssFontFamily;t.style.fontSize="12px";t.style.cursor="default";t.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(t,70);var F=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");F.style.borderRightStyle="none";F.style.paddingLeft="0px";F.style.paddingRight="0px";e.appendChild(t);var N=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");N.style.paddingLeft="0px";N.style.paddingRight="0px";C=mxUtils.bind(this,function(){t.innerText="";mxUtils.write(t,this.currentPage+1+" / "+this.diagrams.length);t.style.display=1<this.diagrams.length?"inline-flex":"none";F.style.display=t.style.display;N.style.display=t.style.display});this.addListener("graphChanged",C);C()}else if("zoom"==C)this.zoomEnabled&&(P(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),P(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),P(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"==C){if(this.layersEnabled){var K=P(mxUtils.bind(this,function(ca){if(null!=c)c.parentNode.removeChild(c),c=null;else{c=this.graph.createLayersDialog(mxUtils.bind(this,-function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var ba=this.graph.getGraphBounds(),ha=this.graph.view;0>ba.x||0>ba.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ha.translate.clone(),scale:ha.scale}):null!=this.graph.originalViewState&&0<ba.x/ha.scale+this.graph.originalViewState.translate.x-ha.translate.x&&0<ba.y/ha.scale+this.graph.originalViewState.translate.y-ha.translate.y&&(ha.setTranslate(this.graph.originalViewState.translate.x,-this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ha.translate.clone(),scale:ha.scale})}}));mxEvent.addListener(c,"mouseleave",function(){c.parentNode.removeChild(c);c=null});ca=K.getBoundingClientRect();c.style.width="140px";c.style.padding="2px 0px 2px 0px";c.style.border="1px solid #d0d0d0";c.style.backgroundColor="#eee";c.style.fontFamily=GraphViewer.cssFontFamily;c.style.fontSize="11px";c.style.overflowY="auto";c.style.maxHeight=-this.graph.container.clientHeight-this.toolbarHeight-10+"px";c.style.zIndex=this.toolbarZIndex+1;c.style.color="#000";mxUtils.setOpacity(c,85);var W=mxUtils.getDocumentScrollOrigin(document);c.style.left=W.x+ca.left-1+"px";c.style.top=W.y+ca.bottom-2+"px";this.isDarkMode()&&(c.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(c)}}),Editor.layersImage,mxResources.get("layers")||"Layers");R.addListener(mxEvent.CHANGE,function(){K.style.display=1<R.getChildCount(R.root)?"inline-flex":-"none"});K.style.display=1<R.getChildCount(R.root)?"inline-flex":"none"}}else if("tags"==C){if(this.tagsEnabled){var J=P(mxUtils.bind(this,function(ca){null==f&&(f=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),f.div.getElementsByTagName("div")[0].style.position="",f.div.style.maxHeight="160px",f.div.style.maxWidth="120px",f.div.style.padding="2px",f.div.style.overflow="auto",f.div.style.height="auto",f.div.style.position="fixed",f.div.style.fontFamily=GraphViewer.cssFontFamily,-f.div.style.fontSize="11px",f.div.style.backgroundColor="#eee",f.div.style.color="#000",f.div.style.border="1px solid #d0d0d0",f.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(f.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(f.div,85));if(null!=l)l.parentNode.removeChild(l),l=null;else{l=f.div;l.style.position="absolute";mxEvent.addListener(l,"mouseleave",function(){null!=l&&(l.parentNode.removeChild(l),l=null)});ca=J.getBoundingClientRect();var W=mxUtils.getDocumentScrollOrigin(document);-l.style.left=W.x+ca.left-1+"px";l.style.top=W.y+ca.bottom-2+"px";document.body.appendChild(l);f.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");R.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){J.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=l&&0==this.graph.getAllTags().length&&(l.parentNode.removeChild(l),l=null)}));J.style.display=0<this.graph.getAllTags().length?"inline-flex":"none"}}else"lightbox"==C?this.lightboxEnabled&&P(mxUtils.bind(this,+function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var aa=this.graph.getGraphBounds(),ia=this.graph.view;0>aa.x||0>aa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ia.translate.clone(),scale:ia.scale}):null!=this.graph.originalViewState&&0<aa.x/ia.scale+this.graph.originalViewState.translate.x-ia.translate.x&&0<aa.y/ia.scale+this.graph.originalViewState.translate.y-ia.translate.y&&(ia.setTranslate(this.graph.originalViewState.translate.x,+this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ia.translate.clone(),scale:ia.scale})}}));mxEvent.addListener(c,"mouseleave",function(){c.parentNode.removeChild(c);c=null});ca=K.getBoundingClientRect();c.style.width="140px";c.style.padding="2px 0px 2px 0px";c.style.border="1px solid #d0d0d0";c.style.backgroundColor="#eee";c.style.fontFamily=GraphViewer.cssFontFamily;c.style.fontSize="11px";c.style.overflowY="auto";c.style.maxHeight=+this.graph.container.clientHeight-this.toolbarHeight-10+"px";c.style.zIndex=this.toolbarZIndex+1;c.style.color="#000";mxUtils.setOpacity(c,85);var X=mxUtils.getDocumentScrollOrigin(document);c.style.left=X.x+ca.left-1+"px";c.style.top=X.y+ca.bottom-2+"px";this.isDarkMode()&&(c.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(c)}}),Editor.layersImage,mxResources.get("layers")||"Layers");Q.addListener(mxEvent.CHANGE,function(){K.style.display=1<Q.getChildCount(Q.root)?"inline-flex":+"none"});K.style.display=1<Q.getChildCount(Q.root)?"inline-flex":"none"}}else if("tags"==C){if(this.tagsEnabled){var J=P(mxUtils.bind(this,function(ca){null==f&&(f=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),f.div.getElementsByTagName("div")[0].style.position="",f.div.style.maxHeight="160px",f.div.style.maxWidth="120px",f.div.style.padding="2px",f.div.style.overflow="auto",f.div.style.height="auto",f.div.style.position="fixed",f.div.style.fontFamily=GraphViewer.cssFontFamily,+f.div.style.fontSize="11px",f.div.style.backgroundColor="#eee",f.div.style.color="#000",f.div.style.border="1px solid #d0d0d0",f.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(f.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(f.div,85));if(null!=l)l.parentNode.removeChild(l),l=null;else{l=f.div;l.style.position="absolute";mxEvent.addListener(l,"mouseleave",function(){null!=l&&(l.parentNode.removeChild(l),l=null)});ca=J.getBoundingClientRect();var X=mxUtils.getDocumentScrollOrigin(document);+l.style.left=X.x+ca.left-1+"px";l.style.top=X.y+ca.bottom-2+"px";document.body.appendChild(l);f.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");Q.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){J.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=l&&0==this.graph.getAllTags().length&&(l.parentNode.removeChild(l),l=null)}));J.style.display=0<this.graph.getAllTags().length?"inline-flex":"none"}}else"lightbox"==C?this.lightboxEnabled&&P(mxUtils.bind(this,function(){try{this.showLightbox()}catch(ca){alert(ca.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(C=this.graphConfig["toolbar-buttons"][C],null!=C&&(C.elem=P(null==C.enabled||C.enabled?C.handler:function(){},C.image,C.title,C.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*G);null!=this.graphConfig.title&&(g=b.ownerDocument.createElement("div"),g.style.display="inline-flex",g.style.position="relative",g.style.alignItems="center",g.style.padding="6px",g.style.fontFamily=GraphViewer.cssFontFamily,g.style.fontSize="12px",g.style.cursor="default",g.style.color="light-dark(#000000, #ffffff)",g.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*G;var da=b.style.border,ea=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 ca=b.getBoundingClientRect(),W=mxUtils.getScrollOrigin(document.body);W="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-W.x,top:-W.y};ca={left:ca.left-W.left,top:ca.top-W.top,bottom:ca.bottom-W.top,right:ca.right-W.left};e.style.left=ca.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ca.bottom-1+"px":"inline"!=-this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ca.top+1+"px"):e.style.top=ca.top+"px";"1px solid transparent"==da&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var ba=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=l&&(l.parentNode.removeChild(l),l=null);null!=c&&(c.parentNode.removeChild(c),c=null);b.style.border=da});mxEvent.addListener(document,"mousemove",function(ha){for(ha=mxEvent.getSource(ha);null!=-ha;){if(ha==b||ha==e||ha==c||ha==l)return;ha=ha.parentNode}ba()});mxEvent.addListener(document.body,"mouseleave",function(ha){ba()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ea):ea();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&ea()})).observe(b)};+"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ca=b.getBoundingClientRect(),X=mxUtils.getScrollOrigin(document.body);X="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-X.x,top:-X.y};ca={left:ca.left-X.left,top:ca.top-X.top,bottom:ca.bottom-X.top,right:ca.right-X.left};e.style.left=ca.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ca.bottom-1+"px":"inline"!=+this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ca.top+1+"px"):e.style.top=ca.top+"px";"1px solid transparent"==da&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var aa=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=l&&(l.parentNode.removeChild(l),l=null);null!=c&&(c.parentNode.removeChild(c),c=null);b.style.border=da});mxEvent.addListener(document,"mousemove",function(ia){for(ia=mxEvent.getSource(ia);null!=+ia;){if(ia==b||ia==e||ia==c||ia==l)return;ia=ia.parentNode}aa()});mxEvent.addListener(document.body,"mouseleave",function(ia){aa()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ea):ea();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&ea()})).observe(b)};GraphViewer.prototype.createToolbarButton=function(b,e,g,m){var u=document.createElement("div");u.style.borderRight="1px solid #d0d0d0";u.style.display="inline-flex";u.style.alignItems="center";u.style.padding="6px";mxEvent.addListener(u,"click",b);null!=g&&u.setAttribute("title",g);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";b.className="geAdaptiveAsset";null==m||m?(mxEvent.addListener(u,"mouseenter",function(){u.style.backgroundColor="light-dark(#dddddd,#333333)"}),mxEvent.addListener(u,"mouseleave",function(){u.style.backgroundColor="transparent"}),mxUtils.setOpacity(b,60),u.style.cursor="pointer"):mxUtils.setOpacity(u,30);u.appendChild(b);return u};GraphViewer.prototype.disableButton=function(b,e){var g=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=g&&(mxUtils.setOpacity(g.elem,30),mxEvent.removeListener(g.elem,"click",g.handler),mxEvent.addListener(g.elem,"mouseenter",function(){g.elem.style.backgroundColor="#eee"}),e&&g.elem.setAttribute("title",e))};@@ -4263,8 +4265,8 @@ GraphViewer.prototype.showLocalLightbox=function(b){var e=document.createElementg.className="geAdaptiveAsset";var m=mxUtils.bind(this,function(){p.setDarkMode(this.isDarkMode())});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.removeListener("darkModeChanged",m);p.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";urlParams.dark=this.isDarkMode()?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null!=b)try{var u=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));u.noCloseBtn=!0;urlParams["toolbar-config"]=encodeURIComponent(JSON.stringify(u))}catch(f){}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(){};u=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var p=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",m);p.editor.editBlankUrl=this.editBlankUrl;p.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=u;p.refresh=function(){};var B=mxUtils.bind(this,function(f){27==f.keyCode&&p.destroy()}),H=this.initialOverflow,-T=p.destroy;p.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",B),document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=H,GraphViewer.resizeSensorEnabled=!0,T.apply(this,arguments))};var G=p.editor.graph,P=G.container;P.style.overflow="hidden";this.lightboxChrome&&null==b?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",B)):(e.style.display="none",g.style.display=-"none");var R=this;G.getImageFromBundles=function(f){return R.getImageUrl(f)};var c=p.createTemporaryGraph;p.createTemporaryGraph=function(){var f=c.apply(this,arguments);f.getImageFromBundles=function(l){return R.getImageUrl(l)};return f};this.graphConfig.move&&(G.isMoveCellsEvent=function(f){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(G,p);window.setTimeout(mxUtils.bind(this,+S=p.destroy;p.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",B),document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=H,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var G=p.editor.graph,P=G.container;P.style.overflow="hidden";this.lightboxChrome&&null==b?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",B)):(e.style.display="none",g.style.display=+"none");var Q=this;G.getImageFromBundles=function(f){return Q.getImageUrl(f)};var c=p.createTemporaryGraph;p.createTemporaryGraph=function(){var f=c.apply(this,arguments);f.getImageFromBundles=function(l){return Q.getImageUrl(l)};return f};this.graphConfig.move&&(G.isMoveCellsEvent=function(f){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(G,p);window.setTimeout(mxUtils.bind(this,function(){try{mxEvent.addListener(e,"click",function(){p.destroy()}),P.style.outline="none",P.style.zIndex=this.lightboxZIndex,g.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(P)):(document.body.appendChild(P),document.body.appendChild(g)),p.setFileData(this.xml),mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)"),p.chromelessToolbar.style.bottom="60px",p.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(p.chromelessToolbar),p.getEditBlankXml=mxUtils.bind(this,function(){return this.xml}),this.showLayers(G,this.graph),p.lightboxFit(),p.chromelessResize()}catch(f){p.handleError(f,null,function(){p.destroy()})}}),0);return p};Dialog.prototype.getDocumentSize=function(){return new mxRectangle(0,0,Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0))};GraphViewer.prototype.updateTitle=function(b,e){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",e||b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",e||b))};@@ -4281,7 +4283,7 @@ GraphViewer.getCss=function(){return[".geDarkMode img {\n\tfilter: invert(1);\n}GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,g){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var m=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;m.open("GET",b);m.onload=function(){e(null!=m.getText?m.getText():m.responseText)};m.onerror=g;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeObserver=!0;GraphViewer.useResizeSensor=!0;(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(g){return window.setTimeout(g,20)},e=function(g,m){function u(){this.q=[];this.add=function(t){this.q.push(t)};var f,l;this.call=function(){f=0;for(l=this.q.length;f<l;f++)this.q[f].call()}}function p(f,l){return f.currentStyle?f.currentStyle[l]:window.getComputedStyle?window.getComputedStyle(f,null).getPropertyValue(l):f.style[l]}function B(f,l){if(!f.resizedAttached)f.resizedAttached=new u,f.resizedAttached.add(l);else if(f.resizedAttached){f.resizedAttached.add(l);return}f.resizeSensor=document.createElement("div");f.resizeSensor.className="resize-sensor";f.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";f.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>';-f.appendChild(f.resizeSensor);"static"==p(f,"position")&&(f.style.position="relative");var t=f.resizeSensor.childNodes[0],z=t.childNodes[0],C=f.resizeSensor.childNodes[1],F=function(){z.style.width="100000px";z.style.height="100000px";t.scrollLeft=1E5;t.scrollTop=1E5;C.scrollLeft=1E5;C.scrollTop=1E5};F();var N=!1,K=function(){f.resizedAttached&&(N&&(f.resizedAttached.call(),N=!1),b(K))};b(K);var J,da,ea,ca;l=function(){if((ea=f.offsetWidth)!=J||(ca=f.offsetHeight)!=da)N=!0,J=ea,da=ca;F()};var W=function(ba,-ha,la){ba.attachEvent?ba.attachEvent("on"+ha,la):ba.addEventListener(ha,la)};W(t,"scroll",l);W(C,"scroll",l)}var H=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var T=null,G=!1;(new ResizeObserver(function(){G||(null!=T&&window.clearTimeout(T),T=window.setTimeout(function(){G=!0;H();T=null;G=!1},200))})).observe(g)}else{var P=Object.prototype.toString.call(g),R="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===-P||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(R){P=0;for(var c=g.length;P<c;P++)B(g[P],H)}else B(g,H);this.detach=function(){if(R)for(var f=0,l=g.length;f<l;f++)e.detach(g[f]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();+f.appendChild(f.resizeSensor);"static"==p(f,"position")&&(f.style.position="relative");var t=f.resizeSensor.childNodes[0],z=t.childNodes[0],C=f.resizeSensor.childNodes[1],F=function(){z.style.width="100000px";z.style.height="100000px";t.scrollLeft=1E5;t.scrollTop=1E5;C.scrollLeft=1E5;C.scrollTop=1E5};F();var N=!1,K=function(){f.resizedAttached&&(N&&(f.resizedAttached.call(),N=!1),b(K))};b(K);var J,da,ea,ca;l=function(){if((ea=f.offsetWidth)!=J||(ca=f.offsetHeight)!=da)N=!0,J=ea,da=ca;F()};var X=function(aa,+ia,la){aa.attachEvent?aa.attachEvent("on"+ia,la):aa.addEventListener(ia,la)};X(t,"scroll",l);X(C,"scroll",l)}var H=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,G=!1;(new ResizeObserver(function(){G||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){G=!0;H();S=null;G=!1},200))})).observe(g)}else{var P=Object.prototype.toString.call(g),Q="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===+P||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(Q){P=0;for(var c=g.length;P<c;P++)B(g[P],H)}else B(g,H);this.detach=function(){if(Q)for(var f=0,l=g.length;f<l;f++)e.detach(g[f]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();(function(){Editor.initMath();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.jsindex af42e067e..239693d60 100644--- a/src/main/webapp/service-worker.js+++ b/src/main/webapp/service-worker.js@@ -1,2 +1,2 @@-if(!self.define){let e,i={};const r=(r,a)=>(r=new URL(r+".js",a).href,i[r]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=i,document.head.appendChild(e)}else e=r,importScripts(r),i()})).then((()=>{let e=i[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(a,c)=>{const s=e||("document"in self?document.currentScript.src:"")||location.href;if(i[s])return;let d={};const o=e=>r(e,s),f={module:{uri:s},exports:d,require:o};i[s]=Promise.all(a.map((e=>f[e]||o(e)))).then((e=>(c(...e),d)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/app.min.js",revision:"15cc6f38a0326d5546f4214a019dd601"},{url:"js/extensions.min.js",revision:"6c8030b167f277cbd58242619a7ec569"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"f760278d924467fb1d2289448c73fe27"},{url:"js/shapes-14-6-5.min.js",revision:"71913a30c93bc9aff182a3a2b3da1a21"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"57fe6012597666439de3e76c9bb681c1"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"1c4b010eb053bfb9aed1caee8a3d3689"},{url:"styles/atlas.css",revision:"05873c4bba51f571b1da549a967ea06c"},{url:"styles/dark.css",revision:"99dc5495d36d5ebaddababefde083c8c"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"d9a5f6d15d825a0ffa6b5eada5fd0263"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"abed474e47c0c41a5ad2366b4828f77a"},{url:"connect/jira/viewerPanel.js",revision:"75f816c208d0c621e3066a97ff0ee6cf"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"c41221a9a51ff293f05ed13c7b142e5c"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"d3269625ce04b7a277b779ff175957d0"},{url:"connect/jira/fullscreen-viewer.js",revision:"8eceb2fe587296dd11f9c8f6eae34c20"},{url:"plugins/connectJira.js",revision:"c4cb6b60234b04b2c8bc09e555746615"},{url:"plugins/cConf-comments.js",revision:"8af574bd1ae86be37b83b094a5011a4f"},{url:"plugins/cConf-1-4-8.js",revision:"5324b1040e93e7e271c98060c2ef3993"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"261a7494161cee976ecfb110ac7571d2"},{url:"connect/new_common/cac.js",revision:"740dce44cf53499f476ee8edc37d09a0"},{url:"connect/gdrive_common/gac.js",revision:"3bb38a5d9186a896ed04808e921ef888"},{url:"connect/onedrive_common/ac.js",revision:"5fb6ff1a73f54a9086b7a7e1f613b8ed"},{url:"connect/confluence/viewer-init.js",revision:"b82e366bf57ecced9435c2a8ba9cb9b9"},{url:"connect/confluence/viewer.js",revision:"6542434cf3df5c60163e2767678f1bfc"},{url:"connect/confluence/viewer-1-4-42.html",revision:"69c1bca25fd4889bf832e8441c972268"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"4ad77ae3f08c19eddac932b2fa8c7068"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"30ff609b31d4a8c38da6c28e555947ea"},{url:"connect/confluence/includeDiagram.html",revision:"9613fec05b19ddef081ca6e9d8b057bf"},{url:"connect/confluence/macro-editor.js",revision:"03a8dcfc69612b44b6e75e6926a956fc"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"a726a58a2d59523ca753f8b0903532ee"},{url:"resources/dia_am.txt",revision:"f7a8e69eebd1d8f0c2f6a70f400f41a3"},{url:"resources/dia_ar.txt",revision:"65016a8534f38bf6da6f376885d4d69b"},{url:"resources/dia_bg.txt",revision:"d22ffbc3b9f16db712de7b1599713ddb"},{url:"resources/dia_bn.txt",revision:"27fdbdec421253a9b34a6b774adb84ad"},{url:"resources/dia_bs.txt",revision:"bed197c99542dff2f0cfa06ffa5bb12e"},{url:"resources/dia_ca.txt",revision:"53517047fa990942ca8072117a8dc811"},{url:"resources/dia_cs.txt",revision:"8827f488d3a442b743c14fda3cf76d0c"},{url:"resources/dia_da.txt",revision:"b270690419e09c2146e2e6c86c4b76ec"},{url:"resources/dia_de.txt",revision:"0460823830c493a9fc6233026653e8c8"},{url:"resources/dia_el.txt",revision:"3a8c65931767aee90a613d1e8d3e2335"},{url:"resources/dia_eo.txt",revision:"dbd3a69346a7337e52dce734525dea8d"},{url:"resources/dia_es.txt",revision:"ee605383ddb2e211fda1d3610e433e5a"},{url:"resources/dia_et.txt",revision:"4588d8aeadd4e4de360e1cfc2bb56a56"},{url:"resources/dia_eu.txt",revision:"95a8404f4821b4be9021549275e4ae52"},{url:"resources/dia_fa.txt",revision:"0ae92f3d8a33fe0068710ddfc5106cf4"},{url:"resources/dia_fi.txt",revision:"3df4e7235950196c45ca1d9a3c50c7da"},{url:"resources/dia_fil.txt",revision:"d980d719b67fe354964d6757331270e9"},{url:"resources/dia_fr.txt",revision:"c5f64561a12f9b50bac2e325bc5fe4f6"},{url:"resources/dia_gl.txt",revision:"962c461b66718b0340c339b42d99c3fe"},{url:"resources/dia_gu.txt",revision:"15fe4cfedc6f83d0e8f63c5ffb05fa77"},{url:"resources/dia_he.txt",revision:"d58a014851bc8dd145b2c771185c1e33"},{url:"resources/dia_hi.txt",revision:"832093a7a401d574a5f896b4ed4122af"},{url:"resources/dia_hr.txt",revision:"fe57292f5d617ee3eef396714f22ccd0"},{url:"resources/dia_hu.txt",revision:"38c44f5f307a289c42be8587b536eba7"},{url:"resources/dia_id.txt",revision:"dacaf8327a6dca3b0d2fc2ce66f058ef"},{url:"resources/dia_it.txt",revision:"7b1bc2cb511d92ef8f76ff7133a3f035"},{url:"resources/dia_ja.txt",revision:"1322e77f9672c020104bdb179ea7f90d"},{url:"resources/dia_kn.txt",revision:"828501585da7ca9a18beff8e45371c03"},{url:"resources/dia_ko.txt",revision:"ad8459e751d7d5ef360c3443f466e0f8"},{url:"resources/dia_lt.txt",revision:"154efafa92951ea901c6d3ffaca044fe"},{url:"resources/dia_lv.txt",revision:"1fa2d0067f6532b26dfcb0fe83a980e9"},{url:"resources/dia_ml.txt",revision:"a2a67d628adf4aedc0a100e8bd0fcc03"},{url:"resources/dia_mr.txt",revision:"185d046dda09b25c8506b59571fa0cb8"},{url:"resources/dia_ms.txt",revision:"8edf40f4033e9274a823e40c7432c106"},{url:"resources/dia_my.txt",revision:"323eaa97b615ae165080606a2b71c3fb"},{url:"resources/dia_nl.txt",revision:"5b11e87d0936e74a1ff96d577afe0236"},{url:"resources/dia_no.txt",revision:"6c456ca98d726f1ea97820939e6cd54c"},{url:"resources/dia_pl.txt",revision:"9eb8e3085201cc6856fb1ac680950c5d"},{url:"resources/dia_pt-br.txt",revision:"4ad4b10582380b1f4dabaf890e5e7622"},{url:"resources/dia_pt.txt",revision:"a8f441d6fe23bbb3ea14f792e18c09a9"},{url:"resources/dia_ro.txt",revision:"9a20019c05c86c92dc46007b6055c151"},{url:"resources/dia_ru.txt",revision:"814e7dc74061cafb7949906af277d78c"},{url:"resources/dia_si.txt",revision:"6a434bb202a421077e8b7ed63ac231b1"},{url:"resources/dia_sk.txt",revision:"e883518f5cbc4f4f216b60764cf0f057"},{url:"resources/dia_sl.txt",revision:"d66b17e155e3bfe410b3648f139a8cdc"},{url:"resources/dia_sr.txt",revision:"5b421e26c8bc23d7b530746317b0363c"},{url:"resources/dia_sv.txt",revision:"54f5357ef865f19267633c3972189ba0"},{url:"resources/dia_sw.txt",revision:"f2417d57409c8c5f272e83c8238ef42e"},{url:"resources/dia_ta.txt",revision:"b8fc87e296a2cfe5cf0e7bc00e9e37dd"},{url:"resources/dia_te.txt",revision:"87705e0f363b0dd3b191e2f24c5f21b0"},{url:"resources/dia_th.txt",revision:"6b9767d5418e9ec658b61725f9bd8f06"},{url:"resources/dia_tr.txt",revision:"13ae94ba7bf69f8f46b24010293356df"},{url:"resources/dia_uk.txt",revision:"c8c88609ae31bead9e2eab1e04aa215d"},{url:"resources/dia_vi.txt",revision:"258761d474d278d597f93f9002890302"},{url:"resources/dia_zh-tw.txt",revision:"41019f97cd5318cd12f0249f9d848c86"},{url:"resources/dia_zh.txt",revision:"bfda714d8cf978bbec05065dce4fb747"},{url:"favicon.ico",revision:"83014b0f32b6c7b15b66cf3c6d6d7c16"},{url:"images/manifest.json",revision:"38d3a7e4b63e8175f0aab6f03e000f07"},{url:"images/logo.png",revision:"e4e0d092abdb1e668b5ec41a7fe0713c"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"732c29e21332a926318a7005d21ec450"},{url:"images/icon-192-maskable.png",revision:"47e006d0ce4a35eb5beaa97f0c2bfed0"},{url:"images/icon-192.png",revision:"d022403d52435d76afec82c4e24a17ef"},{url:"images/icon-512-maskable.png",revision:"cf152feeb01fb21f3148a71a3540266e"},{url:"images/icon-512.png",revision:"a3a0df7e7a385244b74073f81ecc45de"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"7985b4d1692766a7db52cbdd10893ad9"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));+if(!self.define){let e,i={};const r=(r,a)=>(r=new URL(r+".js",a).href,i[r]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=i,document.head.appendChild(e)}else e=r,importScripts(r),i()})).then((()=>{let e=i[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(a,c)=>{const s=e||("document"in self?document.currentScript.src:"")||location.href;if(i[s])return;let d={};const o=e=>r(e,s),f={module:{uri:s},exports:d,require:o};i[s]=Promise.all(a.map((e=>f[e]||o(e)))).then((e=>(c(...e),d)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/app.min.js",revision:"6343026eeb52bda9bf8b51c75f0b2a4d"},{url:"js/extensions.min.js",revision:"94ab8fc247de742146e5cc8ea27307c6"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"f760278d924467fb1d2289448c73fe27"},{url:"js/shapes-14-6-5.min.js",revision:"71913a30c93bc9aff182a3a2b3da1a21"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"57fe6012597666439de3e76c9bb681c1"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"1c4b010eb053bfb9aed1caee8a3d3689"},{url:"styles/atlas.css",revision:"05873c4bba51f571b1da549a967ea06c"},{url:"styles/dark.css",revision:"99dc5495d36d5ebaddababefde083c8c"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"517f8a2042bbb2fd4d16d21c847f17f3"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"abed474e47c0c41a5ad2366b4828f77a"},{url:"connect/jira/viewerPanel.js",revision:"75f816c208d0c621e3066a97ff0ee6cf"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"c41221a9a51ff293f05ed13c7b142e5c"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"d3269625ce04b7a277b779ff175957d0"},{url:"connect/jira/fullscreen-viewer.js",revision:"8eceb2fe587296dd11f9c8f6eae34c20"},{url:"plugins/connectJira.js",revision:"c4cb6b60234b04b2c8bc09e555746615"},{url:"plugins/cConf-comments.js",revision:"8af574bd1ae86be37b83b094a5011a4f"},{url:"plugins/cConf-1-4-8.js",revision:"0b1c0d105b4cc2c228fbcdd7d09310ae"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"261a7494161cee976ecfb110ac7571d2"},{url:"connect/new_common/cac.js",revision:"740dce44cf53499f476ee8edc37d09a0"},{url:"connect/gdrive_common/gac.js",revision:"3bb38a5d9186a896ed04808e921ef888"},{url:"connect/onedrive_common/ac.js",revision:"5fb6ff1a73f54a9086b7a7e1f613b8ed"},{url:"connect/confluence/viewer-init.js",revision:"b82e366bf57ecced9435c2a8ba9cb9b9"},{url:"connect/confluence/viewer.js",revision:"6542434cf3df5c60163e2767678f1bfc"},{url:"connect/confluence/viewer-1-4-42.html",revision:"69c1bca25fd4889bf832e8441c972268"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"4ad77ae3f08c19eddac932b2fa8c7068"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"30ff609b31d4a8c38da6c28e555947ea"},{url:"connect/confluence/includeDiagram.html",revision:"9613fec05b19ddef081ca6e9d8b057bf"},{url:"connect/confluence/macro-editor.js",revision:"03a8dcfc69612b44b6e75e6926a956fc"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"a726a58a2d59523ca753f8b0903532ee"},{url:"resources/dia_am.txt",revision:"f7a8e69eebd1d8f0c2f6a70f400f41a3"},{url:"resources/dia_ar.txt",revision:"65016a8534f38bf6da6f376885d4d69b"},{url:"resources/dia_bg.txt",revision:"d22ffbc3b9f16db712de7b1599713ddb"},{url:"resources/dia_bn.txt",revision:"27fdbdec421253a9b34a6b774adb84ad"},{url:"resources/dia_bs.txt",revision:"bed197c99542dff2f0cfa06ffa5bb12e"},{url:"resources/dia_ca.txt",revision:"53517047fa990942ca8072117a8dc811"},{url:"resources/dia_cs.txt",revision:"8827f488d3a442b743c14fda3cf76d0c"},{url:"resources/dia_da.txt",revision:"b270690419e09c2146e2e6c86c4b76ec"},{url:"resources/dia_de.txt",revision:"0460823830c493a9fc6233026653e8c8"},{url:"resources/dia_el.txt",revision:"3a8c65931767aee90a613d1e8d3e2335"},{url:"resources/dia_eo.txt",revision:"dbd3a69346a7337e52dce734525dea8d"},{url:"resources/dia_es.txt",revision:"ee605383ddb2e211fda1d3610e433e5a"},{url:"resources/dia_et.txt",revision:"4588d8aeadd4e4de360e1cfc2bb56a56"},{url:"resources/dia_eu.txt",revision:"95a8404f4821b4be9021549275e4ae52"},{url:"resources/dia_fa.txt",revision:"0ae92f3d8a33fe0068710ddfc5106cf4"},{url:"resources/dia_fi.txt",revision:"3df4e7235950196c45ca1d9a3c50c7da"},{url:"resources/dia_fil.txt",revision:"d980d719b67fe354964d6757331270e9"},{url:"resources/dia_fr.txt",revision:"c5f64561a12f9b50bac2e325bc5fe4f6"},{url:"resources/dia_gl.txt",revision:"962c461b66718b0340c339b42d99c3fe"},{url:"resources/dia_gu.txt",revision:"15fe4cfedc6f83d0e8f63c5ffb05fa77"},{url:"resources/dia_he.txt",revision:"d58a014851bc8dd145b2c771185c1e33"},{url:"resources/dia_hi.txt",revision:"832093a7a401d574a5f896b4ed4122af"},{url:"resources/dia_hr.txt",revision:"fe57292f5d617ee3eef396714f22ccd0"},{url:"resources/dia_hu.txt",revision:"38c44f5f307a289c42be8587b536eba7"},{url:"resources/dia_id.txt",revision:"dacaf8327a6dca3b0d2fc2ce66f058ef"},{url:"resources/dia_it.txt",revision:"7b1bc2cb511d92ef8f76ff7133a3f035"},{url:"resources/dia_ja.txt",revision:"1322e77f9672c020104bdb179ea7f90d"},{url:"resources/dia_kn.txt",revision:"828501585da7ca9a18beff8e45371c03"},{url:"resources/dia_ko.txt",revision:"ad8459e751d7d5ef360c3443f466e0f8"},{url:"resources/dia_lt.txt",revision:"154efafa92951ea901c6d3ffaca044fe"},{url:"resources/dia_lv.txt",revision:"1fa2d0067f6532b26dfcb0fe83a980e9"},{url:"resources/dia_ml.txt",revision:"a2a67d628adf4aedc0a100e8bd0fcc03"},{url:"resources/dia_mr.txt",revision:"185d046dda09b25c8506b59571fa0cb8"},{url:"resources/dia_ms.txt",revision:"8edf40f4033e9274a823e40c7432c106"},{url:"resources/dia_my.txt",revision:"323eaa97b615ae165080606a2b71c3fb"},{url:"resources/dia_nl.txt",revision:"5b11e87d0936e74a1ff96d577afe0236"},{url:"resources/dia_no.txt",revision:"6c456ca98d726f1ea97820939e6cd54c"},{url:"resources/dia_pl.txt",revision:"9eb8e3085201cc6856fb1ac680950c5d"},{url:"resources/dia_pt-br.txt",revision:"4ad4b10582380b1f4dabaf890e5e7622"},{url:"resources/dia_pt.txt",revision:"a8f441d6fe23bbb3ea14f792e18c09a9"},{url:"resources/dia_ro.txt",revision:"9a20019c05c86c92dc46007b6055c151"},{url:"resources/dia_ru.txt",revision:"814e7dc74061cafb7949906af277d78c"},{url:"resources/dia_si.txt",revision:"6a434bb202a421077e8b7ed63ac231b1"},{url:"resources/dia_sk.txt",revision:"e883518f5cbc4f4f216b60764cf0f057"},{url:"resources/dia_sl.txt",revision:"d66b17e155e3bfe410b3648f139a8cdc"},{url:"resources/dia_sr.txt",revision:"5b421e26c8bc23d7b530746317b0363c"},{url:"resources/dia_sv.txt",revision:"54f5357ef865f19267633c3972189ba0"},{url:"resources/dia_sw.txt",revision:"f2417d57409c8c5f272e83c8238ef42e"},{url:"resources/dia_ta.txt",revision:"b8fc87e296a2cfe5cf0e7bc00e9e37dd"},{url:"resources/dia_te.txt",revision:"87705e0f363b0dd3b191e2f24c5f21b0"},{url:"resources/dia_th.txt",revision:"6b9767d5418e9ec658b61725f9bd8f06"},{url:"resources/dia_tr.txt",revision:"13ae94ba7bf69f8f46b24010293356df"},{url:"resources/dia_uk.txt",revision:"c8c88609ae31bead9e2eab1e04aa215d"},{url:"resources/dia_vi.txt",revision:"258761d474d278d597f93f9002890302"},{url:"resources/dia_zh-tw.txt",revision:"41019f97cd5318cd12f0249f9d848c86"},{url:"resources/dia_zh.txt",revision:"bfda714d8cf978bbec05065dce4fb747"},{url:"favicon.ico",revision:"83014b0f32b6c7b15b66cf3c6d6d7c16"},{url:"images/manifest.json",revision:"38d3a7e4b63e8175f0aab6f03e000f07"},{url:"images/logo.png",revision:"e4e0d092abdb1e668b5ec41a7fe0713c"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"732c29e21332a926318a7005d21ec450"},{url:"images/icon-192-maskable.png",revision:"47e006d0ce4a35eb5beaa97f0c2bfed0"},{url:"images/icon-192.png",revision:"d022403d52435d76afec82c4e24a17ef"},{url:"images/icon-512-maskable.png",revision:"cf152feeb01fb21f3148a71a3540266e"},{url:"images/icon-512.png",revision:"a3a0df7e7a385244b74073f81ecc45de"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"7985b4d1692766a7db52cbdd10893ad9"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));//# sourceMappingURL=service-worker.js.mapdiff --git a/src/main/webapp/service-worker.js.map b/src/main/webapp/service-worker.js.mapindex c9752a594..03adb4889 100644--- a/src/main/webapp/service-worker.js.map+++ b/src/main/webapp/service-worker.js.map@@ -1 +1 @@-{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/c0a85820b0fd02d1f3eb46231ce44916/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"15cc6f38a0326d5546f4214a019dd601\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"6c8030b167f277cbd58242619a7ec569\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"f760278d924467fb1d2289448c73fe27\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"71913a30c93bc9aff182a3a2b3da1a21\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"57fe6012597666439de3e76c9bb681c1\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"shortcuts.svg\",\n \"revision\": \"2381dd779ce6cfee954042a7f784c7e6\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"1c4b010eb053bfb9aed1caee8a3d3689\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"05873c4bba51f571b1da549a967ea06c\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"99dc5495d36d5ebaddababefde083c8c\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"d9a5f6d15d825a0ffa6b5eada5fd0263\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"41dc8af9576b47f359cff19fff7a41c2\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"4836f5e4308abe57830e441518364f23\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"abed474e47c0c41a5ad2366b4828f77a\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"75f816c208d0c621e3066a97ff0ee6cf\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"c41221a9a51ff293f05ed13c7b142e5c\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"d3269625ce04b7a277b779ff175957d0\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"8eceb2fe587296dd11f9c8f6eae34c20\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"c4cb6b60234b04b2c8bc09e555746615\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"8af574bd1ae86be37b83b094a5011a4f\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"5324b1040e93e7e271c98060c2ef3993\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"261a7494161cee976ecfb110ac7571d2\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"740dce44cf53499f476ee8edc37d09a0\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"3bb38a5d9186a896ed04808e921ef888\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"5fb6ff1a73f54a9086b7a7e1f613b8ed\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"b82e366bf57ecced9435c2a8ba9cb9b9\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"6542434cf3df5c60163e2767678f1bfc\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"69c1bca25fd4889bf832e8441c972268\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"4ad77ae3f08c19eddac932b2fa8c7068\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"30ff609b31d4a8c38da6c28e555947ea\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"9613fec05b19ddef081ca6e9d8b057bf\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"03a8dcfc69612b44b6e75e6926a956fc\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"a726a58a2d59523ca753f8b0903532ee\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"f7a8e69eebd1d8f0c2f6a70f400f41a3\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"65016a8534f38bf6da6f376885d4d69b\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"d22ffbc3b9f16db712de7b1599713ddb\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"27fdbdec421253a9b34a6b774adb84ad\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"bed197c99542dff2f0cfa06ffa5bb12e\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"53517047fa990942ca8072117a8dc811\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"8827f488d3a442b743c14fda3cf76d0c\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"b270690419e09c2146e2e6c86c4b76ec\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"0460823830c493a9fc6233026653e8c8\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"3a8c65931767aee90a613d1e8d3e2335\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"dbd3a69346a7337e52dce734525dea8d\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"ee605383ddb2e211fda1d3610e433e5a\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"4588d8aeadd4e4de360e1cfc2bb56a56\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"95a8404f4821b4be9021549275e4ae52\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"0ae92f3d8a33fe0068710ddfc5106cf4\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"3df4e7235950196c45ca1d9a3c50c7da\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"d980d719b67fe354964d6757331270e9\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"c5f64561a12f9b50bac2e325bc5fe4f6\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"962c461b66718b0340c339b42d99c3fe\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"15fe4cfedc6f83d0e8f63c5ffb05fa77\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"d58a014851bc8dd145b2c771185c1e33\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"832093a7a401d574a5f896b4ed4122af\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"fe57292f5d617ee3eef396714f22ccd0\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"38c44f5f307a289c42be8587b536eba7\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"dacaf8327a6dca3b0d2fc2ce66f058ef\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"7b1bc2cb511d92ef8f76ff7133a3f035\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"1322e77f9672c020104bdb179ea7f90d\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"828501585da7ca9a18beff8e45371c03\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"ad8459e751d7d5ef360c3443f466e0f8\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"154efafa92951ea901c6d3ffaca044fe\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"1fa2d0067f6532b26dfcb0fe83a980e9\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"a2a67d628adf4aedc0a100e8bd0fcc03\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"185d046dda09b25c8506b59571fa0cb8\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"8edf40f4033e9274a823e40c7432c106\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"323eaa97b615ae165080606a2b71c3fb\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"5b11e87d0936e74a1ff96d577afe0236\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"6c456ca98d726f1ea97820939e6cd54c\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"9eb8e3085201cc6856fb1ac680950c5d\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"4ad4b10582380b1f4dabaf890e5e7622\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"a8f441d6fe23bbb3ea14f792e18c09a9\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"9a20019c05c86c92dc46007b6055c151\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"814e7dc74061cafb7949906af277d78c\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"6a434bb202a421077e8b7ed63ac231b1\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"e883518f5cbc4f4f216b60764cf0f057\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"d66b17e155e3bfe410b3648f139a8cdc\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"5b421e26c8bc23d7b530746317b0363c\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"54f5357ef865f19267633c3972189ba0\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"f2417d57409c8c5f272e83c8238ef42e\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"b8fc87e296a2cfe5cf0e7bc00e9e37dd\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"87705e0f363b0dd3b191e2f24c5f21b0\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"6b9767d5418e9ec658b61725f9bd8f06\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"13ae94ba7bf69f8f46b24010293356df\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"c8c88609ae31bead9e2eab1e04aa215d\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"258761d474d278d597f93f9002890302\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"41019f97cd5318cd12f0249f9d848c86\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"bfda714d8cf978bbec05065dce4fb747\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"83014b0f32b6c7b15b66cf3c6d6d7c16\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"38d3a7e4b63e8175f0aab6f03e000f07\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"e4e0d092abdb1e668b5ec41a7fe0713c\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"732c29e21332a926318a7005d21ec450\"\n },\n {\n \"url\": \"images/icon-192-maskable.png\",\n \"revision\": \"47e006d0ce4a35eb5beaa97f0c2bfed0\"\n },\n {\n \"url\": \"images/icon-192.png\",\n \"revision\": \"d022403d52435d76afec82c4e24a17ef\"\n },\n {\n \"url\": \"images/icon-512-maskable.png\",\n \"revision\": \"cf152feeb01fb21f3148a71a3540266e\"\n },\n {\n \"url\": \"images/icon-512.png\",\n \"revision\": \"a3a0df7e7a385244b74073f81ecc45de\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"7985b4d1692766a7db52cbdd10893ad9\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,YACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,8CACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,uCACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,wCACKC,SAAA,oCAEd,CACED,IAAO,4CACKC,SAAA,oCAEd,CACED,IAAO,6CACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,mCACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,cACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sCACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of file+{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/345940593e5bcdd4e1ce068e6abeb4ae/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"6343026eeb52bda9bf8b51c75f0b2a4d\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"94ab8fc247de742146e5cc8ea27307c6\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"f760278d924467fb1d2289448c73fe27\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"71913a30c93bc9aff182a3a2b3da1a21\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"57fe6012597666439de3e76c9bb681c1\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"shortcuts.svg\",\n \"revision\": \"2381dd779ce6cfee954042a7f784c7e6\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"1c4b010eb053bfb9aed1caee8a3d3689\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"05873c4bba51f571b1da549a967ea06c\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"99dc5495d36d5ebaddababefde083c8c\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"517f8a2042bbb2fd4d16d21c847f17f3\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"41dc8af9576b47f359cff19fff7a41c2\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"4836f5e4308abe57830e441518364f23\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"abed474e47c0c41a5ad2366b4828f77a\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"75f816c208d0c621e3066a97ff0ee6cf\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"c41221a9a51ff293f05ed13c7b142e5c\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"d3269625ce04b7a277b779ff175957d0\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"8eceb2fe587296dd11f9c8f6eae34c20\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"c4cb6b60234b04b2c8bc09e555746615\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"8af574bd1ae86be37b83b094a5011a4f\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"0b1c0d105b4cc2c228fbcdd7d09310ae\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"261a7494161cee976ecfb110ac7571d2\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"740dce44cf53499f476ee8edc37d09a0\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"3bb38a5d9186a896ed04808e921ef888\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"5fb6ff1a73f54a9086b7a7e1f613b8ed\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"b82e366bf57ecced9435c2a8ba9cb9b9\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"6542434cf3df5c60163e2767678f1bfc\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"69c1bca25fd4889bf832e8441c972268\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"4ad77ae3f08c19eddac932b2fa8c7068\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"30ff609b31d4a8c38da6c28e555947ea\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"9613fec05b19ddef081ca6e9d8b057bf\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"03a8dcfc69612b44b6e75e6926a956fc\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"a726a58a2d59523ca753f8b0903532ee\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"f7a8e69eebd1d8f0c2f6a70f400f41a3\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"65016a8534f38bf6da6f376885d4d69b\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"d22ffbc3b9f16db712de7b1599713ddb\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"27fdbdec421253a9b34a6b774adb84ad\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"bed197c99542dff2f0cfa06ffa5bb12e\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"53517047fa990942ca8072117a8dc811\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"8827f488d3a442b743c14fda3cf76d0c\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"b270690419e09c2146e2e6c86c4b76ec\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"0460823830c493a9fc6233026653e8c8\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"3a8c65931767aee90a613d1e8d3e2335\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"dbd3a69346a7337e52dce734525dea8d\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"ee605383ddb2e211fda1d3610e433e5a\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"4588d8aeadd4e4de360e1cfc2bb56a56\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"95a8404f4821b4be9021549275e4ae52\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"0ae92f3d8a33fe0068710ddfc5106cf4\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"3df4e7235950196c45ca1d9a3c50c7da\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"d980d719b67fe354964d6757331270e9\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"c5f64561a12f9b50bac2e325bc5fe4f6\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"962c461b66718b0340c339b42d99c3fe\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"15fe4cfedc6f83d0e8f63c5ffb05fa77\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"d58a014851bc8dd145b2c771185c1e33\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"832093a7a401d574a5f896b4ed4122af\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"fe57292f5d617ee3eef396714f22ccd0\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"38c44f5f307a289c42be8587b536eba7\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"dacaf8327a6dca3b0d2fc2ce66f058ef\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"7b1bc2cb511d92ef8f76ff7133a3f035\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"1322e77f9672c020104bdb179ea7f90d\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"828501585da7ca9a18beff8e45371c03\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"ad8459e751d7d5ef360c3443f466e0f8\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"154efafa92951ea901c6d3ffaca044fe\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"1fa2d0067f6532b26dfcb0fe83a980e9\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"a2a67d628adf4aedc0a100e8bd0fcc03\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"185d046dda09b25c8506b59571fa0cb8\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"8edf40f4033e9274a823e40c7432c106\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"323eaa97b615ae165080606a2b71c3fb\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"5b11e87d0936e74a1ff96d577afe0236\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"6c456ca98d726f1ea97820939e6cd54c\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"9eb8e3085201cc6856fb1ac680950c5d\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"4ad4b10582380b1f4dabaf890e5e7622\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"a8f441d6fe23bbb3ea14f792e18c09a9\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"9a20019c05c86c92dc46007b6055c151\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"814e7dc74061cafb7949906af277d78c\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"6a434bb202a421077e8b7ed63ac231b1\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"e883518f5cbc4f4f216b60764cf0f057\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"d66b17e155e3bfe410b3648f139a8cdc\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"5b421e26c8bc23d7b530746317b0363c\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"54f5357ef865f19267633c3972189ba0\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"f2417d57409c8c5f272e83c8238ef42e\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"b8fc87e296a2cfe5cf0e7bc00e9e37dd\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"87705e0f363b0dd3b191e2f24c5f21b0\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"6b9767d5418e9ec658b61725f9bd8f06\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"13ae94ba7bf69f8f46b24010293356df\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"c8c88609ae31bead9e2eab1e04aa215d\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"258761d474d278d597f93f9002890302\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"41019f97cd5318cd12f0249f9d848c86\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"bfda714d8cf978bbec05065dce4fb747\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"83014b0f32b6c7b15b66cf3c6d6d7c16\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"38d3a7e4b63e8175f0aab6f03e000f07\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"e4e0d092abdb1e668b5ec41a7fe0713c\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"732c29e21332a926318a7005d21ec450\"\n },\n {\n \"url\": \"images/icon-192-maskable.png\",\n \"revision\": \"47e006d0ce4a35eb5beaa97f0c2bfed0\"\n },\n {\n \"url\": \"images/icon-192.png\",\n \"revision\": \"d022403d52435d76afec82c4e24a17ef\"\n },\n {\n \"url\": \"images/icon-512-maskable.png\",\n \"revision\": \"cf152feeb01fb21f3148a71a3540266e\"\n },\n {\n \"url\": \"images/icon-512.png\",\n \"revision\": \"a3a0df7e7a385244b74073f81ecc45de\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"7985b4d1692766a7db52cbdd10893ad9\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,YACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,8CACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,uCACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,wCACKC,SAAA,oCAEd,CACED,IAAO,4CACKC,SAAA,oCAEd,CACED,IAAO,6CACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,mCACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,cACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sCACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of file